@notis_ai/cli 0.2.21 → 0.2.23

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.
@@ -910,7 +910,7 @@ img.ProseMirror-separator {
910
910
  `,Slt="\uFE0F",Clt="\u200D",QG="\uFFFC",xN=null,kN=null;function Elt(e=[]){let t={};Kl.groups=t;let n=new Kl;xN==null&&(xN=$ke(blt)),kN==null&&(kN=$ke(vlt)),ze(n,"'",HN),ze(n,"{",uT),ze(n,"}",dT),ze(n,"[",EN),ze(n,"]",_N),ze(n,"(",TN),ze(n,")",AN),ze(n,"<",MN),ze(n,">",RN),ze(n,"\uFF08",ON),ze(n,"\uFF09",PN),ze(n,"\u300C",DN),ze(n,"\u300D",IN),ze(n,"\u300E",NN),ze(n,"\u300F",LN),ze(n,"\uFF1C",BN),ze(n,"\uFF1E",zN),ze(n,"&",FN),ze(n,"*",jN),ze(n,"@",Qg),ze(n,"`",WN),ze(n,"^",$N),ze(n,":",My),ze(n,",",uY),ze(n,"$",UN),ze(n,".",op),ze(n,"=",KN),ze(n,"!",dY),ze(n,"-",Mu),ze(n,"%",fT),ze(n,"|",qN),ze(n,"+",GN),ze(n,"#",YN),ze(n,"?",pT),ze(n,'"',fY),ze(n,"/",ap),ze(n,";",pY),ze(n,"~",mT),ze(n,"_",XN),ze(n,"\\",VN),ze(n,"\u30FB",Xke);let r=Xi(n,$m,lY,{[eY]:!0});Xi(r,$m,r);let i=Xi(r,Wm,Gke,{[cT]:!0}),o=Xi(r,sT,Yke,{[lT]:!0}),a=Xi(n,Wm,Um,{[tY]:!0});Xi(a,$m,i),Xi(a,Wm,a),Xi(i,$m,i),Xi(i,Wm,i);let s=Xi(n,sT,iY,{[nY]:!0});Xi(s,Wm),Xi(s,$m,o),Xi(s,sT,s),Xi(o,$m,o),Xi(o,Wm),Xi(o,sT,o);let l=ze(n,ZG,cY,{[GG]:!0}),c=ze(n,Wke,sY,{[GG]:!0}),u=Xi(n,XG,sY,{[GG]:!0});ze(n,QG,u),ze(c,ZG,l),ze(c,QG,u),Xi(c,XG,u),ze(u,Wke),ze(u,ZG),Xi(u,XG,u),ze(u,QG,u);let d=Xi(n,YG,Zke,{[qke]:!0});ze(d,"#"),Xi(d,YG,d),ze(d,Slt,d);let f=ze(d,Clt);ze(f,"#"),Xi(f,YG,d);let p=[[Wm,a],[$m,i]],m=[[Wm,null],[sT,s],[$m,o]];for(let h=0;h<xN.length;h++)Zg(n,xN[h],oY,Um,p);for(let h=0;h<kN.length;h++)Zg(n,kN[h],aY,iY,m);Ay(oY,{tld:!0,ascii:!0},t),Ay(aY,{utld:!0,alpha:!0},t),Zg(n,"file",CN,Um,p),Zg(n,"mailto",CN,Um,p),Zg(n,"http",Ux,Um,p),Zg(n,"https",Ux,Um,p),Zg(n,"ftp",Ux,Um,p),Zg(n,"ftps",Ux,Um,p),Ay(CN,{scheme:!0,ascii:!0},t),Ay(Ux,{slashscheme:!0,ascii:!0},t),e=e.sort((h,g)=>h[0]>g[0]?1:-1);for(let h=0;h<e.length;h++){let g=e[h][0],v=e[h][1]?{[ylt]:!0}:{[wlt]:!0};g.indexOf("-")>=0?v[rY]=!0:Wm.test(g)?$m.test(g)?v[cT]=!0:v[tY]=!0:v[eY]=!0,Vke(n,g,g,v)}return Vke(n,"localhost",hT,{ascii:!0}),n.jd=new Kl(ZN),{start:n,tokens:Object.assign({groups:t},Qke)}}function Jke(e,t){let n=_lt(t.replace(/[A-Z]/g,s=>s.toLowerCase())),r=n.length,i=[],o=0,a=0;for(;a<r;){let s=e,l=null,c=0,u=null,d=-1,f=-1;for(;a<r&&(l=s.go(n[a]));)s=l,s.accepts()?(d=0,f=0,u=s):d>=0&&(d+=n[a].length,f++),c+=n[a].length,o+=n[a].length,a++;o-=d,a-=f,c-=d,i.push({t:u.t,v:t.slice(o-c,o),s:o-c,e:o})}return i}function _lt(e){let t=[],n=e.length,r=0;for(;r<n;){let i=e.charCodeAt(r),o,a=i<55296||i>56319||r+1===n||(o=e.charCodeAt(r+1))<56320||o>57343?e[r]:e.slice(r,r+2);t.push(a),r+=a.length}return t}function Zg(e,t,n,r,i){let o,a=t.length;for(let s=0;s<a-1;s++){let l=t[s];e.j[l]?o=e.j[l]:(o=new Kl(r),o.jr=i.slice(),e.j[l]=o),e=o}return o=new Kl(n),o.jr=i.slice(),e.j[t[a-1]]=o,o}function $ke(e){let t=[],n=[],r=0,i="0123456789";for(;r<e.length;){let o=0;for(;i.indexOf(e[r+o])>=0;)o++;if(o>0){t.push(n.join(""));for(let a=parseInt(e.substring(r,r+o),10);a>0;a--)n.pop();r+=o}else n.push(e[r]),r++}return t}var gT={defaultProtocol:"http",events:null,format:Uke,formatHref:Uke,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function mY(e,t=null){let n=Object.assign({},gT);e&&(n=Object.assign(n,e instanceof mY?e.o:e));let r=n.ignoreTags,i=[];for(let o=0;o<r.length;o++)i.push(r[o].toUpperCase());this.o=n,t&&(this.defaultRender=t),this.ignoreTags=i}mY.prototype={o:gT,ignoreTags:[],defaultRender(e){return e},check(e){return this.get("validate",e.toString(),e)},get(e,t,n){let r=t!=null,i=this.o[e];return i&&(typeof i=="object"?(i=n.t in i?i[n.t]:gT[e],typeof i=="function"&&r&&(i=i(t,n))):typeof i=="function"&&r&&(i=i(t,n.t,n)),i)},getObj(e,t,n){let r=this.o[e];return typeof r=="function"&&t!=null&&(r=r(t,n.t,n)),r},render(e){let t=e.render(this);return(this.get("render",null,e)||this.defaultRender)(t,e.t,e)}};function Uke(e){return e}function eSe(e,t){this.t="token",this.v=e,this.tk=t}eSe.prototype={isLink:!1,toString(){return this.v},toHref(e){return this.toString()},toFormattedString(e){let t=this.toString(),n=e.get("truncate",t,this),r=e.get("format",t,this);return n&&r.length>n?r.substring(0,n)+"\u2026":r},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e=gT.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){let t=this,n=this.toHref(e.get("defaultProtocol")),r=e.get("formatHref",n,this),i=e.get("tagName",n,t),o=this.toFormattedString(e),a={},s=e.get("className",n,t),l=e.get("target",n,t),c=e.get("rel",n,t),u=e.getObj("attributes",n,t),d=e.getObj("events",n,t);return a.href=r,s&&(a.class=s),l&&(a.target=l),c&&(a.rel=c),u&&Object.assign(a,u),{tagName:i,attributes:a,content:o,eventListeners:d}}};function QN(e,t){class n extends eSe{constructor(i,o){super(i,o),this.t=e}}for(let r in t)n.prototype[r]=t[r];return n.t=e,n}var Tlt=QN("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),Kke=QN("text"),Alt=QN("nl"),SN=QN("url",{isLink:!0,toHref(e=gT.defaultProtocol){return this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){let e=this.tk;return e.length>=2&&e[0].t!==hT&&e[1].t===My}});var Au=e=>new Kl(e);function Mlt({groups:e}){let t=e.domain.concat([FN,jN,Qg,VN,WN,$N,UN,KN,Mu,lY,fT,qN,GN,YN,ap,ZN,mT,XN]),n=[HN,My,uY,op,dY,fT,pT,fY,pY,MN,RN,uT,dT,_N,EN,TN,AN,ON,PN,DN,IN,NN,LN,BN,zN],r=[FN,HN,jN,VN,WN,$N,UN,KN,Mu,uT,dT,fT,qN,GN,YN,pT,ap,ZN,mT,XN],i=Au(),o=ze(i,mT);Cn(o,r,o),Cn(o,e.domain,o);let a=Au(),s=Au(),l=Au();Cn(i,e.domain,a),Cn(i,e.scheme,s),Cn(i,e.slashscheme,l),Cn(a,r,o),Cn(a,e.domain,a);let c=ze(a,Qg);ze(o,Qg,c),ze(s,Qg,c),ze(l,Qg,c);let u=ze(o,op);Cn(u,r,o),Cn(u,e.domain,o);let d=Au();Cn(c,e.domain,d),Cn(d,e.domain,d);let f=ze(d,op);Cn(f,e.domain,d);let p=Au(Tlt);Cn(f,e.tld,p),Cn(f,e.utld,p),ze(c,hT,p);let m=ze(d,Mu);ze(m,Mu,m),Cn(m,e.domain,d),Cn(p,e.domain,d),ze(p,op,f),ze(p,Mu,m);let h=ze(a,Mu),g=ze(a,op);ze(h,Mu,h),Cn(h,e.domain,a),Cn(g,r,o),Cn(g,e.domain,a);let b=Au(SN);Cn(g,e.tld,b),Cn(g,e.utld,b),Cn(b,e.domain,a),Cn(b,r,o),ze(b,op,g),ze(b,Mu,h),ze(b,Qg,c);let v=ze(b,My),y=Au(SN);Cn(v,e.numeric,y);let w=Au(SN),k=Au();Cn(w,t,w),Cn(w,n,k),Cn(k,t,w),Cn(k,n,k),ze(b,ap,w),ze(y,ap,w);let x=ze(s,My),S=ze(l,My),T=ze(S,ap),R=ze(T,ap);Cn(s,e.domain,a),ze(s,op,g),ze(s,Mu,h),Cn(l,e.domain,a),ze(l,op,g),ze(l,Mu,h),Cn(x,e.domain,w),ze(x,ap,w),ze(x,pT,w),Cn(R,e.domain,w),Cn(R,t,w),ze(R,ap,w);let C=[[uT,dT],[EN,_N],[TN,AN],[MN,RN],[ON,PN],[DN,IN],[NN,LN],[BN,zN]];for(let M=0;M<C.length;M++){let[E,D]=C[M],L=ze(w,E);ze(k,E,L);let I=Au(SN);Cn(L,t,I);let _=Au();Cn(L,n,_),ze(L,D,w),Cn(I,t,I),Cn(I,n,_),Cn(_,t,I),Cn(_,n,_),ze(I,D,w),ze(_,D,w)}return ze(i,hT,b),ze(i,cY,Alt),{start:i,tokens:Qke}}function Rlt(e,t,n){let r=n.length,i=0,o=[],a=[];for(;i<r;){let s=e,l=null,c=null,u=0,d=null,f=-1;for(;i<r&&!(l=s.go(n[i].t));)a.push(n[i++]);for(;i<r&&(c=l||s.go(n[i].t));)l=null,s=c,s.accepts()?(f=0,d=s):f>=0&&f++,i++,u++;if(f<0)i-=u,i<r&&(a.push(n[i]),i++);else{a.length>0&&(o.push(JG(Kke,t,a)),a=[]),i-=f,u-=f;let p=d.t,m=n.slice(i-u,i);o.push(JG(p,t,m))}}return a.length>0&&o.push(JG(Kke,t,a)),o}function JG(e,t,n){let r=n[0].s,i=n[n.length-1].e,o=t.slice(r,i);return new e(o,n)}var Olt=typeof console<"u"&&console&&console.warn||(()=>{}),Plt="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",Si={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function tSe(){return Kl.groups={},Si.scanner=null,Si.parser=null,Si.tokenQueue=[],Si.pluginQueue=[],Si.customSchemes=[],Si.initialized=!1,Si}function hY(e,t=!1){if(Si.initialized&&Olt(`linkifyjs: already initialized - will not register custom scheme "${e}" ${Plt}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))throw new Error(`linkifyjs: incorrect scheme format.
911
911
  1. Must only contain digits, lowercase ASCII letters or "-"
912
912
  2. Cannot start or end with "-"
913
- 3. "-" cannot repeat`);Si.customSchemes.push([e,t])}function Dlt(){Si.scanner=Elt(Si.customSchemes);for(let e=0;e<Si.tokenQueue.length;e++)Si.tokenQueue[e][1]({scanner:Si.scanner});Si.parser=Mlt(Si.scanner.tokens);for(let e=0;e<Si.pluginQueue.length;e++)Si.pluginQueue[e][1]({scanner:Si.scanner,parser:Si.parser});return Si.initialized=!0,Si}function JN(e){return Si.initialized||Dlt(),Rlt(Si.parser.start,e,Jke(Si.scanner.start,e))}JN.scan=Jke;function gY(e,t=null,n=null){if(t&&typeof t=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${t}; must be a string`);n=t,t=null}let r=new mY(n),i=JN(e),o=[];for(let a=0;a<i.length;a++){let s=i[a];s.isLink&&(!t||s.t===t)&&r.check(s)&&o.push(s.toFormattedObject(r))}return o}var bY="[\0- \xA0\u1680\u180E\u2000-\u2029\u205F\u3000]",Ilt=new RegExp(bY),Nlt=new RegExp(`${bY}$`),Llt=new RegExp(bY,"g");function Blt(e){return e.length===1?e[0].isLink:e.length===3&&e[1].isLink?["()","[]"].includes(e[0].value+e[2].value):!1}function zlt(e){return new vt({key:new Ut("autolink"),appendTransaction:(t,n,r)=>{let i=t.some(l=>l.docChanged)&&!n.doc.eq(r.doc),o=t.some(l=>l.getMeta("preventAutolink"));if(!i||o)return;let{tr:a}=r,s=ym(n.doc,[...t]);if(Cg(s).forEach(({newRange:l})=>{let c=wm(r.doc,l,f=>f.isTextblock),u,d;if(c.length>1)u=c[0],d=r.doc.textBetween(u.pos,u.pos+u.node.nodeSize,void 0," ");else if(c.length){let f=r.doc.textBetween(l.from,l.to," "," ");if(!Nlt.test(f))return;u=c[0],d=r.doc.textBetween(u.pos,l.to,void 0," ")}if(u&&d){let f=d.split(Ilt).filter(Boolean);if(f.length<=0)return!1;let p=f[f.length-1],m=u.pos+d.lastIndexOf(p);if(!p)return!1;let h=JN(p).map(g=>g.toObject(e.defaultProtocol));if(!Blt(h))return!1;h.filter(g=>g.isLink).map(g=>({...g,from:m+g.start+1,to:m+g.end+1})).filter(g=>r.schema.marks.code?!r.doc.rangeHasMark(g.from,g.to,r.schema.marks.code):!0).filter(g=>e.validate(g.value)).filter(g=>e.shouldAutoLink(g.value)).forEach(g=>{$w(g.from,g.to,r.doc).some(b=>b.mark.type===e.type)||a.addMark(g.from,g.to,e.type.create({href:g.href}))})}}),!!a.steps.length)return a}})}function Flt(e){return new vt({key:new Ut("handleClickLink"),props:{handleClick:(t,n,r)=>{if(r.button!==0||!t.editable)return!1;let i=null;if(r.target instanceof HTMLAnchorElement)i=r.target;else{let l=r.target;if(!l)return!1;let c=e.editor.view.dom;i=l.closest("a"),i&&!c.contains(i)&&(i=null)}if(!i)return!1;let o=!1;if(e.enableClickSelection&&(o=e.editor.commands.extendMarkRange(e.type.name)),e.openOnClick){var a,s;let l=LE(t.state,e.type.name),c=(a=i.href)!==null&&a!==void 0?a:l.href,u=(s=i.target)!==null&&s!==void 0?s:l.target;c&&(window.open(c,u),o=!0)}return o}}})}var Hlt=/\[([^[\]]+)\]\(((?:[^\s()]|\([^\s()]*\))+)(?:\s+(?:(["'])(.*?)\3|“(.*?)”|‘(.*?)’))?\)$/,jlt=/\[([^[\]]+)\]\(((?:[^\s()]|\([^\s()]*\))+)(?:\s+(?:(["'])(.*?)\3|“(.*?)”|‘(.*?)’))?\)/g;function nSe(e,t){let n=0;for(let r=t-1;r>=0&&e[r]==="\\";r-=1)n+=1;return n%2===1}function Vlt(e,t){let n=0,r=0;for(;r<t;){if(e[r]!=="`"){r+=1;continue}if(n===0&&nSe(e,r)){r+=1;continue}let i=0;for(;r<t&&e[r]==="`";)i+=1,r+=1;n===0?n=i:i===n&&(n=0)}return n>0}function rSe(e,t,n){var r,i;let[,o,a]=t;return(t.index?e[t.index-1]:void 0)==="!"||nSe(e,(r=t.index)!==null&&r!==void 0?r:0)||Vlt(e,(i=t.index)!==null&&i!==void 0?i:0)?!1:!!o.trim()&&n(a)}function iSe(e){var t,n;let[r,i,o,,a,s,l]=e,c=(t=a??s)!==null&&t!==void 0?t:l;return{index:(n=e.index)!==null&&n!==void 0?n:0,text:r,replaceWith:i,data:{href:o,title:c||null,markdown:!0}}}function Wlt(e,t){return e.index<t.index+t.text.length&&t.index<e.index+e.text.length}function oSe(e){var t,n,r;return{href:(t=e.data)===null||t===void 0?void 0:t.href,title:(n=(r=e.data)===null||r===void 0?void 0:r.title)!==null&&n!==void 0?n:null}}function $lt(e){let t=Nl({find:n=>{let r=Hlt.exec(n);return!r||!rSe(n,r,e.isAllowedHref)?null:iSe(r)},type:e.type,getAttributes:oSe});return new BE({find:t.find,handler:n=>{let r=t.handler(n);return r!==null&&n.state.tr.steps.length&&n.state.tr.setMeta("preventAutolink",!0),r}})}function Ult(e){let t=Xs({find:n=>{var r,i;let o=[];for(let s of n.matchAll(jlt))rSe(n,s,e.isAllowedHref)&&o.push(iSe(s));let a=((r=(i=e.findPlainUrls)===null||i===void 0?void 0:i.call(e,n))!==null&&r!==void 0?r:[]).filter(s=>!o.some(l=>Wlt(l,s)));return[...o,...a]},type:e.type,getAttributes:oSe});return new c$({find:t.find,handler:n=>{var r;let i=t.handler(n);return i!==null&&n.state.tr.steps.length&&(!((r=n.match.data)===null||r===void 0)&&r.markdown)&&n.state.tr.setMeta("preventAutolink",!0),i}})}function Klt(e){return new vt({key:new Ut("handlePasteLink"),props:{handlePaste:(t,n,r)=>{let{shouldAutoLink:i}=e,{state:o}=t,{selection:a}=o,{empty:s}=a;if(s)return!1;let l="";r.content.forEach(u=>{l+=u.textContent});let c=gY(l,{defaultProtocol:e.defaultProtocol}).find(u=>u.isLink&&u.value===l);return!l||!c||i!==void 0&&!i(c.value)?!1:e.editor.commands.setMark(e.type,{href:c.href})}}})}function Km(e,t){let n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return t&&t.forEach(r=>{let i=typeof r=="string"?r:r.scheme;i&&n.push(i)}),!e||e.replace(Llt,"").match(new RegExp(`^(?:(?:${n.map(r=>r.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")).join("|")}):|[^a-z]|[a-z0-9+.\\-]+(?:[^a-z+.\\-:]|$))`,"i"))}var aSe=Eo.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(e=>{if(typeof e=="string"){hY(e);return}hY(e.scheme,e.optionalSlashes)})},onDestroy(){tSe()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,markdownLinks:!1,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(e,t)=>!!Km(e,t.protocols),validate:e=>!!e,shouldAutoLink:e=>{let t=/^[a-z][a-z0-9+.-]*:\/\//i.test(e),n=/^[a-z][a-z0-9+.-]*:/i.test(e);if(t||n&&!e.includes("@"))return!0;let r=(e.includes("@")?e.split("@").pop():e).split(/[/?#:]/)[0];return!(/^\d{1,3}(\.\d{1,3}){3}$/.test(r)||!/\./.test(r))}}},addAttributes(){var e,t,n;return{href:{default:null,parseHTML(r){return r.getAttribute("href")}},target:{default:(e=this.options.HTMLAttributes.target)!==null&&e!==void 0?e:null},rel:{default:(t=this.options.HTMLAttributes.rel)!==null&&t!==void 0?t:null},class:{default:(n=this.options.HTMLAttributes.class)!==null&&n!==void 0?n:null},title:{default:null}}},parseHTML(){return[{tag:"a[href]",getAttrs:e=>{let t=e.getAttribute("href");return!t||!this.options.isAllowedUri(t,{defaultValidate:n=>!!Km(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:e}){return this.options.isAllowedUri(e.href,{defaultValidate:t=>!!Km(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",Ri(this.options.HTMLAttributes,e),0]:["a",Ri(this.options.HTMLAttributes,{...e,href:""}),0]},markdownTokenName:"link",parseMarkdown:(e,t)=>t.applyMark("link",t.parseInline(e.tokens||[]),{href:e.href,title:e.title||null}),renderMarkdown:(e,t)=>{var n,r,i,o;let a=(n=(r=e.attrs)===null||r===void 0?void 0:r.href)!==null&&n!==void 0?n:"",s=(i=(o=e.attrs)===null||o===void 0?void 0:o.title)!==null&&i!==void 0?i:"",l=t.renderChildren(e);return s?`[${l}](${a} "${s}")`:`[${l}](${a})`},addCommands(){return{setLink:e=>({chain:t})=>{let{href:n}=e;return this.options.isAllowedUri(n,{defaultValidate:r=>!!Km(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?t().setMark(this.name,e).setMeta("preventAutolink",!0).run():!1},toggleLink:e=>({chain:t})=>{let{href:n}=e||{};return n&&!this.options.isAllowedUri(n,{defaultValidate:r=>!!Km(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addInputRules(){return this.options.markdownLinks?[$lt({type:this.type,isAllowedHref:e=>this.options.isAllowedUri(e,{defaultValidate:t=>!!Km(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})})]:[]},addPasteRules(){let e=t=>{let n=[];if(t){let{protocols:r,defaultProtocol:i}=this.options;gY(t).filter(o=>o.isLink&&this.options.isAllowedUri(o.value,{defaultValidate:a=>!!Km(a,r),protocols:r,defaultProtocol:i})).forEach(o=>{this.options.shouldAutoLink(o.value)&&n.push({text:o.value,data:{href:o.href},index:o.start})})}return n};return this.options.markdownLinks?[Ult({type:this.type,isAllowedHref:t=>this.options.isAllowedUri(t,{defaultValidate:n=>!!Km(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}),findPlainUrls:e})]:[Xs({find:e,type:this.type,getAttributes:t=>{var n;return{href:(n=t.data)===null||n===void 0?void 0:n.href}}})]},addProseMirrorPlugins(){let e=[],{protocols:t,defaultProtocol:n}=this.options;return this.options.autolink&&e.push(zlt({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:i=>!!Km(i,t),protocols:t,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),e.push(Flt({type:this.type,editor:this.editor,openOnClick:this.options.openOnClick==="whenNotEditable"?!0:this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&e.push(Klt({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),e}});var vY={headers:!0,splitCells:!0,cellBackgroundColor:!0,cellTextColor:!0},qlt="link",Glt="https",sSe=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"],Ylt=new Set(["http","https","ftp","ftps"]);function Xlt(e){let t=e.match(/^([a-z][a-z0-9+.-]*):/i)?.[1]?.toLowerCase();return!t||!sSe.includes(t)?!1:Ylt.has(t)?/^[a-z][a-z0-9+.-]*:\/\//i.test(e):!0}var Zlt=100;function Qlt(){return aSe.extend({inclusive:!1,priority:Zlt}).configure({defaultProtocol:Glt,protocols:sSe,shouldAutoLink:Xlt})}function yY(){return{disableExtensions:[qlt],_tiptapOptions:{extensions:[Qlt()]}}}function Jlt(){return[{type:"paragraph"}]}function ect(e){return Array.isArray(e)?e:null}function lSe(e,t){if(t)return;let n=ect(e);return n?.length?n:Jlt()}var tct="default-src 'none'; script-src 'unsafe-inline' https:; style-src 'unsafe-inline' https:; img-src https: data: blob:; font-src https: data:; media-src https: data: blob:; connect-src https:; frame-src https:; base-uri 'none'; form-action 'none'; object-src 'none'";function cSe(e){return`<!doctype html><meta http-equiv="Content-Security-Policy" content="${tct}">${e}`}var e6=Object.freeze({"@notis/sdk":"__NotisSDK","@notis/sdk/ui":"__NotisSDKUI"}),$Yt=Object.freeze(["react","react-dom","react-dom/client","react/jsx-runtime","react/jsx-dev-runtime"]),UYt=Object.freeze(["@notis/sdk/words","@notis/sdk/config","@notis/sdk/vite"]);var dSe=String.raw`@notis\/sdk(?:\/[^"'\s]*)?`,nct=new RegExp(String.raw`(\bfrom\s*|\bimport\s*\(\s*|\bimport(?![\w$])\s*)(["'])(${dSe})\2`,"g"),rct=new RegExp(String.raw`\b(?:import|export)(?![\w$])\s*([^;"'\x60()]*?)\s*from\s*(["'])(${dSe})\2`,"g"),ict=/^[A-Za-z_$][\w$]*$/;function wY(e,t,n={}){return Object.assign(new Error(t),{code:e,...n})}function oct(e){let t=[],n=e.trim(),r=n.match(/\{([^}]*)\}/);if(r){for(let i of r[1].split(",")){let o=i.trim().split(/\s+as\s+/)[0]?.trim();o&&t.push(o)}n=n.replace(r[0],"")}for(let i of n.split(",")){let o=i.trim();o&&!o.startsWith("*")&&t.push("default")}return t}function uSe(e,t){if(!Object.hasOwn(e6,e))throw wY("client_update_required",`This Space needs ${e}, which this version of Notis does not provide.`,{missing:[e]});let n=e6[e],r=t[n];if(!r||typeof r!="object")throw wY("notis_sdk_host_unavailable",`The host did not provide ${e} (window.${n}).`);return r}function act(e,t){let n=Object.keys(t),r=[`const M = globalThis[${JSON.stringify(e)}];`],i=[];return n.forEach((o,a)=>{r.push(`const e${a} = M[${JSON.stringify(o)}];`),i.push(`e${a} as ${ict.test(o)?o:JSON.stringify(o)}`)}),i.length&&r.push(`export { ${i.join(", ")} };`),`data:text/javascript,${encodeURIComponent(r.join(" "))}`}function sct(e,t=globalThis){if(!e.includes("@notis/sdk"))return e;let n=new Set;for(let[,i,,o]of e.matchAll(rct)){let a=uSe(o,t);for(let s of oct(i))Object.hasOwn(a,s)||n.add(`${o}:${s}`)}if(n.size)throw wY("client_update_required",`This Space needs a newer version of Notis (missing ${[...n].join(", ")}).`,{missing:[...n]});let r=new Map;return e.replace(nct,(i,o,a,s)=>{let l=r.get(s);if(!l){let c=uSe(s,t);l=act(e6[s],c),r.set(s,l)}return`${o}${a}${l}${a}`})}function lct(e,t){return sct(cct(e),t)}function cct(e){let t=`data:text/javascript,${encodeURIComponent("const R = window.React; export default R; export const { createContext, createRef, useState, useEffect, useContext, useCallback, useMemo, useRef, useReducer, useLayoutEffect, useId, memo, forwardRef, createElement, Fragment, Children, cloneElement, isValidElement, lazy, Suspense, startTransition, useTransition, useDeferredValue, useSyncExternalStore, useInsertionEffect, useDebugValue, useImperativeHandle, Component, PureComponent } = R;")}`,n=`data:text/javascript,${encodeURIComponent("const J = window.__ReactJSXRuntime || {}; const R = window.React; export const jsx = J.jsx || R.createElement; export const jsxs = J.jsxs || R.createElement; export const jsxDEV = J.jsxDEV || R.createElement; export const Fragment = J.Fragment || R.Fragment;")}`,r=`data:text/javascript,${encodeURIComponent("const RD = window.ReactDOM; export default RD; export const { createPortal, flushSync, unstable_batchedUpdates } = RD;")}`,i=`data:text/javascript,${encodeURIComponent("const RDC = window.ReactDOMClient; export default RDC; export const { createRoot, hydrateRoot } = RDC;")}`,o=e;return o=o.replace(/import\s*["']react-dom\/client["'];?/g,`import "${i}";`),o=o.replace(/import\s*["']react-dom["'];?/g,`import "${r}";`),o=o.replace(/import\s*["']react\/jsx-runtime["'];?/g,`import "${n}";`),o=o.replace(/import\s*["']react\/jsx-dev-runtime["'];?/g,`import "${n}";`),o=o.replace(/import\s*["']react["'];?/g,`import "${t}";`),o=o.replace(/from\s*["']react\/jsx-runtime["']/g,`from "${n}"`),o=o.replace(/from\s*["']react\/jsx-dev-runtime["']/g,`from "${n}"`),o=o.replace(/from\s*["']react-dom\/client["']/g,`from "${i}"`),o=o.replace(/from\s*["']react-dom["']/g,`from "${r}"`),o=o.replace(/from\s*["']react["']/g,`from "${t}"`),o}function t6(e,t,n=!1){let r=t.find(s=>!!e[s]);if(r)return{name:r,component:e[r]};if(n)return null;if(e.default)return{name:"default",component:e.default};let i=Object.entries(e).filter(([s,l])=>s!=="__AppShell"&&!!l);if(i.length!==1)return null;let[o,a]=i[0];return{name:o,component:a}}async function uct(e){let t=new Blob([e],{type:"text/javascript"}),n=URL.createObjectURL(t);try{return await import(n)}finally{URL.revokeObjectURL(n)}}function xY(e){return uct(lct(e))}var eb=B(V(),1),fCe=B(wo(),1);var Gx=B(V(),1);var br=B(V(),1);function sp(e){if(!e?.isConnected)return!1;let t=e;for(;t;){if(t.hasAttribute("hidden")||t.hasAttribute("inert")||t.getAttribute("aria-hidden")==="true")return!1;let n=t.ownerDocument.defaultView?.getComputedStyle(t);if(n?.display==="none"||n?.visibility==="hidden")return!1;let r=t.getRootNode();t=t.parentElement??("host"in r?r.host:null)}return!0}var Lr=B(ae(),1),n6={app:0,route:100,collection:200,detail:300,modal:400},kY=Symbol.for("notis.sdk.shortcut_context");function dct(){let e=globalThis;return e[kY]||(e[kY]=(0,br.createContext)(null)),e[kY]}var CY=dct(),SY=Symbol.for("notis.sdk.shortcut_collection_state");function r6(){let e=globalThis;return e[SY]||(e[SY]={activeOwnerId:null,nextOwnerId:1}),e[SY]}function bSe(){let e=r6();return`collection-${e.nextOwnerId++}`}function EY(e){let t=r6();t.activeOwnerId===e&&(t.activeOwnerId=null)}function vT(e){r6().activeOwnerId=e}function vSe(e){let t=e.trim().toLowerCase();return t==="esc"?"escape":t==="return"?"enter":t==="space"?" ":t==="arrowup"||t==="up"?"arrowup":t==="arrowdown"||t==="down"?"arrowdown":t==="arrowleft"||t==="left"?"arrowleft":t==="arrowright"||t==="right"?"arrowright":t}function fct(e){let t=e.split("+").map(a=>a.trim()).filter(Boolean);if(t.length===0)return null;let n="",r=!1,i=!1,o=!1;for(let a of t){let s=a.toLowerCase();s==="mod"||s==="cmd"||s==="ctrl"||s==="meta"?r=!0:s==="shift"?i=!0:s==="alt"||s==="option"?o=!0:n=vSe(a)}return n?{key:n,mod:r,shift:i,alt:o}:null}function _Y(e){return(Array.isArray(e.keys)?e.keys:[e.keys]).flatMap(n=>{let r=n.trim().split(/\s+/).map(fct).filter(i=>i!==null);return r.length>0?[{definition:e,sequence:r}]:[]})}function bT(e){return`${e.mod?"m":"-"}${e.shift?"s":"-"}${e.alt?"a":"-"}:${e.key}`}function ySe(e){let t=vSe(e.key),n=e.shiftKey;return t==="3"&&n&&(t="#"),(t==="#"||t==="?")&&(n=!1),{key:t,mod:!!(e.metaKey||e.ctrlKey),shift:n,alt:e.altKey}}function i6(e){return(e.composedPath?.()??[e.target]).some(n=>{if(!(n instanceof HTMLElement))return!1;if(n.isContentEditable||n.getAttribute("contenteditable")==="true")return!0;let r=n.tagName;return r==="INPUT"||r==="TEXTAREA"||r==="SELECT"||r==="BUTTON"||r==="SUMMARY"||r==="A"&&n.hasAttribute("href")?!0:["button","link","menuitem","separator","switch","tab"].includes(n.getAttribute("role")||"")})}function pct(e,t){return e.length>t.sequence.length?!1:e.every((n,r)=>n===bT(t.sequence[r]))}function wSe(e,t){t.preventDefault!==!1&&e.preventDefault(),t.stopPropagation!==!1&&(e.stopPropagation(),e.stopImmediatePropagation?.()),t.onTrigger(e)}function xSe(e,t,n){if(n.key!=="Escape"||e.id!=="collection.clear")return!1;let r=kSe(t).filter(i=>sp(i));return r.length>0&&!r.some(i=>i.getAttribute("aria-selected")==="true")}function kSe(e){let t=Array.from(e.querySelectorAll("[data-notis-collection-item-id], [data-notis-row-id]"));for(let n of Array.from(e.querySelectorAll("*")))n.shadowRoot&&t.push(...kSe(n.shadowRoot));return t}function SSe(e){return e.composedPath().some(t=>t instanceof HTMLElement&&t.matches("dialog.notis-dialog[open]"))}function CSe({children:e,isAvailable:t}){return(0,br.useContext)(CY)?(0,Lr.jsx)(Lr.Fragment,{children:e}):(0,Lr.jsx)(yct,{isAvailable:t,children:e})}var fSe={modal:"Dialog",detail:"Detail",collection:"Collection",route:"This view",app:"App"},mct=["modal","detail","collection","route","app"];function TY(e){let t=Array.from(e).filter(i=>i.enabled&&i.isAvailable?.()!==!1).sort((i,o)=>o.priority-i.priority||o.order-i.order),n=r6().activeOwnerId;return!!(n&&t.some(i=>i.collectionOwnerId===n))?t.filter(i=>!i.collectionOwnerId||i.collectionOwnerId===n):t}var hct=Symbol.for("notis.sdk.fallback_shortcut_registries");function gct(e){let t=globalThis,n=t[hct]??=new WeakMap,r=document,i=n.get(r);if(!i){let a=new Map;i={registrations:a,nextId:1,dispatch:s=>{if(s.defaultPrevented||SSe(s))return;let l=i6(s),c=bT(ySe(s));for(let u of TY(a.values()))for(let d of u.getShortcuts()){if(d.enabled===!1||l&&!d.allowInEditable||s.repeat&&!d.allowRepeat||xSe(d,r,s))continue;if(_Y(d).some(p=>p.sequence.length===1&&bT(p.sequence[0])===c)){wSe(s,d);return}}}},n.set(r,i),r.addEventListener("keydown",i.dispatch,!0)}let o=i.nextId++;return i.registrations.set(o,{...e,id:o,order:o}),()=>{i.registrations.delete(o),i.registrations.size===0&&(r.removeEventListener("keydown",i.dispatch,!0),n.delete(r))}}function bct(e){let n=_Y({id:"",keys:e,onTrigger:()=>{}})[0];return n?n.sequence.map(bT).join(" "):null}function vct(e){let t=new Set,n=[];for(let r of TY(e))for(let i of r.getShortcuts()){if(i.enabled===!1||!i.label)continue;let a=(Array.isArray(i.keys)?i.keys:[i.keys]).filter(s=>{let l=bct(s);return!l||t.has(l)?!1:(t.add(l),!0)});a.length>0&&n.push({id:i.id,keys:a,label:i.label,scope:r.scope})}return n}function yct({children:e,isAvailable:t}){let n=(0,br.useRef)(new Map),r=(0,br.useRef)(1),i=(0,br.useRef)(1),o=(0,br.useRef)({chords:[],at:0}),[a,s]=(0,br.useState)(!1),l=(0,br.useRef)(!1),[,c]=(0,br.useState)(0),u=(0,br.useRef)(t),d=(0,br.useCallback)(h=>{l.current=h,s(h)},[]);(0,br.useLayoutEffect)(()=>{u.current=t,t?.()===!1&&(o.current={chords:[],at:0},d(!1))},[t,d]);let f=(0,br.useCallback)(h=>{let g=r.current++;return n.current.set(g,{...h,id:g,order:i.current++}),l.current&&c(b=>b+1),()=>{n.current.delete(g),l.current&&c(b=>b+1)}},[]);(0,br.useEffect)(()=>{let h=g=>{if(u.current?.()===!1){o.current={chords:[],at:0};return}if(g.defaultPrevented||SSe(g))return;let b=i6(g);if(!b&&!g.repeat&&g.key==="?"&&!g.metaKey&&!g.ctrlKey&&!g.altKey){g.preventDefault(),g.stopPropagation(),g.stopImmediatePropagation?.(),d(!l.current);return}if(l.current){g.key==="Escape"&&(g.preventDefault(),g.stopPropagation(),g.stopImmediatePropagation?.(),d(!1));return}let v=TY(n.current.values());if(v.length===0)return;let y=bT(ySe(g)),w=Date.now();for(let k of v){let x=k.getShortcuts().filter(R=>R.enabled!==!1).filter(R=>!b||R.allowInEditable).filter(R=>!g.repeat||R.allowRepeat).filter(R=>!xSe(R,document,g)).flatMap(_Y);if(x.length===0)continue;let S=w-o.current.at<=k.sequenceTimeoutMs?o.current.chords:[],T=S.length>0?[[...S,y],[y]]:[[y]];for(let R of T){let C=x.filter(D=>pct(R,D));if(C.length===0)continue;let M=C.find(D=>D.sequence.length===R.length),E=C.some(D=>D.sequence.length>R.length);if(M&&!E){o.current={chords:[],at:0},wSe(g,M.definition);return}o.current={chords:R,at:w},g.preventDefault();return}}o.current={chords:[],at:0}};return document.addEventListener("keydown",h,!0),()=>document.removeEventListener("keydown",h,!0)},[d]);let p=(0,br.useMemo)(()=>({register:f}),[f]),m=a?vct(n.current.values()):[];return(0,Lr.jsxs)(CY.Provider,{value:p,children:[e,a?(0,Lr.jsx)(wct,{entries:m,onClose:()=>d(!1)}):null]})}function wct({entries:e,onClose:t}){let n=(0,br.useRef)(null),r=(0,br.useRef)(typeof document<"u"&&document.activeElement instanceof HTMLElement?document.activeElement:null);(0,br.useEffect)(()=>(n.current?.focus({preventScroll:!0}),()=>r.current?.focus({preventScroll:!0})),[]);let i=mct.map(o=>({scope:o,entries:e.filter(a=>a.scope===o)})).filter(o=>o.entries.length>0);return(0,Lr.jsx)("div",{role:"presentation","data-notis-shortcut-help-backdrop":"",onMouseDown:o=>{o.target===o.currentTarget&&t()},style:xct,children:(0,Lr.jsxs)("section",{role:"dialog","aria-modal":"true","aria-labelledby":"notis-shortcut-help-title","data-notis-shortcut-help":"",onKeyDown:o=>{o.key==="Tab"&&(o.preventDefault(),n.current?.focus({preventScroll:!0}))},style:kct,children:[(0,Lr.jsxs)("header",{style:Sct,children:[(0,Lr.jsxs)("div",{children:[(0,Lr.jsx)("h2",{id:"notis-shortcut-help-title",style:Cct,children:"Keyboard shortcuts"}),(0,Lr.jsx)("p",{style:Ect,children:"Available in this view"})]}),(0,Lr.jsx)("button",{ref:n,type:"button","aria-label":"Close keyboard shortcuts",onClick:t,style:_ct,children:"Esc"})]}),(0,Lr.jsxs)("div",{style:Tct,children:[i.map(o=>(0,Lr.jsxs)("section",{"aria-label":fSe[o.scope],children:[(0,Lr.jsx)("h3",{style:pSe,children:fSe[o.scope]}),(0,Lr.jsx)("div",{style:mSe,children:o.entries.map(a=>(0,Lr.jsxs)("div",{style:hSe,children:[(0,Lr.jsx)("span",{children:a.label}),(0,Lr.jsx)("span",{style:Act,children:a.keys.map(s=>(0,Lr.jsx)("kbd",{style:gSe,children:Oy(s)},s))})]},`${o.scope}:${a.id}`))})]},o.scope)),(0,Lr.jsxs)("section",{"aria-label":"Help",children:[(0,Lr.jsx)("h3",{style:pSe,children:"Help"}),(0,Lr.jsx)("div",{style:mSe,children:(0,Lr.jsxs)("div",{style:hSe,children:[(0,Lr.jsx)("span",{children:"Show keyboard shortcuts"}),(0,Lr.jsx)("kbd",{style:gSe,children:"?"})]})})]})]})]})})}var xct={position:"fixed",inset:0,zIndex:1e3,display:"grid",placeItems:"center",padding:"1.5rem",background:"rgba(0, 0, 0, 0.42)",backdropFilter:"blur(3px)"},kct={width:"min(34rem, 100%)",maxHeight:"min(42rem, calc(100dvh - 3rem))",overflow:"hidden",border:"1px solid hsl(var(--border))",borderRadius:"0.875rem",background:"hsl(var(--background))",color:"hsl(var(--foreground))",boxShadow:"0 24px 70px rgba(0, 0, 0, 0.28)",fontFamily:"inherit"},Sct={display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:"1rem",padding:"1.25rem 1.25rem 1rem",borderBottom:"1px solid hsl(var(--border))"},Cct={margin:0,fontSize:"1rem",fontWeight:650},Ect={margin:"0.2rem 0 0",color:"hsl(var(--muted-foreground))",fontSize:"0.75rem"},_ct={border:"1px solid hsl(var(--border))",borderRadius:"0.35rem",background:"hsl(var(--muted))",color:"hsl(var(--muted-foreground))",padding:"0.2rem 0.45rem",cursor:"pointer",font:"inherit",fontSize:"0.7rem"},Tct={display:"grid",gap:"1.1rem",maxHeight:"calc(min(42rem, 100dvh - 3rem) - 5rem)",overflowY:"auto",padding:"1rem 1.25rem 1.25rem"},pSe={margin:"0 0 0.35rem",color:"hsl(var(--muted-foreground))",fontSize:"0.68rem",fontWeight:650,letterSpacing:"0.06em",textTransform:"uppercase"},mSe={display:"grid"},hSe={display:"flex",minHeight:"2rem",alignItems:"center",justifyContent:"space-between",gap:"1rem",borderBottom:"1px solid color-mix(in srgb, hsl(var(--border)) 65%, transparent)",fontSize:"0.8rem"},Act={display:"inline-flex",flexWrap:"wrap",justifyContent:"flex-end",gap:"0.3rem"},gSe={minWidth:"1.6rem",border:"1px solid hsl(var(--border))",borderBottomWidth:"2px",borderRadius:"0.35rem",background:"hsl(var(--muted))",color:"hsl(var(--foreground))",padding:"0.15rem 0.4rem",textAlign:"center",font:"inherit",fontSize:"0.72rem"};function Ry(e,t={}){let n=(0,br.useContext)(CY),r=(0,br.useRef)(e);r.current=e;let{enabled:i=!0,scope:o="route",priority:a=0,sequenceTimeoutMs:s=1500,collectionOwnerId:l,isAvailable:c}=t,u=(0,br.useRef)(c);u.current=c,(0,br.useEffect)(()=>{if(!(!n||!i))return n.register({enabled:i,scope:o,priority:n6[o]+a,sequenceTimeoutMs:s,collectionOwnerId:l,isAvailable:()=>u.current?.()!==!1,getShortcuts:()=>u.current?.()===!1?[]:r.current})},[l,i,a,n,o,s]),(0,br.useEffect)(()=>{if(!(n||!i))return gct({enabled:i,scope:o,priority:n6[o]+a,sequenceTimeoutMs:s,collectionOwnerId:l,isAvailable:()=>u.current?.()!==!1,getShortcuts:()=>r.current})},[l,i,a,n,o,s])}function Oy(e){return e.trim().split(/\s+/).map(t=>t.split("+").map(n=>{let r=n.toLowerCase();return r==="mod"||r==="cmd"||r==="meta"?"\u2318":r==="ctrl"?"\u2303":r==="shift"?"\u21E7":r==="alt"||r==="option"?"\u2325":r==="arrowup"||r==="up"?"\u2191":r==="arrowdown"||r==="down"?"\u2193":r==="arrowleft"||r==="left"?"\u2190":r==="arrowright"||r==="right"?"\u2192":n.length===1?n.toUpperCase():n}).join("")).join(" ")}var AY={en:{bindingUnavailable:"This Space cannot read this database yet.",actionUnavailable:"This action is unavailable in this Space.",readUnavailable:"These data cannot be read in this Space.",schemaChanged:"This database changed. Refresh the page and try again.",responseIncomplete:"This database could not be loaded. Refresh the page and try again.",listUnavailable:"This list is unavailable in this view.",timedOut:"This read took too long. Please retry.",scopeUnavailable:"App query scope is no longer available.",scopeCleared:"App query scope was cleared."},fr:{bindingUnavailable:"Ce Space ne peut pas encore lire cette base de donn\xE9es.",actionUnavailable:"Cette action n\u2019est pas disponible dans ce Space.",readUnavailable:"Ces donn\xE9es ne sont pas accessibles dans ce Space.",schemaChanged:"Cette base de donn\xE9es a chang\xE9. Actualise la page et r\xE9essaie.",responseIncomplete:"Cette base de donn\xE9es n\u2019a pas pu \xEAtre charg\xE9e. Actualise la page et r\xE9essaie.",listUnavailable:"Cette liste n\u2019est pas disponible dans cette vue.",timedOut:"Cette lecture a pris trop de temps. R\xE9essaie.",scopeUnavailable:"Les donn\xE9es de cette vue ne sont plus accessibles.",scopeCleared:"Les donn\xE9es de cette vue ont \xE9t\xE9 r\xE9initialis\xE9es."}},MY="notis_sdk_query:",Ya=class extends Error{code;diagnostic;constructor(t,n,r,i){super(AY[r==="fr"?"fr":"en"][t],i?{cause:i}:void 0),this.name="SdkQueryError",this.code=MY+t,this.diagnostic=n}};function RY(e,t){let n=e;if(!n||typeof n.code!="string"||!n.code.startsWith(MY))return e;let r=n.code.slice(MY.length);if(!Object.hasOwn(AY.en,r))return e;let i=AY[t==="fr"?"fr":"en"][r];return n.message===i?e:new Ya(r,typeof n.diagnostic=="string"?n.diagnostic:void 0,t,n)}var Kx=Object.freeze({list_databases:"databases",get_database:"databases",query_database:"databases",list_skills:"skills",get_skill:"skills"}),OY=Object.freeze({facts:"read",run:"shell",upload:"shell"});function PY(e,t){let n=OY[t];return e==="shell"||e==="read"&&n==="read"}var ESe=2;var qx=class extends Error{constructor(n,r,i,o,a,s){super(n);this.requestId=r;this.receiptId=i;this.status=o;this.pendingRequestIds=a;this.code=s;this.name="SpaceActionError"}requestId;receiptId;status;pendingRequestIds;code};var o6=class extends Error{code="space_navigation_cancelled";constructor(t="This navigation is no longer active."){super(t),this.name="SpaceNavigationCancelled"}};function _Se(e){return e instanceof Error&&e.name==="SpaceNavigationCancelled"&&e.code==="space_navigation_cancelled"}function qm(e,t){if(e?.resource?.kind!=="space")return t;let n=e.space;if(!n?.cacheScope||n.id!==e.resource.id||n.revision!==e.resource.revision)throw new Error("The host must provide this Space revision and access context.");return["space",n.id,n.revision,n.cacheScope,...t]}function TSe(e,t){if(e?.resource?.kind!=="space")return e;qm(e,[]);let n=(u,d)=>{let f=d?new Ya(d,u,e.context?.locale):new Error(u);return t?.(f),f},r=async()=>{throw n("Use a declared Space action; account-wide tool and backend calls are unavailable.")},i=e.callAction;if(!i)throw new Error("This host needs the current Space action protocol.");let o=e.viewerRead,a=e.shown,s=e.spaceCloudComputer,l=e.space.cloudComputer,c=u=>{if(!s||!PY(l,u))throw n(u==="facts"?"This Space does not use the cloud computer.":"This Space does not declare cloudComputer: shell.");return s};return Object.freeze({...e,callTool:r,request:r,listTools:r,shown:a?async function(d,f={},p={}){let m=e.space.shows&&Object.hasOwn(e.space.shows,d)?e.space.shows[d]:null;if(!m||!("database"in m))throw n("This view does not declare that list with a filter.","listUnavailable");return a(d,f,p)}:void 0,handover:void 0,cloudComputerFacts:s&&l?async u=>c("facts").facts(u):void 0,spaceCloudComputer:s&&l?Object.freeze({status:()=>s.status(),requestApproval:()=>s.requestApproval(),facts:async u=>c("facts").facts(u),run:async u=>c("run").run(u),upload:async u=>c("upload").upload(u)}):void 0,viewerRead:o?async function(d,f={}){let p=Object.hasOwn(Kx,d)?Kx[d]:null;if(!p)throw n("Viewer reads never change data. Choose a supported read.","readUnavailable");if(!e.space.viewerReads?.includes(p))throw n(`This Space does not declare viewer reads of ${p}.`,"readUnavailable");return o(d,f)}:void 0,async callAction(u,d={},f={}){let p=Object.hasOwn(e.space.actions,u)?e.space.actions[u]:null;if(!p)throw n("This action is not declared by the published Space.",f.readOnly||f.dedupe?"actionUnavailable":void 0);if((f.readOnly||f.dedupe)&&!p.readOnly)throw n("A write action cannot run as a cached read.","readUnavailable");return i(u,d,f)}})}var IY=B(ae(),1),DY=Symbol.for("notis.sdk.runtime_context");function Mct(){let e=globalThis;return e[DY]||(e[DY]=(0,Gx.createContext)(null)),e[DY]}var ASe=Mct();function a6({children:e,runtime:t,onProtocolError:n,shortcutsAvailable:r}){let i=(0,Gx.useMemo)(()=>TSe(t,n),[t,n]);if(t===void 0)throw new Error("NotisProvider requires an explicit runtime prop.");return(0,IY.jsx)(ASe.Provider,{value:i,children:(0,IY.jsx)(CSe,{isAvailable:r,children:e})})}function Fe(){return(0,Gx.useContext)(ASe)}var AT=B(V(),1);var Vi=B(V(),1);var yT=Object.freeze({app:0,route:100,collection:200,detail:300,modal:400}),aXt=Object.freeze(["app","route","collection","detail","modal"]);function s6(e){return!!e&&typeof e=="object"&&typeof e.en=="string"&&typeof e.fr=="string"}function pt(e,t){return typeof e=="string"?e:t==="fr"?e.fr:e.en}function MSe(e,t){return e.replace(/\{(\w+)\}/g,(n,r)=>Object.prototype.hasOwnProperty.call(t,r)?String(t[r]):n)}function lr(e,t){return{en:MSe(e.en,t),fr:MSe(e.fr,t)}}function ee(e,t){return{en:e,fr:t}}var Py="\u202F";function RSe(e,t,n){return n==="fr"?`${e}${Py}: ${t}`:`${e}: ${t}`}var OSe={esc:"escape",return:"enter",up:"arrowup",down:"arrowdown",left:"arrowleft",right:"arrowright",del:"delete",spacebar:"space"," ":"space",plus:"+",pgup:"pageup",pgdn:"pagedown"},Rct={mod:"mod",cmd:"mod",command:"mod",meta:"mod",ctrl:"ctrl",control:"ctrl",alt:"alt",option:"alt",opt:"alt",shift:"shift"},Oct=new Set(["escape","enter","tab","space","backspace","delete","insert","arrowup","arrowdown","arrowleft","arrowright","home","end","pageup","pagedown","f1","f2","f3","f4","f5","f6","f7","f8","f9","f10","f11","f12"]),Pct={"/":{code:"Slash",shift:!1},"?":{code:"Slash",shift:!0},"[":{code:"BracketLeft",shift:!1},"{":{code:"BracketLeft",shift:!0},"]":{code:"BracketRight",shift:!1},"}":{code:"BracketRight",shift:!0},",":{code:"Comma",shift:!1},"<":{code:"Comma",shift:!0},".":{code:"Period",shift:!1},">":{code:"Period",shift:!0},";":{code:"Semicolon",shift:!1},":":{code:"Semicolon",shift:!0},"'":{code:"Quote",shift:!1},'"':{code:"Quote",shift:!0},"`":{code:"Backquote",shift:!1},"~":{code:"Backquote",shift:!0},"-":{code:"Minus",shift:!1},_:{code:"Minus",shift:!0},"=":{code:"Equal",shift:!1},"+":{code:"Equal",shift:!0},"\\":{code:"Backslash",shift:!1},"|":{code:"Backslash",shift:!0},"!":{code:"Digit1",shift:!0},"@":{code:"Digit2",shift:!0},"#":{code:"Digit3",shift:!0},$:{code:"Digit4",shift:!0},"%":{code:"Digit5",shift:!0},"^":{code:"Digit6",shift:!0},"&":{code:"Digit7",shift:!0},"*":{code:"Digit8",shift:!0},"(":{code:"Digit9",shift:!0},")":{code:"Digit0",shift:!0}},Dct={escape:["Escape"],enter:["Enter","NumpadEnter"],tab:["Tab"],space:["Space"],backspace:["Backspace"],delete:["Delete"],insert:["Insert"],arrowup:["ArrowUp"],arrowdown:["ArrowDown"],arrowleft:["ArrowLeft"],arrowright:["ArrowRight"],home:["Home"],end:["End"],pageup:["PageUp"],pagedown:["PageDown"]};function NY(e){return/^[a-z]$/.test(e)}function LY(e){return/^[0-9]$/.test(e)}function NSe(e){return e.length===1&&!NY(e)&&!LY(e)}function Ict(e){if(e.length===1){let n=e.toLowerCase();return OSe[e]??n}let t=e.toLowerCase();return OSe[t]??t}var Yx=class extends Error{constructor(t,n){super(`Invalid key spec "${t}": ${n}`),this.name="KeySpecError"}};function Nct(e,t){let n={key:"",mod:!1,ctrl:!1,alt:!1,shift:!1},r;e==="+"?r=["+"]:e.endsWith("++")?r=[...e.slice(0,-2).split("+"),"+"]:r=e.split("+");let i=r.pop()??"";if(!i)throw new Yx(t,"missing key");for(let a of r){let s=Rct[a.toLowerCase()];if(!s)throw new Yx(t,`unknown modifier "${a}"`);n[s]=!0}let o=Ict(i);if(o.length!==1&&!Oct.has(o))throw new Yx(t,`unknown key "${i}"`);return n.key=o,NSe(o)&&!n.alt&&(n.shift=!1),n}var PSe=new Map;function ql(e){let t=PSe.get(e);if(t)return t;let n=e.trim();if(!n)throw new Yx(e,"empty");let i=(n==="+"?["+"]:n.split(/\s+/)).map(o=>Nct(o,e));return PSe.set(e,i),i}function LSe(e){try{return ql(e),!0}catch{return!1}}function BSe(e){return ql(e).length>1}function cr(e){return e==null?[]:typeof e=="string"?[e]:[...e]}function Lct(e,t){let n=e.mod||t==="other"&&e.ctrl,r=t==="mac"&&e.ctrl,i=[];return n&&i.push("mod"),r&&i.push("ctrl"),e.alt&&i.push("alt"),e.shift&&i.push("shift"),i.push(e.key),i.join("+")}function Ss(e,t="mac"){return ql(e).map(n=>Lct(n,t)).join(" ")}function Bct(e){let{key:t}=e;if(NY(t))return{codes:[`Key${t.toUpperCase()}`],shift:null};if(LY(t))return{codes:[`Digit${t}`,`Numpad${t}`],shift:null};let n=Dct[t];if(n)return{codes:[...n],shift:null};let r=Pct[t];return r?{codes:[r.code],shift:r.shift}:{codes:[],shift:null}}function zct(e){return e===" "||e==="Spacebar"?"space":e==="Esc"?"escape":e==="Up"||e==="Down"||e==="Left"||e==="Right"?`arrow${e.toLowerCase()}`:e==="Del"?"delete":(e.length===1,e.toLowerCase())}function Dy(e,t,n){let r=!!e.metaKey,i=!!e.ctrlKey,o=!!e.altKey,a=!!e.shiftKey,s=n==="mac"?t.mod:!1,l=n==="mac"?t.ctrl:t.mod||t.ctrl;if(t.alt){if(!o||r!==s||i!==l)return!1;let{codes:u,shift:d}=Bct(t);if(!e.code||!u.includes(e.code))return!1;let f=d??t.shift;return a===f}let c=zct(e.key??"");return NSe(t.key)?c!==t.key||r!==s?!1:n==="other"?l?i:!i||o:i===l:o||r!==s||i!==l?!1:NY(t.key)?a!==t.shift?!1:c===t.key?!0:c.length===1&&/\p{L}/u.test(c)&&!/^[a-z]$/.test(c)&&e.code===`Key${t.key.toUpperCase()}`:LY(t.key)?c===t.key:c===t.key&&a===t.shift}function BY(e,t,n,r=!1){let i;try{i=ql(t)}catch{return!1}return i.length>1&&!r?!1:Dy(e,i[0],n)}function zSe(e){return e==="Shift"||e==="Control"||e==="Alt"||e==="Meta"||e==="AltGraph"||e==="CapsLock"||e==="OS"||e==="Fn"||e==="Hyper"||e==="Super"}var DSe=Object.freeze(["/","c","shift+c","shift+tab","mod+s","mod+d","alt+p","alt+s","?","escape","mod+k"]),ISe={mac:new Set(DSe.map(e=>Ss(e,"mac"))),other:new Set(DSe.map(e=>Ss(e,"other")))};function FSe(e){for(let t of["mac","other"]){let n=Ss(e,t),r=n.split(" ")[0];if(ISe[t].has(n)||ISe[t].has(r))return!0}return!1}var Iy=Object.freeze({then:{en:"then",fr:"puis"},or:{en:"or",fr:"ou"}}),Fct={ctrl:"\u2303",alt:"\u2325",shift:"\u21E7",mod:"\u2318"};function zY(e,t,n){switch(e){case"enter":return t?"\u21B5":n?"Entr\xE9e":"Enter";case"escape":return n?"\xC9chap":"Esc";case"space":return n?"Espace":"Space";case"arrowdown":return"\u2193";case"arrowup":return"\u2191";case"arrowleft":return"\u2190";case"arrowright":return"\u2192";case"tab":return"Tab";case"backspace":return t?"\u232B":n?"Retour arri\xE8re":"Backspace";case"delete":return t?"\u2326":n?"Suppr":"Delete";case"insert":return n?"Inser":"Insert";case"home":return n?"D\xE9but":"Home";case"end":return n?"Fin":"End";case"pagedown":return n?"Pg suiv":"PgDn";case"pageup":return n?"Pg pr\xE9c":"PgUp";default:return e.length===1?e.toUpperCase():e[0].toUpperCase()+e.slice(1)}}function Hct(e,{platform:t,locale:n}){let r=t==="mac",i=n==="fr";if(r)return["ctrl","alt","shift","mod"].filter(s=>e[s]).map(s=>Fct[s]).join("")+zY(e.key,r,i);let o=[];return(e.mod||e.ctrl)&&o.push("Ctrl"),e.alt&&o.push("Alt"),e.shift&&o.push(i?"Maj":"Shift"),[...o,zY(e.key,r,i)].join("+")}function FY(e,t){return cr(e).map(n=>ql(n).map(r=>Hct(r,t)))}function HSe(e,t){let n=` ${Iy.then[t.locale]} `,r=` ${Iy.or[t.locale]} `;return FY(e,t).map(i=>i.join(n)).join(r)}var jct={escape:"Escape",enter:"Enter",tab:"Tab",space:"Space",backspace:"Backspace",delete:"Delete",insert:"Insert",arrowup:"ArrowUp",arrowdown:"ArrowDown",arrowleft:"ArrowLeft",arrowright:"ArrowRight",home:"Home",end:"End",pageup:"PageUp",pagedown:"PageDown"};function jSe(e,t){return cr(e).map(n=>ql(n)).filter(n=>n.length===1).map(([n])=>{let r=[];n.mod&&r.push(t==="mac"?"Meta":"Control"),n.ctrl&&!(n.mod&&t!=="mac")&&r.push("Control"),n.alt&&r.push("Alt"),n.shift&&r.push("Shift");let i=n.key;return r.push(jct[i]??(i.length===1?i.toUpperCase():i[0].toUpperCase()+i.slice(1))),r.join("+")}).join(" ")}var Vct=Object.freeze({enter:{en:"Enter",fr:"Entr\xE9e"},escape:{en:"Escape",fr:"\xC9chap"},space:{en:"Space",fr:"Espace"},arrowdown:{en:"Down arrow",fr:"Fl\xE8che bas"},arrowup:{en:"Up arrow",fr:"Fl\xE8che haut"},arrowleft:{en:"Left arrow",fr:"Fl\xE8che gauche"},arrowright:{en:"Right arrow",fr:"Fl\xE8che droite"},backspace:{en:"Backspace",fr:"Retour arri\xE8re"},delete:{en:"Delete",fr:"Suppr"},pagedown:{en:"Page down",fr:"Page suivante"},pageup:{en:"Page up",fr:"Page pr\xE9c\xE9dente"}}),l6=Object.freeze({ctrl:{en:"Control",fr:"Contr\xF4le"},alt:{mac:{en:"Option",fr:"Option"},other:{en:"Alt",fr:"Alt"}},shift:{en:"Shift",fr:"Maj"},mod:{mac:{en:"Command",fr:"Commande"},other:{en:"Control",fr:"Contr\xF4le"}}});function VSe(e,{platform:t,locale:n}){let r=` ${Iy.then[n]} `,i=` ${Iy.or[n]} `,o=a=>{let s=[];return a.ctrl&&!(a.mod&&t!=="mac")&&s.push(l6.ctrl[n]),a.alt&&s.push(l6.alt[t][n]),a.shift&&s.push(l6.shift[n]),a.mod&&s.push(l6.mod[t][n]),s.push(Vct[a.key]?.[n]??zY(a.key,!1,n==="fr")),s.join(" ")};return cr(e).map(a=>ql(a).map(o).join(r)).join(i)}function Xx(e){if(!e||typeof e!="object")return null;let{name:t,code:n,reason:r}=e;return t!=="ActionError"||n!=="notis_action_error"?null:typeof r=="string"||s6(r)?r:null}var wT=(e,t,n,r)=>({one:{en:e,fr:n},other:{en:t,fr:r}}),Wct=(e,t)=>({one:{en:e,fr:t},other:{en:e,fr:t}}),xT=Object.freeze({complete:{id:"complete",label:{en:"Complete",fr:"Terminer"},icon:"check",key:"e",tone:"default",toast:wT("1 item completed.","{n} items completed.","1 \xE9l\xE9ment termin\xE9.","{n} \xE9l\xE9ments termin\xE9s.")},archive:{id:"archive",label:{en:"Archive",fr:"Archiver"},icon:"archive",key:"e",tone:"default",toast:wT("1 item archived.","{n} items archived.","1 \xE9l\xE9ment archiv\xE9.","{n} \xE9l\xE9ments archiv\xE9s.")},unarchive:{id:"unarchive",label:{en:"Move to triage",fr:"D\xE9placer vers le tri"},icon:"tray-arrow-up",key:"shift+e",tone:"default",toast:wT("1 item restored.","{n} items restored.","1 \xE9l\xE9ment restaur\xE9.","{n} \xE9l\xE9ments restaur\xE9s.")},star:{id:"star",label:{en:"Star",fr:"Mettre en favori"},icon:"star",key:"s",tone:"default",toggle:"unstar",toast:wT("1 item starred.","{n} items starred.","1 \xE9l\xE9ment ajout\xE9 aux favoris.","{n} \xE9l\xE9ments ajout\xE9s aux favoris.")},unstar:{id:"unstar",label:{en:"Unstar",fr:"Retirer des favoris"},icon:"star",key:"s",tone:"default",toggle:"star",toast:null},later:{id:"later",label:{en:"Later",fr:"Plus tard"},icon:"clock",key:"h",tone:"default",toast:Wct("Snoozed until tomorrow.","Report\xE9 \xE0 demain.")},move:{id:"move",label:{en:"Move to\u2026",fr:"D\xE9placer vers\u2026"},icon:"arrow-bend-up-right",key:"m",tone:"default",toast:null,picker:!0},assign:{id:"assign",label:{en:"Assign\u2026",fr:"Attribuer\u2026"},icon:"user-plus",key:"a",tone:"default",toast:null,picker:!0},read:{id:"read",label:{en:"Mark as read",fr:"Marquer comme lu"},icon:"envelope-open",key:"u",tone:"default",toggle:"unread",toast:null},unread:{id:"unread",label:{en:"Mark as unread",fr:"Marquer comme non lu"},icon:"envelope-simple",key:"u",tone:"default",toggle:"read",toast:null},delete:{id:"delete",label:{en:"Delete",fr:"Supprimer"},icon:"trash",key:"#",tone:"danger",toast:wT("1 item deleted.","{n} items deleted.","1 \xE9l\xE9ment supprim\xE9.","{n} \xE9l\xE9ments supprim\xE9s.")},progress:{id:"progress",label:{en:"Start progress",fr:"Passer en cours"},icon:"circle-half",key:null,tone:"default",toast:null},pause:{id:"pause",label:{en:"Pause",fr:"Mettre en pause"},icon:"pause",key:null,tone:"default",toggle:"resume",toast:null},resume:{id:"resume",label:{en:"Resume",fr:"Reprendre"},icon:"play",key:null,tone:"default",toggle:"pause",toast:null},enable:{id:"enable",label:{en:"Enable",fr:"Activer"},icon:"toggle-right",key:null,tone:"default",toggle:"disable",toast:null},disable:{id:"disable",label:{en:"Disable",fr:"D\xE9sactiver"},icon:"toggle-left",key:null,tone:"default",toggle:"enable",toast:null},waiting:{id:"waiting",label:{en:"Waiting",fr:"En attente"},icon:"hourglass",key:"w",tone:"default",toast:null,managerOnly:!0}});function HY(e){return typeof e=="string"&&Object.prototype.hasOwnProperty.call(xT,e)}function $ct(e,t){let n=xT[e].toast;return n?lr(t===1?n.one:n.other,{n:t}):null}function $Se(e){if(typeof e=="string")return WSe(e);let t=Object.prototype.hasOwnProperty.call(e,"toast")&&!e.toast,n=HY(e.id)?{...WSe(e.id),...Uct(e)}:{...e};return t&&(n.toast=null),n}function Gl(e){return typeof e=="string"?{en:e,fr:e}:e}function WSe(e){let t=xT[e];return{id:e,label:t.label,icon:t.icon,key:t.key??void 0,tone:t.tone,toast:t.toast?n=>$ct(e,n):void 0,...t.toggle?{toggle:t.toggle}:{}}}function Uct(e){let t={};for(let[n,r]of Object.entries(e))r!==void 0&&(t[n]=r);return t}var En=Object.freeze({open:{en:"Open",fr:"Ouvrir"},back:{en:"Back",fr:"Retour"},close:{en:"Close",fr:"Fermer"},previous:{en:"Previous",fr:"Pr\xE9c\xE9dent"},next:{en:"Next",fr:"Suivant"},more:{en:"More",fr:"Plus"},clear:{en:"Clear",fr:"Effacer"},removeNamed:{en:"Remove {name}",fr:"Retirer {name}"},savingNamed:{en:"Saving {name}",fr:"Enregistrement de {name}"},clearSelection:{en:"Clear selection",fr:"Effacer la s\xE9lection"},undo:{en:"Undo",fr:"Annuler"},select:{en:"Select",fr:"S\xE9lectionner"},selectAll:{en:"Select all",fr:"Tout s\xE9lectionner"},extendSelection:{en:"Extend selection",fr:"\xC9tendre la s\xE9lection"},closeThenClear:{en:"Close, then clear selection",fr:"Fermer, puis effacer la s\xE9lection"},showShortcuts:{en:"Show shortcuts",fr:"Afficher les raccourcis"},search:{en:"Search",fr:"Rechercher"},tryAgain:{en:"Try again",fr:"R\xE9essayer"},selectedOne:{en:"1 selected",fr:"1 s\xE9lectionn\xE9"},selectedMany:{en:"{n} selected",fr:"{n} s\xE9lectionn\xE9s"},sidePeek:{en:"Side peek",fr:"Aper\xE7u lat\xE9ral"},centerPeek:{en:"Center peek",fr:"Aper\xE7u centr\xE9"},fullPage:{en:"Full page",fr:"Pleine page"},openAs:{en:"Open as",fr:"Ouvrir en"}});function USe(e){return e===1?En.selectedOne:lr(En.selectedMany,{n:e})}var Ny=Object.freeze({title:{en:"Keyboard shortcuts",fr:"Raccourcis clavier"},groupSpace:{en:"This Space",fr:"Ce Space"},groupNotis:{en:"Notis",fr:"Notis"},close:{en:"Close",fr:"Fermer"},empty:{en:"No shortcuts here.",fr:"Aucun raccourci ici."}});var oi=(e,t,n,r,i,o={})=>Object.freeze({id:e,keys:Object.freeze(t),scope:n,label:Object.freeze({en:r,fr:i}),...o}),Xa=Object.freeze({"list.next":oi("list.next",["j","arrowdown"],"collection","Next item","\xC9l\xE9ment suivant",{repeat:!0}),"list.prev":oi("list.prev",["k","arrowup"],"collection","Previous item","\xC9l\xE9ment pr\xE9c\xE9dent",{repeat:!0}),"list.extendDown":oi("list.extendDown",["shift+j","shift+arrowdown"],"collection","Extend selection down","\xC9tendre la s\xE9lection vers le bas",{repeat:!0}),"list.extendUp":oi("list.extendUp",["shift+k","shift+arrowup"],"collection","Extend selection up","\xC9tendre la s\xE9lection vers le haut",{repeat:!0}),"list.open":oi("list.open",["enter","o"],"collection","Open","Ouvrir"),"list.toggleSelect":oi("list.toggleSelect",["x"],"collection","Select","S\xE9lectionner"),"list.selectAll":oi("list.selectAll",["mod+a"],"collection","Select all","Tout s\xE9lectionner"),"period.prev":oi("period.prev",["["],"collection","Previous period","P\xE9riode pr\xE9c\xE9dente"),"period.next":oi("period.next",["]"],"collection","Next period","P\xE9riode suivante"),"period.today":oi("period.today",["t"],"collection","Today","Aujourd\u2019hui"),undo:oi("undo",["z","mod+z"],"route","Undo","Annuler"),"view.prev":oi("view.prev",["["],"route","Previous view","Vue pr\xE9c\xE9dente"),"view.next":oi("view.next",["]"],"route","Next view","Vue suivante"),"host.help":oi("host.help",["?"],"app","Show keyboard shortcuts","Afficher les raccourcis clavier",{host:!0}),"host.escape":oi("host.escape",["escape"],"app","Close, then go back","Fermer, puis revenir",{host:!0}),"host.search":oi("host.search",["/"],"app","Search","Rechercher",{host:!0}),"host.newChat":oi("host.newChat",["c"],"app","New conversation","Nouvelle conversation",{host:!0}),"host.call":oi("host.call",["shift+c"],"app","Open voice call","Ouvrir l\u2019appel vocal",{host:!0}),"host.toggleSidebar":oi("host.toggleSidebar",["mod+s"],"app","Toggle sidebar","Afficher ou masquer la barre lat\xE9rale",{host:!0}),"host.voiceMessage":oi("host.voiceMessage",["mod+d"],"app","Voice message","Message vocal",{host:!0}),"host.modelMenu":oi("host.modelMenu",["alt+p"],"app","Model menu","Menu du mod\xE8le",{host:!0}),"host.speedMenu":oi("host.speedMenu",["alt+s"],"app","Speed menu","Menu de vitesse",{host:!0}),"host.toggleVoiceCall":oi("host.toggleVoiceCall",["shift+tab"],"app","Toggle voice call in panel","Afficher ou masquer l\u2019appel vocal dans le panneau",{host:!0}),"host.commandMenu":oi("host.commandMenu",["mod+k"],"app","Command menu","Menu des commandes",{host:!0}),"host.goInbox":oi("host.goInbox",["g i"],"app","Go to Inbox","Aller \xE0 l\u2019Inbox",{host:!0,managerOnly:!0}),"host.goStarred":oi("host.goStarred",["g s"],"app","Go to Starred","Aller aux Favoris",{host:!0,managerOnly:!0}),"host.goDone":oi("host.goDone",["g d"],"app","Go to Done","Aller \xE0 Termin\xE9",{host:!0,managerOnly:!0})});var Kct=["mac","other"];function jY(e){let t=new Map;for(let n of cr(e))for(let r of Kct)t.set(`${r}:${Ss(n,r)}`,Ss(n,"mac"));return t}function Jg(e){return e.owner??"notis"}function qct(e){return e.ownerKind?e.ownerKind:Jg(e)==="notis"?"host":"space"}function c6(e){let t=[],n=qct(e)==="space";for(let r of cr(e.keys)){try{ql(r)}catch(i){t.push({kind:"invalid",severity:"error",key:r,ids:[e.id],scope:e.scope,owner:Jg(e),message:i.message});continue}n&&FSe(r)&&t.push({kind:"reserved",severity:"error",key:Ss(r),ids:[e.id],scope:e.scope,owner:Jg(e),message:`"${e.id}" uses ${Ss(r)}, which Notis keeps for itself. Pick another key.`})}return n&&e.scope==="app"&&t.push({kind:"app-scope",severity:"error",key:cr(e.keys).join(", "),ids:[e.id],scope:"app",owner:Jg(e),message:`"${e.id}" registers at app scope, which only Notis uses. Use route or a lower scope.`}),t}function KSe(e){try{return jY(e)}catch{return new Map}}function qSe(e,t){if(e.available===!1||t.available===!1)return[];let n=KSe(e.keys),r=KSe(t.keys),i=new Set;for(let[s,l]of r)n.has(s)&&i.add(l);let o=[],a=Jg(e)===Jg(t);for(let s of i)if(e.scope===t.scope&&a)o.push({kind:"duplicate",severity:"error",key:s,ids:[e.id,t.id],scope:t.scope,owner:Jg(t),message:`NotisKeyClash: "${e.id}" and "${t.id}" both use ${s} in the ${t.scope} scope.`});else if(e.scope!==t.scope){let[l,c]=yT[e.scope]<yT[t.scope]?[e,t]:[t,e];o.push({kind:"shadowed",severity:"info",key:s,ids:[c.id,l.id],scopes:[c.scope,l.scope],message:`${s}: "${c.id}" (${c.scope}) is asked before "${l.id}" (${l.scope}).`})}if(e.scope===t.scope&&a)for(let[s,l]of[[e,t],[t,e]])for(let c of cr(s.keys))for(let u of cr(l.keys)){let d,f;try{d=ql(c),f=ql(u)}catch{continue}d.length!==1||f.length<2||Ss(c)===Ss(u).split(" ")[0]&&o.push({kind:"prefix",severity:"info",key:Ss(c),ids:[s.id,l.id],scope:s.scope,owner:Jg(s),message:`${Ss(c)} runs "${s.id}" at once, so "${l.id}" (${Ss(u)}) never starts.`})}return o}var Gct=new Set(["button","checkbox","color","file","hidden","image","radio","reset","submit"]);function VY(e){return!!e&&typeof e.matches=="function"}function u6(e){let n=(typeof e.composedPath=="function"?e.composedPath():[]).find(VY);return n||(VY(e.target)?e.target:null)}function Bd(e,t){let n=e;for(;n;){let r=n.closest(t);if(r)return r;let i=n.getRootNode();n="host"in i?i.host:null}return null}function Ru(e,t){let n=t;for(;n&&e;){if(e.contains(n))return!0;let r=n.getRootNode();n="host"in r?r.host:null}return!1}function GSe(e){if(!e)return!1;let t=e.tagName;return t==="TEXTAREA"||t==="SELECT"?!0:t==="INPUT"?!Gct.has((e.type||"text").toLowerCase()):e.isContentEditable?!0:Bd(e,'[contenteditable=""], [contenteditable="true"], [contenteditable="plaintext-only"], [role="textbox"], [role="combobox"], [role="searchbox"]')!==null}function YSe(e){return!e||!GSe(e)?!1:Bd(e,"[data-notis-floating]")?e.getAttribute("aria-expanded")==="true":!0}function Yct(e){if(!e)return!1;let t=Bd(e,'[role="menu"], [role="listbox"], [role="menubar"]');return!t||t.hasAttribute("data-notis-engine-list")?!1:t.getAttribute("data-state")!=="closed"}function XSe(e,t){return t.inFields?!1:!!(GSe(e)||!t.modal&&Yct(e))}function ZSe(e){return Bd(e,'button, a[href], [role="button"], [role="switch"], [role="checkbox"], [role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"], summary, input[type="checkbox"], input[type="radio"]')!==null}function QSe(e){return Bd(e,'input[type="range"], [role="slider"], [role="tablist"], [role="radiogroup"], [role="spinbutton"], [role="separator"][tabindex], [role="tree"], [role="grid"]')!==null}function d6(e){return Bd(e,'[data-notis-keys="off"]')!==null}function Uo(e){if(!e?.isConnected)return!1;let t=e;for(;t;){if(t.hasAttribute("hidden")||t.hasAttribute("inert")||t.getAttribute("aria-hidden")==="true")return!1;let n=t.ownerDocument.defaultView?.getComputedStyle(t);if(n?.display==="none"||n?.visibility==="hidden")return!1;let r=t.getRootNode();t=t.parentElement??("host"in r?r.host:null)}return!0}function Xct(e){let t=[e],n=r=>{let i=e.createTreeWalker(r,1);for(let o=i.nextNode();o;o=i.nextNode()){let a=o.shadowRoot;a&&(t.push(a),n(a))}};return n(e),t}function JSe(e,t,n){let r=new Set;for(let i of Xct(e))for(let o of i.querySelectorAll(t))r.add(o);if(n&&typeof n.composedPath=="function")for(let i of n.composedPath())VY(i)&&i.matches(t)&&r.add(i);return[...r]}var eCe=['[role="dialog"][aria-modal="true"]','[role="dialog"][data-state="open"]','[role="alertdialog"]:not([data-state="closed"])',"dialog.notis-dialog[open]",'dialog[open][aria-modal="true"]','[role="menu"][data-state="open"]','[role="listbox"][data-state="open"]'].join(", ");function kT(e,t){return JSe(e,eCe,t).filter(n=>!n.closest("[data-notis-nonmodal]")&&Uo(n))}function tCe(e,t){return kT(e,t).length>0}function WY(e){let t=e;for(;t;){let n=Bd(t,eCe);if(!n)return null;if(!n.closest("[data-notis-nonmodal]"))return n;let r=n.getRootNode();t=n.parentElement??("host"in r?r.host:null)}return null}var Zct='dialog[open], [role="dialog"]:not([data-state="closed"]), [role="alertdialog"]:not([data-state="closed"]), [role="menu"]:not([data-state="closed"]), [role="listbox"][data-state="open"]';function nCe(e,t){return JSe(e,Zct,t).filter(n=>!n.closest("[data-notis-escape-owned]")&&Uo(n))}var Za="notis",ST=class extends Error{clash;constructor(t){super(t.message.startsWith("NotisKeyClash")?t.message:`NotisKeyClash: ${t.message}`),this.name="NotisKeyClash",this.clash=t}},Qct=99,Zx=class{entries=[];owners=new Map;seq=0;version=0;listeners=new Set;warned=new Set;options;constructor(t={}){this.options={strict:t.strict??!0,onClash:t.onClash}}subscribe(t){return this.listeners.add(t),()=>{this.listeners.delete(t)}}getVersion(){return this.version}notify(){this.version+=1;for(let t of[...this.listeners])t()}defineOwner(t,n={}){if(t===Za)return()=>{};let r=n.parent??Za,i=this.owners.get(t);i?(i.refs+=1,i.parent=r,n.kind&&(i.kind=n.kind),n.available!==void 0&&i.available!==n.available&&(i.available=n.available)):this.owners.set(t,{id:t,parent:r,kind:n.kind??this.inheritedKind(r),available:n.available??!0,refs:1}),this.notify();let o=!1;return()=>{if(o)return;o=!0;let a=this.owners.get(t);a&&(a.refs-=1,a.refs<=0&&this.owners.delete(t),this.notify())}}setOwnerAvailable(t,n){let r=this.owners.get(t);!r||r.available===n||(r.available=n,this.notify())}inheritedKind(t){return t===Za?"space":this.owners.get(t)?.kind??"space"}ownerKind(t){return t===Za?"host":this.owners.get(t)?.kind??"space"}isOwnerAvailable(t){let n=t,r=new Set;for(;n&&n!==Za&&!r.has(n);){r.add(n);let i=this.owners.get(n);if(!i)return!0;if(!i.available)return!1;n=i.parent}return!0}register(t,n=t.owner??Za){let r=this.ownerKind(n),i=this.candidate(t,n,r),o=c6(i).filter(c=>c.severity==="error");if(o.length)return this.reject(o[0]),null;if(this.isOwnerAvailable(n))for(let c of this.entries){if(c.owner!==n||c.def.scope!==t.scope||!this.isOwnerAvailable(c.owner))continue;let u=qSe(this.candidate(c.def,c.owner,c.ownerKind),i).find(d=>d.kind==="duplicate");if(u)return this.reject(u),null}let a=Math.max(0,Math.min(Qct,t.boost??0)),s={def:t,owner:n,ownerKind:r,seq:++this.seq,rank:yT[t.scope]+a,chords:cr(t.keys).map(c=>ql(c))};this.entries.push(s),this.notify();let l=!1;return()=>{if(l)return;l=!0;let c=this.entries.indexOf(s);c!==-1&&this.entries.splice(c,1),this.notify()}}candidate(t,n,r){return{id:t.id,keys:t.keys,scope:t.scope,owner:n,ownerKind:r,available:!0}}reject(t){if(this.options.strict)throw new ST(t);if(this.warned.has(t.message))return;this.warned.add(t.message),(this.options.onClash??(r=>{typeof console<"u"&&console.warn(`[notis keys] ${r} The later shortcut was ignored.`)}))(t.message)}all(){return this.entries}active(t={}){return this.entries.filter(n=>(!t.modalOnly||n.def.scope==="modal")&&this.isOwnerAvailable(n.owner)).sort((n,r)=>r.rank-n.rank||r.seq-n.seq)}helpEntries(){let t=new Map,n=[...this.entries].sort((i,o)=>i.seq-o.seq);for(let i of n){let{def:o}=i;if(o.hidden||o.scope==="modal"||!this.isOwnerAvailable(i.owner)||o.when&&!CT(o.when))continue;let a=o.group??(i.ownerKind==="space"?"space":"notis");t.delete(o.id),t.set(o.id,{id:o.id,keys:cr(o.keys),label:o.label,group:a,scope:o.scope,owner:i.owner})}let r=[...t.values()];return[...r.filter(i=>i.group==="space"),...r.filter(i=>i.group==="notis")]}helpText(t){return this.helpEntries().map(n=>({group:n.group,label:n.label[t],keys:n.keys}))}};function CT(e){try{return e()!==!1}catch{return!1}}var gi=Object.freeze({route:0,detail:100,selection:200,help:300,overlay:400}),$Y=1500;function ET(){if(typeof navigator>"u")return"other";let e=navigator,t=e.userAgentData?.platform||e.platform||e.userAgent||"";return/mac|iphone|ipad|ipod/i.test(t)?"mac":"other"}function _T(){if(typeof document>"u")return"en";let e=document.querySelector("html")?.getAttribute("lang")??"";return/^fr\b/i.test(e)?"fr":"en"}function Jct(){return globalThis.process?.env?.NODE_ENV!=="production"}function Qx(e,t=!1){e.preventDefault(),t?e.stopImmediatePropagation():e.stopPropagation()}function eut(e){return e.key==="Escape"&&!e.metaKey&&!e.ctrlKey&&!e.altKey&&!e.shiftKey}var Jx=class{registry;settings;mounted=0;now=()=>Date.now();layers=[];blockers=[];seq=0;held=new Set;pending=null;attached=new Map;helpOpen=!1;helpUnregister=null;forcedRepeat=new WeakSet;constructor(t={}){this.settings={host:t.host??"portal",locale:t.locale??_T(),platform:t.platform??ET(),strict:t.strict??Jct(),onClash:t.onClash},this.registry=new Zx({strict:this.settings.strict,onClash:this.settings.onClash})}configure(t,n={}){let r={...this.settings};for(let[o,a]of Object.entries(t))a!==void 0&&(r[o]=a);let i=Object.keys(r).some(o=>r[o]!==this.settings[o]);return this.settings=r,this.registry.options={strict:r.strict,onClash:r.onClash},i&&!n.silent&&this.registry.notify(),i}subscribe(t){return this.registry.subscribe(t)}getVersion(){return this.registry.getVersion()}attach(t){let n=this.attached.get(t);if(n)n.refs+=1;else{let i=l=>this.handleKeyDown(l),o=l=>this.handleKeyUp(l),a=()=>this.resetHeld(),s=()=>{t.visibilityState==="hidden"&&this.resetHeld()};t.addEventListener("keydown",i,!0),t.addEventListener("keyup",o,!0),t.addEventListener("visibilitychange",s),t.defaultView?.addEventListener("blur",a),this.attached.set(t,{refs:1,detach:()=>{t.removeEventListener("keydown",i,!0),t.removeEventListener("keyup",o,!0),t.removeEventListener("visibilitychange",s),t.defaultView?.removeEventListener("blur",a)}})}this.ensureHelpShortcut();let r=!1;return()=>{if(r)return;r=!0;let i=this.attached.get(t);i&&(i.refs-=1,i.refs<=0&&(i.detach(),this.attached.delete(t)))}}isAttached(t){return this.attached.has(t)}attachedDocument(){for(let t of this.attached.keys())return t;return null}resetHeld(){this.held.clear(),this.pending=null}register(t,n){return this.registry.register(t,n??t.owner??Za)}defineOwner=(t,n)=>this.registry.defineOwner(t,n);setOwnerAvailable(t,n){this.registry.setOwnerAvailable(t,n)}isOwnerAvailable(t){return this.registry.isOwnerAvailable(t)}addEscapeLayer(t,n,r=gi.overlay){let i={id:t,onEscape:n,priority:r,seq:++this.seq};return this.layers.push(i),()=>{let o=this.layers.indexOf(i);o!==-1&&this.layers.splice(o,1)}}addEscapeBlocker(t=gi.detail+50,n){let r={priority:t,seq:++this.seq,isActive:n};return this.blockers.push(r),()=>{let i=this.blockers.indexOf(r);i!==-1&&this.blockers.splice(i,1)}}escapeLayerIds(){return this.sortedLayers().map(t=>t.id)}sortedLayers(){return[...this.layers].sort((t,n)=>n.priority-t.priority||n.seq-t.seq)}runEscapeChain(t){let n=this.blockers.filter(i=>!i.isActive||i.isActive()),r=n.reduce((i,o)=>Math.max(i,o.priority),-1/0);for(let i of this.sortedLayers()){if(i.priority<r)return!0;let o=!1;try{o=i.onEscape(t)===!0}catch(a){rCe(a),o=!0}if(o)return!0}return n.length>0}isHelpOpen(){return this.helpOpen}openHelp(){this.helpOpen||(this.helpOpen=!0,this.registry.notify())}closeHelp(){this.helpOpen&&(this.helpOpen=!1,this.registry.notify())}toggleHelp(){this.helpOpen?this.closeHelp():this.openHelp()}ensureHelpShortcut(){if(this.helpUnregister)return;let t=Xa["host.help"];this.helpUnregister=this.registry.register({id:t.id,keys:[...t.keys],scope:"app",label:t.label,group:"notis",run:()=>{this.toggleHelp()}},Za)}isRepeat(t){return t.repeat||this.forcedRepeat.has(t)}handleKeyUp(t){if(t.key==="Meta"){this.held.clear();return}this.held.delete(t.code||t.key)}handleKeyDown(t){if(t.isComposing||t.keyCode===229)return;let n=t.key;if(!n||n==="Dead"||n==="Process"||zSe(n))return;let r=t.code||n,i=t.repeat||this.held.has(r);if(t.metaKey||this.held.add(r),i&&!t.repeat){this.forcedRepeat.add(t);try{Object.defineProperty(t,"repeat",{value:!0,configurable:!0})}catch{}}let o=u6(t),a=o?.ownerDocument??(typeof document<"u"?document:null);if(!a||d6(o)||eut(t)&&this.handleEscape(t,o,a,i)||t.defaultPrevented)return;let s=n.toLowerCase();if(!t.metaKey&&!t.ctrlKey&&!t.altKey&&(s==="enter"||s===" ")&&ZSe(o)){this.pending=null;return}if(s.startsWith("arrow")&&QSe(o))return;let c=null,u=()=>c??=tCe(a,t),{platform:d}=this.settings,f=g=>{let{def:b}=g;return!(i&&!b.repeat||u()&&b.scope!=="modal"||XSe(o,{inFields:!!b.allowInFields,modal:b.scope==="modal"})||b.when&&!CT(b.when))},p=this.pending;if(this.pending=null,p&&!i&&this.now()-p.at<=$Y){let g=p.candidates.filter(({entry:b,chords:v})=>Dy(t,v[p.step],d)&&this.registry.all().includes(b)&&f(b));if(g.length){let b=g.filter(({chords:y})=>y.length===p.step+1);for(let{entry:y}of b)if(this.run(y,t)){Qx(t);return}let v=g.filter(({chords:y})=>y.length>p.step+1);if(v.length){this.pending={candidates:v,step:p.step+1,at:this.now()},Qx(t);return}}}let m=this.registry.active();for(let g of m)if(g.chords.some(b=>b.length===1&&Dy(t,b[0],d))&&f(g)&&this.run(g,t)){Qx(t);return}if(i)return;let h=[];for(let g of m)for(let b of g.chords)b.length>1&&Dy(t,b[0],d)&&f(g)&&h.push({entry:g,chords:b});h.length&&(this.pending={candidates:h,step:1,at:this.now()},Qx(t))}run(t,n){try{return t.def.run(n)!==!1}catch(r){return rCe(r),!0}}handleEscape(t,n,r,i){if(this.pending=null,YSe(n))return!0;let o=nCe(r,t);if(i)return(o.length||this.layers.length)&&Qx(t,!0),!0;if(t.defaultPrevented||o.length)return!0;if(!this.layers.length&&!this.blockers.length)return!1;let a=this.runEscapeChain(t);return a&&Qx(t),a}};function rCe(e){typeof console<"u"&&console.error("[notis keys] A shortcut failed.",e)}var f6=B(V(),1);var iCe=Symbol.for("notis.sdk.ui.instance");function tut(){return Object.freeze({version:1,core:new Jx,EngineContext:(0,f6.createContext)(null),OwnerContext:(0,f6.createContext)(Za),KeycapContext:(0,f6.createContext)(null)})}var Ly=null;function zd(){if(Ly)return Ly;let e=globalThis,t=e[iCe];if(t&&t.version===1)return typeof console<"u"&&console.warn("[notis keys] A second copy of the Notis toolkit loaded. It shares the first keyboard engine."),Ly=t,Ly;Ly=tut();try{Object.defineProperty(e,iCe,{value:Ly,configurable:!0,enumerable:!1,writable:!1})}catch{}return Ly}var oCe=typeof window>"u"?Vi.useEffect:Vi.useLayoutEffect;function sl(){let e=zd();return(0,Vi.useContext)(e.EngineContext)??e.core}function Fd(){return(0,Vi.useContext)(zd().OwnerContext)}function ek(e){let t=sl(),n=()=>e(t);return(0,Vi.useSyncExternalStore)((0,Vi.useCallback)(r=>t.subscribe(r),[t]),n,n)}function bi(){return ek(e=>e.mounted>0?e.settings.locale:_T())}function $c(){return ek(e=>e.mounted>0?e.settings.platform:ET())}function aCe(){let e=bi(),t=$c(),n=sl(),r=ek(o=>o.settings.host),i=ek(o=>o.settings.strict);return{host:r,locale:e,platform:t,strict:i,onClash:n.settings.onClash}}function sCe(e,t){return JSON.stringify([e.id,cr(e.keys),e.scope,e.owner??t,e.group??"",!!e.hidden,!!e.repeat,!!e.allowInFields,e.boost??0,e.label.en,e.label.fr])}function lCe(e){return{...e.current,when:()=>{let n=e.current.when;return n?n():!0},run:n=>e.current.run(n)}}function p6(e,t=[]){let n=sl(),r=Fd(),i=(0,Vi.useRef)(e);i.current=e;let o=sCe(e,r);(0,Vi.useEffect)(()=>{let a=n.register(lCe(i),i.current.owner??r);return()=>{a?.()}},[n,r,o,...t])}function ao(e,t=[]){let n=sl(),r=Fd(),i=(0,Vi.useRef)(e);i.current=e;let o=e.map(a=>sCe(a,r)).join(`
913
+ 3. "-" cannot repeat`);Si.customSchemes.push([e,t])}function Dlt(){Si.scanner=Elt(Si.customSchemes);for(let e=0;e<Si.tokenQueue.length;e++)Si.tokenQueue[e][1]({scanner:Si.scanner});Si.parser=Mlt(Si.scanner.tokens);for(let e=0;e<Si.pluginQueue.length;e++)Si.pluginQueue[e][1]({scanner:Si.scanner,parser:Si.parser});return Si.initialized=!0,Si}function JN(e){return Si.initialized||Dlt(),Rlt(Si.parser.start,e,Jke(Si.scanner.start,e))}JN.scan=Jke;function gY(e,t=null,n=null){if(t&&typeof t=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${t}; must be a string`);n=t,t=null}let r=new mY(n),i=JN(e),o=[];for(let a=0;a<i.length;a++){let s=i[a];s.isLink&&(!t||s.t===t)&&r.check(s)&&o.push(s.toFormattedObject(r))}return o}var bY="[\0- \xA0\u1680\u180E\u2000-\u2029\u205F\u3000]",Ilt=new RegExp(bY),Nlt=new RegExp(`${bY}$`),Llt=new RegExp(bY,"g");function Blt(e){return e.length===1?e[0].isLink:e.length===3&&e[1].isLink?["()","[]"].includes(e[0].value+e[2].value):!1}function zlt(e){return new vt({key:new Ut("autolink"),appendTransaction:(t,n,r)=>{let i=t.some(l=>l.docChanged)&&!n.doc.eq(r.doc),o=t.some(l=>l.getMeta("preventAutolink"));if(!i||o)return;let{tr:a}=r,s=ym(n.doc,[...t]);if(Cg(s).forEach(({newRange:l})=>{let c=wm(r.doc,l,f=>f.isTextblock),u,d;if(c.length>1)u=c[0],d=r.doc.textBetween(u.pos,u.pos+u.node.nodeSize,void 0," ");else if(c.length){let f=r.doc.textBetween(l.from,l.to," "," ");if(!Nlt.test(f))return;u=c[0],d=r.doc.textBetween(u.pos,l.to,void 0," ")}if(u&&d){let f=d.split(Ilt).filter(Boolean);if(f.length<=0)return!1;let p=f[f.length-1],m=u.pos+d.lastIndexOf(p);if(!p)return!1;let h=JN(p).map(g=>g.toObject(e.defaultProtocol));if(!Blt(h))return!1;h.filter(g=>g.isLink).map(g=>({...g,from:m+g.start+1,to:m+g.end+1})).filter(g=>r.schema.marks.code?!r.doc.rangeHasMark(g.from,g.to,r.schema.marks.code):!0).filter(g=>e.validate(g.value)).filter(g=>e.shouldAutoLink(g.value)).forEach(g=>{$w(g.from,g.to,r.doc).some(b=>b.mark.type===e.type)||a.addMark(g.from,g.to,e.type.create({href:g.href}))})}}),!!a.steps.length)return a}})}function Flt(e){return new vt({key:new Ut("handleClickLink"),props:{handleClick:(t,n,r)=>{if(r.button!==0||!t.editable)return!1;let i=null;if(r.target instanceof HTMLAnchorElement)i=r.target;else{let l=r.target;if(!l)return!1;let c=e.editor.view.dom;i=l.closest("a"),i&&!c.contains(i)&&(i=null)}if(!i)return!1;let o=!1;if(e.enableClickSelection&&(o=e.editor.commands.extendMarkRange(e.type.name)),e.openOnClick){var a,s;let l=LE(t.state,e.type.name),c=(a=i.href)!==null&&a!==void 0?a:l.href,u=(s=i.target)!==null&&s!==void 0?s:l.target;c&&(window.open(c,u),o=!0)}return o}}})}var Hlt=/\[([^[\]]+)\]\(((?:[^\s()]|\([^\s()]*\))+)(?:\s+(?:(["'])(.*?)\3|“(.*?)”|‘(.*?)’))?\)$/,jlt=/\[([^[\]]+)\]\(((?:[^\s()]|\([^\s()]*\))+)(?:\s+(?:(["'])(.*?)\3|“(.*?)”|‘(.*?)’))?\)/g;function nSe(e,t){let n=0;for(let r=t-1;r>=0&&e[r]==="\\";r-=1)n+=1;return n%2===1}function Vlt(e,t){let n=0,r=0;for(;r<t;){if(e[r]!=="`"){r+=1;continue}if(n===0&&nSe(e,r)){r+=1;continue}let i=0;for(;r<t&&e[r]==="`";)i+=1,r+=1;n===0?n=i:i===n&&(n=0)}return n>0}function rSe(e,t,n){var r,i;let[,o,a]=t;return(t.index?e[t.index-1]:void 0)==="!"||nSe(e,(r=t.index)!==null&&r!==void 0?r:0)||Vlt(e,(i=t.index)!==null&&i!==void 0?i:0)?!1:!!o.trim()&&n(a)}function iSe(e){var t,n;let[r,i,o,,a,s,l]=e,c=(t=a??s)!==null&&t!==void 0?t:l;return{index:(n=e.index)!==null&&n!==void 0?n:0,text:r,replaceWith:i,data:{href:o,title:c||null,markdown:!0}}}function Wlt(e,t){return e.index<t.index+t.text.length&&t.index<e.index+e.text.length}function oSe(e){var t,n,r;return{href:(t=e.data)===null||t===void 0?void 0:t.href,title:(n=(r=e.data)===null||r===void 0?void 0:r.title)!==null&&n!==void 0?n:null}}function $lt(e){let t=Nl({find:n=>{let r=Hlt.exec(n);return!r||!rSe(n,r,e.isAllowedHref)?null:iSe(r)},type:e.type,getAttributes:oSe});return new BE({find:t.find,handler:n=>{let r=t.handler(n);return r!==null&&n.state.tr.steps.length&&n.state.tr.setMeta("preventAutolink",!0),r}})}function Ult(e){let t=Xs({find:n=>{var r,i;let o=[];for(let s of n.matchAll(jlt))rSe(n,s,e.isAllowedHref)&&o.push(iSe(s));let a=((r=(i=e.findPlainUrls)===null||i===void 0?void 0:i.call(e,n))!==null&&r!==void 0?r:[]).filter(s=>!o.some(l=>Wlt(l,s)));return[...o,...a]},type:e.type,getAttributes:oSe});return new c$({find:t.find,handler:n=>{var r;let i=t.handler(n);return i!==null&&n.state.tr.steps.length&&(!((r=n.match.data)===null||r===void 0)&&r.markdown)&&n.state.tr.setMeta("preventAutolink",!0),i}})}function Klt(e){return new vt({key:new Ut("handlePasteLink"),props:{handlePaste:(t,n,r)=>{let{shouldAutoLink:i}=e,{state:o}=t,{selection:a}=o,{empty:s}=a;if(s)return!1;let l="";r.content.forEach(u=>{l+=u.textContent});let c=gY(l,{defaultProtocol:e.defaultProtocol}).find(u=>u.isLink&&u.value===l);return!l||!c||i!==void 0&&!i(c.value)?!1:e.editor.commands.setMark(e.type,{href:c.href})}}})}function Km(e,t){let n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return t&&t.forEach(r=>{let i=typeof r=="string"?r:r.scheme;i&&n.push(i)}),!e||e.replace(Llt,"").match(new RegExp(`^(?:(?:${n.map(r=>r.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")).join("|")}):|[^a-z]|[a-z0-9+.\\-]+(?:[^a-z+.\\-:]|$))`,"i"))}var aSe=Eo.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(e=>{if(typeof e=="string"){hY(e);return}hY(e.scheme,e.optionalSlashes)})},onDestroy(){tSe()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,markdownLinks:!1,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(e,t)=>!!Km(e,t.protocols),validate:e=>!!e,shouldAutoLink:e=>{let t=/^[a-z][a-z0-9+.-]*:\/\//i.test(e),n=/^[a-z][a-z0-9+.-]*:/i.test(e);if(t||n&&!e.includes("@"))return!0;let r=(e.includes("@")?e.split("@").pop():e).split(/[/?#:]/)[0];return!(/^\d{1,3}(\.\d{1,3}){3}$/.test(r)||!/\./.test(r))}}},addAttributes(){var e,t,n;return{href:{default:null,parseHTML(r){return r.getAttribute("href")}},target:{default:(e=this.options.HTMLAttributes.target)!==null&&e!==void 0?e:null},rel:{default:(t=this.options.HTMLAttributes.rel)!==null&&t!==void 0?t:null},class:{default:(n=this.options.HTMLAttributes.class)!==null&&n!==void 0?n:null},title:{default:null}}},parseHTML(){return[{tag:"a[href]",getAttrs:e=>{let t=e.getAttribute("href");return!t||!this.options.isAllowedUri(t,{defaultValidate:n=>!!Km(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:e}){return this.options.isAllowedUri(e.href,{defaultValidate:t=>!!Km(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",Ri(this.options.HTMLAttributes,e),0]:["a",Ri(this.options.HTMLAttributes,{...e,href:""}),0]},markdownTokenName:"link",parseMarkdown:(e,t)=>t.applyMark("link",t.parseInline(e.tokens||[]),{href:e.href,title:e.title||null}),renderMarkdown:(e,t)=>{var n,r,i,o;let a=(n=(r=e.attrs)===null||r===void 0?void 0:r.href)!==null&&n!==void 0?n:"",s=(i=(o=e.attrs)===null||o===void 0?void 0:o.title)!==null&&i!==void 0?i:"",l=t.renderChildren(e);return s?`[${l}](${a} "${s}")`:`[${l}](${a})`},addCommands(){return{setLink:e=>({chain:t})=>{let{href:n}=e;return this.options.isAllowedUri(n,{defaultValidate:r=>!!Km(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?t().setMark(this.name,e).setMeta("preventAutolink",!0).run():!1},toggleLink:e=>({chain:t})=>{let{href:n}=e||{};return n&&!this.options.isAllowedUri(n,{defaultValidate:r=>!!Km(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addInputRules(){return this.options.markdownLinks?[$lt({type:this.type,isAllowedHref:e=>this.options.isAllowedUri(e,{defaultValidate:t=>!!Km(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})})]:[]},addPasteRules(){let e=t=>{let n=[];if(t){let{protocols:r,defaultProtocol:i}=this.options;gY(t).filter(o=>o.isLink&&this.options.isAllowedUri(o.value,{defaultValidate:a=>!!Km(a,r),protocols:r,defaultProtocol:i})).forEach(o=>{this.options.shouldAutoLink(o.value)&&n.push({text:o.value,data:{href:o.href},index:o.start})})}return n};return this.options.markdownLinks?[Ult({type:this.type,isAllowedHref:t=>this.options.isAllowedUri(t,{defaultValidate:n=>!!Km(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}),findPlainUrls:e})]:[Xs({find:e,type:this.type,getAttributes:t=>{var n;return{href:(n=t.data)===null||n===void 0?void 0:n.href}}})]},addProseMirrorPlugins(){let e=[],{protocols:t,defaultProtocol:n}=this.options;return this.options.autolink&&e.push(zlt({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:i=>!!Km(i,t),protocols:t,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),e.push(Flt({type:this.type,editor:this.editor,openOnClick:this.options.openOnClick==="whenNotEditable"?!0:this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&e.push(Klt({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),e}});var vY={headers:!0,splitCells:!0,cellBackgroundColor:!0,cellTextColor:!0},qlt="link",Glt="https",sSe=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"],Ylt=new Set(["http","https","ftp","ftps"]);function Xlt(e){let t=e.match(/^([a-z][a-z0-9+.-]*):/i)?.[1]?.toLowerCase();return!t||!sSe.includes(t)?!1:Ylt.has(t)?/^[a-z][a-z0-9+.-]*:\/\//i.test(e):!0}var Zlt=100;function Qlt(){return aSe.extend({inclusive:!1,priority:Zlt}).configure({defaultProtocol:Glt,protocols:sSe,shouldAutoLink:Xlt})}function yY(){return{disableExtensions:[qlt],_tiptapOptions:{extensions:[Qlt()]}}}function Jlt(){return[{type:"paragraph"}]}function ect(e){return Array.isArray(e)?e:null}function lSe(e,t){if(t)return;let n=ect(e);return n?.length?n:Jlt()}var tct="default-src 'none'; script-src 'unsafe-inline' https:; style-src 'unsafe-inline' https:; img-src https: data: blob:; font-src https: data:; media-src https: data: blob:; connect-src https:; frame-src https:; base-uri 'none'; form-action 'none'; object-src 'none'";function cSe(e){return`<!doctype html><meta http-equiv="Content-Security-Policy" content="${tct}">${e}`}var e6=Object.freeze({"@notis/sdk":"__NotisSDK","@notis/sdk/ui":"__NotisSDKUI"}),$Yt=Object.freeze(["react","react-dom","react-dom/client","react/jsx-runtime","react/jsx-dev-runtime"]),UYt=Object.freeze(["@notis/sdk/words","@notis/sdk/config","@notis/sdk/vite"]);var dSe=String.raw`@notis\/sdk(?:\/[^"'\s]*)?`,nct=new RegExp(String.raw`(\bfrom\s*|\bimport\s*\(\s*|\bimport(?![\w$])\s*)(["'])(${dSe})\2`,"g"),rct=new RegExp(String.raw`\b(?:import|export)(?![\w$])\s*([^;"'\x60()]*?)\s*from\s*(["'])(${dSe})\2`,"g"),ict=/^[A-Za-z_$][\w$]*$/;function wY(e,t,n={}){return Object.assign(new Error(t),{code:e,...n})}function oct(e){let t=[],n=e.trim(),r=n.match(/\{([^}]*)\}/);if(r){for(let i of r[1].split(",")){let o=i.trim().split(/\s+as\s+/)[0]?.trim();o&&t.push(o)}n=n.replace(r[0],"")}for(let i of n.split(",")){let o=i.trim();o&&!o.startsWith("*")&&t.push("default")}return t}function uSe(e,t){if(!Object.hasOwn(e6,e))throw wY("client_update_required",`This Space needs ${e}, which this version of Notis does not provide.`,{missing:[e]});let n=e6[e],r=t[n];if(!r||typeof r!="object")throw wY("notis_sdk_host_unavailable",`The host did not provide ${e} (window.${n}).`);return r}function act(e,t){let n=Object.keys(t),r=[`const M = globalThis[${JSON.stringify(e)}];`],i=[];return n.forEach((o,a)=>{r.push(`const e${a} = M[${JSON.stringify(o)}];`),i.push(`e${a} as ${ict.test(o)?o:JSON.stringify(o)}`)}),i.length&&r.push(`export { ${i.join(", ")} };`),`data:text/javascript,${encodeURIComponent(r.join(" "))}`}function sct(e,t=globalThis){if(!e.includes("@notis/sdk"))return e;let n=new Set;for(let[,i,,o]of e.matchAll(rct)){let a=uSe(o,t);for(let s of oct(i))Object.hasOwn(a,s)||n.add(`${o}:${s}`)}if(n.size)throw wY("client_update_required",`This Space needs a newer version of Notis (missing ${[...n].join(", ")}).`,{missing:[...n]});let r=new Map;return e.replace(nct,(i,o,a,s)=>{let l=r.get(s);if(!l){let c=uSe(s,t);l=act(e6[s],c),r.set(s,l)}return`${o}${a}${l}${a}`})}function lct(e,t){return sct(cct(e),t)}function cct(e){let t=`data:text/javascript,${encodeURIComponent("const R = window.React; export default R; export const { createContext, createRef, useState, useEffect, useContext, useCallback, useMemo, useRef, useReducer, useLayoutEffect, useId, memo, forwardRef, createElement, Fragment, Children, cloneElement, isValidElement, lazy, Suspense, startTransition, useTransition, useDeferredValue, useSyncExternalStore, useInsertionEffect, useDebugValue, useImperativeHandle, Component, PureComponent } = R;")}`,n=`data:text/javascript,${encodeURIComponent("const J = window.__ReactJSXRuntime || {}; const R = window.React; export const jsx = J.jsx || R.createElement; export const jsxs = J.jsxs || R.createElement; export const jsxDEV = J.jsxDEV || R.createElement; export const Fragment = J.Fragment || R.Fragment;")}`,r=`data:text/javascript,${encodeURIComponent("const RD = window.ReactDOM; export default RD; export const { createPortal, flushSync, unstable_batchedUpdates } = RD;")}`,i=`data:text/javascript,${encodeURIComponent("const RDC = window.ReactDOMClient; export default RDC; export const { createRoot, hydrateRoot } = RDC;")}`,o=e;return o=o.replace(/import\s*["']react-dom\/client["'];?/g,`import "${i}";`),o=o.replace(/import\s*["']react-dom["'];?/g,`import "${r}";`),o=o.replace(/import\s*["']react\/jsx-runtime["'];?/g,`import "${n}";`),o=o.replace(/import\s*["']react\/jsx-dev-runtime["'];?/g,`import "${n}";`),o=o.replace(/import\s*["']react["'];?/g,`import "${t}";`),o=o.replace(/from\s*["']react\/jsx-runtime["']/g,`from "${n}"`),o=o.replace(/from\s*["']react\/jsx-dev-runtime["']/g,`from "${n}"`),o=o.replace(/from\s*["']react-dom\/client["']/g,`from "${i}"`),o=o.replace(/from\s*["']react-dom["']/g,`from "${r}"`),o=o.replace(/from\s*["']react["']/g,`from "${t}"`),o}function t6(e,t,n=!1){let r=t.find(s=>!!e[s]);if(r)return{name:r,component:e[r]};if(n)return null;if(e.default)return{name:"default",component:e.default};let i=Object.entries(e).filter(([s,l])=>s!=="__AppShell"&&!!l);if(i.length!==1)return null;let[o,a]=i[0];return{name:o,component:a}}async function uct(e){let t=new Blob([e],{type:"text/javascript"}),n=URL.createObjectURL(t);try{return await import(n)}finally{URL.revokeObjectURL(n)}}function xY(e){return uct(lct(e))}var eb=B(V(),1),fCe=B(wo(),1);var Gx=B(V(),1);var br=B(V(),1);function sp(e){if(!e?.isConnected)return!1;let t=e;for(;t;){if(t.hasAttribute("hidden")||t.hasAttribute("inert")||t.getAttribute("aria-hidden")==="true")return!1;let n=t.ownerDocument.defaultView?.getComputedStyle(t);if(n?.display==="none"||n?.visibility==="hidden")return!1;let r=t.getRootNode();t=t.parentElement??("host"in r?r.host:null)}return!0}var Lr=B(ae(),1),n6={app:0,route:100,collection:200,detail:300,modal:400},kY=Symbol.for("notis.sdk.shortcut_context");function dct(){let e=globalThis;return e[kY]||(e[kY]=(0,br.createContext)(null)),e[kY]}var CY=dct(),SY=Symbol.for("notis.sdk.shortcut_collection_state");function r6(){let e=globalThis;return e[SY]||(e[SY]={activeOwnerId:null,nextOwnerId:1}),e[SY]}function bSe(){let e=r6();return`collection-${e.nextOwnerId++}`}function EY(e){let t=r6();t.activeOwnerId===e&&(t.activeOwnerId=null)}function vT(e){r6().activeOwnerId=e}function vSe(e){let t=e.trim().toLowerCase();return t==="esc"?"escape":t==="return"?"enter":t==="space"?" ":t==="arrowup"||t==="up"?"arrowup":t==="arrowdown"||t==="down"?"arrowdown":t==="arrowleft"||t==="left"?"arrowleft":t==="arrowright"||t==="right"?"arrowright":t}function fct(e){let t=e.split("+").map(a=>a.trim()).filter(Boolean);if(t.length===0)return null;let n="",r=!1,i=!1,o=!1;for(let a of t){let s=a.toLowerCase();s==="mod"||s==="cmd"||s==="ctrl"||s==="meta"?r=!0:s==="shift"?i=!0:s==="alt"||s==="option"?o=!0:n=vSe(a)}return n?{key:n,mod:r,shift:i,alt:o}:null}function _Y(e){return(Array.isArray(e.keys)?e.keys:[e.keys]).flatMap(n=>{let r=n.trim().split(/\s+/).map(fct).filter(i=>i!==null);return r.length>0?[{definition:e,sequence:r}]:[]})}function bT(e){return`${e.mod?"m":"-"}${e.shift?"s":"-"}${e.alt?"a":"-"}:${e.key}`}function ySe(e){let t=vSe(e.key),n=e.shiftKey;return t==="3"&&n&&(t="#"),(t==="#"||t==="?")&&(n=!1),{key:t,mod:!!(e.metaKey||e.ctrlKey),shift:n,alt:e.altKey}}function i6(e){return(e.composedPath?.()??[e.target]).some(n=>{if(!(n instanceof HTMLElement))return!1;if(n.isContentEditable||n.getAttribute("contenteditable")==="true")return!0;let r=n.tagName;return r==="INPUT"||r==="TEXTAREA"||r==="SELECT"||r==="BUTTON"||r==="SUMMARY"||r==="A"&&n.hasAttribute("href")?!0:["button","link","menuitem","separator","switch","tab"].includes(n.getAttribute("role")||"")})}function pct(e,t){return e.length>t.sequence.length?!1:e.every((n,r)=>n===bT(t.sequence[r]))}function wSe(e,t){t.preventDefault!==!1&&e.preventDefault(),t.stopPropagation!==!1&&(e.stopPropagation(),e.stopImmediatePropagation?.()),t.onTrigger(e)}function xSe(e,t,n){if(n.key!=="Escape"||e.id!=="collection.clear")return!1;let r=kSe(t).filter(i=>sp(i));return r.length>0&&!r.some(i=>i.getAttribute("aria-selected")==="true")}function kSe(e){let t=Array.from(e.querySelectorAll("[data-notis-collection-item-id], [data-notis-row-id]"));for(let n of Array.from(e.querySelectorAll("*")))n.shadowRoot&&t.push(...kSe(n.shadowRoot));return t}function SSe(e){return e.composedPath().some(t=>t instanceof HTMLElement&&t.matches("dialog.notis-dialog[open]"))}function CSe({children:e,isAvailable:t}){return(0,br.useContext)(CY)?(0,Lr.jsx)(Lr.Fragment,{children:e}):(0,Lr.jsx)(yct,{isAvailable:t,children:e})}var fSe={modal:"Dialog",detail:"Detail",collection:"Collection",route:"This view",app:"App"},mct=["modal","detail","collection","route","app"];function TY(e){let t=Array.from(e).filter(i=>i.enabled&&i.isAvailable?.()!==!1).sort((i,o)=>o.priority-i.priority||o.order-i.order),n=r6().activeOwnerId;return!!(n&&t.some(i=>i.collectionOwnerId===n))?t.filter(i=>!i.collectionOwnerId||i.collectionOwnerId===n):t}var hct=Symbol.for("notis.sdk.fallback_shortcut_registries");function gct(e){let t=globalThis,n=t[hct]??=new WeakMap,r=document,i=n.get(r);if(!i){let a=new Map;i={registrations:a,nextId:1,dispatch:s=>{if(s.defaultPrevented||SSe(s))return;let l=i6(s),c=bT(ySe(s));for(let u of TY(a.values()))for(let d of u.getShortcuts()){if(d.enabled===!1||l&&!d.allowInEditable||s.repeat&&!d.allowRepeat||xSe(d,r,s))continue;if(_Y(d).some(p=>p.sequence.length===1&&bT(p.sequence[0])===c)){wSe(s,d);return}}}},n.set(r,i),r.addEventListener("keydown",i.dispatch,!0)}let o=i.nextId++;return i.registrations.set(o,{...e,id:o,order:o}),()=>{i.registrations.delete(o),i.registrations.size===0&&(r.removeEventListener("keydown",i.dispatch,!0),n.delete(r))}}function bct(e){let n=_Y({id:"",keys:e,onTrigger:()=>{}})[0];return n?n.sequence.map(bT).join(" "):null}function vct(e){let t=new Set,n=[];for(let r of TY(e))for(let i of r.getShortcuts()){if(i.enabled===!1||!i.label)continue;let a=(Array.isArray(i.keys)?i.keys:[i.keys]).filter(s=>{let l=bct(s);return!l||t.has(l)?!1:(t.add(l),!0)});a.length>0&&n.push({id:i.id,keys:a,label:i.label,scope:r.scope})}return n}function yct({children:e,isAvailable:t}){let n=(0,br.useRef)(new Map),r=(0,br.useRef)(1),i=(0,br.useRef)(1),o=(0,br.useRef)({chords:[],at:0}),[a,s]=(0,br.useState)(!1),l=(0,br.useRef)(!1),[,c]=(0,br.useState)(0),u=(0,br.useRef)(t),d=(0,br.useCallback)(h=>{l.current=h,s(h)},[]);(0,br.useLayoutEffect)(()=>{u.current=t,t?.()===!1&&(o.current={chords:[],at:0},d(!1))},[t,d]);let f=(0,br.useCallback)(h=>{let g=r.current++;return n.current.set(g,{...h,id:g,order:i.current++}),l.current&&c(b=>b+1),()=>{n.current.delete(g),l.current&&c(b=>b+1)}},[]);(0,br.useEffect)(()=>{let h=g=>{if(u.current?.()===!1){o.current={chords:[],at:0};return}if(g.defaultPrevented||SSe(g))return;let b=i6(g);if(!b&&!g.repeat&&g.key==="?"&&!g.metaKey&&!g.ctrlKey&&!g.altKey){g.preventDefault(),g.stopPropagation(),g.stopImmediatePropagation?.(),d(!l.current);return}if(l.current){g.key==="Escape"&&(g.preventDefault(),g.stopPropagation(),g.stopImmediatePropagation?.(),d(!1));return}let v=TY(n.current.values());if(v.length===0)return;let y=bT(ySe(g)),w=Date.now();for(let k of v){let x=k.getShortcuts().filter(R=>R.enabled!==!1).filter(R=>!b||R.allowInEditable).filter(R=>!g.repeat||R.allowRepeat).filter(R=>!xSe(R,document,g)).flatMap(_Y);if(x.length===0)continue;let S=w-o.current.at<=k.sequenceTimeoutMs?o.current.chords:[],T=S.length>0?[[...S,y],[y]]:[[y]];for(let R of T){let C=x.filter(D=>pct(R,D));if(C.length===0)continue;let M=C.find(D=>D.sequence.length===R.length),E=C.some(D=>D.sequence.length>R.length);if(M&&!E){o.current={chords:[],at:0},wSe(g,M.definition);return}o.current={chords:R,at:w},g.preventDefault();return}}o.current={chords:[],at:0}};return document.addEventListener("keydown",h,!0),()=>document.removeEventListener("keydown",h,!0)},[d]);let p=(0,br.useMemo)(()=>({register:f}),[f]),m=a?vct(n.current.values()):[];return(0,Lr.jsxs)(CY.Provider,{value:p,children:[e,a?(0,Lr.jsx)(wct,{entries:m,onClose:()=>d(!1)}):null]})}function wct({entries:e,onClose:t}){let n=(0,br.useRef)(null),r=(0,br.useRef)(typeof document<"u"&&document.activeElement instanceof HTMLElement?document.activeElement:null);(0,br.useEffect)(()=>(n.current?.focus({preventScroll:!0}),()=>r.current?.focus({preventScroll:!0})),[]);let i=mct.map(o=>({scope:o,entries:e.filter(a=>a.scope===o)})).filter(o=>o.entries.length>0);return(0,Lr.jsx)("div",{role:"presentation","data-notis-shortcut-help-backdrop":"",onMouseDown:o=>{o.target===o.currentTarget&&t()},style:xct,children:(0,Lr.jsxs)("section",{role:"dialog","aria-modal":"true","aria-labelledby":"notis-shortcut-help-title","data-notis-shortcut-help":"",onKeyDown:o=>{o.key==="Tab"&&(o.preventDefault(),n.current?.focus({preventScroll:!0}))},style:kct,children:[(0,Lr.jsxs)("header",{style:Sct,children:[(0,Lr.jsxs)("div",{children:[(0,Lr.jsx)("h2",{id:"notis-shortcut-help-title",style:Cct,children:"Keyboard shortcuts"}),(0,Lr.jsx)("p",{style:Ect,children:"Available in this view"})]}),(0,Lr.jsx)("button",{ref:n,type:"button","aria-label":"Close keyboard shortcuts",onClick:t,style:_ct,children:"Esc"})]}),(0,Lr.jsxs)("div",{style:Tct,children:[i.map(o=>(0,Lr.jsxs)("section",{"aria-label":fSe[o.scope],children:[(0,Lr.jsx)("h3",{style:pSe,children:fSe[o.scope]}),(0,Lr.jsx)("div",{style:mSe,children:o.entries.map(a=>(0,Lr.jsxs)("div",{style:hSe,children:[(0,Lr.jsx)("span",{children:a.label}),(0,Lr.jsx)("span",{style:Act,children:a.keys.map(s=>(0,Lr.jsx)("kbd",{style:gSe,children:Oy(s)},s))})]},`${o.scope}:${a.id}`))})]},o.scope)),(0,Lr.jsxs)("section",{"aria-label":"Help",children:[(0,Lr.jsx)("h3",{style:pSe,children:"Help"}),(0,Lr.jsx)("div",{style:mSe,children:(0,Lr.jsxs)("div",{style:hSe,children:[(0,Lr.jsx)("span",{children:"Show keyboard shortcuts"}),(0,Lr.jsx)("kbd",{style:gSe,children:"?"})]})})]})]})]})})}var xct={position:"fixed",inset:0,zIndex:1e3,display:"grid",placeItems:"center",padding:"1.5rem",background:"rgba(0, 0, 0, 0.42)",backdropFilter:"blur(3px)"},kct={width:"min(34rem, 100%)",maxHeight:"min(42rem, calc(100dvh - 3rem))",overflow:"hidden",border:"1px solid hsl(var(--border))",borderRadius:"0.875rem",background:"hsl(var(--background))",color:"hsl(var(--foreground))",boxShadow:"0 24px 70px rgba(0, 0, 0, 0.28)",fontFamily:"inherit"},Sct={display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:"1rem",padding:"1.25rem 1.25rem 1rem",borderBottom:"1px solid hsl(var(--border))"},Cct={margin:0,fontSize:"1rem",fontWeight:650},Ect={margin:"0.2rem 0 0",color:"hsl(var(--muted-foreground))",fontSize:"0.75rem"},_ct={border:"1px solid hsl(var(--border))",borderRadius:"0.35rem",background:"hsl(var(--muted))",color:"hsl(var(--muted-foreground))",padding:"0.2rem 0.45rem",cursor:"pointer",font:"inherit",fontSize:"0.7rem"},Tct={display:"grid",gap:"1.1rem",maxHeight:"calc(min(42rem, 100dvh - 3rem) - 5rem)",overflowY:"auto",padding:"1rem 1.25rem 1.25rem"},pSe={margin:"0 0 0.35rem",color:"hsl(var(--muted-foreground))",fontSize:"0.68rem",fontWeight:650,letterSpacing:"0.06em",textTransform:"uppercase"},mSe={display:"grid"},hSe={display:"flex",minHeight:"2rem",alignItems:"center",justifyContent:"space-between",gap:"1rem",borderBottom:"1px solid color-mix(in srgb, hsl(var(--border)) 65%, transparent)",fontSize:"0.8rem"},Act={display:"inline-flex",flexWrap:"wrap",justifyContent:"flex-end",gap:"0.3rem"},gSe={minWidth:"1.6rem",border:"1px solid hsl(var(--border))",borderBottomWidth:"2px",borderRadius:"0.35rem",background:"hsl(var(--muted))",color:"hsl(var(--foreground))",padding:"0.15rem 0.4rem",textAlign:"center",font:"inherit",fontSize:"0.72rem"};function Ry(e,t={}){let n=(0,br.useContext)(CY),r=(0,br.useRef)(e);r.current=e;let{enabled:i=!0,scope:o="route",priority:a=0,sequenceTimeoutMs:s=1500,collectionOwnerId:l,isAvailable:c}=t,u=(0,br.useRef)(c);u.current=c,(0,br.useEffect)(()=>{if(!(!n||!i))return n.register({enabled:i,scope:o,priority:n6[o]+a,sequenceTimeoutMs:s,collectionOwnerId:l,isAvailable:()=>u.current?.()!==!1,getShortcuts:()=>u.current?.()===!1?[]:r.current})},[l,i,a,n,o,s]),(0,br.useEffect)(()=>{if(!(n||!i))return gct({enabled:i,scope:o,priority:n6[o]+a,sequenceTimeoutMs:s,collectionOwnerId:l,isAvailable:()=>u.current?.()!==!1,getShortcuts:()=>r.current})},[l,i,a,n,o,s])}function Oy(e){return e.trim().split(/\s+/).map(t=>t.split("+").map(n=>{let r=n.toLowerCase();return r==="mod"||r==="cmd"||r==="meta"?"\u2318":r==="ctrl"?"\u2303":r==="shift"?"\u21E7":r==="alt"||r==="option"?"\u2325":r==="arrowup"||r==="up"?"\u2191":r==="arrowdown"||r==="down"?"\u2193":r==="arrowleft"||r==="left"?"\u2190":r==="arrowright"||r==="right"?"\u2192":n.length===1?n.toUpperCase():n}).join("")).join(" ")}var AY={en:{bindingUnavailable:"This Space cannot read this database yet.",actionUnavailable:"This action is unavailable in this Space.",readUnavailable:"These data cannot be read in this Space.",schemaChanged:"This database changed. Refresh the page and try again.",responseIncomplete:"This database could not be loaded. Refresh the page and try again.",listUnavailable:"This list is unavailable in this view.",timedOut:"This read took too long. Please retry.",scopeUnavailable:"App query scope is no longer available.",scopeCleared:"App query scope was cleared."},fr:{bindingUnavailable:"Ce Space ne peut pas encore lire cette base de donn\xE9es.",actionUnavailable:"Cette action n\u2019est pas disponible dans ce Space.",readUnavailable:"Ces donn\xE9es ne sont pas accessibles dans ce Space.",schemaChanged:"Cette base de donn\xE9es a chang\xE9. Actualise la page et r\xE9essaie.",responseIncomplete:"Cette base de donn\xE9es n\u2019a pas pu \xEAtre charg\xE9e. Actualise la page et r\xE9essaie.",listUnavailable:"Cette liste n\u2019est pas disponible dans cette vue.",timedOut:"Cette lecture a pris trop de temps. R\xE9essaie.",scopeUnavailable:"Les donn\xE9es de cette vue ne sont plus accessibles.",scopeCleared:"Les donn\xE9es de cette vue ont \xE9t\xE9 r\xE9initialis\xE9es."}},MY="notis_sdk_query:",Ya=class extends Error{code;diagnostic;constructor(t,n,r,i){super(AY[r==="fr"?"fr":"en"][t],i?{cause:i}:void 0),this.name="SdkQueryError",this.code=MY+t,this.diagnostic=n}};function RY(e,t){let n=e;if(!n||typeof n.code!="string"||!n.code.startsWith(MY))return e;let r=n.code.slice(MY.length);if(!Object.hasOwn(AY.en,r))return e;let i=AY[t==="fr"?"fr":"en"][r];return n.message===i?e:new Ya(r,typeof n.diagnostic=="string"?n.diagnostic:void 0,t,n)}var Kx=Object.freeze({list_databases:"databases",get_database:"databases",query_database:"databases",list_skills:"skills",get_skill:"skills"}),OY=Object.freeze({facts:"read",run:"shell",upload:"shell"});function PY(e,t){let n=OY[t];return e==="shell"||e==="read"&&n==="read"}var ESe=2;var qx=class extends Error{constructor(n,r,i,o,a,s){super(n);this.requestId=r;this.receiptId=i;this.status=o;this.pendingRequestIds=a;this.code=s;this.name="SpaceActionError"}requestId;receiptId;status;pendingRequestIds;code};var o6=class extends Error{code="space_navigation_cancelled";constructor(t="This navigation is no longer active."){super(t),this.name="SpaceNavigationCancelled"}};function _Se(e){return e instanceof Error&&e.name==="SpaceNavigationCancelled"&&e.code==="space_navigation_cancelled"}function qm(e,t){if(e?.resource?.kind!=="space")return t;let n=e.space;if(!n?.cacheScope||n.id!==e.resource.id||n.revision!==e.resource.revision)throw new Error("The host must provide this Space revision and access context.");return["space",n.id,n.revision,n.cacheScope,...t]}function TSe(e,t){if(e?.resource?.kind!=="space")return e;qm(e,[]);let n=(u,d)=>{let f=d?new Ya(d,u,e.context?.locale):new Error(u);return t?.(f),f},r=async()=>{throw n("Use a declared Space action; account-wide tool and backend calls are unavailable.")},i=e.callAction;if(!i)throw new Error("This host needs the current Space action protocol.");let o=e.viewerRead,a=e.shown,s=e.spaceCloudComputer,l=e.space.cloudComputer,c=u=>{if(!s||!PY(l,u))throw n(u==="facts"?"This Space does not use the cloud computer.":"This Space does not declare cloudComputer: shell.");return s};return Object.freeze({...e,callTool:r,request:r,listTools:r,shown:a?async function(d,f={},p={}){let m=e.space.shows&&Object.hasOwn(e.space.shows,d)?e.space.shows[d]:null;if(!m||!("database"in m))throw n("This view does not declare that list with a filter.","listUnavailable");return a(d,f,p)}:void 0,handover:void 0,cloudComputerFacts:s&&l?async u=>c("facts").facts(u):void 0,spaceCloudComputer:s&&l?Object.freeze({status:()=>s.status(),requestApproval:()=>s.requestApproval(),facts:async u=>c("facts").facts(u),run:async u=>c("run").run(u),upload:async u=>c("upload").upload(u)}):void 0,viewerRead:o?async function(d,f={}){let p=Object.hasOwn(Kx,d)?Kx[d]:null;if(!p)throw n("Viewer reads never change data. Choose a supported read.","readUnavailable");if(!e.space.viewerReads?.includes(p))throw n(`This Space does not declare viewer reads of ${p}.`,"readUnavailable");return o(d,f)}:void 0,async callAction(u,d={},f={}){let p=Object.hasOwn(e.space.actions,u)?e.space.actions[u]:null;if(!p)throw n("This action is not declared by the published Space.",f.readOnly||f.dedupe?"actionUnavailable":void 0);if((f.readOnly||f.dedupe)&&!p.readOnly)throw n("A write action cannot run as a cached read.","readUnavailable");return i(u,d,f)}})}var IY=B(ae(),1),DY=Symbol.for("notis.sdk.runtime_context");function Mct(){let e=globalThis;return e[DY]||(e[DY]=(0,Gx.createContext)(null)),e[DY]}var ASe=Mct();function a6({children:e,runtime:t,onProtocolError:n,shortcutsAvailable:r}){let i=(0,Gx.useMemo)(()=>TSe(t,n),[t,n]);if(t===void 0)throw new Error("NotisProvider requires an explicit runtime prop.");return(0,IY.jsx)(ASe.Provider,{value:i,children:(0,IY.jsx)(CSe,{isAvailable:r,children:e})})}function Fe(){return(0,Gx.useContext)(ASe)}var AT=B(V(),1);var Vi=B(V(),1);var yT=Object.freeze({app:0,route:100,collection:200,detail:300,modal:400}),aXt=Object.freeze(["app","route","collection","detail","modal"]);function s6(e){return!!e&&typeof e=="object"&&typeof e.en=="string"&&typeof e.fr=="string"}function pt(e,t){return typeof e=="string"?e:t==="fr"?e.fr:e.en}function MSe(e,t){return e.replace(/\{(\w+)\}/g,(n,r)=>Object.prototype.hasOwnProperty.call(t,r)?String(t[r]):n)}function lr(e,t){return{en:MSe(e.en,t),fr:MSe(e.fr,t)}}function ee(e,t){return{en:e,fr:t}}var Py="\u202F";function RSe(e,t,n){return n==="fr"?`${e}${Py}: ${t}`:`${e}: ${t}`}var OSe={esc:"escape",return:"enter",up:"arrowup",down:"arrowdown",left:"arrowleft",right:"arrowright",del:"delete",spacebar:"space"," ":"space",plus:"+",pgup:"pageup",pgdn:"pagedown"},Rct={mod:"mod",cmd:"mod",command:"mod",meta:"mod",ctrl:"ctrl",control:"ctrl",alt:"alt",option:"alt",opt:"alt",shift:"shift"},Oct=new Set(["escape","enter","tab","space","backspace","delete","insert","arrowup","arrowdown","arrowleft","arrowright","home","end","pageup","pagedown","f1","f2","f3","f4","f5","f6","f7","f8","f9","f10","f11","f12"]),Pct={"/":{code:"Slash",shift:!1},"?":{code:"Slash",shift:!0},"[":{code:"BracketLeft",shift:!1},"{":{code:"BracketLeft",shift:!0},"]":{code:"BracketRight",shift:!1},"}":{code:"BracketRight",shift:!0},",":{code:"Comma",shift:!1},"<":{code:"Comma",shift:!0},".":{code:"Period",shift:!1},">":{code:"Period",shift:!0},";":{code:"Semicolon",shift:!1},":":{code:"Semicolon",shift:!0},"'":{code:"Quote",shift:!1},'"':{code:"Quote",shift:!0},"`":{code:"Backquote",shift:!1},"~":{code:"Backquote",shift:!0},"-":{code:"Minus",shift:!1},_:{code:"Minus",shift:!0},"=":{code:"Equal",shift:!1},"+":{code:"Equal",shift:!0},"\\":{code:"Backslash",shift:!1},"|":{code:"Backslash",shift:!0},"!":{code:"Digit1",shift:!0},"@":{code:"Digit2",shift:!0},"#":{code:"Digit3",shift:!0},$:{code:"Digit4",shift:!0},"%":{code:"Digit5",shift:!0},"^":{code:"Digit6",shift:!0},"&":{code:"Digit7",shift:!0},"*":{code:"Digit8",shift:!0},"(":{code:"Digit9",shift:!0},")":{code:"Digit0",shift:!0}},Dct={escape:["Escape"],enter:["Enter","NumpadEnter"],tab:["Tab"],space:["Space"],backspace:["Backspace"],delete:["Delete"],insert:["Insert"],arrowup:["ArrowUp"],arrowdown:["ArrowDown"],arrowleft:["ArrowLeft"],arrowright:["ArrowRight"],home:["Home"],end:["End"],pageup:["PageUp"],pagedown:["PageDown"]};function NY(e){return/^[a-z]$/.test(e)}function LY(e){return/^[0-9]$/.test(e)}function NSe(e){return e.length===1&&!NY(e)&&!LY(e)}function Ict(e){if(e.length===1){let n=e.toLowerCase();return OSe[e]??n}let t=e.toLowerCase();return OSe[t]??t}var Yx=class extends Error{constructor(t,n){super(`Invalid key spec "${t}": ${n}`),this.name="KeySpecError"}};function Nct(e,t){let n={key:"",mod:!1,ctrl:!1,alt:!1,shift:!1},r;e==="+"?r=["+"]:e.endsWith("++")?r=[...e.slice(0,-2).split("+"),"+"]:r=e.split("+");let i=r.pop()??"";if(!i)throw new Yx(t,"missing key");for(let a of r){let s=Rct[a.toLowerCase()];if(!s)throw new Yx(t,`unknown modifier "${a}"`);n[s]=!0}let o=Ict(i);if(o.length!==1&&!Oct.has(o))throw new Yx(t,`unknown key "${i}"`);return n.key=o,NSe(o)&&!n.alt&&(n.shift=!1),n}var PSe=new Map;function ql(e){let t=PSe.get(e);if(t)return t;let n=e.trim();if(!n)throw new Yx(e,"empty");let i=(n==="+"?["+"]:n.split(/\s+/)).map(o=>Nct(o,e));return PSe.set(e,i),i}function LSe(e){try{return ql(e),!0}catch{return!1}}function BSe(e){return ql(e).length>1}function cr(e){return e==null?[]:typeof e=="string"?[e]:[...e]}function Lct(e,t){let n=e.mod||t==="other"&&e.ctrl,r=t==="mac"&&e.ctrl,i=[];return n&&i.push("mod"),r&&i.push("ctrl"),e.alt&&i.push("alt"),e.shift&&i.push("shift"),i.push(e.key),i.join("+")}function Ss(e,t="mac"){return ql(e).map(n=>Lct(n,t)).join(" ")}function Bct(e){let{key:t}=e;if(NY(t))return{codes:[`Key${t.toUpperCase()}`],shift:null};if(LY(t))return{codes:[`Digit${t}`,`Numpad${t}`],shift:null};let n=Dct[t];if(n)return{codes:[...n],shift:null};let r=Pct[t];return r?{codes:[r.code],shift:r.shift}:{codes:[],shift:null}}function zct(e){return e===" "||e==="Spacebar"?"space":e==="Esc"?"escape":e==="Up"||e==="Down"||e==="Left"||e==="Right"?`arrow${e.toLowerCase()}`:e==="Del"?"delete":(e.length===1,e.toLowerCase())}function Dy(e,t,n){let r=!!e.metaKey,i=!!e.ctrlKey,o=!!e.altKey,a=!!e.shiftKey,s=n==="mac"?t.mod:!1,l=n==="mac"?t.ctrl:t.mod||t.ctrl;if(t.alt){if(!o||r!==s||i!==l)return!1;let{codes:u,shift:d}=Bct(t);if(!e.code||!u.includes(e.code))return!1;let f=d??t.shift;return a===f}let c=zct(e.key??"");return NSe(t.key)?c!==t.key||r!==s?!1:n==="other"?l?i:!i||o:i===l:o||r!==s||i!==l?!1:NY(t.key)?a!==t.shift?!1:c===t.key?!0:c.length===1&&/\p{L}/u.test(c)&&!/^[a-z]$/.test(c)&&e.code===`Key${t.key.toUpperCase()}`:LY(t.key)?c===t.key:c===t.key&&a===t.shift}function BY(e,t,n,r=!1){let i;try{i=ql(t)}catch{return!1}return i.length>1&&!r?!1:Dy(e,i[0],n)}function zSe(e){return e==="Shift"||e==="Control"||e==="Alt"||e==="Meta"||e==="AltGraph"||e==="CapsLock"||e==="OS"||e==="Fn"||e==="Hyper"||e==="Super"}var DSe=Object.freeze(["/","c","shift+c","shift+tab","mod+s","mod+d","alt+p","alt+s","?","escape","mod+k"]),ISe={mac:new Set(DSe.map(e=>Ss(e,"mac"))),other:new Set(DSe.map(e=>Ss(e,"other")))};function FSe(e){for(let t of["mac","other"]){let n=Ss(e,t),r=n.split(" ")[0];if(ISe[t].has(n)||ISe[t].has(r))return!0}return!1}var Iy=Object.freeze({then:{en:"then",fr:"puis"},or:{en:"or",fr:"ou"}}),Fct={ctrl:"\u2303",alt:"\u2325",shift:"\u21E7",mod:"\u2318"};function zY(e,t,n){switch(e){case"enter":return t?"\u21B5":n?"Entr\xE9e":"Enter";case"escape":return n?"\xC9chap":"Esc";case"space":return n?"Espace":"Space";case"arrowdown":return"\u2193";case"arrowup":return"\u2191";case"arrowleft":return"\u2190";case"arrowright":return"\u2192";case"tab":return"Tab";case"backspace":return t?"\u232B":n?"Retour arri\xE8re":"Backspace";case"delete":return t?"\u2326":n?"Suppr":"Delete";case"insert":return n?"Inser":"Insert";case"home":return n?"D\xE9but":"Home";case"end":return n?"Fin":"End";case"pagedown":return n?"Pg suiv":"PgDn";case"pageup":return n?"Pg pr\xE9c":"PgUp";default:return e.length===1?e.toUpperCase():e[0].toUpperCase()+e.slice(1)}}function Hct(e,{platform:t,locale:n}){let r=t==="mac",i=n==="fr";if(r)return["ctrl","alt","shift","mod"].filter(s=>e[s]).map(s=>Fct[s]).join("")+zY(e.key,r,i);let o=[];return(e.mod||e.ctrl)&&o.push("Ctrl"),e.alt&&o.push("Alt"),e.shift&&o.push(i?"Maj":"Shift"),[...o,zY(e.key,r,i)].join("+")}function FY(e,t){return cr(e).map(n=>ql(n).map(r=>Hct(r,t)))}function HSe(e,t){let n=` ${Iy.then[t.locale]} `,r=` ${Iy.or[t.locale]} `;return FY(e,t).map(i=>i.join(n)).join(r)}var jct={escape:"Escape",enter:"Enter",tab:"Tab",space:"Space",backspace:"Backspace",delete:"Delete",insert:"Insert",arrowup:"ArrowUp",arrowdown:"ArrowDown",arrowleft:"ArrowLeft",arrowright:"ArrowRight",home:"Home",end:"End",pageup:"PageUp",pagedown:"PageDown"};function jSe(e,t){return cr(e).map(n=>ql(n)).filter(n=>n.length===1).map(([n])=>{let r=[];n.mod&&r.push(t==="mac"?"Meta":"Control"),n.ctrl&&!(n.mod&&t!=="mac")&&r.push("Control"),n.alt&&r.push("Alt"),n.shift&&r.push("Shift");let i=n.key;return r.push(jct[i]??(i.length===1?i.toUpperCase():i[0].toUpperCase()+i.slice(1))),r.join("+")}).join(" ")}var Vct=Object.freeze({enter:{en:"Enter",fr:"Entr\xE9e"},escape:{en:"Escape",fr:"\xC9chap"},space:{en:"Space",fr:"Espace"},arrowdown:{en:"Down arrow",fr:"Fl\xE8che bas"},arrowup:{en:"Up arrow",fr:"Fl\xE8che haut"},arrowleft:{en:"Left arrow",fr:"Fl\xE8che gauche"},arrowright:{en:"Right arrow",fr:"Fl\xE8che droite"},backspace:{en:"Backspace",fr:"Retour arri\xE8re"},delete:{en:"Delete",fr:"Suppr"},pagedown:{en:"Page down",fr:"Page suivante"},pageup:{en:"Page up",fr:"Page pr\xE9c\xE9dente"}}),l6=Object.freeze({ctrl:{en:"Control",fr:"Contr\xF4le"},alt:{mac:{en:"Option",fr:"Option"},other:{en:"Alt",fr:"Alt"}},shift:{en:"Shift",fr:"Maj"},mod:{mac:{en:"Command",fr:"Commande"},other:{en:"Control",fr:"Contr\xF4le"}}});function VSe(e,{platform:t,locale:n}){let r=` ${Iy.then[n]} `,i=` ${Iy.or[n]} `,o=a=>{let s=[];return a.ctrl&&!(a.mod&&t!=="mac")&&s.push(l6.ctrl[n]),a.alt&&s.push(l6.alt[t][n]),a.shift&&s.push(l6.shift[n]),a.mod&&s.push(l6.mod[t][n]),s.push(Vct[a.key]?.[n]??zY(a.key,!1,n==="fr")),s.join(" ")};return cr(e).map(a=>ql(a).map(o).join(r)).join(i)}function Xx(e){if(!e||typeof e!="object")return null;let{name:t,code:n,reason:r}=e;return t!=="ActionError"||n!=="notis_action_error"?null:typeof r=="string"||s6(r)?r:null}var wT=(e,t,n,r)=>({one:{en:e,fr:n},other:{en:t,fr:r}}),Wct=(e,t)=>({one:{en:e,fr:t},other:{en:e,fr:t}}),xT=Object.freeze({complete:{id:"complete",label:{en:"Complete",fr:"Terminer"},icon:"check",key:"e",tone:"default",toast:wT("1 item completed.","{n} items completed.","1 \xE9l\xE9ment termin\xE9.","{n} \xE9l\xE9ments termin\xE9s.")},archive:{id:"archive",label:{en:"Archive",fr:"Archiver"},icon:"archive",key:"e",tone:"default",toast:wT("1 item archived.","{n} items archived.","1 \xE9l\xE9ment archiv\xE9.","{n} \xE9l\xE9ments archiv\xE9s.")},unarchive:{id:"unarchive",label:{en:"Move to triage",fr:"D\xE9placer vers le tri"},icon:"tray-arrow-up",key:"shift+e",tone:"default",toast:wT("1 item restored.","{n} items restored.","1 \xE9l\xE9ment restaur\xE9.","{n} \xE9l\xE9ments restaur\xE9s.")},star:{id:"star",label:{en:"Star",fr:"Mettre en favori"},icon:"star",key:"s",tone:"default",toggle:"unstar",toast:wT("1 item starred.","{n} items starred.","1 \xE9l\xE9ment ajout\xE9 aux favoris.","{n} \xE9l\xE9ments ajout\xE9s aux favoris.")},unstar:{id:"unstar",label:{en:"Unstar",fr:"Retirer des favoris"},icon:"star",key:"s",tone:"default",toggle:"star",toast:null},later:{id:"later",label:{en:"Later",fr:"Plus tard"},icon:"clock",key:"h",tone:"default",toast:Wct("Snoozed until tomorrow.","Report\xE9 \xE0 demain.")},move:{id:"move",label:{en:"Move to\u2026",fr:"D\xE9placer vers\u2026"},icon:"arrow-bend-up-right",key:"m",tone:"default",toast:null,picker:!0},assign:{id:"assign",label:{en:"Assign\u2026",fr:"Attribuer\u2026"},icon:"user-plus",key:"a",tone:"default",toast:null,picker:!0},read:{id:"read",label:{en:"Mark as read",fr:"Marquer comme lu"},icon:"envelope-open",key:"u",tone:"default",toggle:"unread",toast:null},unread:{id:"unread",label:{en:"Mark as unread",fr:"Marquer comme non lu"},icon:"envelope-simple",key:"u",tone:"default",toggle:"read",toast:null},delete:{id:"delete",label:{en:"Delete",fr:"Supprimer"},icon:"trash",key:"#",tone:"danger",toast:wT("1 item deleted.","{n} items deleted.","1 \xE9l\xE9ment supprim\xE9.","{n} \xE9l\xE9ments supprim\xE9s.")},progress:{id:"progress",label:{en:"Start progress",fr:"Passer en cours"},icon:"circle-half",key:null,tone:"default",toast:null},pause:{id:"pause",label:{en:"Pause",fr:"Mettre en pause"},icon:"pause",key:null,tone:"default",toggle:"resume",toast:null},resume:{id:"resume",label:{en:"Resume",fr:"Reprendre"},icon:"play",key:null,tone:"default",toggle:"pause",toast:null},enable:{id:"enable",label:{en:"Enable",fr:"Activer"},icon:"toggle-right",key:null,tone:"default",toggle:"disable",toast:null},disable:{id:"disable",label:{en:"Disable",fr:"D\xE9sactiver"},icon:"toggle-left",key:null,tone:"default",toggle:"enable",toast:null},waiting:{id:"waiting",label:{en:"Waiting",fr:"En attente"},icon:"hourglass",key:"w",tone:"default",toast:null,managerOnly:!0}});function HY(e){return typeof e=="string"&&Object.prototype.hasOwnProperty.call(xT,e)}function $ct(e,t){let n=xT[e].toast;return n?lr(t===1?n.one:n.other,{n:t}):null}function $Se(e){if(typeof e=="string")return WSe(e);let t=Object.prototype.hasOwnProperty.call(e,"toast")&&!e.toast,n=HY(e.id)?{...WSe(e.id),...Uct(e)}:{...e};return t&&(n.toast=null),n}function Gl(e){return typeof e=="string"?{en:e,fr:e}:e}function WSe(e){let t=xT[e];return{id:e,label:t.label,icon:t.icon,key:t.key??void 0,tone:t.tone,toast:t.toast?n=>$ct(e,n):void 0,...t.toggle?{toggle:t.toggle}:{}}}function Uct(e){let t={};for(let[n,r]of Object.entries(e))r!==void 0&&(t[n]=r);return t}var En=Object.freeze({open:{en:"Open",fr:"Ouvrir"},back:{en:"Back",fr:"Retour"},close:{en:"Close",fr:"Fermer"},previous:{en:"Previous",fr:"Pr\xE9c\xE9dent"},next:{en:"Next",fr:"Suivant"},more:{en:"More",fr:"Plus"},clear:{en:"Clear",fr:"Effacer"},removeNamed:{en:"Remove {name}",fr:"Retirer {name}"},savingNamed:{en:"Saving {name}",fr:"Enregistrement de {name}"},clearSelection:{en:"Clear selection",fr:"Effacer la s\xE9lection"},undo:{en:"Undo",fr:"Annuler"},select:{en:"Select",fr:"S\xE9lectionner"},selectAll:{en:"Select all",fr:"Tout s\xE9lectionner"},extendSelection:{en:"Extend selection",fr:"\xC9tendre la s\xE9lection"},closeThenClear:{en:"Close, then clear selection",fr:"Fermer, puis effacer la s\xE9lection"},showShortcuts:{en:"Show shortcuts",fr:"Afficher les raccourcis"},search:{en:"Search",fr:"Rechercher"},tryAgain:{en:"Try again",fr:"R\xE9essayer"},selectedOne:{en:"1 selected",fr:"1 s\xE9lectionn\xE9"},selectedMany:{en:"{n} selected",fr:"{n} s\xE9lectionn\xE9s"},sidePeek:{en:"Side peek",fr:"Aper\xE7u lat\xE9ral"},centerPeek:{en:"Center peek",fr:"Aper\xE7u centr\xE9"},fullPage:{en:"Full page",fr:"Pleine page"},openAs:{en:"Open as",fr:"Ouvrir en"}});function USe(e){return e===1?En.selectedOne:lr(En.selectedMany,{n:e})}var Ny=Object.freeze({title:{en:"Keyboard shortcuts",fr:"Raccourcis clavier"},groupSpace:{en:"This Space",fr:"Ce Space"},groupNotis:{en:"Notis",fr:"Notis"},close:{en:"Close",fr:"Fermer"},empty:{en:"No shortcuts here.",fr:"Aucun raccourci ici."}});var oi=(e,t,n,r,i,o={})=>Object.freeze({id:e,keys:Object.freeze(t),scope:n,label:Object.freeze({en:r,fr:i}),...o}),Xa=Object.freeze({"list.next":oi("list.next",["j","arrowdown"],"collection","Next item","\xC9l\xE9ment suivant",{repeat:!0}),"list.prev":oi("list.prev",["k","arrowup"],"collection","Previous item","\xC9l\xE9ment pr\xE9c\xE9dent",{repeat:!0}),"list.extendDown":oi("list.extendDown",["shift+j","shift+arrowdown"],"collection","Extend selection down","\xC9tendre la s\xE9lection vers le bas",{repeat:!0}),"list.extendUp":oi("list.extendUp",["shift+k","shift+arrowup"],"collection","Extend selection up","\xC9tendre la s\xE9lection vers le haut",{repeat:!0}),"list.open":oi("list.open",["enter","o"],"collection","Open","Ouvrir"),"list.toggleSelect":oi("list.toggleSelect",["x"],"collection","Select","S\xE9lectionner"),"list.selectAll":oi("list.selectAll",["mod+a"],"collection","Select all","Tout s\xE9lectionner"),"period.prev":oi("period.prev",["["],"collection","Previous period","P\xE9riode pr\xE9c\xE9dente"),"period.next":oi("period.next",["]"],"collection","Next period","P\xE9riode suivante"),"period.today":oi("period.today",["t"],"collection","Today","Aujourd\u2019hui"),undo:oi("undo",["z","mod+z"],"route","Undo","Annuler"),"view.prev":oi("view.prev",["["],"route","Previous view","Vue pr\xE9c\xE9dente"),"view.next":oi("view.next",["]"],"route","Next view","Vue suivante"),"host.help":oi("host.help",["?"],"app","Show keyboard shortcuts","Afficher les raccourcis clavier",{host:!0}),"host.escape":oi("host.escape",["escape"],"app","Close, then go back","Fermer, puis revenir",{host:!0}),"host.search":oi("host.search",["/"],"app","Search","Rechercher",{host:!0}),"host.newChat":oi("host.newChat",["c"],"app","New conversation","Nouvelle conversation",{host:!0}),"host.call":oi("host.call",["shift+c"],"app","Open voice call","Ouvrir l\u2019appel vocal",{host:!0}),"host.toggleSidebar":oi("host.toggleSidebar",["mod+s"],"app","Toggle sidebar","Afficher ou masquer la barre lat\xE9rale",{host:!0}),"host.voiceMessage":oi("host.voiceMessage",["mod+d"],"app","Voice message","Message vocal",{host:!0}),"host.modelMenu":oi("host.modelMenu",["alt+p"],"app","Model menu","Menu du mod\xE8le",{host:!0}),"host.speedMenu":oi("host.speedMenu",["alt+s"],"app","Speed menu","Menu de vitesse",{host:!0}),"host.toggleVoiceCall":oi("host.toggleVoiceCall",["shift+tab"],"app","Toggle voice call in panel","Afficher ou masquer l\u2019appel vocal dans le panneau",{host:!0}),"host.commandMenu":oi("host.commandMenu",["mod+k"],"app","Command menu","Menu des commandes",{host:!0}),"host.goInbox":oi("host.goInbox",["g i"],"app","Go to Inbox","Aller \xE0 l\u2019Inbox",{host:!0,managerOnly:!0}),"host.goStarred":oi("host.goStarred",["g s"],"app","Go to Starred","Aller aux Favoris",{host:!0,managerOnly:!0}),"host.goDone":oi("host.goDone",["g d"],"app","Go to Done","Aller \xE0 Termin\xE9",{host:!0,managerOnly:!0})});var Kct=["mac","other"];function jY(e){let t=new Map;for(let n of cr(e))for(let r of Kct)t.set(`${r}:${Ss(n,r)}`,Ss(n,"mac"));return t}function Jg(e){return e.owner??"notis"}function qct(e){return e.ownerKind?e.ownerKind:Jg(e)==="notis"?"host":"space"}function c6(e){let t=[],n=qct(e)==="space";for(let r of cr(e.keys)){try{ql(r)}catch(i){t.push({kind:"invalid",severity:"error",key:r,ids:[e.id],scope:e.scope,owner:Jg(e),message:i.message});continue}n&&FSe(r)&&t.push({kind:"reserved",severity:"error",key:Ss(r),ids:[e.id],scope:e.scope,owner:Jg(e),message:`"${e.id}" uses ${Ss(r)}, which Notis keeps for itself. Pick another key.`})}return n&&e.scope==="app"&&t.push({kind:"app-scope",severity:"error",key:cr(e.keys).join(", "),ids:[e.id],scope:"app",owner:Jg(e),message:`"${e.id}" registers at app scope, which only Notis uses. Use route or a lower scope.`}),t}function KSe(e){try{return jY(e)}catch{return new Map}}function qSe(e,t){if(e.available===!1||t.available===!1)return[];let n=KSe(e.keys),r=KSe(t.keys),i=new Set;for(let[s,l]of r)n.has(s)&&i.add(l);let o=[],a=Jg(e)===Jg(t);for(let s of i)if(e.scope===t.scope&&a)o.push({kind:"duplicate",severity:"error",key:s,ids:[e.id,t.id],scope:t.scope,owner:Jg(t),message:`NotisKeyClash: "${e.id}" and "${t.id}" both use ${s} in the ${t.scope} scope.`});else if(e.scope!==t.scope){let[l,c]=yT[e.scope]<yT[t.scope]?[e,t]:[t,e];o.push({kind:"shadowed",severity:"info",key:s,ids:[c.id,l.id],scopes:[c.scope,l.scope],message:`${s}: "${c.id}" (${c.scope}) is asked before "${l.id}" (${l.scope}).`})}if(e.scope===t.scope&&a)for(let[s,l]of[[e,t],[t,e]])for(let c of cr(s.keys))for(let u of cr(l.keys)){let d,f;try{d=ql(c),f=ql(u)}catch{continue}d.length!==1||f.length<2||Ss(c)===Ss(u).split(" ")[0]&&o.push({kind:"prefix",severity:"info",key:Ss(c),ids:[s.id,l.id],scope:s.scope,owner:Jg(s),message:`${Ss(c)} runs "${s.id}" at once, so "${l.id}" (${Ss(u)}) never starts.`})}return o}var Gct=new Set(["button","checkbox","color","file","hidden","image","radio","reset","submit"]);function VY(e){return!!e&&typeof e.matches=="function"}function u6(e){let n=(typeof e.composedPath=="function"?e.composedPath():[]).find(VY);return n||(VY(e.target)?e.target:null)}function Bd(e,t){let n=e;for(;n;){let r=n.closest(t);if(r)return r;let i=n.getRootNode();n="host"in i?i.host:null}return null}function Ru(e,t){let n=t;for(;n&&e;){if(e.contains(n))return!0;let r=n.getRootNode();n="host"in r?r.host:null}return!1}function GSe(e){if(!e)return!1;let t=e.tagName;return t==="TEXTAREA"||t==="SELECT"?!0:t==="INPUT"?!Gct.has((e.type||"text").toLowerCase()):e.isContentEditable?!0:Bd(e,'[contenteditable=""], [contenteditable="true"], [contenteditable="plaintext-only"], [role="textbox"], [role="combobox"], [role="searchbox"]')!==null}function YSe(e){return!e||!GSe(e)?!1:Bd(e,"[data-notis-floating]")?e.getAttribute("aria-expanded")==="true":!0}function Yct(e){if(!e)return!1;let t=Bd(e,'[role="menu"], [role="listbox"], [role="menubar"]');return!t||t.hasAttribute("data-notis-engine-list")?!1:t.getAttribute("data-state")!=="closed"}function XSe(e,t){return t.inFields?!1:!!(GSe(e)||!t.modal&&Yct(e))}function ZSe(e){return Bd(e,'button, a[href], [role="button"], [role="switch"], [role="checkbox"], [role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"], summary, input[type="checkbox"], input[type="radio"]')!==null}function QSe(e){return Bd(e,'input[type="range"], [role="slider"], [role="tablist"], [role="radiogroup"], [role="spinbutton"], [role="separator"][tabindex], [role="tree"], [role="grid"]')!==null}function d6(e){return Bd(e,'[data-notis-keys="off"]')!==null}function Uo(e){if(!e?.isConnected)return!1;let t=e;for(;t;){if(t.hasAttribute("hidden")||t.hasAttribute("inert")||t.getAttribute("aria-hidden")==="true")return!1;let n=t.ownerDocument.defaultView?.getComputedStyle(t);if(n?.display==="none"||n?.visibility==="hidden")return!1;let r=t.getRootNode();t=t.parentElement??("host"in r?r.host:null)}return!0}function Xct(e){let t=[e],n=r=>{let i=e.createTreeWalker(r,1);for(let o=i.nextNode();o;o=i.nextNode()){let a=o.shadowRoot;a&&(t.push(a),n(a))}};return n(e),t}function JSe(e,t,n){let r=new Set;for(let i of Xct(e))for(let o of i.querySelectorAll(t))r.add(o);if(n&&typeof n.composedPath=="function")for(let i of n.composedPath())VY(i)&&i.matches(t)&&r.add(i);return[...r]}var eCe=['[role="dialog"][aria-modal="true"]','[role="dialog"][data-state="open"]','[role="alertdialog"]:not([data-state="closed"])',"dialog.notis-dialog[open]",'dialog[open][aria-modal="true"]','[role="menu"][data-state="open"]','[role="listbox"][data-state="open"]'].join(", ");function kT(e,t){return JSe(e,eCe,t).filter(n=>!n.closest("[data-notis-nonmodal]")&&Uo(n))}function tCe(e,t){return kT(e,t).length>0}function WY(e){let t=e;for(;t;){let n=Bd(t,eCe);if(!n)return null;if(!n.closest("[data-notis-nonmodal]"))return n;let r=n.getRootNode();t=n.parentElement??("host"in r?r.host:null)}return null}var Zct='dialog[open], [role="dialog"]:not([data-state="closed"]), [role="alertdialog"]:not([data-state="closed"]), [role="menu"]:not([data-state="closed"]), [role="listbox"][data-state="open"]';function nCe(e,t){return JSe(e,Zct,t).filter(n=>!n.closest("[data-notis-escape-owned]")&&Uo(n))}var Za="notis",ST=class extends Error{clash;constructor(t){super(t.message.startsWith("NotisKeyClash")?t.message:`NotisKeyClash: ${t.message}`),this.name="NotisKeyClash",this.clash=t}},Qct=99,Zx=class{entries=[];owners=new Map;seq=0;version=0;listeners=new Set;warned=new Set;options;constructor(t={}){this.options={strict:t.strict??!0,onClash:t.onClash}}subscribe(t){return this.listeners.add(t),()=>{this.listeners.delete(t)}}getVersion(){return this.version}notify(){this.version+=1;for(let t of[...this.listeners])t()}defineOwner(t,n={}){if(t===Za)return()=>{};let r=n.parent??Za,i=this.owners.get(t);i?(i.refs+=1,i.parent=r,n.kind&&(i.kind=n.kind),n.available!==void 0&&i.available!==n.available&&(i.available=n.available)):this.owners.set(t,{id:t,parent:r,kind:n.kind??this.inheritedKind(r),available:n.available??!0,refs:1}),this.notify();let o=!1;return()=>{if(o)return;o=!0;let a=this.owners.get(t);a&&(a.refs-=1,a.refs<=0&&this.owners.delete(t),this.notify())}}setOwnerAvailable(t,n){let r=this.owners.get(t);!r||r.available===n||(r.available=n,this.notify())}inheritedKind(t){return t===Za?"space":this.owners.get(t)?.kind??"space"}ownerKind(t){return t===Za?"host":this.owners.get(t)?.kind??"space"}isOwnerAvailable(t){let n=t,r=new Set;for(;n&&n!==Za&&!r.has(n);){r.add(n);let i=this.owners.get(n);if(!i)return!0;if(!i.available)return!1;n=i.parent}return!0}register(t,n=t.owner??Za){let r=this.ownerKind(n),i=this.candidate(t,n,r),o=c6(i).filter(c=>c.severity==="error");if(o.length)return this.reject(o[0]),null;if(this.isOwnerAvailable(n))for(let c of this.entries){if(c.owner!==n||c.def.scope!==t.scope||!this.isOwnerAvailable(c.owner))continue;let u=qSe(this.candidate(c.def,c.owner,c.ownerKind),i).find(d=>d.kind==="duplicate");if(u)return this.reject(u),null}let a=Math.max(0,Math.min(Qct,t.boost??0)),s={def:t,owner:n,ownerKind:r,seq:++this.seq,rank:yT[t.scope]+a,chords:cr(t.keys).map(c=>ql(c))};this.entries.push(s),this.notify();let l=!1;return()=>{if(l)return;l=!0;let c=this.entries.indexOf(s);c!==-1&&this.entries.splice(c,1),this.notify()}}candidate(t,n,r){return{id:t.id,keys:t.keys,scope:t.scope,owner:n,ownerKind:r,available:!0}}reject(t){if(this.options.strict)throw new ST(t);if(this.warned.has(t.message))return;this.warned.add(t.message),(this.options.onClash??(r=>{typeof console<"u"&&console.warn(`[notis keys] ${r} The later shortcut was ignored.`)}))(t.message)}all(){return this.entries}active(t={}){return this.entries.filter(n=>(!t.modalOnly||n.def.scope==="modal")&&this.isOwnerAvailable(n.owner)).sort((n,r)=>r.rank-n.rank||r.seq-n.seq)}helpEntries(){let t=new Map,n=[...this.entries].sort((i,o)=>i.seq-o.seq);for(let i of n){let{def:o}=i;if(o.hidden||o.scope==="modal"||!this.isOwnerAvailable(i.owner)||o.when&&!CT(o.when))continue;let a=o.group??(i.ownerKind==="space"?"space":"notis");t.delete(o.id),t.set(o.id,{id:o.id,keys:cr(o.keys),label:o.label,group:a,scope:o.scope,owner:i.owner})}let r=[...t.values()];return[...r.filter(i=>i.group==="space"),...r.filter(i=>i.group==="notis")]}helpText(t){return this.helpEntries().map(n=>({group:n.group,label:n.label[t],keys:n.keys}))}};function CT(e){try{return e()!==!1}catch{return!1}}var gi=Object.freeze({route:0,detail:100,selection:200,help:300,overlay:400}),$Y=1500;function ET(){if(typeof navigator>"u")return"other";let e=navigator,t=e.userAgentData?.platform||e.platform||e.userAgent||"";return/mac|iphone|ipad|ipod/i.test(t)?"mac":"other"}function _T(){if(typeof document>"u")return"en";let e=document.querySelector("html")?.getAttribute("lang")??"";return/^fr\b/i.test(e)?"fr":"en"}function Jct(){try{return!1}catch{return!0}}function Qx(e,t=!1){e.preventDefault(),t?e.stopImmediatePropagation():e.stopPropagation()}function eut(e){return e.key==="Escape"&&!e.metaKey&&!e.ctrlKey&&!e.altKey&&!e.shiftKey}var Jx=class{registry;settings;mounted=0;now=()=>Date.now();layers=[];blockers=[];seq=0;held=new Set;pending=null;attached=new Map;helpOpen=!1;helpUnregister=null;forcedRepeat=new WeakSet;constructor(t={}){this.settings={host:t.host??"portal",locale:t.locale??_T(),platform:t.platform??ET(),strict:t.strict??Jct(),onClash:t.onClash},this.registry=new Zx({strict:this.settings.strict,onClash:this.settings.onClash})}configure(t,n={}){let r={...this.settings};for(let[o,a]of Object.entries(t))a!==void 0&&(r[o]=a);let i=Object.keys(r).some(o=>r[o]!==this.settings[o]);return this.settings=r,this.registry.options={strict:r.strict,onClash:r.onClash},i&&!n.silent&&this.registry.notify(),i}subscribe(t){return this.registry.subscribe(t)}getVersion(){return this.registry.getVersion()}attach(t){let n=this.attached.get(t);if(n)n.refs+=1;else{let i=l=>this.handleKeyDown(l),o=l=>this.handleKeyUp(l),a=()=>this.resetHeld(),s=()=>{t.visibilityState==="hidden"&&this.resetHeld()};t.addEventListener("keydown",i,!0),t.addEventListener("keyup",o,!0),t.addEventListener("visibilitychange",s),t.defaultView?.addEventListener("blur",a),this.attached.set(t,{refs:1,detach:()=>{t.removeEventListener("keydown",i,!0),t.removeEventListener("keyup",o,!0),t.removeEventListener("visibilitychange",s),t.defaultView?.removeEventListener("blur",a)}})}this.ensureHelpShortcut();let r=!1;return()=>{if(r)return;r=!0;let i=this.attached.get(t);i&&(i.refs-=1,i.refs<=0&&(i.detach(),this.attached.delete(t)))}}isAttached(t){return this.attached.has(t)}attachedDocument(){for(let t of this.attached.keys())return t;return null}resetHeld(){this.held.clear(),this.pending=null}register(t,n){return this.registry.register(t,n??t.owner??Za)}defineOwner=(t,n)=>this.registry.defineOwner(t,n);setOwnerAvailable(t,n){this.registry.setOwnerAvailable(t,n)}isOwnerAvailable(t){return this.registry.isOwnerAvailable(t)}addEscapeLayer(t,n,r=gi.overlay){let i={id:t,onEscape:n,priority:r,seq:++this.seq};return this.layers.push(i),()=>{let o=this.layers.indexOf(i);o!==-1&&this.layers.splice(o,1)}}addEscapeBlocker(t=gi.detail+50,n){let r={priority:t,seq:++this.seq,isActive:n};return this.blockers.push(r),()=>{let i=this.blockers.indexOf(r);i!==-1&&this.blockers.splice(i,1)}}escapeLayerIds(){return this.sortedLayers().map(t=>t.id)}sortedLayers(){return[...this.layers].sort((t,n)=>n.priority-t.priority||n.seq-t.seq)}runEscapeChain(t){let n=this.blockers.filter(i=>!i.isActive||i.isActive()),r=n.reduce((i,o)=>Math.max(i,o.priority),-1/0);for(let i of this.sortedLayers()){if(i.priority<r)return!0;let o=!1;try{o=i.onEscape(t)===!0}catch(a){rCe(a),o=!0}if(o)return!0}return n.length>0}isHelpOpen(){return this.helpOpen}openHelp(){this.helpOpen||(this.helpOpen=!0,this.registry.notify())}closeHelp(){this.helpOpen&&(this.helpOpen=!1,this.registry.notify())}toggleHelp(){this.helpOpen?this.closeHelp():this.openHelp()}ensureHelpShortcut(){if(this.helpUnregister)return;let t=Xa["host.help"];this.helpUnregister=this.registry.register({id:t.id,keys:[...t.keys],scope:"app",label:t.label,group:"notis",run:()=>{this.toggleHelp()}},Za)}isRepeat(t){return t.repeat||this.forcedRepeat.has(t)}handleKeyUp(t){if(t.key==="Meta"){this.held.clear();return}this.held.delete(t.code||t.key)}handleKeyDown(t){if(t.isComposing||t.keyCode===229)return;let n=t.key;if(!n||n==="Dead"||n==="Process"||zSe(n))return;let r=t.code||n,i=t.repeat||this.held.has(r);if(t.metaKey||this.held.add(r),i&&!t.repeat){this.forcedRepeat.add(t);try{Object.defineProperty(t,"repeat",{value:!0,configurable:!0})}catch{}}let o=u6(t),a=o?.ownerDocument??(typeof document<"u"?document:null);if(!a||d6(o)||eut(t)&&this.handleEscape(t,o,a,i)||t.defaultPrevented)return;let s=n.toLowerCase();if(!t.metaKey&&!t.ctrlKey&&!t.altKey&&(s==="enter"||s===" ")&&ZSe(o)){this.pending=null;return}if(s.startsWith("arrow")&&QSe(o))return;let c=null,u=()=>c??=tCe(a,t),{platform:d}=this.settings,f=g=>{let{def:b}=g;return!(i&&!b.repeat||u()&&b.scope!=="modal"||XSe(o,{inFields:!!b.allowInFields,modal:b.scope==="modal"})||b.when&&!CT(b.when))},p=this.pending;if(this.pending=null,p&&!i&&this.now()-p.at<=$Y){let g=p.candidates.filter(({entry:b,chords:v})=>Dy(t,v[p.step],d)&&this.registry.all().includes(b)&&f(b));if(g.length){let b=g.filter(({chords:y})=>y.length===p.step+1);for(let{entry:y}of b)if(this.run(y,t)){Qx(t);return}let v=g.filter(({chords:y})=>y.length>p.step+1);if(v.length){this.pending={candidates:v,step:p.step+1,at:this.now()},Qx(t);return}}}let m=this.registry.active();for(let g of m)if(g.chords.some(b=>b.length===1&&Dy(t,b[0],d))&&f(g)&&this.run(g,t)){Qx(t);return}if(i)return;let h=[];for(let g of m)for(let b of g.chords)b.length>1&&Dy(t,b[0],d)&&f(g)&&h.push({entry:g,chords:b});h.length&&(this.pending={candidates:h,step:1,at:this.now()},Qx(t))}run(t,n){try{return t.def.run(n)!==!1}catch(r){return rCe(r),!0}}handleEscape(t,n,r,i){if(this.pending=null,YSe(n))return!0;let o=nCe(r,t);if(i)return(o.length||this.layers.length)&&Qx(t,!0),!0;if(t.defaultPrevented||o.length)return!0;if(!this.layers.length&&!this.blockers.length)return!1;let a=this.runEscapeChain(t);return a&&Qx(t),a}};function rCe(e){typeof console<"u"&&console.error("[notis keys] A shortcut failed.",e)}var f6=B(V(),1);var iCe=Symbol.for("notis.sdk.ui.instance");function tut(){return Object.freeze({version:1,core:new Jx,EngineContext:(0,f6.createContext)(null),OwnerContext:(0,f6.createContext)(Za),KeycapContext:(0,f6.createContext)(null)})}var Ly=null;function zd(){if(Ly)return Ly;let e=globalThis,t=e[iCe];if(t&&t.version===1)return typeof console<"u"&&console.warn("[notis keys] A second copy of the Notis toolkit loaded. It shares the first keyboard engine."),Ly=t,Ly;Ly=tut();try{Object.defineProperty(e,iCe,{value:Ly,configurable:!0,enumerable:!1,writable:!1})}catch{}return Ly}var oCe=typeof window>"u"?Vi.useEffect:Vi.useLayoutEffect;function sl(){let e=zd();return(0,Vi.useContext)(e.EngineContext)??e.core}function Fd(){return(0,Vi.useContext)(zd().OwnerContext)}function ek(e){let t=sl(),n=()=>e(t);return(0,Vi.useSyncExternalStore)((0,Vi.useCallback)(r=>t.subscribe(r),[t]),n,n)}function bi(){return ek(e=>e.mounted>0?e.settings.locale:_T())}function $c(){return ek(e=>e.mounted>0?e.settings.platform:ET())}function aCe(){let e=bi(),t=$c(),n=sl(),r=ek(o=>o.settings.host),i=ek(o=>o.settings.strict);return{host:r,locale:e,platform:t,strict:i,onClash:n.settings.onClash}}function sCe(e,t){return JSON.stringify([e.id,cr(e.keys),e.scope,e.owner??t,e.group??"",!!e.hidden,!!e.repeat,!!e.allowInFields,e.boost??0,e.label.en,e.label.fr])}function lCe(e){return{...e.current,when:()=>{let n=e.current.when;return n?n():!0},run:n=>e.current.run(n)}}function p6(e,t=[]){let n=sl(),r=Fd(),i=(0,Vi.useRef)(e);i.current=e;let o=sCe(e,r);(0,Vi.useEffect)(()=>{let a=n.register(lCe(i),i.current.owner??r);return()=>{a?.()}},[n,r,o,...t])}function ao(e,t=[]){let n=sl(),r=Fd(),i=(0,Vi.useRef)(e);i.current=e;let o=e.map(a=>sCe(a,r)).join(`
914
914
  `);(0,Vi.useEffect)(()=>{let a=i.current.map((s,l)=>{let c={get current(){return i.current[l]??s}};return n.register(lCe(c),s.owner??r)});return()=>{for(let s of a)s?.()}},[n,r,o,...t])}function m6(e,t){let n=sl(),r=Fd(),{available:i,kind:o}=t,a=(0,Vi.useRef)(i);return a.current=i,oCe(()=>n.defineOwner(e,{parent:r,kind:o,available:a.current}),[n,e,r,o]),oCe(()=>{n.setOwnerAvailable(e,i)},[n,e,i]),{owner:e,available:i,isAvailable:()=>n.isOwnerAvailable(e)}}function so(e,t,n={}){let r=sl(),i=Fd(),o=(0,Vi.useRef)(t);o.current=t;let a=n.priority??gi.overlay,s=n.enabled??!0;(0,Vi.useEffect)(()=>{if(s)return r.addEscapeLayer(e,l=>r.isOwnerAvailable(i)&&o.current(l),a)},[r,i,e,a,s])}function cCe(e,t={}){let n=sl(),r=Fd(),i=t.priority??gi.detail+50;(0,Vi.useEffect)(()=>e?n.addEscapeBlocker(i,()=>n.isOwnerAvailable(r)):void 0,[n,r,e,i])}function TT(){let e=sl(),t=ek(n=>n.isHelpOpen());return{open:(0,Vi.useCallback)(()=>e.openHelp(),[e]),close:(0,Vi.useCallback)(()=>e.closeHelp(),[e]),toggle:(0,Vi.useCallback)(()=>e.toggleHelp(),[e]),isOpen:t}}function h6(){return ek(e=>e.getVersion())}var tk=B(ae(),1),uCe=typeof window>"u"?AT.useEffect:AT.useLayoutEffect;function dCe(e){let t=zd(),n=e.engine??t.core,{host:r,locale:i,platform:o,strict:a,onClash:s}=e;n.configure({host:r,locale:i,platform:o,strict:a,onClash:s},{silent:!0}),uCe(()=>{n.registry.notify()},[n,r,i,o,a]),uCe(()=>(n.mounted+=1,n.registry.notify(),()=>{n.mounted-=1,n.registry.notify()}),[n]);let l=e.document??(typeof document<"u"?document:void 0);(0,AT.useEffect)(()=>l?n.attach(l):void 0,[n,l]);let c=e.children??null;return e.engine?(0,tk.jsx)(t.EngineContext.Provider,{value:e.engine,children:c}):(0,tk.jsx)(tk.Fragment,{children:c})}function nk({owner:e,available:t,kind:n,children:r}){let{OwnerContext:i}=zd();return m6(e,{available:t,kind:n}),(0,tk.jsx)(i.Provider,{value:e,children:r})}var Hd=B(ae(),1),UY=class extends eb.default.Component{constructor(t){super(t),this.state={error:null,resetKey:t.resetKey}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return t.resetKey!==n.resetKey?{error:null,resetKey:t.resetKey}:null}componentDidCatch(t,n){this.props.onError(t,n)}render(){return this.state.error?this.props.fallback(this.state.error):this.props.children}};function nut({mount:e,onCommit:t,children:n}){return(0,eb.useLayoutEffect)(()=>{if(!t)return;let r=()=>t?.(!!e.querySelector("[data-notis-app-root]")?.childNodes.length);r();let i=e.ownerDocument.defaultView?.MutationObserver,o=i?new i(r):null;return o?.observe(e,{childList:!0,subtree:!0,characterData:!0}),()=>o?.disconnect()},[e,t]),n}function pCe({mount:e,runtime:t,component:n,shell:r,theme:i,resetKey:o,active:a=!0,fallback:s,onError:l,onCommit:c,boundsCss:u,onProtocolError:d}){let f=`space:presentation:${(0,eb.useId)()}`,p=(0,eb.useCallback)(()=>{if(!a||!e?.isConnected)return!1;let m=e;for(;m;){let h=m.ownerDocument.defaultView?.getComputedStyle(m);if(m.hidden||m.hasAttribute("inert")||m.getAttribute("aria-hidden")==="true"||h?.display==="none"||h?.visibility==="hidden")return!1;let g=m.getRootNode();m=m.parentElement||("host"in g?g.host:null)}return!0},[a,e]);return(0,Hd.jsx)(UY,{resetKey:o,fallback:s,onError:l,children:e&&t&&n?(0,fCe.createPortal)((0,Hd.jsxs)(nut,{mount:e,onCommit:c,children:[u?(0,Hd.jsx)("style",{"data-notis-runtime-bounds":!0,children:u}):null,(0,Hd.jsx)(nk,{owner:f,kind:"space",available:p(),children:(0,Hd.jsx)(a6,{runtime:t,onProtocolError:d,shortcutsAvailable:p,children:(0,Hd.jsx)("div",{"data-notis-app-root":!0,"data-notis-theme":i.mode,style:i.style,children:r?(0,Hd.jsx)(r,{children:(0,Hd.jsx)(n,{})}):(0,Hd.jsx)(n,{})})})})]}),e):null})}function rut(e){if(!e||typeof e!="object")return;let t=e,n=t.record_key??t.recordKey;return typeof n=="string"?n:void 0}function mCe(e,t,n){let r=a=>{let s=a.filter(l=>{let c=rut(l);return c===void 0||!t(c)?!0:(n.push(c),!1)});return s.length===a.length?a:s};if(Array.isArray(e))return r(e);if(!e||typeof e!="object")return e;let i=e,o=i;for(let a of["rows","documents"]){let s=i[a];if(!Array.isArray(s))continue;let l=r(s);l!==s&&(o={...o,[a]:l})}return o}var g6=Object.freeze({data:void 0,hasData:!1,isFetching:!1,error:null,updatedAt:0,invalidation:0});function lp(e){if(e instanceof Date)return JSON.stringify(e.toISOString());if(Array.isArray(e))return`[${e.map(lp).join(",")}]`;if(e&&typeof e=="object"){let t=e;return`{${Object.keys(t).filter(n=>t[n]!==void 0).sort().map(n=>`${JSON.stringify(n)}:${lp(t[n])}`).join(",")}}`}return JSON.stringify(e)??"null"}function KY(e=2){let t=0,n=[];function r(){for(;t<e&&n.length;)n.shift()()}return i=>new Promise((o,a)=>{n.push(()=>{t+=1,Promise.resolve().then(i).then(o,a).finally(()=>{t-=1,r()})}),r()})}function rk(e={}){let t=new Map,n=e.now??Date.now,r=e.maxEntries??100,i=e.schedule??KY(2),o=0,a=!1,s=0,l=0,c=new Map;function u(b){for(let[v,y]of t){if(t.size<=r)break;v!==b&&!y.listeners.size&&!y.pending&&t.delete(v)}}function d(b){let v=t.get(b);return v||(v={raw:g6,snapshot:g6,removed:"",dataSeq:0,listeners:new Set,generation:0},t.set(b,v)),t.delete(b),t.set(b,v),u(b),v}function f(b,v){let y=[],w=c.size&&b.raw.hasData?mCe(b.raw.data,x=>{if(!c.has(x))return!1;let S=c.get(x);return S==null||b.dataSeq<S},y):b.raw.data,k=y.sort().join("\0");return!v&&b.removed===k?!1:(b.removed=k,b.snapshot=w===b.raw.data?b.raw:{...b.raw,data:w},!0)}function p(b,v){b.raw=v,f(b,!0);for(let y of b.listeners)y()}function m(){for(let[b,v]of c){if(v===null)continue;let y=!1;for(let w of t.values()){if(w.pending&&w.pendingSeq!==void 0&&w.pendingSeq<v){y=!0;break}if(w.dataSeq>=v||!w.raw.hasData)continue;let k=[];if(mCe(w.raw.data,x=>x===b,k),k.length){y=!0;break}}y||c.delete(b)}}function h(){for(let b of t.values())if(f(b,!1))for(let v of b.listeners)v()}let g={getSnapshot(b){return t.get(b)?.snapshot??g6},subscribe(b,v){let y=d(b);return y.listeners.add(v),()=>{y.listeners.delete(v),u()}},fetch(b,v,y={}){if(a)return Promise.reject(new Ya("scopeUnavailable"));let w=d(b);if(w.pending)return w.pending;if(!y.force&&w.snapshot.hasData&&w.snapshot.updatedAt>0&&n()-w.snapshot.updatedAt<(y.staleTimeMs??3e4))return Promise.resolve(w.snapshot.data);let k=++w.generation,x=o,S=++l,T=()=>o===x&&w.generation===k&&t.get(b)===w,R,C=new Promise((E,D)=>{R=setTimeout(()=>D(new Ya("timedOut")),e.readTimeoutMs??3e4),typeof R=="object"&&"unref"in R&&R.unref()}),M=Promise.race([Promise.resolve().then(v),C]).then(E=>(T()&&(w.dataSeq=S,p(w,{...w.raw,data:E,hasData:!0,isFetching:!1,error:null,updatedAt:n()}),c.size&&m()),E),E=>{let D=E instanceof Error?E:new Error(String(E));throw T()&&p(w,{...w.raw,isFetching:!1,error:D}),D}).finally(()=>{clearTimeout(R),w.pending===M&&(w.pending=void 0,w.pendingSeq=void 0),c.size&&m(),u()});return w.pending=M,w.pendingSeq=S,p(w,{...w.raw,isFetching:!0,error:null}),M},prefetch(b,v,y){let w=o;return i(()=>{if(o!==w)throw new Ya("scopeCleared");return g.fetch(b,v,y)})},getRevision:()=>s,invalidate(b){s+=1;for(let[v,y]of t)b!==void 0&&v!==b||(y.generation+=1,y.pending=void 0,y.pendingSeq=void 0,p(y,{...y.raw,updatedAt:0,isFetching:!1,invalidation:y.raw.invalidation+1}))},dispose(){a=!0,g.clear()},clear(){s+=1,o+=1;for(let b of t.values())b.generation+=1,b.pending=void 0,b.pendingSeq=void 0,b.dataSeq=0,p(b,{...g6,invalidation:b.raw.invalidation+1});for(let[b,v]of t)v.listeners.size||t.delete(b);m()},hideRecords(b){let v=[...new Set(b.filter(w=>typeof w=="string"&&w))];for(let w of v)c.set(w,null);h();let y=w=>w?v.filter(k=>w.includes(k)):v;return{commit(w){let k=++l;for(let x of y(w))c.get(x)===null&&c.set(x,k);m(),h()},restore(w){for(let k of y(w))c.delete(k);h()}}}};return g}function hCe(e,t){let n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}var iut=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,out=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,aut={};function b6(e,t){return((t||aut).jsx?out:iut).test(e)}var sut=/[ \t\n\f\r]/g;function qY(e){return typeof e=="object"?e.type==="text"?gCe(e.value):!1:gCe(e)}function gCe(e){return e.replace(sut,"")===""}var Gm=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};Gm.prototype.normal={};Gm.prototype.property={};Gm.prototype.space=void 0;function GY(e,t){let n={},r={};for(let i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Gm(n,r,t)}function MT(e){return e.toLowerCase()}var ya=class{constructor(t,n){this.attribute=n,this.property=t}};ya.prototype.attribute="";ya.prototype.booleanish=!1;ya.prototype.boolean=!1;ya.prototype.commaOrSpaceSeparated=!1;ya.prototype.commaSeparated=!1;ya.prototype.defined=!1;ya.prototype.mustUseProperty=!1;ya.prototype.number=!1;ya.prototype.overloadedBoolean=!1;ya.prototype.property="";ya.prototype.spaceSeparated=!1;ya.prototype.space=void 0;var RT={};wf(RT,{boolean:()=>Yt,booleanish:()=>Zi,commaOrSpaceSeparated:()=>Yl,commaSeparated:()=>Ym,number:()=>Ie,overloadedBoolean:()=>v6,spaceSeparated:()=>Er});var lut=0,Yt=By(),Zi=By(),v6=By(),Ie=By(),Er=By(),Ym=By(),Yl=By();function By(){return 2**++lut}var YY=Object.keys(RT),zy=class extends ya{constructor(t,n,r,i){let o=-1;if(super(t,n),bCe(this,"space",i),typeof r=="number")for(;++o<YY.length;){let a=YY[o];bCe(this,YY[o],(r&RT[a])===RT[a])}}};zy.prototype.defined=!0;function bCe(e,t,n){n&&(e[t]=n)}function Ou(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let o=new zy(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[MT(r)]=r,n[MT(o.attribute)]=r}return new Gm(t,n,e.space)}var XY=Ou({properties:{ariaActiveDescendant:null,ariaAtomic:Zi,ariaAutoComplete:null,ariaBusy:Zi,ariaChecked:Zi,ariaColCount:Ie,ariaColIndex:Ie,ariaColSpan:Ie,ariaControls:Er,ariaCurrent:null,ariaDescribedBy:Er,ariaDetails:null,ariaDisabled:Zi,ariaDropEffect:Er,ariaErrorMessage:null,ariaExpanded:Zi,ariaFlowTo:Er,ariaGrabbed:Zi,ariaHasPopup:null,ariaHidden:Zi,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Er,ariaLevel:Ie,ariaLive:null,ariaModal:Zi,ariaMultiLine:Zi,ariaMultiSelectable:Zi,ariaOrientation:null,ariaOwns:Er,ariaPlaceholder:null,ariaPosInSet:Ie,ariaPressed:Zi,ariaReadOnly:Zi,ariaRelevant:null,ariaRequired:Zi,ariaRoleDescription:Er,ariaRowCount:Ie,ariaRowIndex:Ie,ariaRowSpan:Ie,ariaSelected:Zi,ariaSetSize:Ie,ariaSort:null,ariaValueMax:Ie,ariaValueMin:Ie,ariaValueNow:Ie,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function y6(e,t){return t in e?e[t]:t}function w6(e,t){return y6(e,t.toLowerCase())}var vCe=Ou({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ym,acceptCharset:Er,accessKey:Er,action:null,allow:null,allowFullScreen:Yt,allowPaymentRequest:Yt,allowUserMedia:Yt,alpha:Yt,alt:null,as:null,async:Yt,autoCapitalize:null,autoComplete:Er,autoFocus:Yt,autoPlay:Yt,blocking:Er,capture:null,charSet:null,checked:Yt,cite:null,className:Er,closedBy:null,colorSpace:null,cols:Ie,colSpan:Ie,command:null,commandFor:null,content:null,contentEditable:Zi,controls:Yt,controlsList:Er,coords:Ie|Ym,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Yt,defer:Yt,dir:null,dirName:null,disabled:Yt,download:v6,draggable:Zi,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Yt,formTarget:null,headers:Er,height:Ie,hidden:v6,high:Ie,href:null,hrefLang:null,htmlFor:Er,httpEquiv:Er,id:null,imageSizes:null,imageSrcSet:null,inert:Yt,inputMode:null,integrity:null,is:null,isMap:Yt,itemId:null,itemProp:Er,itemRef:Er,itemScope:Yt,itemType:Er,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Yt,low:Ie,manifest:null,max:null,maxLength:Ie,media:null,method:null,min:null,minLength:Ie,multiple:Yt,muted:Yt,name:null,nonce:null,noModule:Yt,noValidate:Yt,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:Yt,optimum:Ie,pattern:null,ping:Er,placeholder:null,playsInline:Yt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Yt,referrerPolicy:null,rel:Er,required:Yt,reversed:Yt,rows:Ie,rowSpan:Ie,sandbox:Er,scope:null,scoped:Yt,seamless:Yt,selected:Yt,shadowRootClonable:Yt,shadowRootCustomElementRegistry:Yt,shadowRootDelegatesFocus:Yt,shadowRootMode:null,shadowRootSerializable:Yt,shape:null,size:Ie,sizes:null,slot:null,span:Ie,spellCheck:Zi,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ie,step:null,style:null,tabIndex:Ie,target:null,title:null,translate:null,type:null,typeMustMatch:Yt,useMap:null,value:Zi,width:Ie,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Er,axis:null,background:null,bgColor:null,border:Ie,borderColor:null,bottomMargin:Ie,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Yt,declare:Yt,event:null,face:null,frame:null,frameBorder:null,hSpace:Ie,leftMargin:Ie,link:null,longDesc:null,lowSrc:null,marginHeight:Ie,marginWidth:Ie,noResize:Yt,noHref:Yt,noShade:Yt,noWrap:Yt,object:null,profile:null,prompt:null,rev:null,rightMargin:Ie,rules:null,scheme:null,scrolling:Zi,standby:null,summary:null,text:null,topMargin:Ie,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ie,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Yt,disablePictureInPicture:Yt,disableRemotePlayback:Yt,exportParts:Ym,part:Er,prefix:null,property:null,results:Ie,security:null,unselectable:null},space:"html",transform:w6});var yCe=Ou({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",maskType:"mask-type",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:Yl,accentHeight:Ie,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ie,amplitude:Ie,arabicForm:null,ascent:Ie,attributeName:null,attributeType:null,azimuth:Ie,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ie,by:null,calcMode:null,capHeight:Ie,className:Er,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:Ie,diffuseConstant:Ie,direction:null,display:null,dur:null,divisor:Ie,dominantBaseline:null,download:Yt,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ie,enableBackground:null,end:null,event:null,exponent:Ie,externalResourcesRequired:null,fill:null,fillOpacity:Ie,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:Ym,g2:Ym,glyphName:Ym,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ie,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ie,horizOriginX:Ie,horizOriginY:Ie,id:null,ideographic:Ie,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ie,k:Ie,k1:Ie,k2:Ie,k3:Ie,k4:Ie,kernelMatrix:Yl,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ie,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Ie,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:Ie,overlineThickness:Ie,paintOrder:null,panose1:null,path:null,pathLength:Ie,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Er,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ie,pointsAtY:Ie,pointsAtZ:Ie,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Yl,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Yl,rev:Yl,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Yl,requiredFeatures:Yl,requiredFonts:Yl,requiredFormats:Yl,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:Ie,specularExponent:Ie,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ie,strikethroughThickness:Ie,string:null,stroke:null,strokeDashArray:Yl,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ie,strokeOpacity:Ie,strokeWidth:null,style:null,surfaceScale:Ie,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Yl,tabIndex:Ie,tableValues:null,target:null,targetX:Ie,targetY:Ie,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Yl,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ie,underlineThickness:Ie,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ie,values:null,vAlphabetic:Ie,vMathematical:Ie,vectorEffect:null,vHanging:Ie,vIdeographic:Ie,version:null,vertAdvY:Ie,vertOriginX:Ie,vertOriginY:Ie,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ie,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:y6});var ZY=Ou({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}});var QY=Ou({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:w6});var JY=Ou({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}});var eX={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"};var cut=/[A-Z]/g,wCe=/-[a-z]/g,uut=/^data[-\w.:]+$/i;function tX(e,t){let n=MT(t),r=t,i=ya;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&uut.test(t)){if(t.charAt(4)==="-"){let o=t.slice(5).replace(wCe,fut);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{let o=t.slice(4);if(!wCe.test(o)){let a=o.replace(cut,dut);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=zy}return new i(r,t)}function dut(e){return"-"+e.toLowerCase()}function fut(e){return e.charAt(1).toUpperCase()}var xCe=GY([XY,vCe,ZY,QY,JY],"html"),x6=GY([XY,yCe,ZY,QY,JY],"svg");function kCe(e){return e.join(" ").trim()}var BCe=B(DCe(),1);var S6=ICe("end"),ik=ICe("start");function ICe(e){return t;function t(n){let r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function iX(e){let t=ik(e),n=S6(e);if(t&&n)return{start:t,end:n}}function tb(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?NCe(e.position):"start"in e||"end"in e?NCe(e):"line"in e||"column"in e?oX(e):""}function oX(e){return LCe(e&&e.line)+":"+LCe(e&&e.column)}function NCe(e){return oX(e&&e.start)+"-"+oX(e&&e.end)}function LCe(e){return e&&typeof e=="number"?e:1}var lo=class extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},a=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(a=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){let l=r.indexOf(":");l===-1?o.ruleId=r:(o.source=r.slice(0,l),o.ruleId=r.slice(l+1))}if(!o.place&&o.ancestors&&o.ancestors){let l=o.ancestors[o.ancestors.length-1];l&&(o.place=l.position)}let s=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=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=s?s.line:void 0,this.name=tb(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=a&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};lo.prototype.file="";lo.prototype.name="";lo.prototype.reason="";lo.prototype.message="";lo.prototype.stack="";lo.prototype.column=void 0;lo.prototype.line=void 0;lo.prototype.ancestors=void 0;lo.prototype.cause=void 0;lo.prototype.fatal=void 0;lo.prototype.place=void 0;lo.prototype.ruleId=void 0;lo.prototype.source=void 0;var aX={}.hasOwnProperty,zut=new Map,Fut=/[A-Z]/g,Hut=new Set(["table","tbody","thead","tfoot","tr"]),jut=new Set(["td","th"]),zCe="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function sX(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Yut(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Gut(n,t.jsx,t.jsxs)}let i={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:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?x6:xCe,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=FCe(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function FCe(e,t,n){if(t.type==="element")return Vut(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Wut(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Uut(e,t,n);if(t.type==="mdxjsEsm")return $ut(e,t);if(t.type==="root")return Kut(e,t,n);if(t.type==="text")return qut(e,t)}function Vut(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=x6,e.schema=i),e.ancestors.push(t);let o=jCe(e,t.tagName,!1),a=Xut(e,t),s=cX(e,t);return Hut.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!qY(l):!0})),HCe(e,a,o,t),lX(a,s),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}function Wut(e,t){if(t.data&&t.data.estree&&e.evaluater){let r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}PT(e,t.position)}function $ut(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);PT(e,t.position)}function Uut(e,t,n){let r=e.schema,i=r;t.name==="svg"&&r.space==="html"&&(i=x6,e.schema=i),e.ancestors.push(t);let o=t.name===null?e.Fragment:jCe(e,t.name,!0),a=Zut(e,t),s=cX(e,t);return HCe(e,a,o,t),lX(a,s),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}function Kut(e,t,n){let r={};return lX(r,cX(e,t)),e.create(t,e.Fragment,r,n)}function qut(e,t){return t.value}function HCe(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function lX(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function Gut(e,t,n){return r;function r(i,o,a,s){let c=Array.isArray(a.children)?n:t;return s?c(o,a,s):c(o,a)}}function Yut(e,t){return n;function n(r,i,o,a){let s=Array.isArray(o.children),l=ik(r);return t(i,o,a,s,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function Xut(e,t){let n={},r,i;for(i in t.properties)if(i!=="children"&&aX.call(t.properties,i)){let o=Qut(e,i,t.properties[i]);if(o){let[a,s]=o;e.tableCellAlignToStyle&&a==="align"&&typeof s=="string"&&jut.has(t.tagName)?r=s:n[a]=s}}if(r){let o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Zut(e,t){let n={};for(let r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){let o=r.data.estree.body[0];o.type;let a=o.expression;a.type;let s=a.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else PT(e,t.position);else{let i=r.name,o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){let s=r.value.data.estree.body[0];s.type,o=e.evaluater.evaluateExpression(s.expression)}else PT(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function cX(e,t){let n=[],r=-1,i=e.passKeys?new Map:zut;for(;++r<t.children.length;){let o=t.children[r],a;if(e.passKeys){let l=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(l){let c=i.get(l)||0;a=l+"-"+c,i.set(l,c+1)}}let s=FCe(e,o,a);s!==void 0&&n.push(s)}return n}function Qut(e,t,n){let r=tX(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?hCe(n):kCe(n)),r.property==="style"){let i=typeof n=="object"?n:Jut(e,String(n));return e.stylePropertyNameCase==="css"&&(i=edt(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?eX[r.property]||r.property:r.attribute,n]}}function Jut(e,t){try{return(0,BCe.default)(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};let r=n,i=new lo("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=zCe+"#cannot-parse-style-attribute",i}}function jCe(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){let i=t.split("."),o=-1,a;for(;++o<i.length;){let s=b6(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};a=a?{type:"MemberExpression",object:a,property:s,computed:!!(o&&s.type==="Literal"),optional:!1}:s}r=a}else r=b6(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){let i=r.value;return aX.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);PT(e)}function PT(e,t){let n=new lo("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=zCe+"#cannot-handle-mdx-estrees-without-createevaluater",n}function edt(e){let t={},n;for(n in e)aX.call(e,n)&&(t[tdt(n)]=e[n]);return t}function tdt(e){let t=e.replace(Fut,ndt);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function ndt(e){return"-"+e.toLowerCase()}var DT={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"]};var lk=B(ae(),1),mEe=B(V(),1);var rdt={};function Hy(e,t){let n=t||rdt,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return WCe(e,r,i)}function WCe(e,t,n){if(idt(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return VCe(e.children,t,n)}return Array.isArray(e)?VCe(e,t,n):""}function VCe(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=WCe(e[i],t,n);return r.join("")}function idt(e){return!!(e&&typeof e=="object")}var $Ce=document.createElement("i");function ok(e){let t="&"+e+";";$Ce.innerHTML=t;let n=$Ce.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function co(e,t,n,r){let i=e.length,o=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);o<r.length;)a=r.slice(o,o+1e4),a.unshift(t,0),e.splice(...a),o+=1e4,t+=1e4}function ll(e,t){return e.length>0?(co(e,e.length,0,t),e):t}var UCe={}.hasOwnProperty;function C6(e){let t={},n=-1;for(;++n<e.length;)odt(t,e[n]);return t}function odt(e,t){let n;for(n in t){let i=(UCe.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n],a;if(o)for(a in o){UCe.call(i,a)||(i[a]=[]);let s=o[a];adt(i[a],Array.isArray(s)?s:s?[s]:[])}}}function adt(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);co(e,0,0,r)}function E6(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"\uFFFD":String.fromCodePoint(n)}function Cs(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var Ko=nb(/[A-Za-z]/),Qi=nb(/[\dA-Za-z]/),KCe=nb(/[#-'*+\--9=?A-Z^-~]/);function jy(e){return e!==null&&(e<32||e===127)}var IT=nb(/\d/),qCe=nb(/[\dA-Fa-f]/),GCe=nb(/[!-/:-@[-`{-~]/);function Qe(e){return e!==null&&e<-2}function Mn(e){return e!==null&&(e<0||e===32)}function Lt(e){return e===-2||e===-1||e===32}var Vy=nb(/\p{P}|\p{S}/u),cp=nb(/\s/);function nb(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Pu(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let o=e.charCodeAt(n),a="";if(o===37&&Qi(e.charCodeAt(n+1))&&Qi(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(a=String.fromCharCode(o));else if(o>55295&&o<57344){let s=e.charCodeAt(n+1);o<56320&&s>56319&&s<57344?(a=String.fromCharCode(o,s),i=1):a="\uFFFD"}else a=String.fromCharCode(o);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Rt(e,t,n,r){let i=r?r-1:Number.POSITIVE_INFINITY,o=0;return a;function a(l){return Lt(l)?(e.enter(n),s(l)):t(l)}function s(l){return Lt(l)&&o++<i?(e.consume(l),s):(e.exit(n),t(l))}}var YCe={tokenize:sdt};function sdt(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Rt(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),o(s)}function o(s){let l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,a(s)}function a(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return Qe(s)?(e.consume(s),e.exit("chunkText"),o):(e.consume(s),a)}}var ZCe={tokenize:ldt},XCe={tokenize:cdt};function ldt(e){let t=this,n=[],r=0,i,o,a;return s;function s(y){if(r<n.length){let w=n[r];return t.containerState=w[1],e.attempt(w[0].continuation,l,c)(y)}return c(y)}function l(y){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let w=t.events.length,k=w,x;for(;k--;)if(t.events[k][0]==="exit"&&t.events[k][1].type==="chunkFlow"){x=t.events[k][1].end;break}b(r);let S=w;for(;S<t.events.length;)t.events[S][1].end={...x},S++;return co(t.events,k+1,0,t.events.slice(w)),t.events.length=S,c(y)}return s(y)}function c(y){if(r===n.length){if(!i)return f(y);if(i.currentConstruct&&i.currentConstruct.concrete)return m(y);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(XCe,u,d)(y)}function u(y){return i&&v(),b(r),f(y)}function d(y){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,m(y)}function f(y){return t.containerState={},e.attempt(XCe,p,m)(y)}function p(y){return r++,n.push([t.currentConstruct,t.containerState]),f(y)}function m(y){if(y===null){i&&v(),b(0),e.consume(y);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),h(y)}function h(y){if(y===null){g(e.exit("chunkFlow"),!0),b(0),e.consume(y);return}return Qe(y)?(e.consume(y),g(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(y),h)}function g(y,w){let k=t.sliceStream(y);if(w&&k.push(null),y.previous=o,o&&(o.next=y),o=y,i.defineSkip(y.start),i.write(k),t.parser.lazy[y.start.line]){let x=i.events.length;for(;x--;)if(i.events[x][1].start.offset<a&&(!i.events[x][1].end||i.events[x][1].end.offset>a))return;let S=t.events.length,T=S,R,C;for(;T--;)if(t.events[T][0]==="exit"&&t.events[T][1].type==="chunkFlow"){if(R){C=t.events[T][1].end;break}R=!0}for(b(r),x=S;x<t.events.length;)t.events[x][1].end={...C},x++;co(t.events,T+1,0,t.events.slice(S)),t.events.length=x}}function b(y){let w=n.length;for(;w-- >y;){let k=n[w];t.containerState=k[1],k[0].exit.call(t,e)}n.length=y}function v(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function cdt(e,t,n){return Rt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Xm(e){if(e===null||Mn(e)||cp(e))return 1;if(Vy(e))return 2}function rb(e,t,n){let r=[],i=-1;for(;++i<e.length;){let o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}var NT={name:"attention",resolveAll:udt,tokenize:ddt};function udt(e,t){let n=-1,r,i,o,a,s,l,c,u;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};QCe(d,-l),QCe(f,l),a={type:l>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},s={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:f},o={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:l>1?"strong":"emphasis",start:{...a.start},end:{...s.end}},e[r][1].end={...a.start},e[n][1].start={...s.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=ll(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=ll(c,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",o,t]]),c=ll(c,rb(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=ll(c,[["exit",o,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,c=ll(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):u=0,co(e,r-1,n-r+3,c),n=r+c.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function ddt(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Xm(r),o;return a;function a(l){return o=l,e.enter("attentionSequence"),s(l)}function s(l){if(l===o)return e.consume(l),s;let c=e.exit("attentionSequence"),u=Xm(l),d=!u||u===2&&i||n.includes(l),f=!i||i===2&&u||n.includes(r);return c._open=!!(o===42?d:d&&(i||!f)),c._close=!!(o===42?f:f&&(u||!d)),t(l)}}function QCe(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var uX={name:"autolink",tokenize:fdt};function fdt(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(p){return Ko(p)?(e.consume(p),a):p===64?n(p):c(p)}function a(p){return p===43||p===45||p===46||Qi(p)?(r=1,s(p)):c(p)}function s(p){return p===58?(e.consume(p),r=0,l):(p===43||p===45||p===46||Qi(p))&&r++<32?(e.consume(p),s):(r=0,c(p))}function l(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||jy(p)?n(p):(e.consume(p),l)}function c(p){return p===64?(e.consume(p),u):KCe(p)?(e.consume(p),c):n(p)}function u(p){return Qi(p)?d(p):n(p)}function d(p){return p===46?(e.consume(p),r=0,u):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):f(p)}function f(p){if((p===45||Qi(p))&&r++<63){let m=p===45?f:d;return e.consume(p),m}return n(p)}}var up={partial:!0,tokenize:pdt};function pdt(e,t,n){return r;function r(o){return Lt(o)?Rt(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||Qe(o)?t(o):n(o)}}var _6={continuation:{tokenize:hdt},exit:gdt,name:"blockQuote",tokenize:mdt};function mdt(e,t,n){let r=this;return i;function i(a){if(a===62){let s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),o}return n(a)}function o(a){return Lt(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function hdt(e,t,n){let r=this;return i;function i(a){return Lt(a)?Rt(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):o(a)}function o(a){return e.attempt(_6,t,n)(a)}}function gdt(e){e.exit("blockQuote")}var T6={name:"characterEscape",tokenize:bdt};function bdt(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return GCe(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}var A6={name:"characterReference",tokenize:vdt};function vdt(e,t,n){let r=this,i=0,o,a;return s;function s(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),l}function l(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),o=31,a=Qi,u(d))}function c(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,a=qCe,u):(e.enter("characterReferenceValue"),o=7,a=IT,u(d))}function u(d){if(d===59&&i){let f=e.exit("characterReferenceValue");return a===Qi&&!ok(r.sliceSerialize(f))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(d)&&i++<o?(e.consume(d),u):n(d)}}var JCe={partial:!0,tokenize:wdt},M6={concrete:!0,name:"codeFenced",tokenize:ydt};function ydt(e,t,n){let r=this,i={partial:!0,tokenize:k},o=0,a=0,s;return l;function l(x){return c(x)}function c(x){let S=r.events[r.events.length-1];return o=S&&S[1].type==="linePrefix"?S[2].sliceSerialize(S[1],!0).length:0,s=x,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(x)}function u(x){return x===s?(a++,e.consume(x),u):a<3?n(x):(e.exit("codeFencedFenceSequence"),Lt(x)?Rt(e,d,"whitespace")(x):d(x))}function d(x){return x===null||Qe(x)?(e.exit("codeFencedFence"),r.interrupt?t(x):e.check(JCe,h,w)(x)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(x))}function f(x){return x===null||Qe(x)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(x)):Lt(x)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Rt(e,p,"whitespace")(x)):x===96&&x===s?n(x):(e.consume(x),f)}function p(x){return x===null||Qe(x)?d(x):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(x))}function m(x){return x===null||Qe(x)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(x)):x===96&&x===s?n(x):(e.consume(x),m)}function h(x){return e.attempt(i,w,g)(x)}function g(x){return e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),b}function b(x){return o>0&&Lt(x)?Rt(e,v,"linePrefix",o+1)(x):v(x)}function v(x){return x===null||Qe(x)?e.check(JCe,h,w)(x):(e.enter("codeFlowValue"),y(x))}function y(x){return x===null||Qe(x)?(e.exit("codeFlowValue"),v(x)):(e.consume(x),y)}function w(x){return e.exit("codeFenced"),t(x)}function k(x,S,T){let R=0;return C;function C(I){return x.enter("lineEnding"),x.consume(I),x.exit("lineEnding"),M}function M(I){return x.enter("codeFencedFence"),Lt(I)?Rt(x,E,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):E(I)}function E(I){return I===s?(x.enter("codeFencedFenceSequence"),D(I)):T(I)}function D(I){return I===s?(R++,x.consume(I),D):R>=a?(x.exit("codeFencedFenceSequence"),Lt(I)?Rt(x,L,"whitespace")(I):L(I)):T(I)}function L(I){return I===null||Qe(I)?(x.exit("codeFencedFence"),S(I)):T(I)}}}function wdt(e,t,n){let r=this;return i;function i(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o)}function o(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}var LT={name:"codeIndented",tokenize:kdt},xdt={partial:!0,tokenize:Sdt};function kdt(e,t,n){let r=this;return i;function i(c){return e.enter("codeIndented"),Rt(e,o,"linePrefix",5)(c)}function o(c){let u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?a(c):n(c)}function a(c){return c===null?l(c):Qe(c)?e.attempt(xdt,a,l)(c):(e.enter("codeFlowValue"),s(c))}function s(c){return c===null||Qe(c)?(e.exit("codeFlowValue"),a(c)):(e.consume(c),s)}function l(c){return e.exit("codeIndented"),t(c)}}function Sdt(e,t,n){let r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):Qe(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):Rt(e,o,"linePrefix",5)(a)}function o(a){let s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):Qe(a)?i(a):n(a)}}var dX={name:"codeText",previous:Edt,resolve:Cdt,tokenize:_dt};function Cdt(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Edt(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function _dt(e,t,n){let r=this,i=0,o,a;return s;function s(f){return e.enter("codeText"),e.enter("codeTextSequence"),l(f)}function l(f){return f===96?(e.consume(f),i++,l):(e.exit("codeTextSequence"),c(f))}function c(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),c):f===96?(a=e.enter("codeTextSequence"),o=0,d(f)):Qe(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),c):(e.enter("codeTextData"),u(f))}function u(f){return f===null||f===32||f===96||Qe(f)?(e.exit("codeTextData"),c(f)):(e.consume(f),u)}function d(f){return f===96?(e.consume(f),o++,d):o===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(a.type="codeTextData",u(f))}}var R6=class{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){let r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){let i=n||0;this.setCursor(Math.trunc(t));let o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&BT(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),BT(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),BT(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){let n=this.left.splice(t,Number.POSITIVE_INFINITY);BT(this.right,n.reverse())}else{let n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);BT(this.left,n.reverse())}}};function BT(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 O6(e){let t={},n=-1,r,i,o,a,s,l,c,u=new R6(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type==="chunkFlow"&&u.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,o=0,o<l.length&&l[o][1].type==="lineEndingBlank"&&(o+=2),o<l.length&&l[o][1].type==="content"))for(;++o<l.length&&l[o][1].type!=="content";)l[o][1].type==="chunkText"&&(l[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Tdt(u,n)),n=t[n],c=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(a=u.get(o),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(i&&(u.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=o);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return co(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!c}function Tdt(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,o=[],a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));let s=a.events,l=[],c={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);o.push(i),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;)s[f][0]==="exit"&&s[f-1][0]==="enter"&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),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--;){let b=s.slice(g[f],g[f+1]),v=o.pop();l.push([v,v+b.length-1]),e.splice(v,2,b)}for(l.reverse(),f=-1;++f<l.length;)c[m+l[f][0]]=m+l[f][1],m+=l[f][1]-l[f][0]-1;return c}var fX={resolve:Mdt,tokenize:Rdt},Adt={partial:!0,tokenize:Odt};function Mdt(e){return O6(e),e}function Rdt(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?o(s):Qe(s)?e.check(Adt,a,o)(s):(e.consume(s),i)}function o(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function a(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Odt(e,t,n){let r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Rt(e,o,"linePrefix")}function o(a){if(a===null||Qe(a))return n(a);let s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function P6(e,t,n,r,i,o,a,s,l){let c=l||Number.POSITIVE_INFINITY,u=0;return d;function d(b){return b===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(b),e.exit(o),f):b===null||b===32||b===41||jy(b)?n(b):(e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),h(b))}function f(b){return b===62?(e.enter(o),e.consume(b),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(b))}function p(b){return b===62?(e.exit("chunkString"),e.exit(s),f(b)):b===null||b===60||Qe(b)?n(b):(e.consume(b),b===92?m:p)}function m(b){return b===60||b===62||b===92?(e.consume(b),p):p(b)}function h(b){return!u&&(b===null||b===41||Mn(b))?(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(b)):u<c&&b===40?(e.consume(b),u++,h):b===41?(e.consume(b),u--,h):b===null||b===32||b===40||jy(b)?n(b):(e.consume(b),b===92?g:h)}function g(b){return b===40||b===41||b===92?(e.consume(b),h):h(b)}}function D6(e,t,n,r,i,o){let a=this,s=0,l;return c;function c(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(o),u}function u(p){return s>999||p===null||p===91||p===93&&!l||p===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?n(p):p===93?(e.exit(o),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):Qe(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===null||p===91||p===93||Qe(p)||s++>999?(e.exit("chunkString"),u(p)):(e.consume(p),l||(l=!Lt(p)),p===92?f:d)}function f(p){return p===91||p===92||p===93?(e.consume(p),s++,d):d(p)}}function I6(e,t,n,r,i,o){let a;return s;function s(f){return f===34||f===39||f===40?(e.enter(r),e.enter(i),e.consume(f),e.exit(i),a=f===40?41:f,l):n(f)}function l(f){return f===a?(e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):(e.enter(o),c(f))}function c(f){return f===a?(e.exit(o),l(a)):f===null?n(f):Qe(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Rt(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(f))}function u(f){return f===a||f===null||Qe(f)?(e.exit("chunkString"),c(f)):(e.consume(f),f===92?d:u)}function d(f){return f===a||f===92?(e.consume(f),u):u(f)}}function Wy(e,t){let n;return r;function r(i){return Qe(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Lt(i)?Rt(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}var pX={name:"definition",tokenize:Ddt},Pdt={partial:!0,tokenize:Idt};function Ddt(e,t,n){let r=this,i;return o;function o(p){return e.enter("definition"),a(p)}function a(p){return D6.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function s(p){return i=Cs(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),l):n(p)}function l(p){return Mn(p)?Wy(e,c)(p):c(p)}function c(p){return P6(e,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function u(p){return e.attempt(Pdt,d,d)(p)}function d(p){return Lt(p)?Rt(e,f,"whitespace")(p):f(p)}function f(p){return p===null||Qe(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function Idt(e,t,n){return r;function r(s){return Mn(s)?Wy(e,i)(s):n(s)}function i(s){return I6(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function o(s){return Lt(s)?Rt(e,a,"whitespace")(s):a(s)}function a(s){return s===null||Qe(s)?t(s):n(s)}}var mX={name:"hardBreakEscape",tokenize:Ndt};function Ndt(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return Qe(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}var hX={name:"headingAtx",resolve:Ldt,tokenize:Bdt};function Ldt(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},co(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function Bdt(e,t,n){let r=0;return i;function i(u){return e.enter("atxHeading"),o(u)}function o(u){return e.enter("atxHeadingSequence"),a(u)}function a(u){return u===35&&r++<6?(e.consume(u),a):u===null||Mn(u)?(e.exit("atxHeadingSequence"),s(u)):n(u)}function s(u){return u===35?(e.enter("atxHeadingSequence"),l(u)):u===null||Qe(u)?(e.exit("atxHeading"),t(u)):Lt(u)?Rt(e,s,"whitespace")(u):(e.enter("atxHeadingText"),c(u))}function l(u){return u===35?(e.consume(u),l):(e.exit("atxHeadingSequence"),s(u))}function c(u){return u===null||u===35||Mn(u)?(e.exit("atxHeadingText"),s(u)):(e.consume(u),c)}}var e2e=["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"],gX=["pre","script","style","textarea"];var bX={concrete:!0,name:"htmlFlow",resolveTo:Hdt,tokenize:jdt},zdt={partial:!0,tokenize:Wdt},Fdt={partial:!0,tokenize:Vdt};function Hdt(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function jdt(e,t,n){let r=this,i,o,a,s,l;return c;function c(P){return u(P)}function u(P){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(P),d}function d(P){return P===33?(e.consume(P),f):P===47?(e.consume(P),o=!0,h):P===63?(e.consume(P),i=3,r.interrupt?t:A):Ko(P)?(e.consume(P),a=String.fromCharCode(P),g):n(P)}function f(P){return P===45?(e.consume(P),i=2,p):P===91?(e.consume(P),i=5,s=0,m):Ko(P)?(e.consume(P),i=4,r.interrupt?t:A):n(P)}function p(P){return P===45?(e.consume(P),r.interrupt?t:A):n(P)}function m(P){let W="CDATA[";return P===W.charCodeAt(s++)?(e.consume(P),s===W.length?r.interrupt?t:E:m):n(P)}function h(P){return Ko(P)?(e.consume(P),a=String.fromCharCode(P),g):n(P)}function g(P){if(P===null||P===47||P===62||Mn(P)){let W=P===47,q=a.toLowerCase();return!W&&!o&&gX.includes(q)?(i=1,r.interrupt?t(P):E(P)):e2e.includes(a.toLowerCase())?(i=6,W?(e.consume(P),b):r.interrupt?t(P):E(P)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(P):o?v(P):y(P))}return P===45||Qi(P)?(e.consume(P),a+=String.fromCharCode(P),g):n(P)}function b(P){return P===62?(e.consume(P),r.interrupt?t:E):n(P)}function v(P){return Lt(P)?(e.consume(P),v):C(P)}function y(P){return P===47?(e.consume(P),C):P===58||P===95||Ko(P)?(e.consume(P),w):Lt(P)?(e.consume(P),y):C(P)}function w(P){return P===45||P===46||P===58||P===95||Qi(P)?(e.consume(P),w):k(P)}function k(P){return P===61?(e.consume(P),x):Lt(P)?(e.consume(P),k):y(P)}function x(P){return P===null||P===60||P===61||P===62||P===96?n(P):P===34||P===39?(e.consume(P),l=P,S):Lt(P)?(e.consume(P),x):T(P)}function S(P){return P===l?(e.consume(P),l=null,R):P===null||Qe(P)?n(P):(e.consume(P),S)}function T(P){return P===null||P===34||P===39||P===47||P===60||P===61||P===62||P===96||Mn(P)?k(P):(e.consume(P),T)}function R(P){return P===47||P===62||Lt(P)?y(P):n(P)}function C(P){return P===62?(e.consume(P),M):n(P)}function M(P){return P===null||Qe(P)?E(P):Lt(P)?(e.consume(P),M):n(P)}function E(P){return P===45&&i===2?(e.consume(P),_):P===60&&i===1?(e.consume(P),O):P===62&&i===4?(e.consume(P),F):P===63&&i===3?(e.consume(P),A):P===93&&i===5?(e.consume(P),N):Qe(P)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(zdt,H,D)(P)):P===null||Qe(P)?(e.exit("htmlFlowData"),D(P)):(e.consume(P),E)}function D(P){return e.check(Fdt,L,H)(P)}function L(P){return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),I}function I(P){return P===null||Qe(P)?D(P):(e.enter("htmlFlowData"),E(P))}function _(P){return P===45?(e.consume(P),A):E(P)}function O(P){return P===47?(e.consume(P),a="",z):E(P)}function z(P){if(P===62){let W=a.toLowerCase();return gX.includes(W)?(e.consume(P),F):E(P)}return Ko(P)&&a.length<8?(e.consume(P),a+=String.fromCharCode(P),z):E(P)}function N(P){return P===93?(e.consume(P),A):E(P)}function A(P){return P===62?(e.consume(P),F):P===45&&i===2?(e.consume(P),A):E(P)}function F(P){return P===null||Qe(P)?(e.exit("htmlFlowData"),H(P)):(e.consume(P),F)}function H(P){return e.exit("htmlFlow"),t(P)}}function Vdt(e,t,n){let r=this;return i;function i(a){return Qe(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):n(a)}function o(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function Wdt(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(up,t,n)}}var vX={name:"htmlText",tokenize:$dt};function $dt(e,t,n){let r=this,i,o,a;return s;function s(A){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(A),l}function l(A){return A===33?(e.consume(A),c):A===47?(e.consume(A),k):A===63?(e.consume(A),y):Ko(A)?(e.consume(A),T):n(A)}function c(A){return A===45?(e.consume(A),u):A===91?(e.consume(A),o=0,m):Ko(A)?(e.consume(A),v):n(A)}function u(A){return A===45?(e.consume(A),p):n(A)}function d(A){return A===null?n(A):A===45?(e.consume(A),f):Qe(A)?(a=d,O(A)):(e.consume(A),d)}function f(A){return A===45?(e.consume(A),p):d(A)}function p(A){return A===62?_(A):A===45?f(A):d(A)}function m(A){let F="CDATA[";return A===F.charCodeAt(o++)?(e.consume(A),o===F.length?h:m):n(A)}function h(A){return A===null?n(A):A===93?(e.consume(A),g):Qe(A)?(a=h,O(A)):(e.consume(A),h)}function g(A){return A===93?(e.consume(A),b):h(A)}function b(A){return A===62?_(A):A===93?(e.consume(A),b):h(A)}function v(A){return A===null||A===62?_(A):Qe(A)?(a=v,O(A)):(e.consume(A),v)}function y(A){return A===null?n(A):A===63?(e.consume(A),w):Qe(A)?(a=y,O(A)):(e.consume(A),y)}function w(A){return A===62?_(A):y(A)}function k(A){return Ko(A)?(e.consume(A),x):n(A)}function x(A){return A===45||Qi(A)?(e.consume(A),x):S(A)}function S(A){return Qe(A)?(a=S,O(A)):Lt(A)?(e.consume(A),S):_(A)}function T(A){return A===45||Qi(A)?(e.consume(A),T):A===47||A===62||Mn(A)?R(A):n(A)}function R(A){return A===47?(e.consume(A),_):A===58||A===95||Ko(A)?(e.consume(A),C):Qe(A)?(a=R,O(A)):Lt(A)?(e.consume(A),R):_(A)}function C(A){return A===45||A===46||A===58||A===95||Qi(A)?(e.consume(A),C):M(A)}function M(A){return A===61?(e.consume(A),E):Qe(A)?(a=M,O(A)):Lt(A)?(e.consume(A),M):R(A)}function E(A){return A===null||A===60||A===61||A===62||A===96?n(A):A===34||A===39?(e.consume(A),i=A,D):Qe(A)?(a=E,O(A)):Lt(A)?(e.consume(A),E):(e.consume(A),L)}function D(A){return A===i?(e.consume(A),i=void 0,I):A===null?n(A):Qe(A)?(a=D,O(A)):(e.consume(A),D)}function L(A){return A===null||A===34||A===39||A===60||A===61||A===96?n(A):A===47||A===62||Mn(A)?R(A):(e.consume(A),L)}function I(A){return A===47||A===62||Mn(A)?R(A):n(A)}function _(A){return A===62?(e.consume(A),e.exit("htmlTextData"),e.exit("htmlText"),t):n(A)}function O(A){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),z}function z(A){return Lt(A)?Rt(e,N,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):N(A)}function N(A){return e.enter("htmlTextData"),a(A)}}var $y={name:"labelEnd",resolveAll:Gdt,resolveTo:Ydt,tokenize:Xdt},Udt={tokenize:Zdt},Kdt={tokenize:Qdt},qdt={tokenize:Jdt};function Gdt(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){let i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&co(e,0,e.length,n),e}function Ydt(e,t){let n=e.length,r=0,i,o,a,s;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=n);let l={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[o][1].start},end:{...e[a][1].end}},u={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[a-2][1].start}};return s=[["enter",l,t],["enter",c,t]],s=ll(s,e.slice(o+1,o+r+3)),s=ll(s,[["enter",u,t]]),s=ll(s,rb(t.parser.constructs.insideSpan.null,e.slice(o+r+4,a-3),t)),s=ll(s,[["exit",u,t],e[a-2],e[a-1],["exit",c,t]]),s=ll(s,e.slice(a+1)),s=ll(s,[["exit",l,t]]),co(e,o,e.length,s),e}function Xdt(e,t,n){let r=this,i=r.events.length,o,a;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return s;function s(f){return o?o._inactive?d(f):(a=r.parser.defined.includes(Cs(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),l):n(f)}function l(f){return f===40?e.attempt(Udt,u,a?u:d)(f):f===91?e.attempt(Kdt,u,a?c:d)(f):a?u(f):d(f)}function c(f){return e.attempt(qdt,u,d)(f)}function u(f){return t(f)}function d(f){return o._balanced=!0,n(f)}}function Zdt(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return Mn(d)?Wy(e,o)(d):o(d)}function o(d){return d===41?u(d):P6(e,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function a(d){return Mn(d)?Wy(e,l)(d):u(d)}function s(d){return n(d)}function l(d){return d===34||d===39||d===40?I6(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):u(d)}function c(d){return Mn(d)?Wy(e,u)(d):u(d)}function u(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function Qdt(e,t,n){let r=this;return i;function i(s){return D6.call(r,e,o,a,"reference","referenceMarker","referenceString")(s)}function o(s){return r.parser.defined.includes(Cs(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function a(s){return n(s)}}function Jdt(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}var yX={name:"labelStartImage",resolveAll:$y.resolveAll,tokenize:eft};function eft(e,t,n){let r=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),o}function o(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),a):n(s)}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}var wX={name:"labelStartLink",resolveAll:$y.resolveAll,tokenize:tft};function tft(e,t,n){let r=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),o}function o(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}var zT={name:"lineEnding",tokenize:nft};function nft(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Rt(e,t,"linePrefix")}}var Uy={name:"thematicBreak",tokenize:rft};function rft(e,t,n){let r=0,i;return o;function o(c){return e.enter("thematicBreak"),a(c)}function a(c){return i=c,s(c)}function s(c){return c===i?(e.enter("thematicBreakSequence"),l(c)):r>=3&&(c===null||Qe(c))?(e.exit("thematicBreak"),t(c)):n(c)}function l(c){return c===i?(e.consume(c),r++,l):(e.exit("thematicBreakSequence"),Lt(c)?Rt(e,s,"whitespace")(c):s(c))}}var Es={continuation:{tokenize:sft},exit:cft,name:"list",tokenize:aft},ift={partial:!0,tokenize:uft},oft={partial:!0,tokenize:lft};function aft(e,t,n){let r=this,i=r.events[r.events.length-1],o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return s;function s(p){let m=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:IT(p)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(Uy,n,c)(p):c(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(p)}return n(p)}function l(p){return IT(p)&&++a<10?(e.consume(p),l):(!r.interrupt||a<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),c(p)):n(p)}function c(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(up,r.interrupt?n:u,e.attempt(ift,f,d))}function u(p){return r.containerState.initialBlankLine=!0,o++,f(p)}function d(p){return Lt(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),f):n(p)}function f(p){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function sft(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(up,i,o);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Rt(e,t,"listItemIndent",r.containerState.size+1)(s)}function o(s){return r.containerState.furtherBlankLines||!Lt(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(oft,t,a)(s))}function a(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,Rt(e,e.attempt(Es,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function lft(e,t,n){let r=this;return Rt(e,i,"listItemIndent",r.containerState.size+1);function i(o){let a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(o):n(o)}}function cft(e){e.exit(this.containerState.type)}function uft(e,t,n){let r=this;return Rt(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){let a=r.events[r.events.length-1];return!Lt(o)&&a&&a[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}var N6={name:"setextUnderline",resolveTo:dft,tokenize:fft};function dft(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);let a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",a,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=a,e.push(["exit",a,t]),e}function fft(e,t,n){let r=this,i;return o;function o(c){let u=r.events.length,d;for(;u--;)if(r.events[u][1].type!=="lineEnding"&&r.events[u][1].type!=="linePrefix"&&r.events[u][1].type!=="content"){d=r.events[u][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=c,a(c)):n(c)}function a(c){return e.enter("setextHeadingLineSequence"),s(c)}function s(c){return c===i?(e.consume(c),s):(e.exit("setextHeadingLineSequence"),Lt(c)?Rt(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||Qe(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}var t2e={tokenize:pft};function pft(e){let t=this,n=e.attempt(up,r,e.attempt(this.parser.constructs.flowInitial,i,Rt(e,e.attempt(this.parser.constructs.flow,i,e.attempt(fX,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}var n2e={resolveAll:a2e()},r2e=o2e("string"),i2e=o2e("text");function o2e(e){return{resolveAll:a2e(e==="text"?mft:void 0),tokenize:t};function t(n){let r=this,i=this.parser.constructs[e],o=n.attempt(i,a,s);return a;function a(u){return c(u)?o(u):s(u)}function s(u){if(u===null){n.consume(u);return}return n.enter("data"),n.consume(u),l}function l(u){return c(u)?(n.exit("data"),o(u)):(n.consume(u),l)}function c(u){if(u===null)return!0;let d=i[u],f=-1;if(d)for(;++f<d.length;){let p=d[f];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function a2e(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function mft(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){let r=e[n-1][1],i=t.sliceStream(r),o=i.length,a=-1,s=0,l;for(;o--;){let c=i[o];if(typeof c=="string"){for(a=c.length;c.charCodeAt(a-1)===32;)s++,a--;if(a)break;a=-1}else if(c===-2)l=!0,s++;else if(c!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let c={type:n===e.length||l||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?a:r.start._bufferIndex+a,_index:r.start._index+o,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}var xX={};wf(xX,{attentionMarkers:()=>kft,contentInitial:()=>gft,disable:()=>Sft,document:()=>hft,flow:()=>vft,flowInitial:()=>bft,insideSpan:()=>xft,string:()=>yft,text:()=>wft});var hft={42:Es,43:Es,45:Es,48:Es,49:Es,50:Es,51:Es,52:Es,53:Es,54:Es,55:Es,56:Es,57:Es,62:_6},gft={91:pX},bft={[-2]:LT,[-1]:LT,32:LT},vft={35:hX,42:Uy,45:[N6,Uy],60:bX,61:N6,95:Uy,96:M6,126:M6},yft={38:A6,92:T6},wft={[-5]:zT,[-4]:zT,[-3]:zT,33:yX,38:A6,42:NT,60:[uX,vX],91:wX,92:[mX,T6],93:$y,95:NT,96:dX},xft={null:[NT,n2e]},kft={null:[42,95]},Sft={null:[]};function s2e(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},o=[],a=[],s=[],l=!0,c={attempt:R(S),check:R(T),consume:w,enter:k,exit:x,interrupt:R(T,{interrupt:!0})},u={code:null,containerState:{},defineSkip:b,events:[],now:g,parser:e,previous:null,sliceSerialize:m,sliceStream:h,write:p},d=t.tokenize.call(u,c),f;return t.resolveAll&&o.push(t),u;function p(D){return a=ll(a,D),v(),a[a.length-1]!==null?[]:(C(t,0),u.events=rb(o,u.events,u),u.events)}function m(D,L){return Eft(h(D),L)}function h(D){return Cft(a,D)}function g(){let{_bufferIndex:D,_index:L,line:I,column:_,offset:O}=r;return{_bufferIndex:D,_index:L,line:I,column:_,offset:O}}function b(D){i[D.line]=D.column,E()}function v(){let D;for(;r._index<a.length;){let L=a[r._index];if(typeof L=="string")for(D=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===D&&r._bufferIndex<L.length;)y(L.charCodeAt(r._bufferIndex));else y(L)}}function y(D){l=void 0,f=D,d=d(D)}function w(D){Qe(D)?(r.line++,r.column=1,r.offset+=D===-3?2:1,E()):D!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=D,l=!0}function k(D,L){let I=L||{};return I.type=D,I.start=g(),u.events.push(["enter",I,u]),s.push(I),I}function x(D){let L=s.pop();return L.end=g(),u.events.push(["exit",L,u]),L}function S(D,L){C(D,L.from)}function T(D,L){L.restore()}function R(D,L){return I;function I(_,O,z){let N,A,F,H;return Array.isArray(_)?W(_):"tokenize"in _?W([_]):P(_);function P(ne){return X;function X(ce){let oe=ce!==null&&ne[ce],K=ce!==null&&ne.null,ie=[...Array.isArray(oe)?oe:oe?[oe]:[],...Array.isArray(K)?K:K?[K]:[]];return W(ie)(ce)}}function W(ne){return N=ne,A=0,ne.length===0?z:q(ne[A])}function q(ne){return X;function X(ce){return H=M(),F=ne,ne.partial||(u.currentConstruct=ne),ne.name&&u.parser.constructs.disable.null.includes(ne.name)?$(ce):ne.tokenize.call(L?Object.assign(Object.create(u),L):u,c,Q,$)(ce)}}function Q(ne){return l=!0,D(F,H),O}function $(ne){return l=!0,H.restore(),++A<N.length?q(N[A]):z}}}function C(D,L){D.resolveAll&&!o.includes(D)&&o.push(D),D.resolve&&co(u.events,L,u.events.length-L,D.resolve(u.events.slice(L),u)),D.resolveTo&&(u.events=D.resolveTo(u.events,u))}function M(){let D=g(),L=u.previous,I=u.currentConstruct,_=u.events.length,O=Array.from(s);return{from:_,restore:z};function z(){r=D,u.previous=L,u.currentConstruct=I,u.events.length=_,s=O,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Cft(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex,a;if(n===i)a=[e[n].slice(r,o)];else{if(a=e.slice(n,i),r>-1){let s=a[0];typeof s=="string"?a[0]=s.slice(r):a.shift()}o>0&&a.push(e[i].slice(0,o))}return a}function Eft(e,t){let n=-1,r=[],i;for(;++n<e.length;){let o=e[n],a;if(typeof o=="string")a=o;else switch(o){case-5:{a="\r";break}case-4:{a=`
915
915
  `;break}case-3:{a=`\r
916
916
  `;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&i)continue;a=" ";break}default:a=String.fromCharCode(o)}i=o===-2,r.push(a)}return r.join("")}function kX(e){let r={constructs:C6([xX,...(e||{}).extensions||[]]),content:i(YCe),defined:[],document:i(ZCe),flow:i(t2e),lazy:{},string:i(r2e),text:i(i2e)};return r;function i(o){return a;function a(s){return s2e(r,o,s)}}}function SX(e){for(;!O6(e););return e}var l2e=/[\0\t\n\r]/g;function CX(){let e=1,t="",n=!0,r;return i;function i(o,a,s){let l=[],c,u,d,f,p;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(a||void 0).decode(o)),d=0,t="",n&&(o.charCodeAt(0)===65279&&d++,n=void 0);d<o.length;){if(l2e.lastIndex=d,c=l2e.exec(o),f=c&&c.index!==void 0?c.index:o.length,p=o.charCodeAt(f),!c){t=o.slice(d);break}if(p===10&&d===f&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),d<f&&(l.push(o.slice(d,f)),e+=f-d),p){case 0:{l.push(65533),e++;break}case 9:{for(u=Math.ceil(e/4)*4,l.push(-2);e++<u;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}d=f+1}return s&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}var _ft=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function c2e(e){return e.replace(_ft,Tft)}function Tft(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let i=n.charCodeAt(1),o=i===120||i===88;return E6(n.slice(o?2:1),o?16:10)}return ok(n)||e}var d2e={}.hasOwnProperty;function EX(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),Aft(n)(SX(kX(n).document().write(CX()(e,t,!0))))}function Aft(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Me),autolinkProtocol:R,autolinkEmail:R,atxHeading:o(fe),blockQuote:o(ce),characterEscape:R,characterReference:R,codeFenced:o(oe),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:o(oe,a),codeText:o(K,a),codeTextData:R,data:R,codeFlowValue:R,definition:o(ie),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:o(be),hardBreakEscape:o(Oe),hardBreakTrailing:o(Oe),htmlFlow:o(He,a),htmlFlowData:R,htmlText:o(He,a),htmlTextData:R,image:o(dt),label:a,link:o(Me),listItem:o(Ue),listItemValue:f,listOrdered:o(ut,d),listUnordered:o(ut),paragraph:o(pe),reference:P,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:o(fe),strong:o(ve),thematicBreak:o(me)},exit:{atxHeading:l(),atxHeadingSequence:k,autolink:l(),autolinkEmail:X,autolinkProtocol:ne,blockQuote:l(),characterEscapeValue:C,characterReferenceMarkerHexadecimal:q,characterReferenceMarkerNumeric:q,characterReferenceValue:Q,characterReference:$,codeFenced:l(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:C,codeIndented:l(b),codeText:l(I),codeTextData:C,data:C,definition:l(),definitionDestinationString:w,definitionLabelString:v,definitionTitleString:y,emphasis:l(),hardBreakEscape:l(E),hardBreakTrailing:l(E),htmlFlow:l(D),htmlFlowData:C,htmlText:l(L),htmlTextData:C,image:l(O),label:N,labelText:z,lineEnding:M,link:l(_),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:W,resourceDestinationString:A,resourceTitleString:F,resource:H,setextHeading:l(T),setextHeadingLineSequence:S,setextHeadingText:x,strong:l(),thematicBreak:l()}};f2e(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(te){let ue={type:"root",children:[]},je={stack:[ue],tokenStack:[],config:t,enter:s,exit:c,buffer:a,resume:u,data:n},qe=[],wt=-1;for(;++wt<te.length;)if(te[wt][1].type==="listOrdered"||te[wt][1].type==="listUnordered")if(te[wt][0]==="enter")qe.push(wt);else{let nr=qe.pop();wt=i(te,nr,wt)}for(wt=-1;++wt<te.length;){let nr=t[te[wt][0]];d2e.call(nr,te[wt][1].type)&&nr[te[wt][1].type].call(Object.assign({sliceSerialize:te[wt][2].sliceSerialize},je),te[wt][1])}if(je.tokenStack.length>0){let nr=je.tokenStack[je.tokenStack.length-1];(nr[1]||u2e).call(je,void 0,nr[0])}for(ue.position={start:ib(te.length>0?te[0][1].start:{line:1,column:1,offset:0}),end:ib(te.length>0?te[te.length-2][1].end:{line:1,column:1,offset:0})},wt=-1;++wt<t.transforms.length;)ue=t.transforms[wt](ue)||ue;return ue}function i(te,ue,je){let qe=ue-1,wt=-1,nr=!1,Un,mr,ge,Ge;for(;++qe<=je;){let et=te[qe];switch(et[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{et[0]==="enter"?wt++:wt--,Ge=void 0;break}case"lineEndingBlank":{et[0]==="enter"&&(Un&&!Ge&&!wt&&!ge&&(ge=qe),Ge=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ge=void 0}if(!wt&&et[0]==="enter"&&et[1].type==="listItemPrefix"||wt===-1&&et[0]==="exit"&&(et[1].type==="listUnordered"||et[1].type==="listOrdered")){if(Un){let tt=qe;for(mr=void 0;tt--;){let ht=te[tt];if(ht[1].type==="lineEnding"||ht[1].type==="lineEndingBlank"){if(ht[0]==="exit")continue;mr&&(te[mr][1].type="lineEndingBlank",nr=!0),ht[1].type="lineEnding",mr=tt}else if(!(ht[1].type==="linePrefix"||ht[1].type==="blockQuotePrefix"||ht[1].type==="blockQuotePrefixWhitespace"||ht[1].type==="blockQuoteMarker"||ht[1].type==="listItemIndent"))break}ge&&(!mr||ge<mr)&&(Un._spread=!0),Un.end=Object.assign({},mr?te[mr][1].start:et[1].end),te.splice(mr||qe,0,["exit",Un,et[2]]),qe++,je++}if(et[1].type==="listItemPrefix"){let tt={type:"listItem",_spread:!1,start:Object.assign({},et[1].start),end:void 0};Un=tt,te.splice(qe,0,["enter",tt,et[2]]),qe++,je++,ge=void 0,Ge=!0}}}return te[ue][1]._spread=nr,je}function o(te,ue){return je;function je(qe){s.call(this,te(qe),qe),ue&&ue.call(this,qe)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(te,ue,je){this.stack[this.stack.length-1].children.push(te),this.stack.push(te),this.tokenStack.push([ue,je||void 0]),te.position={start:ib(ue.start),end:void 0}}function l(te){return ue;function ue(je){te&&te.call(this,je),c.call(this,je)}}function c(te,ue){let je=this.stack.pop(),qe=this.tokenStack.pop();if(qe)qe[0].type!==te.type&&(ue?ue.call(this,te,qe[0]):(qe[1]||u2e).call(this,te,qe[0]));else throw new Error("Cannot close `"+te.type+"` ("+tb({start:te.start,end:te.end})+"): it\u2019s not open");je.position.end=ib(te.end)}function u(){return Hy(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(te){if(this.data.expectingFirstListItemValue){let ue=this.stack[this.stack.length-2];ue.start=Number.parseInt(this.sliceSerialize(te),10),this.data.expectingFirstListItemValue=void 0}}function p(){let te=this.resume(),ue=this.stack[this.stack.length-1];ue.lang=te}function m(){let te=this.resume(),ue=this.stack[this.stack.length-1];ue.meta=te}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let te=this.resume(),ue=this.stack[this.stack.length-1];ue.value=te.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function b(){let te=this.resume(),ue=this.stack[this.stack.length-1];ue.value=te.replace(/(\r?\n|\r)$/g,"")}function v(te){let ue=this.resume(),je=this.stack[this.stack.length-1];je.label=ue,je.identifier=Cs(this.sliceSerialize(te)).toLowerCase()}function y(){let te=this.resume(),ue=this.stack[this.stack.length-1];ue.title=te}function w(){let te=this.resume(),ue=this.stack[this.stack.length-1];ue.url=te}function k(te){let ue=this.stack[this.stack.length-1];if(!ue.depth){let je=this.sliceSerialize(te).length;ue.depth=je}}function x(){this.data.setextHeadingSlurpLineEnding=!0}function S(te){let ue=this.stack[this.stack.length-1];ue.depth=this.sliceSerialize(te).codePointAt(0)===61?1:2}function T(){this.data.setextHeadingSlurpLineEnding=void 0}function R(te){let je=this.stack[this.stack.length-1].children,qe=je[je.length-1];(!qe||qe.type!=="text")&&(qe=Be(),qe.position={start:ib(te.start),end:void 0},je.push(qe)),this.stack.push(qe)}function C(te){let ue=this.stack.pop();ue.value+=this.sliceSerialize(te),ue.position.end=ib(te.end)}function M(te){let ue=this.stack[this.stack.length-1];if(this.data.atHardBreak){let je=ue.children[ue.children.length-1];je.position.end=ib(te.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ue.type)&&(R.call(this,te),C.call(this,te))}function E(){this.data.atHardBreak=!0}function D(){let te=this.resume(),ue=this.stack[this.stack.length-1];ue.value=te}function L(){let te=this.resume(),ue=this.stack[this.stack.length-1];ue.value=te}function I(){let te=this.resume(),ue=this.stack[this.stack.length-1];ue.value=te}function _(){let te=this.stack[this.stack.length-1];if(this.data.inReference){let ue=this.data.referenceType||"shortcut";te.type+="Reference",te.referenceType=ue,delete te.url,delete te.title}else delete te.identifier,delete te.label;this.data.referenceType=void 0}function O(){let te=this.stack[this.stack.length-1];if(this.data.inReference){let ue=this.data.referenceType||"shortcut";te.type+="Reference",te.referenceType=ue,delete te.url,delete te.title}else delete te.identifier,delete te.label;this.data.referenceType=void 0}function z(te){let ue=this.sliceSerialize(te),je=this.stack[this.stack.length-2];je.label=c2e(ue),je.identifier=Cs(ue).toLowerCase()}function N(){let te=this.stack[this.stack.length-1],ue=this.resume(),je=this.stack[this.stack.length-1];if(this.data.inReference=!0,je.type==="link"){let qe=te.children;je.children=qe}else je.alt=ue}function A(){let te=this.resume(),ue=this.stack[this.stack.length-1];ue.url=te}function F(){let te=this.resume(),ue=this.stack[this.stack.length-1];ue.title=te}function H(){this.data.inReference=void 0}function P(){this.data.referenceType="collapsed"}function W(te){let ue=this.resume(),je=this.stack[this.stack.length-1];je.label=ue,je.identifier=Cs(this.sliceSerialize(te)).toLowerCase(),this.data.referenceType="full"}function q(te){this.data.characterReferenceType=te.type}function Q(te){let ue=this.sliceSerialize(te),je=this.data.characterReferenceType,qe;je?(qe=E6(ue,je==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):qe=ok(ue);let wt=this.stack[this.stack.length-1];wt.value+=qe}function $(te){let ue=this.stack.pop();ue.position.end=ib(te.end)}function ne(te){C.call(this,te);let ue=this.stack[this.stack.length-1];ue.url=this.sliceSerialize(te)}function X(te){C.call(this,te);let ue=this.stack[this.stack.length-1];ue.url="mailto:"+this.sliceSerialize(te)}function ce(){return{type:"blockquote",children:[]}}function oe(){return{type:"code",lang:null,meta:null,value:""}}function K(){return{type:"inlineCode",value:""}}function ie(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function be(){return{type:"emphasis",children:[]}}function fe(){return{type:"heading",depth:0,children:[]}}function Oe(){return{type:"break"}}function He(){return{type:"html",value:""}}function dt(){return{type:"image",title:null,url:"",alt:null}}function Me(){return{type:"link",title:null,url:"",children:[]}}function ut(te){return{type:"list",ordered:te.type==="listOrdered",start:null,spread:te._spread,children:[]}}function Ue(te){return{type:"listItem",spread:te._spread,checked:null,children:[]}}function pe(){return{type:"paragraph",children:[]}}function ve(){return{type:"strong",children:[]}}function Be(){return{type:"text",value:""}}function me(){return{type:"thematicBreak"}}}function ib(e){return{line:e.line,column:e.column,offset:e.offset}}function f2e(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?f2e(e,r):Mft(e,r)}}function Mft(e,t){let n;for(n in t)if(d2e.call(t,n))switch(n){case"canContainEols":{let r=t[n];r&&e[n].push(...r);break}case"transforms":{let r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{let r=t[n];r&&Object.assign(e[n],r);break}}}function u2e(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+tb({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+tb({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+tb({start:t.start,end:t.end})+") is still open")}function L6(e){let t=this;t.parser=n;function n(r){return EX(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function p2e(e,t){let n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function m2e(e,t){let n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`