dhi-copilot-ai 3.1.3 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -11,10 +11,10 @@ var Rl={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24
|
|
|
11
11
|
*
|
|
12
12
|
* This source code is licensed under the ISC license.
|
|
13
13
|
* See the LICENSE file in the root directory of this source tree.
|
|
14
|
-
*/const Ll=u.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...s},l)=>u.createElement("svg",{ref:l,...Rl,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:Nl("lucide",o),...s},[...a.map(([e,t])=>u.createElement(e,t)),...Array.isArray(i)?i:[i]])),Ol=(e,t)=>{const n=u.forwardRef(({className:n,...r},o)=>{return u.createElement(Ll,{ref:o,iconNode:t,className:Nl(`lucide-${i=e,i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,n),...r});var i});return n.displayName=`${e}`,n},Dl=Ol("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]),_l=Ol("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]),Ml=Ol("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),zl=Ol("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),Fl=Ol("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),Il=Ol("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),Bl=Ol("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]),Vl=Ol("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),Ul=Ol("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]),Hl=Ol("Cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]),$l=Ol("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]),ql=Ol("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]),Wl=Ol("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]),Kl=Ol("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]),Yl=Ol("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]]),Ql=Ol("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]),Xl=Ol("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),Gl=Ol("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]),Jl=Ol("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]),Zl=Ol("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]),ec=Ol("Paperclip",[["path",{d:"M13.234 20.252 21 12.3",key:"1cbrk9"}],["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 0 2.828 2 2 0 0 0 2.828 0l8.414-8.586a4 4 0 0 0 0-5.656 4 4 0 0 0-5.656 0l-8.415 8.585a6 6 0 1 0 8.486 8.486",key:"1pkts6"}]]),tc=Ol("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),nc=Ol("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]),rc=Ol("SendHorizontal",[["path",{d:"M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z",key:"117uat"}],["path",{d:"M6 12h16",key:"s4cdu5"}]]),oc=Ol("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]),ic=Ol("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),ac=Ol("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]),sc=Ol("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),lc=Ol("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]),cc=Ol("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),uc=Ol("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]),dc=Ol("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),fc=u.createContext(null),pc=({children:e,value:t})=>{const n={apiUrl:void 0,userToken:void 0,userId:void 0,userName:"Utilisateur",botName:"Fluxoon AI Copilot",primaryColor:"#2563EB",userMessageColor:"#b0c2df",position:"right",initialMessage:["👋 **Bonjour ! Je suis votre assistante intelligente.**","Je suis ici pour vous aider à naviguer dans vos documents et répondre à vos questions avec précision.\n","Ce que je peux faire pour vous :\n","🔍 **Rechercher** des informations dans vos bases de connaissances.","📄 **Analyser** les documents que vous m'envoyez.","⚖️ **Extraire** des données précises avec citations des sources.\n","*Posez-moi votre première question ci-dessous pour commencer !*"].join("\n"),logoUrl:"https://cdn-icons-png.flaticon.com/512/4712/4712035.png"},r=u.useMemo(()=>({...n,...t}),[t]);return $.jsx(fc.Provider,{value:r,children:e})},hc=()=>u.useContext(fc),mc=e=>{let t;const n=new Set,r=(e,r)=>{const o="function"==typeof e?e(t):e;if(!Object.is(o,t)){const e=t;t=(null!=r?r:"object"!=typeof o||null===o)?o:Object.assign({},t,o),n.forEach(n=>n(t,e))}},o=()=>t,i={setState:r,getState:o,getInitialState:()=>a,subscribe:e=>(n.add(e),()=>n.delete(e))},a=t=e(r,o,i);return i},gc=e=>e;
|
|
14
|
+
*/const Ll=u.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...s},l)=>u.createElement("svg",{ref:l,...Rl,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:Nl("lucide",o),...s},[...a.map(([e,t])=>u.createElement(e,t)),...Array.isArray(i)?i:[i]])),Ol=(e,t)=>{const n=u.forwardRef(({className:n,...r},o)=>{return u.createElement(Ll,{ref:o,iconNode:t,className:Nl(`lucide-${i=e,i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,n),...r});var i});return n.displayName=`${e}`,n},Dl=Ol("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]),_l=Ol("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]),Ml=Ol("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),zl=Ol("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),Fl=Ol("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),Il=Ol("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),Bl=Ol("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]),Vl=Ol("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),Ul=Ol("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]),Hl=Ol("Cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]),$l=Ol("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]),ql=Ol("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]),Wl=Ol("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]),Kl=Ol("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]),Yl=Ol("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]]),Ql=Ol("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]),Xl=Ol("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),Gl=Ol("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]),Jl=Ol("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]),Zl=Ol("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]),ec=Ol("Paperclip",[["path",{d:"M13.234 20.252 21 12.3",key:"1cbrk9"}],["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 0 2.828 2 2 0 0 0 2.828 0l8.414-8.586a4 4 0 0 0 0-5.656 4 4 0 0 0-5.656 0l-8.415 8.585a6 6 0 1 0 8.486 8.486",key:"1pkts6"}]]),tc=Ol("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),nc=Ol("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]),rc=Ol("SendHorizontal",[["path",{d:"M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z",key:"117uat"}],["path",{d:"M6 12h16",key:"s4cdu5"}]]),oc=Ol("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]),ic=Ol("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),ac=Ol("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]),sc=Ol("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),lc=Ol("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]),cc=Ol("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),uc=Ol("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]),dc=Ol("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),fc=u.createContext(null),pc=({children:e,value:t})=>{const n={apiUrl:void 0,companyId:void 0,userToken:void 0,userId:void 0,userName:"Utilisateur",botName:"Fluxoon AI Copilot",primaryColor:"#2563EB",userMessageColor:"#b0c2df",position:"right",initialMessage:["👋 **Bonjour ! Je suis votre assistante intelligente.**","Je suis ici pour vous aider à naviguer dans vos documents et répondre à vos questions avec précision.\n","Ce que je peux faire pour vous :\n","🔍 **Rechercher** des informations dans vos bases de connaissances.","📄 **Analyser** les documents que vous m'envoyez.","⚖️ **Extraire** des données précises avec citations des sources.\n","*Posez-moi votre première question ci-dessous pour commencer !*"].join("\n"),logoUrl:"https://cdn-icons-png.flaticon.com/512/4712/4712035.png"},r=u.useMemo(()=>({...n,...t}),[t]);return $.jsx(fc.Provider,{value:r,children:e})},hc=()=>u.useContext(fc),mc=e=>{let t;const n=new Set,r=(e,r)=>{const o="function"==typeof e?e(t):e;if(!Object.is(o,t)){const e=t;t=(null!=r?r:"object"!=typeof o||null===o)?o:Object.assign({},t,o),n.forEach(n=>n(t,e))}},o=()=>t,i={setState:r,getState:o,getInitialState:()=>a,subscribe:e=>(n.add(e),()=>n.delete(e))},a=t=e(r,o,i);return i},gc=e=>e;
|
|
15
15
|
/**
|
|
16
16
|
* @license lucide-react v0.474.0 - ISC
|
|
17
17
|
*
|
|
18
18
|
* This source code is licensed under the ISC license.
|
|
19
19
|
* See the LICENSE file in the root directory of this source tree.
|
|
20
|
-
*/const yc=e=>{const t=(e=>e?mc(e):mc)(e),n=e=>function(e,t=gc){const n=d.useSyncExternalStore(e.subscribe,d.useCallback(()=>t(e.getState()),[e,t]),d.useCallback(()=>t(e.getInitialState()),[e,t]));return d.useDebugValue(n),n}(t,e);return Object.assign(n,t),n};function vc(e,t){return function(){return e.apply(t,arguments)}}const{toString:bc}=Object.prototype,{getPrototypeOf:xc}=Object,{iterator:wc,toStringTag:kc}=Symbol,Sc=(e=>t=>{const n=bc.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ec=e=>(e=e.toLowerCase(),t=>Sc(t)===e),Cc=e=>t=>typeof t===e,{isArray:Tc}=Array,Pc=Cc("undefined");function Ac(e){return null!==e&&!Pc(e)&&null!==e.constructor&&!Pc(e.constructor)&&Rc(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const jc=Ec("ArrayBuffer");const Nc=Cc("string"),Rc=Cc("function"),Lc=Cc("number"),Oc=e=>null!==e&&"object"==typeof e,Dc=e=>{if("object"!==Sc(e))return!1;const t=xc(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||kc in e||wc in e)},_c=Ec("Date"),Mc=Ec("File"),zc=Ec("Blob"),Fc=Ec("FileList");const Ic="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},Bc=void 0!==Ic.FormData?Ic.FormData:void 0,Vc=Ec("URLSearchParams"),[Uc,Hc,$c,qc]=["ReadableStream","Request","Response","Headers"].map(Ec);function Wc(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),Tc(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(Ac(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let a;for(r=0;r<i;r++)a=o[r],t.call(null,e[a],a,e)}}function Kc(e,t){if(Ac(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const Yc="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,Qc=e=>!Pc(e)&&e!==Yc;const Xc=(e=>t=>e&&t instanceof e)("undefined"!=typeof Uint8Array&&xc(Uint8Array)),Gc=Ec("HTMLFormElement"),Jc=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Zc=Ec("RegExp"),eu=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Wc(n,(n,o)=>{let i;!1!==(i=t(n,o,e))&&(r[o]=i||n)}),Object.defineProperties(e,r)};const tu=Ec("AsyncFunction"),nu=(ru="function"==typeof setImmediate,ou=Rc(Yc.postMessage),ru?setImmediate:ou?(iu=`axios@${Math.random()}`,au=[],Yc.addEventListener("message",({source:e,data:t})=>{e===Yc&&t===iu&&au.length&&au.shift()()},!1),e=>{au.push(e),Yc.postMessage(iu,"*")}):e=>setTimeout(e));var ru,ou,iu,au;const su="undefined"!=typeof queueMicrotask?queueMicrotask.bind(Yc):"undefined"!=typeof process&&process.nextTick||nu,lu={isArray:Tc,isArrayBuffer:jc,isBuffer:Ac,isFormData:e=>{if(!e)return!1;if(Bc&&e instanceof Bc)return!0;const t=xc(e);if(!t||t===Object.prototype)return!1;if(!Rc(e.append))return!1;const n=Sc(e);return"formdata"===n||"object"===n&&Rc(e.toString)&&"[object FormData]"===e.toString()},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&jc(e.buffer),t},isString:Nc,isNumber:Lc,isBoolean:e=>!0===e||!1===e,isObject:Oc,isPlainObject:Dc,isEmptyObject:e=>{if(!Oc(e)||Ac(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},isReadableStream:Uc,isRequest:Hc,isResponse:$c,isHeaders:qc,isUndefined:Pc,isDate:_c,isFile:Mc,isReactNativeBlob:e=>!(!e||void 0===e.uri),isReactNative:e=>e&&void 0!==e.getParts,isBlob:zc,isRegExp:Zc,isFunction:Rc,isStream:e=>Oc(e)&&Rc(e.pipe),isURLSearchParams:Vc,isTypedArray:Xc,isFileList:Fc,forEach:Wc,merge:function e(...t){const{caseless:n,skipUndefined:r}=Qc(this)&&this||{},o={},i=(t,i)=>{if("__proto__"===i||"constructor"===i||"prototype"===i)return;const a=n&&Kc(o,i)||i,s=Jc(o,a)?o[a]:void 0;Dc(s)&&Dc(t)?o[a]=e(s,t):Dc(t)?o[a]=e({},t):Tc(t)?o[a]=t.slice():r&&Pc(t)||(o[a]=t)};for(let a=0,s=t.length;a<s;a++)t[a]&&Wc(t[a],i);return o},extend:(e,t,n,{allOwnKeys:r}={})=>(Wc(t,(t,r)=>{n&&Rc(t)?Object.defineProperty(e,r,{__proto__:null,value:vc(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,r,{__proto__:null,value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,i,a;const s={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],r&&!r(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==n&&xc(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:Sc,kindOfTest:Ec,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(Tc(e))return e;let t=e.length;if(!Lc(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[wc]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:Gc,hasOwnProperty:Jc,hasOwnProp:Jc,reduceDescriptors:eu,freezeMethods:e=>{eu(e,(t,n)=>{if(Rc(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];Rc(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach(e=>{n[e]=!0})};return Tc(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:Kc,global:Yc,isContextDefined:Qc,isSpecCompliantForm:function(e){return!!(e&&Rc(e.append)&&"FormData"===e[kc]&&e[wc])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(Oc(e)){if(t.indexOf(e)>=0)return;if(Ac(e))return e;if(!("toJSON"in e)){t[r]=e;const o=Tc(e)?[]:{};return Wc(e,(e,t)=>{const i=n(e,r+1);!Pc(i)&&(o[t]=i)}),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:tu,isThenable:e=>e&&(Oc(e)||Rc(e))&&Rc(e.then)&&Rc(e.catch),setImmediate:nu,asap:su,isIterable:e=>null!=e&&Rc(e[wc])},cu=lu.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),uu=Symbol("internals"),du=/[^\x09\x20-\x7E\x80-\xFF]/g;function fu(e){return e&&String(e).trim().toLowerCase()}function pu(e){return!1===e||null==e?e:lu.isArray(e)?e.map(pu):function(e){let t=0,n=e.length;for(;t<n;){const n=e.charCodeAt(t);if(9!==n&&32!==n)break;t+=1}for(;n>t;){const t=e.charCodeAt(n-1);if(9!==t&&32!==t)break;n-=1}return 0===t&&n===e.length?e:e.slice(t,n)}(String(e).replace(du,""))}function hu(e,t,n,r,o){return lu.isFunction(r)?r.call(this,t,n):(o&&(t=n),lu.isString(t)?lu.isString(r)?-1!==t.indexOf(r):lu.isRegExp(r)?r.test(t):void 0:void 0)}let mu=class{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=fu(t);if(!o)throw new Error("header name must be a non-empty string");const i=lu.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=pu(e))}const i=(e,t)=>lu.forEach(e,(e,n)=>o(e,n,t));if(lu.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(lu.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach(function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&cu[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t})(e),t);else if(lu.isObject(e)&&lu.isIterable(e)){let n,r,o={};for(const t of e){if(!lu.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[r=t[0]]=(n=o[r])?lu.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}i(o,t)}else null!=e&&o(t,e,n);return this}get(e,t){if(e=fu(e)){const n=lu.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(lu.isFunction(t))return t.call(this,e,n);if(lu.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=fu(e)){const n=lu.findKey(this,e);return!(!n||void 0===this[n]||t&&!hu(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=fu(e)){const o=lu.findKey(n,e);!o||t&&!hu(0,n[o],o,t)||(delete n[o],r=!0)}}return lu.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!hu(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return lu.forEach(this,(r,o)=>{const i=lu.findKey(n,o);if(i)return t[i]=pu(r),void delete t[o];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(o):String(o).trim();a!==o&&delete t[o],t[a]=pu(r),n[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return lu.forEach(this,(n,r)=>{null!=n&&!1!==n&&(t[r]=e&&lu.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[uu]=this[uu]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=fu(e);t[r]||(!function(e,t){const n=lu.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})})}(n,e),t[r]=!0)}return lu.isArray(e)?e.forEach(r):r(e),this}};mu.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),lu.reduceDescriptors(mu.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),lu.freezeMethods(mu);function gu(e,t){const n=new Set(t.map(e=>String(e).toLowerCase())),r=[],o=e=>{if(null===e||"object"!=typeof e)return e;if(lu.isBuffer(e))return e;if(-1!==r.indexOf(e))return;let t;if(e instanceof mu&&(e=e.toJSON()),r.push(e),lu.isArray(e))t=[],e.forEach((e,n)=>{const r=o(e);lu.isUndefined(r)||(t[n]=r)});else{if(!lu.isPlainObject(e)&&function(e){if(lu.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(lu.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}(e))return r.pop(),e;t=Object.create(null);for(const[r,i]of Object.entries(e)){const e=n.has(r.toLowerCase())?"[REDACTED ****]":o(i);lu.isUndefined(e)||(t[r]=e)}}return r.pop(),t};return o(e)}let yu=class e extends Error{static from(t,n,r,o,i,a){const s=new e(t.message,n||t.code,r,o,i);return s.cause=t,s.name=t.name,null!=t.status&&null==s.status&&(s.status=t.status),a&&Object.assign(s,a),s}constructor(e,t,n,r,o){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status)}toJSON(){const e=this.config,t=e&&lu.hasOwnProp(e,"redact")?e.redact:void 0,n=lu.isArray(t)&&t.length>0?gu(e,t):lu.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}};yu.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",yu.ERR_BAD_OPTION="ERR_BAD_OPTION",yu.ECONNABORTED="ECONNABORTED",yu.ETIMEDOUT="ETIMEDOUT",yu.ECONNREFUSED="ECONNREFUSED",yu.ERR_NETWORK="ERR_NETWORK",yu.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",yu.ERR_DEPRECATED="ERR_DEPRECATED",yu.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",yu.ERR_BAD_REQUEST="ERR_BAD_REQUEST",yu.ERR_CANCELED="ERR_CANCELED",yu.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",yu.ERR_INVALID_URL="ERR_INVALID_URL",yu.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";function vu(e){return lu.isPlainObject(e)||lu.isArray(e)}function bu(e){return lu.endsWith(e,"[]")?e.slice(0,-2):e}function xu(e,t,n){return e?e.concat(t).map(function(e,t){return e=bu(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}const wu=lu.toFlatObject(lu,{},null,function(e){return/^is[A-Z]/.test(e)});function ku(e,t,n){if(!lu.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=lu.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!lu.isUndefined(t[e])})).metaTokens,o=n.visitor||d,i=n.dots,a=n.indexes,s=n.Blob||"undefined"!=typeof Blob&&Blob,l=void 0===n.maxDepth?100:n.maxDepth,c=s&&lu.isSpecCompliantForm(t);if(!lu.isFunction(o))throw new TypeError("visitor must be a function");function u(e){if(null===e)return"";if(lu.isDate(e))return e.toISOString();if(lu.isBoolean(e))return e.toString();if(!c&&lu.isBlob(e))throw new yu("Blob is not supported. Use a Buffer instead.");return lu.isArrayBuffer(e)||lu.isTypedArray(e)?c&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function d(e,n,o){let s=e;if(lu.isReactNative(t)&&lu.isReactNativeBlob(e))return t.append(xu(o,n,i),u(e)),!1;if(e&&!o&&"object"==typeof e)if(lu.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(lu.isArray(e)&&function(e){return lu.isArray(e)&&!e.some(vu)}(e)||(lu.isFileList(e)||lu.endsWith(n,"[]"))&&(s=lu.toArray(e)))return n=bu(n),s.forEach(function(e,r){!lu.isUndefined(e)&&null!==e&&t.append(!0===a?xu([n],r,i):null===a?n:n+"[]",u(e))}),!1;return!!vu(e)||(t.append(xu(o,n,i),u(e)),!1)}const f=[],p=Object.assign(wu,{defaultVisitor:d,convertValue:u,isVisitable:vu});if(!lu.isObject(e))throw new TypeError("data must be an object");return function e(n,r,i=0){if(!lu.isUndefined(n)){if(i>l)throw new yu("Object is too deeply nested ("+i+" levels). Max depth: "+l,yu.ERR_FORM_DATA_DEPTH_EXCEEDED);if(-1!==f.indexOf(n))throw Error("Circular reference detected in "+r.join("."));f.push(n),lu.forEach(n,function(n,a){!0===(!(lu.isUndefined(n)||null===n)&&o.call(t,n,lu.isString(a)?a.trim():a,r,p))&&e(n,r?r.concat(a):[a],i+1)}),f.pop()}}(e),t}function Su(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(e){return t[e]})}function Eu(e,t){this._pairs=[],e&&ku(e,this,t)}const Cu=Eu.prototype;function Tu(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Pu(e,t,n){if(!t)return e;const r=n&&n.encode||Tu,o=lu.isFunction(n)?{serialize:n}:n,i=o&&o.serialize;let a;if(a=i?i(t,o):lu.isURLSearchParams(t)?t.toString():new Eu(t,o).toString(r),a){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}Cu.append=function(e,t){this._pairs.push([e,t])},Cu.toString=function(e){const t=e?function(t){return e.call(this,t,Su)}:Su;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};class Au{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){lu.forEach(this.handlers,function(t){null!==t&&e(t)})}}const ju={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},Nu={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Eu,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Ru="undefined"!=typeof window&&"undefined"!=typeof document,Lu="object"==typeof navigator&&navigator||void 0,Ou=Ru&&(!Lu||["ReactNative","NativeScript","NS"].indexOf(Lu.product)<0),Du="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,_u=Ru&&window.location.href||"http://localhost",Mu={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ru,hasStandardBrowserEnv:Ou,hasStandardBrowserWebWorkerEnv:Du,navigator:Lu,origin:_u},Symbol.toStringTag,{value:"Module"})),...Nu};function zu(e){function t(e,n,r,o){let i=e[o++];if("__proto__"===i)return!0;const a=Number.isFinite(+i),s=o>=e.length;if(i=!i&&lu.isArray(r)?r.length:i,s)return lu.hasOwnProp(r,i)?r[i]=lu.isArray(r[i])?r[i].concat(n):[r[i],n]:r[i]=n,!a;r[i]&&lu.isObject(r[i])||(r[i]=[]);return t(e,n,r[i],o)&&lu.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}(r[i])),!a}if(lu.isFormData(e)&&lu.isFunction(e.entries)){const n={};return lu.forEachEntry(e,(e,r)=>{t(function(e){return lu.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),r,n,0)}),n}return null}const Fu=(e,t)=>null!=e&&lu.hasOwnProp(e,t)?e[t]:void 0;const Iu={transitional:ju,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=lu.isObject(e);o&&lu.isHTMLForm(e)&&(e=new FormData(e));if(lu.isFormData(e))return r?JSON.stringify(zu(e)):e;if(lu.isArrayBuffer(e)||lu.isBuffer(e)||lu.isStream(e)||lu.isFile(e)||lu.isBlob(e)||lu.isReadableStream(e))return e;if(lu.isArrayBufferView(e))return e.buffer;if(lu.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){const t=Fu(this,"formSerializer");if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return ku(e,new Mu.classes.URLSearchParams,{visitor:function(e,t,n,r){return Mu.isNode&&lu.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...t})}(e,t).toString();if((i=lu.isFileList(e))||n.indexOf("multipart/form-data")>-1){const n=Fu(this,"env"),r=n&&n.FormData;return ku(i?{"files[]":e}:e,r&&new r,t)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(lu.isString(e))try{return(t||JSON.parse)(e),lu.trim(e)}catch(r){if("SyntaxError"!==r.name)throw r}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=Fu(this,"transitional")||Iu.transitional,n=t&&t.forcedJSONParsing,r=Fu(this,"responseType"),o="json"===r;if(lu.isResponse(e)||lu.isReadableStream(e))return e;if(e&&lu.isString(e)&&(n&&!r||o)){const n=!(t&&t.silentJSONParsing)&&o;try{return JSON.parse(e,Fu(this,"parseReviver"))}catch(i){if(n){if("SyntaxError"===i.name)throw yu.from(i,yu.ERR_BAD_RESPONSE,this,null,Fu(this,"response"));throw i}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Mu.classes.FormData,Blob:Mu.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};function Bu(e,t){const n=this||Iu,r=t||n,o=mu.from(r.headers);let i=r.data;return lu.forEach(e,function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function Vu(e){return!(!e||!e.__CANCEL__)}lu.forEach(["delete","get","head","post","put","patch","query"],e=>{Iu.headers[e]={}});let Uu=class extends yu{constructor(e,t,n){super(null==e?"canceled":e,yu.ERR_CANCELED,t,n),this.name="CanceledError",this.__CANCEL__=!0}};function Hu(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new yu("Request failed with status code "+n.status,n.status>=400&&n.status<500?yu.ERR_BAD_REQUEST:yu.ERR_BAD_RESPONSE,n.config,n.request,n)):e(n)}const $u=(e,t,n=3)=>{let r=0;const o=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,i=0,a=0;return t=void 0!==t?t:1e3,function(s){const l=Date.now(),c=r[a];o||(o=l),n[i]=s,r[i]=l;let u=a,d=0;for(;u!==i;)d+=n[u++],u%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),l-o<t)return;const f=c&&l-c;return f?Math.round(1e3*d/f):void 0}}(50,250);return function(e,t){let n,r,o=0,i=1e3/t;const a=(t,i=Date.now())=>{o=i,n=null,r&&(clearTimeout(r),r=null),e(...t)};return[(...e)=>{const t=Date.now(),s=t-o;s>=i?a(e,t):(n=e,r||(r=setTimeout(()=>{r=null,a(n)},i-s)))},()=>n&&a(n)]}(n=>{const i=n.loaded,a=n.lengthComputable?n.total:void 0,s=null!=a?Math.min(i,a):i,l=Math.max(0,s-r),c=o(l);r=Math.max(r,s);e({loaded:s,total:a,progress:a?s/a:void 0,bytes:l,rate:c||void 0,estimated:c&&a?(a-s)/c:void 0,event:n,lengthComputable:null!=a,[t?"download":"upload"]:!0})},n)},qu=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Wu=e=>(...t)=>lu.asap(()=>e(...t)),Ku=Mu.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Mu.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Mu.origin),Mu.navigator&&/(msie|trident)/i.test(Mu.navigator.userAgent)):()=>!0,Yu=Mu.hasStandardBrowserEnv?{write(e,t,n,r,o,i,a){if("undefined"==typeof document)return;const s=[`${e}=${encodeURIComponent(t)}`];lu.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),lu.isString(r)&&s.push(`path=${r}`),lu.isString(o)&&s.push(`domain=${o}`),!0===i&&s.push("secure"),lu.isString(a)&&s.push(`SameSite=${a}`),document.cookie=s.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const r=t[n].replace(/^\s+/,""),o=r.indexOf("=");if(-1!==o&&r.slice(0,o)===e)return decodeURIComponent(r.slice(o+1))}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function Qu(e,t,n){let r=!("string"==typeof(o=t)&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(o));var o;return e&&(r||!1===n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Xu=e=>e instanceof mu?{...e}:e;function Gu(e,t){t=t||{};const n=Object.create(null);function r(e,t,n,r){return lu.isPlainObject(e)&&lu.isPlainObject(t)?lu.merge.call({caseless:r},e,t):lu.isPlainObject(t)?lu.merge({},t):lu.isArray(t)?t.slice():t}function o(e,t,n,o){return lu.isUndefined(t)?lu.isUndefined(e)?void 0:r(void 0,e,0,o):r(e,t,0,o)}function i(e,t){if(!lu.isUndefined(t))return r(void 0,t)}function a(e,t){return lu.isUndefined(t)?lu.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,o,i){return lu.hasOwnProp(t,i)?r(n,o):lu.hasOwnProp(e,i)?r(void 0,n):void 0}Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});const l={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,allowedSocketPaths:a,responseEncoding:a,validateStatus:s,headers:(e,t,n)=>o(Xu(e),Xu(t),0,!0)};return lu.forEach(Object.keys({...e,...t}),function(r){if("__proto__"===r||"constructor"===r||"prototype"===r)return;const i=lu.hasOwnProp(l,r)?l[r]:o,a=i(lu.hasOwnProp(e,r)?e[r]:void 0,lu.hasOwnProp(t,r)?t[r]:void 0,r);lu.isUndefined(a)&&i!==s||(n[r]=a)}),n}const Ju=["content-type","content-length"];const Zu=e=>{const t=Gu({},e),n=e=>lu.hasOwnProp(t,e)?t[e]:void 0,r=n("data");let o=n("withXSRFToken");const i=n("xsrfHeaderName"),a=n("xsrfCookieName");let s=n("headers");const l=n("auth"),c=n("baseURL"),u=n("allowAbsoluteUrls"),d=n("url");var f;if(t.headers=s=mu.from(s),t.url=Pu(Qu(c,d,u),e.params,e.paramsSerializer),l&&s.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?(f=l.password,encodeURIComponent(f).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16)))):""))),lu.isFormData(r)&&(Mu.hasStandardBrowserEnv||Mu.hasStandardBrowserWebWorkerEnv?s.setContentType(void 0):lu.isFunction(r.getHeaders)&&function(e,t,n){"content-only"===n?Object.entries(t).forEach(([t,n])=>{Ju.includes(t.toLowerCase())&&e.set(t,n)}):e.set(t)}(s,r.getHeaders(),n("formDataHeaderPolicy"))),Mu.hasStandardBrowserEnv){lu.isFunction(o)&&(o=o(t));if(!0===o||null==o&&Ku(t.url)){const e=i&&a&&Yu.read(a);e&&s.set(i,e)}}return t},ed="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const r=Zu(e);let o=r.data;const i=mu.from(r.headers).normalize();let a,s,l,c,u,{responseType:d,onUploadProgress:f,onDownloadProgress:p}=r;function h(){c&&c(),u&&u(),r.cancelToken&&r.cancelToken.unsubscribe(a),r.signal&&r.signal.removeEventListener("abort",a)}let m=new XMLHttpRequest;function g(){if(!m)return;const r=mu.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());Hu(function(e){t(e),h()},function(e){n(e),h()},{data:d&&"text"!==d&&"json"!==d?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m}),m=null}m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout,"onloadend"in m?m.onloadend=g:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&m.responseURL.startsWith("file:"))&&setTimeout(g)},m.onabort=function(){m&&(n(new yu("Request aborted",yu.ECONNABORTED,e,m)),h(),m=null)},m.onerror=function(t){const r=t&&t.message?t.message:"Network Error",o=new yu(r,yu.ERR_NETWORK,e,m);o.event=t||null,n(o),h(),m=null},m.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||ju;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new yu(t,o.clarifyTimeoutError?yu.ETIMEDOUT:yu.ECONNABORTED,e,m)),h(),m=null},void 0===o&&i.setContentType(null),"setRequestHeader"in m&&lu.forEach(i.toJSON(),function(e,t){m.setRequestHeader(t,e)}),lu.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),d&&"json"!==d&&(m.responseType=r.responseType),p&&([l,u]=$u(p,!0),m.addEventListener("progress",l)),f&&m.upload&&([s,c]=$u(f),m.upload.addEventListener("progress",s),m.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(a=t=>{m&&(n(!t||t.type?new Uu(null,e,m):t),m.abort(),h(),m=null)},r.cancelToken&&r.cancelToken.subscribe(a),r.signal&&(r.signal.aborted?a():r.signal.addEventListener("abort",a)));const y=function(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}(r.url);!y||Mu.protocols.includes(y)?m.send(o||null):n(new yu("Unsupported protocol "+y+":",yu.ERR_BAD_REQUEST,e))})},td=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const o=function(e){if(!n){n=!0,a();const t=e instanceof Error?e:this.reason;r.abort(t instanceof yu?t:new Uu(t instanceof Error?t.message:t))}};let i=t&&setTimeout(()=>{i=null,o(new yu(`timeout of ${t}ms exceeded`,yu.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}),e=null)};e.forEach(e=>e.addEventListener("abort",o));const{signal:s}=r;return s.unsubscribe=()=>lu.asap(a),s}},nd=function*(e,t){let n=e.byteLength;if(n<t)return void(yield e);let r,o=0;for(;o<n;)r=o+t,yield e.slice(o,r),o=r},rd=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},od=(e,t,n,r)=>{const o=async function*(e,t){for await(const n of rd(e))yield*nd(n,t)}(e,t);let i,a=0,s=e=>{i||(i=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await o.next();if(t)return s(),void e.close();let i=r.byteLength;if(n){let e=a+=i;n(e)}e.enqueue(new Uint8Array(r))}catch(t){throw s(t),t}},cancel:e=>(s(e),o.return())},{highWaterMark:2})};const id="1.16.0",{isFunction:ad}=lu,sd=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},ld=e=>{const t=lu.global??globalThis,{ReadableStream:n,TextEncoder:r}=t;e=lu.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:o,Request:i,Response:a}=e,s=o?ad(o):"function"==typeof fetch,l=ad(i),c=ad(a);if(!s)return!1;const u=s&&ad(n),d=s&&("function"==typeof r?(e=>t=>e.encode(t))(new r):async e=>new Uint8Array(await new i(e).arrayBuffer())),f=l&&u&&sd(()=>{let e=!1;const t=new i(Mu.origin,{body:new n,method:"POST",get duplex(){return e=!0,"half"}}),r=t.headers.has("Content-Type");return null!=t.body&&t.body.cancel(),e&&!r}),p=c&&u&&sd(()=>lu.isReadableStream(new a("").body)),h={stream:p&&(e=>e.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!h[e]&&(h[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new yu(`Response type '${e}' is not supported`,yu.ERR_NOT_SUPPORT,n)})});const m=async(e,t)=>{const n=lu.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(lu.isBlob(e))return e.size;if(lu.isSpecCompliantForm(e)){const t=new i(Mu.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return lu.isArrayBufferView(e)||lu.isArrayBuffer(e)?e.byteLength:(lu.isURLSearchParams(e)&&(e+=""),lu.isString(e)?(await d(e)).byteLength:void 0)})(t):n};return async e=>{let{url:t,method:n,data:s,signal:c,cancelToken:u,timeout:d,onDownloadProgress:g,onUploadProgress:y,responseType:v,headers:b,withCredentials:x="same-origin",fetchOptions:w,maxContentLength:k,maxBodyLength:S}=Zu(e);const E=lu.isNumber(k)&&k>-1,C=lu.isNumber(S)&&S>-1;let T=o||fetch;v=v?(v+"").toLowerCase():"text";let P=td([c,u&&u.toAbortSignal()],d),A=null;const j=P&&P.unsubscribe&&(()=>{P.unsubscribe()});let N;try{if(E&&"string"==typeof t&&t.startsWith("data:")){const n=function(e){if(!e||"string"!=typeof e)return 0;if(!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let e=r.length;const t=r.length;for(let s=0;s<t;s++)if(37===r.charCodeAt(s)&&s+2<t){const t=r.charCodeAt(s+1),n=r.charCodeAt(s+2);(t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102)&&(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102)&&(e-=2,s+=2)}let n=0,o=t-1;const i=e=>e>=2&&37===r.charCodeAt(e-2)&&51===r.charCodeAt(e-1)&&(68===r.charCodeAt(e)||100===r.charCodeAt(e));o>=0&&(61===r.charCodeAt(o)?(n++,o--):i(o)&&(n++,o-=3)),1===n&&o>=0&&(61===r.charCodeAt(o)||i(o))&&n++;const a=3*Math.floor(e/4)-(n||0);return a>0?a:0}if("undefined"!=typeof Buffer&&"function"==typeof Buffer.byteLength)return Buffer.byteLength(r,"utf8");let o=0;for(let i=0,a=r.length;i<a;i++){const e=r.charCodeAt(i);if(e<128)o+=1;else if(e<2048)o+=2;else if(e>=55296&&e<=56319&&i+1<a){const e=r.charCodeAt(i+1);e>=56320&&e<=57343?(o+=4,i++):o+=3}else o+=3}return o}(t);if(n>k)throw new yu("maxContentLength size of "+k+" exceeded",yu.ERR_BAD_RESPONSE,e,A)}if(C&&"get"!==n&&"head"!==n){const t=await m(b,s);if("number"==typeof t&&isFinite(t)&&t>S)throw new yu("Request body larger than maxBodyLength limit",yu.ERR_BAD_REQUEST,e,A)}if(y&&f&&"get"!==n&&"head"!==n&&0!==(N=await m(b,s))){let e,n=new i(t,{method:"POST",body:s,duplex:"half"});if(lu.isFormData(s)&&(e=n.headers.get("content-type"))&&b.setContentType(e),n.body){const[e,t]=qu(N,$u(Wu(y)));s=od(n.body,65536,e,t)}}lu.isString(x)||(x=x?"include":"omit");const o=l&&"credentials"in i.prototype;if(lu.isFormData(s)){const e=b.getContentType();e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)&&b.delete("content-type")}b.set("User-Agent","axios/"+id,!1);const c={...w,signal:P,method:n.toUpperCase(),headers:b.normalize().toJSON(),body:s,duplex:"half",credentials:o?x:void 0};A=l&&new i(t,c);let u=await(l?T(A,w):T(t,c));if(E){const t=lu.toFiniteNumber(u.headers.get("content-length"));if(null!=t&&t>k)throw new yu("maxContentLength size of "+k+" exceeded",yu.ERR_BAD_RESPONSE,e,A)}const d=p&&("stream"===v||"response"===v);if(p&&u.body&&(g||E||d&&j)){const t={};["status","statusText","headers"].forEach(e=>{t[e]=u[e]});const n=lu.toFiniteNumber(u.headers.get("content-length")),[r,o]=g&&qu(n,$u(Wu(g),!0))||[];let i=0;const s=t=>{if(E&&(i=t,i>k))throw new yu("maxContentLength size of "+k+" exceeded",yu.ERR_BAD_RESPONSE,e,A);r&&r(t)};u=new a(od(u.body,65536,s,()=>{o&&o(),j&&j()}),t)}v=v||"text";let R=await h[lu.findKey(h,v)||"text"](u,e);if(E&&!p&&!d){let t;if(null!=R&&("number"==typeof R.byteLength?t=R.byteLength:"number"==typeof R.size?t=R.size:"string"==typeof R&&(t="function"==typeof r?(new r).encode(R).byteLength:R.length)),"number"==typeof t&&t>k)throw new yu("maxContentLength size of "+k+" exceeded",yu.ERR_BAD_RESPONSE,e,A)}return!d&&j&&j(),await new Promise((t,n)=>{Hu(t,n,{data:R,headers:mu.from(u.headers),status:u.status,statusText:u.statusText,config:e,request:A})})}catch(R){if(j&&j(),P&&P.aborted&&P.reason instanceof yu){const t=P.reason;throw t.config=e,A&&(t.request=A),R!==t&&(t.cause=R),t}if(R&&"TypeError"===R.name&&/Load failed|fetch/i.test(R.message))throw Object.assign(new yu("Network Error",yu.ERR_NETWORK,e,A,R&&R.response),{cause:R.cause||R});throw yu.from(R,R&&R.code,e,A,R&&R.response)}}},cd=new Map,ud=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,i=[r,o,n];let a,s,l=i.length,c=cd;for(;l--;)a=i[l],s=c.get(a),void 0===s&&c.set(a,s=l?new Map:ld(t)),c=s;return s};ud();const dd={http:null,xhr:ed,fetch:{get:ud}};lu.forEach(dd,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(n){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const fd=e=>`- ${e}`,pd=e=>lu.isFunction(e)||null===e||!1===e;const hd={getAdapter:function(e,t){e=lu.isArray(e)?e:[e];const{length:n}=e;let r,o;const i={};for(let a=0;a<n;a++){let n;if(r=e[a],o=r,!pd(r)&&(o=dd[(n=String(r)).toLowerCase()],void 0===o))throw new yu(`Unknown adapter '${n}'`);if(o&&(lu.isFunction(o)||(o=o.get(t))))break;i[n||"#"+a]=o}if(!o){const e=Object.entries(i).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));let t=n?e.length>1?"since :\n"+e.map(fd).join("\n"):" "+fd(e[0]):"as no adapter specified";throw new yu("There is no suitable adapter to dispatch the request "+t,"ERR_NOT_SUPPORT")}return o},adapters:dd};function md(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Uu(null,e)}function gd(e){md(e),e.headers=mu.from(e.headers),e.data=Bu.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return hd.getAdapter(e.adapter||Iu.adapter,e)(e).then(function(t){md(e),e.response=t;try{t.data=Bu.call(e,e.transformResponse,t)}finally{delete e.response}return t.headers=mu.from(t.headers),t},function(t){if(!Vu(t)&&(md(e),t&&t.response)){e.response=t.response;try{t.response.data=Bu.call(e,e.transformResponse,t.response)}finally{delete e.response}t.response.headers=mu.from(t.response.headers)}return Promise.reject(t)})}const yd={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{yd[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const vd={};yd.transitional=function(e,t,n){function r(e,t){return"[Axios v"+id+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,i)=>{if(!1===e)throw new yu(r(o," has been removed"+(t?" in "+t:"")),yu.ERR_DEPRECATED);return t&&!vd[o]&&(vd[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}},yd.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};const bd={assertOptions:function(e,t,n){if("object"!=typeof e)throw new yu("options must be an object",yu.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=Object.prototype.hasOwnProperty.call(t,i)?t[i]:void 0;if(a){const t=e[i],n=void 0===t||a(t,i,e);if(!0!==n)throw new yu("option "+i+" must be "+n,yu.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new yu("Unknown option "+i,yu.ERR_BAD_OPTION)}},validators:yd},xd=bd.validators;let wd=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Au,response:new Au}}async request(e,t){try{return await this._request(e,t)}catch(n){if(n instanceof Error){let e={};Error.captureStackTrace?Error.captureStackTrace(e):e=new Error;const t=(()=>{if(!e.stack)return"";const t=e.stack.indexOf("\n");return-1===t?"":e.stack.slice(t+1)})();try{if(n.stack){if(t){const e=t.indexOf("\n"),r=-1===e?-1:t.indexOf("\n",e+1),o=-1===r?"":t.slice(r+1);String(n.stack).endsWith(o)||(n.stack+="\n"+t)}}else n.stack=t}catch(r){}}throw n}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Gu(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&bd.assertOptions(n,{silentJSONParsing:xd.transitional(xd.boolean),forcedJSONParsing:xd.transitional(xd.boolean),clarifyTimeoutError:xd.transitional(xd.boolean),legacyInterceptorReqResOrdering:xd.transitional(xd.boolean)},!1),null!=r&&(lu.isFunction(r)?t.paramsSerializer={serialize:r}:bd.assertOptions(r,{encode:xd.function,serialize:xd.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),bd.assertOptions(t,{baseUrl:xd.spelling("baseURL"),withXsrfToken:xd.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&lu.merge(o.common,o[t.method]);o&&lu.forEach(["delete","get","head","post","put","patch","query","common"],e=>{delete o[e]}),t.headers=mu.concat(i,o);const a=[];let s=!0;this.interceptors.request.forEach(function(e){if("function"==typeof e.runWhen&&!1===e.runWhen(t))return;s=s&&e.synchronous;const n=t.transitional||ju;n&&n.legacyInterceptorReqResOrdering?a.unshift(e.fulfilled,e.rejected):a.push(e.fulfilled,e.rejected)});const l=[];let c;this.interceptors.response.forEach(function(e){l.push(e.fulfilled,e.rejected)});let u,d=0;if(!s){const e=[gd.bind(this),void 0];for(e.unshift(...a),e.push(...l),u=e.length,c=Promise.resolve(t);d<u;)c=c.then(e[d++],e[d++]);return c}u=a.length;let f=t;for(;d<u;){const e=a[d++],t=a[d++];try{f=e(f)}catch(p){t.call(this,p);break}}try{c=gd.call(this,f)}catch(p){return Promise.reject(p)}for(d=0,u=l.length;d<u;)c=c.then(l[d++],l[d++]);return c}getUri(e){return Pu(Qu((e=Gu(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};lu.forEach(["delete","get","head","options"],function(e){wd.prototype[e]=function(t,n){return this.request(Gu(n||{},{method:e,url:t,data:(n||{}).data}))}}),lu.forEach(["post","put","patch","query"],function(e){function t(t){return function(n,r,o){return this.request(Gu(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}wd.prototype[e]=t(),"query"!==e&&(wd.prototype[e+"Form"]=t(!0))});const kd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(kd).forEach(([e,t])=>{kd[t]=e});const Sd=function e(t){const n=new wd(t),r=vc(wd.prototype.request,n);return lu.extend(r,wd.prototype,n,{allOwnKeys:!0}),lu.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Gu(t,n))},r}(Iu);Sd.Axios=wd,Sd.CanceledError=Uu,Sd.CancelToken=class e{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,o){n.reason||(n.reason=new Uu(e,r,o),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}},Sd.isCancel=Vu,Sd.VERSION=id,Sd.toFormData=ku,Sd.AxiosError=yu,Sd.Cancel=Sd.CanceledError,Sd.all=function(e){return Promise.all(e)},Sd.spread=function(e){return function(t){return e.apply(null,t)}},Sd.isAxiosError=function(e){return lu.isObject(e)&&!0===e.isAxiosError},Sd.mergeConfig=Gu,Sd.AxiosHeaders=mu,Sd.formToJSON=e=>zu(lu.isHTMLForm(e)?new FormData(e):e),Sd.getAdapter=hd.getAdapter,Sd.HttpStatusCode=kd,Sd.default=Sd;const{Axios:Ed,AxiosError:Cd,CanceledError:Td,isCancel:Pd,CancelToken:Ad,VERSION:jd,all:Nd,Cancel:Rd,isAxiosError:Ld,spread:Od,toFormData:Dd,AxiosHeaders:_d,HttpStatusCode:Md,formToJSON:zd,getAdapter:Fd,mergeConfig:Id,create:Bd}=Sd,Vd=(e,t)=>{const n=e.endsWith("/")?e.slice(0,-1):e,r=Sd.create({baseURL:n,timeout:6e5,headers:{"Content-Type":"application/json"}});return r.interceptors.response.use(e=>e,e=>{var t,n;return console.error("Fluxoon Copilot API Error:",(null==(n=null==(t=e.response)?void 0:t.data)?void 0:n.detail)||e.message),Promise.reject(e)}),r},Ud=async(e,t,n)=>{const r=`${(e=>e.endsWith("/")?e.slice(0,-1):e)(e)}/chat`,o={"Content-Type":"application/json"};t&&(o.Authorization=`Bearer ${t}`);const i=await fetch(r,{method:"POST",headers:o,body:JSON.stringify(n)});if(!i.ok){const e=await i.text().catch(()=>i.statusText);throw new Error(`[Fluxoon Copilot] /chat ${i.status}: ${e}`)}return i.json()},Hd=async(e,t)=>{const n=Vd(e);return(await n.get("/chat/threads")).data},$d=async(e,t,n)=>{const r=Vd(e),o=(await r.get(`/chat/history/${n}`)).data,i=[];let a=[];return o.forEach(e=>{if("tool"===e.role){const t=e.content.match(/SOURCE:\s*([^\n]+)/g);if(t){const e=t.map(e=>e.replace("SOURCE:","").trim().split("/").pop()||"");a=[...new Set([...a,...e])]}}else"assistant"===e.role?""!==e.content.trim()&&(i.push({id:`hist-${Math.random()}`,role:"assistant",content:e.content,timestamp:new Date,sources:[...a]}),a=[]):"user"===e.role&&i.push({id:`hist-${Math.random()}`,role:"user",content:e.content,timestamp:new Date})}),i},qd=async(e,t)=>{const n=Vd(e);return(await n.get("/settings/connectors")).data},Wd=async(e,t,n)=>{const r=Vd(e);return(await r.post("/connectors",n)).data},Kd=async(e,t,n)=>{const r=Vd(e);return(await r.post(`/documents/sync/${n}`)).data},Yd=async(e,t,n)=>{const r=Vd(e);await r.delete(`/connectors/${n}`)},Qd=async(e,t,n)=>{const r=Vd(e),o=new FormData;n.forEach(e=>o.append("files",e));return(await r.post("/upload",o)).data},Xd=()=>`thread_${Date.now()}_${Math.random().toString(36).substring(2,9)}`,Gd=(Jd=(e,t)=>({config:{},messages:[],threads:[],connectors:[],isSyncing:!1,showAddForm:!1,isLoading:!1,activeView:"chat",threadId:Xd(),setConfig:t=>e({config:t}),setView:t=>e({activeView:t}),setLoading:t=>e({isLoading:t}),setShowAddForm:t=>e({showAddForm:t}),clearChat:()=>e({messages:[],threadId:Xd()}),addMessage:t=>e(e=>({messages:[...e.messages,t]})),confirmThreadId:t=>{t&&""!==t.trim()&&e({threadId:t})},fetchThreads:async()=>{const{config:n}=t();if(n.apiUrl)try{const t=await Hd(n.apiUrl,n.userToken);e({threads:t})}catch(r){console.error("Erreur threads:",r)}},loadThread:async n=>{const{config:r}=t();if(n){e({isLoading:!0,threadId:n,activeView:"chat"});try{const t=await $d(r.apiUrl,r.userToken,n);e({messages:t,isLoading:!1})}catch(o){console.error("Erreur historique:",o),e({isLoading:!1})}}else e({threadId:Xd(),messages:[],activeView:"chat"})},fetchConnectors:async()=>{const{config:n}=t();if(n.apiUrl)try{const t=await qd(n.apiUrl,n.userToken);e({connectors:t})}catch(r){console.error("Erreur connecteurs:",r)}},syncSource:async n=>{const{config:r}=t();e({isSyncing:!0});try{await Kd(r.apiUrl,r.userToken,n),await t().fetchConnectors()}catch(o){console.error("Erreur sync:",o)}finally{e({isSyncing:!1})}},removeSource:async n=>{const{config:r}=t();try{await Yd(r.apiUrl,r.userToken,n),e(e=>({connectors:e.connectors.filter(e=>e.source_id!==n)}))}catch(o){console.error("Erreur suppression source:",o)}}}))?yc(Jd):yc;var Jd;function Zd(){}function ef(){}const tf=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,nf=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,rf={};function of(e,t){return(rf.jsx?nf:tf).test(e)}const af=/[ \t\n\f\r]/g;function sf(e){return""===e.replace(af,"")}class lf{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function cf(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new lf(n,r,t)}function uf(e){return e.toLowerCase()}lf.prototype.normal={},lf.prototype.property={},lf.prototype.space=void 0;class df{constructor(e,t){this.attribute=t,this.property=e}}df.prototype.attribute="",df.prototype.booleanish=!1,df.prototype.boolean=!1,df.prototype.commaOrSpaceSeparated=!1,df.prototype.commaSeparated=!1,df.prototype.defined=!1,df.prototype.mustUseProperty=!1,df.prototype.number=!1,df.prototype.overloadedBoolean=!1,df.prototype.property="",df.prototype.spaceSeparated=!1,df.prototype.space=void 0;let ff=0;const pf=xf(),hf=xf(),mf=xf(),gf=xf(),yf=xf(),vf=xf(),bf=xf();function xf(){return 2**++ff}const wf=Object.freeze(Object.defineProperty({__proto__:null,boolean:pf,booleanish:hf,commaOrSpaceSeparated:bf,commaSeparated:vf,number:gf,overloadedBoolean:mf,spaceSeparated:yf},Symbol.toStringTag,{value:"Module"})),kf=Object.keys(wf);class Sf extends df{constructor(e,t,n,r){let o=-1;if(super(e,t),Ef(this,"space",r),"number"==typeof n)for(;++o<kf.length;){const e=kf[o];Ef(this,kf[o],(n&wf[e])===wf[e])}}}function Ef(e,t,n){n&&(e[t]=n)}function Cf(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const i=new Sf(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[uf(r)]=r,n[uf(i.attribute)]=r}return new lf(t,n,e.space)}Sf.prototype.defined=!0;const Tf=Cf({properties:{ariaActiveDescendant:null,ariaAtomic:hf,ariaAutoComplete:null,ariaBusy:hf,ariaChecked:hf,ariaColCount:gf,ariaColIndex:gf,ariaColSpan:gf,ariaControls:yf,ariaCurrent:null,ariaDescribedBy:yf,ariaDetails:null,ariaDisabled:hf,ariaDropEffect:yf,ariaErrorMessage:null,ariaExpanded:hf,ariaFlowTo:yf,ariaGrabbed:hf,ariaHasPopup:null,ariaHidden:hf,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:yf,ariaLevel:gf,ariaLive:null,ariaModal:hf,ariaMultiLine:hf,ariaMultiSelectable:hf,ariaOrientation:null,ariaOwns:yf,ariaPlaceholder:null,ariaPosInSet:gf,ariaPressed:hf,ariaReadOnly:hf,ariaRelevant:null,ariaRequired:hf,ariaRoleDescription:yf,ariaRowCount:gf,ariaRowIndex:gf,ariaRowSpan:gf,ariaSelected:hf,ariaSetSize:gf,ariaSort:null,ariaValueMax:gf,ariaValueMin:gf,ariaValueNow:gf,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function Pf(e,t){return t in e?e[t]:t}function Af(e,t){return Pf(e,t.toLowerCase())}const jf=Cf({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:vf,acceptCharset:yf,accessKey:yf,action:null,allow:null,allowFullScreen:pf,allowPaymentRequest:pf,allowUserMedia:pf,alt:null,as:null,async:pf,autoCapitalize:null,autoComplete:yf,autoFocus:pf,autoPlay:pf,blocking:yf,capture:null,charSet:null,checked:pf,cite:null,className:yf,cols:gf,colSpan:null,content:null,contentEditable:hf,controls:pf,controlsList:yf,coords:gf|vf,crossOrigin:null,data:null,dateTime:null,decoding:null,default:pf,defer:pf,dir:null,dirName:null,disabled:pf,download:mf,draggable:hf,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:pf,formTarget:null,headers:yf,height:gf,hidden:mf,high:gf,href:null,hrefLang:null,htmlFor:yf,httpEquiv:yf,id:null,imageSizes:null,imageSrcSet:null,inert:pf,inputMode:null,integrity:null,is:null,isMap:pf,itemId:null,itemProp:yf,itemRef:yf,itemScope:pf,itemType:yf,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:pf,low:gf,manifest:null,max:null,maxLength:gf,media:null,method:null,min:null,minLength:gf,multiple:pf,muted:pf,name:null,nonce:null,noModule:pf,noValidate:pf,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:pf,optimum:gf,pattern:null,ping:yf,placeholder:null,playsInline:pf,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:pf,referrerPolicy:null,rel:yf,required:pf,reversed:pf,rows:gf,rowSpan:gf,sandbox:yf,scope:null,scoped:pf,seamless:pf,selected:pf,shadowRootClonable:pf,shadowRootDelegatesFocus:pf,shadowRootMode:null,shape:null,size:gf,sizes:null,slot:null,span:gf,spellCheck:hf,src:null,srcDoc:null,srcLang:null,srcSet:null,start:gf,step:null,style:null,tabIndex:gf,target:null,title:null,translate:null,type:null,typeMustMatch:pf,useMap:null,value:hf,width:gf,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:yf,axis:null,background:null,bgColor:null,border:gf,borderColor:null,bottomMargin:gf,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:pf,declare:pf,event:null,face:null,frame:null,frameBorder:null,hSpace:gf,leftMargin:gf,link:null,longDesc:null,lowSrc:null,marginHeight:gf,marginWidth:gf,noResize:pf,noHref:pf,noShade:pf,noWrap:pf,object:null,profile:null,prompt:null,rev:null,rightMargin:gf,rules:null,scheme:null,scrolling:hf,standby:null,summary:null,text:null,topMargin:gf,valueType:null,version:null,vAlign:null,vLink:null,vSpace:gf,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:pf,disableRemotePlayback:pf,prefix:null,property:null,results:gf,security:null,unselectable:null},space:"html",transform:Af}),Nf=Cf({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:bf,accentHeight:gf,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:gf,amplitude:gf,arabicForm:null,ascent:gf,attributeName:null,attributeType:null,azimuth:gf,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:gf,by:null,calcMode:null,capHeight:gf,className:yf,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:gf,diffuseConstant:gf,direction:null,display:null,dur:null,divisor:gf,dominantBaseline:null,download:pf,dx:null,dy:null,edgeMode:null,editable:null,elevation:gf,enableBackground:null,end:null,event:null,exponent:gf,externalResourcesRequired:null,fill:null,fillOpacity:gf,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:vf,g2:vf,glyphName:vf,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:gf,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:gf,horizOriginX:gf,horizOriginY:gf,id:null,ideographic:gf,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:gf,k:gf,k1:gf,k2:gf,k3:gf,k4:gf,kernelMatrix:bf,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:gf,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:gf,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:gf,overlineThickness:gf,paintOrder:null,panose1:null,path:null,pathLength:gf,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:yf,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:gf,pointsAtY:gf,pointsAtZ:gf,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:bf,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:bf,rev:bf,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:bf,requiredFeatures:bf,requiredFonts:bf,requiredFormats:bf,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:gf,specularExponent:gf,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:gf,strikethroughThickness:gf,string:null,stroke:null,strokeDashArray:bf,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:gf,strokeOpacity:gf,strokeWidth:null,style:null,surfaceScale:gf,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:bf,tabIndex:gf,tableValues:null,target:null,targetX:gf,targetY:gf,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:bf,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:gf,underlineThickness:gf,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:gf,values:null,vAlphabetic:gf,vMathematical:gf,vectorEffect:null,vHanging:gf,vIdeographic:gf,version:null,vertAdvY:gf,vertOriginX:gf,vertOriginY:gf,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:gf,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Pf}),Rf=Cf({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),Lf=Cf({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Af}),Of=Cf({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),Df={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"},_f=/[A-Z]/g,Mf=/-[a-z]/g,zf=/^data[-\w.:]+$/i;function Ff(e){return"-"+e.toLowerCase()}function If(e){return e.charAt(1).toUpperCase()}const Bf=cf([Tf,jf,Rf,Lf,Of],"html"),Vf=cf([Tf,Nf,Rf,Lf,Of],"svg");var Uf,Hf,$f,qf={};function Wf(){if($f)return qf;$f=1;var e=qf&&qf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(qf,"__esModule",{value:!0}),qf.default=function(e,n){let r=null;if(!e||"string"!=typeof e)return r;const o=(0,t.default)(e),i="function"==typeof n;return o.forEach(e=>{if("declaration"!==e.type)return;const{property:t,value:o}=e;i?n(t,o,e):o&&(r=r||{},r[t]=o)}),r};const t=e(function(){if(Hf)return Uf;Hf=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,s=/^\s+|\s+$/g,l="";function c(e){return e?e.replace(s,l):l}return Uf=function(s,u){if("string"!=typeof s)throw new TypeError("First argument must be a string");if(!s)return[];u=u||{};var d=1,f=1;function p(e){var n=e.match(t);n&&(d+=n.length);var r=e.lastIndexOf("\n");f=~r?e.length-r:f+e.length}function h(){var e={line:d,column:f};return function(t){return t.position=new m(e),v(),t}}function m(e){this.start=e,this.end={line:d,column:f},this.source=u.source}function g(e){var t=new Error(u.source+":"+d+":"+f+": "+e);if(t.reason=e,t.filename=u.source,t.line=d,t.column=f,t.source=s,!u.silent)throw t}function y(e){var t=e.exec(s);if(t){var n=t[0];return p(n),s=s.slice(n.length),t}}function v(){y(n)}function b(e){var t;for(e=e||[];t=x();)!1!==t&&e.push(t);return e}function x(){var e=h();if("/"==s.charAt(0)&&"*"==s.charAt(1)){for(var t=2;l!=s.charAt(t)&&("*"!=s.charAt(t)||"/"!=s.charAt(t+1));)++t;if(t+=2,l===s.charAt(t-1))return g("End of comment missing");var n=s.slice(2,t-2);return f+=2,p(n),s=s.slice(t),f+=2,e({type:"comment",comment:n})}}function w(){var t=h(),n=y(r);if(n){if(x(),!y(o))return g("property missing ':'");var s=y(i),u=t({type:"declaration",property:c(n[0].replace(e,l)),value:s?c(s[0].replace(e,l)):l});return y(a),u}}return m.prototype.content=s,v(),function(){var e,t=[];for(b(t);e=w();)!1!==e&&(t.push(e),b(t));return t}()}}());return qf}var Kf,Yf,Qf,Xf={};function Gf(){if(Kf)return Xf;Kf=1,Object.defineProperty(Xf,"__esModule",{value:!0}),Xf.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,i=function(e,t){return t.toUpperCase()},a=function(e,t){return"".concat(t,"-")};return Xf.camelCase=function(s,l){return void 0===l&&(l={}),function(t){return!t||n.test(t)||e.test(t)}(s)?s:(s=s.toLowerCase(),(s=l.reactCompat?s.replace(o,a):s.replace(r,a)).replace(t,i))},Xf}const Jf=r(function(){if(Qf)return Yf;Qf=1;var e=(Yf&&Yf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(Wf()),t=Gf();function n(n,r){var o={};return n&&"string"==typeof n?((0,e.default)(n,function(e,n){e&&n&&(o[(0,t.camelCase)(e,r)]=n)}),o):o}return n.default=n,Yf=n}()),Zf=tp("end"),ep=tp("start");function tp(e){return function(t){const n=t&&t.position&&t.position[e]||{};if("number"==typeof n.line&&n.line>0&&"number"==typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"==typeof n.offset&&n.offset>-1?n.offset:void 0}}}function np(e){return e&&"object"==typeof e?"position"in e||"type"in e?op(e.position):"start"in e||"end"in e?op(e):"line"in e||"column"in e?rp(e):"":""}function rp(e){return ip(e&&e.line)+":"+ip(e&&e.column)}function op(e){return rp(e&&e.start)+"-"+rp(e&&e.end)}function ip(e){return e&&"number"==typeof e?e:1}class ap extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",o={},i=!1;if(t&&(o="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!o.cause&&e&&(i=!0,r=e.message,o.cause=e),!o.ruleId&&!o.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?o.ruleId=n:(o.source=n.slice(0,e),o.ruleId=n.slice(e+1))}if(!o.place&&o.ancestors&&o.ancestors){const e=o.ancestors[o.ancestors.length-1];e&&(o.place=e.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=a?a.line:void 0,this.name=np(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=i&&o.cause&&"string"==typeof o.cause.stack?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ap.prototype.file="",ap.prototype.name="",ap.prototype.reason="",ap.prototype.message="",ap.prototype.stack="",ap.prototype.column=void 0,ap.prototype.line=void 0,ap.prototype.ancestors=void 0,ap.prototype.cause=void 0,ap.prototype.fatal=void 0,ap.prototype.place=void 0,ap.prototype.ruleId=void 0,ap.prototype.source=void 0;const sp={}.hasOwnProperty,lp=new Map,cp=/[A-Z]/g,up=new Set(["table","tbody","thead","tfoot","tr"]),dp=new Set(["td","th"]),fp="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function pp(e,t){if(!t||void 0===t.Fragment)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if("function"!=typeof t.jsxDEV)throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=function(e,t){return n;function n(n,r,o,i){const a=Array.isArray(o.children),s=ep(n);return t(r,o,i,a,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}(n,t.jsxDEV)}else{if("function"!=typeof t.jsx)throw new TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw new TypeError("Expected `jsxs` in production options");r=function(e,t,n){return r;function r(e,r,o,i){const a=Array.isArray(o.children)?n:t;return i?a(r,o,i):a(r,o)}}(0,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?Vf:Bf,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},i=hp(o,e,void 0);return i&&"string"!=typeof i?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function hp(e,t,n){return"element"===t.type?function(e,t,n){const r=e.schema;let o=r;"svg"===t.tagName.toLowerCase()&&"html"===r.space&&(o=Vf,e.schema=o);e.ancestors.push(t);const i=bp(e,t.tagName,!1),a=function(e,t){const n={};let r,o;for(o in t.properties)if("children"!==o&&sp.call(t.properties,o)){const i=vp(e,o,t.properties[o]);if(i){const[o,a]=i;e.tableCellAlignToStyle&&"align"===o&&"string"==typeof a&&dp.has(t.tagName)?r=a:n[o]=a}}if(r){(n.style||(n.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r}return n}(e,t);let s=yp(e,t);up.has(t.tagName)&&(s=s.filter(function(e){return"string"!=typeof e||!("object"==typeof(t=e)?"text"===t.type&&sf(t.value):sf(t));var t}));return mp(e,a,i,t),gp(a,s),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}(e,t,n):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(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)}xp(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?function(e,t,n){const r=e.schema;let o=r;"svg"===t.name&&"html"===r.space&&(o=Vf,e.schema=o);e.ancestors.push(t);const i=null===t.name?e.Fragment:bp(e,t.name,!0),a=function(e,t){const n={};for(const r of t.attributes)if("mdxJsxExpressionAttribute"===r.type)if(r.data&&r.data.estree&&e.evaluater){const t=r.data.estree.body[0];Zd(t.type);const o=t.expression;Zd(o.type);const i=o.properties[0];Zd(i.type),Object.assign(n,e.evaluater.evaluateExpression(i.argument))}else xp(e,t.position);else{const o=r.name;let i;if(r.value&&"object"==typeof r.value)if(r.value.data&&r.value.data.estree&&e.evaluater){const t=r.value.data.estree.body[0];Zd(t.type),i=e.evaluater.evaluateExpression(t.expression)}else xp(e,t.position);else i=null===r.value||r.value;n[o]=i}return n}(e,t),s=yp(e,t);return mp(e,a,i,t),gp(a,s),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}(e,t,n):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);xp(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return gp(r,yp(e,t)),e.create(t,e.Fragment,r,n)}(e,t,n):"text"===t.type?function(e,t){return t.value}(0,t):void 0}function mp(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function gp(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function yp(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:lp;for(;++r<t.children.length;){const i=t.children[r];let a;if(e.passKeys){const e="element"===i.type?i.tagName:"mdxJsxFlowElement"===i.type||"mdxJsxTextElement"===i.type?i.name:void 0;if(e){const t=o.get(e)||0;a=e+"-"+t,o.set(e,t+1)}}const s=hp(e,i,a);void 0!==s&&n.push(s)}return n}function vp(e,t,n){const r=function(e,t){const n=uf(t);let r=t,o=df;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&zf.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(Mf,If);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!Mf.test(e)){let n=e.replace(_f,Ff);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}o=Sf}return new o(r,t)}(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?function(e){const t={};return(""===e[e.length-1]?[...e,""]:e).join((t.padRight?" ":"")+","+(!1===t.padLeft?"":" ")).trim()}(n):n.join(" ").trim()),"style"===r.property){let t="object"==typeof n?n:function(e,t){try{return Jf(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const t=n,r=new ap("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:t,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=fp+"#cannot-parse-style-attribute",r}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)sp.call(e,n)&&(t[wp(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?Df[r.property]||r.property:r.attribute,n]}}function bp(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,o=-1;for(;++o<e.length;){const t=of(e[o])?{type:"Identifier",name:e[o]}:{type:"Literal",value:e[o]};n=n?{type:"MemberExpression",object:n,property:t,computed:Boolean(o&&"Literal"===t.type),optional:!1}:t}r=n}else r=of(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if("Literal"===r.type){const t=r.value;return sp.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);xp(e)}function xp(e,t){const n=new ap("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=fp+"#cannot-handle-mdx-estrees-without-createevaluater",n}function wp(e){let t=e.replace(cp,kp);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function kp(e){return"-"+e.toLowerCase()}const Sp={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"]},Ep={};function Cp(e,t){return Tp(e,"boolean"!=typeof Ep.includeImageAlt||Ep.includeImageAlt,"boolean"!=typeof Ep.includeHtml||Ep.includeHtml)}function Tp(e,t,n){if(function(e){return Boolean(e&&"object"==typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Pp(e.children,t,n)}return Array.isArray(e)?Pp(e,t,n):""}function Pp(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=Tp(e[o],t,n);return r.join("")}const Ap=document.createElement("i");function jp(e){const t="&"+e+";";Ap.innerHTML=t;const n=Ap.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&(n!==t&&n)}function Np(e,t,n,r){const o=e.length;let i,a=0;if(t=t<0?-t>o?0:o+t:t>o?o:t,n=n>0?n:0,r.length<1e4)i=Array.from(r),i.unshift(t,n),e.splice(...i);else for(n&&e.splice(t,n);a<r.length;)i=r.slice(a,a+1e4),i.unshift(t,0),e.splice(...i),a+=1e4,t+=1e4}function Rp(e,t){return e.length>0?(Np(e,e.length,0,t),e):t}const Lp={}.hasOwnProperty;function Op(e){const t={};let n=-1;for(;++n<e.length;)Dp(t,e[n]);return t}function Dp(e,t){let n;for(n in t){const r=(Lp.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let i;if(o)for(i in o){Lp.call(r,i)||(r[i]=[]);const e=o[i];_p(r[i],Array.isArray(e)?e:e?[e]:[])}}}function _p(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);Np(e,0,0,r)}function Mp(e,t){const n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||!(65535&~n)||65534==(65535&n)||n>1114111?"�":String.fromCodePoint(n)}function zp(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Fp=Xp(/[A-Za-z]/),Ip=Xp(/[\dA-Za-z]/),Bp=Xp(/[#-'*+\--9=?A-Z^-~]/);function Vp(e){return null!==e&&(e<32||127===e)}const Up=Xp(/\d/),Hp=Xp(/[\dA-Fa-f]/),$p=Xp(/[!-/:-@[-`{-~]/);function qp(e){return null!==e&&e<-2}function Wp(e){return null!==e&&(e<0||32===e)}function Kp(e){return-2===e||-1===e||32===e}const Yp=Xp(new RegExp("\\p{P}|\\p{S}","u")),Qp=Xp(/\s/);function Xp(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function Gp(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const i=e.charCodeAt(n);let a="";if(37===i&&Ip(e.charCodeAt(n+1))&&Ip(e.charCodeAt(n+2)))o=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(a=String.fromCharCode(i));else if(i>55295&&i<57344){const t=e.charCodeAt(n+1);i<56320&&t>56319&&t<57344?(a=String.fromCharCode(i,t),o=1):a="�"}else a=String.fromCharCode(i);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+o+1,a=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function Jp(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return function(r){if(Kp(r))return e.enter(n),a(r);return t(r)};function a(r){return Kp(r)&&i++<o?(e.consume(r),a):(e.exit(n),t(r))}}const Zp={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,function(n){if(null===n)return void e.consume(n);return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Jp(e,t,"linePrefix")},function(t){return e.enter("paragraph"),r(t)});let n;return t;function r(t){const r=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):qp(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),o)}}};const eh={tokenize:function(e){const t=this,n=[];let r,o,i,a=0;return s;function s(r){if(a<n.length){const o=n[a];return t.containerState=o[1],e.attempt(o[0].continuation,l,c)(r)}return c(r)}function l(e){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&v();const n=t.events.length;let o,i=n;for(;i--;)if("exit"===t.events[i][0]&&"chunkFlow"===t.events[i][1].type){o=t.events[i][1].end;break}y(a);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return Np(t.events,i+1,0,t.events.slice(n)),t.events.length=s,c(e)}return s(e)}function c(o){if(a===n.length){if(!r)return f(o);if(r.currentConstruct&&r.currentConstruct.concrete)return h(o);t.interrupt=Boolean(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(th,u,d)(o)}function u(e){return r&&v(),y(a),f(e)}function d(e){return t.parser.lazy[t.now().line]=a!==n.length,i=t.now().offset,h(e)}function f(n){return t.containerState={},e.attempt(th,p,h)(n)}function p(e){return a++,n.push([t.currentConstruct,t.containerState]),f(e)}function h(n){return null===n?(r&&v(),y(0),void e.consume(n)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:o}),m(n))}function m(n){return null===n?(g(e.exit("chunkFlow"),!0),y(0),void e.consume(n)):qp(n)?(e.consume(n),g(e.exit("chunkFlow")),a=0,t.interrupt=void 0,s):(e.consume(n),m)}function g(e,n){const s=t.sliceStream(e);if(n&&s.push(null),e.previous=o,o&&(o.next=e),o=e,r.defineSkip(e.start),r.write(s),t.parser.lazy[e.start.line]){let e=r.events.length;for(;e--;)if(r.events[e][1].start.offset<i&&(!r.events[e][1].end||r.events[e][1].end.offset>i))return;const n=t.events.length;let o,s,l=n;for(;l--;)if("exit"===t.events[l][0]&&"chunkFlow"===t.events[l][1].type){if(o){s=t.events[l][1].end;break}o=!0}for(y(a),e=n;e<t.events.length;)t.events[e][1].end={...s},e++;Np(t.events,l+1,0,t.events.slice(n)),t.events.length=e}}function y(r){let o=n.length;for(;o-- >r;){const r=n[o];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){r.write([null]),o=void 0,r=void 0,t.containerState._closeFlow=void 0}}},th={tokenize:function(e,t,n){return Jp(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function nh(e){return null===e||Wp(e)||Qp(e)?1:Yp(e)?2:void 0}function rh(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const i=e[o].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const oh={name:"attention",resolveAll:function(e,t){let n,r,o,i,a,s,l,c,u=-1;for(;++u<e.length;)if("enter"===e[u][0]&&"attentionSequence"===e[u][1].type&&e[u][1]._close)for(n=u;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[u][1]).charCodeAt(0)){if((e[n][1]._close||e[u][1]._open)&&(e[u][1].end.offset-e[u][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[u][1].end.offset-e[u][1].start.offset)%3))continue;s=e[n][1].end.offset-e[n][1].start.offset>1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;const d={...e[n][1].end},f={...e[u][1].start};ih(d,-s),ih(f,s),i={type:s>1?"strongSequence":"emphasisSequence",start:d,end:{...e[n][1].end}},a={type:s>1?"strongSequence":"emphasisSequence",start:{...e[u][1].start},end:f},o={type:s>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[u][1].start}},r={type:s>1?"strong":"emphasis",start:{...i.start},end:{...a.end}},e[n][1].end={...i.start},e[u][1].start={...a.end},l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=Rp(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=Rp(l,[["enter",r,t],["enter",i,t],["exit",i,t],["enter",o,t]]),l=Rp(l,rh(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),l=Rp(l,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",r,t]]),e[u][1].end.offset-e[u][1].start.offset?(c=2,l=Rp(l,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,Np(e,n-1,u-n+3,l),u=n+l.length-c-2;break}u=-1;for(;++u<e.length;)"attentionSequence"===e[u][1].type&&(e[u][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=nh(r);let i;return function(t){return i=t,e.enter("attentionSequence"),a(t)};function a(s){if(s===i)return e.consume(s),a;const l=e.exit("attentionSequence"),c=nh(s),u=!c||2===c&&o||n.includes(s),d=!o||2===o&&c||n.includes(r);return l._open=Boolean(42===i?u:u&&(o||!d)),l._close=Boolean(42===i?d:d&&(c||!u)),t(s)}}};function ih(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const ah={name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o};function o(t){return Fp(t)?(e.consume(t),i):64===t?n(t):l(t)}function i(e){return 43===e||45===e||46===e||Ip(e)?(r=1,a(e)):l(e)}function a(t){return 58===t?(e.consume(t),r=0,s):(43===t||45===t||46===t||Ip(t))&&r++<32?(e.consume(t),a):(r=0,l(t))}function s(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||Vp(r)?n(r):(e.consume(r),s)}function l(t){return 64===t?(e.consume(t),c):Bp(t)?(e.consume(t),l):n(t)}function c(e){return Ip(e)?u(e):n(e)}function u(n){return 46===n?(e.consume(n),r=0,c):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):d(n)}function d(t){if((45===t||Ip(t))&&r++<63){const n=45===t?d:u;return e.consume(t),n}return n(t)}}};const sh={partial:!0,tokenize:function(e,t,n){return function(t){return Kp(t)?Jp(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||qp(e)?t(e):n(e)}}};const lh={continuation:{tokenize:function(e,t,n){const r=this;return function(t){if(Kp(t))return Jp(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return o(t)};function o(r){return e.attempt(lh,t,n)(r)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){const r=this;return function(t){if(62===t){const n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),o}return n(t)};function o(n){return Kp(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};const ch={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return $p(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}};const uh={name:"characterReference",tokenize:function(e,t,n){const r=this;let o,i,a=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),s};function s(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),o=31,i=Ip,c(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,i=Hp,c):(e.enter("characterReferenceValue"),o=7,i=Up,c(t))}function c(s){if(59===s&&a){const o=e.exit("characterReferenceValue");return i!==Ip||jp(r.sliceSerialize(o))?(e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(s)}return i(s)&&a++<o?(e.consume(s),c):n(s)}}};const dh={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(null===t)return n(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},fh={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const r=this,o={partial:!0,tokenize:function(e,t,n){let o=0;return a;function a(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l}function l(t){return e.enter("codeFencedFence"),Kp(t)?Jp(e,c,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):c(t)}function c(t){return t===i?(e.enter("codeFencedFenceSequence"),u(t)):n(t)}function u(t){return t===i?(o++,e.consume(t),u):o>=s?(e.exit("codeFencedFenceSequence"),Kp(t)?Jp(e,d,"whitespace")(t):d(t)):n(t)}function d(r){return null===r||qp(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}};let i,a=0,s=0;return function(t){return function(t){const n=r.events[r.events.length-1];return a=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,i=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),l(t)}(t)};function l(t){return t===i?(s++,e.consume(t),l):s<3?n(t):(e.exit("codeFencedFenceSequence"),Kp(t)?Jp(e,c,"whitespace")(t):c(t))}function c(n){return null===n||qp(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(dh,p,v)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(n))}function u(t){return null===t||qp(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(t)):Kp(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Jp(e,d,"whitespace")(t)):96===t&&t===i?n(t):(e.consume(t),u)}function d(t){return null===t||qp(t)?c(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),f(t))}function f(t){return null===t||qp(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(t)):96===t&&t===i?n(t):(e.consume(t),f)}function p(t){return e.attempt(o,v,h)(t)}function h(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),m}function m(t){return a>0&&Kp(t)?Jp(e,g,"linePrefix",a+1)(t):g(t)}function g(t){return null===t||qp(t)?e.check(dh,p,v)(t):(e.enter("codeFlowValue"),y(t))}function y(t){return null===t||qp(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),y)}function v(n){return e.exit("codeFenced"),t(n)}}};const ph={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),Jp(e,o,"linePrefix",5)(t)};function o(e){const t=r.events[r.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?i(e):n(e)}function i(t){return null===t?s(t):qp(t)?e.attempt(hh,i,s)(t):(e.enter("codeFlowValue"),a(t))}function a(t){return null===t||qp(t)?(e.exit("codeFlowValue"),i(t)):(e.consume(t),a)}function s(n){return e.exit("codeIndented"),t(n)}}},hh={partial:!0,tokenize:function(e,t,n){const r=this;return o;function o(t){return r.parser.lazy[r.now().line]?n(t):qp(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):Jp(e,i,"linePrefix",5)(t)}function i(e){const i=r.events[r.events.length-1];return i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?t(e):qp(e)?o(e):n(e)}}};const mh={name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,n,r=e.length-4,o=3;if(!("lineEnding"!==e[o][1].type&&"space"!==e[o][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=o;++t<r;)if("codeTextData"===e[t][1].type){e[o][1].type="codeTextPadding",e[r][1].type="codeTextPadding",o+=2,r-=2;break}t=o-1,r++;for(;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):t!==r&&"lineEnding"!==e[t][1].type||(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let r,o,i=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),a(t)};function a(t){return 96===t?(e.consume(t),i++,a):(e.exit("codeTextSequence"),s(t))}function s(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),s):96===t?(o=e.enter("codeTextSequence"),r=0,c(t)):qp(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s):(e.enter("codeTextData"),l(t))}function l(t){return null===t||32===t||96===t||qp(t)?(e.exit("codeTextData"),s(t)):(e.consume(t),l)}function c(n){return 96===n?(e.consume(n),r++,c):r===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(o.type="codeTextData",l(n))}}};class gh{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const n=null==t?Number.POSITIVE_INFINITY:t;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const r=t||0;this.setCursor(Math.trunc(e));const o=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&yh(this.left,n),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),yh(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),yh(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&0===this.right.length||e<0&&0===this.left.length))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);yh(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);yh(this.left,t.reverse())}}}function yh(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function vh(e){const t={};let n,r,o,i,a,s,l,c=-1;const u=new gh(e);for(;++c<u.length;){for(;c in t;)c=t[c];if(n=u.get(c),c&&"chunkFlow"===n[1].type&&"listItemPrefix"===u.get(c-1)[1].type&&(s=n[1]._tokenizer.events,o=0,o<s.length&&"lineEndingBlank"===s[o][1].type&&(o+=2),o<s.length&&"content"===s[o][1].type))for(;++o<s.length&&"content"!==s[o][1].type;)"chunkText"===s[o][1].type&&(s[o][1]._isInFirstContentOfListItem=!0,o++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,bh(u,c)),c=t[c],l=!0);else if(n[1]._container){for(o=c,r=void 0;o--;)if(i=u.get(o),"lineEnding"===i[1].type||"lineEndingBlank"===i[1].type)"enter"===i[0]&&(r&&(u.get(r)[1].type="lineEndingBlank"),i[1].type="lineEnding",r=o);else if("linePrefix"!==i[1].type&&"listItemIndent"!==i[1].type)break;r&&(n[1].end={...u.get(r)[1].start},a=u.slice(r,c),a.unshift(n),u.splice(r,c-r+1,a))}}return Np(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!l}function bh(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const i=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const s=a.events,l=[],c={};let u,d,f=-1,p=n,h=0,m=0;const g=[m];for(;p;){for(;e.get(++o)[1]!==p;);i.push(o),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&a.defineSkip(p.start),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(u),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)"exit"===s[f][0]&&"enter"===s[f-1][0]&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(m=f+1,g.push(m),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(a.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){const t=s.slice(g[f],g[f+1]),n=i.pop();l.push([n,n+t.length-1]),e.splice(n,2,t)}for(l.reverse(),f=-1;++f<l.length;)c[h+l[f][0]]=h+l[f][1],h+=l[f][1]-l[f][0]-1;return c}const xh={resolve:function(e){return vh(e),e},tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?o(t):qp(t)?e.check(wh,i,o)(t):(e.consume(t),r)}function o(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function i(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},wh={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Jp(e,o,"linePrefix")};function o(o){if(null===o||qp(o))return n(o);const i=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}};function kh(e,t,n,r,o,i,a,s,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return function(t){if(60===t)return e.enter(r),e.enter(o),e.enter(i),e.consume(t),e.exit(i),d;if(null===t||32===t||41===t||Vp(t))return n(t);return e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),h(t)};function d(n){return 62===n?(e.enter(i),e.consume(n),e.exit(i),e.exit(o),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),f(n))}function f(t){return 62===t?(e.exit("chunkString"),e.exit(s),d(t)):null===t||60===t||qp(t)?n(t):(e.consume(t),92===t?p:f)}function p(t){return 60===t||62===t||92===t?(e.consume(t),f):f(t)}function h(o){return u||null!==o&&41!==o&&!Wp(o)?u<c&&40===o?(e.consume(o),u++,h):41===o?(e.consume(o),u--,h):null===o||32===o||40===o||Vp(o)?n(o):(e.consume(o),92===o?m:h):(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(o))}function m(t){return 40===t||41===t||92===t?(e.consume(t),h):h(t)}}function Sh(e,t,n,r,o,i){const a=this;let s,l=0;return function(t){return e.enter(r),e.enter(o),e.consume(t),e.exit(o),e.enter(i),c};function c(d){return l>999||null===d||91===d||93===d&&!s||94===d&&!l&&"_hiddenFootnoteSupport"in a.parser.constructs?n(d):93===d?(e.exit(i),e.enter(o),e.consume(d),e.exit(o),e.exit(r),t):qp(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(t){return null===t||91===t||93===t||qp(t)||l++>999?(e.exit("chunkString"),c(t)):(e.consume(t),s||(s=!Kp(t)),92===t?d:u)}function d(t){return 91===t||92===t||93===t?(e.consume(t),l++,u):u(t)}}function Eh(e,t,n,r,o,i){let a;return function(t){if(34===t||39===t||40===t)return e.enter(r),e.enter(o),e.consume(t),e.exit(o),a=40===t?41:t,s;return n(t)};function s(n){return n===a?(e.enter(o),e.consume(n),e.exit(o),e.exit(r),t):(e.enter(i),l(n))}function l(t){return t===a?(e.exit(i),s(a)):null===t?n(t):qp(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Jp(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===a||null===t||qp(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return t===a||92===t?(e.consume(t),c):c(t)}}function Ch(e,t){let n;return function r(o){if(qp(o))return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r;if(Kp(o))return Jp(e,r,n?"linePrefix":"lineSuffix")(o);return t(o)}}const Th={name:"definition",tokenize:function(e,t,n){const r=this;let o;return function(t){return e.enter("definition"),function(t){return Sh.call(r,e,i,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function i(t){return o=zp(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),a):n(t)}function a(t){return Wp(t)?Ch(e,s)(t):s(t)}function s(t){return kh(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(Ph,c,c)(t)}function c(t){return Kp(t)?Jp(e,u,"whitespace")(t):u(t)}function u(i){return null===i||qp(i)?(e.exit("definition"),r.parser.defined.push(o),t(i)):n(i)}}},Ph={partial:!0,tokenize:function(e,t,n){return function(t){return Wp(t)?Ch(e,r)(t):n(t)};function r(t){return Eh(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function o(t){return Kp(t)?Jp(e,i,"whitespace")(t):i(t)}function i(e){return null===e||qp(e)?t(e):n(e)}}};const Ah={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return qp(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};const jh={name:"headingAtx",resolve:function(e,t){let n,r,o=e.length-2,i=3;"whitespace"===e[i][1].type&&(i+=2);o-2>i&&"whitespace"===e[o][1].type&&(o-=2);"atxHeadingSequence"===e[o][1].type&&(i===o-1||o-4>i&&"whitespace"===e[o-2][1].type)&&(o-=i+1===o?2:4);o>i&&(n={type:"atxHeadingText",start:e[i][1].start,end:e[o][1].end},r={type:"chunkText",start:e[i][1].start,end:e[o][1].end,contentType:"text"},Np(e,i,o-i+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]]));return e},tokenize:function(e,t,n){let r=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),o(t)}(t)};function o(t){return 35===t&&r++<6?(e.consume(t),o):null===t||Wp(t)?(e.exit("atxHeadingSequence"),i(t)):n(t)}function i(n){return 35===n?(e.enter("atxHeadingSequence"),a(n)):null===n||qp(n)?(e.exit("atxHeading"),t(n)):Kp(n)?Jp(e,i,"whitespace")(n):(e.enter("atxHeadingText"),s(n))}function a(t){return 35===t?(e.consume(t),a):(e.exit("atxHeadingSequence"),i(t))}function s(t){return null===t||35===t||Wp(t)?(e.exit("atxHeadingText"),i(t)):(e.consume(t),s)}}};const Nh=["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"],Rh=["pre","script","style","textarea"],Lh={concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2));return e},tokenize:function(e,t,n){const r=this;let o,i,a,s,l;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),c}(t)};function c(s){return 33===s?(e.consume(s),u):47===s?(e.consume(s),i=!0,p):63===s?(e.consume(s),o=3,r.interrupt?t:D):Fp(s)?(e.consume(s),a=String.fromCharCode(s),h):n(s)}function u(i){return 45===i?(e.consume(i),o=2,d):91===i?(e.consume(i),o=5,s=0,f):Fp(i)?(e.consume(i),o=4,r.interrupt?t:D):n(i)}function d(o){return 45===o?(e.consume(o),r.interrupt?t:D):n(o)}function f(o){const i="CDATA[";return o===i.charCodeAt(s++)?(e.consume(o),6===s?r.interrupt?t:T:f):n(o)}function p(t){return Fp(t)?(e.consume(t),a=String.fromCharCode(t),h):n(t)}function h(s){if(null===s||47===s||62===s||Wp(s)){const l=47===s,c=a.toLowerCase();return l||i||!Rh.includes(c)?Nh.includes(a.toLowerCase())?(o=6,l?(e.consume(s),m):r.interrupt?t(s):T(s)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):i?g(s):y(s)):(o=1,r.interrupt?t(s):T(s))}return 45===s||Ip(s)?(e.consume(s),a+=String.fromCharCode(s),h):n(s)}function m(o){return 62===o?(e.consume(o),r.interrupt?t:T):n(o)}function g(t){return Kp(t)?(e.consume(t),g):E(t)}function y(t){return 47===t?(e.consume(t),E):58===t||95===t||Fp(t)?(e.consume(t),v):Kp(t)?(e.consume(t),y):E(t)}function v(t){return 45===t||46===t||58===t||95===t||Ip(t)?(e.consume(t),v):b(t)}function b(t){return 61===t?(e.consume(t),x):Kp(t)?(e.consume(t),b):y(t)}function x(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),l=t,w):Kp(t)?(e.consume(t),x):k(t)}function w(t){return t===l?(e.consume(t),l=null,S):null===t||qp(t)?n(t):(e.consume(t),w)}function k(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||Wp(t)?b(t):(e.consume(t),k)}function S(e){return 47===e||62===e||Kp(e)?y(e):n(e)}function E(t){return 62===t?(e.consume(t),C):n(t)}function C(t){return null===t||qp(t)?T(t):Kp(t)?(e.consume(t),C):n(t)}function T(t){return 45===t&&2===o?(e.consume(t),N):60===t&&1===o?(e.consume(t),R):62===t&&4===o?(e.consume(t),_):63===t&&3===o?(e.consume(t),D):93===t&&5===o?(e.consume(t),O):!qp(t)||6!==o&&7!==o?null===t||qp(t)?(e.exit("htmlFlowData"),P(t)):(e.consume(t),T):(e.exit("htmlFlowData"),e.check(Oh,M,P)(t))}function P(t){return e.check(Dh,A,M)(t)}function A(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),j}function j(t){return null===t||qp(t)?P(t):(e.enter("htmlFlowData"),T(t))}function N(t){return 45===t?(e.consume(t),D):T(t)}function R(t){return 47===t?(e.consume(t),a="",L):T(t)}function L(t){if(62===t){const n=a.toLowerCase();return Rh.includes(n)?(e.consume(t),_):T(t)}return Fp(t)&&a.length<8?(e.consume(t),a+=String.fromCharCode(t),L):T(t)}function O(t){return 93===t?(e.consume(t),D):T(t)}function D(t){return 62===t?(e.consume(t),_):45===t&&2===o?(e.consume(t),D):T(t)}function _(t){return null===t||qp(t)?(e.exit("htmlFlowData"),M(t)):(e.consume(t),_)}function M(n){return e.exit("htmlFlow"),t(n)}}},Oh={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(sh,t,n)}}},Dh={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(qp(t))return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o;return n(t)};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}};const _h={name:"htmlText",tokenize:function(e,t,n){const r=this;let o,i,a;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),s};function s(t){return 33===t?(e.consume(t),l):47===t?(e.consume(t),x):63===t?(e.consume(t),v):Fp(t)?(e.consume(t),S):n(t)}function l(t){return 45===t?(e.consume(t),c):91===t?(e.consume(t),i=0,p):Fp(t)?(e.consume(t),y):n(t)}function c(t){return 45===t?(e.consume(t),f):n(t)}function u(t){return null===t?n(t):45===t?(e.consume(t),d):qp(t)?(a=u,L(t)):(e.consume(t),u)}function d(t){return 45===t?(e.consume(t),f):u(t)}function f(e){return 62===e?R(e):45===e?d(e):u(e)}function p(t){const r="CDATA[";return t===r.charCodeAt(i++)?(e.consume(t),6===i?h:p):n(t)}function h(t){return null===t?n(t):93===t?(e.consume(t),m):qp(t)?(a=h,L(t)):(e.consume(t),h)}function m(t){return 93===t?(e.consume(t),g):h(t)}function g(t){return 62===t?R(t):93===t?(e.consume(t),g):h(t)}function y(t){return null===t||62===t?R(t):qp(t)?(a=y,L(t)):(e.consume(t),y)}function v(t){return null===t?n(t):63===t?(e.consume(t),b):qp(t)?(a=v,L(t)):(e.consume(t),v)}function b(e){return 62===e?R(e):v(e)}function x(t){return Fp(t)?(e.consume(t),w):n(t)}function w(t){return 45===t||Ip(t)?(e.consume(t),w):k(t)}function k(t){return qp(t)?(a=k,L(t)):Kp(t)?(e.consume(t),k):R(t)}function S(t){return 45===t||Ip(t)?(e.consume(t),S):47===t||62===t||Wp(t)?E(t):n(t)}function E(t){return 47===t?(e.consume(t),R):58===t||95===t||Fp(t)?(e.consume(t),C):qp(t)?(a=E,L(t)):Kp(t)?(e.consume(t),E):R(t)}function C(t){return 45===t||46===t||58===t||95===t||Ip(t)?(e.consume(t),C):T(t)}function T(t){return 61===t?(e.consume(t),P):qp(t)?(a=T,L(t)):Kp(t)?(e.consume(t),T):E(t)}function P(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),o=t,A):qp(t)?(a=P,L(t)):Kp(t)?(e.consume(t),P):(e.consume(t),j)}function A(t){return t===o?(e.consume(t),o=void 0,N):null===t?n(t):qp(t)?(a=A,L(t)):(e.consume(t),A)}function j(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||Wp(t)?E(t):(e.consume(t),j)}function N(e){return 47===e||62===e||Wp(e)?E(e):n(e)}function R(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function L(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),O}function O(t){return Kp(t)?Jp(e,D,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):D(t)}function D(t){return e.enter("htmlTextData"),a(t)}}};const Mh={name:"labelEnd",resolveAll:function(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){const e="labelImage"===r.type?4:2;r.type="data",t+=e}}e.length!==n.length&&Np(e,0,e.length,n);return e},resolveTo:function(e,t){let n,r,o,i,a=e.length,s=0;for(;a--;)if(n=e[a][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[a][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(o){if("enter"===e[a][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=a,"labelLink"!==n.type)){s=2;break}}else"labelEnd"===n.type&&(o=a);const l={type:"labelLink"===e[r][1].type?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[r][1].start},end:{...e[o][1].end}},u={type:"labelText",start:{...e[r+s+2][1].end},end:{...e[o-2][1].start}};return i=[["enter",l,t],["enter",c,t]],i=Rp(i,e.slice(r+1,r+s+3)),i=Rp(i,[["enter",u,t]]),i=Rp(i,rh(t.parser.constructs.insideSpan.null,e.slice(r+s+4,o-3),t)),i=Rp(i,[["exit",u,t],e[o-2],e[o-1],["exit",c,t]]),i=Rp(i,e.slice(o+1)),i=Rp(i,[["exit",l,t]]),Np(e,r,e.length,i),e},tokenize:function(e,t,n){const r=this;let o,i,a=r.events.length;for(;a--;)if(("labelImage"===r.events[a][1].type||"labelLink"===r.events[a][1].type)&&!r.events[a][1]._balanced){o=r.events[a][1];break}return function(t){if(!o)return n(t);if(o._inactive)return u(t);return i=r.parser.defined.includes(zp(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),s};function s(t){return 40===t?e.attempt(zh,c,i?c:u)(t):91===t?e.attempt(Fh,c,i?l:u)(t):i?c(t):u(t)}function l(t){return e.attempt(Ih,c,u)(t)}function c(e){return t(e)}function u(e){return o._balanced=!0,n(e)}}},zh={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return Wp(t)?Ch(e,o)(t):o(t)}function o(t){return 41===t?c(t):kh(e,i,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function i(t){return Wp(t)?Ch(e,s)(t):c(t)}function a(e){return n(e)}function s(t){return 34===t||39===t||40===t?Eh(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function l(t){return Wp(t)?Ch(e,c)(t):c(t)}function c(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},Fh={tokenize:function(e,t,n){const r=this;return function(t){return Sh.call(r,e,o,i,"reference","referenceMarker","referenceString")(t)};function o(e){return r.parser.defined.includes(zp(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function i(e){return n(e)}}},Ih={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}};const Bh={name:"labelStartImage",resolveAll:Mh.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),o};function o(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),i):n(t)}function i(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const Vh={name:"labelStartLink",resolveAll:Mh.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),o};function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const Uh={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Jp(e,t,"linePrefix")}}};const Hh={name:"thematicBreak",tokenize:function(e,t,n){let r,o=0;return function(t){return e.enter("thematicBreak"),function(e){return r=e,i(e)}(t)};function i(i){return i===r?(e.enter("thematicBreakSequence"),a(i)):o>=3&&(null===i||qp(i))?(e.exit("thematicBreak"),t(i)):n(i)}function a(t){return t===r?(e.consume(t),o++,a):(e.exit("thematicBreakSequence"),Kp(t)?Jp(e,i,"whitespace")(t):i(t))}}};const $h={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(sh,function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Jp(e,t,"listItemIndent",r.containerState.size+1)(n)},function(n){if(r.containerState.furtherBlankLines||!Kp(n))return r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n);return r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Wh,t,o)(n)});function o(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,Jp(e,e.attempt($h,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){const r=this,o=r.events[r.events.length-1];let i=o&&"linePrefix"===o[1].type?o[2].sliceSerialize(o[1],!0).length:0,a=0;return function(t){const o=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===o?!r.containerState.marker||t===r.containerState.marker:Up(t)){if(r.containerState.type||(r.containerState.type=o,e.enter(o,{_container:!0})),"listUnordered"===o)return e.enter("listItemPrefix"),42===t||45===t?e.check(Hh,n,l)(t):l(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(t)}return n(t)};function s(t){return Up(t)&&++a<10?(e.consume(t),s):(!r.interrupt||a<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),l(t)):n(t)}function l(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(sh,r.interrupt?n:c,e.attempt(qh,d,u))}function c(e){return r.containerState.initialBlankLine=!0,i++,d(e)}function u(t){return Kp(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),d):n(t)}function d(n){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},qh={partial:!0,tokenize:function(e,t,n){const r=this;return Jp(e,function(e){const o=r.events[r.events.length-1];return!Kp(e)&&o&&"listItemPrefixWhitespace"===o[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},Wh={partial:!0,tokenize:function(e,t,n){const r=this;return Jp(e,function(e){const o=r.events[r.events.length-1];return o&&"listItemIndent"===o[1].type&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(e):n(e)},"listItemIndent",r.containerState.size+1)}};const Kh={name:"setextUnderline",resolveTo:function(e,t){let n,r,o,i=e.length;for(;i--;)if("enter"===e[i][0]){if("content"===e[i][1].type){n=i;break}"paragraph"===e[i][1].type&&(r=i)}else"content"===e[i][1].type&&e.splice(i,1),o||"definition"!==e[i][1].type||(o=i);const a={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};e[r][1].type="setextHeadingText",o?(e.splice(r,0,["enter",a,t]),e.splice(o+1,0,["exit",e[n][1],t]),e[n][1].end={...e[o][1].end}):e[n][1]=a;return e.push(["exit",a,t]),e},tokenize:function(e,t,n){const r=this;let o;return function(t){let a,s=r.events.length;for(;s--;)if("lineEnding"!==r.events[s][1].type&&"linePrefix"!==r.events[s][1].type&&"content"!==r.events[s][1].type){a="paragraph"===r.events[s][1].type;break}if(!r.parser.lazy[r.now().line]&&(r.interrupt||a))return e.enter("setextHeadingLine"),o=t,function(t){return e.enter("setextHeadingLineSequence"),i(t)}(t);return n(t)};function i(t){return t===o?(e.consume(t),i):(e.exit("setextHeadingLineSequence"),Kp(t)?Jp(e,a,"lineSuffix")(t):a(t))}function a(r){return null===r||qp(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};const Yh={tokenize:function(e){const t=this,n=e.attempt(sh,function(r){if(null===r)return void e.consume(r);return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n},e.attempt(this.parser.constructs.flowInitial,r,Jp(e,e.attempt(this.parser.constructs.flow,r,e.attempt(xh,r)),"linePrefix")));return n;function r(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}}};const Qh={resolveAll:Zh()},Xh=Jh("string"),Gh=Jh("text");function Jh(e){return{resolveAll:Zh("text"===e?em:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],o=t.attempt(r,i,a);return i;function i(e){return l(e)?o(e):a(e)}function a(e){if(null!==e)return t.enter("data"),t.consume(e),s;t.consume(e)}function s(e){return l(e)?(t.exit("data"),o(e)):(t.consume(e),s)}function l(e){if(null===e)return!0;const t=r[e];let o=-1;if(t)for(;++o<t.length;){const e=t[o];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function Zh(e){return function(t,n){let r,o=-1;for(;++o<=t.length;)void 0===r?t[o]&&"data"===t[o][1].type&&(r=o,o++):t[o]&&"data"===t[o][1].type||(o!==r+2&&(t[r][1].end=t[o-1][1].end,t.splice(r+2,o-r-2),o=r+2),r=void 0);return e?e(t,n):t}}function em(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){const r=e[n-1][1],o=t.sliceStream(r);let i,a=o.length,s=-1,l=0;for(;a--;){const e=o[a];if("string"==typeof e){for(s=e.length;32===e.charCodeAt(s-1);)l++,s--;if(s)break;s=-1}else if(-2===e)i=!0,l++;else if(-1!==e){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const o={type:n===e.length||i||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?s:r.start._bufferIndex+s,_index:r.start._index+a,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...o.start},r.start.offset===r.end.offset?Object.assign(r,o):(e.splice(n,0,["enter",o,t],["exit",o,t]),n+=2)}n++}return e}const tm={42:$h,43:$h,45:$h,48:$h,49:$h,50:$h,51:$h,52:$h,53:$h,54:$h,55:$h,56:$h,57:$h,62:lh},nm={91:Th},rm={[-2]:ph,[-1]:ph,32:ph},om={35:jh,42:Hh,45:[Kh,Hh],60:Lh,61:Kh,95:Hh,96:fh,126:fh},im={38:uh,92:ch},am={[-5]:Uh,[-4]:Uh,[-3]:Uh,33:Bh,38:uh,42:oh,60:[ah,_h],91:Vh,92:[Ah,ch],93:Mh,95:oh,96:mh},sm={null:[oh,Qh]},lm=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:nm,disable:{null:[]},document:tm,flow:om,flowInitial:rm,insideSpan:sm,string:im,text:am},Symbol.toStringTag,{value:"Module"}));function cm(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},i=[];let a=[],s=[];const l={attempt:g(function(e,t){y(e,t.from)}),check:g(m),consume:function(e){qp(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,v()):-1!==e&&(r.column++,r.offset++);r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++));c.previous=e},enter:function(e,t){const n=t||{};return n.type=e,n.start=f(),c.events.push(["enter",n,c]),s.push(n),n},exit:function(e){const t=s.pop();return t.end=f(),c.events.push(["exit",t,c]),t},interrupt:g(m,{interrupt:!0})},c={code:null,containerState:{},defineSkip:function(e){o[e.line]=e.column,v()},events:[],now:f,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const i=e[n];let a;if("string"==typeof i)a=i;else switch(i){case-5:a="\r";break;case-4:a="\n";break;case-3:a="\r\n";break;case-2:a=t?" ":"\t";break;case-1:if(!t&&o)continue;a=" ";break;default:a=String.fromCharCode(i)}o=-2===i,r.push(a)}return r.join("")}(d(e),t)},sliceStream:d,write:function(e){if(a=Rp(a,e),p(),null!==a[a.length-1])return[];return y(t,0),c.events=rh(i,c.events,c),c.events}};let u=t.tokenize.call(c,l);return t.resolveAll&&i.push(t),c;function d(e){return function(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,i=t.end._bufferIndex;let a;if(n===o)a=[e[n].slice(r,i)];else{if(a=e.slice(n,o),r>-1){const e=a[0];"string"==typeof e?a[0]=e.slice(r):a.shift()}i>0&&a.push(e[o].slice(0,i))}return a}(a,e)}function f(){const{_bufferIndex:e,_index:t,line:n,column:o,offset:i}=r;return{_bufferIndex:e,_index:t,line:n,column:o,offset:i}}function p(){let e;for(;r._index<a.length;){const t=a[r._index];if("string"==typeof t)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)h(t.charCodeAt(r._bufferIndex));else h(t)}}function h(e){u=u(e)}function m(e,t){t.restore()}function g(e,t){return function(n,o,i){let a,u,d,p;return Array.isArray(n)?h(n):"tokenize"in n?h([n]):function(e){return t;function t(t){const n=null!==t&&e[t],r=null!==t&&e.null;return h([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}(n);function h(e){return a=e,u=0,0===e.length?i:m(e[u])}function m(e){return function(n){p=function(){const e=f(),t=c.previous,n=c.currentConstruct,o=c.events.length,i=Array.from(s);return{from:o,restore:a};function a(){r=e,c.previous=t,c.currentConstruct=n,c.events.length=o,s=i,v()}}(),d=e,e.partial||(c.currentConstruct=e);if(e.name&&c.parser.constructs.disable.null.includes(e.name))return y();return e.tokenize.call(t?Object.assign(Object.create(c),t):c,l,g,y)(n)}}function g(t){return e(d,p),o}function y(e){return p.restore(),++u<a.length?m(a[u]):i}}}function y(e,t){e.resolveAll&&!i.includes(e)&&i.push(e),e.resolve&&Np(c.events,t,c.events.length-t,e.resolve(c.events.slice(t),c)),e.resolveTo&&(c.events=e.resolveTo(c.events,c))}function v(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}const um=/[\0\t\n\r]/g;const dm=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function fm(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return Mp(n.slice(t?2:1),t?16:10)}return jp(n)||e}const pm={}.hasOwnProperty;function hm(e,t,n){return t&&"object"==typeof t&&(n=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(te),autolinkProtocol:C,autolinkEmail:C,atxHeading:i(G),blockQuote:i(W),characterEscape:C,characterReference:C,codeFenced:i(K),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:i(K,a),codeText:i(Y,a),codeTextData:C,data:C,codeFlowValue:C,definition:i(Q),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:i(X),hardBreakEscape:i(J),hardBreakTrailing:i(J),htmlFlow:i(Z,a),htmlFlowData:C,htmlText:i(Z,a),htmlTextData:C,image:i(ee),label:a,link:i(te),listItem:i(re),listItemValue:f,listOrdered:i(ne,d),listUnordered:i(ne),paragraph:i(oe),reference:I,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:i(G),strong:i(ie),thematicBreak:i(se)},exit:{atxHeading:l(),atxHeadingSequence:w,autolink:l(),autolinkEmail:q,autolinkProtocol:$,blockQuote:l(),characterEscapeValue:T,characterReferenceMarkerHexadecimal:V,characterReferenceMarkerNumeric:V,characterReferenceValue:U,characterReference:H,codeFenced:l(g),codeFencedFence:m,codeFencedFenceInfo:p,codeFencedFenceMeta:h,codeFlowValue:T,codeIndented:l(y),codeText:l(R),codeTextData:T,data:T,definition:l(),definitionDestinationString:x,definitionLabelString:v,definitionTitleString:b,emphasis:l(),hardBreakEscape:l(A),hardBreakTrailing:l(A),htmlFlow:l(j),htmlFlowData:T,htmlText:l(N),htmlTextData:T,image:l(O),label:_,labelText:D,lineEnding:P,link:l(L),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:B,resourceDestinationString:M,resourceTitleString:z,resource:F,setextHeading:l(E),setextHeadingLineSequence:S,setextHeadingText:k,strong:l(),thematicBreak:l()}};gm(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(e){let r={type:"root",children:[]};const i={stack:[r],tokenStack:[],config:t,enter:s,exit:c,buffer:a,resume:u,data:n},l=[];let d=-1;for(;++d<e.length;)if("listOrdered"===e[d][1].type||"listUnordered"===e[d][1].type)if("enter"===e[d][0])l.push(d);else{d=o(e,l.pop(),d)}for(d=-1;++d<e.length;){const n=t[e[d][0]];pm.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},i),e[d][1])}if(i.tokenStack.length>0){const e=i.tokenStack[i.tokenStack.length-1];(e[1]||vm).call(i,void 0,e[0])}for(r.position={start:mm(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:mm(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function o(e,t,n){let r,o,i,a,s=t-1,l=-1,c=!1;for(;++s<=n;){const t=e[s];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?l++:l--,a=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||a||l||i||(i=s),a=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:a=void 0}if(!l&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===l&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let a=s;for(o=void 0;a--;){const t=e[a];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;o&&(e[o][1].type="lineEndingBlank",c=!0),t[1].type="lineEnding",o=a}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}i&&(!o||i<o)&&(r._spread=!0),r.end=Object.assign({},o?e[o][1].start:t[1].end),e.splice(o||s,0,["exit",r,t[2]]),s++,n++}if("listItemPrefix"===t[1].type){const o={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=o,e.splice(s,0,["enter",o,t[2]]),s++,n++,i=void 0,a=!0}}}return e[t][1]._spread=c,n}function i(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:mm(t.start),end:void 0}}function l(e){return t;function t(t){e&&e.call(this,t),c.call(this,t)}}function c(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+np({start:e.start,end:e.end})+"): it’s not open");if(r[0].type!==e.type)if(t)t.call(this,e,r[0]);else{(r[1]||vm).call(this,e,r[0])}n.position.end=mm(e.end)}function u(){return Cp(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){const e=this.resume();this.stack[this.stack.length-1].lang=e}function h(){const e=this.resume();this.stack[this.stack.length-1].meta=e}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function v(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=zp(this.sliceSerialize(e)).toLowerCase()}function b(){const e=this.resume();this.stack[this.stack.length-1].title=e}function x(){const e=this.resume();this.stack[this.stack.length-1].url=e}function w(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}}function k(){this.data.setextHeadingSlurpLineEnding=!0}function S(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2}function E(){this.data.setextHeadingSlurpLineEnding=void 0}function C(e){const t=this.stack[this.stack.length-1].children;let n=t[t.length-1];n&&"text"===n.type||(n=ae(),n.position={start:mm(e.start),end:void 0},t.push(n)),this.stack.push(n)}function T(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=mm(e.end)}function P(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak){return n.children[n.children.length-1].position.end=mm(e.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(C.call(this,e),T.call(this,e))}function A(){this.data.atHardBreak=!0}function j(){const e=this.resume();this.stack[this.stack.length-1].value=e}function N(){const e=this.resume();this.stack[this.stack.length-1].value=e}function R(){const e=this.resume();this.stack[this.stack.length-1].value=e}function L(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function O(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function D(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace(dm,fm)}(t),n.identifier=zp(t).toLowerCase()}function _(){const e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];if(this.data.inReference=!0,"link"===n.type){const t=e.children;n.children=t}else n.alt=t}function M(){const e=this.resume();this.stack[this.stack.length-1].url=e}function z(){const e=this.resume();this.stack[this.stack.length-1].title=e}function F(){this.data.inReference=void 0}function I(){this.data.referenceType="collapsed"}function B(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=zp(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"}function V(e){this.data.characterReferenceType=e.type}function U(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let r;if(n)r=Mp(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0;else{r=jp(t)}this.stack[this.stack.length-1].value+=r}function H(e){this.stack.pop().position.end=mm(e.end)}function $(e){T.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function q(e){T.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function W(){return{type:"blockquote",children:[]}}function K(){return{type:"code",lang:null,meta:null,value:""}}function Y(){return{type:"inlineCode",value:""}}function Q(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function X(){return{type:"emphasis",children:[]}}function G(){return{type:"heading",depth:0,children:[]}}function J(){return{type:"break"}}function Z(){return{type:"html",value:""}}function ee(){return{type:"image",title:null,url:"",alt:null}}function te(){return{type:"link",title:null,url:"",children:[]}}function ne(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function re(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function oe(){return{type:"paragraph",children:[]}}function ie(){return{type:"strong",children:[]}}function ae(){return{type:"text",value:""}}function se(){return{type:"thematicBreak"}}}(n)(function(e){for(;!vh(e););return e}(function(e){const t={constructs:Op([lm,...(e||{}).extensions||[]]),content:n(Zp),defined:[],document:n(eh),flow:n(Yh),lazy:{},string:n(Xh),text:n(Gh)};return t;function n(e){return function(n){return cm(t,e,n)}}}(n).document().write(function(){let e,t=1,n="",r=!0;return function(o,i,a){const s=[];let l,c,u,d,f;for(o=n+("string"==typeof o?o.toString():new TextDecoder(i||void 0).decode(o)),u=0,n="",r&&(65279===o.charCodeAt(0)&&u++,r=void 0);u<o.length;){if(um.lastIndex=u,l=um.exec(o),d=l&&void 0!==l.index?l.index:o.length,f=o.charCodeAt(d),!l){n=o.slice(u);break}if(10===f&&u===d&&e)s.push(-3),e=void 0;else switch(e&&(s.push(-5),e=void 0),u<d&&(s.push(o.slice(u,d)),t+=d-u),f){case 0:s.push(65533),t++;break;case 9:for(c=4*Math.ceil(t/4),s.push(-2);t++<c;)s.push(-1);break;case 10:s.push(-4),t=1;break;default:e=!0,t=1}u=d+1}return a&&(e&&s.push(-5),n&&s.push(n),s.push(null)),s}}()(e,t,!0))))}function mm(e){return{line:e.line,column:e.column,offset:e.offset}}function gm(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?gm(e,r):ym(e,r)}}function ym(e,t){let n;for(n in t)if(pm.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function vm(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+np({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+np({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+np({start:t.start,end:t.end})+") is still open")}function bm(e){const t=this;t.parser=function(n){return hm(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function xm(e,t){const n=t.referenceType;let r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),i=o[0];i&&"text"===i.type?i.value="["+i.value:o.unshift({type:"text",value:"["});const a=o[o.length-1];return a&&"text"===a.type?a.value+=r:o.push({type:"text",value:r}),o}function wm(e){const t=e.spread;return null==t?e.children.length>1:t}function km(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const i=[];for(;r;)i.push(Sm(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return i.push(Sm(t.slice(o),o>0,!1)),i.join("")}function Sm(e,t,n){let r=0,o=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(o-1);for(;9===t||32===t;)o--,t=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}const Em={blockquote:function(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)},break:function(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){const n=t.value?t.value+"\n":"",r={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(r.className=["language-"+o[0]]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i},delete:function(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){const n="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=Gp(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let a,s=e.footnoteCounts.get(r);void 0===s?(s=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=i+1,s+=1,e.footnoteCounts.set(r,s);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)},heading:function(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return xm(e,t);const o={src:Gp(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(o.title=r.title);const i={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,i),e.applyData(t,i)},image:function(e,t){const n={src:Gp(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)},linkReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return xm(e,t);const o={href:Gp(r.url||"")};null!==r.title&&void 0!==r.title&&(o.title=r.title);const i={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)},link:function(e,t){const n={href:Gp(t.url)};null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},listItem:function(e,t,n){const r=e.all(t),o=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=wm(n[r])}return t}(n):wm(t),i={},a=[];if("boolean"==typeof t.checked){const e=r[0];let n;e&&"element"===e.type&&"p"===e.tagName?n=e:(n={type:"element",tagName:"p",properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:"text",value:" "}),n.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const e=r[s];(o||0!==s||"element"!==e.type||"p"!==e.tagName)&&a.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||o?a.push(e):a.push(...e.children)}const l=r[r.length-1];l&&(o||"element"!==l.type||"p"!==l.tagName)&&a.push({type:"text",value:"\n"});const c={type:"element",tagName:"li",properties:i,children:a};return e.patch(t,c),e.applyData(t,c)},list:function(e,t){const n={},r=e.all(t);let o=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++o<r.length;){const e=r[o];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)},paragraph:function(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),o.push(n)}if(n.length>0){const r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},i=ep(t.children[1]),a=Zf(t.children[t.children.length-1]);i&&a&&(r.position={start:i,end:a}),o.push(r)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,i),e.applyData(t,i)},tableCell:function(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){const r=n?n.children:void 0,o=0===(r?r.indexOf(t):1)?"th":"td",i=n&&"table"===n.type?n.align:void 0,a=i?i.length:t.children.length;let s=-1;const l=[];for(;++s<a;){const n=t.children[s],r={},a=i?i[s]:void 0;a&&(r.align=a);let c={type:"element",tagName:o,properties:r,children:[]};n&&(c.children=e.all(n),e.patch(n,c),c=e.applyData(n,c)),l.push(c)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,c),e.applyData(t,c)},text:function(e,t){const n={type:"text",value:km(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:Cm,yaml:Cm,definition:Cm,footnoteDefinition:Cm};function Cm(){}const Tm="object"==typeof self?self:globalThis,Pm=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new Tm[e](t)},Am=e=>((e,t)=>{const n=(t,n)=>(e.set(n,t),t),r=o=>{if(e.has(o))return e.get(o);const[i,a]=t[o];switch(i){case 0:case-1:return n(a,o);case 1:{const e=n([],o);for(const t of a)e.push(r(t));return e}case 2:{const e=n({},o);for(const[t,n]of a)e[r(t)]=r(n);return e}case 3:return n(new Date(a),o);case 4:{const{source:e,flags:t}=a;return n(new RegExp(e,t),o)}case 5:{const e=n(new Map,o);for(const[t,n]of a)e.set(r(t),r(n));return e}case 6:{const e=n(new Set,o);for(const t of a)e.add(r(t));return e}case 7:{const{name:e,message:t}=a;return n(Pm(e,t),o)}case 8:return n(BigInt(a),o);case"BigInt":return n(Object(BigInt(a)),o);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:e}=new Uint8Array(a);return n(new DataView(e),a)}}return n(Pm(i,a),o)};return r})(new Map,e)(0),jm="",{toString:Nm}={},{keys:Rm}=Object,Lm=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=Nm.call(e).slice(8,-1);switch(n){case"Array":return[1,jm];case"Object":return[2,jm];case"Date":return[3,jm];case"RegExp":return[4,jm];case"Map":return[5,jm];case"Set":return[6,jm];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},Om=([e,t])=>0===e&&("function"===t||"symbol"===t),Dm=(e,{json:t,lossy:n}={})=>{const r=[];return((e,t,n,r)=>{const o=(e,t)=>{const o=r.push(e)-1;return n.set(t,o),o},i=r=>{if(n.has(r))return n.get(r);let[a,s]=Lm(r);switch(a){case 0:{let t=r;switch(s){case"bigint":a=8,t=r.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+s);t=null;break;case"undefined":return o([-1],r)}return o([a,t],r)}case 1:{if(s){let e=r;return"DataView"===s?e=new Uint8Array(r.buffer):"ArrayBuffer"===s&&(e=new Uint8Array(r)),o([s,[...e]],r)}const e=[],t=o([a,e],r);for(const n of r)e.push(i(n));return t}case 2:{if(s)switch(s){case"BigInt":return o([s,r.toString()],r);case"Boolean":case"Number":case"String":return o([s,r.valueOf()],r)}if(t&&"toJSON"in r)return i(r.toJSON());const n=[],l=o([a,n],r);for(const t of Rm(r))!e&&Om(Lm(r[t]))||n.push([i(t),i(r[t])]);return l}case 3:return o([a,r.toISOString()],r);case 4:{const{source:e,flags:t}=r;return o([a,{source:e,flags:t}],r)}case 5:{const t=[],n=o([a,t],r);for(const[o,a]of r)(e||!Om(Lm(o))&&!Om(Lm(a)))&&t.push([i(o),i(a)]);return n}case 6:{const t=[],n=o([a,t],r);for(const o of r)!e&&Om(Lm(o))||t.push(i(o));return n}}const{message:l}=r;return o([a,{name:s,message:l}],r)};return i})(!(t||n),!!t,new Map,r)(e),r},_m="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?Am(Dm(e,t)):structuredClone(e):(e,t)=>Am(Dm(e,t));function Mm(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function zm(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const Fm=function(e){if(null==e)return Bm;if("function"==typeof e)return Im(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Fm(e[n]);return Im(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}(e):function(e){const t=e;return Im(n);function n(n){const r=n;let o;for(o in e)if(r[o]!==t[o])return!1;return!0}}(e);if("string"==typeof e)return function(e){return Im(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function Im(e){return function(t,n,r){return Boolean(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function Bm(){return!0}const Vm=[],Um=!0,Hm=!1;function $m(e,t,n,r){let o;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):o=t;const i=Fm(o),a=r?-1:1;!function e(o,s,l){const c=o&&"object"==typeof o?o:{};if("string"==typeof c.type){const e="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0;Object.defineProperty(u,"name",{value:"node ("+o.type+(e?"<"+e+">":"")+")"})}return u;function u(){let c,u,d,f=Vm;if((!t||i(o,s,l[l.length-1]||void 0))&&(f=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[Um,e];return null==e?Vm:[e]}(n(o,l)),f[0]===Hm))return f;if("children"in o&&o.children){const t=o;if(t.children&&"skip"!==f[0])for(u=(r?t.children.length:-1)+a,d=l.concat(t);u>-1&&u<t.children.length;){const n=t.children[u];if(c=e(n,u,d)(),c[0]===Hm)return c;u="number"==typeof c[1]?c[1]:u+a}}return f}}(e,void 0,[])()}function qm(e,t,n,r){let o,i,a;"function"==typeof t&&"function"!=typeof n?(i=void 0,a=t,o=n):(i=t,a=n,o=r),$m(e,i,function(e,t){const n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return a(e,r,n)},o)}const Wm={}.hasOwnProperty,Km={};function Ym(e,t){e.position&&(t.position=function(e){const t=ep(e),n=Zf(e);if(t&&n)return{start:t,end:n}}(e))}function Qm(e,t){let n=t;if(e&&e.data){const t=e.data.hName,r=e.data.hChildren,o=e.data.hProperties;if("string"==typeof t)if("element"===n.type)n.tagName=t;else{n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}}"element"===n.type&&o&&Object.assign(n.properties,_m(o)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function Xm(e,t){const n=t.data||{},r=!("value"in t)||Wm.call(n,"hProperties")||Wm.call(n,"hChildren")?{type:"element",tagName:"div",properties:{},children:e.all(t)}:{type:"text",value:t.value};return e.patch(t,r),e.applyData(t,r)}function Gm(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function Jm(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function Zm(e,t){const n=function(e,t){const n=t||Km,r=new Map,o=new Map,i=new Map,a={...Em,...n.handlers},s={all:function(e){const t=[];if("children"in e){const n=e.children;let r=-1;for(;++r<n.length;){const o=s.one(n[r],e);if(o){if(r&&"break"===n[r-1].type&&(Array.isArray(o)||"text"!==o.type||(o.value=Jm(o.value)),!Array.isArray(o)&&"element"===o.type)){const e=o.children[0];e&&"text"===e.type&&(e.value=Jm(e.value))}Array.isArray(o)?t.push(...o):t.push(o)}}}return t},applyData:Qm,definitionById:r,footnoteById:o,footnoteCounts:i,footnoteOrder:[],handlers:a,one:function(e,t){const n=e.type,r=s.handlers[n];if(Wm.call(s.handlers,n)&&r)return r(s,e,t);if(s.options.passThrough&&s.options.passThrough.includes(n)){if("children"in e){const{children:t,...n}=e,r=_m(n);return r.children=s.all(e),r}return _m(e)}return(s.options.unknownHandler||Xm)(s,e,t)},options:n,patch:Ym,wrap:Gm};return qm(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){const t="definition"===e.type?r:o,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),s}(e,t),r=n.one(e,void 0),o=function(e){const t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Mm,r=e.options.footnoteBackLabel||zm,o=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l<e.footnoteOrder.length;){const o=e.footnoteById.get(e.footnoteOrder[l]);if(!o)continue;const i=e.all(o),a=String(o.identifier).toUpperCase(),c=Gp(a.toLowerCase());let u=0;const d=[],f=e.footnoteCounts.get(a);for(;void 0!==f&&++u<=f;){d.length>0&&d.push({type:"text",value:" "});let e="string"==typeof n?n:n(l,u);"string"==typeof e&&(e={type:"text",value:e}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+c+(u>1?"-"+u:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(l,u),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const p=i[i.length-1];if(p&&"element"===p.type&&"p"===p.tagName){const e=p.children[p.children.length-1];e&&"text"===e.type?e.value+=" ":p.children.push({type:"text",value:" "}),p.children.push(...d)}else i.push(...d);const h={type:"element",tagName:"li",properties:{id:t+"fn-"+c},children:e.wrap(i,!0)};e.patch(o,h),s.push(h)}if(0!==s.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{..._m(a),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:"\n"}]}}(n),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&i.children.push({type:"text",value:"\n"},o),i}function eg(e,t){return e&&"run"in e?async function(n,r){const o=Zm(n,{file:r,...t});await e.run(o,r)}:function(n,r){return Zm(n,{file:r,...e||t})}}function tg(e){if(e)throw e}var ng,rg;var og=function(){if(rg)return ng;rg=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},i=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,o=e.call(n,"constructor"),i=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!o&&!i)return!1;for(r in n);return void 0===r||e.call(n,r)},a=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},s=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return ng=function e(){var t,n,r,l,c,u,d=arguments[0],f=1,p=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<p;++f)if(null!=(t=arguments[f]))for(n in t)r=s(d,n),d!==(l=s(t,n))&&(h&&l&&(i(l)||(c=o(l)))?(c?(c=!1,u=r&&o(r)?r:[]):u=r&&i(r)?r:{},a(d,{name:n,newValue:e(h,u,l)})):void 0!==l&&a(d,{name:n,newValue:l}));return d},ng}();const ig=r(og);function ag(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function sg(){const e=[],t={run:function(...t){let n=-1;const r=t.pop();if("function"!=typeof r)throw new TypeError("Expected function as last argument, not "+r);!function o(i,...a){const s=e[++n];let l=-1;if(i)r(i);else{for(;++l<t.length;)null!==a[l]&&void 0!==a[l]||(a[l]=t[l]);t=a,s?function(e,t){let n;return r;function r(...t){const r=e.length>t.length;let s;r&&t.push(o);try{s=e.apply(this,t)}catch(i){if(r&&n)throw i;return o(i)}r||(s&&s.then&&"function"==typeof s.then?s.then(a,o):s instanceof Error?o(s):a(s))}function o(e,...r){n||(n=!0,t(e,...r))}function a(e){o(null,e)}}(s,o)(...a):r(null,...a)}}(null,...t)},use:function(n){if("function"!=typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}const lg={basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');cg(e);let n,r=0,o=-1,i=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;i--;)if(47===e.codePointAt(i)){if(n){r=i+1;break}}else o<0&&(n=!0,o=i+1);return o<0?"":e.slice(r,o)}if(t===e)return"";let a=-1,s=t.length-1;for(;i--;)if(47===e.codePointAt(i)){if(n){r=i+1;break}}else a<0&&(n=!0,a=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(o=i):(s=-1,o=a));r===o?o=a:o<0&&(o=e.length);return e.slice(r,o)},dirname:function(e){if(cg(e),0===e.length)return".";let t,n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},extname:function(e){cg(e);let t,n=e.length,r=-1,o=0,i=-1,a=0;for(;n--;){const s=e.codePointAt(n);if(47!==s)r<0&&(t=!0,r=n+1),46===s?i<0?i=n:1!==a&&(a=1):i>-1&&(a=-1);else if(t){o=n+1;break}}if(i<0||r<0||0===a||1===a&&i===r-1&&i===o+1)return"";return e.slice(i,r)},join:function(...e){let t,n=-1;for(;++n<e.length;)cg(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){cg(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,o="",i=0,a=-1,s=0,l=-1;for(;++l<=e.length;){if(l<e.length)n=e.codePointAt(l);else{if(47===n)break;n=47}if(47===n){if(a===l-1||1===s);else if(a!==l-1&&2===s){if(o.length<2||2!==i||46!==o.codePointAt(o.length-1)||46!==o.codePointAt(o.length-2))if(o.length>2){if(r=o.lastIndexOf("/"),r!==o.length-1){r<0?(o="",i=0):(o=o.slice(0,r),i=o.length-1-o.lastIndexOf("/")),a=l,s=0;continue}}else if(o.length>0){o="",i=0,a=l,s=0;continue}t&&(o=o.length>0?o+"/..":"..",i=2)}else o.length>0?o+="/"+e.slice(a+1,l):o=e.slice(a+1,l),i=l-a-1;a=l,s=0}else 46===n&&s>-1?s++:s=-1}return o}(e,!t);0!==n.length||t||(n=".");n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/");return t?"/"+n:n}(t)},sep:"/"};function cg(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const ug={cwd:function(){return"/"}};function dg(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function fg(e){if("string"==typeof e)e=new URL(e);else if(!dg(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("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){const e=t.codePointAt(n+2);if(70===e||102===e){const e=new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}const pg=["history","path","basename","stem","extname","dirname"];class hg{constructor(e){let t;t=e?dg(e)?{path:e}:"string"==typeof e||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":ug.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n,r=-1;for(;++r<pg.length;){const e=pg[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)pg.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?lg.basename(this.path):void 0}set basename(e){gg(e,"basename"),mg(e,"basename"),this.path=lg.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?lg.dirname(this.path):void 0}set dirname(e){yg(this.basename,"dirname"),this.path=lg.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?lg.extname(this.path):void 0}set extname(e){if(mg(e,"extname"),yg(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=lg.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){dg(e)&&(e=fg(e)),gg(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?lg.basename(this.path,this.extname):void 0}set stem(e){gg(e,"stem"),mg(e,"stem"),this.path=lg.join(this.dirname||"",e+(this.extname||""))}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){const r=new ap(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){if(void 0===this.value)return"";if("string"==typeof this.value)return this.value;return new TextDecoder(e||void 0).decode(this.value)}}function mg(e,t){if(e&&e.includes(lg.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+lg.sep+"`")}function gg(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function yg(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const vg=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},bg={}.hasOwnProperty;class xg extends vg{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=sg()}copy(){const e=new xg;let t=-1;for(;++t<this.attachers.length;){const n=this.attachers[t];e.use(...n)}return e.data(ig(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?(Eg("data",this.frozen),this.namespace[e]=t,this):bg.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Eg("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...n]=this.attachers[this.freezeIndex];if(!1===n[0])continue;!0===n[0]&&(n[0]=void 0);const r=t.call(e,...n);"function"==typeof r&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const t=Pg(e),n=this.parser||this.Parser;return kg("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),kg("process",this.parser||this.Parser),Sg("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,o){const i=Pg(e),a=n.parse(i);function s(e,n){e||!n?o(e):r?r(n):t(void 0,n)}n.run(a,i,function(e,t,r){if(e||!t||!r)return s(e);const o=t,i=n.stringify(o,r);var a;"string"==typeof(a=i)||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(a)?r.value=i:r.result=i,s(e,r)})}}processSync(e){let t,n=!1;return this.freeze(),kg("processSync",this.parser||this.Parser),Sg("processSync",this.compiler||this.Compiler),this.process(e,function(e,r){n=!0,tg(e),t=r}),Tg("processSync","process",n),t}run(e,t,n){Cg(e),this.freeze();const r=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?o(void 0,n):new Promise(o);function o(o,i){const a=Pg(t);r.run(e,a,function(t,r,a){const s=r||e;t?i(t):o?o(s):n(void 0,s,a)})}}runSync(e,t){let n,r=!1;return this.run(e,t,function(e,t){tg(e),n=t,r=!0}),Tg("runSync","run",r),n}stringify(e,t){this.freeze();const n=Pg(t),r=this.compiler||this.Compiler;return Sg("stringify",r),Cg(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(Eg("use",this.frozen),null==e);else if("function"==typeof e)s(e,t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?a(e):i(e)}return this;function o(e){if("function"==typeof e)s(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;s(t,n)}else i(e)}}function i(e){if(!("plugins"in e)&&!("settings"in e))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");a(e.plugins),e.settings&&(r.settings=ig(!0,r.settings,e.settings))}function a(e){let t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;){o(e[t])}}}function s(e,t){let r=-1,o=-1;for(;++r<n.length;)if(n[r][0]===e){o=r;break}if(-1===o)n.push([e,...t]);else if(t.length>0){let[r,...i]=t;const a=n[o][1];ag(a)&&ag(r)&&(r=ig(!0,a,r)),n[o]=[e,r,...i]}}}}const wg=(new xg).freeze();function kg(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function Sg(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function Eg(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 Cg(e){if(!ag(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function Tg(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Pg(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new hg(e)}const Ag=[],jg={allowDangerousHtml:!0},Ng=/^(https?|ircs?|mailto|xmpp)$/i,Rg=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Lg(e){const t=function(e){const t=e.rehypePlugins||Ag,n=e.remarkPlugins||Ag,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...jg}:jg,o=wg().use(bm).use(n).use(eg,r).use(t);return o}(e),n=function(e){const t=e.children||"",n=new hg;"string"==typeof t&&(n.value=t);return n}(e);return function(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,i=t.disallowedElements,a=t.skipHtml,s=t.unwrapDisallowed,l=t.urlTransform||Og;for(const u of Rg)Object.hasOwn(t,u.from)&&ef((u.from,u.to&&u.to,u.id));t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:"root"===e.type?e.children:[e]});return qm(e,c),pp(e,{Fragment:$.Fragment,components:o,ignoreInvalidStyle:!0,jsx:$.jsx,jsxs:$.jsxs,passKeys:!0,passNode:!0});function c(e,t,o){if("raw"===e.type&&o&&"number"==typeof t)return a?o.children.splice(t,1):o.children[t]={type:"text",value:e.value},t;if("element"===e.type){let t;for(t in Sp)if(Object.hasOwn(Sp,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=Sp[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=l(String(n||""),t,e))}}if("element"===e.type){let a=n?!n.includes(e.tagName):!!i&&i.includes(e.tagName);if(!a&&r&&"number"==typeof t&&(a=!r(e,t,o)),a&&o&&"number"==typeof t)return s&&e.children?o.children.splice(t,1,...e.children):o.children.splice(t,1),t}}}(t.runSync(t.parse(n),n),e)}function Og(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return-1===t||-1!==o&&t>o||-1!==n&&t>n||-1!==r&&t>r||Ng.test(e.slice(0,t))?e:""}function Dg(e,t){const n=String(e);if("string"!=typeof t)throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;-1!==o;)r++,o=n.indexOf(t,o+t.length);return r}function _g(e,t,n){const r=Fm((n||{}).ignore||[]),o=function(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const e=n[r];t.push([Mg(e[0]),zg(e[1])])}return t}(t);let i=-1;for(;++i<o.length;)$m(e,"text",a);function a(e,t){let n,a=-1;for(;++a<t.length;){const e=t[a],o=n?n.children:void 0;if(r(e,o?o.indexOf(e):void 0,n))return;n=e}if(n)return function(e,t){const n=t[t.length-1],r=o[i][0],a=o[i][1];let s=0;const l=n.children.indexOf(e);let c=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){const n=d.index,o={index:d.index,input:d.input,stack:[...t,e]};let i=a(...d,o);if("string"==typeof i&&(i=i.length>0?{type:"text",value:i}:void 0),!1===i?r.lastIndex=n+1:(s!==n&&u.push({type:"text",value:e.value.slice(s,n)}),Array.isArray(i)?u.push(...i):i&&u.push(i),s=n+d[0].length,c=!0),!r.global)break;d=r.exec(e.value)}c?(s<e.value.length&&u.push({type:"text",value:e.value.slice(s)}),n.children.splice(l,1,...u)):u=[e];return l+u.length}(e,t)}}function Mg(e){return"string"==typeof e?new RegExp(function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e),"g"):e}function zg(e){return"function"==typeof e?e:function(){return e}}const Fg="phrasing",Ig=["autolink","link","image","label"];function Bg(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Vg(e){this.config.enter.autolinkProtocol.call(this,e)}function Ug(e){this.config.exit.autolinkProtocol.call(this,e)}function Hg(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 $g(e){this.config.exit.autolinkEmail.call(this,e)}function qg(e){this.exit(e)}function Wg(e){_g(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Kg],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Yg]],{ignore:["link","linkReference"]})}function Kg(e,t,n,r,o){let i="";if(!Qg(o))return!1;if(/^w/i.test(t)&&(n=t+n,t="",i="http://"),!function(e){const t=e.split(".");if(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])))return!1;return!0}(n))return!1;const a=function(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const o=Dg(e,"(");let i=Dg(e,")");for(;-1!==r&&o>i;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),i++;return[e,n]}(n+r);if(!a[0])return!1;const s={type:"link",title:null,url:i+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function Yg(e,t,n,r){return!(!Qg(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Qg(e,t){const n=e.input.charCodeAt(e.index-1);return(0===e.index||Qp(n)||Yp(n))&&(!t||47!==n)}function Xg(){this.buffer()}function Gg(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Jg(){this.buffer()}function Zg(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function ey(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=zp(this.sliceSerialize(e)).toLowerCase(),n.label=t}function ty(e){this.exit(e)}function ny(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=zp(this.sliceSerialize(e)).toLowerCase(),n.label=t}function ry(e){this.exit(e)}function oy(e,t,n,r){const o=n.createTracker(r);let i=o.move("[^");const a=n.enter("footnoteReference"),s=n.enter("reference");return i+=o.move(n.safe(n.associationId(e),{after:"]",before:i})),s(),a(),i+=o.move("]"),i}function iy(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:function(e,n,r,o){const i=r.createTracker(o);let a=i.move("[^");const s=r.enter("footnoteDefinition"),l=r.enter("label");a+=i.move(r.safe(r.associationId(e),{before:a,after:"]"})),l(),a+=i.move("]:"),e.children&&e.children.length>0&&(i.shift(4),a+=i.move((t?"\n":" ")+r.indentLines(r.containerFlow(e,i.current()),t?sy:ay)));return s(),a},footnoteReference:oy},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}}function ay(e,t,n){return 0===t?e:sy(e,t,n)}function sy(e,t,n){return(n?"":" ")+e}oy.peek=function(){return"["};const ly=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function cy(e){this.enter({type:"delete",children:[]},e)}function uy(e){this.exit(e)}function dy(e,t,n,r){const o=n.createTracker(r),i=n.enter("strikethrough");let a=o.move("~~");return a+=n.containerPhrasing(e,{...o.current(),before:a,after:"~"}),a+=o.move("~~"),i(),a}function fy(e){return e.length}function py(e){return null==e?"":String(e)}function hy(e){const t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:82===t||114===t?114:0}function my(e,t,n){return">"+(n?"":" ")+e}function gy(e,t){return yy(e,t.inConstruct,!0)&&!yy(e,t.notInConstruct,!1)}function yy(e,t,n){if("string"==typeof t&&(t=[t]),!t||0===t.length)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function vy(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if("\n"===n.unsafe[o].character&&gy(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return"\\\n"}function by(e,t,n){return(n?"":" ")+e}function xy(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 wy(e){return"&#x"+e.toString(16).toUpperCase()+";"}function ky(e,t,n){const r=nh(e),o=nh(t);return void 0===r?void 0===o?"_"===n?{inside:!0,outside:!0}:{inside:!1,outside:!1}:1===o?{inside:!0,outside:!0}:{inside:!1,outside:!0}:1===r?void 0===o?{inside:!1,outside:!1}:1===o?{inside:!0,outside:!0}:{inside:!1,outside:!1}:void 0===o?{inside:!1,outside:!1}:1===o?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function Sy(e,t,n,r){const o=function(e){const t=e.options.emphasis||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}(n),i=n.enter("emphasis"),a=n.createTracker(r),s=a.move(o);let l=a.move(n.containerPhrasing(e,{after:o,before:s,...a.current()}));const c=l.charCodeAt(0),u=ky(r.before.charCodeAt(r.before.length-1),c,o);u.inside&&(l=wy(c)+l.slice(1));const d=l.charCodeAt(l.length-1),f=ky(r.after.charCodeAt(0),d,o);f.inside&&(l=l.slice(0,-1)+wy(d));const p=a.move(o);return i(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+l+p}function Ey(e){return e.value||""}function Cy(e,t,n,r){const o=xy(n),i='"'===o?"Quote":"Apostrophe",a=n.enter("image");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${i}`),c+=l.move(" "+o),c+=l.move(n.safe(e.title,{before:c,after:o,...l.current()})),c+=l.move(o),s()),c+=l.move(")"),a(),c}function Ty(e,t,n,r){const o=e.referenceType,i=n.enter("imageReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("![");const c=n.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),a();const u=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=u,i(),"full"!==o&&c&&c===d?"shortcut"===o?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function Py(e,t,n){let r=e.value||"",o="`",i=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++i<n.unsafe.length;){const e=n.unsafe[i],t=n.compilePattern(e);let o;if(e.atBreak)for(;o=t.exec(r);){let e=o.index;10===r.charCodeAt(e)&&13===r.charCodeAt(e-1)&&e--,r=r.slice(0,e)+" "+r.slice(o.index+1)}}return o+r+o}function Ay(e,t){const n=Cp(e);return Boolean(!t.options.resourceLink&&e.url&&!e.title&&e.children&&1===e.children.length&&"text"===e.children[0].type&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}function jy(e,t,n,r){const o=xy(n),i='"'===o?"Quote":"Apostrophe",a=n.createTracker(r);let s,l;if(Ay(e,n)){const t=n.stack;n.stack=[],s=n.enter("autolink");let r=a.move("<");return r+=a.move(n.containerPhrasing(e,{before:r,after:">",...a.current()})),r+=a.move(">"),s(),n.stack=t,r}s=n.enter("link"),l=n.enter("label");let c=a.move("[");return c+=a.move(n.containerPhrasing(e,{before:c,after:"](",...a.current()})),c+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(n.safe(e.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(l=n.enter("destinationRaw"),c+=a.move(n.safe(e.url,{before:c,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${i}`),c+=a.move(" "+o),c+=a.move(n.safe(e.title,{before:c,after:o,...a.current()})),c+=a.move(o),l()),c+=a.move(")"),s(),c}function Ny(e,t,n,r){const o=e.referenceType,i=n.enter("linkReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),a();const u=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=u,i(),"full"!==o&&c&&c===d?"shortcut"===o?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function Ry(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 Ly(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}dy.peek=function(){return"~"},Sy.peek=function(e,t,n){return n.options.emphasis||"*"},Ey.peek=function(){return"<"},Cy.peek=function(){return"!"},Ty.peek=function(){return"!"},Py.peek=function(){return"`"},jy.peek=function(e,t,n){return Ay(e,n)?"<":"["},Ny.peek=function(){return"["};const Oy=Fm(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Dy(e,t,n,r){const o=function(e){const t=e.options.strong||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}(n),i=n.enter("strong"),a=n.createTracker(r),s=a.move(o+o);let l=a.move(n.containerPhrasing(e,{after:o,before:s,...a.current()}));const c=l.charCodeAt(0),u=ky(r.before.charCodeAt(r.before.length-1),c,o);u.inside&&(l=wy(c)+l.slice(1));const d=l.charCodeAt(l.length-1),f=ky(r.after.charCodeAt(0),d,o);f.inside&&(l=l.slice(0,-1)+wy(d));const p=a.move(o+o);return i(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+l+p}Dy.peek=function(e,t,n){return n.options.strong||"*"};const _y={blockquote:function(e,t,n,r){const o=n.enter("blockquote"),i=n.createTracker(r);i.move("> "),i.shift(2);const a=n.indentLines(n.containerFlow(e,i.current()),my);return o(),a},break:vy,code:function(e,t,n,r){const o=function(e){const t=e.options.fence||"`";if("`"!==t&&"~"!==t)throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}(n),i=e.value||"",a="`"===o?"GraveAccent":"Tilde";if(function(e,t){return Boolean(!1===t.options.fences&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}(e,n)){const e=n.enter("codeIndented"),t=n.indentLines(i,by);return e(),t}const s=n.createTracker(r),l=o.repeat(Math.max(function(e,t){const n=String(e);let r=n.indexOf(t),o=r,i=0,a=0;if("string"!=typeof t)throw new TypeError("Expected substring");for(;-1!==r;)r===o?++i>a&&(a=i):i=1,o=r+t.length,r=n.indexOf(t,o);return a}(i,o)+1,3)),c=n.enter("codeFenced");let u=s.move(l);if(e.lang){const t=n.enter(`codeFencedLang${a}`);u+=s.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){const t=n.enter(`codeFencedMeta${a}`);u+=s.move(" "),u+=s.move(n.safe(e.meta,{before:u,after:"\n",encode:["`"],...s.current()})),t()}return u+=s.move("\n"),i&&(u+=s.move(i+"\n")),u+=s.move(l),c(),u},definition:function(e,t,n,r){const o=xy(n),i='"'===o?"Quote":"Apostrophe",a=n.enter("definition");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("[");return c+=l.move(n.safe(n.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":"\n",...l.current()}))),s(),e.title&&(s=n.enter(`title${i}`),c+=l.move(" "+o),c+=l.move(n.safe(e.title,{before:c,after:o,...l.current()})),c+=l.move(o),s()),a(),c},emphasis:Sy,hardBreak:vy,heading:function(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),i=n.createTracker(r);if(function(e,t){let n=!1;return qm(e,function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return n=!0,Hm}),Boolean((!e.depth||e.depth<3)&&Cp(e)&&(t.options.setext||n))}(e,n)){const t=n.enter("headingSetext"),r=n.enter("phrasing"),a=n.containerPhrasing(e,{...i.current(),before:"\n",after:"\n"});return r(),t(),a+"\n"+(1===o?"=":"-").repeat(a.length-(Math.max(a.lastIndexOf("\r"),a.lastIndexOf("\n"))+1))}const a="#".repeat(o),s=n.enter("headingAtx"),l=n.enter("phrasing");i.move(a+" ");let c=n.containerPhrasing(e,{before:"# ",after:"\n",...i.current()});return/^[\t ]/.test(c)&&(c=wy(c.charCodeAt(0))+c.slice(1)),c=c?a+" "+c:a,n.options.closeAtx&&(c+=" "+a),l(),s(),c},html:Ey,image:Cy,imageReference:Ty,inlineCode:Py,link:jy,linkReference:Ny,list:function(e,t,n,r){const o=n.enter("list"),i=n.bulletCurrent;let a=e.ordered?function(e){const t=e.options.bulletOrdered||".";if("."!==t&&")"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}(n):Ry(n);const s=e.ordered?"."===a?")":".":function(e){const t=Ry(e),n=e.options.bulletOther;if(!n)return"*"===t?"-":"*";if("*"!==n&&"+"!==n&&"-"!==n)throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}(n);let l=!(!t||!n.bulletLastUsed)&&a===n.bulletLastUsed;if(!e.ordered){const t=e.children?e.children[0]:void 0;if("*"!==a&&"-"!==a||!t||t.children&&t.children[0]||"list"!==n.stack[n.stack.length-1]||"listItem"!==n.stack[n.stack.length-2]||"list"!==n.stack[n.stack.length-3]||"listItem"!==n.stack[n.stack.length-4]||0!==n.indexStack[n.indexStack.length-1]||0!==n.indexStack[n.indexStack.length-2]||0!==n.indexStack[n.indexStack.length-3]||(l=!0),Ly(n)===a&&t){let t=-1;for(;++t<e.children.length;){const n=e.children[t];if(n&&"listItem"===n.type&&n.children&&n.children[0]&&"thematicBreak"===n.children[0].type){l=!0;break}}}}l&&(a=s),n.bulletCurrent=a;const c=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=i,o(),c},listItem:function(e,t,n,r){const o=function(e){const t=e.options.listItemIndent||"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(n);let i=n.bulletCurrent||Ry(n);t&&"list"===t.type&&t.ordered&&(i=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+i);let a=i.length+1;("tab"===o||"mixed"===o&&(t&&"list"===t.type&&t.spread||e.spread))&&(a=4*Math.ceil(a/4));const s=n.createTracker(r);s.move(i+" ".repeat(a-i.length)),s.shift(a);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,s.current()),function(e,t,n){if(t)return(n?"":" ".repeat(a))+e;return(n?i:i+" ".repeat(a-i.length))+e});return l(),c},paragraph:function(e,t,n,r){const o=n.enter("paragraph"),i=n.enter("phrasing"),a=n.containerPhrasing(e,r);return i(),o(),a},root:function(e,t,n,r){return(e.children.some(function(e){return Oy(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)},strong:Dy,text:function(e,t,n,r){return n.safe(e.value,r)},thematicBreak:function(e,t,n){const r=(Ly(n)+(n.options.ruleSpaces?" ":"")).repeat(function(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}(n));return n.options.ruleSpaces?r.slice(0,-1):r}};function My(e){const t=e._align;this.enter({type:"table",align:t.map(function(e){return"none"===e?null:e}),children:[]},e),this.data.inTable=!0}function zy(e){this.exit(e),this.data.inTable=void 0}function Fy(e){this.enter({type:"tableRow",children:[]},e)}function Iy(e){this.exit(e)}function By(e){this.enter({type:"tableCell",children:[]},e)}function Vy(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Uy));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Uy(e,t){return"|"===t?t:e}function Hy(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,i=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,n){let r=_y.inlineCode(e,t,n);n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&"));return r},table:function(e,t,n,r){return s(function(e,t,n){const r=e.children;let o=-1;const i=[],a=t.enter("table");for(;++o<r.length;)i[o]=l(r[o],t,n);return a(),i}(e,n,r),e.align)},tableCell:a,tableRow:function(e,t,n,r){const o=s([l(e,n,r)]);return o.slice(0,o.indexOf("\n"))}}};function a(e,t,n,r){const o=n.enter("tableCell"),a=n.enter("phrasing"),s=n.containerPhrasing(e,{...r,before:i,after:i});return a(),o(),s}function s(e,t){return function(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||fy,i=[],a=[],s=[],l=[];let c=0,u=-1;for(;++u<e.length;){const t=[],r=[];let i=-1;for(e[u].length>c&&(c=e[u].length);++i<e[u].length;){const a=py(e[u][i]);if(!1!==n.alignDelimiters){const e=o(a);r[i]=e,(void 0===l[i]||e>l[i])&&(l[i]=e)}t.push(a)}a[u]=t,s[u]=r}let d=-1;if("object"==typeof r&&"length"in r)for(;++d<c;)i[d]=hy(r[d]);else{const e=hy(r);for(;++d<c;)i[d]=e}d=-1;const f=[],p=[];for(;++d<c;){const e=i[d];let t="",r="";99===e?(t=":",r=":"):108===e?t=":":114===e&&(r=":");let o=!1===n.alignDelimiters?1:Math.max(1,l[d]-t.length-r.length);const a=t+"-".repeat(o)+r;!1!==n.alignDelimiters&&(o=t.length+o+r.length,o>l[d]&&(l[d]=o),p[d]=o),f[d]=a}a.splice(1,0,f),s.splice(1,0,p),u=-1;const h=[];for(;++u<a.length;){const e=a[u],t=s[u];d=-1;const r=[];for(;++d<c;){const o=e[d]||"";let a="",s="";if(!1!==n.alignDelimiters){const e=l[d]-(t[d]||0),n=i[d];114===n?a=" ".repeat(e):99===n?e%2?(a=" ".repeat(e/2+.5),s=" ".repeat(e/2-.5)):(a=" ".repeat(e/2),s=a):s=" ".repeat(e)}!1===n.delimiterStart||d||r.push("|"),!1===n.padding||!1===n.alignDelimiters&&""===o||!1===n.delimiterStart&&!d||r.push(" "),!1!==n.alignDelimiters&&r.push(a),r.push(o),!1!==n.alignDelimiters&&r.push(s),!1!==n.padding&&r.push(" "),!1===n.delimiterEnd&&d===c-1||r.push("|")}h.push(!1===n.delimiterEnd?r.join("").replace(/ +$/,""):r.join(""))}return h.join("\n")}(e,{align:t,alignDelimiters:r,padding:n,stringLength:o})}function l(e,t,n){const r=e.children;let o=-1;const i=[],s=t.enter("tableRow");for(;++o<r.length;)i[o]=a(r[o],0,t,n);return s(),i}}function $y(e){const t=this.stack[this.stack.length-2];t.type,t.checked="taskListCheckValueChecked"===e.type}function qy(e){const t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){const e=this.stack[this.stack.length-1];e.type;const n=e.children[0];if(n&&"text"===n.type){const r=t.children;let o,i=-1;for(;++i<r.length;){const e=r[i];if("paragraph"===e.type){o=e;break}}o===e&&(n.value=n.value.slice(1),0===n.value.length?e.children.shift():e.position&&n.position&&"number"==typeof n.position.start.offset&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function Wy(e,t,n,r){const o=e.children[0],i="boolean"==typeof e.checked&&o&&"paragraph"===o.type,a="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);i&&s.move(a);let l=_y.listItem(e,t,n,{...r,...s.current()});return i&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,function(e){return e+a})),l}const Ky={tokenize:function(e,t,n){let r=0;return function t(i){if((87===i||119===i)&&r<3)return r++,e.consume(i),t;if(46===i&&3===r)return e.consume(i),o;return n(i)};function o(e){return null===e?n(e):t(e)}},partial:!0},Yy={tokenize:function(e,t,n){let r,o,i;return a;function a(t){return 46===t||95===t?e.check(Xy,l,s)(t):null===t||Wp(t)||Qp(t)||45!==t&&Yp(t)?l(t):(i=!0,e.consume(t),a)}function s(t){return 95===t?r=!0:(o=r,r=void 0),e.consume(t),a}function l(e){return o||r||!i?n(e):t(e)}},partial:!0},Qy={tokenize:function(e,t){let n=0,r=0;return o;function o(a){return 40===a?(n++,e.consume(a),o):41===a&&r<n?i(a):33===a||34===a||38===a||39===a||41===a||42===a||44===a||46===a||58===a||59===a||60===a||63===a||93===a||95===a||126===a?e.check(Xy,t,i)(a):null===a||Wp(a)||Qp(a)?t(a):(e.consume(a),o)}function i(t){return 41===t&&r++,e.consume(t),o}},partial:!0},Xy={tokenize:function(e,t,n){return r;function r(a){return 33===a||34===a||39===a||41===a||42===a||44===a||46===a||58===a||59===a||63===a||95===a||126===a?(e.consume(a),r):38===a?(e.consume(a),i):93===a?(e.consume(a),o):60===a||null===a||Wp(a)||Qp(a)?t(a):n(a)}function o(e){return null===e||40===e||91===e||Wp(e)||Qp(e)?t(e):r(e)}function i(e){return Fp(e)?a(e):n(e)}function a(t){return 59===t?(e.consume(t),r):Fp(t)?(e.consume(t),a):n(t)}},partial:!0},Gy={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return Ip(e)?n(e):t(e)}},partial:!0},Jy={name:"wwwAutolink",tokenize:function(e,t,n){const r=this;return function(t){if(87!==t&&119!==t||!rv.call(r,r.previous)||sv(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Ky,e.attempt(Yy,e.attempt(Qy,o),n),n)(t)};function o(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:rv},Zy={name:"protocolAutolink",tokenize:function(e,t,n){const r=this;let o="",i=!1;return function(t){if((72===t||104===t)&&ov.call(r,r.previous)&&!sv(r.events))return e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(t),e.consume(t),a;return n(t)};function a(t){if(Fp(t)&&o.length<5)return o+=String.fromCodePoint(t),e.consume(t),a;if(58===t){const n=o.toLowerCase();if("http"===n||"https"===n)return e.consume(t),s}return n(t)}function s(t){return 47===t?(e.consume(t),i?l:(i=!0,s)):n(t)}function l(t){return null===t||Vp(t)||Wp(t)||Qp(t)||Yp(t)?n(t):e.attempt(Yy,e.attempt(Qy,c),n)(t)}function c(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:ov},ev={name:"emailAutolink",tokenize:function(e,t,n){const r=this;let o,i;return function(t){if(!av(t)||!iv.call(r,r.previous)||sv(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(t)};function a(t){return av(t)?(e.consume(t),a):64===t?(e.consume(t),s):n(t)}function s(t){return 46===t?e.check(Gy,c,l)(t):45===t||95===t||Ip(t)?(i=!0,e.consume(t),s):c(t)}function l(t){return e.consume(t),o=!0,s}function c(a){return i&&o&&Fp(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(a)):n(a)}},previous:iv},tv={};let nv=48;for(;nv<123;)tv[nv]=ev,nv++,58===nv?nv=65:91===nv&&(nv=97);function rv(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||Wp(e)}function ov(e){return!Fp(e)}function iv(e){return!(47===e||av(e))}function av(e){return 43===e||45===e||46===e||95===e||Ip(e)}function sv(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if(("labelLink"===r.type||"labelImage"===r.type)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}tv[43]=ev,tv[45]=ev,tv[46]=ev,tv[95]=ev,tv[72]=[ev,Zy],tv[104]=[ev,Zy],tv[87]=[ev,Jy],tv[119]=[ev,Jy];const lv={tokenize:function(e,t,n){const r=this;return Jp(e,function(e){const o=r.events[r.events.length-1];return o&&"gfmFootnoteDefinitionIndent"===o[1].type&&4===o[2].sliceSerialize(o[1],!0).length?t(e):n(e)},"gfmFootnoteDefinitionIndent",5)},partial:!0};function cv(e,t,n){const r=this;let o=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;o--;){const e=r.events[o][1];if("labelImage"===e.type){a=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(o){if(!a||!a._balanced)return n(o);const s=zp(r.sliceSerialize({start:a.end,end:r.now()}));if(94!==s.codePointAt(0)||!i.includes(s.slice(1)))return n(o);return e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o)}}function uv(e,t){let n=e.length;for(;n--;)if("labelImage"===e[n][1].type&&"enter"===e[n][0]){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function dv(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,a=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),s};function s(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(s){if(a>999||93===s&&!i||null===s||91===s||Wp(s))return n(s);if(93===s){e.exit("chunkString");const i=e.exit("gfmFootnoteCallString");return o.includes(zp(r.sliceSerialize(i)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(s)}return Wp(s)||(i=!0),a++,e.consume(s),92===s?c:l}function c(t){return 91===t||92===t||93===t?(e.consume(t),a++,l):l(t)}}function fv(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,a,s=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),l};function l(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(t)}function c(t){if(s>999||93===t&&!a||null===t||91===t||Wp(t))return n(t);if(93===t){e.exit("chunkString");const n=e.exit("gfmFootnoteDefinitionLabelString");return i=zp(r.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return Wp(t)||(a=!0),s++,e.consume(t),92===t?u:c}function u(t){return 91===t||92===t||93===t?(e.consume(t),s++,c):c(t)}function d(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),o.includes(i)||o.push(i),Jp(e,f,"gfmFootnoteDefinitionWhitespace")):n(t)}function f(e){return t(e)}}function pv(e,t,n){return e.check(sh,t,e.attempt(lv,t,n))}function hv(e){e.exit("gfmFootnoteDefinition")}function mv(e){let t=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:function(e,n,r){const o=this.previous,i=this.events;let a=0;return function(t){if(126===o&&"characterEscape"!==i[i.length-1][1].type)return r(t);return e.enter("strikethroughSequenceTemporary"),s(t)};function s(i){const l=nh(o);if(126===i)return a>1?r(i):(e.consume(i),a++,s);if(a<2&&!t)return r(i);const c=e.exit("strikethroughSequenceTemporary"),u=nh(i);return c._open=!u||2===u&&Boolean(l),c._close=!l||2===l&&Boolean(u),n(i)}},resolveAll:function(e,t){let n=-1;for(;++n<e.length;)if("enter"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._close){let r=n;for(;r--;)if("exit"===e[r][0]&&"strikethroughSequenceTemporary"===e[r][1].type&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type="strikethroughSequence",e[r][1].type="strikethroughSequence";const o={type:"strikethrough",start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},i={type:"strikethroughText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},a=[["enter",o,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",i,t]],s=t.parser.constructs.insideSpan.null;s&&Np(a,a.length,0,rh(s,e.slice(r+1,n),t)),Np(a,a.length,0,[["exit",i,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",o,t]]),Np(e,r-1,n-r+3,a),n=r+a.length-2;break}}n=-1;for(;++n<e.length;)"strikethroughSequenceTemporary"===e[n][1].type&&(e[n][1].type="data");return e}};return null==t&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}}}class gv{constructor(){this.map=[]}add(e,t,n){!function(e,t,n,r){let o=0;if(0===n&&0===r.length)return;for(;o<e.map.length;){if(e.map[o][0]===t)return e.map[o][1]+=n,void e.map[o][2].push(...r);o+=1}e.map.push([t,n,r])}(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),0===this.map.length)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(const t of r)e.push(t);r=n.pop()}this.map.length=0}}function yv(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if("enter"===o[0])"tableContent"===o[1].type&&r.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===o[1].type){if("tableDelimiterMarker"===e[t-1][1].type){const e=r.length-1;r[e]="left"===r[e]?"center":"right"}}else if("tableDelimiterRow"===o[1].type)break}else"enter"===o[0]&&"tableDelimiterRow"===o[1].type&&(n=!0);t+=1}return r}function vv(e,t,n){const r=this;let o,i=0,a=0;return function(e){let t=r.events.length-1;for(;t>-1;){const e=r.events[t][1].type;if("lineEnding"!==e&&"linePrefix"!==e)break;t--}const o=t>-1?r.events[t][1].type:null,i="tableHead"===o||"tableRow"===o?x:s;if(i===x&&r.parser.lazy[r.now().line])return n(e);return i(e)};function s(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){if(124===e)return l(e);return o=!0,a+=1,l(e)}(t)}function l(t){return null===t?n(t):qp(t)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):n(t):Kp(t)?Jp(e,l,"whitespace")(t):(a+=1,o&&(o=!1,i+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),o=!0,l):(e.enter("data"),c(t)))}function c(t){return null===t||124===t||Wp(t)?(e.exit("data"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return 92===t||124===t?(e.consume(t),c):c(t)}function d(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter("tableDelimiterRow"),o=!1,Kp(t)?Jp(e,f,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):f(t))}function f(t){return 45===t||58===t?h(t):124===t?(o=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),p):b(t)}function p(t){return Kp(t)?Jp(e,h,"whitespace")(t):h(t)}function h(t){return 58===t?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),m):45===t?(a+=1,m(t)):null===t||qp(t)?v(t):b(t)}function m(t){return 45===t?(e.enter("tableDelimiterFiller"),g(t)):b(t)}function g(t){return 45===t?(e.consume(t),g):58===t?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(t))}function y(t){return Kp(t)?Jp(e,v,"whitespace")(t):v(t)}function v(n){return 124===n?f(n):(null===n||qp(n))&&o&&i===a?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(n)):b(n)}function b(e){return n(e)}function x(t){return e.enter("tableRow"),w(t)}function w(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),w):null===n||qp(n)?(e.exit("tableRow"),t(n)):Kp(n)?Jp(e,w,"whitespace")(n):(e.enter("data"),k(n))}function k(t){return null===t||124===t||Wp(t)?(e.exit("data"),w(t)):(e.consume(t),92===t?S:k)}function S(t){return 92===t||124===t?(e.consume(t),k):k(t)}}function bv(e,t){let n,r,o,i=-1,a=!0,s=0,l=[0,0,0,0],c=[0,0,0,0],u=!1,d=0;const f=new gv;for(;++i<e.length;){const p=e[i],h=p[1];"enter"===p[0]?"tableHead"===h.type?(u=!1,0!==d&&(wv(f,t,d,n,r),r=void 0,d=0),n={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},f.add(i,0,[["enter",n,t]])):"tableRow"===h.type||"tableDelimiterRow"===h.type?(a=!0,o=void 0,l=[0,0,0,0],c=[0,i+1,0,0],u&&(u=!1,r={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},f.add(i,0,[["enter",r,t]])),s="tableDelimiterRow"===h.type?2:r?3:1):!s||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type?"tableCellDivider"===h.type&&(a?a=!1:(0!==l[1]&&(c[0]=c[1],o=xv(f,t,l,s,void 0,o)),l=c,c=[l[1],i,0,0])):(a=!1,0===c[2]&&(0!==l[1]&&(c[0]=c[1],o=xv(f,t,l,s,void 0,o),l=[0,0,0,0]),c[2]=i)):"tableHead"===h.type?(u=!0,d=i):"tableRow"===h.type||"tableDelimiterRow"===h.type?(d=i,0!==l[1]?(c[0]=c[1],o=xv(f,t,l,s,i,o)):0!==c[1]&&(o=xv(f,t,c,s,i,o)),s=0):!s||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type||(c[3]=i)}for(0!==d&&wv(f,t,d,n,r),f.consume(t.events),i=-1;++i<t.events.length;){const e=t.events[i];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=yv(t.events,i))}return e}function xv(e,t,n,r,o,i){const a=1===r?"tableHeader":2===r?"tableDelimiter":"tableData";0!==n[0]&&(i.end=Object.assign({},kv(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const s=kv(t.events,n[1]);if(i={type:a,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[["enter",i,t]]),0!==n[2]){const o=kv(t.events,n[2]),i=kv(t.events,n[3]),a={type:"tableContent",start:Object.assign({},o),end:Object.assign({},i)};if(e.add(n[2],0,[["enter",a,t]]),2!==r){const r=t.events[n[2]],o=t.events[n[3]];if(r[1].end=Object.assign({},o[1].end),r[1].type="chunkText",r[1].contentType="text",n[3]>n[2]+1){const t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[["exit",a,t]])}return void 0!==o&&(i.end=Object.assign({},kv(t.events,o)),e.add(o,0,[["exit",i,t]]),i=void 0),i}function wv(e,t,n,r,o){const i=[],a=kv(t.events,n);o&&(o.end=Object.assign({},a),i.push(["exit",o,t])),r.end=Object.assign({},a),i.push(["exit",r,t]),e.add(n+1,0,i)}function kv(e,t){const n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}const Sv={name:"tasklistCheck",tokenize:function(e,t,n){const r=this;return function(t){if(null!==r.previous||!r._gfmTasklistFirstContentOfListItem)return n(t);return e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),o};function o(t){return Wp(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),i):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),i):n(t)}function i(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(t)}function a(r){return qp(r)?t(r):Kp(r)?e.check({tokenize:Ev},t,n)(r):n(r)}}};function Ev(e,t,n){return Jp(e,function(e){return null===e?n(e):t(e)},"whitespace")}const Cv={};function Tv(e){const t=e||Cv,n=this.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),o=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),i=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(function(e){return Op([{text:tv},{document:{91:{name:"gfmFootnoteDefinition",tokenize:fv,continuation:{tokenize:pv},exit:hv}},text:{91:{name:"gfmFootnoteCall",tokenize:dv},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:cv,resolveTo:uv}}},mv(e),{flow:{null:{name:"table",tokenize:vv,resolveAll:bv}}},{text:{91:Sv}}])}(t)),o.push([{transforms:[Wg],enter:{literalAutolink:Bg,literalAutolinkEmail:Vg,literalAutolinkHttp:Vg,literalAutolinkWww:Vg},exit:{literalAutolink:qg,literalAutolinkEmail:$g,literalAutolinkHttp:Ug,literalAutolinkWww:Hg}},{enter:{gfmFootnoteCallString:Xg,gfmFootnoteCall:Gg,gfmFootnoteDefinitionLabelString:Jg,gfmFootnoteDefinition:Zg},exit:{gfmFootnoteCallString:ey,gfmFootnoteCall:ty,gfmFootnoteDefinitionLabelString:ny,gfmFootnoteDefinition:ry}},{canContainEols:["delete"],enter:{strikethrough:cy},exit:{strikethrough:uy}},{enter:{table:My,tableData:By,tableHeader:By,tableRow:Fy},exit:{codeText:Vy,table:zy,tableData:Iy,tableHeader:Iy,tableRow:Iy}},{exit:{taskListCheckValueChecked:$y,taskListCheckValueUnchecked:$y,paragraph:qy}}]),i.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Fg,notInConstruct:Ig},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Fg,notInConstruct:Ig},{character:":",before:"[ps]",after:"\\/",inConstruct:Fg,notInConstruct:Ig}]},iy(e),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:ly}],handlers:{delete:dy}},Hy(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Wy}}]}}(t))}const Pv=({content:e})=>$.jsx("div",{className:"prose-custom",children:$.jsx(Lg,{remarkPlugins:[Tv],children:e})}),Av=({message:e})=>{const t="assistant"===e.role,{config:n}=Gd();return $.jsx("div",{className:`flex w-full ${t?"justify-start":"justify-end"} mb-6 animate-in fade-in slide-in-from-bottom-2 duration-300`,children:$.jsxs("div",{className:`flex max-w-[88%] ${t?"flex-row":"flex-row-reverse"} gap-3`,children:[$.jsx("div",{className:`\n h-8 w-8 rounded-full flex items-center justify-center shrink-0 shadow-sm border \n ${t?"bg-white border-slate-100":"border-transparent text-white"}\n `,style:t?{}:{backgroundColor:n.primaryColor},children:t?$.jsx(Dl,{size:16,style:{color:n.primaryColor},strokeWidth:2.5}):$.jsx(uc,{size:16,strokeWidth:2.5})}),$.jsxs("div",{className:"flex flex-col gap-2 "+(t?"items-start":"items-end"),children:[$.jsx("div",{className:"px-4 py-3 rounded-2xl shadow-sm "+(t?"bg-white/90 backdrop-blur-md text-slate-800 rounded-tl-none":"text-white rounded-tr-none shadow-md"),style:{backgroundColor:t?void 0:n.userMessageColor||"#b0c2df"},children:$.jsx(Pv,{content:e.content})}),t&&e.sources&&e.sources.length>0&&$.jsxs("div",{className:"mt-2 w-full animate-in fade-in slide-in-from-top-1 duration-500",children:[$.jsxs("div",{className:"flex items-center gap-1.5 mb-2 ml-1",children:[$.jsx(ac,{size:10,className:"text-slate-400"}),$.jsx("span",{className:"text-[9px] font-black text-slate-400 uppercase tracking-widest",children:"Sources consultées"})]}),$.jsx("div",{className:"flex flex-wrap gap-1.5",children:e.sources.map((e,t)=>$.jsxs("div",{title:e,className:"\r\n flex items-center gap-1.5 px-2.5 py-1 \r\n bg-slate-100/50 border border-slate-200/60 rounded-full \r\n text-[10px] font-bold text-slate-500 \r\n hover:bg-white hover:border-blue-300 hover:text-blue-600 \r\n transition-all cursor-help max-w-[160px]\r\n ",children:[$.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-blue-400 shrink-0 shadow-sm"}),$.jsx("span",{className:"truncate",children:e.split("/").pop()})]},t))})]})]})]})})},jv=({file:e,onRemove:t})=>$.jsxs(jl.div,{initial:{scale:.8,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.8,opacity:0},className:"flex items-center gap-2 px-3 py-1.5 bg-blue-50 border border-blue-100 rounded-xl text-[11px] text-blue-600 font-bold shadow-sm",children:[$.jsx(ql,{size:12}),$.jsx("span",{className:"truncate max-w-[100px]",children:e.name}),$.jsx("button",{onClick:t,className:"hover:text-red-500 transition-colors border-none bg-transparent cursor-pointer",children:$.jsx(dc,{size:12})})]}),Nv=({onSend:e,disabled:t})=>{const[n,r]=u.useState(""),[o,i]=u.useState([]),{config:a}=Gd(),s=u.useRef(null),l=()=>{(n.trim()||o.length>0)&&!t&&(e(n,o),r(""),i([]))};return $.jsxs("div",{className:"space-y-3",children:[$.jsx(ds,{children:o.length>0&&$.jsx("div",{className:"flex flex-wrap gap-2 animate-in fade-in slide-in-from-bottom-2",children:o.map((e,t)=>$.jsx(jv,{file:e,onRemove:()=>{return e=t,void i(o.filter((t,n)=>n!==e));var e}},t))})}),$.jsxs("div",{className:"relative flex items-end gap-2 bg-white/70 backdrop-blur-md border border-slate-200 rounded-2xl p-2 focus-within:border-blue-400 transition-all shadow-sm",children:[$.jsx("input",{type:"file",multiple:!0,ref:s,onChange:e=>{e.target.files&&i([...o,...Array.from(e.target.files)])},className:"hidden"}),$.jsx("button",{onClick:()=>{var e;return null==(e=s.current)?void 0:e.click()},className:"p-2 text-slate-400 hover:text-blue-600 transition-colors border-none bg-transparent cursor-pointer",children:$.jsx(ec,{size:20})}),$.jsx("textarea",{rows:1,value:n,onChange:e=>r(e.target.value),onKeyDown:e=>"Enter"===e.key&&!e.shiftKey&&(e.preventDefault(),l()),placeholder:"Envoyez un message ou un fichier...",className:"w-full bg-transparent border-none focus:ring-0 resize-none py-2 text-[14px] text-slate-700 max-h-32 outline-none"}),$.jsx("button",{onClick:l,disabled:!n.trim()&&0===o.length||t,className:"p-2 rounded-xl text-white disabled:opacity-30 transition-all border-none cursor-pointer",style:{backgroundColor:a.primaryColor},children:t?$.jsx(Xl,{size:20,className:"animate-spin"}):$.jsx(rc,{size:20})})]})]})},Rv=({onSuggestion:e})=>{const{botName:t,logoUrl:n,primaryColor:r}=hc(),o=[{label:"Je veux une liste des employés ?",icon:lc},{label:"Quelles sont les ressources de l'entreprise disponibles ?",icon:Jl},{label:"Résume-moi le dernier document RH",icon:ql}];return $.jsxs("div",{className:"flex flex-col items-center justify-center p-8 text-center animate-in fade-in zoom-in duration-500",children:[$.jsxs("div",{className:"relative mb-6",children:[$.jsx("div",{className:"h-20 w-20 rounded-[24px] bg-white shadow-xl flex items-center justify-center p-4 border border-slate-50",children:$.jsx("img",{src:n,alt:t,className:"h-full w-full object-contain"})}),$.jsx("div",{style:{backgroundColor:r},className:"absolute -bottom-2 -right-2 h-8 w-8 rounded-xl border-4 border-white flex items-center justify-center text-white",children:$.jsx(Dl,{size:16,strokeWidth:3})})]}),$.jsxs("h1",{className:"text-xl font-black text-slate-800 mb-2 tracking-tight",children:["Bonjour, je suis ",t]}),$.jsx("p",{className:"text-sm text-slate-400 mb-10 max-w-[240px] leading-relaxed",children:"Votre assistant intelligent. Je peux analyser vos documents et répondre à vos questions."}),$.jsxs("div",{className:"w-full space-y-2",children:[$.jsx("p",{className:"text-[10px] font-black text-slate-300 uppercase tracking-[0.2em] mb-4",children:"Suggestions"}),o.map((t,n)=>$.jsxs("button",{onClick:()=>e(t.label),className:"w-full flex items-center gap-3 p-3 bg-white border border-slate-100 rounded-2xl text-xs font-bold text-slate-600 hover:border-blue-200 hover:shadow-md transition-all cursor-pointer text-left",children:[$.jsx("div",{className:"p-1.5 bg-slate-50 rounded-lg text-slate-400",children:$.jsx(t.icon,{size:14})}),t.label]},n))]})]})},Lv=()=>$.jsxs("div",{className:"flex gap-3 mb-4 animate-in fade-in",children:[$.jsx("div",{className:"h-8 w-8 rounded-full bg-white border border-slate-100 flex items-center justify-center",children:$.jsx("div",{className:"flex gap-1",children:[0,1,2].map(e=>$.jsx(jl.div,{animate:{opacity:[.3,1,.3]},transition:{duration:1,repeat:1/0,delay:.2*e},className:"h-1.5 w-1.5 bg-blue-500 rounded-full"},e))})}),$.jsx("div",{className:"bg-white/50 backdrop-blur-md border border-white/50 px-4 py-3 rounded-2xl rounded-tl-none shadow-sm",children:$.jsx("span",{className:"text-xs text-slate-400 font-medium italic",children:"Recherche dans vos documents..."})})]}),Ov=()=>{const{messages:e,addMessage:t,setLoading:n,isLoading:r,threadId:o,confirmThreadId:i,config:a}=Gd(),s=hc(),{initialMessage:l,botName:c,userName:d}=s,f=(null==s?void 0:s.apiUrl)||(null==a?void 0:a.apiUrl),p=(null==s?void 0:s.userToken)||(null==a?void 0:a.userToken),h=u.useRef(null);u.useEffect(()=>{h.current&&h.current.scrollTo({top:h.current.scrollHeight,behavior:"smooth"})},[e,r]);const m=async(e,a=[])=>{if(!e.trim()&&0===a.length||r)return;if(!f)return console.error("[DHI Copilot] apiUrl manquant. Vérifiez la prop `config` sur <dhi-copilot-ai>."),void t({id:"err-config-"+Date.now(),role:"assistant",content:"⚠️ **Configuration manquante.**\n\nL'URL du serveur n'est pas définie. Veuillez vérifier l'intégration du widget.",timestamp:new Date});let s=e.trim();if(a.length>0){s+=`\n\n**Fichiers joints :**\n${a.map(e=>`📄 ${e.name}`).join("\n")}`}t({id:Date.now().toString(),role:"user",content:s,timestamp:new Date}),n(!0);const l=o;try{a.length>0&&await Qd(f,p??"",a);const n=a.map(e=>e.name).join(", ");let r=e.trim();a.length>0&&(r=r?`${r}\n\n(Contexte : L'utilisateur a joint les fichiers suivants pour analyse : ${n})`:`Analyse les documents suivants que je viens de t'envoyer : ${n}.`);const o=await Ud(f,p,{message:r,thread_id:l});(null==o?void 0:o.thread_id)&&i(o.thread_id),t({id:(Date.now()+1).toString(),role:"assistant",content:o.response,sources:o.sources||[],timestamp:new Date})}catch(c){console.error("[DHI Copilot] Chat Error:",c),t({id:"err-"+Date.now(),role:"assistant",content:"⚠️ **Connexion interrompue.**\n\nLe serveur **Fluxoon Copilot** ne répond pas. Vérifiez votre connexion ou contactez le support.",timestamp:new Date})}finally{n(!1)}},g=(l||"").replace("{botName}",c||"").replace("{name}",d||"");return $.jsxs("div",{className:"flex flex-col h-full bg-transparent overflow-hidden",children:[$.jsx("div",{ref:h,className:"flex-1 overflow-y-auto px-4 py-6 space-y-6 custom-scrollbar scroll-smooth",children:0!==e.length||r?$.jsxs("div",{className:"flex flex-col min-h-full",children:[e.map(e=>$.jsx(Av,{message:e},e.id)),r&&$.jsx("div",{className:"mt-2",children:$.jsx(Lv,{})})]}):$.jsxs("div",{className:"flex flex-col gap-6 animate-in fade-in duration-700",children:[$.jsx(Av,{message:{id:"virtual-intro",role:"assistant",content:g,timestamp:new Date}}),$.jsx(Rv,{onSuggestion:e=>m(e)})]})}),$.jsx("div",{className:"p-4 bg-white/40 backdrop-blur-xl border-t border-black/[0.03] shadow-[0_-10px_30px_rgba(0,0,0,0.02)]",children:$.jsxs("div",{className:"max-w-[480px] mx-auto",children:[$.jsx(Nv,{onSend:m,disabled:r}),$.jsxs("div",{className:"flex justify-center items-center gap-4 mt-3",children:[$.jsxs("span",{className:"text-[9px] text-slate-400 font-bold uppercase tracking-widest flex items-center gap-1",children:[$.jsx("span",{className:"w-1 h-1 rounded-full bg-emerald-500"}),"RAG Active"]}),$.jsx("span",{className:"text-[9px] text-slate-300 font-medium italic",children:"Vérifiez les sources citées."})]})]})})]})},Dv=({onSelectThread:e})=>{const{config:t,threads:n,fetchThreads:r,loadThread:o,isLoading:i,activeThreadId:a}=Gd();u.useEffect(()=>{r()},[]);return $.jsxs("div",{className:"flex flex-col h-full p-6 animate-in fade-in slide-in-from-right-4 overflow-hidden",children:[$.jsxs("button",{onClick:()=>{o(null),e()},style:{backgroundColor:`${t.primaryColor}10`,color:t.primaryColor,borderColor:`${t.primaryColor}30`},className:"flex items-center justify-center gap-2 w-full py-4 rounded-2xl border-2 border-dashed font-bold text-sm mb-8 hover:scale-[1.01] active:scale-[0.98] transition-all cursor-pointer",children:[$.jsx(tc,{size:18,strokeWidth:3}),"Nouvelle discussion"]}),$.jsxs("div",{className:"flex items-center justify-between mb-4 px-1",children:[$.jsx("h3",{className:"text-[10px] font-black text-slate-400 uppercase tracking-[0.2em]",children:"Conversations récentes"}),$.jsx(Ul,{size:12,className:"text-slate-300"})]}),$.jsx("div",{className:"flex-1 space-y-3 overflow-y-auto custom-scrollbar pr-2 pb-6",children:i&&0===n.length?$.jsxs("div",{className:"flex flex-col items-center justify-center py-20 gap-3",children:[$.jsx(Xl,{size:24,className:"animate-spin text-slate-300"}),$.jsx("p",{className:"text-xs text-slate-400 font-medium",children:"Récupération de l'historique..."})]}):0===n.length?$.jsx("div",{className:"text-center py-12 px-6 border border-dashed border-slate-100 rounded-3xl bg-slate-50/50",children:$.jsx("p",{className:"text-xs text-slate-400 italic",children:"Aucune discussion trouvée."})}):n.map(n=>$.jsxs("div",{onClick:()=>(async t=>{await o(t),e()})(n.id),className:`\n group relative flex items-center justify-between p-4 rounded-2xl transition-all cursor-pointer border\n ${a===n.id?"bg-white border-blue-100 shadow-md ring-1 ring-blue-50":"bg-white border-slate-100 hover:border-blue-200 hover:shadow-sm"}\n `,children:[a===n.id&&$.jsx("div",{className:"absolute left-0 top-4 bottom-4 w-1 rounded-r-full",style:{backgroundColor:t.primaryColor}}),$.jsxs("div",{className:"flex items-center gap-3 overflow-hidden",children:[$.jsx("div",{className:`\n p-2.5 rounded-xl transition-colors\n ${a===n.id?"bg-blue-50 text-blue-600":"bg-slate-50 text-slate-400 group-hover:text-blue-500 group-hover:bg-blue-50/50"}\n `,children:$.jsx(Jl,{size:18})}),$.jsxs("div",{className:"overflow-hidden",children:[$.jsx("p",{className:"text-sm font-bold text-slate-700 truncate group-hover:text-slate-900 transition-colors",children:n.title||"Discussion sans titre"}),$.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[$.jsxs("span",{className:"text-[9px] font-bold text-slate-400 uppercase tracking-tight group-hover:text-blue-400 transition-colors",children:["ID: ",n.id.slice(-4)]}),n.date&&$.jsxs($.Fragment,{children:[$.jsx("span",{className:"text-slate-200 text-[10px]",children:"•"}),$.jsxs("div",{className:"flex items-center gap-1 text-[10px] text-slate-400",children:[$.jsx(_l,{size:10}),$.jsx("span",{children:n.date})]})]})]})]})]}),$.jsx(Il,{size:16,className:"transition-all "+(a===n.id?"text-blue-400 translate-x-0":"text-slate-300 translate-x-[-4px] opacity-0 group-hover:opacity-100 group-hover:translate-x-0")})]},n.id))})]})},_v=({connector:e})=>{var t,n;const{removeSource:r,syncSource:o,config:i}=Gd(),[a,s]=u.useState(!1),[l,c]=u.useState(!1),d="active"===e.status,f="indexing"===e.status||l,p=e.last_indexed_at?new Date(e.last_indexed_at).toLocaleDateString("fr-FR",{day:"numeric",month:"short"}):null;return $.jsxs("div",{className:`\n group bg-white border rounded-2xl transition-all duration-300 overflow-hidden\n ${a?"shadow-xl border-blue-200":"border-slate-100 hover:border-blue-100 hover:shadow-sm"}\n `,children:[$.jsxs("div",{onClick:()=>s(!a),className:"p-4 flex items-center justify-between cursor-pointer select-none",children:[$.jsxs("div",{className:"flex items-center gap-4 overflow-hidden",children:[$.jsx("div",{className:`\n p-3 rounded-xl transition-colors\n ${f?"bg-amber-50 text-amber-600":d?"bg-blue-50 text-blue-600":"bg-slate-50 text-slate-400"}\n `,children:f?$.jsx(nc,{size:18,className:"animate-spin"}):(e=>{const t={size:18,strokeWidth:2.5};switch(e){case"WEB":return $.jsx(Kl,{...t});case"AWS_S3":return $.jsx(Hl,{...t});case"AZURE_BLOB":return $.jsx($l,{...t});case"SFTP":return $.jsx(oc,{...t});default:return $.jsx(Yl,{...t})}})(e.storage_type)}),$.jsxs("div",{className:"overflow-hidden",children:[$.jsx("h3",{className:"text-sm font-bold text-slate-800 truncate group-hover:text-slate-900",children:e.source_id}),$.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[$.jsx("span",{className:"w-1.5 h-1.5 rounded-full "+(f?"bg-amber-500 animate-pulse":d?"bg-emerald-500":"bg-red-500")}),$.jsx("span",{className:"text-[9px] font-black uppercase tracking-widest text-slate-400",children:f?"Synchronisation...":e.status}),p&&$.jsxs($.Fragment,{children:[$.jsx("span",{className:"text-slate-200 text-[10px]",children:"•"}),$.jsxs("div",{className:"flex items-center gap-1 text-[9px] text-slate-400 font-bold",children:[$.jsx(_l,{size:10})," ",p]})]})]})]})]}),$.jsxs("div",{className:"flex items-center gap-1",children:[$.jsx("button",{onClick:async t=>{t.stopPropagation(),c(!0);try{await o(e.source_id)}finally{c(!1)}},disabled:f,className:"p-2 text-slate-300 hover:text-blue-600 hover:bg-blue-50 rounded-lg transition-all",title:"Relancer l'indexation",children:$.jsx(nc,{size:16})}),$.jsx("button",{onClick:async t=>{t.stopPropagation(),window.confirm(`Supprimer la source "${e.source_id}" ?`)&&await r(e.source_id)},className:"p-2 text-slate-300 hover:text-red-500 hover:bg-red-50 rounded-lg transition-all",title:"Supprimer",children:$.jsx(cc,{size:16})}),$.jsx("div",{className:"p-1 text-slate-300 transition-transform duration-300 "+(a?"rotate-180 text-blue-500":""),children:$.jsx(zl,{size:20})})]})]}),$.jsx(ds,{children:a&&$.jsx(jl.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.3,ease:[.04,.62,.23,.98]},className:"border-t border-slate-50 bg-slate-50/50",children:$.jsxs("div",{className:"p-4 space-y-3",children:[$.jsx("div",{className:"flex items-center justify-between",children:$.jsxs("p",{className:"text-[10px] font-black text-slate-400 uppercase tracking-widest flex items-center gap-2",children:[$.jsx(ql,{size:12}),"Documents Indexés (",(null==(t=e.indexed_files)?void 0:t.length)||0,")"]})}),$.jsx("div",{className:`\n space-y-1.5 overflow-y-auto custom-scrollbar pr-1\n ${(null==(n=e.indexed_files)?void 0:n.length)>5?"max-h-48":"h-auto"}\n `,children:e.indexed_files&&e.indexed_files.length>0?e.indexed_files.map((e,t)=>$.jsxs("div",{className:"flex items-center gap-2 text-[11px] text-slate-600 py-2 px-3 bg-white border border-black/[0.03] rounded-xl hover:border-blue-200 transition-colors shadow-sm",children:[$.jsx(Vl,{className:"w-3.5 h-3.5 text-emerald-500 shrink-0"}),$.jsx("span",{className:"truncate flex-1 font-medium",children:e.replace("✅ Indexé:","").replace("✅ Indexé :","").trim()})]},t)):$.jsx("div",{className:"py-6 text-center",children:$.jsx("p",{className:"text-xs text-slate-400 italic",children:"Aucun document n'a encore été indexé pour cette source."})})})]})})})]})},Mv=({children:e,required:t})=>$.jsxs("label",{className:"text-[10px] font-black text-slate-400 uppercase tracking-widest mb-1.5 block ml-1",children:[e," ",t&&$.jsx("span",{className:"text-red-500",children:"*"})]}),zv=({error:e,...t})=>$.jsxs("div",{className:"w-full",children:[$.jsx("input",{...t,className:`w-full p-3 bg-slate-50 border ${e?"border-red-400 bg-red-50":"border-slate-100"} rounded-xl text-sm focus:ring-2 focus:ring-blue-500/20 outline-none transition-all placeholder:text-slate-300`}),e&&$.jsx("p",{className:"text-[9px] text-red-500 font-bold mt-1 ml-1",children:e})]}),Fv=({title:e,children:t,description:n})=>$.jsxs("div",{className:"p-4 bg-slate-50/50 border border-slate-100 rounded-2xl space-y-4",children:[$.jsxs("div",{className:"border-b border-blue-100 pb-2 mb-3",children:[$.jsx("h4",{className:"text-[10px] font-black text-blue-600 uppercase tracking-wider",children:e}),n&&$.jsx("p",{className:"text-[9px] text-slate-400 font-medium",children:n})]}),$.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:t})]}),Iv=[{id:"WEB",label:"Web",icon:Kl,color:"text-indigo-500"},{id:"AZURE_BLOB",label:"Azure",icon:$l,color:"text-blue-500"},{id:"AWS_S3",label:"AWS S3",icon:Hl,color:"text-amber-500"},{id:"SFTP",label:"SFTP",icon:oc,color:"text-violet-500"},{id:"GOOGLE_DRIVE",label:"G-Drive",icon:Yl,color:"text-emerald-500"},{id:"LOCAL",label:"Local",icon:Wl,color:"text-slate-500"}],Bv=()=>{const{config:e,fetchConnectors:t,setShowAddForm:n}=Gd(),[r,o]=u.useState(!1),[i,a]=u.useState("WEB"),[s,l]=u.useState(""),[c,d]=u.useState(""),[f,p]=u.useState(!0),[h,m]=u.useState(null),[g,y]=u.useState({port:"22",protocol:"https",suffix:"core.windows.net",username:"",password:"",host:"",service_account_json:""}),[v,b]=u.useState({}),x=(e,t)=>{y({...g,[e]:t}),v[e]&&b({...v,[e]:null}),h&&m(null)};return $.jsxs("form",{onSubmit:async r=>{if(r.preventDefault(),m(null),"WEB"===i)return void m("🚀 L'analyse des pages web est une fonctionnalité en cours de développement. Elle sera disponible prochainement. Veuillez choisir une source Cloud ou Locale.");if(!(()=>{let e={};return s||(e.source_id="L'identifiant est requis"),c||(e.path="Ce champ est requis"),"SFTP"===i&&(g.host||(e.host="Hôte requis"),g.username||(e.username="Utilisateur requis")),"AZURE_BLOB"!==i||g.account_name&&g.account_key||(e.azure="Informations de compte Azure incomplètes"),"GOOGLE_DRIVE"!==i||g.service_account_json||(e.service_account_json="JSON du compte de service requis"),b(e),0===Object.keys(e).length})())return;o(!0);let a={};switch(i){case"AZURE_BLOB":a={connection_string:`DefaultEndpointsProtocol=${g.protocol};AccountName=${g.account_name};AccountKey=${g.account_key};EndpointSuffix=${g.suffix}`,container:g.container||c};break;case"AWS_S3":a={aws_access_key_id:g.aws_access_key_id,aws_secret_access_key:g.aws_secret_access_key,region_name:g.region_name};break;case"SFTP":a={host:g.host,port:parseInt(g.port)||22,username:g.username,password:g.password||""};break;case"GOOGLE_DRIVE":try{a=JSON.parse(g.service_account_json)}catch(l){return b({service_account_json:"Le format JSON est invalide"}),void o(!1)}break;default:a={}}try{await Wd(e.apiUrl,e.userToken,{source_id:s,storage_type:i,path:c,recursive:f,credentials:a}),await t(),n(!1)}catch(l){console.error(l),m("Une erreur est survenue lors de la communication avec le serveur Fluxoon.")}finally{o(!1)}},className:"space-y-6 animate-in slide-in-from-bottom-4 duration-500 pb-10",children:[$.jsx("div",{className:"grid grid-cols-3 gap-2",children:Iv.map(e=>$.jsxs("button",{type:"button",onClick:()=>{a(e.id),b({}),m(null)},className:"flex flex-col items-center gap-2 p-3 rounded-2xl border transition-all duration-300 "+(i===e.id?"border-blue-500 bg-blue-50 text-blue-600 shadow-sm scale-[1.02]":"border-slate-100 bg-white text-slate-400 hover:border-slate-200"),children:[$.jsx(e.icon,{size:18,className:i===e.id?e.color:""}),$.jsx("span",{className:"text-[9px] font-black uppercase tracking-tighter",children:e.label})]},e.id))}),$.jsxs("div",{className:"space-y-4 bg-white/60 backdrop-blur-sm p-5 rounded-[24px] border border-white/40 shadow-sm",children:[$.jsxs("div",{children:[$.jsx(Mv,{required:!0,children:"Identifiant de la Source"}),$.jsx(zv,{placeholder:"Ex: Documents_RH_V3",value:s,onChange:e=>l(e.target.value),error:v.source_id})]}),$.jsxs("div",{children:[$.jsx(Mv,{required:!0,children:"AWS_S3"===i?"Nom du Bucket":"GOOGLE_DRIVE"===i?"ID du Dossier (Folder ID)":"WEB"===i?"URL Racine":"Chemin d'accès (Path)"}),$.jsx(zv,{placeholder:"AWS_S3"===i?"Ex: bucket-documents-rh":"GOOGLE_DRIVE"===i?"Ex: 1A2b3C4d5E6f7G...":"WEB"===i?"https://monsite.com":"Ex: /mnt/data/archives",value:c,onChange:e=>d(e.target.value),error:v.path})]})]}),$.jsxs(ds,{mode:"wait",children:["AZURE_BLOB"===i&&$.jsx(jl.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},children:$.jsxs(Fv,{title:"Azure Blob Access",description:"Connectez votre conteneur Azure",children:[$.jsx(zv,{placeholder:"Account Name",onChange:e=>x("account_name",e.target.value)}),$.jsx(zv,{type:"password",placeholder:"Account Key",onChange:e=>x("account_key",e.target.value)}),$.jsx("div",{className:"md:col-span-2",children:$.jsx(zv,{placeholder:"Nom du conteneur (ex: production)",onChange:e=>x("container",e.target.value)})})]})},"azure"),"AWS_S3"===i&&$.jsx(jl.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},children:$.jsxs(Fv,{title:"AWS S3 Configuration",description:"Identifiants IAM Read-Only",children:[$.jsx(zv,{placeholder:"Access Key ID",onChange:e=>x("aws_access_key_id",e.target.value)}),$.jsx(zv,{type:"password",placeholder:"Secret Access Key",onChange:e=>x("aws_secret_access_key",e.target.value)}),$.jsx("div",{className:"md:col-span-2",children:$.jsx(zv,{placeholder:"Region Name (ex: us-east-1)",onChange:e=>x("region_name",e.target.value)})})]})},"aws"),"SFTP"===i&&$.jsx(jl.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},children:$.jsxs(Fv,{title:"Serveur SFTP",description:"Accès distant sécurisé",children:[$.jsx(zv,{placeholder:"Hôte (ex: sftp.fluxoon.com)",onChange:e=>x("host",e.target.value),error:v.host}),$.jsx(zv,{placeholder:"Port (Défaut: 22)",value:g.port,onChange:e=>x("port",e.target.value)}),$.jsx(zv,{placeholder:"Username",onChange:e=>x("username",e.target.value),error:v.username}),$.jsx(zv,{type:"password",placeholder:"Password / SSH Key Pass",onChange:e=>x("password",e.target.value)})]})},"sftp"),"GOOGLE_DRIVE"===i&&$.jsxs(jl.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"space-y-3 p-5 bg-slate-900 rounded-[24px] border border-slate-800",children:[$.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[$.jsx(Gl,{size:14,className:"text-emerald-400"}),$.jsx(Mv,{required:!0,children:$.jsx("span",{className:"text-slate-100",children:"Service Account JSON"})})]}),$.jsx("textarea",{className:"w-full h-40 p-3 bg-slate-950 text-emerald-400 font-mono text-[10px] rounded-xl border-none outline-none focus:ring-1 focus:ring-emerald-500/50 resize-none "+(v.service_account_json?"ring-1 ring-red-500":""),placeholder:"Collez le contenu complet du fichier .json ici...",onChange:e=>x("service_account_json",e.target.value)}),v.service_account_json&&$.jsx("p",{className:"text-[9px] text-red-400 font-bold",children:v.service_account_json})]},"gdrive"),"WEB"===i&&$.jsxs(jl.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"p-4 bg-indigo-50/50 border border-indigo-100 rounded-2xl flex items-start gap-3",children:[$.jsx(Ql,{className:"text-indigo-500 shrink-0 mt-0.5",size:16}),$.jsx("p",{className:"text-[10px] text-indigo-700 font-medium leading-relaxed",children:"L'analyse des pages web est une fonctionnalité en cours de développement. Elle sera disponible prochainement."})]},"web")]}),$.jsx(ds,{children:h&&$.jsxs(jl.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},className:"p-4 bg-amber-50 border border-amber-200 rounded-2xl flex items-start gap-3 shadow-sm",children:[$.jsx(Bl,{className:"text-amber-500 shrink-0 mt-0.5",size:18}),$.jsx("p",{className:"text-[11px] text-amber-900 font-bold leading-tight uppercase tracking-tight",children:h})]})}),$.jsx("div",{className:"pt-2",children:$.jsx("button",{type:"submit",disabled:r,style:{backgroundColor:e.primaryColor},className:`\n w-full py-4 rounded-2xl text-white font-bold text-sm shadow-xl flex items-center justify-center gap-2 \n transition-all border-none cursor-pointer\n ${r?"opacity-70 cursor-not-allowed":"hover:scale-[1.01] active:scale-[0.98]"}\n `,children:r?$.jsxs($.Fragment,{children:[$.jsx(Xl,{size:18,className:"animate-spin"}),$.jsx("span",{children:"Traitement en cours..."})]}):$.jsxs($.Fragment,{children:["WEB"===i?$.jsx(Gl,{size:18}):$.jsx(Ml,{size:18,strokeWidth:3}),$.jsx("span",{children:"WEB"===i?"Fonctionnalité Verrouillée":"Enregistrer la source"})]})})})]})},Vv=()=>{const{connectors:e,fetchConnectors:t,showAddForm:n,setShowAddForm:r,config:o}=Gd();return u.useEffect(()=>{t()},[]),$.jsx("div",{className:"h-full flex flex-col bg-transparent",children:$.jsx(ds,{mode:"wait",children:n?$.jsxs(jl.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:20},className:"p-6 space-y-6",children:[$.jsxs("button",{onClick:()=>r(!1),className:"flex items-center gap-2 text-xs font-bold text-slate-400 hover:text-slate-600 border-none bg-transparent cursor-pointer",children:[$.jsx(Fl,{size:14})," Retour à la liste"]}),$.jsx(Bv,{})]},"form"):$.jsxs(jl.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},className:"p-6 space-y-6",children:[$.jsxs("header",{className:"flex justify-between items-end",children:[$.jsxs("div",{children:[$.jsx("h2",{className:"text-lg font-black text-slate-800 tracking-tight",children:"Sources"}),$.jsx("p",{className:"text-xs text-slate-400 font-medium",children:"Connaissances de l'IA"})]}),$.jsx("button",{onClick:()=>r(!0),style:{backgroundColor:o.primaryColor},className:"p-2 rounded-xl text-white shadow-lg hover:scale-110 transition-transform border-none cursor-pointer",children:$.jsx(tc,{size:20})})]}),$.jsx("div",{className:"space-y-3",children:0===e.length?$.jsx("div",{className:"py-10 text-center border-2 border-dashed border-slate-100 rounded-3xl",children:$.jsx("p",{className:"text-xs text-slate-400 italic",children:"Aucune source connectée."})}):e.map(e=>$.jsx(_v,{connector:e},e.source_id))}),$.jsxs("div",{className:"p-4 bg-emerald-50/50 border border-emerald-100 rounded-2xl flex gap-3",children:[$.jsx(sc,{className:"text-emerald-600 shrink-0",size:18}),$.jsx("p",{className:"text-[10px] text-emerald-800 leading-relaxed font-medium",children:"Isolation RAG active : vos documents sont chiffrés et accessibles uniquement par ce Copilot."})]})]},"list")})})},Uv=({activeView:e,setView:t,onClose:n})=>{const{config:r}=Gd(),o=[{id:"chat",icon:Zl,label:"Chat"},{id:"history",icon:Ul,label:"Historique"},{id:"settings",icon:ic,label:"Sources"}];return $.jsxs("nav",{className:"flex items-center justify-between px-5 py-4 bg-white/40 backdrop-blur-xl border-b border-black/[0.03] shrink-0",children:[$.jsx("div",{className:"flex bg-slate-200/50 p-1 rounded-xl gap-1",children:o.map(n=>{const o=e===n.id;return $.jsxs("button",{onClick:()=>t(n.id),className:`\n flex items-center gap-2 px-3 py-1.5 rounded-lg transition-all duration-300 \n text-xs font-bold select-none border-none cursor-pointer\n ${o?"bg-white shadow-md":"text-slate-400 hover:text-slate-600"}\n `,children:[$.jsx(n.icon,{size:14,style:o?{color:r.primaryColor}:{},strokeWidth:o?2.5:2}),o&&$.jsx("span",{className:"animate-in fade-in zoom-in duration-300 text-slate-900",children:n.label})]},n.id)})}),$.jsx("button",{onClick:n,className:"p-2 rounded-full hover:bg-red-50 hover:text-red-500 text-slate-400 transition-all border-none cursor-pointer",children:$.jsx(dc,{size:20})})]})},Hv=({close:e})=>{const[t,n]=u.useState("chat");return $.jsxs("div",{className:"flex flex-col h-full bg-transparent overflow-hidden",children:[$.jsx(Uv,{activeView:t,setView:n,onClose:e}),$.jsx("div",{className:"flex-1 overflow-hidden relative",children:$.jsx(ds,{mode:"wait",children:$.jsxs(jl.div,{initial:{opacity:0,x:15},animate:{opacity:1,x:0},exit:{opacity:0,x:-15},transition:{duration:.3,ease:[.23,1,.32,1]},className:"h-full w-full",children:["chat"===t&&$.jsx("div",{className:"h-full",children:$.jsx(Ov,{})}),"history"===t&&$.jsx("div",{className:"h-full",children:$.jsx(Dv,{onSelectThread:()=>n("chat")})}),"settings"===t&&$.jsx("div",{className:"h-full overflow-y-auto custom-scrollbar",children:$.jsx(Vv,{})})]},t)})}),$.jsx("footer",{className:"px-6 py-4 border-t border-black/[0.03] bg-white/20 backdrop-blur-sm",children:$.jsxs("div",{className:"flex items-center justify-between",children:[$.jsxs("div",{className:"flex items-center gap-2",children:[$.jsxs("span",{className:"relative flex h-2 w-2",children:[$.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75"}),$.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-emerald-500"})]}),$.jsx("span",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-widest select-none",children:"Copilot AI • v1.0"})]}),$.jsx("span",{className:"text-[9px] font-medium text-slate-300 italic",children:"Sécure & Chiffré"})]})})]})},$v=({isOpen:e,setIsOpen:t})=>{const{primaryColor:n,position:r,logoUrl:o,botName:i}=hc(),a="right"===r,s=n.startsWith("#")?`${n}99`:n;return $.jsxs("div",{className:`fluxoon-copilot-wrapper fixed bottom-0 ${a?"right-0":"left-0"} z-[999999] p-6 font-sans`,dir:"ltr",children:[$.jsx(ds,{children:e&&$.jsx(jl.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3},onClick:()=>t(!1),style:{position:"fixed",inset:0,background:"rgba(15, 23, 42, 0.30)",backdropFilter:"blur(2px)",WebkitBackdropFilter:"blur(2px)",zIndex:39,cursor:"pointer"}},"overlay")}),$.jsx(jl.button,{whileHover:{scale:1.05,boxShadow:"0 15px 45px rgba(0,0,0,0.25)"},whileTap:{scale:.95},onClick:()=>t(!e),style:{backgroundColor:s,border:"1px solid rgba(255, 255, 255, 0.3)"},className:"relative h-16 w-16 rounded-2xl flex items-center justify-center text-white cursor-pointer outline-none z-50 backdrop-blur-lg shadow-[0_8px_32px_rgba(0,0,0,0.15)] transition-shadow",children:$.jsx(ds,{mode:"wait",children:e?$.jsx(jl.div,{initial:{rotate:-90,opacity:0},animate:{rotate:0,opacity:1},exit:{rotate:90,opacity:0},className:"flex items-center justify-center",children:$.jsx(dc,{size:32,strokeWidth:2.5})},"close"):$.jsxs(jl.div,{initial:{scale:0,opacity:0},animate:{scale:1,opacity:1},className:"relative flex items-center justify-center",children:[$.jsx("div",{className:"h-10 w-10 bg-white/90 rounded-xl p-1.5 shadow-inner flex items-center justify-center overflow-hidden",children:$.jsx("img",{src:o,alt:i,className:"h-full w-full object-contain"})}),$.jsx("div",{style:{backgroundColor:n},className:"absolute -top-3 -right-3 h-7 w-7 rounded-lg shadow-lg flex items-center justify-center text-white border-2 border-white",children:$.jsx(Dl,{size:14,strokeWidth:2.5})})]},"open")})}),$.jsx(ds,{children:e&&$.jsxs(jl.div,{initial:{opacity:0,x:a?160:-160},animate:{opacity:1,x:0},exit:{opacity:0,x:a?160:-160},transition:{type:"spring",damping:30,stiffness:220},style:{position:"fixed",top:0,[a?"right":"left"]:0,height:"100%",width:"100%",maxWidth:"520px",zIndex:40,background:"rgba(255, 255, 255, 0.97)",backdropFilter:"blur(24px)",WebkitBackdropFilter:"blur(24px)",borderLeft:a?`1px solid rgba(${qv(n)}, 0.15)`:"none",borderRight:a?"none":`1px solid rgba(${qv(n)}, 0.15)`,boxShadow:a?"-24px 0 80px -8px rgba(0,0,0,0.22), -4px 0 24px -4px rgba(0,0,0,0.10), inset 1px 0 0 rgba(255,255,255,0.8)":"24px 0 80px -8px rgba(0,0,0,0.22), 4px 0 24px -4px rgba(0,0,0,0.10), inset -1px 0 0 rgba(255,255,255,0.8)",overflow:"hidden"},children:[$.jsx("div",{style:{position:"absolute",top:0,left:0,right:0,height:"3px",background:`linear-gradient(90deg, ${n}, ${n}88)`,zIndex:1}}),$.jsx(Hv,{close:()=>t(!1)})]},"drawer")})]})};function qv(e){const t=e.replace("#",""),n=3===t.length?t.split("").map(e=>e+e).join(""):t,r=parseInt(n,16);return`${r>>16&255}, ${r>>8&255}, ${255&r}`}const Wv=()=>{const{primaryColor:e}=hc();return $.jsx("style",{children:`\n /* 1. Injection de tout Tailwind v4 */\n /*! tailwindcss v4.2.4 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}@layer theme{:root,:host{--font-sans:"Inter", ui-sans-serif, system-ui, sans-serif;--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-900:oklch(41.4% .112 45.904);--color-emerald-50:oklch(97.9% .021 166.113);--color-emerald-100:oklch(95% .052 163.051);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-800:oklch(43.2% .095 166.913);--color-blue-50:oklch(97% .014 254.604);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-indigo-50:oklch(96.2% .018 272.314);--color-indigo-100:oklch(93% .034 272.788);--color-indigo-500:oklch(58.5% .233 277.117);--color-indigo-700:oklch(45.7% .24 277.023);--color-violet-500:oklch(60.6% .25 292.717);--color-slate-50:oklch(98.4% .003 247.858);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--color-slate-950:oklch(12.9% .042 264.695);--color-black:#000;--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--font-weight-medium:500;--font-weight-bold:700;--font-weight-black:900;--tracking-tighter:-.05em;--tracking-tight:-.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-tight:1.25;--leading-relaxed:1.625;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--radius-3xl:1.5rem;--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0, 0, .2, 1) infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-sm:8px;--blur-md:12px;--blur-lg:16px;--blur-xl:24px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.-top-3{top:calc(var(--spacing) * -3)}.top-4{top:calc(var(--spacing) * 4)}.-right-2{right:calc(var(--spacing) * -2)}.-right-3{right:calc(var(--spacing) * -3)}.right-0{right:calc(var(--spacing) * 0)}.-bottom-2{bottom:calc(var(--spacing) * -2)}.bottom-0{bottom:calc(var(--spacing) * 0)}.bottom-4{bottom:calc(var(--spacing) * 4)}.left-0{left:calc(var(--spacing) * 0)}.z-50{z-index:50}.z-\\[999999\\]{z-index:999999}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.mx-auto{margin-inline:auto}.mt-0\\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:calc(var(--spacing) * 1)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mb-1{margin-bottom:calc(var(--spacing) * 1)}.mb-1\\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.mb-8{margin-bottom:calc(var(--spacing) * 8)}.mb-10{margin-bottom:calc(var(--spacing) * 10)}.ml-1{margin-left:calc(var(--spacing) * 1)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-flex{display:inline-flex}.h-1{height:calc(var(--spacing) * 1)}.h-1\\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-3\\.5{height:calc(var(--spacing) * 3.5)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-10{height:calc(var(--spacing) * 10)}.h-16{height:calc(var(--spacing) * 16)}.h-20{height:calc(var(--spacing) * 20)}.h-40{height:calc(var(--spacing) * 40)}.h-auto{height:auto}.h-full{height:100%}.max-h-32{max-height:calc(var(--spacing) * 32)}.max-h-48{max-height:calc(var(--spacing) * 48)}.min-h-full{min-height:100%}.w-1{width:calc(var(--spacing) * 1)}.w-1\\.5{width:calc(var(--spacing) * 1.5)}.w-2{width:calc(var(--spacing) * 2)}.w-3\\.5{width:calc(var(--spacing) * 3.5)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-10{width:calc(var(--spacing) * 10)}.w-16{width:calc(var(--spacing) * 16)}.w-20{width:calc(var(--spacing) * 20)}.w-full{width:100%}.max-w-\\[88\\%\\]{max-width:88%}.max-w-\\[100px\\]{max-width:100px}.max-w-\\[160px\\]{max-width:160px}.max-w-\\[240px\\]{max-width:240px}.max-w-\\[480px\\]{max-width:480px}.flex-1{flex:1}.shrink-0{flex-shrink:0}.translate-x-0{--tw-translate-x:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-\\[-4px\\]{--tw-translate-x:-4px;translate:var(--tw-translate-x) var(--tw-translate-y)}.scale-\\[1\\.02\\]{scale:1.02}.rotate-180{rotate:180deg}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-help{cursor:help}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-6{gap:calc(var(--spacing) * 6)}:where(.space-y-1\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.scroll-smooth{scroll-behavior:smooth}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-3xl{border-radius:var(--radius-3xl)}.rounded-\\[24px\\]{border-radius:24px}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-tl-none{border-top-left-radius:0}.rounded-r-full{border-top-right-radius:3.40282e38px;border-bottom-right-radius:3.40282e38px}.rounded-tr-none{border-top-right-radius:0}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-4{border-style:var(--tw-border-style);border-width:4px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-none{--tw-border-style:none;border-style:none}.border-amber-200{border-color:var(--color-amber-200)}.border-black\\/\\[0\\.03\\]{border-color:#00000008}@supports (color:color-mix(in lab,red,red)){.border-black\\/\\[0\\.03\\]{border-color:color-mix(in oklab,var(--color-black) 3%,transparent)}}.border-blue-100{border-color:var(--color-blue-100)}.border-blue-200{border-color:var(--color-blue-200)}.border-blue-500{border-color:var(--color-blue-500)}.border-emerald-100{border-color:var(--color-emerald-100)}.border-indigo-100{border-color:var(--color-indigo-100)}.border-red-400{border-color:var(--color-red-400)}.border-slate-50{border-color:var(--color-slate-50)}.border-slate-100{border-color:var(--color-slate-100)}.border-slate-200{border-color:var(--color-slate-200)}.border-slate-200\\/60{border-color:#e2e8f099}@supports (color:color-mix(in lab,red,red)){.border-slate-200\\/60{border-color:color-mix(in oklab,var(--color-slate-200) 60%,transparent)}}.border-slate-800{border-color:var(--color-slate-800)}.border-transparent{border-color:#0000}.border-white{border-color:var(--color-white)}.border-white\\/40{border-color:#fff6}@supports (color:color-mix(in lab,red,red)){.border-white\\/40{border-color:color-mix(in oklab,var(--color-white) 40%,transparent)}}.border-white\\/50{border-color:#ffffff80}@supports (color:color-mix(in lab,red,red)){.border-white\\/50{border-color:color-mix(in oklab,var(--color-white) 50%,transparent)}}.bg-amber-50{background-color:var(--color-amber-50)}.bg-amber-500{background-color:var(--color-amber-500)}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-400{background-color:var(--color-blue-400)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-emerald-50\\/50{background-color:#ecfdf580}@supports (color:color-mix(in lab,red,red)){.bg-emerald-50\\/50{background-color:color-mix(in oklab,var(--color-emerald-50) 50%,transparent)}}.bg-emerald-400{background-color:var(--color-emerald-400)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-indigo-50\\/50{background-color:#eef2ff80}@supports (color:color-mix(in lab,red,red)){.bg-indigo-50\\/50{background-color:color-mix(in oklab,var(--color-indigo-50) 50%,transparent)}}.bg-red-50{background-color:var(--color-red-50)}.bg-red-500{background-color:var(--color-red-500)}.bg-slate-50{background-color:var(--color-slate-50)}.bg-slate-50\\/50{background-color:#f8fafc80}@supports (color:color-mix(in lab,red,red)){.bg-slate-50\\/50{background-color:color-mix(in oklab,var(--color-slate-50) 50%,transparent)}}.bg-slate-100\\/50{background-color:#f1f5f980}@supports (color:color-mix(in lab,red,red)){.bg-slate-100\\/50{background-color:color-mix(in oklab,var(--color-slate-100) 50%,transparent)}}.bg-slate-200\\/50{background-color:#e2e8f080}@supports (color:color-mix(in lab,red,red)){.bg-slate-200\\/50{background-color:color-mix(in oklab,var(--color-slate-200) 50%,transparent)}}.bg-slate-900{background-color:var(--color-slate-900)}.bg-slate-950{background-color:var(--color-slate-950)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-white\\/20{background-color:#fff3}@supports (color:color-mix(in lab,red,red)){.bg-white\\/20{background-color:color-mix(in oklab,var(--color-white) 20%,transparent)}}.bg-white\\/40{background-color:#fff6}@supports (color:color-mix(in lab,red,red)){.bg-white\\/40{background-color:color-mix(in oklab,var(--color-white) 40%,transparent)}}.bg-white\\/50{background-color:#ffffff80}@supports (color:color-mix(in lab,red,red)){.bg-white\\/50{background-color:color-mix(in oklab,var(--color-white) 50%,transparent)}}.bg-white\\/60{background-color:#fff9}@supports (color:color-mix(in lab,red,red)){.bg-white\\/60{background-color:color-mix(in oklab,var(--color-white) 60%,transparent)}}.bg-white\\/70{background-color:#ffffffb3}@supports (color:color-mix(in lab,red,red)){.bg-white\\/70{background-color:color-mix(in oklab,var(--color-white) 70%,transparent)}}.bg-white\\/90{background-color:#ffffffe6}@supports (color:color-mix(in lab,red,red)){.bg-white\\/90{background-color:color-mix(in oklab,var(--color-white) 90%,transparent)}}.object-contain{object-fit:contain}.p-1{padding:calc(var(--spacing) * 1)}.p-1\\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.px-1{padding-inline:calc(var(--spacing) * 1)}.px-2\\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-10{padding-block:calc(var(--spacing) * 10)}.py-12{padding-block:calc(var(--spacing) * 12)}.py-20{padding-block:calc(var(--spacing) * 20)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pr-1{padding-right:calc(var(--spacing) * 1)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-6{padding-bottom:calc(var(--spacing) * 6)}.pb-10{padding-bottom:calc(var(--spacing) * 10)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[9px\\]{font-size:9px}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[14px\\]{font-size:14px}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-black{--tw-font-weight:var(--font-weight-black);font-weight:var(--font-weight-black)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.tracking-\\[0\\.2em\\]{--tw-tracking:.2em;letter-spacing:.2em}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-tighter{--tw-tracking:var(--tracking-tighter);letter-spacing:var(--tracking-tighter)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.text-amber-500{color:var(--color-amber-500)}.text-amber-600{color:var(--color-amber-600)}.text-amber-900{color:var(--color-amber-900)}.text-blue-400{color:var(--color-blue-400)}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-emerald-400{color:var(--color-emerald-400)}.text-emerald-500{color:var(--color-emerald-500)}.text-emerald-600{color:var(--color-emerald-600)}.text-emerald-800{color:var(--color-emerald-800)}.text-indigo-500{color:var(--color-indigo-500)}.text-indigo-700{color:var(--color-indigo-700)}.text-red-400{color:var(--color-red-400)}.text-red-500{color:var(--color-red-500)}.text-slate-100{color:var(--color-slate-100)}.text-slate-200{color:var(--color-slate-200)}.text-slate-300{color:var(--color-slate-300)}.text-slate-400{color:var(--color-slate-400)}.text-slate-500{color:var(--color-slate-500)}.text-slate-600{color:var(--color-slate-600)}.text-slate-700{color:var(--color-slate-700)}.text-slate-800{color:var(--color-slate-800)}.text-slate-900{color:var(--color-slate-900)}.text-violet-500{color:var(--color-violet-500)}.text-white{color:var(--color-white)}.uppercase{text-transform:uppercase}.italic{font-style:italic}.opacity-0{opacity:0}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_-10px_30px_rgba\\(0\\,0\\,0\\,0\\.02\\)\\]{--tw-shadow:0 -10px 30px var(--tw-shadow-color,#00000005);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_8px_32px_rgba\\(0\\,0\\,0\\,0\\.15\\)\\]{--tw-shadow:0 8px 32px var(--tw-shadow-color,#00000026);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-inner{--tw-shadow:inset 0 2px 4px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-blue-50{--tw-ring-color:var(--color-blue-50)}.ring-red-500{--tw-ring-color:var(--color-red-500)}.backdrop-blur-lg{--tw-backdrop-blur:blur(var(--blur-lg));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-xl{--tw-backdrop-blur:blur(var(--blur-xl));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.duration-700{--tw-duration:.7s;transition-duration:.7s}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}@media(hover:hover){.group-hover\\:translate-x-0:is(:where(.group):hover *){--tw-translate-x:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.group-hover\\:bg-blue-50\\/50:is(:where(.group):hover *){background-color:#eff6ff80}@supports (color:color-mix(in lab,red,red)){.group-hover\\:bg-blue-50\\/50:is(:where(.group):hover *){background-color:color-mix(in oklab,var(--color-blue-50) 50%,transparent)}}.group-hover\\:text-blue-400:is(:where(.group):hover *){color:var(--color-blue-400)}.group-hover\\:text-blue-500:is(:where(.group):hover *){color:var(--color-blue-500)}.group-hover\\:text-slate-900:is(:where(.group):hover *){color:var(--color-slate-900)}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}}.placeholder\\:text-slate-300::placeholder{color:var(--color-slate-300)}.focus-within\\:border-blue-400:focus-within{border-color:var(--color-blue-400)}@media(hover:hover){.hover\\:scale-110:hover{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x) var(--tw-scale-y)}.hover\\:scale-\\[1\\.01\\]:hover{scale:1.01}.hover\\:border-blue-100:hover{border-color:var(--color-blue-100)}.hover\\:border-blue-200:hover{border-color:var(--color-blue-200)}.hover\\:border-blue-300:hover{border-color:var(--color-blue-300)}.hover\\:border-slate-200:hover{border-color:var(--color-slate-200)}.hover\\:bg-blue-50:hover{background-color:var(--color-blue-50)}.hover\\:bg-red-50:hover{background-color:var(--color-red-50)}.hover\\:bg-white:hover{background-color:var(--color-white)}.hover\\:text-blue-600:hover{color:var(--color-blue-600)}.hover\\:text-red-500:hover{color:var(--color-red-500)}.hover\\:text-slate-600:hover{color:var(--color-slate-600)}.hover\\:shadow-md:hover{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\\:shadow-sm:hover{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\\:ring-0:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:ring-blue-500\\/20:focus{--tw-ring-color:#3080ff33}@supports (color:color-mix(in lab,red,red)){.focus\\:ring-blue-500\\/20:focus{--tw-ring-color:color-mix(in oklab, var(--color-blue-500) 20%, transparent)}}.focus\\:ring-emerald-500\\/50:focus{--tw-ring-color:#00bb7f80}@supports (color:color-mix(in lab,red,red)){.focus\\:ring-emerald-500\\/50:focus{--tw-ring-color:color-mix(in oklab, var(--color-emerald-500) 50%, transparent)}}.active\\:scale-\\[0\\.98\\]:active{scale:.98}.disabled\\:opacity-30:disabled{opacity:.3}@media(min-width:48rem){.md\\:col-span-2{grid-column:span 2/span 2}.md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}}\n\n /* 2. Variables dynamiques basées sur la config */\n :host {\n --dhi-primary: ${e};\n --dhi-primary-soft: ${e}15;\n font-family: 'Inter', system-ui, sans-serif;\n display: block;\n position: relative;\n z-index: 999999;\n }\n\n /* Forcer la taille du conteneur pour que la bulle fixed soit visible */\n .dhi-copilot-wrapper {\n position: fixed;\n bottom: 0;\n right: 0;\n pointer-events: none; /* Laisse passer les clics sur le site hôte */\n }\n\n .dhi-copilot-wrapper > * {\n pointer-events: auto; /* Mais capture les clics sur la bulle et le tiroir */\n }\n \n /* 3. Overrides et helpers personnalisés */\n .bg-primary { background-color: var(--dhi-primary) !important; }\n .text-primary { color: var(--dhi-primary) !important; }\n .border-primary { border-color: var(--dhi-primary) !important; }\n \n .custom-scrollbar::-webkit-scrollbar { width: 4px; }\n .custom-scrollbar::-webkit-scrollbar-thumb {\n background: rgba(0,0,0,0.1);\n border-radius: 10px;\n }\n\n .glass {\n background: rgba(255, 255, 255, 0.7);\n backdrop-filter: blur(20px);\n -webkit-backdrop-filter: blur(20px);\n border: 1px solid rgba(255, 255, 255, 0.3);\n }\n\n /* Styles pour le rendu Markdown */\n .prose-custom { font-size: 14px; line-height: 1.6; color: #334155; }\n .prose-custom p { margin-bottom: 0.8em; }\n .prose-custom code {\n background: rgba(0,0,0,0.05);\n padding: 2px 4px;\n border-radius: 4px;\n font-family: monospace;\n }\n .prose-custom pre {\n background: #1e293b;\n color: #f8fafc;\n padding: 12px;\n border-radius: 8px;\n overflow-x: auto;\n }\n `})},Kv=function(e,t={}){return function(e,t,r){var o,i,a;t.props||(t.props=e.propTypes?Object.keys(e.propTypes):[]),t.events||(t.events=[]);const s=Array.isArray(t.props)?t.props.slice():Object.keys(t.props),l=Array.isArray(t.events)?t.events.slice():Object.keys(t.events),c={},u={},d={},f={};for(const n of s){c[n]=Array.isArray(t.props)?"string":t.props[n];const e=N(n);d[n]=e,f[e]=n}for(const n of l)u[n]=Array.isArray(t.events)?{}:t.events[n];class p extends HTMLElement{constructor(){super(),n(this,a,!0),n(this,i),n(this,o,{}),n(this,"container"),t.shadow?this.container=this.attachShadow({mode:t.shadow}):this.container=this,this[M].container=this.container;for(const e of s){const t=d[e],n=this.getAttribute(t),r=c[e],o=r?L[r]:null;(null==o?void 0:o.parse)&&(n||"method"===r)&&(this[M][e]=o.parse(n,t,this))}for(const e of l)this[M][e]=t=>{const n=e.replace(/^on/,"").toLowerCase();this.dispatchEvent(new CustomEvent(n,{detail:t,...u[e]}))}}static get observedAttributes(){return Object.keys(f)}connectedCallback(){this[D]=!0,this[O]()}disconnectedCallback(){this[D]=!1,this[_]&&r.unmount(this[_]),delete this[_]}attributeChangedCallback(e,t,n){const r=f[e],o=c[r],i=o?L[o]:null;r in c&&(null==i?void 0:i.parse)&&(n||"method"===o)&&(this[M][r]=i.parse(n,e,this),this[O]())}[(a=D,i=_,o=M,O)](){this[D]&&(this[_]?r.update(this[_],this[M]):this[_]=r.mount(this.container,e,this[M]))}}for(const n of s){const e=d[n],t=c[n];Object.defineProperty(p.prototype,n,{enumerable:!0,configurable:!0,get(){return this[M][n]},set(r){this[M][n]=r;const o=t?L[t]:null;if(null==o?void 0:o.stringify){const t=o.stringify(r,e,this);this.getAttribute(e)!==t&&(null==t?this.removeAttribute(e):this.setAttribute(e,t))}else n in c&&(null==o?void 0:o.parse)&&(r||"method"===t)&&(this[M][n]=o.parse(r,e,this)),this[O]()}})}return p}(e,t,{mount:z,update:F,unmount:I})}(({config:e})=>{const[t,n]=u.useState(!1),r=Gd(e=>e.setConfig),o=u.useMemo(()=>{if(!e)return null;try{return"string"==typeof e?JSON.parse(e):e}catch(t){return console.error("[DHI Copilot] Impossible de parser la config :",t),null}},[e]);return u.useEffect(()=>{o&&r(o)},[o,r]),u.useEffect(()=>(t&&window.innerWidth<768?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[t]),o?$.jsxs(pc,{value:o,children:[$.jsx(Wv,{}),$.jsx($v,{isOpen:t,setIsOpen:n})]}):null},{props:{config:"json"},shadow:"open"});customElements.get("dhi-copilot-ai")||customElements.define("dhi-copilot-ai",Kv)});
|
|
20
|
+
*/const yc=e=>{const t=(e=>e?mc(e):mc)(e),n=e=>function(e,t=gc){const n=d.useSyncExternalStore(e.subscribe,d.useCallback(()=>t(e.getState()),[e,t]),d.useCallback(()=>t(e.getInitialState()),[e,t]));return d.useDebugValue(n),n}(t,e);return Object.assign(n,t),n};function vc(e,t){return function(){return e.apply(t,arguments)}}const{toString:bc}=Object.prototype,{getPrototypeOf:xc}=Object,{iterator:wc,toStringTag:kc}=Symbol,Sc=(e=>t=>{const n=bc.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ec=e=>(e=e.toLowerCase(),t=>Sc(t)===e),Cc=e=>t=>typeof t===e,{isArray:Tc}=Array,Pc=Cc("undefined");function Ac(e){return null!==e&&!Pc(e)&&null!==e.constructor&&!Pc(e.constructor)&&Rc(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const jc=Ec("ArrayBuffer");const Nc=Cc("string"),Rc=Cc("function"),Lc=Cc("number"),Oc=e=>null!==e&&"object"==typeof e,Dc=e=>{if("object"!==Sc(e))return!1;const t=xc(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||kc in e||wc in e)},_c=Ec("Date"),Mc=Ec("File"),zc=Ec("Blob"),Fc=Ec("FileList");const Ic="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},Bc=void 0!==Ic.FormData?Ic.FormData:void 0,Vc=Ec("URLSearchParams"),[Uc,Hc,$c,qc]=["ReadableStream","Request","Response","Headers"].map(Ec);function Wc(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),Tc(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(Ac(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let a;for(r=0;r<i;r++)a=o[r],t.call(null,e[a],a,e)}}function Kc(e,t){if(Ac(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const Yc="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,Qc=e=>!Pc(e)&&e!==Yc;const Xc=(e=>t=>e&&t instanceof e)("undefined"!=typeof Uint8Array&&xc(Uint8Array)),Gc=Ec("HTMLFormElement"),Jc=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Zc=Ec("RegExp"),eu=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Wc(n,(n,o)=>{let i;!1!==(i=t(n,o,e))&&(r[o]=i||n)}),Object.defineProperties(e,r)};const tu=Ec("AsyncFunction"),nu=(ru="function"==typeof setImmediate,ou=Rc(Yc.postMessage),ru?setImmediate:ou?(iu=`axios@${Math.random()}`,au=[],Yc.addEventListener("message",({source:e,data:t})=>{e===Yc&&t===iu&&au.length&&au.shift()()},!1),e=>{au.push(e),Yc.postMessage(iu,"*")}):e=>setTimeout(e));var ru,ou,iu,au;const su="undefined"!=typeof queueMicrotask?queueMicrotask.bind(Yc):"undefined"!=typeof process&&process.nextTick||nu,lu={isArray:Tc,isArrayBuffer:jc,isBuffer:Ac,isFormData:e=>{if(!e)return!1;if(Bc&&e instanceof Bc)return!0;const t=xc(e);if(!t||t===Object.prototype)return!1;if(!Rc(e.append))return!1;const n=Sc(e);return"formdata"===n||"object"===n&&Rc(e.toString)&&"[object FormData]"===e.toString()},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&jc(e.buffer),t},isString:Nc,isNumber:Lc,isBoolean:e=>!0===e||!1===e,isObject:Oc,isPlainObject:Dc,isEmptyObject:e=>{if(!Oc(e)||Ac(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},isReadableStream:Uc,isRequest:Hc,isResponse:$c,isHeaders:qc,isUndefined:Pc,isDate:_c,isFile:Mc,isReactNativeBlob:e=>!(!e||void 0===e.uri),isReactNative:e=>e&&void 0!==e.getParts,isBlob:zc,isRegExp:Zc,isFunction:Rc,isStream:e=>Oc(e)&&Rc(e.pipe),isURLSearchParams:Vc,isTypedArray:Xc,isFileList:Fc,forEach:Wc,merge:function e(...t){const{caseless:n,skipUndefined:r}=Qc(this)&&this||{},o={},i=(t,i)=>{if("__proto__"===i||"constructor"===i||"prototype"===i)return;const a=n&&Kc(o,i)||i,s=Jc(o,a)?o[a]:void 0;Dc(s)&&Dc(t)?o[a]=e(s,t):Dc(t)?o[a]=e({},t):Tc(t)?o[a]=t.slice():r&&Pc(t)||(o[a]=t)};for(let a=0,s=t.length;a<s;a++)t[a]&&Wc(t[a],i);return o},extend:(e,t,n,{allOwnKeys:r}={})=>(Wc(t,(t,r)=>{n&&Rc(t)?Object.defineProperty(e,r,{__proto__:null,value:vc(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,r,{__proto__:null,value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,i,a;const s={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],r&&!r(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==n&&xc(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:Sc,kindOfTest:Ec,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(Tc(e))return e;let t=e.length;if(!Lc(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[wc]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:Gc,hasOwnProperty:Jc,hasOwnProp:Jc,reduceDescriptors:eu,freezeMethods:e=>{eu(e,(t,n)=>{if(Rc(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];Rc(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach(e=>{n[e]=!0})};return Tc(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:Kc,global:Yc,isContextDefined:Qc,isSpecCompliantForm:function(e){return!!(e&&Rc(e.append)&&"FormData"===e[kc]&&e[wc])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(Oc(e)){if(t.indexOf(e)>=0)return;if(Ac(e))return e;if(!("toJSON"in e)){t[r]=e;const o=Tc(e)?[]:{};return Wc(e,(e,t)=>{const i=n(e,r+1);!Pc(i)&&(o[t]=i)}),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:tu,isThenable:e=>e&&(Oc(e)||Rc(e))&&Rc(e.then)&&Rc(e.catch),setImmediate:nu,asap:su,isIterable:e=>null!=e&&Rc(e[wc])},cu=lu.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),uu=Symbol("internals"),du=/[^\x09\x20-\x7E\x80-\xFF]/g;function fu(e){return e&&String(e).trim().toLowerCase()}function pu(e){return!1===e||null==e?e:lu.isArray(e)?e.map(pu):function(e){let t=0,n=e.length;for(;t<n;){const n=e.charCodeAt(t);if(9!==n&&32!==n)break;t+=1}for(;n>t;){const t=e.charCodeAt(n-1);if(9!==t&&32!==t)break;n-=1}return 0===t&&n===e.length?e:e.slice(t,n)}(String(e).replace(du,""))}function hu(e,t,n,r,o){return lu.isFunction(r)?r.call(this,t,n):(o&&(t=n),lu.isString(t)?lu.isString(r)?-1!==t.indexOf(r):lu.isRegExp(r)?r.test(t):void 0:void 0)}let mu=class{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=fu(t);if(!o)throw new Error("header name must be a non-empty string");const i=lu.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=pu(e))}const i=(e,t)=>lu.forEach(e,(e,n)=>o(e,n,t));if(lu.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(lu.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach(function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&cu[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t})(e),t);else if(lu.isObject(e)&&lu.isIterable(e)){let n,r,o={};for(const t of e){if(!lu.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[r=t[0]]=(n=o[r])?lu.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}i(o,t)}else null!=e&&o(t,e,n);return this}get(e,t){if(e=fu(e)){const n=lu.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(lu.isFunction(t))return t.call(this,e,n);if(lu.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=fu(e)){const n=lu.findKey(this,e);return!(!n||void 0===this[n]||t&&!hu(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=fu(e)){const o=lu.findKey(n,e);!o||t&&!hu(0,n[o],o,t)||(delete n[o],r=!0)}}return lu.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!hu(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return lu.forEach(this,(r,o)=>{const i=lu.findKey(n,o);if(i)return t[i]=pu(r),void delete t[o];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(o):String(o).trim();a!==o&&delete t[o],t[a]=pu(r),n[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return lu.forEach(this,(n,r)=>{null!=n&&!1!==n&&(t[r]=e&&lu.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[uu]=this[uu]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=fu(e);t[r]||(!function(e,t){const n=lu.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})})}(n,e),t[r]=!0)}return lu.isArray(e)?e.forEach(r):r(e),this}};mu.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),lu.reduceDescriptors(mu.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),lu.freezeMethods(mu);function gu(e,t){const n=new Set(t.map(e=>String(e).toLowerCase())),r=[],o=e=>{if(null===e||"object"!=typeof e)return e;if(lu.isBuffer(e))return e;if(-1!==r.indexOf(e))return;let t;if(e instanceof mu&&(e=e.toJSON()),r.push(e),lu.isArray(e))t=[],e.forEach((e,n)=>{const r=o(e);lu.isUndefined(r)||(t[n]=r)});else{if(!lu.isPlainObject(e)&&function(e){if(lu.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(lu.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}(e))return r.pop(),e;t=Object.create(null);for(const[r,i]of Object.entries(e)){const e=n.has(r.toLowerCase())?"[REDACTED ****]":o(i);lu.isUndefined(e)||(t[r]=e)}}return r.pop(),t};return o(e)}let yu=class e extends Error{static from(t,n,r,o,i,a){const s=new e(t.message,n||t.code,r,o,i);return s.cause=t,s.name=t.name,null!=t.status&&null==s.status&&(s.status=t.status),a&&Object.assign(s,a),s}constructor(e,t,n,r,o){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status)}toJSON(){const e=this.config,t=e&&lu.hasOwnProp(e,"redact")?e.redact:void 0,n=lu.isArray(t)&&t.length>0?gu(e,t):lu.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}};yu.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",yu.ERR_BAD_OPTION="ERR_BAD_OPTION",yu.ECONNABORTED="ECONNABORTED",yu.ETIMEDOUT="ETIMEDOUT",yu.ECONNREFUSED="ECONNREFUSED",yu.ERR_NETWORK="ERR_NETWORK",yu.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",yu.ERR_DEPRECATED="ERR_DEPRECATED",yu.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",yu.ERR_BAD_REQUEST="ERR_BAD_REQUEST",yu.ERR_CANCELED="ERR_CANCELED",yu.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",yu.ERR_INVALID_URL="ERR_INVALID_URL",yu.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";function vu(e){return lu.isPlainObject(e)||lu.isArray(e)}function bu(e){return lu.endsWith(e,"[]")?e.slice(0,-2):e}function xu(e,t,n){return e?e.concat(t).map(function(e,t){return e=bu(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}const wu=lu.toFlatObject(lu,{},null,function(e){return/^is[A-Z]/.test(e)});function ku(e,t,n){if(!lu.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=lu.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!lu.isUndefined(t[e])})).metaTokens,o=n.visitor||d,i=n.dots,a=n.indexes,s=n.Blob||"undefined"!=typeof Blob&&Blob,l=void 0===n.maxDepth?100:n.maxDepth,c=s&&lu.isSpecCompliantForm(t);if(!lu.isFunction(o))throw new TypeError("visitor must be a function");function u(e){if(null===e)return"";if(lu.isDate(e))return e.toISOString();if(lu.isBoolean(e))return e.toString();if(!c&&lu.isBlob(e))throw new yu("Blob is not supported. Use a Buffer instead.");return lu.isArrayBuffer(e)||lu.isTypedArray(e)?c&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function d(e,n,o){let s=e;if(lu.isReactNative(t)&&lu.isReactNativeBlob(e))return t.append(xu(o,n,i),u(e)),!1;if(e&&!o&&"object"==typeof e)if(lu.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(lu.isArray(e)&&function(e){return lu.isArray(e)&&!e.some(vu)}(e)||(lu.isFileList(e)||lu.endsWith(n,"[]"))&&(s=lu.toArray(e)))return n=bu(n),s.forEach(function(e,r){!lu.isUndefined(e)&&null!==e&&t.append(!0===a?xu([n],r,i):null===a?n:n+"[]",u(e))}),!1;return!!vu(e)||(t.append(xu(o,n,i),u(e)),!1)}const f=[],p=Object.assign(wu,{defaultVisitor:d,convertValue:u,isVisitable:vu});if(!lu.isObject(e))throw new TypeError("data must be an object");return function e(n,r,i=0){if(!lu.isUndefined(n)){if(i>l)throw new yu("Object is too deeply nested ("+i+" levels). Max depth: "+l,yu.ERR_FORM_DATA_DEPTH_EXCEEDED);if(-1!==f.indexOf(n))throw Error("Circular reference detected in "+r.join("."));f.push(n),lu.forEach(n,function(n,a){!0===(!(lu.isUndefined(n)||null===n)&&o.call(t,n,lu.isString(a)?a.trim():a,r,p))&&e(n,r?r.concat(a):[a],i+1)}),f.pop()}}(e),t}function Su(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(e){return t[e]})}function Eu(e,t){this._pairs=[],e&&ku(e,this,t)}const Cu=Eu.prototype;function Tu(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Pu(e,t,n){if(!t)return e;const r=n&&n.encode||Tu,o=lu.isFunction(n)?{serialize:n}:n,i=o&&o.serialize;let a;if(a=i?i(t,o):lu.isURLSearchParams(t)?t.toString():new Eu(t,o).toString(r),a){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}Cu.append=function(e,t){this._pairs.push([e,t])},Cu.toString=function(e){const t=e?function(t){return e.call(this,t,Su)}:Su;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};class Au{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){lu.forEach(this.handlers,function(t){null!==t&&e(t)})}}const ju={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},Nu={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Eu,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Ru="undefined"!=typeof window&&"undefined"!=typeof document,Lu="object"==typeof navigator&&navigator||void 0,Ou=Ru&&(!Lu||["ReactNative","NativeScript","NS"].indexOf(Lu.product)<0),Du="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,_u=Ru&&window.location.href||"http://localhost",Mu={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ru,hasStandardBrowserEnv:Ou,hasStandardBrowserWebWorkerEnv:Du,navigator:Lu,origin:_u},Symbol.toStringTag,{value:"Module"})),...Nu};function zu(e){function t(e,n,r,o){let i=e[o++];if("__proto__"===i)return!0;const a=Number.isFinite(+i),s=o>=e.length;if(i=!i&&lu.isArray(r)?r.length:i,s)return lu.hasOwnProp(r,i)?r[i]=lu.isArray(r[i])?r[i].concat(n):[r[i],n]:r[i]=n,!a;r[i]&&lu.isObject(r[i])||(r[i]=[]);return t(e,n,r[i],o)&&lu.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}(r[i])),!a}if(lu.isFormData(e)&&lu.isFunction(e.entries)){const n={};return lu.forEachEntry(e,(e,r)=>{t(function(e){return lu.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),r,n,0)}),n}return null}const Fu=(e,t)=>null!=e&&lu.hasOwnProp(e,t)?e[t]:void 0;const Iu={transitional:ju,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=lu.isObject(e);o&&lu.isHTMLForm(e)&&(e=new FormData(e));if(lu.isFormData(e))return r?JSON.stringify(zu(e)):e;if(lu.isArrayBuffer(e)||lu.isBuffer(e)||lu.isStream(e)||lu.isFile(e)||lu.isBlob(e)||lu.isReadableStream(e))return e;if(lu.isArrayBufferView(e))return e.buffer;if(lu.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){const t=Fu(this,"formSerializer");if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return ku(e,new Mu.classes.URLSearchParams,{visitor:function(e,t,n,r){return Mu.isNode&&lu.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...t})}(e,t).toString();if((i=lu.isFileList(e))||n.indexOf("multipart/form-data")>-1){const n=Fu(this,"env"),r=n&&n.FormData;return ku(i?{"files[]":e}:e,r&&new r,t)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(lu.isString(e))try{return(t||JSON.parse)(e),lu.trim(e)}catch(r){if("SyntaxError"!==r.name)throw r}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=Fu(this,"transitional")||Iu.transitional,n=t&&t.forcedJSONParsing,r=Fu(this,"responseType"),o="json"===r;if(lu.isResponse(e)||lu.isReadableStream(e))return e;if(e&&lu.isString(e)&&(n&&!r||o)){const n=!(t&&t.silentJSONParsing)&&o;try{return JSON.parse(e,Fu(this,"parseReviver"))}catch(i){if(n){if("SyntaxError"===i.name)throw yu.from(i,yu.ERR_BAD_RESPONSE,this,null,Fu(this,"response"));throw i}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Mu.classes.FormData,Blob:Mu.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};function Bu(e,t){const n=this||Iu,r=t||n,o=mu.from(r.headers);let i=r.data;return lu.forEach(e,function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function Vu(e){return!(!e||!e.__CANCEL__)}lu.forEach(["delete","get","head","post","put","patch","query"],e=>{Iu.headers[e]={}});let Uu=class extends yu{constructor(e,t,n){super(null==e?"canceled":e,yu.ERR_CANCELED,t,n),this.name="CanceledError",this.__CANCEL__=!0}};function Hu(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new yu("Request failed with status code "+n.status,n.status>=400&&n.status<500?yu.ERR_BAD_REQUEST:yu.ERR_BAD_RESPONSE,n.config,n.request,n)):e(n)}const $u=(e,t,n=3)=>{let r=0;const o=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,i=0,a=0;return t=void 0!==t?t:1e3,function(s){const l=Date.now(),c=r[a];o||(o=l),n[i]=s,r[i]=l;let u=a,d=0;for(;u!==i;)d+=n[u++],u%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),l-o<t)return;const f=c&&l-c;return f?Math.round(1e3*d/f):void 0}}(50,250);return function(e,t){let n,r,o=0,i=1e3/t;const a=(t,i=Date.now())=>{o=i,n=null,r&&(clearTimeout(r),r=null),e(...t)};return[(...e)=>{const t=Date.now(),s=t-o;s>=i?a(e,t):(n=e,r||(r=setTimeout(()=>{r=null,a(n)},i-s)))},()=>n&&a(n)]}(n=>{const i=n.loaded,a=n.lengthComputable?n.total:void 0,s=null!=a?Math.min(i,a):i,l=Math.max(0,s-r),c=o(l);r=Math.max(r,s);e({loaded:s,total:a,progress:a?s/a:void 0,bytes:l,rate:c||void 0,estimated:c&&a?(a-s)/c:void 0,event:n,lengthComputable:null!=a,[t?"download":"upload"]:!0})},n)},qu=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Wu=e=>(...t)=>lu.asap(()=>e(...t)),Ku=Mu.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Mu.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Mu.origin),Mu.navigator&&/(msie|trident)/i.test(Mu.navigator.userAgent)):()=>!0,Yu=Mu.hasStandardBrowserEnv?{write(e,t,n,r,o,i,a){if("undefined"==typeof document)return;const s=[`${e}=${encodeURIComponent(t)}`];lu.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),lu.isString(r)&&s.push(`path=${r}`),lu.isString(o)&&s.push(`domain=${o}`),!0===i&&s.push("secure"),lu.isString(a)&&s.push(`SameSite=${a}`),document.cookie=s.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const r=t[n].replace(/^\s+/,""),o=r.indexOf("=");if(-1!==o&&r.slice(0,o)===e)return decodeURIComponent(r.slice(o+1))}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function Qu(e,t,n){let r=!("string"==typeof(o=t)&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(o));var o;return e&&(r||!1===n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Xu=e=>e instanceof mu?{...e}:e;function Gu(e,t){t=t||{};const n=Object.create(null);function r(e,t,n,r){return lu.isPlainObject(e)&&lu.isPlainObject(t)?lu.merge.call({caseless:r},e,t):lu.isPlainObject(t)?lu.merge({},t):lu.isArray(t)?t.slice():t}function o(e,t,n,o){return lu.isUndefined(t)?lu.isUndefined(e)?void 0:r(void 0,e,0,o):r(e,t,0,o)}function i(e,t){if(!lu.isUndefined(t))return r(void 0,t)}function a(e,t){return lu.isUndefined(t)?lu.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,o,i){return lu.hasOwnProp(t,i)?r(n,o):lu.hasOwnProp(e,i)?r(void 0,n):void 0}Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});const l={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,allowedSocketPaths:a,responseEncoding:a,validateStatus:s,headers:(e,t,n)=>o(Xu(e),Xu(t),0,!0)};return lu.forEach(Object.keys({...e,...t}),function(r){if("__proto__"===r||"constructor"===r||"prototype"===r)return;const i=lu.hasOwnProp(l,r)?l[r]:o,a=i(lu.hasOwnProp(e,r)?e[r]:void 0,lu.hasOwnProp(t,r)?t[r]:void 0,r);lu.isUndefined(a)&&i!==s||(n[r]=a)}),n}const Ju=["content-type","content-length"];const Zu=e=>{const t=Gu({},e),n=e=>lu.hasOwnProp(t,e)?t[e]:void 0,r=n("data");let o=n("withXSRFToken");const i=n("xsrfHeaderName"),a=n("xsrfCookieName");let s=n("headers");const l=n("auth"),c=n("baseURL"),u=n("allowAbsoluteUrls"),d=n("url");var f;if(t.headers=s=mu.from(s),t.url=Pu(Qu(c,d,u),e.params,e.paramsSerializer),l&&s.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?(f=l.password,encodeURIComponent(f).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16)))):""))),lu.isFormData(r)&&(Mu.hasStandardBrowserEnv||Mu.hasStandardBrowserWebWorkerEnv?s.setContentType(void 0):lu.isFunction(r.getHeaders)&&function(e,t,n){"content-only"===n?Object.entries(t).forEach(([t,n])=>{Ju.includes(t.toLowerCase())&&e.set(t,n)}):e.set(t)}(s,r.getHeaders(),n("formDataHeaderPolicy"))),Mu.hasStandardBrowserEnv){lu.isFunction(o)&&(o=o(t));if(!0===o||null==o&&Ku(t.url)){const e=i&&a&&Yu.read(a);e&&s.set(i,e)}}return t},ed="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const r=Zu(e);let o=r.data;const i=mu.from(r.headers).normalize();let a,s,l,c,u,{responseType:d,onUploadProgress:f,onDownloadProgress:p}=r;function h(){c&&c(),u&&u(),r.cancelToken&&r.cancelToken.unsubscribe(a),r.signal&&r.signal.removeEventListener("abort",a)}let m=new XMLHttpRequest;function g(){if(!m)return;const r=mu.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());Hu(function(e){t(e),h()},function(e){n(e),h()},{data:d&&"text"!==d&&"json"!==d?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m}),m=null}m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout,"onloadend"in m?m.onloadend=g:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&m.responseURL.startsWith("file:"))&&setTimeout(g)},m.onabort=function(){m&&(n(new yu("Request aborted",yu.ECONNABORTED,e,m)),h(),m=null)},m.onerror=function(t){const r=t&&t.message?t.message:"Network Error",o=new yu(r,yu.ERR_NETWORK,e,m);o.event=t||null,n(o),h(),m=null},m.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||ju;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new yu(t,o.clarifyTimeoutError?yu.ETIMEDOUT:yu.ECONNABORTED,e,m)),h(),m=null},void 0===o&&i.setContentType(null),"setRequestHeader"in m&&lu.forEach(i.toJSON(),function(e,t){m.setRequestHeader(t,e)}),lu.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),d&&"json"!==d&&(m.responseType=r.responseType),p&&([l,u]=$u(p,!0),m.addEventListener("progress",l)),f&&m.upload&&([s,c]=$u(f),m.upload.addEventListener("progress",s),m.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(a=t=>{m&&(n(!t||t.type?new Uu(null,e,m):t),m.abort(),h(),m=null)},r.cancelToken&&r.cancelToken.subscribe(a),r.signal&&(r.signal.aborted?a():r.signal.addEventListener("abort",a)));const y=function(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}(r.url);!y||Mu.protocols.includes(y)?m.send(o||null):n(new yu("Unsupported protocol "+y+":",yu.ERR_BAD_REQUEST,e))})},td=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const o=function(e){if(!n){n=!0,a();const t=e instanceof Error?e:this.reason;r.abort(t instanceof yu?t:new Uu(t instanceof Error?t.message:t))}};let i=t&&setTimeout(()=>{i=null,o(new yu(`timeout of ${t}ms exceeded`,yu.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}),e=null)};e.forEach(e=>e.addEventListener("abort",o));const{signal:s}=r;return s.unsubscribe=()=>lu.asap(a),s}},nd=function*(e,t){let n=e.byteLength;if(n<t)return void(yield e);let r,o=0;for(;o<n;)r=o+t,yield e.slice(o,r),o=r},rd=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},od=(e,t,n,r)=>{const o=async function*(e,t){for await(const n of rd(e))yield*nd(n,t)}(e,t);let i,a=0,s=e=>{i||(i=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await o.next();if(t)return s(),void e.close();let i=r.byteLength;if(n){let e=a+=i;n(e)}e.enqueue(new Uint8Array(r))}catch(t){throw s(t),t}},cancel:e=>(s(e),o.return())},{highWaterMark:2})};const id="1.16.0",{isFunction:ad}=lu,sd=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},ld=e=>{const t=lu.global??globalThis,{ReadableStream:n,TextEncoder:r}=t;e=lu.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:o,Request:i,Response:a}=e,s=o?ad(o):"function"==typeof fetch,l=ad(i),c=ad(a);if(!s)return!1;const u=s&&ad(n),d=s&&("function"==typeof r?(e=>t=>e.encode(t))(new r):async e=>new Uint8Array(await new i(e).arrayBuffer())),f=l&&u&&sd(()=>{let e=!1;const t=new i(Mu.origin,{body:new n,method:"POST",get duplex(){return e=!0,"half"}}),r=t.headers.has("Content-Type");return null!=t.body&&t.body.cancel(),e&&!r}),p=c&&u&&sd(()=>lu.isReadableStream(new a("").body)),h={stream:p&&(e=>e.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!h[e]&&(h[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new yu(`Response type '${e}' is not supported`,yu.ERR_NOT_SUPPORT,n)})});const m=async(e,t)=>{const n=lu.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(lu.isBlob(e))return e.size;if(lu.isSpecCompliantForm(e)){const t=new i(Mu.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return lu.isArrayBufferView(e)||lu.isArrayBuffer(e)?e.byteLength:(lu.isURLSearchParams(e)&&(e+=""),lu.isString(e)?(await d(e)).byteLength:void 0)})(t):n};return async e=>{let{url:t,method:n,data:s,signal:c,cancelToken:u,timeout:d,onDownloadProgress:g,onUploadProgress:y,responseType:v,headers:b,withCredentials:x="same-origin",fetchOptions:w,maxContentLength:k,maxBodyLength:S}=Zu(e);const E=lu.isNumber(k)&&k>-1,C=lu.isNumber(S)&&S>-1;let T=o||fetch;v=v?(v+"").toLowerCase():"text";let P=td([c,u&&u.toAbortSignal()],d),A=null;const j=P&&P.unsubscribe&&(()=>{P.unsubscribe()});let N;try{if(E&&"string"==typeof t&&t.startsWith("data:")){const n=function(e){if(!e||"string"!=typeof e)return 0;if(!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let e=r.length;const t=r.length;for(let s=0;s<t;s++)if(37===r.charCodeAt(s)&&s+2<t){const t=r.charCodeAt(s+1),n=r.charCodeAt(s+2);(t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102)&&(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102)&&(e-=2,s+=2)}let n=0,o=t-1;const i=e=>e>=2&&37===r.charCodeAt(e-2)&&51===r.charCodeAt(e-1)&&(68===r.charCodeAt(e)||100===r.charCodeAt(e));o>=0&&(61===r.charCodeAt(o)?(n++,o--):i(o)&&(n++,o-=3)),1===n&&o>=0&&(61===r.charCodeAt(o)||i(o))&&n++;const a=3*Math.floor(e/4)-(n||0);return a>0?a:0}if("undefined"!=typeof Buffer&&"function"==typeof Buffer.byteLength)return Buffer.byteLength(r,"utf8");let o=0;for(let i=0,a=r.length;i<a;i++){const e=r.charCodeAt(i);if(e<128)o+=1;else if(e<2048)o+=2;else if(e>=55296&&e<=56319&&i+1<a){const e=r.charCodeAt(i+1);e>=56320&&e<=57343?(o+=4,i++):o+=3}else o+=3}return o}(t);if(n>k)throw new yu("maxContentLength size of "+k+" exceeded",yu.ERR_BAD_RESPONSE,e,A)}if(C&&"get"!==n&&"head"!==n){const t=await m(b,s);if("number"==typeof t&&isFinite(t)&&t>S)throw new yu("Request body larger than maxBodyLength limit",yu.ERR_BAD_REQUEST,e,A)}if(y&&f&&"get"!==n&&"head"!==n&&0!==(N=await m(b,s))){let e,n=new i(t,{method:"POST",body:s,duplex:"half"});if(lu.isFormData(s)&&(e=n.headers.get("content-type"))&&b.setContentType(e),n.body){const[e,t]=qu(N,$u(Wu(y)));s=od(n.body,65536,e,t)}}lu.isString(x)||(x=x?"include":"omit");const o=l&&"credentials"in i.prototype;if(lu.isFormData(s)){const e=b.getContentType();e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)&&b.delete("content-type")}b.set("User-Agent","axios/"+id,!1);const c={...w,signal:P,method:n.toUpperCase(),headers:b.normalize().toJSON(),body:s,duplex:"half",credentials:o?x:void 0};A=l&&new i(t,c);let u=await(l?T(A,w):T(t,c));if(E){const t=lu.toFiniteNumber(u.headers.get("content-length"));if(null!=t&&t>k)throw new yu("maxContentLength size of "+k+" exceeded",yu.ERR_BAD_RESPONSE,e,A)}const d=p&&("stream"===v||"response"===v);if(p&&u.body&&(g||E||d&&j)){const t={};["status","statusText","headers"].forEach(e=>{t[e]=u[e]});const n=lu.toFiniteNumber(u.headers.get("content-length")),[r,o]=g&&qu(n,$u(Wu(g),!0))||[];let i=0;const s=t=>{if(E&&(i=t,i>k))throw new yu("maxContentLength size of "+k+" exceeded",yu.ERR_BAD_RESPONSE,e,A);r&&r(t)};u=new a(od(u.body,65536,s,()=>{o&&o(),j&&j()}),t)}v=v||"text";let R=await h[lu.findKey(h,v)||"text"](u,e);if(E&&!p&&!d){let t;if(null!=R&&("number"==typeof R.byteLength?t=R.byteLength:"number"==typeof R.size?t=R.size:"string"==typeof R&&(t="function"==typeof r?(new r).encode(R).byteLength:R.length)),"number"==typeof t&&t>k)throw new yu("maxContentLength size of "+k+" exceeded",yu.ERR_BAD_RESPONSE,e,A)}return!d&&j&&j(),await new Promise((t,n)=>{Hu(t,n,{data:R,headers:mu.from(u.headers),status:u.status,statusText:u.statusText,config:e,request:A})})}catch(R){if(j&&j(),P&&P.aborted&&P.reason instanceof yu){const t=P.reason;throw t.config=e,A&&(t.request=A),R!==t&&(t.cause=R),t}if(R&&"TypeError"===R.name&&/Load failed|fetch/i.test(R.message))throw Object.assign(new yu("Network Error",yu.ERR_NETWORK,e,A,R&&R.response),{cause:R.cause||R});throw yu.from(R,R&&R.code,e,A,R&&R.response)}}},cd=new Map,ud=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,i=[r,o,n];let a,s,l=i.length,c=cd;for(;l--;)a=i[l],s=c.get(a),void 0===s&&c.set(a,s=l?new Map:ld(t)),c=s;return s};ud();const dd={http:null,xhr:ed,fetch:{get:ud}};lu.forEach(dd,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(n){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const fd=e=>`- ${e}`,pd=e=>lu.isFunction(e)||null===e||!1===e;const hd={getAdapter:function(e,t){e=lu.isArray(e)?e:[e];const{length:n}=e;let r,o;const i={};for(let a=0;a<n;a++){let n;if(r=e[a],o=r,!pd(r)&&(o=dd[(n=String(r)).toLowerCase()],void 0===o))throw new yu(`Unknown adapter '${n}'`);if(o&&(lu.isFunction(o)||(o=o.get(t))))break;i[n||"#"+a]=o}if(!o){const e=Object.entries(i).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));let t=n?e.length>1?"since :\n"+e.map(fd).join("\n"):" "+fd(e[0]):"as no adapter specified";throw new yu("There is no suitable adapter to dispatch the request "+t,"ERR_NOT_SUPPORT")}return o},adapters:dd};function md(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Uu(null,e)}function gd(e){md(e),e.headers=mu.from(e.headers),e.data=Bu.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return hd.getAdapter(e.adapter||Iu.adapter,e)(e).then(function(t){md(e),e.response=t;try{t.data=Bu.call(e,e.transformResponse,t)}finally{delete e.response}return t.headers=mu.from(t.headers),t},function(t){if(!Vu(t)&&(md(e),t&&t.response)){e.response=t.response;try{t.response.data=Bu.call(e,e.transformResponse,t.response)}finally{delete e.response}t.response.headers=mu.from(t.response.headers)}return Promise.reject(t)})}const yd={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{yd[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const vd={};yd.transitional=function(e,t,n){function r(e,t){return"[Axios v"+id+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,i)=>{if(!1===e)throw new yu(r(o," has been removed"+(t?" in "+t:"")),yu.ERR_DEPRECATED);return t&&!vd[o]&&(vd[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}},yd.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};const bd={assertOptions:function(e,t,n){if("object"!=typeof e)throw new yu("options must be an object",yu.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=Object.prototype.hasOwnProperty.call(t,i)?t[i]:void 0;if(a){const t=e[i],n=void 0===t||a(t,i,e);if(!0!==n)throw new yu("option "+i+" must be "+n,yu.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new yu("Unknown option "+i,yu.ERR_BAD_OPTION)}},validators:yd},xd=bd.validators;let wd=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Au,response:new Au}}async request(e,t){try{return await this._request(e,t)}catch(n){if(n instanceof Error){let e={};Error.captureStackTrace?Error.captureStackTrace(e):e=new Error;const t=(()=>{if(!e.stack)return"";const t=e.stack.indexOf("\n");return-1===t?"":e.stack.slice(t+1)})();try{if(n.stack){if(t){const e=t.indexOf("\n"),r=-1===e?-1:t.indexOf("\n",e+1),o=-1===r?"":t.slice(r+1);String(n.stack).endsWith(o)||(n.stack+="\n"+t)}}else n.stack=t}catch(r){}}throw n}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Gu(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&bd.assertOptions(n,{silentJSONParsing:xd.transitional(xd.boolean),forcedJSONParsing:xd.transitional(xd.boolean),clarifyTimeoutError:xd.transitional(xd.boolean),legacyInterceptorReqResOrdering:xd.transitional(xd.boolean)},!1),null!=r&&(lu.isFunction(r)?t.paramsSerializer={serialize:r}:bd.assertOptions(r,{encode:xd.function,serialize:xd.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),bd.assertOptions(t,{baseUrl:xd.spelling("baseURL"),withXsrfToken:xd.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&lu.merge(o.common,o[t.method]);o&&lu.forEach(["delete","get","head","post","put","patch","query","common"],e=>{delete o[e]}),t.headers=mu.concat(i,o);const a=[];let s=!0;this.interceptors.request.forEach(function(e){if("function"==typeof e.runWhen&&!1===e.runWhen(t))return;s=s&&e.synchronous;const n=t.transitional||ju;n&&n.legacyInterceptorReqResOrdering?a.unshift(e.fulfilled,e.rejected):a.push(e.fulfilled,e.rejected)});const l=[];let c;this.interceptors.response.forEach(function(e){l.push(e.fulfilled,e.rejected)});let u,d=0;if(!s){const e=[gd.bind(this),void 0];for(e.unshift(...a),e.push(...l),u=e.length,c=Promise.resolve(t);d<u;)c=c.then(e[d++],e[d++]);return c}u=a.length;let f=t;for(;d<u;){const e=a[d++],t=a[d++];try{f=e(f)}catch(p){t.call(this,p);break}}try{c=gd.call(this,f)}catch(p){return Promise.reject(p)}for(d=0,u=l.length;d<u;)c=c.then(l[d++],l[d++]);return c}getUri(e){return Pu(Qu((e=Gu(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};lu.forEach(["delete","get","head","options"],function(e){wd.prototype[e]=function(t,n){return this.request(Gu(n||{},{method:e,url:t,data:(n||{}).data}))}}),lu.forEach(["post","put","patch","query"],function(e){function t(t){return function(n,r,o){return this.request(Gu(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}wd.prototype[e]=t(),"query"!==e&&(wd.prototype[e+"Form"]=t(!0))});const kd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(kd).forEach(([e,t])=>{kd[t]=e});const Sd=function e(t){const n=new wd(t),r=vc(wd.prototype.request,n);return lu.extend(r,wd.prototype,n,{allOwnKeys:!0}),lu.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Gu(t,n))},r}(Iu);Sd.Axios=wd,Sd.CanceledError=Uu,Sd.CancelToken=class e{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,o){n.reason||(n.reason=new Uu(e,r,o),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}},Sd.isCancel=Vu,Sd.VERSION=id,Sd.toFormData=ku,Sd.AxiosError=yu,Sd.Cancel=Sd.CanceledError,Sd.all=function(e){return Promise.all(e)},Sd.spread=function(e){return function(t){return e.apply(null,t)}},Sd.isAxiosError=function(e){return lu.isObject(e)&&!0===e.isAxiosError},Sd.mergeConfig=Gu,Sd.AxiosHeaders=mu,Sd.formToJSON=e=>zu(lu.isHTMLForm(e)?new FormData(e):e),Sd.getAdapter=hd.getAdapter,Sd.HttpStatusCode=kd,Sd.default=Sd;const{Axios:Ed,AxiosError:Cd,CanceledError:Td,isCancel:Pd,CancelToken:Ad,VERSION:jd,all:Nd,Cancel:Rd,isAxiosError:Ld,spread:Od,toFormData:Dd,AxiosHeaders:_d,HttpStatusCode:Md,formToJSON:zd,getAdapter:Fd,mergeConfig:Id,create:Bd}=Sd,Vd=(e,t)=>{const n=e.endsWith("/")?e.slice(0,-1):e,r=Sd.create({baseURL:n,timeout:6e5,headers:{"Content-Type":"application/json"}});return r.interceptors.response.use(e=>e,e=>{var t,n;return console.error("Fluxoon Copilot API Error:",(null==(n=null==(t=e.response)?void 0:t.data)?void 0:n.detail)||e.message),Promise.reject(e)}),r},Ud=async(e,t,n,r)=>{const o=`${(e=>e.endsWith("/")?e.slice(0,-1):e)(e)}/chat/fluxxon/${t}`,i={"Content-Type":"application/json"};n&&(i.Authorization=`Bearer ${n}`);const a=await fetch(o,{method:"POST",headers:i,body:JSON.stringify(r)});if(!a.ok){const e=await a.text().catch(()=>a.statusText);throw new Error(`[Fluxoon Copilot] /chat ${a.status}: ${e}`)}return a.json()},Hd=async(e,t)=>{const n=Vd(e);return(await n.get("/chat/threads")).data},$d=async(e,t,n)=>{const r=Vd(e),o=(await r.get(`/chat/history/${n}`)).data,i=[];let a=[];return o.forEach(e=>{if("tool"===e.role){const t=e.content.match(/SOURCE:\s*([^\n]+)/g);if(t){const e=t.map(e=>e.replace("SOURCE:","").trim().split("/").pop()||"");a=[...new Set([...a,...e])]}}else"assistant"===e.role?""!==e.content.trim()&&(i.push({id:`hist-${Math.random()}`,role:"assistant",content:e.content,timestamp:new Date,sources:[...a]}),a=[]):"user"===e.role&&i.push({id:`hist-${Math.random()}`,role:"user",content:e.content,timestamp:new Date})}),i},qd=async(e,t)=>{const n=Vd(e);return(await n.get("/settings/connectors")).data},Wd=async(e,t,n)=>{const r=Vd(e);return(await r.post("/connectors",n)).data},Kd=async(e,t,n)=>{const r=Vd(e);return(await r.post(`/documents/sync/${n}`)).data},Yd=async(e,t,n)=>{const r=Vd(e);await r.delete(`/connectors/${n}`)},Qd=async(e,t,n)=>{const r=Vd(e),o=new FormData;n.forEach(e=>o.append("files",e));return(await r.post("/upload",o)).data},Xd=()=>`thread_${Date.now()}_${Math.random().toString(36).substring(2,9)}`,Gd=(Jd=(e,t)=>({config:{},messages:[],threads:[],connectors:[],isSyncing:!1,showAddForm:!1,isLoading:!1,activeView:"chat",threadId:Xd(),setConfig:t=>e({config:t}),setView:t=>e({activeView:t}),setLoading:t=>e({isLoading:t}),setShowAddForm:t=>e({showAddForm:t}),clearChat:()=>e({messages:[],threadId:Xd()}),addMessage:t=>e(e=>({messages:[...e.messages,t]})),confirmThreadId:t=>{t&&""!==t.trim()&&e({threadId:t})},fetchThreads:async()=>{const{config:n}=t();if(n.apiUrl)try{const t=await Hd(n.apiUrl,n.userToken);e({threads:t})}catch(r){console.error("Erreur threads:",r)}},loadThread:async n=>{const{config:r}=t();if(n){e({isLoading:!0,threadId:n,activeView:"chat"});try{const t=await $d(r.apiUrl,r.userToken,n);e({messages:t,isLoading:!1})}catch(o){console.error("Erreur historique:",o),e({isLoading:!1})}}else e({threadId:Xd(),messages:[],activeView:"chat"})},fetchConnectors:async()=>{const{config:n}=t();if(n.apiUrl)try{const t=await qd(n.apiUrl,n.userToken);e({connectors:t})}catch(r){console.error("Erreur connecteurs:",r)}},syncSource:async n=>{const{config:r}=t();e({isSyncing:!0});try{await Kd(r.apiUrl,r.userToken,n),await t().fetchConnectors()}catch(o){console.error("Erreur sync:",o)}finally{e({isSyncing:!1})}},removeSource:async n=>{const{config:r}=t();try{await Yd(r.apiUrl,r.userToken,n),e(e=>({connectors:e.connectors.filter(e=>e.source_id!==n)}))}catch(o){console.error("Erreur suppression source:",o)}}}))?yc(Jd):yc;var Jd;function Zd(){}function ef(){}const tf=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,nf=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,rf={};function of(e,t){return(rf.jsx?nf:tf).test(e)}const af=/[ \t\n\f\r]/g;function sf(e){return""===e.replace(af,"")}class lf{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function cf(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new lf(n,r,t)}function uf(e){return e.toLowerCase()}lf.prototype.normal={},lf.prototype.property={},lf.prototype.space=void 0;class df{constructor(e,t){this.attribute=t,this.property=e}}df.prototype.attribute="",df.prototype.booleanish=!1,df.prototype.boolean=!1,df.prototype.commaOrSpaceSeparated=!1,df.prototype.commaSeparated=!1,df.prototype.defined=!1,df.prototype.mustUseProperty=!1,df.prototype.number=!1,df.prototype.overloadedBoolean=!1,df.prototype.property="",df.prototype.spaceSeparated=!1,df.prototype.space=void 0;let ff=0;const pf=xf(),hf=xf(),mf=xf(),gf=xf(),yf=xf(),vf=xf(),bf=xf();function xf(){return 2**++ff}const wf=Object.freeze(Object.defineProperty({__proto__:null,boolean:pf,booleanish:hf,commaOrSpaceSeparated:bf,commaSeparated:vf,number:gf,overloadedBoolean:mf,spaceSeparated:yf},Symbol.toStringTag,{value:"Module"})),kf=Object.keys(wf);class Sf extends df{constructor(e,t,n,r){let o=-1;if(super(e,t),Ef(this,"space",r),"number"==typeof n)for(;++o<kf.length;){const e=kf[o];Ef(this,kf[o],(n&wf[e])===wf[e])}}}function Ef(e,t,n){n&&(e[t]=n)}function Cf(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const i=new Sf(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[uf(r)]=r,n[uf(i.attribute)]=r}return new lf(t,n,e.space)}Sf.prototype.defined=!0;const Tf=Cf({properties:{ariaActiveDescendant:null,ariaAtomic:hf,ariaAutoComplete:null,ariaBusy:hf,ariaChecked:hf,ariaColCount:gf,ariaColIndex:gf,ariaColSpan:gf,ariaControls:yf,ariaCurrent:null,ariaDescribedBy:yf,ariaDetails:null,ariaDisabled:hf,ariaDropEffect:yf,ariaErrorMessage:null,ariaExpanded:hf,ariaFlowTo:yf,ariaGrabbed:hf,ariaHasPopup:null,ariaHidden:hf,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:yf,ariaLevel:gf,ariaLive:null,ariaModal:hf,ariaMultiLine:hf,ariaMultiSelectable:hf,ariaOrientation:null,ariaOwns:yf,ariaPlaceholder:null,ariaPosInSet:gf,ariaPressed:hf,ariaReadOnly:hf,ariaRelevant:null,ariaRequired:hf,ariaRoleDescription:yf,ariaRowCount:gf,ariaRowIndex:gf,ariaRowSpan:gf,ariaSelected:hf,ariaSetSize:gf,ariaSort:null,ariaValueMax:gf,ariaValueMin:gf,ariaValueNow:gf,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function Pf(e,t){return t in e?e[t]:t}function Af(e,t){return Pf(e,t.toLowerCase())}const jf=Cf({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:vf,acceptCharset:yf,accessKey:yf,action:null,allow:null,allowFullScreen:pf,allowPaymentRequest:pf,allowUserMedia:pf,alt:null,as:null,async:pf,autoCapitalize:null,autoComplete:yf,autoFocus:pf,autoPlay:pf,blocking:yf,capture:null,charSet:null,checked:pf,cite:null,className:yf,cols:gf,colSpan:null,content:null,contentEditable:hf,controls:pf,controlsList:yf,coords:gf|vf,crossOrigin:null,data:null,dateTime:null,decoding:null,default:pf,defer:pf,dir:null,dirName:null,disabled:pf,download:mf,draggable:hf,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:pf,formTarget:null,headers:yf,height:gf,hidden:mf,high:gf,href:null,hrefLang:null,htmlFor:yf,httpEquiv:yf,id:null,imageSizes:null,imageSrcSet:null,inert:pf,inputMode:null,integrity:null,is:null,isMap:pf,itemId:null,itemProp:yf,itemRef:yf,itemScope:pf,itemType:yf,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:pf,low:gf,manifest:null,max:null,maxLength:gf,media:null,method:null,min:null,minLength:gf,multiple:pf,muted:pf,name:null,nonce:null,noModule:pf,noValidate:pf,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:pf,optimum:gf,pattern:null,ping:yf,placeholder:null,playsInline:pf,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:pf,referrerPolicy:null,rel:yf,required:pf,reversed:pf,rows:gf,rowSpan:gf,sandbox:yf,scope:null,scoped:pf,seamless:pf,selected:pf,shadowRootClonable:pf,shadowRootDelegatesFocus:pf,shadowRootMode:null,shape:null,size:gf,sizes:null,slot:null,span:gf,spellCheck:hf,src:null,srcDoc:null,srcLang:null,srcSet:null,start:gf,step:null,style:null,tabIndex:gf,target:null,title:null,translate:null,type:null,typeMustMatch:pf,useMap:null,value:hf,width:gf,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:yf,axis:null,background:null,bgColor:null,border:gf,borderColor:null,bottomMargin:gf,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:pf,declare:pf,event:null,face:null,frame:null,frameBorder:null,hSpace:gf,leftMargin:gf,link:null,longDesc:null,lowSrc:null,marginHeight:gf,marginWidth:gf,noResize:pf,noHref:pf,noShade:pf,noWrap:pf,object:null,profile:null,prompt:null,rev:null,rightMargin:gf,rules:null,scheme:null,scrolling:hf,standby:null,summary:null,text:null,topMargin:gf,valueType:null,version:null,vAlign:null,vLink:null,vSpace:gf,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:pf,disableRemotePlayback:pf,prefix:null,property:null,results:gf,security:null,unselectable:null},space:"html",transform:Af}),Nf=Cf({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:bf,accentHeight:gf,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:gf,amplitude:gf,arabicForm:null,ascent:gf,attributeName:null,attributeType:null,azimuth:gf,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:gf,by:null,calcMode:null,capHeight:gf,className:yf,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:gf,diffuseConstant:gf,direction:null,display:null,dur:null,divisor:gf,dominantBaseline:null,download:pf,dx:null,dy:null,edgeMode:null,editable:null,elevation:gf,enableBackground:null,end:null,event:null,exponent:gf,externalResourcesRequired:null,fill:null,fillOpacity:gf,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:vf,g2:vf,glyphName:vf,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:gf,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:gf,horizOriginX:gf,horizOriginY:gf,id:null,ideographic:gf,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:gf,k:gf,k1:gf,k2:gf,k3:gf,k4:gf,kernelMatrix:bf,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:gf,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:gf,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:gf,overlineThickness:gf,paintOrder:null,panose1:null,path:null,pathLength:gf,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:yf,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:gf,pointsAtY:gf,pointsAtZ:gf,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:bf,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:bf,rev:bf,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:bf,requiredFeatures:bf,requiredFonts:bf,requiredFormats:bf,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:gf,specularExponent:gf,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:gf,strikethroughThickness:gf,string:null,stroke:null,strokeDashArray:bf,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:gf,strokeOpacity:gf,strokeWidth:null,style:null,surfaceScale:gf,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:bf,tabIndex:gf,tableValues:null,target:null,targetX:gf,targetY:gf,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:bf,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:gf,underlineThickness:gf,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:gf,values:null,vAlphabetic:gf,vMathematical:gf,vectorEffect:null,vHanging:gf,vIdeographic:gf,version:null,vertAdvY:gf,vertOriginX:gf,vertOriginY:gf,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:gf,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Pf}),Rf=Cf({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),Lf=Cf({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Af}),Of=Cf({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),Df={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"},_f=/[A-Z]/g,Mf=/-[a-z]/g,zf=/^data[-\w.:]+$/i;function Ff(e){return"-"+e.toLowerCase()}function If(e){return e.charAt(1).toUpperCase()}const Bf=cf([Tf,jf,Rf,Lf,Of],"html"),Vf=cf([Tf,Nf,Rf,Lf,Of],"svg");var Uf,Hf,$f,qf={};function Wf(){if($f)return qf;$f=1;var e=qf&&qf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(qf,"__esModule",{value:!0}),qf.default=function(e,n){let r=null;if(!e||"string"!=typeof e)return r;const o=(0,t.default)(e),i="function"==typeof n;return o.forEach(e=>{if("declaration"!==e.type)return;const{property:t,value:o}=e;i?n(t,o,e):o&&(r=r||{},r[t]=o)}),r};const t=e(function(){if(Hf)return Uf;Hf=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,s=/^\s+|\s+$/g,l="";function c(e){return e?e.replace(s,l):l}return Uf=function(s,u){if("string"!=typeof s)throw new TypeError("First argument must be a string");if(!s)return[];u=u||{};var d=1,f=1;function p(e){var n=e.match(t);n&&(d+=n.length);var r=e.lastIndexOf("\n");f=~r?e.length-r:f+e.length}function h(){var e={line:d,column:f};return function(t){return t.position=new m(e),v(),t}}function m(e){this.start=e,this.end={line:d,column:f},this.source=u.source}function g(e){var t=new Error(u.source+":"+d+":"+f+": "+e);if(t.reason=e,t.filename=u.source,t.line=d,t.column=f,t.source=s,!u.silent)throw t}function y(e){var t=e.exec(s);if(t){var n=t[0];return p(n),s=s.slice(n.length),t}}function v(){y(n)}function b(e){var t;for(e=e||[];t=x();)!1!==t&&e.push(t);return e}function x(){var e=h();if("/"==s.charAt(0)&&"*"==s.charAt(1)){for(var t=2;l!=s.charAt(t)&&("*"!=s.charAt(t)||"/"!=s.charAt(t+1));)++t;if(t+=2,l===s.charAt(t-1))return g("End of comment missing");var n=s.slice(2,t-2);return f+=2,p(n),s=s.slice(t),f+=2,e({type:"comment",comment:n})}}function w(){var t=h(),n=y(r);if(n){if(x(),!y(o))return g("property missing ':'");var s=y(i),u=t({type:"declaration",property:c(n[0].replace(e,l)),value:s?c(s[0].replace(e,l)):l});return y(a),u}}return m.prototype.content=s,v(),function(){var e,t=[];for(b(t);e=w();)!1!==e&&(t.push(e),b(t));return t}()}}());return qf}var Kf,Yf,Qf,Xf={};function Gf(){if(Kf)return Xf;Kf=1,Object.defineProperty(Xf,"__esModule",{value:!0}),Xf.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,i=function(e,t){return t.toUpperCase()},a=function(e,t){return"".concat(t,"-")};return Xf.camelCase=function(s,l){return void 0===l&&(l={}),function(t){return!t||n.test(t)||e.test(t)}(s)?s:(s=s.toLowerCase(),(s=l.reactCompat?s.replace(o,a):s.replace(r,a)).replace(t,i))},Xf}const Jf=r(function(){if(Qf)return Yf;Qf=1;var e=(Yf&&Yf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(Wf()),t=Gf();function n(n,r){var o={};return n&&"string"==typeof n?((0,e.default)(n,function(e,n){e&&n&&(o[(0,t.camelCase)(e,r)]=n)}),o):o}return n.default=n,Yf=n}()),Zf=tp("end"),ep=tp("start");function tp(e){return function(t){const n=t&&t.position&&t.position[e]||{};if("number"==typeof n.line&&n.line>0&&"number"==typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"==typeof n.offset&&n.offset>-1?n.offset:void 0}}}function np(e){return e&&"object"==typeof e?"position"in e||"type"in e?op(e.position):"start"in e||"end"in e?op(e):"line"in e||"column"in e?rp(e):"":""}function rp(e){return ip(e&&e.line)+":"+ip(e&&e.column)}function op(e){return rp(e&&e.start)+"-"+rp(e&&e.end)}function ip(e){return e&&"number"==typeof e?e:1}class ap extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",o={},i=!1;if(t&&(o="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!o.cause&&e&&(i=!0,r=e.message,o.cause=e),!o.ruleId&&!o.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?o.ruleId=n:(o.source=n.slice(0,e),o.ruleId=n.slice(e+1))}if(!o.place&&o.ancestors&&o.ancestors){const e=o.ancestors[o.ancestors.length-1];e&&(o.place=e.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=a?a.line:void 0,this.name=np(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=i&&o.cause&&"string"==typeof o.cause.stack?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ap.prototype.file="",ap.prototype.name="",ap.prototype.reason="",ap.prototype.message="",ap.prototype.stack="",ap.prototype.column=void 0,ap.prototype.line=void 0,ap.prototype.ancestors=void 0,ap.prototype.cause=void 0,ap.prototype.fatal=void 0,ap.prototype.place=void 0,ap.prototype.ruleId=void 0,ap.prototype.source=void 0;const sp={}.hasOwnProperty,lp=new Map,cp=/[A-Z]/g,up=new Set(["table","tbody","thead","tfoot","tr"]),dp=new Set(["td","th"]),fp="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function pp(e,t){if(!t||void 0===t.Fragment)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if("function"!=typeof t.jsxDEV)throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=function(e,t){return n;function n(n,r,o,i){const a=Array.isArray(o.children),s=ep(n);return t(r,o,i,a,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}(n,t.jsxDEV)}else{if("function"!=typeof t.jsx)throw new TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw new TypeError("Expected `jsxs` in production options");r=function(e,t,n){return r;function r(e,r,o,i){const a=Array.isArray(o.children)?n:t;return i?a(r,o,i):a(r,o)}}(0,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?Vf:Bf,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},i=hp(o,e,void 0);return i&&"string"!=typeof i?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function hp(e,t,n){return"element"===t.type?function(e,t,n){const r=e.schema;let o=r;"svg"===t.tagName.toLowerCase()&&"html"===r.space&&(o=Vf,e.schema=o);e.ancestors.push(t);const i=bp(e,t.tagName,!1),a=function(e,t){const n={};let r,o;for(o in t.properties)if("children"!==o&&sp.call(t.properties,o)){const i=vp(e,o,t.properties[o]);if(i){const[o,a]=i;e.tableCellAlignToStyle&&"align"===o&&"string"==typeof a&&dp.has(t.tagName)?r=a:n[o]=a}}if(r){(n.style||(n.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r}return n}(e,t);let s=yp(e,t);up.has(t.tagName)&&(s=s.filter(function(e){return"string"!=typeof e||!("object"==typeof(t=e)?"text"===t.type&&sf(t.value):sf(t));var t}));return mp(e,a,i,t),gp(a,s),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}(e,t,n):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(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)}xp(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?function(e,t,n){const r=e.schema;let o=r;"svg"===t.name&&"html"===r.space&&(o=Vf,e.schema=o);e.ancestors.push(t);const i=null===t.name?e.Fragment:bp(e,t.name,!0),a=function(e,t){const n={};for(const r of t.attributes)if("mdxJsxExpressionAttribute"===r.type)if(r.data&&r.data.estree&&e.evaluater){const t=r.data.estree.body[0];Zd(t.type);const o=t.expression;Zd(o.type);const i=o.properties[0];Zd(i.type),Object.assign(n,e.evaluater.evaluateExpression(i.argument))}else xp(e,t.position);else{const o=r.name;let i;if(r.value&&"object"==typeof r.value)if(r.value.data&&r.value.data.estree&&e.evaluater){const t=r.value.data.estree.body[0];Zd(t.type),i=e.evaluater.evaluateExpression(t.expression)}else xp(e,t.position);else i=null===r.value||r.value;n[o]=i}return n}(e,t),s=yp(e,t);return mp(e,a,i,t),gp(a,s),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}(e,t,n):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);xp(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return gp(r,yp(e,t)),e.create(t,e.Fragment,r,n)}(e,t,n):"text"===t.type?function(e,t){return t.value}(0,t):void 0}function mp(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function gp(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function yp(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:lp;for(;++r<t.children.length;){const i=t.children[r];let a;if(e.passKeys){const e="element"===i.type?i.tagName:"mdxJsxFlowElement"===i.type||"mdxJsxTextElement"===i.type?i.name:void 0;if(e){const t=o.get(e)||0;a=e+"-"+t,o.set(e,t+1)}}const s=hp(e,i,a);void 0!==s&&n.push(s)}return n}function vp(e,t,n){const r=function(e,t){const n=uf(t);let r=t,o=df;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&zf.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(Mf,If);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!Mf.test(e)){let n=e.replace(_f,Ff);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}o=Sf}return new o(r,t)}(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?function(e){const t={};return(""===e[e.length-1]?[...e,""]:e).join((t.padRight?" ":"")+","+(!1===t.padLeft?"":" ")).trim()}(n):n.join(" ").trim()),"style"===r.property){let t="object"==typeof n?n:function(e,t){try{return Jf(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const t=n,r=new ap("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:t,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=fp+"#cannot-parse-style-attribute",r}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)sp.call(e,n)&&(t[wp(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?Df[r.property]||r.property:r.attribute,n]}}function bp(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,o=-1;for(;++o<e.length;){const t=of(e[o])?{type:"Identifier",name:e[o]}:{type:"Literal",value:e[o]};n=n?{type:"MemberExpression",object:n,property:t,computed:Boolean(o&&"Literal"===t.type),optional:!1}:t}r=n}else r=of(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if("Literal"===r.type){const t=r.value;return sp.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);xp(e)}function xp(e,t){const n=new ap("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=fp+"#cannot-handle-mdx-estrees-without-createevaluater",n}function wp(e){let t=e.replace(cp,kp);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function kp(e){return"-"+e.toLowerCase()}const Sp={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"]},Ep={};function Cp(e,t){return Tp(e,"boolean"!=typeof Ep.includeImageAlt||Ep.includeImageAlt,"boolean"!=typeof Ep.includeHtml||Ep.includeHtml)}function Tp(e,t,n){if(function(e){return Boolean(e&&"object"==typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Pp(e.children,t,n)}return Array.isArray(e)?Pp(e,t,n):""}function Pp(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=Tp(e[o],t,n);return r.join("")}const Ap=document.createElement("i");function jp(e){const t="&"+e+";";Ap.innerHTML=t;const n=Ap.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&(n!==t&&n)}function Np(e,t,n,r){const o=e.length;let i,a=0;if(t=t<0?-t>o?0:o+t:t>o?o:t,n=n>0?n:0,r.length<1e4)i=Array.from(r),i.unshift(t,n),e.splice(...i);else for(n&&e.splice(t,n);a<r.length;)i=r.slice(a,a+1e4),i.unshift(t,0),e.splice(...i),a+=1e4,t+=1e4}function Rp(e,t){return e.length>0?(Np(e,e.length,0,t),e):t}const Lp={}.hasOwnProperty;function Op(e){const t={};let n=-1;for(;++n<e.length;)Dp(t,e[n]);return t}function Dp(e,t){let n;for(n in t){const r=(Lp.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let i;if(o)for(i in o){Lp.call(r,i)||(r[i]=[]);const e=o[i];_p(r[i],Array.isArray(e)?e:e?[e]:[])}}}function _p(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);Np(e,0,0,r)}function Mp(e,t){const n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||!(65535&~n)||65534==(65535&n)||n>1114111?"�":String.fromCodePoint(n)}function zp(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Fp=Xp(/[A-Za-z]/),Ip=Xp(/[\dA-Za-z]/),Bp=Xp(/[#-'*+\--9=?A-Z^-~]/);function Vp(e){return null!==e&&(e<32||127===e)}const Up=Xp(/\d/),Hp=Xp(/[\dA-Fa-f]/),$p=Xp(/[!-/:-@[-`{-~]/);function qp(e){return null!==e&&e<-2}function Wp(e){return null!==e&&(e<0||32===e)}function Kp(e){return-2===e||-1===e||32===e}const Yp=Xp(new RegExp("\\p{P}|\\p{S}","u")),Qp=Xp(/\s/);function Xp(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function Gp(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const i=e.charCodeAt(n);let a="";if(37===i&&Ip(e.charCodeAt(n+1))&&Ip(e.charCodeAt(n+2)))o=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(a=String.fromCharCode(i));else if(i>55295&&i<57344){const t=e.charCodeAt(n+1);i<56320&&t>56319&&t<57344?(a=String.fromCharCode(i,t),o=1):a="�"}else a=String.fromCharCode(i);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+o+1,a=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function Jp(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return function(r){if(Kp(r))return e.enter(n),a(r);return t(r)};function a(r){return Kp(r)&&i++<o?(e.consume(r),a):(e.exit(n),t(r))}}const Zp={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,function(n){if(null===n)return void e.consume(n);return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Jp(e,t,"linePrefix")},function(t){return e.enter("paragraph"),r(t)});let n;return t;function r(t){const r=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):qp(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),o)}}};const eh={tokenize:function(e){const t=this,n=[];let r,o,i,a=0;return s;function s(r){if(a<n.length){const o=n[a];return t.containerState=o[1],e.attempt(o[0].continuation,l,c)(r)}return c(r)}function l(e){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&v();const n=t.events.length;let o,i=n;for(;i--;)if("exit"===t.events[i][0]&&"chunkFlow"===t.events[i][1].type){o=t.events[i][1].end;break}y(a);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return Np(t.events,i+1,0,t.events.slice(n)),t.events.length=s,c(e)}return s(e)}function c(o){if(a===n.length){if(!r)return f(o);if(r.currentConstruct&&r.currentConstruct.concrete)return h(o);t.interrupt=Boolean(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(th,u,d)(o)}function u(e){return r&&v(),y(a),f(e)}function d(e){return t.parser.lazy[t.now().line]=a!==n.length,i=t.now().offset,h(e)}function f(n){return t.containerState={},e.attempt(th,p,h)(n)}function p(e){return a++,n.push([t.currentConstruct,t.containerState]),f(e)}function h(n){return null===n?(r&&v(),y(0),void e.consume(n)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:o}),m(n))}function m(n){return null===n?(g(e.exit("chunkFlow"),!0),y(0),void e.consume(n)):qp(n)?(e.consume(n),g(e.exit("chunkFlow")),a=0,t.interrupt=void 0,s):(e.consume(n),m)}function g(e,n){const s=t.sliceStream(e);if(n&&s.push(null),e.previous=o,o&&(o.next=e),o=e,r.defineSkip(e.start),r.write(s),t.parser.lazy[e.start.line]){let e=r.events.length;for(;e--;)if(r.events[e][1].start.offset<i&&(!r.events[e][1].end||r.events[e][1].end.offset>i))return;const n=t.events.length;let o,s,l=n;for(;l--;)if("exit"===t.events[l][0]&&"chunkFlow"===t.events[l][1].type){if(o){s=t.events[l][1].end;break}o=!0}for(y(a),e=n;e<t.events.length;)t.events[e][1].end={...s},e++;Np(t.events,l+1,0,t.events.slice(n)),t.events.length=e}}function y(r){let o=n.length;for(;o-- >r;){const r=n[o];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){r.write([null]),o=void 0,r=void 0,t.containerState._closeFlow=void 0}}},th={tokenize:function(e,t,n){return Jp(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function nh(e){return null===e||Wp(e)||Qp(e)?1:Yp(e)?2:void 0}function rh(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const i=e[o].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const oh={name:"attention",resolveAll:function(e,t){let n,r,o,i,a,s,l,c,u=-1;for(;++u<e.length;)if("enter"===e[u][0]&&"attentionSequence"===e[u][1].type&&e[u][1]._close)for(n=u;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[u][1]).charCodeAt(0)){if((e[n][1]._close||e[u][1]._open)&&(e[u][1].end.offset-e[u][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[u][1].end.offset-e[u][1].start.offset)%3))continue;s=e[n][1].end.offset-e[n][1].start.offset>1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;const d={...e[n][1].end},f={...e[u][1].start};ih(d,-s),ih(f,s),i={type:s>1?"strongSequence":"emphasisSequence",start:d,end:{...e[n][1].end}},a={type:s>1?"strongSequence":"emphasisSequence",start:{...e[u][1].start},end:f},o={type:s>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[u][1].start}},r={type:s>1?"strong":"emphasis",start:{...i.start},end:{...a.end}},e[n][1].end={...i.start},e[u][1].start={...a.end},l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=Rp(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=Rp(l,[["enter",r,t],["enter",i,t],["exit",i,t],["enter",o,t]]),l=Rp(l,rh(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),l=Rp(l,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",r,t]]),e[u][1].end.offset-e[u][1].start.offset?(c=2,l=Rp(l,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,Np(e,n-1,u-n+3,l),u=n+l.length-c-2;break}u=-1;for(;++u<e.length;)"attentionSequence"===e[u][1].type&&(e[u][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=nh(r);let i;return function(t){return i=t,e.enter("attentionSequence"),a(t)};function a(s){if(s===i)return e.consume(s),a;const l=e.exit("attentionSequence"),c=nh(s),u=!c||2===c&&o||n.includes(s),d=!o||2===o&&c||n.includes(r);return l._open=Boolean(42===i?u:u&&(o||!d)),l._close=Boolean(42===i?d:d&&(c||!u)),t(s)}}};function ih(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const ah={name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o};function o(t){return Fp(t)?(e.consume(t),i):64===t?n(t):l(t)}function i(e){return 43===e||45===e||46===e||Ip(e)?(r=1,a(e)):l(e)}function a(t){return 58===t?(e.consume(t),r=0,s):(43===t||45===t||46===t||Ip(t))&&r++<32?(e.consume(t),a):(r=0,l(t))}function s(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||Vp(r)?n(r):(e.consume(r),s)}function l(t){return 64===t?(e.consume(t),c):Bp(t)?(e.consume(t),l):n(t)}function c(e){return Ip(e)?u(e):n(e)}function u(n){return 46===n?(e.consume(n),r=0,c):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):d(n)}function d(t){if((45===t||Ip(t))&&r++<63){const n=45===t?d:u;return e.consume(t),n}return n(t)}}};const sh={partial:!0,tokenize:function(e,t,n){return function(t){return Kp(t)?Jp(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||qp(e)?t(e):n(e)}}};const lh={continuation:{tokenize:function(e,t,n){const r=this;return function(t){if(Kp(t))return Jp(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return o(t)};function o(r){return e.attempt(lh,t,n)(r)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){const r=this;return function(t){if(62===t){const n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),o}return n(t)};function o(n){return Kp(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};const ch={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return $p(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}};const uh={name:"characterReference",tokenize:function(e,t,n){const r=this;let o,i,a=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),s};function s(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),o=31,i=Ip,c(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,i=Hp,c):(e.enter("characterReferenceValue"),o=7,i=Up,c(t))}function c(s){if(59===s&&a){const o=e.exit("characterReferenceValue");return i!==Ip||jp(r.sliceSerialize(o))?(e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(s)}return i(s)&&a++<o?(e.consume(s),c):n(s)}}};const dh={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(null===t)return n(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},fh={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const r=this,o={partial:!0,tokenize:function(e,t,n){let o=0;return a;function a(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l}function l(t){return e.enter("codeFencedFence"),Kp(t)?Jp(e,c,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):c(t)}function c(t){return t===i?(e.enter("codeFencedFenceSequence"),u(t)):n(t)}function u(t){return t===i?(o++,e.consume(t),u):o>=s?(e.exit("codeFencedFenceSequence"),Kp(t)?Jp(e,d,"whitespace")(t):d(t)):n(t)}function d(r){return null===r||qp(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}};let i,a=0,s=0;return function(t){return function(t){const n=r.events[r.events.length-1];return a=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,i=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),l(t)}(t)};function l(t){return t===i?(s++,e.consume(t),l):s<3?n(t):(e.exit("codeFencedFenceSequence"),Kp(t)?Jp(e,c,"whitespace")(t):c(t))}function c(n){return null===n||qp(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(dh,p,v)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(n))}function u(t){return null===t||qp(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(t)):Kp(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Jp(e,d,"whitespace")(t)):96===t&&t===i?n(t):(e.consume(t),u)}function d(t){return null===t||qp(t)?c(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),f(t))}function f(t){return null===t||qp(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(t)):96===t&&t===i?n(t):(e.consume(t),f)}function p(t){return e.attempt(o,v,h)(t)}function h(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),m}function m(t){return a>0&&Kp(t)?Jp(e,g,"linePrefix",a+1)(t):g(t)}function g(t){return null===t||qp(t)?e.check(dh,p,v)(t):(e.enter("codeFlowValue"),y(t))}function y(t){return null===t||qp(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),y)}function v(n){return e.exit("codeFenced"),t(n)}}};const ph={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),Jp(e,o,"linePrefix",5)(t)};function o(e){const t=r.events[r.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?i(e):n(e)}function i(t){return null===t?s(t):qp(t)?e.attempt(hh,i,s)(t):(e.enter("codeFlowValue"),a(t))}function a(t){return null===t||qp(t)?(e.exit("codeFlowValue"),i(t)):(e.consume(t),a)}function s(n){return e.exit("codeIndented"),t(n)}}},hh={partial:!0,tokenize:function(e,t,n){const r=this;return o;function o(t){return r.parser.lazy[r.now().line]?n(t):qp(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):Jp(e,i,"linePrefix",5)(t)}function i(e){const i=r.events[r.events.length-1];return i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?t(e):qp(e)?o(e):n(e)}}};const mh={name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,n,r=e.length-4,o=3;if(!("lineEnding"!==e[o][1].type&&"space"!==e[o][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=o;++t<r;)if("codeTextData"===e[t][1].type){e[o][1].type="codeTextPadding",e[r][1].type="codeTextPadding",o+=2,r-=2;break}t=o-1,r++;for(;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):t!==r&&"lineEnding"!==e[t][1].type||(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let r,o,i=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),a(t)};function a(t){return 96===t?(e.consume(t),i++,a):(e.exit("codeTextSequence"),s(t))}function s(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),s):96===t?(o=e.enter("codeTextSequence"),r=0,c(t)):qp(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s):(e.enter("codeTextData"),l(t))}function l(t){return null===t||32===t||96===t||qp(t)?(e.exit("codeTextData"),s(t)):(e.consume(t),l)}function c(n){return 96===n?(e.consume(n),r++,c):r===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(o.type="codeTextData",l(n))}}};class gh{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const n=null==t?Number.POSITIVE_INFINITY:t;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const r=t||0;this.setCursor(Math.trunc(e));const o=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&yh(this.left,n),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),yh(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),yh(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&0===this.right.length||e<0&&0===this.left.length))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);yh(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);yh(this.left,t.reverse())}}}function yh(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function vh(e){const t={};let n,r,o,i,a,s,l,c=-1;const u=new gh(e);for(;++c<u.length;){for(;c in t;)c=t[c];if(n=u.get(c),c&&"chunkFlow"===n[1].type&&"listItemPrefix"===u.get(c-1)[1].type&&(s=n[1]._tokenizer.events,o=0,o<s.length&&"lineEndingBlank"===s[o][1].type&&(o+=2),o<s.length&&"content"===s[o][1].type))for(;++o<s.length&&"content"!==s[o][1].type;)"chunkText"===s[o][1].type&&(s[o][1]._isInFirstContentOfListItem=!0,o++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,bh(u,c)),c=t[c],l=!0);else if(n[1]._container){for(o=c,r=void 0;o--;)if(i=u.get(o),"lineEnding"===i[1].type||"lineEndingBlank"===i[1].type)"enter"===i[0]&&(r&&(u.get(r)[1].type="lineEndingBlank"),i[1].type="lineEnding",r=o);else if("linePrefix"!==i[1].type&&"listItemIndent"!==i[1].type)break;r&&(n[1].end={...u.get(r)[1].start},a=u.slice(r,c),a.unshift(n),u.splice(r,c-r+1,a))}}return Np(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!l}function bh(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const i=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const s=a.events,l=[],c={};let u,d,f=-1,p=n,h=0,m=0;const g=[m];for(;p;){for(;e.get(++o)[1]!==p;);i.push(o),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&a.defineSkip(p.start),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(u),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)"exit"===s[f][0]&&"enter"===s[f-1][0]&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(m=f+1,g.push(m),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(a.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){const t=s.slice(g[f],g[f+1]),n=i.pop();l.push([n,n+t.length-1]),e.splice(n,2,t)}for(l.reverse(),f=-1;++f<l.length;)c[h+l[f][0]]=h+l[f][1],h+=l[f][1]-l[f][0]-1;return c}const xh={resolve:function(e){return vh(e),e},tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?o(t):qp(t)?e.check(wh,i,o)(t):(e.consume(t),r)}function o(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function i(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},wh={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Jp(e,o,"linePrefix")};function o(o){if(null===o||qp(o))return n(o);const i=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}};function kh(e,t,n,r,o,i,a,s,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return function(t){if(60===t)return e.enter(r),e.enter(o),e.enter(i),e.consume(t),e.exit(i),d;if(null===t||32===t||41===t||Vp(t))return n(t);return e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),h(t)};function d(n){return 62===n?(e.enter(i),e.consume(n),e.exit(i),e.exit(o),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),f(n))}function f(t){return 62===t?(e.exit("chunkString"),e.exit(s),d(t)):null===t||60===t||qp(t)?n(t):(e.consume(t),92===t?p:f)}function p(t){return 60===t||62===t||92===t?(e.consume(t),f):f(t)}function h(o){return u||null!==o&&41!==o&&!Wp(o)?u<c&&40===o?(e.consume(o),u++,h):41===o?(e.consume(o),u--,h):null===o||32===o||40===o||Vp(o)?n(o):(e.consume(o),92===o?m:h):(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(o))}function m(t){return 40===t||41===t||92===t?(e.consume(t),h):h(t)}}function Sh(e,t,n,r,o,i){const a=this;let s,l=0;return function(t){return e.enter(r),e.enter(o),e.consume(t),e.exit(o),e.enter(i),c};function c(d){return l>999||null===d||91===d||93===d&&!s||94===d&&!l&&"_hiddenFootnoteSupport"in a.parser.constructs?n(d):93===d?(e.exit(i),e.enter(o),e.consume(d),e.exit(o),e.exit(r),t):qp(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(t){return null===t||91===t||93===t||qp(t)||l++>999?(e.exit("chunkString"),c(t)):(e.consume(t),s||(s=!Kp(t)),92===t?d:u)}function d(t){return 91===t||92===t||93===t?(e.consume(t),l++,u):u(t)}}function Eh(e,t,n,r,o,i){let a;return function(t){if(34===t||39===t||40===t)return e.enter(r),e.enter(o),e.consume(t),e.exit(o),a=40===t?41:t,s;return n(t)};function s(n){return n===a?(e.enter(o),e.consume(n),e.exit(o),e.exit(r),t):(e.enter(i),l(n))}function l(t){return t===a?(e.exit(i),s(a)):null===t?n(t):qp(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Jp(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===a||null===t||qp(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return t===a||92===t?(e.consume(t),c):c(t)}}function Ch(e,t){let n;return function r(o){if(qp(o))return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r;if(Kp(o))return Jp(e,r,n?"linePrefix":"lineSuffix")(o);return t(o)}}const Th={name:"definition",tokenize:function(e,t,n){const r=this;let o;return function(t){return e.enter("definition"),function(t){return Sh.call(r,e,i,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function i(t){return o=zp(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),a):n(t)}function a(t){return Wp(t)?Ch(e,s)(t):s(t)}function s(t){return kh(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(Ph,c,c)(t)}function c(t){return Kp(t)?Jp(e,u,"whitespace")(t):u(t)}function u(i){return null===i||qp(i)?(e.exit("definition"),r.parser.defined.push(o),t(i)):n(i)}}},Ph={partial:!0,tokenize:function(e,t,n){return function(t){return Wp(t)?Ch(e,r)(t):n(t)};function r(t){return Eh(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function o(t){return Kp(t)?Jp(e,i,"whitespace")(t):i(t)}function i(e){return null===e||qp(e)?t(e):n(e)}}};const Ah={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return qp(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};const jh={name:"headingAtx",resolve:function(e,t){let n,r,o=e.length-2,i=3;"whitespace"===e[i][1].type&&(i+=2);o-2>i&&"whitespace"===e[o][1].type&&(o-=2);"atxHeadingSequence"===e[o][1].type&&(i===o-1||o-4>i&&"whitespace"===e[o-2][1].type)&&(o-=i+1===o?2:4);o>i&&(n={type:"atxHeadingText",start:e[i][1].start,end:e[o][1].end},r={type:"chunkText",start:e[i][1].start,end:e[o][1].end,contentType:"text"},Np(e,i,o-i+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]]));return e},tokenize:function(e,t,n){let r=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),o(t)}(t)};function o(t){return 35===t&&r++<6?(e.consume(t),o):null===t||Wp(t)?(e.exit("atxHeadingSequence"),i(t)):n(t)}function i(n){return 35===n?(e.enter("atxHeadingSequence"),a(n)):null===n||qp(n)?(e.exit("atxHeading"),t(n)):Kp(n)?Jp(e,i,"whitespace")(n):(e.enter("atxHeadingText"),s(n))}function a(t){return 35===t?(e.consume(t),a):(e.exit("atxHeadingSequence"),i(t))}function s(t){return null===t||35===t||Wp(t)?(e.exit("atxHeadingText"),i(t)):(e.consume(t),s)}}};const Nh=["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"],Rh=["pre","script","style","textarea"],Lh={concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2));return e},tokenize:function(e,t,n){const r=this;let o,i,a,s,l;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),c}(t)};function c(s){return 33===s?(e.consume(s),u):47===s?(e.consume(s),i=!0,p):63===s?(e.consume(s),o=3,r.interrupt?t:D):Fp(s)?(e.consume(s),a=String.fromCharCode(s),h):n(s)}function u(i){return 45===i?(e.consume(i),o=2,d):91===i?(e.consume(i),o=5,s=0,f):Fp(i)?(e.consume(i),o=4,r.interrupt?t:D):n(i)}function d(o){return 45===o?(e.consume(o),r.interrupt?t:D):n(o)}function f(o){const i="CDATA[";return o===i.charCodeAt(s++)?(e.consume(o),6===s?r.interrupt?t:T:f):n(o)}function p(t){return Fp(t)?(e.consume(t),a=String.fromCharCode(t),h):n(t)}function h(s){if(null===s||47===s||62===s||Wp(s)){const l=47===s,c=a.toLowerCase();return l||i||!Rh.includes(c)?Nh.includes(a.toLowerCase())?(o=6,l?(e.consume(s),m):r.interrupt?t(s):T(s)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):i?g(s):y(s)):(o=1,r.interrupt?t(s):T(s))}return 45===s||Ip(s)?(e.consume(s),a+=String.fromCharCode(s),h):n(s)}function m(o){return 62===o?(e.consume(o),r.interrupt?t:T):n(o)}function g(t){return Kp(t)?(e.consume(t),g):E(t)}function y(t){return 47===t?(e.consume(t),E):58===t||95===t||Fp(t)?(e.consume(t),v):Kp(t)?(e.consume(t),y):E(t)}function v(t){return 45===t||46===t||58===t||95===t||Ip(t)?(e.consume(t),v):b(t)}function b(t){return 61===t?(e.consume(t),x):Kp(t)?(e.consume(t),b):y(t)}function x(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),l=t,w):Kp(t)?(e.consume(t),x):k(t)}function w(t){return t===l?(e.consume(t),l=null,S):null===t||qp(t)?n(t):(e.consume(t),w)}function k(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||Wp(t)?b(t):(e.consume(t),k)}function S(e){return 47===e||62===e||Kp(e)?y(e):n(e)}function E(t){return 62===t?(e.consume(t),C):n(t)}function C(t){return null===t||qp(t)?T(t):Kp(t)?(e.consume(t),C):n(t)}function T(t){return 45===t&&2===o?(e.consume(t),N):60===t&&1===o?(e.consume(t),R):62===t&&4===o?(e.consume(t),_):63===t&&3===o?(e.consume(t),D):93===t&&5===o?(e.consume(t),O):!qp(t)||6!==o&&7!==o?null===t||qp(t)?(e.exit("htmlFlowData"),P(t)):(e.consume(t),T):(e.exit("htmlFlowData"),e.check(Oh,M,P)(t))}function P(t){return e.check(Dh,A,M)(t)}function A(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),j}function j(t){return null===t||qp(t)?P(t):(e.enter("htmlFlowData"),T(t))}function N(t){return 45===t?(e.consume(t),D):T(t)}function R(t){return 47===t?(e.consume(t),a="",L):T(t)}function L(t){if(62===t){const n=a.toLowerCase();return Rh.includes(n)?(e.consume(t),_):T(t)}return Fp(t)&&a.length<8?(e.consume(t),a+=String.fromCharCode(t),L):T(t)}function O(t){return 93===t?(e.consume(t),D):T(t)}function D(t){return 62===t?(e.consume(t),_):45===t&&2===o?(e.consume(t),D):T(t)}function _(t){return null===t||qp(t)?(e.exit("htmlFlowData"),M(t)):(e.consume(t),_)}function M(n){return e.exit("htmlFlow"),t(n)}}},Oh={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(sh,t,n)}}},Dh={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(qp(t))return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o;return n(t)};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}};const _h={name:"htmlText",tokenize:function(e,t,n){const r=this;let o,i,a;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),s};function s(t){return 33===t?(e.consume(t),l):47===t?(e.consume(t),x):63===t?(e.consume(t),v):Fp(t)?(e.consume(t),S):n(t)}function l(t){return 45===t?(e.consume(t),c):91===t?(e.consume(t),i=0,p):Fp(t)?(e.consume(t),y):n(t)}function c(t){return 45===t?(e.consume(t),f):n(t)}function u(t){return null===t?n(t):45===t?(e.consume(t),d):qp(t)?(a=u,L(t)):(e.consume(t),u)}function d(t){return 45===t?(e.consume(t),f):u(t)}function f(e){return 62===e?R(e):45===e?d(e):u(e)}function p(t){const r="CDATA[";return t===r.charCodeAt(i++)?(e.consume(t),6===i?h:p):n(t)}function h(t){return null===t?n(t):93===t?(e.consume(t),m):qp(t)?(a=h,L(t)):(e.consume(t),h)}function m(t){return 93===t?(e.consume(t),g):h(t)}function g(t){return 62===t?R(t):93===t?(e.consume(t),g):h(t)}function y(t){return null===t||62===t?R(t):qp(t)?(a=y,L(t)):(e.consume(t),y)}function v(t){return null===t?n(t):63===t?(e.consume(t),b):qp(t)?(a=v,L(t)):(e.consume(t),v)}function b(e){return 62===e?R(e):v(e)}function x(t){return Fp(t)?(e.consume(t),w):n(t)}function w(t){return 45===t||Ip(t)?(e.consume(t),w):k(t)}function k(t){return qp(t)?(a=k,L(t)):Kp(t)?(e.consume(t),k):R(t)}function S(t){return 45===t||Ip(t)?(e.consume(t),S):47===t||62===t||Wp(t)?E(t):n(t)}function E(t){return 47===t?(e.consume(t),R):58===t||95===t||Fp(t)?(e.consume(t),C):qp(t)?(a=E,L(t)):Kp(t)?(e.consume(t),E):R(t)}function C(t){return 45===t||46===t||58===t||95===t||Ip(t)?(e.consume(t),C):T(t)}function T(t){return 61===t?(e.consume(t),P):qp(t)?(a=T,L(t)):Kp(t)?(e.consume(t),T):E(t)}function P(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),o=t,A):qp(t)?(a=P,L(t)):Kp(t)?(e.consume(t),P):(e.consume(t),j)}function A(t){return t===o?(e.consume(t),o=void 0,N):null===t?n(t):qp(t)?(a=A,L(t)):(e.consume(t),A)}function j(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||Wp(t)?E(t):(e.consume(t),j)}function N(e){return 47===e||62===e||Wp(e)?E(e):n(e)}function R(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function L(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),O}function O(t){return Kp(t)?Jp(e,D,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):D(t)}function D(t){return e.enter("htmlTextData"),a(t)}}};const Mh={name:"labelEnd",resolveAll:function(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){const e="labelImage"===r.type?4:2;r.type="data",t+=e}}e.length!==n.length&&Np(e,0,e.length,n);return e},resolveTo:function(e,t){let n,r,o,i,a=e.length,s=0;for(;a--;)if(n=e[a][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[a][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(o){if("enter"===e[a][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=a,"labelLink"!==n.type)){s=2;break}}else"labelEnd"===n.type&&(o=a);const l={type:"labelLink"===e[r][1].type?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[r][1].start},end:{...e[o][1].end}},u={type:"labelText",start:{...e[r+s+2][1].end},end:{...e[o-2][1].start}};return i=[["enter",l,t],["enter",c,t]],i=Rp(i,e.slice(r+1,r+s+3)),i=Rp(i,[["enter",u,t]]),i=Rp(i,rh(t.parser.constructs.insideSpan.null,e.slice(r+s+4,o-3),t)),i=Rp(i,[["exit",u,t],e[o-2],e[o-1],["exit",c,t]]),i=Rp(i,e.slice(o+1)),i=Rp(i,[["exit",l,t]]),Np(e,r,e.length,i),e},tokenize:function(e,t,n){const r=this;let o,i,a=r.events.length;for(;a--;)if(("labelImage"===r.events[a][1].type||"labelLink"===r.events[a][1].type)&&!r.events[a][1]._balanced){o=r.events[a][1];break}return function(t){if(!o)return n(t);if(o._inactive)return u(t);return i=r.parser.defined.includes(zp(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),s};function s(t){return 40===t?e.attempt(zh,c,i?c:u)(t):91===t?e.attempt(Fh,c,i?l:u)(t):i?c(t):u(t)}function l(t){return e.attempt(Ih,c,u)(t)}function c(e){return t(e)}function u(e){return o._balanced=!0,n(e)}}},zh={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return Wp(t)?Ch(e,o)(t):o(t)}function o(t){return 41===t?c(t):kh(e,i,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function i(t){return Wp(t)?Ch(e,s)(t):c(t)}function a(e){return n(e)}function s(t){return 34===t||39===t||40===t?Eh(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function l(t){return Wp(t)?Ch(e,c)(t):c(t)}function c(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},Fh={tokenize:function(e,t,n){const r=this;return function(t){return Sh.call(r,e,o,i,"reference","referenceMarker","referenceString")(t)};function o(e){return r.parser.defined.includes(zp(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function i(e){return n(e)}}},Ih={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}};const Bh={name:"labelStartImage",resolveAll:Mh.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),o};function o(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),i):n(t)}function i(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const Vh={name:"labelStartLink",resolveAll:Mh.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),o};function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const Uh={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Jp(e,t,"linePrefix")}}};const Hh={name:"thematicBreak",tokenize:function(e,t,n){let r,o=0;return function(t){return e.enter("thematicBreak"),function(e){return r=e,i(e)}(t)};function i(i){return i===r?(e.enter("thematicBreakSequence"),a(i)):o>=3&&(null===i||qp(i))?(e.exit("thematicBreak"),t(i)):n(i)}function a(t){return t===r?(e.consume(t),o++,a):(e.exit("thematicBreakSequence"),Kp(t)?Jp(e,i,"whitespace")(t):i(t))}}};const $h={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(sh,function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Jp(e,t,"listItemIndent",r.containerState.size+1)(n)},function(n){if(r.containerState.furtherBlankLines||!Kp(n))return r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n);return r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Wh,t,o)(n)});function o(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,Jp(e,e.attempt($h,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){const r=this,o=r.events[r.events.length-1];let i=o&&"linePrefix"===o[1].type?o[2].sliceSerialize(o[1],!0).length:0,a=0;return function(t){const o=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===o?!r.containerState.marker||t===r.containerState.marker:Up(t)){if(r.containerState.type||(r.containerState.type=o,e.enter(o,{_container:!0})),"listUnordered"===o)return e.enter("listItemPrefix"),42===t||45===t?e.check(Hh,n,l)(t):l(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(t)}return n(t)};function s(t){return Up(t)&&++a<10?(e.consume(t),s):(!r.interrupt||a<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),l(t)):n(t)}function l(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(sh,r.interrupt?n:c,e.attempt(qh,d,u))}function c(e){return r.containerState.initialBlankLine=!0,i++,d(e)}function u(t){return Kp(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),d):n(t)}function d(n){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},qh={partial:!0,tokenize:function(e,t,n){const r=this;return Jp(e,function(e){const o=r.events[r.events.length-1];return!Kp(e)&&o&&"listItemPrefixWhitespace"===o[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},Wh={partial:!0,tokenize:function(e,t,n){const r=this;return Jp(e,function(e){const o=r.events[r.events.length-1];return o&&"listItemIndent"===o[1].type&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(e):n(e)},"listItemIndent",r.containerState.size+1)}};const Kh={name:"setextUnderline",resolveTo:function(e,t){let n,r,o,i=e.length;for(;i--;)if("enter"===e[i][0]){if("content"===e[i][1].type){n=i;break}"paragraph"===e[i][1].type&&(r=i)}else"content"===e[i][1].type&&e.splice(i,1),o||"definition"!==e[i][1].type||(o=i);const a={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};e[r][1].type="setextHeadingText",o?(e.splice(r,0,["enter",a,t]),e.splice(o+1,0,["exit",e[n][1],t]),e[n][1].end={...e[o][1].end}):e[n][1]=a;return e.push(["exit",a,t]),e},tokenize:function(e,t,n){const r=this;let o;return function(t){let a,s=r.events.length;for(;s--;)if("lineEnding"!==r.events[s][1].type&&"linePrefix"!==r.events[s][1].type&&"content"!==r.events[s][1].type){a="paragraph"===r.events[s][1].type;break}if(!r.parser.lazy[r.now().line]&&(r.interrupt||a))return e.enter("setextHeadingLine"),o=t,function(t){return e.enter("setextHeadingLineSequence"),i(t)}(t);return n(t)};function i(t){return t===o?(e.consume(t),i):(e.exit("setextHeadingLineSequence"),Kp(t)?Jp(e,a,"lineSuffix")(t):a(t))}function a(r){return null===r||qp(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};const Yh={tokenize:function(e){const t=this,n=e.attempt(sh,function(r){if(null===r)return void e.consume(r);return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n},e.attempt(this.parser.constructs.flowInitial,r,Jp(e,e.attempt(this.parser.constructs.flow,r,e.attempt(xh,r)),"linePrefix")));return n;function r(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}}};const Qh={resolveAll:Zh()},Xh=Jh("string"),Gh=Jh("text");function Jh(e){return{resolveAll:Zh("text"===e?em:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],o=t.attempt(r,i,a);return i;function i(e){return l(e)?o(e):a(e)}function a(e){if(null!==e)return t.enter("data"),t.consume(e),s;t.consume(e)}function s(e){return l(e)?(t.exit("data"),o(e)):(t.consume(e),s)}function l(e){if(null===e)return!0;const t=r[e];let o=-1;if(t)for(;++o<t.length;){const e=t[o];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function Zh(e){return function(t,n){let r,o=-1;for(;++o<=t.length;)void 0===r?t[o]&&"data"===t[o][1].type&&(r=o,o++):t[o]&&"data"===t[o][1].type||(o!==r+2&&(t[r][1].end=t[o-1][1].end,t.splice(r+2,o-r-2),o=r+2),r=void 0);return e?e(t,n):t}}function em(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){const r=e[n-1][1],o=t.sliceStream(r);let i,a=o.length,s=-1,l=0;for(;a--;){const e=o[a];if("string"==typeof e){for(s=e.length;32===e.charCodeAt(s-1);)l++,s--;if(s)break;s=-1}else if(-2===e)i=!0,l++;else if(-1!==e){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const o={type:n===e.length||i||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?s:r.start._bufferIndex+s,_index:r.start._index+a,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...o.start},r.start.offset===r.end.offset?Object.assign(r,o):(e.splice(n,0,["enter",o,t],["exit",o,t]),n+=2)}n++}return e}const tm={42:$h,43:$h,45:$h,48:$h,49:$h,50:$h,51:$h,52:$h,53:$h,54:$h,55:$h,56:$h,57:$h,62:lh},nm={91:Th},rm={[-2]:ph,[-1]:ph,32:ph},om={35:jh,42:Hh,45:[Kh,Hh],60:Lh,61:Kh,95:Hh,96:fh,126:fh},im={38:uh,92:ch},am={[-5]:Uh,[-4]:Uh,[-3]:Uh,33:Bh,38:uh,42:oh,60:[ah,_h],91:Vh,92:[Ah,ch],93:Mh,95:oh,96:mh},sm={null:[oh,Qh]},lm=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:nm,disable:{null:[]},document:tm,flow:om,flowInitial:rm,insideSpan:sm,string:im,text:am},Symbol.toStringTag,{value:"Module"}));function cm(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},i=[];let a=[],s=[];const l={attempt:g(function(e,t){y(e,t.from)}),check:g(m),consume:function(e){qp(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,v()):-1!==e&&(r.column++,r.offset++);r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++));c.previous=e},enter:function(e,t){const n=t||{};return n.type=e,n.start=f(),c.events.push(["enter",n,c]),s.push(n),n},exit:function(e){const t=s.pop();return t.end=f(),c.events.push(["exit",t,c]),t},interrupt:g(m,{interrupt:!0})},c={code:null,containerState:{},defineSkip:function(e){o[e.line]=e.column,v()},events:[],now:f,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const i=e[n];let a;if("string"==typeof i)a=i;else switch(i){case-5:a="\r";break;case-4:a="\n";break;case-3:a="\r\n";break;case-2:a=t?" ":"\t";break;case-1:if(!t&&o)continue;a=" ";break;default:a=String.fromCharCode(i)}o=-2===i,r.push(a)}return r.join("")}(d(e),t)},sliceStream:d,write:function(e){if(a=Rp(a,e),p(),null!==a[a.length-1])return[];return y(t,0),c.events=rh(i,c.events,c),c.events}};let u=t.tokenize.call(c,l);return t.resolveAll&&i.push(t),c;function d(e){return function(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,i=t.end._bufferIndex;let a;if(n===o)a=[e[n].slice(r,i)];else{if(a=e.slice(n,o),r>-1){const e=a[0];"string"==typeof e?a[0]=e.slice(r):a.shift()}i>0&&a.push(e[o].slice(0,i))}return a}(a,e)}function f(){const{_bufferIndex:e,_index:t,line:n,column:o,offset:i}=r;return{_bufferIndex:e,_index:t,line:n,column:o,offset:i}}function p(){let e;for(;r._index<a.length;){const t=a[r._index];if("string"==typeof t)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)h(t.charCodeAt(r._bufferIndex));else h(t)}}function h(e){u=u(e)}function m(e,t){t.restore()}function g(e,t){return function(n,o,i){let a,u,d,p;return Array.isArray(n)?h(n):"tokenize"in n?h([n]):function(e){return t;function t(t){const n=null!==t&&e[t],r=null!==t&&e.null;return h([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}(n);function h(e){return a=e,u=0,0===e.length?i:m(e[u])}function m(e){return function(n){p=function(){const e=f(),t=c.previous,n=c.currentConstruct,o=c.events.length,i=Array.from(s);return{from:o,restore:a};function a(){r=e,c.previous=t,c.currentConstruct=n,c.events.length=o,s=i,v()}}(),d=e,e.partial||(c.currentConstruct=e);if(e.name&&c.parser.constructs.disable.null.includes(e.name))return y();return e.tokenize.call(t?Object.assign(Object.create(c),t):c,l,g,y)(n)}}function g(t){return e(d,p),o}function y(e){return p.restore(),++u<a.length?m(a[u]):i}}}function y(e,t){e.resolveAll&&!i.includes(e)&&i.push(e),e.resolve&&Np(c.events,t,c.events.length-t,e.resolve(c.events.slice(t),c)),e.resolveTo&&(c.events=e.resolveTo(c.events,c))}function v(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}const um=/[\0\t\n\r]/g;const dm=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function fm(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return Mp(n.slice(t?2:1),t?16:10)}return jp(n)||e}const pm={}.hasOwnProperty;function hm(e,t,n){return t&&"object"==typeof t&&(n=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(te),autolinkProtocol:C,autolinkEmail:C,atxHeading:i(G),blockQuote:i(W),characterEscape:C,characterReference:C,codeFenced:i(K),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:i(K,a),codeText:i(Y,a),codeTextData:C,data:C,codeFlowValue:C,definition:i(Q),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:i(X),hardBreakEscape:i(J),hardBreakTrailing:i(J),htmlFlow:i(Z,a),htmlFlowData:C,htmlText:i(Z,a),htmlTextData:C,image:i(ee),label:a,link:i(te),listItem:i(re),listItemValue:f,listOrdered:i(ne,d),listUnordered:i(ne),paragraph:i(oe),reference:I,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:i(G),strong:i(ie),thematicBreak:i(se)},exit:{atxHeading:l(),atxHeadingSequence:w,autolink:l(),autolinkEmail:q,autolinkProtocol:$,blockQuote:l(),characterEscapeValue:T,characterReferenceMarkerHexadecimal:V,characterReferenceMarkerNumeric:V,characterReferenceValue:U,characterReference:H,codeFenced:l(g),codeFencedFence:m,codeFencedFenceInfo:p,codeFencedFenceMeta:h,codeFlowValue:T,codeIndented:l(y),codeText:l(R),codeTextData:T,data:T,definition:l(),definitionDestinationString:x,definitionLabelString:v,definitionTitleString:b,emphasis:l(),hardBreakEscape:l(A),hardBreakTrailing:l(A),htmlFlow:l(j),htmlFlowData:T,htmlText:l(N),htmlTextData:T,image:l(O),label:_,labelText:D,lineEnding:P,link:l(L),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:B,resourceDestinationString:M,resourceTitleString:z,resource:F,setextHeading:l(E),setextHeadingLineSequence:S,setextHeadingText:k,strong:l(),thematicBreak:l()}};gm(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(e){let r={type:"root",children:[]};const i={stack:[r],tokenStack:[],config:t,enter:s,exit:c,buffer:a,resume:u,data:n},l=[];let d=-1;for(;++d<e.length;)if("listOrdered"===e[d][1].type||"listUnordered"===e[d][1].type)if("enter"===e[d][0])l.push(d);else{d=o(e,l.pop(),d)}for(d=-1;++d<e.length;){const n=t[e[d][0]];pm.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},i),e[d][1])}if(i.tokenStack.length>0){const e=i.tokenStack[i.tokenStack.length-1];(e[1]||vm).call(i,void 0,e[0])}for(r.position={start:mm(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:mm(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function o(e,t,n){let r,o,i,a,s=t-1,l=-1,c=!1;for(;++s<=n;){const t=e[s];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?l++:l--,a=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||a||l||i||(i=s),a=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:a=void 0}if(!l&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===l&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let a=s;for(o=void 0;a--;){const t=e[a];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;o&&(e[o][1].type="lineEndingBlank",c=!0),t[1].type="lineEnding",o=a}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}i&&(!o||i<o)&&(r._spread=!0),r.end=Object.assign({},o?e[o][1].start:t[1].end),e.splice(o||s,0,["exit",r,t[2]]),s++,n++}if("listItemPrefix"===t[1].type){const o={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=o,e.splice(s,0,["enter",o,t[2]]),s++,n++,i=void 0,a=!0}}}return e[t][1]._spread=c,n}function i(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:mm(t.start),end:void 0}}function l(e){return t;function t(t){e&&e.call(this,t),c.call(this,t)}}function c(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+np({start:e.start,end:e.end})+"): it’s not open");if(r[0].type!==e.type)if(t)t.call(this,e,r[0]);else{(r[1]||vm).call(this,e,r[0])}n.position.end=mm(e.end)}function u(){return Cp(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){const e=this.resume();this.stack[this.stack.length-1].lang=e}function h(){const e=this.resume();this.stack[this.stack.length-1].meta=e}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function v(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=zp(this.sliceSerialize(e)).toLowerCase()}function b(){const e=this.resume();this.stack[this.stack.length-1].title=e}function x(){const e=this.resume();this.stack[this.stack.length-1].url=e}function w(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}}function k(){this.data.setextHeadingSlurpLineEnding=!0}function S(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2}function E(){this.data.setextHeadingSlurpLineEnding=void 0}function C(e){const t=this.stack[this.stack.length-1].children;let n=t[t.length-1];n&&"text"===n.type||(n=ae(),n.position={start:mm(e.start),end:void 0},t.push(n)),this.stack.push(n)}function T(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=mm(e.end)}function P(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak){return n.children[n.children.length-1].position.end=mm(e.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(C.call(this,e),T.call(this,e))}function A(){this.data.atHardBreak=!0}function j(){const e=this.resume();this.stack[this.stack.length-1].value=e}function N(){const e=this.resume();this.stack[this.stack.length-1].value=e}function R(){const e=this.resume();this.stack[this.stack.length-1].value=e}function L(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function O(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function D(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace(dm,fm)}(t),n.identifier=zp(t).toLowerCase()}function _(){const e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];if(this.data.inReference=!0,"link"===n.type){const t=e.children;n.children=t}else n.alt=t}function M(){const e=this.resume();this.stack[this.stack.length-1].url=e}function z(){const e=this.resume();this.stack[this.stack.length-1].title=e}function F(){this.data.inReference=void 0}function I(){this.data.referenceType="collapsed"}function B(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=zp(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"}function V(e){this.data.characterReferenceType=e.type}function U(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let r;if(n)r=Mp(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0;else{r=jp(t)}this.stack[this.stack.length-1].value+=r}function H(e){this.stack.pop().position.end=mm(e.end)}function $(e){T.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function q(e){T.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function W(){return{type:"blockquote",children:[]}}function K(){return{type:"code",lang:null,meta:null,value:""}}function Y(){return{type:"inlineCode",value:""}}function Q(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function X(){return{type:"emphasis",children:[]}}function G(){return{type:"heading",depth:0,children:[]}}function J(){return{type:"break"}}function Z(){return{type:"html",value:""}}function ee(){return{type:"image",title:null,url:"",alt:null}}function te(){return{type:"link",title:null,url:"",children:[]}}function ne(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function re(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function oe(){return{type:"paragraph",children:[]}}function ie(){return{type:"strong",children:[]}}function ae(){return{type:"text",value:""}}function se(){return{type:"thematicBreak"}}}(n)(function(e){for(;!vh(e););return e}(function(e){const t={constructs:Op([lm,...(e||{}).extensions||[]]),content:n(Zp),defined:[],document:n(eh),flow:n(Yh),lazy:{},string:n(Xh),text:n(Gh)};return t;function n(e){return function(n){return cm(t,e,n)}}}(n).document().write(function(){let e,t=1,n="",r=!0;return function(o,i,a){const s=[];let l,c,u,d,f;for(o=n+("string"==typeof o?o.toString():new TextDecoder(i||void 0).decode(o)),u=0,n="",r&&(65279===o.charCodeAt(0)&&u++,r=void 0);u<o.length;){if(um.lastIndex=u,l=um.exec(o),d=l&&void 0!==l.index?l.index:o.length,f=o.charCodeAt(d),!l){n=o.slice(u);break}if(10===f&&u===d&&e)s.push(-3),e=void 0;else switch(e&&(s.push(-5),e=void 0),u<d&&(s.push(o.slice(u,d)),t+=d-u),f){case 0:s.push(65533),t++;break;case 9:for(c=4*Math.ceil(t/4),s.push(-2);t++<c;)s.push(-1);break;case 10:s.push(-4),t=1;break;default:e=!0,t=1}u=d+1}return a&&(e&&s.push(-5),n&&s.push(n),s.push(null)),s}}()(e,t,!0))))}function mm(e){return{line:e.line,column:e.column,offset:e.offset}}function gm(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?gm(e,r):ym(e,r)}}function ym(e,t){let n;for(n in t)if(pm.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function vm(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+np({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+np({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+np({start:t.start,end:t.end})+") is still open")}function bm(e){const t=this;t.parser=function(n){return hm(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function xm(e,t){const n=t.referenceType;let r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),i=o[0];i&&"text"===i.type?i.value="["+i.value:o.unshift({type:"text",value:"["});const a=o[o.length-1];return a&&"text"===a.type?a.value+=r:o.push({type:"text",value:r}),o}function wm(e){const t=e.spread;return null==t?e.children.length>1:t}function km(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const i=[];for(;r;)i.push(Sm(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return i.push(Sm(t.slice(o),o>0,!1)),i.join("")}function Sm(e,t,n){let r=0,o=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(o-1);for(;9===t||32===t;)o--,t=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}const Em={blockquote:function(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)},break:function(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){const n=t.value?t.value+"\n":"",r={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(r.className=["language-"+o[0]]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i},delete:function(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){const n="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=Gp(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let a,s=e.footnoteCounts.get(r);void 0===s?(s=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=i+1,s+=1,e.footnoteCounts.set(r,s);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)},heading:function(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return xm(e,t);const o={src:Gp(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(o.title=r.title);const i={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,i),e.applyData(t,i)},image:function(e,t){const n={src:Gp(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)},linkReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return xm(e,t);const o={href:Gp(r.url||"")};null!==r.title&&void 0!==r.title&&(o.title=r.title);const i={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)},link:function(e,t){const n={href:Gp(t.url)};null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},listItem:function(e,t,n){const r=e.all(t),o=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=wm(n[r])}return t}(n):wm(t),i={},a=[];if("boolean"==typeof t.checked){const e=r[0];let n;e&&"element"===e.type&&"p"===e.tagName?n=e:(n={type:"element",tagName:"p",properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:"text",value:" "}),n.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const e=r[s];(o||0!==s||"element"!==e.type||"p"!==e.tagName)&&a.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||o?a.push(e):a.push(...e.children)}const l=r[r.length-1];l&&(o||"element"!==l.type||"p"!==l.tagName)&&a.push({type:"text",value:"\n"});const c={type:"element",tagName:"li",properties:i,children:a};return e.patch(t,c),e.applyData(t,c)},list:function(e,t){const n={},r=e.all(t);let o=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++o<r.length;){const e=r[o];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)},paragraph:function(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),o.push(n)}if(n.length>0){const r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},i=ep(t.children[1]),a=Zf(t.children[t.children.length-1]);i&&a&&(r.position={start:i,end:a}),o.push(r)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,i),e.applyData(t,i)},tableCell:function(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){const r=n?n.children:void 0,o=0===(r?r.indexOf(t):1)?"th":"td",i=n&&"table"===n.type?n.align:void 0,a=i?i.length:t.children.length;let s=-1;const l=[];for(;++s<a;){const n=t.children[s],r={},a=i?i[s]:void 0;a&&(r.align=a);let c={type:"element",tagName:o,properties:r,children:[]};n&&(c.children=e.all(n),e.patch(n,c),c=e.applyData(n,c)),l.push(c)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,c),e.applyData(t,c)},text:function(e,t){const n={type:"text",value:km(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:Cm,yaml:Cm,definition:Cm,footnoteDefinition:Cm};function Cm(){}const Tm="object"==typeof self?self:globalThis,Pm=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new Tm[e](t)},Am=e=>((e,t)=>{const n=(t,n)=>(e.set(n,t),t),r=o=>{if(e.has(o))return e.get(o);const[i,a]=t[o];switch(i){case 0:case-1:return n(a,o);case 1:{const e=n([],o);for(const t of a)e.push(r(t));return e}case 2:{const e=n({},o);for(const[t,n]of a)e[r(t)]=r(n);return e}case 3:return n(new Date(a),o);case 4:{const{source:e,flags:t}=a;return n(new RegExp(e,t),o)}case 5:{const e=n(new Map,o);for(const[t,n]of a)e.set(r(t),r(n));return e}case 6:{const e=n(new Set,o);for(const t of a)e.add(r(t));return e}case 7:{const{name:e,message:t}=a;return n(Pm(e,t),o)}case 8:return n(BigInt(a),o);case"BigInt":return n(Object(BigInt(a)),o);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:e}=new Uint8Array(a);return n(new DataView(e),a)}}return n(Pm(i,a),o)};return r})(new Map,e)(0),jm="",{toString:Nm}={},{keys:Rm}=Object,Lm=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=Nm.call(e).slice(8,-1);switch(n){case"Array":return[1,jm];case"Object":return[2,jm];case"Date":return[3,jm];case"RegExp":return[4,jm];case"Map":return[5,jm];case"Set":return[6,jm];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},Om=([e,t])=>0===e&&("function"===t||"symbol"===t),Dm=(e,{json:t,lossy:n}={})=>{const r=[];return((e,t,n,r)=>{const o=(e,t)=>{const o=r.push(e)-1;return n.set(t,o),o},i=r=>{if(n.has(r))return n.get(r);let[a,s]=Lm(r);switch(a){case 0:{let t=r;switch(s){case"bigint":a=8,t=r.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+s);t=null;break;case"undefined":return o([-1],r)}return o([a,t],r)}case 1:{if(s){let e=r;return"DataView"===s?e=new Uint8Array(r.buffer):"ArrayBuffer"===s&&(e=new Uint8Array(r)),o([s,[...e]],r)}const e=[],t=o([a,e],r);for(const n of r)e.push(i(n));return t}case 2:{if(s)switch(s){case"BigInt":return o([s,r.toString()],r);case"Boolean":case"Number":case"String":return o([s,r.valueOf()],r)}if(t&&"toJSON"in r)return i(r.toJSON());const n=[],l=o([a,n],r);for(const t of Rm(r))!e&&Om(Lm(r[t]))||n.push([i(t),i(r[t])]);return l}case 3:return o([a,r.toISOString()],r);case 4:{const{source:e,flags:t}=r;return o([a,{source:e,flags:t}],r)}case 5:{const t=[],n=o([a,t],r);for(const[o,a]of r)(e||!Om(Lm(o))&&!Om(Lm(a)))&&t.push([i(o),i(a)]);return n}case 6:{const t=[],n=o([a,t],r);for(const o of r)!e&&Om(Lm(o))||t.push(i(o));return n}}const{message:l}=r;return o([a,{name:s,message:l}],r)};return i})(!(t||n),!!t,new Map,r)(e),r},_m="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?Am(Dm(e,t)):structuredClone(e):(e,t)=>Am(Dm(e,t));function Mm(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function zm(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const Fm=function(e){if(null==e)return Bm;if("function"==typeof e)return Im(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Fm(e[n]);return Im(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}(e):function(e){const t=e;return Im(n);function n(n){const r=n;let o;for(o in e)if(r[o]!==t[o])return!1;return!0}}(e);if("string"==typeof e)return function(e){return Im(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function Im(e){return function(t,n,r){return Boolean(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function Bm(){return!0}const Vm=[],Um=!0,Hm=!1;function $m(e,t,n,r){let o;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):o=t;const i=Fm(o),a=r?-1:1;!function e(o,s,l){const c=o&&"object"==typeof o?o:{};if("string"==typeof c.type){const e="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0;Object.defineProperty(u,"name",{value:"node ("+o.type+(e?"<"+e+">":"")+")"})}return u;function u(){let c,u,d,f=Vm;if((!t||i(o,s,l[l.length-1]||void 0))&&(f=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[Um,e];return null==e?Vm:[e]}(n(o,l)),f[0]===Hm))return f;if("children"in o&&o.children){const t=o;if(t.children&&"skip"!==f[0])for(u=(r?t.children.length:-1)+a,d=l.concat(t);u>-1&&u<t.children.length;){const n=t.children[u];if(c=e(n,u,d)(),c[0]===Hm)return c;u="number"==typeof c[1]?c[1]:u+a}}return f}}(e,void 0,[])()}function qm(e,t,n,r){let o,i,a;"function"==typeof t&&"function"!=typeof n?(i=void 0,a=t,o=n):(i=t,a=n,o=r),$m(e,i,function(e,t){const n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return a(e,r,n)},o)}const Wm={}.hasOwnProperty,Km={};function Ym(e,t){e.position&&(t.position=function(e){const t=ep(e),n=Zf(e);if(t&&n)return{start:t,end:n}}(e))}function Qm(e,t){let n=t;if(e&&e.data){const t=e.data.hName,r=e.data.hChildren,o=e.data.hProperties;if("string"==typeof t)if("element"===n.type)n.tagName=t;else{n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}}"element"===n.type&&o&&Object.assign(n.properties,_m(o)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function Xm(e,t){const n=t.data||{},r=!("value"in t)||Wm.call(n,"hProperties")||Wm.call(n,"hChildren")?{type:"element",tagName:"div",properties:{},children:e.all(t)}:{type:"text",value:t.value};return e.patch(t,r),e.applyData(t,r)}function Gm(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function Jm(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function Zm(e,t){const n=function(e,t){const n=t||Km,r=new Map,o=new Map,i=new Map,a={...Em,...n.handlers},s={all:function(e){const t=[];if("children"in e){const n=e.children;let r=-1;for(;++r<n.length;){const o=s.one(n[r],e);if(o){if(r&&"break"===n[r-1].type&&(Array.isArray(o)||"text"!==o.type||(o.value=Jm(o.value)),!Array.isArray(o)&&"element"===o.type)){const e=o.children[0];e&&"text"===e.type&&(e.value=Jm(e.value))}Array.isArray(o)?t.push(...o):t.push(o)}}}return t},applyData:Qm,definitionById:r,footnoteById:o,footnoteCounts:i,footnoteOrder:[],handlers:a,one:function(e,t){const n=e.type,r=s.handlers[n];if(Wm.call(s.handlers,n)&&r)return r(s,e,t);if(s.options.passThrough&&s.options.passThrough.includes(n)){if("children"in e){const{children:t,...n}=e,r=_m(n);return r.children=s.all(e),r}return _m(e)}return(s.options.unknownHandler||Xm)(s,e,t)},options:n,patch:Ym,wrap:Gm};return qm(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){const t="definition"===e.type?r:o,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),s}(e,t),r=n.one(e,void 0),o=function(e){const t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Mm,r=e.options.footnoteBackLabel||zm,o=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l<e.footnoteOrder.length;){const o=e.footnoteById.get(e.footnoteOrder[l]);if(!o)continue;const i=e.all(o),a=String(o.identifier).toUpperCase(),c=Gp(a.toLowerCase());let u=0;const d=[],f=e.footnoteCounts.get(a);for(;void 0!==f&&++u<=f;){d.length>0&&d.push({type:"text",value:" "});let e="string"==typeof n?n:n(l,u);"string"==typeof e&&(e={type:"text",value:e}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+c+(u>1?"-"+u:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(l,u),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const p=i[i.length-1];if(p&&"element"===p.type&&"p"===p.tagName){const e=p.children[p.children.length-1];e&&"text"===e.type?e.value+=" ":p.children.push({type:"text",value:" "}),p.children.push(...d)}else i.push(...d);const h={type:"element",tagName:"li",properties:{id:t+"fn-"+c},children:e.wrap(i,!0)};e.patch(o,h),s.push(h)}if(0!==s.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{..._m(a),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:"\n"}]}}(n),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&i.children.push({type:"text",value:"\n"},o),i}function eg(e,t){return e&&"run"in e?async function(n,r){const o=Zm(n,{file:r,...t});await e.run(o,r)}:function(n,r){return Zm(n,{file:r,...e||t})}}function tg(e){if(e)throw e}var ng,rg;var og=function(){if(rg)return ng;rg=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},i=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,o=e.call(n,"constructor"),i=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!o&&!i)return!1;for(r in n);return void 0===r||e.call(n,r)},a=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},s=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return ng=function e(){var t,n,r,l,c,u,d=arguments[0],f=1,p=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<p;++f)if(null!=(t=arguments[f]))for(n in t)r=s(d,n),d!==(l=s(t,n))&&(h&&l&&(i(l)||(c=o(l)))?(c?(c=!1,u=r&&o(r)?r:[]):u=r&&i(r)?r:{},a(d,{name:n,newValue:e(h,u,l)})):void 0!==l&&a(d,{name:n,newValue:l}));return d},ng}();const ig=r(og);function ag(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function sg(){const e=[],t={run:function(...t){let n=-1;const r=t.pop();if("function"!=typeof r)throw new TypeError("Expected function as last argument, not "+r);!function o(i,...a){const s=e[++n];let l=-1;if(i)r(i);else{for(;++l<t.length;)null!==a[l]&&void 0!==a[l]||(a[l]=t[l]);t=a,s?function(e,t){let n;return r;function r(...t){const r=e.length>t.length;let s;r&&t.push(o);try{s=e.apply(this,t)}catch(i){if(r&&n)throw i;return o(i)}r||(s&&s.then&&"function"==typeof s.then?s.then(a,o):s instanceof Error?o(s):a(s))}function o(e,...r){n||(n=!0,t(e,...r))}function a(e){o(null,e)}}(s,o)(...a):r(null,...a)}}(null,...t)},use:function(n){if("function"!=typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}const lg={basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');cg(e);let n,r=0,o=-1,i=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;i--;)if(47===e.codePointAt(i)){if(n){r=i+1;break}}else o<0&&(n=!0,o=i+1);return o<0?"":e.slice(r,o)}if(t===e)return"";let a=-1,s=t.length-1;for(;i--;)if(47===e.codePointAt(i)){if(n){r=i+1;break}}else a<0&&(n=!0,a=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(o=i):(s=-1,o=a));r===o?o=a:o<0&&(o=e.length);return e.slice(r,o)},dirname:function(e){if(cg(e),0===e.length)return".";let t,n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},extname:function(e){cg(e);let t,n=e.length,r=-1,o=0,i=-1,a=0;for(;n--;){const s=e.codePointAt(n);if(47!==s)r<0&&(t=!0,r=n+1),46===s?i<0?i=n:1!==a&&(a=1):i>-1&&(a=-1);else if(t){o=n+1;break}}if(i<0||r<0||0===a||1===a&&i===r-1&&i===o+1)return"";return e.slice(i,r)},join:function(...e){let t,n=-1;for(;++n<e.length;)cg(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){cg(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,o="",i=0,a=-1,s=0,l=-1;for(;++l<=e.length;){if(l<e.length)n=e.codePointAt(l);else{if(47===n)break;n=47}if(47===n){if(a===l-1||1===s);else if(a!==l-1&&2===s){if(o.length<2||2!==i||46!==o.codePointAt(o.length-1)||46!==o.codePointAt(o.length-2))if(o.length>2){if(r=o.lastIndexOf("/"),r!==o.length-1){r<0?(o="",i=0):(o=o.slice(0,r),i=o.length-1-o.lastIndexOf("/")),a=l,s=0;continue}}else if(o.length>0){o="",i=0,a=l,s=0;continue}t&&(o=o.length>0?o+"/..":"..",i=2)}else o.length>0?o+="/"+e.slice(a+1,l):o=e.slice(a+1,l),i=l-a-1;a=l,s=0}else 46===n&&s>-1?s++:s=-1}return o}(e,!t);0!==n.length||t||(n=".");n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/");return t?"/"+n:n}(t)},sep:"/"};function cg(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const ug={cwd:function(){return"/"}};function dg(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function fg(e){if("string"==typeof e)e=new URL(e);else if(!dg(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("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){const e=t.codePointAt(n+2);if(70===e||102===e){const e=new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}const pg=["history","path","basename","stem","extname","dirname"];class hg{constructor(e){let t;t=e?dg(e)?{path:e}:"string"==typeof e||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":ug.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n,r=-1;for(;++r<pg.length;){const e=pg[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)pg.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?lg.basename(this.path):void 0}set basename(e){gg(e,"basename"),mg(e,"basename"),this.path=lg.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?lg.dirname(this.path):void 0}set dirname(e){yg(this.basename,"dirname"),this.path=lg.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?lg.extname(this.path):void 0}set extname(e){if(mg(e,"extname"),yg(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=lg.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){dg(e)&&(e=fg(e)),gg(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?lg.basename(this.path,this.extname):void 0}set stem(e){gg(e,"stem"),mg(e,"stem"),this.path=lg.join(this.dirname||"",e+(this.extname||""))}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){const r=new ap(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){if(void 0===this.value)return"";if("string"==typeof this.value)return this.value;return new TextDecoder(e||void 0).decode(this.value)}}function mg(e,t){if(e&&e.includes(lg.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+lg.sep+"`")}function gg(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function yg(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const vg=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},bg={}.hasOwnProperty;class xg extends vg{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=sg()}copy(){const e=new xg;let t=-1;for(;++t<this.attachers.length;){const n=this.attachers[t];e.use(...n)}return e.data(ig(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?(Eg("data",this.frozen),this.namespace[e]=t,this):bg.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Eg("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...n]=this.attachers[this.freezeIndex];if(!1===n[0])continue;!0===n[0]&&(n[0]=void 0);const r=t.call(e,...n);"function"==typeof r&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const t=Pg(e),n=this.parser||this.Parser;return kg("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),kg("process",this.parser||this.Parser),Sg("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,o){const i=Pg(e),a=n.parse(i);function s(e,n){e||!n?o(e):r?r(n):t(void 0,n)}n.run(a,i,function(e,t,r){if(e||!t||!r)return s(e);const o=t,i=n.stringify(o,r);var a;"string"==typeof(a=i)||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(a)?r.value=i:r.result=i,s(e,r)})}}processSync(e){let t,n=!1;return this.freeze(),kg("processSync",this.parser||this.Parser),Sg("processSync",this.compiler||this.Compiler),this.process(e,function(e,r){n=!0,tg(e),t=r}),Tg("processSync","process",n),t}run(e,t,n){Cg(e),this.freeze();const r=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?o(void 0,n):new Promise(o);function o(o,i){const a=Pg(t);r.run(e,a,function(t,r,a){const s=r||e;t?i(t):o?o(s):n(void 0,s,a)})}}runSync(e,t){let n,r=!1;return this.run(e,t,function(e,t){tg(e),n=t,r=!0}),Tg("runSync","run",r),n}stringify(e,t){this.freeze();const n=Pg(t),r=this.compiler||this.Compiler;return Sg("stringify",r),Cg(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(Eg("use",this.frozen),null==e);else if("function"==typeof e)s(e,t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?a(e):i(e)}return this;function o(e){if("function"==typeof e)s(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;s(t,n)}else i(e)}}function i(e){if(!("plugins"in e)&&!("settings"in e))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");a(e.plugins),e.settings&&(r.settings=ig(!0,r.settings,e.settings))}function a(e){let t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;){o(e[t])}}}function s(e,t){let r=-1,o=-1;for(;++r<n.length;)if(n[r][0]===e){o=r;break}if(-1===o)n.push([e,...t]);else if(t.length>0){let[r,...i]=t;const a=n[o][1];ag(a)&&ag(r)&&(r=ig(!0,a,r)),n[o]=[e,r,...i]}}}}const wg=(new xg).freeze();function kg(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function Sg(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function Eg(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 Cg(e){if(!ag(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function Tg(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Pg(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new hg(e)}const Ag=[],jg={allowDangerousHtml:!0},Ng=/^(https?|ircs?|mailto|xmpp)$/i,Rg=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Lg(e){const t=function(e){const t=e.rehypePlugins||Ag,n=e.remarkPlugins||Ag,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...jg}:jg,o=wg().use(bm).use(n).use(eg,r).use(t);return o}(e),n=function(e){const t=e.children||"",n=new hg;"string"==typeof t&&(n.value=t);return n}(e);return function(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,i=t.disallowedElements,a=t.skipHtml,s=t.unwrapDisallowed,l=t.urlTransform||Og;for(const u of Rg)Object.hasOwn(t,u.from)&&ef((u.from,u.to&&u.to,u.id));t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:"root"===e.type?e.children:[e]});return qm(e,c),pp(e,{Fragment:$.Fragment,components:o,ignoreInvalidStyle:!0,jsx:$.jsx,jsxs:$.jsxs,passKeys:!0,passNode:!0});function c(e,t,o){if("raw"===e.type&&o&&"number"==typeof t)return a?o.children.splice(t,1):o.children[t]={type:"text",value:e.value},t;if("element"===e.type){let t;for(t in Sp)if(Object.hasOwn(Sp,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=Sp[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=l(String(n||""),t,e))}}if("element"===e.type){let a=n?!n.includes(e.tagName):!!i&&i.includes(e.tagName);if(!a&&r&&"number"==typeof t&&(a=!r(e,t,o)),a&&o&&"number"==typeof t)return s&&e.children?o.children.splice(t,1,...e.children):o.children.splice(t,1),t}}}(t.runSync(t.parse(n),n),e)}function Og(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return-1===t||-1!==o&&t>o||-1!==n&&t>n||-1!==r&&t>r||Ng.test(e.slice(0,t))?e:""}function Dg(e,t){const n=String(e);if("string"!=typeof t)throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;-1!==o;)r++,o=n.indexOf(t,o+t.length);return r}function _g(e,t,n){const r=Fm((n||{}).ignore||[]),o=function(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const e=n[r];t.push([Mg(e[0]),zg(e[1])])}return t}(t);let i=-1;for(;++i<o.length;)$m(e,"text",a);function a(e,t){let n,a=-1;for(;++a<t.length;){const e=t[a],o=n?n.children:void 0;if(r(e,o?o.indexOf(e):void 0,n))return;n=e}if(n)return function(e,t){const n=t[t.length-1],r=o[i][0],a=o[i][1];let s=0;const l=n.children.indexOf(e);let c=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){const n=d.index,o={index:d.index,input:d.input,stack:[...t,e]};let i=a(...d,o);if("string"==typeof i&&(i=i.length>0?{type:"text",value:i}:void 0),!1===i?r.lastIndex=n+1:(s!==n&&u.push({type:"text",value:e.value.slice(s,n)}),Array.isArray(i)?u.push(...i):i&&u.push(i),s=n+d[0].length,c=!0),!r.global)break;d=r.exec(e.value)}c?(s<e.value.length&&u.push({type:"text",value:e.value.slice(s)}),n.children.splice(l,1,...u)):u=[e];return l+u.length}(e,t)}}function Mg(e){return"string"==typeof e?new RegExp(function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e),"g"):e}function zg(e){return"function"==typeof e?e:function(){return e}}const Fg="phrasing",Ig=["autolink","link","image","label"];function Bg(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Vg(e){this.config.enter.autolinkProtocol.call(this,e)}function Ug(e){this.config.exit.autolinkProtocol.call(this,e)}function Hg(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 $g(e){this.config.exit.autolinkEmail.call(this,e)}function qg(e){this.exit(e)}function Wg(e){_g(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Kg],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Yg]],{ignore:["link","linkReference"]})}function Kg(e,t,n,r,o){let i="";if(!Qg(o))return!1;if(/^w/i.test(t)&&(n=t+n,t="",i="http://"),!function(e){const t=e.split(".");if(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])))return!1;return!0}(n))return!1;const a=function(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const o=Dg(e,"(");let i=Dg(e,")");for(;-1!==r&&o>i;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),i++;return[e,n]}(n+r);if(!a[0])return!1;const s={type:"link",title:null,url:i+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function Yg(e,t,n,r){return!(!Qg(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Qg(e,t){const n=e.input.charCodeAt(e.index-1);return(0===e.index||Qp(n)||Yp(n))&&(!t||47!==n)}function Xg(){this.buffer()}function Gg(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Jg(){this.buffer()}function Zg(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function ey(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=zp(this.sliceSerialize(e)).toLowerCase(),n.label=t}function ty(e){this.exit(e)}function ny(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=zp(this.sliceSerialize(e)).toLowerCase(),n.label=t}function ry(e){this.exit(e)}function oy(e,t,n,r){const o=n.createTracker(r);let i=o.move("[^");const a=n.enter("footnoteReference"),s=n.enter("reference");return i+=o.move(n.safe(n.associationId(e),{after:"]",before:i})),s(),a(),i+=o.move("]"),i}function iy(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:function(e,n,r,o){const i=r.createTracker(o);let a=i.move("[^");const s=r.enter("footnoteDefinition"),l=r.enter("label");a+=i.move(r.safe(r.associationId(e),{before:a,after:"]"})),l(),a+=i.move("]:"),e.children&&e.children.length>0&&(i.shift(4),a+=i.move((t?"\n":" ")+r.indentLines(r.containerFlow(e,i.current()),t?sy:ay)));return s(),a},footnoteReference:oy},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}}function ay(e,t,n){return 0===t?e:sy(e,t,n)}function sy(e,t,n){return(n?"":" ")+e}oy.peek=function(){return"["};const ly=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function cy(e){this.enter({type:"delete",children:[]},e)}function uy(e){this.exit(e)}function dy(e,t,n,r){const o=n.createTracker(r),i=n.enter("strikethrough");let a=o.move("~~");return a+=n.containerPhrasing(e,{...o.current(),before:a,after:"~"}),a+=o.move("~~"),i(),a}function fy(e){return e.length}function py(e){return null==e?"":String(e)}function hy(e){const t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:82===t||114===t?114:0}function my(e,t,n){return">"+(n?"":" ")+e}function gy(e,t){return yy(e,t.inConstruct,!0)&&!yy(e,t.notInConstruct,!1)}function yy(e,t,n){if("string"==typeof t&&(t=[t]),!t||0===t.length)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function vy(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if("\n"===n.unsafe[o].character&&gy(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return"\\\n"}function by(e,t,n){return(n?"":" ")+e}function xy(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 wy(e){return"&#x"+e.toString(16).toUpperCase()+";"}function ky(e,t,n){const r=nh(e),o=nh(t);return void 0===r?void 0===o?"_"===n?{inside:!0,outside:!0}:{inside:!1,outside:!1}:1===o?{inside:!0,outside:!0}:{inside:!1,outside:!0}:1===r?void 0===o?{inside:!1,outside:!1}:1===o?{inside:!0,outside:!0}:{inside:!1,outside:!1}:void 0===o?{inside:!1,outside:!1}:1===o?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function Sy(e,t,n,r){const o=function(e){const t=e.options.emphasis||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}(n),i=n.enter("emphasis"),a=n.createTracker(r),s=a.move(o);let l=a.move(n.containerPhrasing(e,{after:o,before:s,...a.current()}));const c=l.charCodeAt(0),u=ky(r.before.charCodeAt(r.before.length-1),c,o);u.inside&&(l=wy(c)+l.slice(1));const d=l.charCodeAt(l.length-1),f=ky(r.after.charCodeAt(0),d,o);f.inside&&(l=l.slice(0,-1)+wy(d));const p=a.move(o);return i(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+l+p}function Ey(e){return e.value||""}function Cy(e,t,n,r){const o=xy(n),i='"'===o?"Quote":"Apostrophe",a=n.enter("image");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${i}`),c+=l.move(" "+o),c+=l.move(n.safe(e.title,{before:c,after:o,...l.current()})),c+=l.move(o),s()),c+=l.move(")"),a(),c}function Ty(e,t,n,r){const o=e.referenceType,i=n.enter("imageReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("![");const c=n.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),a();const u=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=u,i(),"full"!==o&&c&&c===d?"shortcut"===o?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function Py(e,t,n){let r=e.value||"",o="`",i=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++i<n.unsafe.length;){const e=n.unsafe[i],t=n.compilePattern(e);let o;if(e.atBreak)for(;o=t.exec(r);){let e=o.index;10===r.charCodeAt(e)&&13===r.charCodeAt(e-1)&&e--,r=r.slice(0,e)+" "+r.slice(o.index+1)}}return o+r+o}function Ay(e,t){const n=Cp(e);return Boolean(!t.options.resourceLink&&e.url&&!e.title&&e.children&&1===e.children.length&&"text"===e.children[0].type&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}function jy(e,t,n,r){const o=xy(n),i='"'===o?"Quote":"Apostrophe",a=n.createTracker(r);let s,l;if(Ay(e,n)){const t=n.stack;n.stack=[],s=n.enter("autolink");let r=a.move("<");return r+=a.move(n.containerPhrasing(e,{before:r,after:">",...a.current()})),r+=a.move(">"),s(),n.stack=t,r}s=n.enter("link"),l=n.enter("label");let c=a.move("[");return c+=a.move(n.containerPhrasing(e,{before:c,after:"](",...a.current()})),c+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(n.safe(e.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(l=n.enter("destinationRaw"),c+=a.move(n.safe(e.url,{before:c,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${i}`),c+=a.move(" "+o),c+=a.move(n.safe(e.title,{before:c,after:o,...a.current()})),c+=a.move(o),l()),c+=a.move(")"),s(),c}function Ny(e,t,n,r){const o=e.referenceType,i=n.enter("linkReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),a();const u=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=u,i(),"full"!==o&&c&&c===d?"shortcut"===o?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function Ry(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 Ly(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}dy.peek=function(){return"~"},Sy.peek=function(e,t,n){return n.options.emphasis||"*"},Ey.peek=function(){return"<"},Cy.peek=function(){return"!"},Ty.peek=function(){return"!"},Py.peek=function(){return"`"},jy.peek=function(e,t,n){return Ay(e,n)?"<":"["},Ny.peek=function(){return"["};const Oy=Fm(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Dy(e,t,n,r){const o=function(e){const t=e.options.strong||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}(n),i=n.enter("strong"),a=n.createTracker(r),s=a.move(o+o);let l=a.move(n.containerPhrasing(e,{after:o,before:s,...a.current()}));const c=l.charCodeAt(0),u=ky(r.before.charCodeAt(r.before.length-1),c,o);u.inside&&(l=wy(c)+l.slice(1));const d=l.charCodeAt(l.length-1),f=ky(r.after.charCodeAt(0),d,o);f.inside&&(l=l.slice(0,-1)+wy(d));const p=a.move(o+o);return i(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+l+p}Dy.peek=function(e,t,n){return n.options.strong||"*"};const _y={blockquote:function(e,t,n,r){const o=n.enter("blockquote"),i=n.createTracker(r);i.move("> "),i.shift(2);const a=n.indentLines(n.containerFlow(e,i.current()),my);return o(),a},break:vy,code:function(e,t,n,r){const o=function(e){const t=e.options.fence||"`";if("`"!==t&&"~"!==t)throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}(n),i=e.value||"",a="`"===o?"GraveAccent":"Tilde";if(function(e,t){return Boolean(!1===t.options.fences&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}(e,n)){const e=n.enter("codeIndented"),t=n.indentLines(i,by);return e(),t}const s=n.createTracker(r),l=o.repeat(Math.max(function(e,t){const n=String(e);let r=n.indexOf(t),o=r,i=0,a=0;if("string"!=typeof t)throw new TypeError("Expected substring");for(;-1!==r;)r===o?++i>a&&(a=i):i=1,o=r+t.length,r=n.indexOf(t,o);return a}(i,o)+1,3)),c=n.enter("codeFenced");let u=s.move(l);if(e.lang){const t=n.enter(`codeFencedLang${a}`);u+=s.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){const t=n.enter(`codeFencedMeta${a}`);u+=s.move(" "),u+=s.move(n.safe(e.meta,{before:u,after:"\n",encode:["`"],...s.current()})),t()}return u+=s.move("\n"),i&&(u+=s.move(i+"\n")),u+=s.move(l),c(),u},definition:function(e,t,n,r){const o=xy(n),i='"'===o?"Quote":"Apostrophe",a=n.enter("definition");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("[");return c+=l.move(n.safe(n.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":"\n",...l.current()}))),s(),e.title&&(s=n.enter(`title${i}`),c+=l.move(" "+o),c+=l.move(n.safe(e.title,{before:c,after:o,...l.current()})),c+=l.move(o),s()),a(),c},emphasis:Sy,hardBreak:vy,heading:function(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),i=n.createTracker(r);if(function(e,t){let n=!1;return qm(e,function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return n=!0,Hm}),Boolean((!e.depth||e.depth<3)&&Cp(e)&&(t.options.setext||n))}(e,n)){const t=n.enter("headingSetext"),r=n.enter("phrasing"),a=n.containerPhrasing(e,{...i.current(),before:"\n",after:"\n"});return r(),t(),a+"\n"+(1===o?"=":"-").repeat(a.length-(Math.max(a.lastIndexOf("\r"),a.lastIndexOf("\n"))+1))}const a="#".repeat(o),s=n.enter("headingAtx"),l=n.enter("phrasing");i.move(a+" ");let c=n.containerPhrasing(e,{before:"# ",after:"\n",...i.current()});return/^[\t ]/.test(c)&&(c=wy(c.charCodeAt(0))+c.slice(1)),c=c?a+" "+c:a,n.options.closeAtx&&(c+=" "+a),l(),s(),c},html:Ey,image:Cy,imageReference:Ty,inlineCode:Py,link:jy,linkReference:Ny,list:function(e,t,n,r){const o=n.enter("list"),i=n.bulletCurrent;let a=e.ordered?function(e){const t=e.options.bulletOrdered||".";if("."!==t&&")"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}(n):Ry(n);const s=e.ordered?"."===a?")":".":function(e){const t=Ry(e),n=e.options.bulletOther;if(!n)return"*"===t?"-":"*";if("*"!==n&&"+"!==n&&"-"!==n)throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}(n);let l=!(!t||!n.bulletLastUsed)&&a===n.bulletLastUsed;if(!e.ordered){const t=e.children?e.children[0]:void 0;if("*"!==a&&"-"!==a||!t||t.children&&t.children[0]||"list"!==n.stack[n.stack.length-1]||"listItem"!==n.stack[n.stack.length-2]||"list"!==n.stack[n.stack.length-3]||"listItem"!==n.stack[n.stack.length-4]||0!==n.indexStack[n.indexStack.length-1]||0!==n.indexStack[n.indexStack.length-2]||0!==n.indexStack[n.indexStack.length-3]||(l=!0),Ly(n)===a&&t){let t=-1;for(;++t<e.children.length;){const n=e.children[t];if(n&&"listItem"===n.type&&n.children&&n.children[0]&&"thematicBreak"===n.children[0].type){l=!0;break}}}}l&&(a=s),n.bulletCurrent=a;const c=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=i,o(),c},listItem:function(e,t,n,r){const o=function(e){const t=e.options.listItemIndent||"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(n);let i=n.bulletCurrent||Ry(n);t&&"list"===t.type&&t.ordered&&(i=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+i);let a=i.length+1;("tab"===o||"mixed"===o&&(t&&"list"===t.type&&t.spread||e.spread))&&(a=4*Math.ceil(a/4));const s=n.createTracker(r);s.move(i+" ".repeat(a-i.length)),s.shift(a);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,s.current()),function(e,t,n){if(t)return(n?"":" ".repeat(a))+e;return(n?i:i+" ".repeat(a-i.length))+e});return l(),c},paragraph:function(e,t,n,r){const o=n.enter("paragraph"),i=n.enter("phrasing"),a=n.containerPhrasing(e,r);return i(),o(),a},root:function(e,t,n,r){return(e.children.some(function(e){return Oy(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)},strong:Dy,text:function(e,t,n,r){return n.safe(e.value,r)},thematicBreak:function(e,t,n){const r=(Ly(n)+(n.options.ruleSpaces?" ":"")).repeat(function(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}(n));return n.options.ruleSpaces?r.slice(0,-1):r}};function My(e){const t=e._align;this.enter({type:"table",align:t.map(function(e){return"none"===e?null:e}),children:[]},e),this.data.inTable=!0}function zy(e){this.exit(e),this.data.inTable=void 0}function Fy(e){this.enter({type:"tableRow",children:[]},e)}function Iy(e){this.exit(e)}function By(e){this.enter({type:"tableCell",children:[]},e)}function Vy(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Uy));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Uy(e,t){return"|"===t?t:e}function Hy(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,i=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,n){let r=_y.inlineCode(e,t,n);n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&"));return r},table:function(e,t,n,r){return s(function(e,t,n){const r=e.children;let o=-1;const i=[],a=t.enter("table");for(;++o<r.length;)i[o]=l(r[o],t,n);return a(),i}(e,n,r),e.align)},tableCell:a,tableRow:function(e,t,n,r){const o=s([l(e,n,r)]);return o.slice(0,o.indexOf("\n"))}}};function a(e,t,n,r){const o=n.enter("tableCell"),a=n.enter("phrasing"),s=n.containerPhrasing(e,{...r,before:i,after:i});return a(),o(),s}function s(e,t){return function(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||fy,i=[],a=[],s=[],l=[];let c=0,u=-1;for(;++u<e.length;){const t=[],r=[];let i=-1;for(e[u].length>c&&(c=e[u].length);++i<e[u].length;){const a=py(e[u][i]);if(!1!==n.alignDelimiters){const e=o(a);r[i]=e,(void 0===l[i]||e>l[i])&&(l[i]=e)}t.push(a)}a[u]=t,s[u]=r}let d=-1;if("object"==typeof r&&"length"in r)for(;++d<c;)i[d]=hy(r[d]);else{const e=hy(r);for(;++d<c;)i[d]=e}d=-1;const f=[],p=[];for(;++d<c;){const e=i[d];let t="",r="";99===e?(t=":",r=":"):108===e?t=":":114===e&&(r=":");let o=!1===n.alignDelimiters?1:Math.max(1,l[d]-t.length-r.length);const a=t+"-".repeat(o)+r;!1!==n.alignDelimiters&&(o=t.length+o+r.length,o>l[d]&&(l[d]=o),p[d]=o),f[d]=a}a.splice(1,0,f),s.splice(1,0,p),u=-1;const h=[];for(;++u<a.length;){const e=a[u],t=s[u];d=-1;const r=[];for(;++d<c;){const o=e[d]||"";let a="",s="";if(!1!==n.alignDelimiters){const e=l[d]-(t[d]||0),n=i[d];114===n?a=" ".repeat(e):99===n?e%2?(a=" ".repeat(e/2+.5),s=" ".repeat(e/2-.5)):(a=" ".repeat(e/2),s=a):s=" ".repeat(e)}!1===n.delimiterStart||d||r.push("|"),!1===n.padding||!1===n.alignDelimiters&&""===o||!1===n.delimiterStart&&!d||r.push(" "),!1!==n.alignDelimiters&&r.push(a),r.push(o),!1!==n.alignDelimiters&&r.push(s),!1!==n.padding&&r.push(" "),!1===n.delimiterEnd&&d===c-1||r.push("|")}h.push(!1===n.delimiterEnd?r.join("").replace(/ +$/,""):r.join(""))}return h.join("\n")}(e,{align:t,alignDelimiters:r,padding:n,stringLength:o})}function l(e,t,n){const r=e.children;let o=-1;const i=[],s=t.enter("tableRow");for(;++o<r.length;)i[o]=a(r[o],0,t,n);return s(),i}}function $y(e){const t=this.stack[this.stack.length-2];t.type,t.checked="taskListCheckValueChecked"===e.type}function qy(e){const t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){const e=this.stack[this.stack.length-1];e.type;const n=e.children[0];if(n&&"text"===n.type){const r=t.children;let o,i=-1;for(;++i<r.length;){const e=r[i];if("paragraph"===e.type){o=e;break}}o===e&&(n.value=n.value.slice(1),0===n.value.length?e.children.shift():e.position&&n.position&&"number"==typeof n.position.start.offset&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function Wy(e,t,n,r){const o=e.children[0],i="boolean"==typeof e.checked&&o&&"paragraph"===o.type,a="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);i&&s.move(a);let l=_y.listItem(e,t,n,{...r,...s.current()});return i&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,function(e){return e+a})),l}const Ky={tokenize:function(e,t,n){let r=0;return function t(i){if((87===i||119===i)&&r<3)return r++,e.consume(i),t;if(46===i&&3===r)return e.consume(i),o;return n(i)};function o(e){return null===e?n(e):t(e)}},partial:!0},Yy={tokenize:function(e,t,n){let r,o,i;return a;function a(t){return 46===t||95===t?e.check(Xy,l,s)(t):null===t||Wp(t)||Qp(t)||45!==t&&Yp(t)?l(t):(i=!0,e.consume(t),a)}function s(t){return 95===t?r=!0:(o=r,r=void 0),e.consume(t),a}function l(e){return o||r||!i?n(e):t(e)}},partial:!0},Qy={tokenize:function(e,t){let n=0,r=0;return o;function o(a){return 40===a?(n++,e.consume(a),o):41===a&&r<n?i(a):33===a||34===a||38===a||39===a||41===a||42===a||44===a||46===a||58===a||59===a||60===a||63===a||93===a||95===a||126===a?e.check(Xy,t,i)(a):null===a||Wp(a)||Qp(a)?t(a):(e.consume(a),o)}function i(t){return 41===t&&r++,e.consume(t),o}},partial:!0},Xy={tokenize:function(e,t,n){return r;function r(a){return 33===a||34===a||39===a||41===a||42===a||44===a||46===a||58===a||59===a||63===a||95===a||126===a?(e.consume(a),r):38===a?(e.consume(a),i):93===a?(e.consume(a),o):60===a||null===a||Wp(a)||Qp(a)?t(a):n(a)}function o(e){return null===e||40===e||91===e||Wp(e)||Qp(e)?t(e):r(e)}function i(e){return Fp(e)?a(e):n(e)}function a(t){return 59===t?(e.consume(t),r):Fp(t)?(e.consume(t),a):n(t)}},partial:!0},Gy={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return Ip(e)?n(e):t(e)}},partial:!0},Jy={name:"wwwAutolink",tokenize:function(e,t,n){const r=this;return function(t){if(87!==t&&119!==t||!rv.call(r,r.previous)||sv(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Ky,e.attempt(Yy,e.attempt(Qy,o),n),n)(t)};function o(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:rv},Zy={name:"protocolAutolink",tokenize:function(e,t,n){const r=this;let o="",i=!1;return function(t){if((72===t||104===t)&&ov.call(r,r.previous)&&!sv(r.events))return e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(t),e.consume(t),a;return n(t)};function a(t){if(Fp(t)&&o.length<5)return o+=String.fromCodePoint(t),e.consume(t),a;if(58===t){const n=o.toLowerCase();if("http"===n||"https"===n)return e.consume(t),s}return n(t)}function s(t){return 47===t?(e.consume(t),i?l:(i=!0,s)):n(t)}function l(t){return null===t||Vp(t)||Wp(t)||Qp(t)||Yp(t)?n(t):e.attempt(Yy,e.attempt(Qy,c),n)(t)}function c(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:ov},ev={name:"emailAutolink",tokenize:function(e,t,n){const r=this;let o,i;return function(t){if(!av(t)||!iv.call(r,r.previous)||sv(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(t)};function a(t){return av(t)?(e.consume(t),a):64===t?(e.consume(t),s):n(t)}function s(t){return 46===t?e.check(Gy,c,l)(t):45===t||95===t||Ip(t)?(i=!0,e.consume(t),s):c(t)}function l(t){return e.consume(t),o=!0,s}function c(a){return i&&o&&Fp(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(a)):n(a)}},previous:iv},tv={};let nv=48;for(;nv<123;)tv[nv]=ev,nv++,58===nv?nv=65:91===nv&&(nv=97);function rv(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||Wp(e)}function ov(e){return!Fp(e)}function iv(e){return!(47===e||av(e))}function av(e){return 43===e||45===e||46===e||95===e||Ip(e)}function sv(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if(("labelLink"===r.type||"labelImage"===r.type)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}tv[43]=ev,tv[45]=ev,tv[46]=ev,tv[95]=ev,tv[72]=[ev,Zy],tv[104]=[ev,Zy],tv[87]=[ev,Jy],tv[119]=[ev,Jy];const lv={tokenize:function(e,t,n){const r=this;return Jp(e,function(e){const o=r.events[r.events.length-1];return o&&"gfmFootnoteDefinitionIndent"===o[1].type&&4===o[2].sliceSerialize(o[1],!0).length?t(e):n(e)},"gfmFootnoteDefinitionIndent",5)},partial:!0};function cv(e,t,n){const r=this;let o=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;o--;){const e=r.events[o][1];if("labelImage"===e.type){a=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(o){if(!a||!a._balanced)return n(o);const s=zp(r.sliceSerialize({start:a.end,end:r.now()}));if(94!==s.codePointAt(0)||!i.includes(s.slice(1)))return n(o);return e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o)}}function uv(e,t){let n=e.length;for(;n--;)if("labelImage"===e[n][1].type&&"enter"===e[n][0]){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function dv(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,a=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),s};function s(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(s){if(a>999||93===s&&!i||null===s||91===s||Wp(s))return n(s);if(93===s){e.exit("chunkString");const i=e.exit("gfmFootnoteCallString");return o.includes(zp(r.sliceSerialize(i)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(s)}return Wp(s)||(i=!0),a++,e.consume(s),92===s?c:l}function c(t){return 91===t||92===t||93===t?(e.consume(t),a++,l):l(t)}}function fv(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,a,s=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),l};function l(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(t)}function c(t){if(s>999||93===t&&!a||null===t||91===t||Wp(t))return n(t);if(93===t){e.exit("chunkString");const n=e.exit("gfmFootnoteDefinitionLabelString");return i=zp(r.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return Wp(t)||(a=!0),s++,e.consume(t),92===t?u:c}function u(t){return 91===t||92===t||93===t?(e.consume(t),s++,c):c(t)}function d(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),o.includes(i)||o.push(i),Jp(e,f,"gfmFootnoteDefinitionWhitespace")):n(t)}function f(e){return t(e)}}function pv(e,t,n){return e.check(sh,t,e.attempt(lv,t,n))}function hv(e){e.exit("gfmFootnoteDefinition")}function mv(e){let t=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:function(e,n,r){const o=this.previous,i=this.events;let a=0;return function(t){if(126===o&&"characterEscape"!==i[i.length-1][1].type)return r(t);return e.enter("strikethroughSequenceTemporary"),s(t)};function s(i){const l=nh(o);if(126===i)return a>1?r(i):(e.consume(i),a++,s);if(a<2&&!t)return r(i);const c=e.exit("strikethroughSequenceTemporary"),u=nh(i);return c._open=!u||2===u&&Boolean(l),c._close=!l||2===l&&Boolean(u),n(i)}},resolveAll:function(e,t){let n=-1;for(;++n<e.length;)if("enter"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._close){let r=n;for(;r--;)if("exit"===e[r][0]&&"strikethroughSequenceTemporary"===e[r][1].type&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type="strikethroughSequence",e[r][1].type="strikethroughSequence";const o={type:"strikethrough",start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},i={type:"strikethroughText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},a=[["enter",o,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",i,t]],s=t.parser.constructs.insideSpan.null;s&&Np(a,a.length,0,rh(s,e.slice(r+1,n),t)),Np(a,a.length,0,[["exit",i,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",o,t]]),Np(e,r-1,n-r+3,a),n=r+a.length-2;break}}n=-1;for(;++n<e.length;)"strikethroughSequenceTemporary"===e[n][1].type&&(e[n][1].type="data");return e}};return null==t&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}}}class gv{constructor(){this.map=[]}add(e,t,n){!function(e,t,n,r){let o=0;if(0===n&&0===r.length)return;for(;o<e.map.length;){if(e.map[o][0]===t)return e.map[o][1]+=n,void e.map[o][2].push(...r);o+=1}e.map.push([t,n,r])}(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),0===this.map.length)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(const t of r)e.push(t);r=n.pop()}this.map.length=0}}function yv(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if("enter"===o[0])"tableContent"===o[1].type&&r.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===o[1].type){if("tableDelimiterMarker"===e[t-1][1].type){const e=r.length-1;r[e]="left"===r[e]?"center":"right"}}else if("tableDelimiterRow"===o[1].type)break}else"enter"===o[0]&&"tableDelimiterRow"===o[1].type&&(n=!0);t+=1}return r}function vv(e,t,n){const r=this;let o,i=0,a=0;return function(e){let t=r.events.length-1;for(;t>-1;){const e=r.events[t][1].type;if("lineEnding"!==e&&"linePrefix"!==e)break;t--}const o=t>-1?r.events[t][1].type:null,i="tableHead"===o||"tableRow"===o?x:s;if(i===x&&r.parser.lazy[r.now().line])return n(e);return i(e)};function s(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){if(124===e)return l(e);return o=!0,a+=1,l(e)}(t)}function l(t){return null===t?n(t):qp(t)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):n(t):Kp(t)?Jp(e,l,"whitespace")(t):(a+=1,o&&(o=!1,i+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),o=!0,l):(e.enter("data"),c(t)))}function c(t){return null===t||124===t||Wp(t)?(e.exit("data"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return 92===t||124===t?(e.consume(t),c):c(t)}function d(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter("tableDelimiterRow"),o=!1,Kp(t)?Jp(e,f,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):f(t))}function f(t){return 45===t||58===t?h(t):124===t?(o=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),p):b(t)}function p(t){return Kp(t)?Jp(e,h,"whitespace")(t):h(t)}function h(t){return 58===t?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),m):45===t?(a+=1,m(t)):null===t||qp(t)?v(t):b(t)}function m(t){return 45===t?(e.enter("tableDelimiterFiller"),g(t)):b(t)}function g(t){return 45===t?(e.consume(t),g):58===t?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(t))}function y(t){return Kp(t)?Jp(e,v,"whitespace")(t):v(t)}function v(n){return 124===n?f(n):(null===n||qp(n))&&o&&i===a?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(n)):b(n)}function b(e){return n(e)}function x(t){return e.enter("tableRow"),w(t)}function w(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),w):null===n||qp(n)?(e.exit("tableRow"),t(n)):Kp(n)?Jp(e,w,"whitespace")(n):(e.enter("data"),k(n))}function k(t){return null===t||124===t||Wp(t)?(e.exit("data"),w(t)):(e.consume(t),92===t?S:k)}function S(t){return 92===t||124===t?(e.consume(t),k):k(t)}}function bv(e,t){let n,r,o,i=-1,a=!0,s=0,l=[0,0,0,0],c=[0,0,0,0],u=!1,d=0;const f=new gv;for(;++i<e.length;){const p=e[i],h=p[1];"enter"===p[0]?"tableHead"===h.type?(u=!1,0!==d&&(wv(f,t,d,n,r),r=void 0,d=0),n={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},f.add(i,0,[["enter",n,t]])):"tableRow"===h.type||"tableDelimiterRow"===h.type?(a=!0,o=void 0,l=[0,0,0,0],c=[0,i+1,0,0],u&&(u=!1,r={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},f.add(i,0,[["enter",r,t]])),s="tableDelimiterRow"===h.type?2:r?3:1):!s||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type?"tableCellDivider"===h.type&&(a?a=!1:(0!==l[1]&&(c[0]=c[1],o=xv(f,t,l,s,void 0,o)),l=c,c=[l[1],i,0,0])):(a=!1,0===c[2]&&(0!==l[1]&&(c[0]=c[1],o=xv(f,t,l,s,void 0,o),l=[0,0,0,0]),c[2]=i)):"tableHead"===h.type?(u=!0,d=i):"tableRow"===h.type||"tableDelimiterRow"===h.type?(d=i,0!==l[1]?(c[0]=c[1],o=xv(f,t,l,s,i,o)):0!==c[1]&&(o=xv(f,t,c,s,i,o)),s=0):!s||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type||(c[3]=i)}for(0!==d&&wv(f,t,d,n,r),f.consume(t.events),i=-1;++i<t.events.length;){const e=t.events[i];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=yv(t.events,i))}return e}function xv(e,t,n,r,o,i){const a=1===r?"tableHeader":2===r?"tableDelimiter":"tableData";0!==n[0]&&(i.end=Object.assign({},kv(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const s=kv(t.events,n[1]);if(i={type:a,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[["enter",i,t]]),0!==n[2]){const o=kv(t.events,n[2]),i=kv(t.events,n[3]),a={type:"tableContent",start:Object.assign({},o),end:Object.assign({},i)};if(e.add(n[2],0,[["enter",a,t]]),2!==r){const r=t.events[n[2]],o=t.events[n[3]];if(r[1].end=Object.assign({},o[1].end),r[1].type="chunkText",r[1].contentType="text",n[3]>n[2]+1){const t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[["exit",a,t]])}return void 0!==o&&(i.end=Object.assign({},kv(t.events,o)),e.add(o,0,[["exit",i,t]]),i=void 0),i}function wv(e,t,n,r,o){const i=[],a=kv(t.events,n);o&&(o.end=Object.assign({},a),i.push(["exit",o,t])),r.end=Object.assign({},a),i.push(["exit",r,t]),e.add(n+1,0,i)}function kv(e,t){const n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}const Sv={name:"tasklistCheck",tokenize:function(e,t,n){const r=this;return function(t){if(null!==r.previous||!r._gfmTasklistFirstContentOfListItem)return n(t);return e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),o};function o(t){return Wp(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),i):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),i):n(t)}function i(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(t)}function a(r){return qp(r)?t(r):Kp(r)?e.check({tokenize:Ev},t,n)(r):n(r)}}};function Ev(e,t,n){return Jp(e,function(e){return null===e?n(e):t(e)},"whitespace")}const Cv={};function Tv(e){const t=e||Cv,n=this.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),o=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),i=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(function(e){return Op([{text:tv},{document:{91:{name:"gfmFootnoteDefinition",tokenize:fv,continuation:{tokenize:pv},exit:hv}},text:{91:{name:"gfmFootnoteCall",tokenize:dv},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:cv,resolveTo:uv}}},mv(e),{flow:{null:{name:"table",tokenize:vv,resolveAll:bv}}},{text:{91:Sv}}])}(t)),o.push([{transforms:[Wg],enter:{literalAutolink:Bg,literalAutolinkEmail:Vg,literalAutolinkHttp:Vg,literalAutolinkWww:Vg},exit:{literalAutolink:qg,literalAutolinkEmail:$g,literalAutolinkHttp:Ug,literalAutolinkWww:Hg}},{enter:{gfmFootnoteCallString:Xg,gfmFootnoteCall:Gg,gfmFootnoteDefinitionLabelString:Jg,gfmFootnoteDefinition:Zg},exit:{gfmFootnoteCallString:ey,gfmFootnoteCall:ty,gfmFootnoteDefinitionLabelString:ny,gfmFootnoteDefinition:ry}},{canContainEols:["delete"],enter:{strikethrough:cy},exit:{strikethrough:uy}},{enter:{table:My,tableData:By,tableHeader:By,tableRow:Fy},exit:{codeText:Vy,table:zy,tableData:Iy,tableHeader:Iy,tableRow:Iy}},{exit:{taskListCheckValueChecked:$y,taskListCheckValueUnchecked:$y,paragraph:qy}}]),i.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Fg,notInConstruct:Ig},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Fg,notInConstruct:Ig},{character:":",before:"[ps]",after:"\\/",inConstruct:Fg,notInConstruct:Ig}]},iy(e),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:ly}],handlers:{delete:dy}},Hy(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Wy}}]}}(t))}const Pv=({content:e})=>$.jsx("div",{className:"prose-custom",children:$.jsx(Lg,{remarkPlugins:[Tv],children:e})}),Av=({message:e})=>{const t="assistant"===e.role,{config:n}=Gd();return $.jsx("div",{className:`flex w-full ${t?"justify-start":"justify-end"} mb-6 animate-in fade-in slide-in-from-bottom-2 duration-300`,children:$.jsxs("div",{className:`flex max-w-[88%] ${t?"flex-row":"flex-row-reverse"} gap-3`,children:[$.jsx("div",{className:`\n h-8 w-8 rounded-full flex items-center justify-center shrink-0 shadow-sm border \n ${t?"bg-white border-slate-100":"border-transparent text-white"}\n `,style:t?{}:{backgroundColor:n.primaryColor},children:t?$.jsx(Dl,{size:16,style:{color:n.primaryColor},strokeWidth:2.5}):$.jsx(uc,{size:16,strokeWidth:2.5})}),$.jsxs("div",{className:"flex flex-col gap-2 "+(t?"items-start":"items-end"),children:[$.jsx("div",{className:"px-4 py-3 rounded-2xl shadow-sm "+(t?"bg-white/90 backdrop-blur-md text-slate-800 rounded-tl-none":"text-white rounded-tr-none shadow-md"),style:{backgroundColor:t?void 0:n.userMessageColor||"#b0c2df"},children:$.jsx(Pv,{content:e.content})}),t&&e.sources&&e.sources.length>0&&$.jsxs("div",{className:"mt-2 w-full animate-in fade-in slide-in-from-top-1 duration-500",children:[$.jsxs("div",{className:"flex items-center gap-1.5 mb-2 ml-1",children:[$.jsx(ac,{size:10,className:"text-slate-400"}),$.jsx("span",{className:"text-[9px] font-black text-slate-400 uppercase tracking-widest",children:"Sources consultées"})]}),$.jsx("div",{className:"flex flex-wrap gap-1.5",children:e.sources.map((e,t)=>$.jsxs("div",{title:e,className:"\r\n flex items-center gap-1.5 px-2.5 py-1 \r\n bg-slate-100/50 border border-slate-200/60 rounded-full \r\n text-[10px] font-bold text-slate-500 \r\n hover:bg-white hover:border-blue-300 hover:text-blue-600 \r\n transition-all cursor-help max-w-[160px]\r\n ",children:[$.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-blue-400 shrink-0 shadow-sm"}),$.jsx("span",{className:"truncate",children:e.split("/").pop()})]},t))})]})]})]})})},jv=({file:e,onRemove:t})=>$.jsxs(jl.div,{initial:{scale:.8,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.8,opacity:0},className:"flex items-center gap-2 px-3 py-1.5 bg-blue-50 border border-blue-100 rounded-xl text-[11px] text-blue-600 font-bold shadow-sm",children:[$.jsx(ql,{size:12}),$.jsx("span",{className:"truncate max-w-[100px]",children:e.name}),$.jsx("button",{onClick:t,className:"hover:text-red-500 transition-colors border-none bg-transparent cursor-pointer",children:$.jsx(dc,{size:12})})]}),Nv=({onSend:e,disabled:t})=>{const[n,r]=u.useState(""),[o,i]=u.useState([]),{config:a}=Gd(),s=u.useRef(null),l=()=>{(n.trim()||o.length>0)&&!t&&(e(n,o),r(""),i([]))};return $.jsxs("div",{className:"space-y-3",children:[$.jsx(ds,{children:o.length>0&&$.jsx("div",{className:"flex flex-wrap gap-2 animate-in fade-in slide-in-from-bottom-2",children:o.map((e,t)=>$.jsx(jv,{file:e,onRemove:()=>{return e=t,void i(o.filter((t,n)=>n!==e));var e}},t))})}),$.jsxs("div",{className:"relative flex items-end gap-2 bg-white/70 backdrop-blur-md border border-slate-200 rounded-2xl p-2 focus-within:border-blue-400 transition-all shadow-sm",children:[$.jsx("input",{type:"file",multiple:!0,ref:s,onChange:e=>{e.target.files&&i([...o,...Array.from(e.target.files)])},className:"hidden"}),$.jsx("button",{onClick:()=>{var e;return null==(e=s.current)?void 0:e.click()},className:"p-2 text-slate-400 hover:text-blue-600 transition-colors border-none bg-transparent cursor-pointer",children:$.jsx(ec,{size:20})}),$.jsx("textarea",{rows:1,value:n,onChange:e=>r(e.target.value),onKeyDown:e=>"Enter"===e.key&&!e.shiftKey&&(e.preventDefault(),l()),placeholder:"Envoyez un message ou un fichier...",className:"w-full bg-transparent border-none focus:ring-0 resize-none py-2 text-[14px] text-slate-700 max-h-32 outline-none"}),$.jsx("button",{onClick:l,disabled:!n.trim()&&0===o.length||t,className:"p-2 rounded-xl text-white disabled:opacity-30 transition-all border-none cursor-pointer",style:{backgroundColor:a.primaryColor},children:t?$.jsx(Xl,{size:20,className:"animate-spin"}):$.jsx(rc,{size:20})})]})]})},Rv=({onSuggestion:e})=>{const{botName:t,logoUrl:n,primaryColor:r}=hc(),o=[{label:"Je veux une liste des employés ?",icon:lc},{label:"Quelles sont les ressources de l'entreprise disponibles ?",icon:Jl},{label:"Résume-moi le dernier document RH",icon:ql}];return $.jsxs("div",{className:"flex flex-col items-center justify-center p-8 text-center animate-in fade-in zoom-in duration-500",children:[$.jsxs("div",{className:"relative mb-6",children:[$.jsx("div",{className:"h-20 w-20 rounded-[24px] bg-white shadow-xl flex items-center justify-center p-4 border border-slate-50",children:$.jsx("img",{src:n,alt:t,className:"h-full w-full object-contain"})}),$.jsx("div",{style:{backgroundColor:r},className:"absolute -bottom-2 -right-2 h-8 w-8 rounded-xl border-4 border-white flex items-center justify-center text-white",children:$.jsx(Dl,{size:16,strokeWidth:3})})]}),$.jsxs("h1",{className:"text-xl font-black text-slate-800 mb-2 tracking-tight",children:["Bonjour, je suis ",t]}),$.jsx("p",{className:"text-sm text-slate-400 mb-10 max-w-[240px] leading-relaxed",children:"Votre assistant intelligent. Je peux analyser vos documents et répondre à vos questions."}),$.jsxs("div",{className:"w-full space-y-2",children:[$.jsx("p",{className:"text-[10px] font-black text-slate-300 uppercase tracking-[0.2em] mb-4",children:"Suggestions"}),o.map((t,n)=>$.jsxs("button",{onClick:()=>e(t.label),className:"w-full flex items-center gap-3 p-3 bg-white border border-slate-100 rounded-2xl text-xs font-bold text-slate-600 hover:border-blue-200 hover:shadow-md transition-all cursor-pointer text-left",children:[$.jsx("div",{className:"p-1.5 bg-slate-50 rounded-lg text-slate-400",children:$.jsx(t.icon,{size:14})}),t.label]},n))]})]})},Lv=()=>$.jsxs("div",{className:"flex gap-3 mb-4 animate-in fade-in",children:[$.jsx("div",{className:"h-8 w-8 rounded-full bg-white border border-slate-100 flex items-center justify-center",children:$.jsx("div",{className:"flex gap-1",children:[0,1,2].map(e=>$.jsx(jl.div,{animate:{opacity:[.3,1,.3]},transition:{duration:1,repeat:1/0,delay:.2*e},className:"h-1.5 w-1.5 bg-blue-500 rounded-full"},e))})}),$.jsx("div",{className:"bg-white/50 backdrop-blur-md border border-white/50 px-4 py-3 rounded-2xl rounded-tl-none shadow-sm",children:$.jsx("span",{className:"text-xs text-slate-400 font-medium italic",children:"Recherche dans vos documents..."})})]}),Ov=()=>{const{messages:e,addMessage:t,setLoading:n,isLoading:r,threadId:o,confirmThreadId:i,config:a}=Gd(),s=hc(),{initialMessage:l,botName:c,userName:d}=s,f=(null==s?void 0:s.apiUrl)||(null==a?void 0:a.apiUrl),p=(null==s?void 0:s.userToken)||(null==a?void 0:a.userToken),h=(null==s?void 0:s.companyId)||(null==a?void 0:a.companyId),m=u.useRef(null);u.useEffect(()=>{m.current&&m.current.scrollTo({top:m.current.scrollHeight,behavior:"smooth"})},[e,r]);const g=async(e,a=[])=>{if(!e.trim()&&0===a.length||r)return;if(!h)return t({id:Date.now().toString(),role:"user",content:e.trim(),timestamp:new Date}),n(!0),void setTimeout(()=>{t({id:"err-company-"+Date.now(),role:"assistant",content:"⚠️ **Identifiant d'entreprise manquant.**\n\nVeuillez configurer l'identifiant de l'entreprise`. Cette information est indispensable pour acheminer vos messages vers le bon assistant.",timestamp:new Date}),n(!1)},600);if(!f)return console.error("[DHI Copilot] apiUrl manquant. Vérifiez la prop `config` sur <dhi-copilot-ai>."),void t({id:"err-config-"+Date.now(),role:"assistant",content:"⚠️ **Configuration manquante.**\n\nL'URL du serveur n'est pas définie. Veuillez vérifier l'intégration du widget.",timestamp:new Date});let s=e.trim();if(a.length>0){s+=`\n\n**Fichiers joints :**\n${a.map(e=>`📄 ${e.name}`).join("\n")}`}t({id:Date.now().toString(),role:"user",content:s,timestamp:new Date}),n(!0);const l=o;try{a.length>0&&await Qd(f,p??"",a);const n=a.map(e=>e.name).join(", ");let r=e.trim();a.length>0&&(r=r?`${r}\n\n(Contexte : L'utilisateur a joint les fichiers suivants pour analyse : ${n})`:`Analyse les documents suivants que je viens de t'envoyer : ${n}.`);const o=await Ud(f,h,p,{message:r,thread_id:l});(null==o?void 0:o.thread_id)&&i(o.thread_id),t({id:(Date.now()+1).toString(),role:"assistant",content:o.response,sources:o.sources||[],timestamp:new Date})}catch(c){console.error("[DHI Copilot] Chat Error:",c),t({id:"err-"+Date.now(),role:"assistant",content:"⚠️ **Connexion interrompue.**\n\nLe serveur **Fluxoon Copilot** ne répond pas. Vérifiez votre connexion ou contactez le support.",timestamp:new Date})}finally{n(!1)}},y=(l||"").replace("{botName}",c||"").replace("{name}",d||"");return $.jsxs("div",{className:"flex flex-col h-full bg-transparent overflow-hidden",children:[$.jsx("div",{ref:m,className:"flex-1 overflow-y-auto px-4 py-6 space-y-6 custom-scrollbar scroll-smooth",children:0!==e.length||r?$.jsxs("div",{className:"flex flex-col min-h-full",children:[e.map(e=>$.jsx(Av,{message:e},e.id)),r&&$.jsx("div",{className:"mt-2",children:$.jsx(Lv,{})})]}):$.jsxs("div",{className:"flex flex-col gap-6 animate-in fade-in duration-700",children:[$.jsx(Av,{message:{id:"virtual-intro",role:"assistant",content:y,timestamp:new Date}}),$.jsx(Rv,{onSuggestion:e=>g(e)})]})}),$.jsx("div",{className:"p-4 bg-white/40 backdrop-blur-xl border-t border-black/[0.03] shadow-[0_-10px_30px_rgba(0,0,0,0.02)]",children:$.jsxs("div",{className:"max-w-[480px] mx-auto",children:[$.jsx(Nv,{onSend:g,disabled:r}),$.jsxs("div",{className:"flex justify-center items-center gap-4 mt-3",children:[$.jsxs("span",{className:"text-[9px] text-slate-400 font-bold uppercase tracking-widest flex items-center gap-1",children:[$.jsx("span",{className:"w-1 h-1 rounded-full bg-emerald-500"}),"RAG Active"]}),$.jsx("span",{className:"text-[9px] text-slate-300 font-medium italic",children:"Vérifiez les sources citées."})]})]})})]})},Dv=({onSelectThread:e})=>{const{config:t,threads:n,fetchThreads:r,loadThread:o,isLoading:i,activeThreadId:a}=Gd();u.useEffect(()=>{r()},[]);return $.jsxs("div",{className:"flex flex-col h-full p-6 animate-in fade-in slide-in-from-right-4 overflow-hidden",children:[$.jsxs("button",{onClick:()=>{o(null),e()},style:{backgroundColor:`${t.primaryColor}10`,color:t.primaryColor,borderColor:`${t.primaryColor}30`},className:"flex items-center justify-center gap-2 w-full py-4 rounded-2xl border-2 border-dashed font-bold text-sm mb-8 hover:scale-[1.01] active:scale-[0.98] transition-all cursor-pointer",children:[$.jsx(tc,{size:18,strokeWidth:3}),"Nouvelle discussion"]}),$.jsxs("div",{className:"flex items-center justify-between mb-4 px-1",children:[$.jsx("h3",{className:"text-[10px] font-black text-slate-400 uppercase tracking-[0.2em]",children:"Conversations récentes"}),$.jsx(Ul,{size:12,className:"text-slate-300"})]}),$.jsx("div",{className:"flex-1 space-y-3 overflow-y-auto custom-scrollbar pr-2 pb-6",children:i&&0===n.length?$.jsxs("div",{className:"flex flex-col items-center justify-center py-20 gap-3",children:[$.jsx(Xl,{size:24,className:"animate-spin text-slate-300"}),$.jsx("p",{className:"text-xs text-slate-400 font-medium",children:"Récupération de l'historique..."})]}):0===n.length?$.jsx("div",{className:"text-center py-12 px-6 border border-dashed border-slate-100 rounded-3xl bg-slate-50/50",children:$.jsx("p",{className:"text-xs text-slate-400 italic",children:"Aucune discussion trouvée."})}):n.map(n=>$.jsxs("div",{onClick:()=>(async t=>{await o(t),e()})(n.id),className:`\n group relative flex items-center justify-between p-4 rounded-2xl transition-all cursor-pointer border\n ${a===n.id?"bg-white border-blue-100 shadow-md ring-1 ring-blue-50":"bg-white border-slate-100 hover:border-blue-200 hover:shadow-sm"}\n `,children:[a===n.id&&$.jsx("div",{className:"absolute left-0 top-4 bottom-4 w-1 rounded-r-full",style:{backgroundColor:t.primaryColor}}),$.jsxs("div",{className:"flex items-center gap-3 overflow-hidden",children:[$.jsx("div",{className:`\n p-2.5 rounded-xl transition-colors\n ${a===n.id?"bg-blue-50 text-blue-600":"bg-slate-50 text-slate-400 group-hover:text-blue-500 group-hover:bg-blue-50/50"}\n `,children:$.jsx(Jl,{size:18})}),$.jsxs("div",{className:"overflow-hidden",children:[$.jsx("p",{className:"text-sm font-bold text-slate-700 truncate group-hover:text-slate-900 transition-colors",children:n.title||"Discussion sans titre"}),$.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[$.jsxs("span",{className:"text-[9px] font-bold text-slate-400 uppercase tracking-tight group-hover:text-blue-400 transition-colors",children:["ID: ",n.id.slice(-4)]}),n.date&&$.jsxs($.Fragment,{children:[$.jsx("span",{className:"text-slate-200 text-[10px]",children:"•"}),$.jsxs("div",{className:"flex items-center gap-1 text-[10px] text-slate-400",children:[$.jsx(_l,{size:10}),$.jsx("span",{children:n.date})]})]})]})]})]}),$.jsx(Il,{size:16,className:"transition-all "+(a===n.id?"text-blue-400 translate-x-0":"text-slate-300 translate-x-[-4px] opacity-0 group-hover:opacity-100 group-hover:translate-x-0")})]},n.id))})]})},_v=({connector:e})=>{var t,n;const{removeSource:r,syncSource:o,config:i}=Gd(),[a,s]=u.useState(!1),[l,c]=u.useState(!1),d="active"===e.status,f="indexing"===e.status||l,p=e.last_indexed_at?new Date(e.last_indexed_at).toLocaleDateString("fr-FR",{day:"numeric",month:"short"}):null;return $.jsxs("div",{className:`\n group bg-white border rounded-2xl transition-all duration-300 overflow-hidden\n ${a?"shadow-xl border-blue-200":"border-slate-100 hover:border-blue-100 hover:shadow-sm"}\n `,children:[$.jsxs("div",{onClick:()=>s(!a),className:"p-4 flex items-center justify-between cursor-pointer select-none",children:[$.jsxs("div",{className:"flex items-center gap-4 overflow-hidden",children:[$.jsx("div",{className:`\n p-3 rounded-xl transition-colors\n ${f?"bg-amber-50 text-amber-600":d?"bg-blue-50 text-blue-600":"bg-slate-50 text-slate-400"}\n `,children:f?$.jsx(nc,{size:18,className:"animate-spin"}):(e=>{const t={size:18,strokeWidth:2.5};switch(e){case"WEB":return $.jsx(Kl,{...t});case"AWS_S3":return $.jsx(Hl,{...t});case"AZURE_BLOB":return $.jsx($l,{...t});case"SFTP":return $.jsx(oc,{...t});default:return $.jsx(Yl,{...t})}})(e.storage_type)}),$.jsxs("div",{className:"overflow-hidden",children:[$.jsx("h3",{className:"text-sm font-bold text-slate-800 truncate group-hover:text-slate-900",children:e.source_id}),$.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[$.jsx("span",{className:"w-1.5 h-1.5 rounded-full "+(f?"bg-amber-500 animate-pulse":d?"bg-emerald-500":"bg-red-500")}),$.jsx("span",{className:"text-[9px] font-black uppercase tracking-widest text-slate-400",children:f?"Synchronisation...":e.status}),p&&$.jsxs($.Fragment,{children:[$.jsx("span",{className:"text-slate-200 text-[10px]",children:"•"}),$.jsxs("div",{className:"flex items-center gap-1 text-[9px] text-slate-400 font-bold",children:[$.jsx(_l,{size:10})," ",p]})]})]})]})]}),$.jsxs("div",{className:"flex items-center gap-1",children:[$.jsx("button",{onClick:async t=>{t.stopPropagation(),c(!0);try{await o(e.source_id)}finally{c(!1)}},disabled:f,className:"p-2 text-slate-300 hover:text-blue-600 hover:bg-blue-50 rounded-lg transition-all",title:"Relancer l'indexation",children:$.jsx(nc,{size:16})}),$.jsx("button",{onClick:async t=>{t.stopPropagation(),window.confirm(`Supprimer la source "${e.source_id}" ?`)&&await r(e.source_id)},className:"p-2 text-slate-300 hover:text-red-500 hover:bg-red-50 rounded-lg transition-all",title:"Supprimer",children:$.jsx(cc,{size:16})}),$.jsx("div",{className:"p-1 text-slate-300 transition-transform duration-300 "+(a?"rotate-180 text-blue-500":""),children:$.jsx(zl,{size:20})})]})]}),$.jsx(ds,{children:a&&$.jsx(jl.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.3,ease:[.04,.62,.23,.98]},className:"border-t border-slate-50 bg-slate-50/50",children:$.jsxs("div",{className:"p-4 space-y-3",children:[$.jsx("div",{className:"flex items-center justify-between",children:$.jsxs("p",{className:"text-[10px] font-black text-slate-400 uppercase tracking-widest flex items-center gap-2",children:[$.jsx(ql,{size:12}),"Documents Indexés (",(null==(t=e.indexed_files)?void 0:t.length)||0,")"]})}),$.jsx("div",{className:`\n space-y-1.5 overflow-y-auto custom-scrollbar pr-1\n ${(null==(n=e.indexed_files)?void 0:n.length)>5?"max-h-48":"h-auto"}\n `,children:e.indexed_files&&e.indexed_files.length>0?e.indexed_files.map((e,t)=>$.jsxs("div",{className:"flex items-center gap-2 text-[11px] text-slate-600 py-2 px-3 bg-white border border-black/[0.03] rounded-xl hover:border-blue-200 transition-colors shadow-sm",children:[$.jsx(Vl,{className:"w-3.5 h-3.5 text-emerald-500 shrink-0"}),$.jsx("span",{className:"truncate flex-1 font-medium",children:e.replace("✅ Indexé:","").replace("✅ Indexé :","").trim()})]},t)):$.jsx("div",{className:"py-6 text-center",children:$.jsx("p",{className:"text-xs text-slate-400 italic",children:"Aucun document n'a encore été indexé pour cette source."})})})]})})})]})},Mv=({children:e,required:t})=>$.jsxs("label",{className:"text-[10px] font-black text-slate-400 uppercase tracking-widest mb-1.5 block ml-1",children:[e," ",t&&$.jsx("span",{className:"text-red-500",children:"*"})]}),zv=({error:e,...t})=>$.jsxs("div",{className:"w-full",children:[$.jsx("input",{...t,className:`w-full p-3 bg-slate-50 border ${e?"border-red-400 bg-red-50":"border-slate-100"} rounded-xl text-sm focus:ring-2 focus:ring-blue-500/20 outline-none transition-all placeholder:text-slate-300`}),e&&$.jsx("p",{className:"text-[9px] text-red-500 font-bold mt-1 ml-1",children:e})]}),Fv=({title:e,children:t,description:n})=>$.jsxs("div",{className:"p-4 bg-slate-50/50 border border-slate-100 rounded-2xl space-y-4",children:[$.jsxs("div",{className:"border-b border-blue-100 pb-2 mb-3",children:[$.jsx("h4",{className:"text-[10px] font-black text-blue-600 uppercase tracking-wider",children:e}),n&&$.jsx("p",{className:"text-[9px] text-slate-400 font-medium",children:n})]}),$.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:t})]}),Iv=[{id:"WEB",label:"Web",icon:Kl,color:"text-indigo-500"},{id:"AZURE_BLOB",label:"Azure",icon:$l,color:"text-blue-500"},{id:"AWS_S3",label:"AWS S3",icon:Hl,color:"text-amber-500"},{id:"SFTP",label:"SFTP",icon:oc,color:"text-violet-500"},{id:"GOOGLE_DRIVE",label:"G-Drive",icon:Yl,color:"text-emerald-500"},{id:"LOCAL",label:"Local",icon:Wl,color:"text-slate-500"}],Bv=()=>{const{config:e,fetchConnectors:t,setShowAddForm:n}=Gd(),[r,o]=u.useState(!1),[i,a]=u.useState("WEB"),[s,l]=u.useState(""),[c,d]=u.useState(""),[f,p]=u.useState(!0),[h,m]=u.useState(null),[g,y]=u.useState({port:"22",protocol:"https",suffix:"core.windows.net",username:"",password:"",host:"",service_account_json:""}),[v,b]=u.useState({}),x=(e,t)=>{y({...g,[e]:t}),v[e]&&b({...v,[e]:null}),h&&m(null)};return $.jsxs("form",{onSubmit:async r=>{if(r.preventDefault(),m(null),"WEB"===i)return void m("🚀 L'analyse des pages web est une fonctionnalité en cours de développement. Elle sera disponible prochainement. Veuillez choisir une source Cloud ou Locale.");if(!(()=>{let e={};return s||(e.source_id="L'identifiant est requis"),c||(e.path="Ce champ est requis"),"SFTP"===i&&(g.host||(e.host="Hôte requis"),g.username||(e.username="Utilisateur requis")),"AZURE_BLOB"!==i||g.account_name&&g.account_key||(e.azure="Informations de compte Azure incomplètes"),"GOOGLE_DRIVE"!==i||g.service_account_json||(e.service_account_json="JSON du compte de service requis"),b(e),0===Object.keys(e).length})())return;o(!0);let a={};switch(i){case"AZURE_BLOB":a={connection_string:`DefaultEndpointsProtocol=${g.protocol};AccountName=${g.account_name};AccountKey=${g.account_key};EndpointSuffix=${g.suffix}`,container:g.container||c};break;case"AWS_S3":a={aws_access_key_id:g.aws_access_key_id,aws_secret_access_key:g.aws_secret_access_key,region_name:g.region_name};break;case"SFTP":a={host:g.host,port:parseInt(g.port)||22,username:g.username,password:g.password||""};break;case"GOOGLE_DRIVE":try{a=JSON.parse(g.service_account_json)}catch(l){return b({service_account_json:"Le format JSON est invalide"}),void o(!1)}break;default:a={}}try{await Wd(e.apiUrl,e.userToken,{source_id:s,storage_type:i,path:c,recursive:f,credentials:a}),await t(),n(!1)}catch(l){console.error(l),m("Une erreur est survenue lors de la communication avec le serveur Fluxoon.")}finally{o(!1)}},className:"space-y-6 animate-in slide-in-from-bottom-4 duration-500 pb-10",children:[$.jsx("div",{className:"grid grid-cols-3 gap-2",children:Iv.map(e=>$.jsxs("button",{type:"button",onClick:()=>{a(e.id),b({}),m(null)},className:"flex flex-col items-center gap-2 p-3 rounded-2xl border transition-all duration-300 "+(i===e.id?"border-blue-500 bg-blue-50 text-blue-600 shadow-sm scale-[1.02]":"border-slate-100 bg-white text-slate-400 hover:border-slate-200"),children:[$.jsx(e.icon,{size:18,className:i===e.id?e.color:""}),$.jsx("span",{className:"text-[9px] font-black uppercase tracking-tighter",children:e.label})]},e.id))}),$.jsxs("div",{className:"space-y-4 bg-white/60 backdrop-blur-sm p-5 rounded-[24px] border border-white/40 shadow-sm",children:[$.jsxs("div",{children:[$.jsx(Mv,{required:!0,children:"Identifiant de la Source"}),$.jsx(zv,{placeholder:"Ex: Documents_RH_V3",value:s,onChange:e=>l(e.target.value),error:v.source_id})]}),$.jsxs("div",{children:[$.jsx(Mv,{required:!0,children:"AWS_S3"===i?"Nom du Bucket":"GOOGLE_DRIVE"===i?"ID du Dossier (Folder ID)":"WEB"===i?"URL Racine":"Chemin d'accès (Path)"}),$.jsx(zv,{placeholder:"AWS_S3"===i?"Ex: bucket-documents-rh":"GOOGLE_DRIVE"===i?"Ex: 1A2b3C4d5E6f7G...":"WEB"===i?"https://monsite.com":"Ex: /mnt/data/archives",value:c,onChange:e=>d(e.target.value),error:v.path})]})]}),$.jsxs(ds,{mode:"wait",children:["AZURE_BLOB"===i&&$.jsx(jl.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},children:$.jsxs(Fv,{title:"Azure Blob Access",description:"Connectez votre conteneur Azure",children:[$.jsx(zv,{placeholder:"Account Name",onChange:e=>x("account_name",e.target.value)}),$.jsx(zv,{type:"password",placeholder:"Account Key",onChange:e=>x("account_key",e.target.value)}),$.jsx("div",{className:"md:col-span-2",children:$.jsx(zv,{placeholder:"Nom du conteneur (ex: production)",onChange:e=>x("container",e.target.value)})})]})},"azure"),"AWS_S3"===i&&$.jsx(jl.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},children:$.jsxs(Fv,{title:"AWS S3 Configuration",description:"Identifiants IAM Read-Only",children:[$.jsx(zv,{placeholder:"Access Key ID",onChange:e=>x("aws_access_key_id",e.target.value)}),$.jsx(zv,{type:"password",placeholder:"Secret Access Key",onChange:e=>x("aws_secret_access_key",e.target.value)}),$.jsx("div",{className:"md:col-span-2",children:$.jsx(zv,{placeholder:"Region Name (ex: us-east-1)",onChange:e=>x("region_name",e.target.value)})})]})},"aws"),"SFTP"===i&&$.jsx(jl.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},children:$.jsxs(Fv,{title:"Serveur SFTP",description:"Accès distant sécurisé",children:[$.jsx(zv,{placeholder:"Hôte (ex: sftp.fluxoon.com)",onChange:e=>x("host",e.target.value),error:v.host}),$.jsx(zv,{placeholder:"Port (Défaut: 22)",value:g.port,onChange:e=>x("port",e.target.value)}),$.jsx(zv,{placeholder:"Username",onChange:e=>x("username",e.target.value),error:v.username}),$.jsx(zv,{type:"password",placeholder:"Password / SSH Key Pass",onChange:e=>x("password",e.target.value)})]})},"sftp"),"GOOGLE_DRIVE"===i&&$.jsxs(jl.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"space-y-3 p-5 bg-slate-900 rounded-[24px] border border-slate-800",children:[$.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[$.jsx(Gl,{size:14,className:"text-emerald-400"}),$.jsx(Mv,{required:!0,children:$.jsx("span",{className:"text-slate-100",children:"Service Account JSON"})})]}),$.jsx("textarea",{className:"w-full h-40 p-3 bg-slate-950 text-emerald-400 font-mono text-[10px] rounded-xl border-none outline-none focus:ring-1 focus:ring-emerald-500/50 resize-none "+(v.service_account_json?"ring-1 ring-red-500":""),placeholder:"Collez le contenu complet du fichier .json ici...",onChange:e=>x("service_account_json",e.target.value)}),v.service_account_json&&$.jsx("p",{className:"text-[9px] text-red-400 font-bold",children:v.service_account_json})]},"gdrive"),"WEB"===i&&$.jsxs(jl.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"p-4 bg-indigo-50/50 border border-indigo-100 rounded-2xl flex items-start gap-3",children:[$.jsx(Ql,{className:"text-indigo-500 shrink-0 mt-0.5",size:16}),$.jsx("p",{className:"text-[10px] text-indigo-700 font-medium leading-relaxed",children:"L'analyse des pages web est une fonctionnalité en cours de développement. Elle sera disponible prochainement."})]},"web")]}),$.jsx(ds,{children:h&&$.jsxs(jl.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},className:"p-4 bg-amber-50 border border-amber-200 rounded-2xl flex items-start gap-3 shadow-sm",children:[$.jsx(Bl,{className:"text-amber-500 shrink-0 mt-0.5",size:18}),$.jsx("p",{className:"text-[11px] text-amber-900 font-bold leading-tight uppercase tracking-tight",children:h})]})}),$.jsx("div",{className:"pt-2",children:$.jsx("button",{type:"submit",disabled:r,style:{backgroundColor:e.primaryColor},className:`\n w-full py-4 rounded-2xl text-white font-bold text-sm shadow-xl flex items-center justify-center gap-2 \n transition-all border-none cursor-pointer\n ${r?"opacity-70 cursor-not-allowed":"hover:scale-[1.01] active:scale-[0.98]"}\n `,children:r?$.jsxs($.Fragment,{children:[$.jsx(Xl,{size:18,className:"animate-spin"}),$.jsx("span",{children:"Traitement en cours..."})]}):$.jsxs($.Fragment,{children:["WEB"===i?$.jsx(Gl,{size:18}):$.jsx(Ml,{size:18,strokeWidth:3}),$.jsx("span",{children:"WEB"===i?"Fonctionnalité Verrouillée":"Enregistrer la source"})]})})})]})},Vv=()=>{const{connectors:e,fetchConnectors:t,showAddForm:n,setShowAddForm:r,config:o}=Gd();return u.useEffect(()=>{t()},[]),$.jsx("div",{className:"h-full flex flex-col bg-transparent",children:$.jsx(ds,{mode:"wait",children:n?$.jsxs(jl.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:20},className:"p-6 space-y-6",children:[$.jsxs("button",{onClick:()=>r(!1),className:"flex items-center gap-2 text-xs font-bold text-slate-400 hover:text-slate-600 border-none bg-transparent cursor-pointer",children:[$.jsx(Fl,{size:14})," Retour à la liste"]}),$.jsx(Bv,{})]},"form"):$.jsxs(jl.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},className:"p-6 space-y-6",children:[$.jsxs("header",{className:"flex justify-between items-end",children:[$.jsxs("div",{children:[$.jsx("h2",{className:"text-lg font-black text-slate-800 tracking-tight",children:"Sources"}),$.jsx("p",{className:"text-xs text-slate-400 font-medium",children:"Connaissances de l'IA"})]}),$.jsx("button",{onClick:()=>r(!0),style:{backgroundColor:o.primaryColor},className:"p-2 rounded-xl text-white shadow-lg hover:scale-110 transition-transform border-none cursor-pointer",children:$.jsx(tc,{size:20})})]}),$.jsx("div",{className:"space-y-3",children:0===e.length?$.jsx("div",{className:"py-10 text-center border-2 border-dashed border-slate-100 rounded-3xl",children:$.jsx("p",{className:"text-xs text-slate-400 italic",children:"Aucune source connectée."})}):e.map(e=>$.jsx(_v,{connector:e},e.source_id))}),$.jsxs("div",{className:"p-4 bg-emerald-50/50 border border-emerald-100 rounded-2xl flex gap-3",children:[$.jsx(sc,{className:"text-emerald-600 shrink-0",size:18}),$.jsx("p",{className:"text-[10px] text-emerald-800 leading-relaxed font-medium",children:"Isolation RAG active : vos documents sont chiffrés et accessibles uniquement par ce Copilot."})]})]},"list")})})},Uv=({activeView:e,setView:t,onClose:n})=>{const{config:r}=Gd(),o=[{id:"chat",icon:Zl,label:"Chat"},{id:"history",icon:Ul,label:"Historique"},{id:"settings",icon:ic,label:"Sources"}];return $.jsxs("nav",{className:"flex items-center justify-between px-5 py-4 bg-white/40 backdrop-blur-xl border-b border-black/[0.03] shrink-0",children:[$.jsx("div",{className:"flex bg-slate-200/50 p-1 rounded-xl gap-1",children:o.map(n=>{const o=e===n.id;return $.jsxs("button",{onClick:()=>t(n.id),className:`\n flex items-center gap-2 px-3 py-1.5 rounded-lg transition-all duration-300 \n text-xs font-bold select-none border-none cursor-pointer\n ${o?"bg-white shadow-md":"text-slate-400 hover:text-slate-600"}\n `,children:[$.jsx(n.icon,{size:14,style:o?{color:r.primaryColor}:{},strokeWidth:o?2.5:2}),o&&$.jsx("span",{className:"animate-in fade-in zoom-in duration-300 text-slate-900",children:n.label})]},n.id)})}),$.jsx("button",{onClick:n,className:"p-2 rounded-full hover:bg-red-50 hover:text-red-500 text-slate-400 transition-all border-none cursor-pointer",children:$.jsx(dc,{size:20})})]})},Hv=({close:e})=>{const[t,n]=u.useState("chat");return $.jsxs("div",{className:"flex flex-col h-full bg-transparent overflow-hidden",children:[$.jsx(Uv,{activeView:t,setView:n,onClose:e}),$.jsx("div",{className:"flex-1 overflow-hidden relative",children:$.jsx(ds,{mode:"wait",children:$.jsxs(jl.div,{initial:{opacity:0,x:15},animate:{opacity:1,x:0},exit:{opacity:0,x:-15},transition:{duration:.3,ease:[.23,1,.32,1]},className:"h-full w-full",children:["chat"===t&&$.jsx("div",{className:"h-full",children:$.jsx(Ov,{})}),"history"===t&&$.jsx("div",{className:"h-full",children:$.jsx(Dv,{onSelectThread:()=>n("chat")})}),"settings"===t&&$.jsx("div",{className:"h-full overflow-y-auto custom-scrollbar",children:$.jsx(Vv,{})})]},t)})}),$.jsx("footer",{className:"px-6 py-4 border-t border-black/[0.03] bg-white/20 backdrop-blur-sm",children:$.jsxs("div",{className:"flex items-center justify-between",children:[$.jsxs("div",{className:"flex items-center gap-2",children:[$.jsxs("span",{className:"relative flex h-2 w-2",children:[$.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75"}),$.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-emerald-500"})]}),$.jsx("span",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-widest select-none",children:"Copilot AI • v1.0"})]}),$.jsx("span",{className:"text-[9px] font-medium text-slate-300 italic",children:"Sécure & Chiffré"})]})})]})},$v=({isOpen:e,setIsOpen:t})=>{const{primaryColor:n,position:r,logoUrl:o,botName:i}=hc(),a="right"===r,s=n.startsWith("#")?`${n}99`:n;return $.jsxs("div",{className:`fluxoon-copilot-wrapper fixed bottom-0 ${a?"right-0":"left-0"} z-[999999] p-6 font-sans`,dir:"ltr",children:[$.jsx(ds,{children:e&&$.jsx(jl.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3},onClick:()=>t(!1),style:{position:"fixed",inset:0,background:"rgba(15, 23, 42, 0.30)",backdropFilter:"blur(2px)",WebkitBackdropFilter:"blur(2px)",zIndex:39,cursor:"pointer"}},"overlay")}),$.jsx(jl.button,{whileHover:{scale:1.05,boxShadow:"0 15px 45px rgba(0,0,0,0.25)"},whileTap:{scale:.95},onClick:()=>t(!e),style:{backgroundColor:s,border:"1px solid rgba(255, 255, 255, 0.3)"},className:"relative h-16 w-16 rounded-2xl flex items-center justify-center text-white cursor-pointer outline-none z-50 backdrop-blur-lg shadow-[0_8px_32px_rgba(0,0,0,0.15)] transition-shadow",children:$.jsx(ds,{mode:"wait",children:e?$.jsx(jl.div,{initial:{rotate:-90,opacity:0},animate:{rotate:0,opacity:1},exit:{rotate:90,opacity:0},className:"flex items-center justify-center",children:$.jsx(dc,{size:32,strokeWidth:2.5})},"close"):$.jsxs(jl.div,{initial:{scale:0,opacity:0},animate:{scale:1,opacity:1},className:"relative flex items-center justify-center",children:[$.jsx("div",{className:"h-10 w-10 bg-white/90 rounded-xl p-1.5 shadow-inner flex items-center justify-center overflow-hidden",children:$.jsx("img",{src:o,alt:i,className:"h-full w-full object-contain"})}),$.jsx("div",{style:{backgroundColor:n},className:"absolute -top-3 -right-3 h-7 w-7 rounded-lg shadow-lg flex items-center justify-center text-white border-2 border-white",children:$.jsx(Dl,{size:14,strokeWidth:2.5})})]},"open")})}),$.jsx(ds,{children:e&&$.jsxs(jl.div,{initial:{opacity:0,x:a?160:-160},animate:{opacity:1,x:0},exit:{opacity:0,x:a?160:-160},transition:{type:"spring",damping:30,stiffness:220},style:{position:"fixed",top:0,[a?"right":"left"]:0,height:"100%",width:"100%",maxWidth:"520px",zIndex:40,background:"rgba(255, 255, 255, 0.97)",backdropFilter:"blur(24px)",WebkitBackdropFilter:"blur(24px)",borderLeft:a?`1px solid rgba(${qv(n)}, 0.15)`:"none",borderRight:a?"none":`1px solid rgba(${qv(n)}, 0.15)`,boxShadow:a?"-24px 0 80px -8px rgba(0,0,0,0.22), -4px 0 24px -4px rgba(0,0,0,0.10), inset 1px 0 0 rgba(255,255,255,0.8)":"24px 0 80px -8px rgba(0,0,0,0.22), 4px 0 24px -4px rgba(0,0,0,0.10), inset -1px 0 0 rgba(255,255,255,0.8)",overflow:"hidden"},children:[$.jsx("div",{style:{position:"absolute",top:0,left:0,right:0,height:"3px",background:`linear-gradient(90deg, ${n}, ${n}88)`,zIndex:1}}),$.jsx(Hv,{close:()=>t(!1)})]},"drawer")})]})};function qv(e){const t=e.replace("#",""),n=3===t.length?t.split("").map(e=>e+e).join(""):t,r=parseInt(n,16);return`${r>>16&255}, ${r>>8&255}, ${255&r}`}const Wv=()=>{const{primaryColor:e}=hc();return $.jsx("style",{children:`\n /* 1. Injection de tout Tailwind v4 */\n /*! tailwindcss v4.2.4 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}@layer theme{:root,:host{--font-sans:"Inter", ui-sans-serif, system-ui, sans-serif;--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-900:oklch(41.4% .112 45.904);--color-emerald-50:oklch(97.9% .021 166.113);--color-emerald-100:oklch(95% .052 163.051);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-800:oklch(43.2% .095 166.913);--color-blue-50:oklch(97% .014 254.604);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-indigo-50:oklch(96.2% .018 272.314);--color-indigo-100:oklch(93% .034 272.788);--color-indigo-500:oklch(58.5% .233 277.117);--color-indigo-700:oklch(45.7% .24 277.023);--color-violet-500:oklch(60.6% .25 292.717);--color-slate-50:oklch(98.4% .003 247.858);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--color-slate-950:oklch(12.9% .042 264.695);--color-black:#000;--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--font-weight-medium:500;--font-weight-bold:700;--font-weight-black:900;--tracking-tighter:-.05em;--tracking-tight:-.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-tight:1.25;--leading-relaxed:1.625;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--radius-3xl:1.5rem;--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0, 0, .2, 1) infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-sm:8px;--blur-md:12px;--blur-lg:16px;--blur-xl:24px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.-top-3{top:calc(var(--spacing) * -3)}.top-4{top:calc(var(--spacing) * 4)}.-right-2{right:calc(var(--spacing) * -2)}.-right-3{right:calc(var(--spacing) * -3)}.right-0{right:calc(var(--spacing) * 0)}.-bottom-2{bottom:calc(var(--spacing) * -2)}.bottom-0{bottom:calc(var(--spacing) * 0)}.bottom-4{bottom:calc(var(--spacing) * 4)}.left-0{left:calc(var(--spacing) * 0)}.z-50{z-index:50}.z-\\[999999\\]{z-index:999999}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.mx-auto{margin-inline:auto}.mt-0\\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:calc(var(--spacing) * 1)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mb-1{margin-bottom:calc(var(--spacing) * 1)}.mb-1\\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.mb-8{margin-bottom:calc(var(--spacing) * 8)}.mb-10{margin-bottom:calc(var(--spacing) * 10)}.ml-1{margin-left:calc(var(--spacing) * 1)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-flex{display:inline-flex}.h-1{height:calc(var(--spacing) * 1)}.h-1\\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-3\\.5{height:calc(var(--spacing) * 3.5)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-10{height:calc(var(--spacing) * 10)}.h-16{height:calc(var(--spacing) * 16)}.h-20{height:calc(var(--spacing) * 20)}.h-40{height:calc(var(--spacing) * 40)}.h-auto{height:auto}.h-full{height:100%}.max-h-32{max-height:calc(var(--spacing) * 32)}.max-h-48{max-height:calc(var(--spacing) * 48)}.min-h-full{min-height:100%}.w-1{width:calc(var(--spacing) * 1)}.w-1\\.5{width:calc(var(--spacing) * 1.5)}.w-2{width:calc(var(--spacing) * 2)}.w-3\\.5{width:calc(var(--spacing) * 3.5)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-10{width:calc(var(--spacing) * 10)}.w-16{width:calc(var(--spacing) * 16)}.w-20{width:calc(var(--spacing) * 20)}.w-full{width:100%}.max-w-\\[88\\%\\]{max-width:88%}.max-w-\\[100px\\]{max-width:100px}.max-w-\\[160px\\]{max-width:160px}.max-w-\\[240px\\]{max-width:240px}.max-w-\\[480px\\]{max-width:480px}.flex-1{flex:1}.shrink-0{flex-shrink:0}.translate-x-0{--tw-translate-x:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-\\[-4px\\]{--tw-translate-x:-4px;translate:var(--tw-translate-x) var(--tw-translate-y)}.scale-\\[1\\.02\\]{scale:1.02}.rotate-180{rotate:180deg}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-help{cursor:help}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-6{gap:calc(var(--spacing) * 6)}:where(.space-y-1\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.scroll-smooth{scroll-behavior:smooth}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-3xl{border-radius:var(--radius-3xl)}.rounded-\\[24px\\]{border-radius:24px}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-tl-none{border-top-left-radius:0}.rounded-r-full{border-top-right-radius:3.40282e38px;border-bottom-right-radius:3.40282e38px}.rounded-tr-none{border-top-right-radius:0}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-4{border-style:var(--tw-border-style);border-width:4px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-none{--tw-border-style:none;border-style:none}.border-amber-200{border-color:var(--color-amber-200)}.border-black\\/\\[0\\.03\\]{border-color:#00000008}@supports (color:color-mix(in lab,red,red)){.border-black\\/\\[0\\.03\\]{border-color:color-mix(in oklab,var(--color-black) 3%,transparent)}}.border-blue-100{border-color:var(--color-blue-100)}.border-blue-200{border-color:var(--color-blue-200)}.border-blue-500{border-color:var(--color-blue-500)}.border-emerald-100{border-color:var(--color-emerald-100)}.border-indigo-100{border-color:var(--color-indigo-100)}.border-red-400{border-color:var(--color-red-400)}.border-slate-50{border-color:var(--color-slate-50)}.border-slate-100{border-color:var(--color-slate-100)}.border-slate-200{border-color:var(--color-slate-200)}.border-slate-200\\/60{border-color:#e2e8f099}@supports (color:color-mix(in lab,red,red)){.border-slate-200\\/60{border-color:color-mix(in oklab,var(--color-slate-200) 60%,transparent)}}.border-slate-800{border-color:var(--color-slate-800)}.border-transparent{border-color:#0000}.border-white{border-color:var(--color-white)}.border-white\\/40{border-color:#fff6}@supports (color:color-mix(in lab,red,red)){.border-white\\/40{border-color:color-mix(in oklab,var(--color-white) 40%,transparent)}}.border-white\\/50{border-color:#ffffff80}@supports (color:color-mix(in lab,red,red)){.border-white\\/50{border-color:color-mix(in oklab,var(--color-white) 50%,transparent)}}.bg-amber-50{background-color:var(--color-amber-50)}.bg-amber-500{background-color:var(--color-amber-500)}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-400{background-color:var(--color-blue-400)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-emerald-50\\/50{background-color:#ecfdf580}@supports (color:color-mix(in lab,red,red)){.bg-emerald-50\\/50{background-color:color-mix(in oklab,var(--color-emerald-50) 50%,transparent)}}.bg-emerald-400{background-color:var(--color-emerald-400)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-indigo-50\\/50{background-color:#eef2ff80}@supports (color:color-mix(in lab,red,red)){.bg-indigo-50\\/50{background-color:color-mix(in oklab,var(--color-indigo-50) 50%,transparent)}}.bg-red-50{background-color:var(--color-red-50)}.bg-red-500{background-color:var(--color-red-500)}.bg-slate-50{background-color:var(--color-slate-50)}.bg-slate-50\\/50{background-color:#f8fafc80}@supports (color:color-mix(in lab,red,red)){.bg-slate-50\\/50{background-color:color-mix(in oklab,var(--color-slate-50) 50%,transparent)}}.bg-slate-100\\/50{background-color:#f1f5f980}@supports (color:color-mix(in lab,red,red)){.bg-slate-100\\/50{background-color:color-mix(in oklab,var(--color-slate-100) 50%,transparent)}}.bg-slate-200\\/50{background-color:#e2e8f080}@supports (color:color-mix(in lab,red,red)){.bg-slate-200\\/50{background-color:color-mix(in oklab,var(--color-slate-200) 50%,transparent)}}.bg-slate-900{background-color:var(--color-slate-900)}.bg-slate-950{background-color:var(--color-slate-950)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-white\\/20{background-color:#fff3}@supports (color:color-mix(in lab,red,red)){.bg-white\\/20{background-color:color-mix(in oklab,var(--color-white) 20%,transparent)}}.bg-white\\/40{background-color:#fff6}@supports (color:color-mix(in lab,red,red)){.bg-white\\/40{background-color:color-mix(in oklab,var(--color-white) 40%,transparent)}}.bg-white\\/50{background-color:#ffffff80}@supports (color:color-mix(in lab,red,red)){.bg-white\\/50{background-color:color-mix(in oklab,var(--color-white) 50%,transparent)}}.bg-white\\/60{background-color:#fff9}@supports (color:color-mix(in lab,red,red)){.bg-white\\/60{background-color:color-mix(in oklab,var(--color-white) 60%,transparent)}}.bg-white\\/70{background-color:#ffffffb3}@supports (color:color-mix(in lab,red,red)){.bg-white\\/70{background-color:color-mix(in oklab,var(--color-white) 70%,transparent)}}.bg-white\\/90{background-color:#ffffffe6}@supports (color:color-mix(in lab,red,red)){.bg-white\\/90{background-color:color-mix(in oklab,var(--color-white) 90%,transparent)}}.object-contain{object-fit:contain}.p-1{padding:calc(var(--spacing) * 1)}.p-1\\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.px-1{padding-inline:calc(var(--spacing) * 1)}.px-2\\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-10{padding-block:calc(var(--spacing) * 10)}.py-12{padding-block:calc(var(--spacing) * 12)}.py-20{padding-block:calc(var(--spacing) * 20)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pr-1{padding-right:calc(var(--spacing) * 1)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-6{padding-bottom:calc(var(--spacing) * 6)}.pb-10{padding-bottom:calc(var(--spacing) * 10)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[9px\\]{font-size:9px}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[14px\\]{font-size:14px}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-black{--tw-font-weight:var(--font-weight-black);font-weight:var(--font-weight-black)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.tracking-\\[0\\.2em\\]{--tw-tracking:.2em;letter-spacing:.2em}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-tighter{--tw-tracking:var(--tracking-tighter);letter-spacing:var(--tracking-tighter)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.text-amber-500{color:var(--color-amber-500)}.text-amber-600{color:var(--color-amber-600)}.text-amber-900{color:var(--color-amber-900)}.text-blue-400{color:var(--color-blue-400)}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-emerald-400{color:var(--color-emerald-400)}.text-emerald-500{color:var(--color-emerald-500)}.text-emerald-600{color:var(--color-emerald-600)}.text-emerald-800{color:var(--color-emerald-800)}.text-indigo-500{color:var(--color-indigo-500)}.text-indigo-700{color:var(--color-indigo-700)}.text-red-400{color:var(--color-red-400)}.text-red-500{color:var(--color-red-500)}.text-slate-100{color:var(--color-slate-100)}.text-slate-200{color:var(--color-slate-200)}.text-slate-300{color:var(--color-slate-300)}.text-slate-400{color:var(--color-slate-400)}.text-slate-500{color:var(--color-slate-500)}.text-slate-600{color:var(--color-slate-600)}.text-slate-700{color:var(--color-slate-700)}.text-slate-800{color:var(--color-slate-800)}.text-slate-900{color:var(--color-slate-900)}.text-violet-500{color:var(--color-violet-500)}.text-white{color:var(--color-white)}.uppercase{text-transform:uppercase}.italic{font-style:italic}.opacity-0{opacity:0}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_-10px_30px_rgba\\(0\\,0\\,0\\,0\\.02\\)\\]{--tw-shadow:0 -10px 30px var(--tw-shadow-color,#00000005);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_8px_32px_rgba\\(0\\,0\\,0\\,0\\.15\\)\\]{--tw-shadow:0 8px 32px var(--tw-shadow-color,#00000026);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-inner{--tw-shadow:inset 0 2px 4px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-blue-50{--tw-ring-color:var(--color-blue-50)}.ring-red-500{--tw-ring-color:var(--color-red-500)}.backdrop-blur-lg{--tw-backdrop-blur:blur(var(--blur-lg));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-xl{--tw-backdrop-blur:blur(var(--blur-xl));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.duration-700{--tw-duration:.7s;transition-duration:.7s}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}@media(hover:hover){.group-hover\\:translate-x-0:is(:where(.group):hover *){--tw-translate-x:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.group-hover\\:bg-blue-50\\/50:is(:where(.group):hover *){background-color:#eff6ff80}@supports (color:color-mix(in lab,red,red)){.group-hover\\:bg-blue-50\\/50:is(:where(.group):hover *){background-color:color-mix(in oklab,var(--color-blue-50) 50%,transparent)}}.group-hover\\:text-blue-400:is(:where(.group):hover *){color:var(--color-blue-400)}.group-hover\\:text-blue-500:is(:where(.group):hover *){color:var(--color-blue-500)}.group-hover\\:text-slate-900:is(:where(.group):hover *){color:var(--color-slate-900)}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}}.placeholder\\:text-slate-300::placeholder{color:var(--color-slate-300)}.focus-within\\:border-blue-400:focus-within{border-color:var(--color-blue-400)}@media(hover:hover){.hover\\:scale-110:hover{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x) var(--tw-scale-y)}.hover\\:scale-\\[1\\.01\\]:hover{scale:1.01}.hover\\:border-blue-100:hover{border-color:var(--color-blue-100)}.hover\\:border-blue-200:hover{border-color:var(--color-blue-200)}.hover\\:border-blue-300:hover{border-color:var(--color-blue-300)}.hover\\:border-slate-200:hover{border-color:var(--color-slate-200)}.hover\\:bg-blue-50:hover{background-color:var(--color-blue-50)}.hover\\:bg-red-50:hover{background-color:var(--color-red-50)}.hover\\:bg-white:hover{background-color:var(--color-white)}.hover\\:text-blue-600:hover{color:var(--color-blue-600)}.hover\\:text-red-500:hover{color:var(--color-red-500)}.hover\\:text-slate-600:hover{color:var(--color-slate-600)}.hover\\:shadow-md:hover{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\\:shadow-sm:hover{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\\:ring-0:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:ring-blue-500\\/20:focus{--tw-ring-color:#3080ff33}@supports (color:color-mix(in lab,red,red)){.focus\\:ring-blue-500\\/20:focus{--tw-ring-color:color-mix(in oklab, var(--color-blue-500) 20%, transparent)}}.focus\\:ring-emerald-500\\/50:focus{--tw-ring-color:#00bb7f80}@supports (color:color-mix(in lab,red,red)){.focus\\:ring-emerald-500\\/50:focus{--tw-ring-color:color-mix(in oklab, var(--color-emerald-500) 50%, transparent)}}.active\\:scale-\\[0\\.98\\]:active{scale:.98}.disabled\\:opacity-30:disabled{opacity:.3}@media(min-width:48rem){.md\\:col-span-2{grid-column:span 2/span 2}.md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}}\n\n /* 2. Variables dynamiques basées sur la config */\n :host {\n --dhi-primary: ${e};\n --dhi-primary-soft: ${e}15;\n font-family: 'Inter', system-ui, sans-serif;\n display: block;\n position: relative;\n z-index: 999999;\n }\n\n /* Forcer la taille du conteneur pour que la bulle fixed soit visible */\n .dhi-copilot-wrapper {\n position: fixed;\n bottom: 0;\n right: 0;\n pointer-events: none; /* Laisse passer les clics sur le site hôte */\n }\n\n .dhi-copilot-wrapper > * {\n pointer-events: auto; /* Mais capture les clics sur la bulle et le tiroir */\n }\n \n /* 3. Overrides et helpers personnalisés */\n .bg-primary { background-color: var(--dhi-primary) !important; }\n .text-primary { color: var(--dhi-primary) !important; }\n .border-primary { border-color: var(--dhi-primary) !important; }\n \n .custom-scrollbar::-webkit-scrollbar { width: 4px; }\n .custom-scrollbar::-webkit-scrollbar-thumb {\n background: rgba(0,0,0,0.1);\n border-radius: 10px;\n }\n\n .glass {\n background: rgba(255, 255, 255, 0.7);\n backdrop-filter: blur(20px);\n -webkit-backdrop-filter: blur(20px);\n border: 1px solid rgba(255, 255, 255, 0.3);\n }\n\n /* Styles pour le rendu Markdown */\n .prose-custom { font-size: 14px; line-height: 1.6; color: #334155; }\n .prose-custom p { margin-bottom: 0.8em; }\n .prose-custom code {\n background: rgba(0,0,0,0.05);\n padding: 2px 4px;\n border-radius: 4px;\n font-family: monospace;\n }\n .prose-custom pre {\n background: #1e293b;\n color: #f8fafc;\n padding: 12px;\n border-radius: 8px;\n overflow-x: auto;\n }\n `})},Kv=function(e,t={}){return function(e,t,r){var o,i,a;t.props||(t.props=e.propTypes?Object.keys(e.propTypes):[]),t.events||(t.events=[]);const s=Array.isArray(t.props)?t.props.slice():Object.keys(t.props),l=Array.isArray(t.events)?t.events.slice():Object.keys(t.events),c={},u={},d={},f={};for(const n of s){c[n]=Array.isArray(t.props)?"string":t.props[n];const e=N(n);d[n]=e,f[e]=n}for(const n of l)u[n]=Array.isArray(t.events)?{}:t.events[n];class p extends HTMLElement{constructor(){super(),n(this,a,!0),n(this,i),n(this,o,{}),n(this,"container"),t.shadow?this.container=this.attachShadow({mode:t.shadow}):this.container=this,this[M].container=this.container;for(const e of s){const t=d[e],n=this.getAttribute(t),r=c[e],o=r?L[r]:null;(null==o?void 0:o.parse)&&(n||"method"===r)&&(this[M][e]=o.parse(n,t,this))}for(const e of l)this[M][e]=t=>{const n=e.replace(/^on/,"").toLowerCase();this.dispatchEvent(new CustomEvent(n,{detail:t,...u[e]}))}}static get observedAttributes(){return Object.keys(f)}connectedCallback(){this[D]=!0,this[O]()}disconnectedCallback(){this[D]=!1,this[_]&&r.unmount(this[_]),delete this[_]}attributeChangedCallback(e,t,n){const r=f[e],o=c[r],i=o?L[o]:null;r in c&&(null==i?void 0:i.parse)&&(n||"method"===o)&&(this[M][r]=i.parse(n,e,this),this[O]())}[(a=D,i=_,o=M,O)](){this[D]&&(this[_]?r.update(this[_],this[M]):this[_]=r.mount(this.container,e,this[M]))}}for(const n of s){const e=d[n],t=c[n];Object.defineProperty(p.prototype,n,{enumerable:!0,configurable:!0,get(){return this[M][n]},set(r){this[M][n]=r;const o=t?L[t]:null;if(null==o?void 0:o.stringify){const t=o.stringify(r,e,this);this.getAttribute(e)!==t&&(null==t?this.removeAttribute(e):this.setAttribute(e,t))}else n in c&&(null==o?void 0:o.parse)&&(r||"method"===t)&&(this[M][n]=o.parse(r,e,this)),this[O]()}})}return p}(e,t,{mount:z,update:F,unmount:I})}(({config:e})=>{const[t,n]=u.useState(!1),r=Gd(e=>e.setConfig),o=u.useMemo(()=>{if(!e)return null;try{return"string"==typeof e?JSON.parse(e):e}catch(t){return console.error("[DHI Copilot] Impossible de parser la config :",t),null}},[e]);return u.useEffect(()=>{o&&r(o)},[o,r]),u.useEffect(()=>(t&&window.innerWidth<768?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[t]),o?$.jsxs(pc,{value:o,children:[$.jsx(Wv,{}),$.jsx($v,{isOpen:t,setIsOpen:n})]}):null},{props:{config:"json"},shadow:"open"});customElements.get("dhi-copilot-ai")||customElements.define("dhi-copilot-ai",Kv)});
|