var aa=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)};var Pn=(n,e,t)=>(aa(n,e,"read from private field"),t?t.call(n):e.get(n)),Bo=(n,e,t)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,t)},Vo=(n,e,t,r)=>(aa(n,e,"write to private field"),r?r.call(n,t):e.set(n,t),t);import{r as Be,d as zt,j as Ru,a3 as zu,aw as tp,n as np,u as Fu,m as Ri,s as rp,o as Pu,A as Lu,$ as ca,c as Rn,g as Al,x as z,D as F,F as P,K as M}from"./vue.js?ver=2.9.1";import{h as ip}from"./dayjs.js?ver=2.9.1";function I8(n,e){var t;const r=rp();return Ru(()=>{r.value=n()},{...e,flush:(t=e==null?void 0:e.flush)!=null?t:"sync"}),zu(r)}function cr(n){return tp()?(np(n),!0):!1}function Ue(n){return typeof n=="function"?n():Fu(n)}function op(n){if(!Ri(n))return ca(n);const e=new Proxy({},{get(t,r,i){return Fu(Reflect.get(n.value,r,i))},set(t,r,i){return Ri(n.value[r])&&!Ri(i)?n.value[r].value=i:n.value[r]=i,!0},deleteProperty(t,r){return Reflect.deleteProperty(n.value,r)},has(t,r){return Reflect.has(n.value,r)},ownKeys(){return Object.keys(n.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return ca(e)}function R8(n){return op(Rn(n))}const go=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const sp=n=>typeof n<"u",Bu=n=>n!=null,lp=Object.prototype.toString,ap=n=>lp.call(n)==="[object Object]",z8=(n,e,t)=>Math.min(t,Math.max(e,n)),ut=()=>{},cp=up();function up(){var n,e;return go&&((n=window==null?void 0:window.navigator)==null?void 0:n.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((e=window==null?void 0:window.navigator)==null?void 0:e.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function Vu(n,e){function t(...r){return new Promise((i,o)=>{Promise.resolve(n(()=>e.apply(this,r),{fn:e,thisArg:this,args:r})).then(i).catch(o)})}return t}function fp(n,e={}){let t,r,i=ut;const o=l=>{clearTimeout(l),i(),i=ut};return l=>{const a=Ue(n),c=Ue(e.maxWait);return t&&o(t),a<=0||c!==void 0&&c<=0?(r&&(o(r),r=null),Promise.resolve(l())):new Promise((u,f)=>{i=e.rejectOnCancel?f:u,c&&!r&&(r=setTimeout(()=>{t&&o(t),r=null,u(l())},c)),t=setTimeout(()=>{r&&o(r),r=null,u(l())},a)})}}function hp(...n){let e=0,t,r=!0,i=ut,o,s,l,a,c;!Ri(n[0])&&typeof n[0]=="object"?{delay:s,trailing:l=!0,leading:a=!0,rejectOnCancel:c=!1}=n[0]:[s,l=!0,a=!0,c=!1]=n;const u=()=>{t&&(clearTimeout(t),t=void 0,i(),i=ut)};return h=>{const d=Ue(s),p=Date.now()-e,m=()=>o=h();return u(),d<=0?(e=Date.now(),m()):(p>d&&(a||!r)?(e=Date.now(),m()):l&&(o=new Promise((y,g)=>{i=c?g:y,t=setTimeout(()=>{e=Date.now(),r=!0,y(m()),u()},Math.max(0,d-p))})),!a&&!t&&(t=setTimeout(()=>r=!0,d)),r=!1,o)}}function dp(n){return n||Al()}function pp(n,e=200,t={}){return Vu(fp(e,t),n)}function F8(n,e=200,t={}){const r=Be(n.value),i=pp(()=>{r.value=n.value},e,t);return zt(n,()=>i()),r}function P8(n,e=200,t=!1,r=!0,i=!1){return Vu(hp(e,t,r,i),n)}function Hu(n,e=!0,t){dp()?Pu(n,t):e?n():Lu(n)}function L8(n,e,t={}){const{immediate:r=!0}=t,i=Be(!1);let o=null;function s(){o&&(clearTimeout(o),o=null)}function l(){i.value=!1,s()}function a(...c){s(),i.value=!0,o=setTimeout(()=>{i.value=!1,o=null,n(...c)},Ue(e))}return r&&(i.value=!0,go&&a()),cr(l),{isPending:zu(i),start:a,stop:l}}const Pt=go?window:void 0,mp=go?window.document:void 0;function Ee(n){var e;const t=Ue(n);return(e=t==null?void 0:t.$el)!=null?e:t}function kn(...n){let e,t,r,i;if(typeof n[0]=="string"||Array.isArray(n[0])?([t,r,i]=n,e=Pt):[e,t,r,i]=n,!e)return ut;Array.isArray(t)||(t=[t]),Array.isArray(r)||(r=[r]);const o=[],s=()=>{o.forEach(u=>u()),o.length=0},l=(u,f,h,d)=>(u.addEventListener(f,h,d),()=>u.removeEventListener(f,h,d)),a=zt(()=>[Ee(e),Ue(i)],([u,f])=>{if(s(),!u)return;const h=ap(f)?{...f}:f;o.push(...t.flatMap(d=>r.map(p=>l(u,d,p,h))))},{immediate:!0,flush:"post"}),c=()=>{a(),s()};return cr(c),c}let ua=!1;function B8(n,e,t={}){const{window:r=Pt,ignore:i=[],capture:o=!0,detectIframe:s=!1}=t;if(!r)return ut;cp&&!ua&&(ua=!0,Array.from(r.document.body.children).forEach(m=>m.addEventListener("click",ut)),r.document.documentElement.addEventListener("click",ut));let l=!0;const a=m=>Ue(i).some(y=>{if(typeof y=="string")return Array.from(r.document.querySelectorAll(y)).some(g=>g===m.target||m.composedPath().includes(g));{const g=Ee(y);return g&&(m.target===g||m.composedPath().includes(g))}});function c(m){const y=Ue(m);return y&&y.$.subTree.shapeFlag===16}function u(m,y){const g=Ue(m),v=g.$.subTree&&g.$.subTree.children;return v==null||!Array.isArray(v)?!1:v.some(x=>x.el===y.target||y.composedPath().includes(x.el))}const f=m=>{const y=Ee(n);if(m.target!=null&&!(!(y instanceof Element)&&c(n)&&u(n,m))&&!(!y||y===m.target||m.composedPath().includes(y))){if(m.detail===0&&(l=!a(m)),!l){l=!0;return}e(m)}};let h=!1;const d=[kn(r,"click",m=>{h||(h=!0,setTimeout(()=>{h=!1},0),f(m))},{passive:!0,capture:o}),kn(r,"pointerdown",m=>{const y=Ee(n);l=!a(m)&&!!(y&&!m.composedPath().includes(y))},{passive:!0}),s&&kn(r,"blur",m=>{setTimeout(()=>{var y;const g=Ee(n);((y=r.document.activeElement)==null?void 0:y.tagName)==="IFRAME"&&!(g!=null&&g.contains(r.document.activeElement))&&e(m)},0)})].filter(Boolean);return()=>d.forEach(m=>m())}function gp(){const n=Be(!1),e=Al();return e&&Pu(()=>{n.value=!0},e),n}function yo(n){const e=gp();return Rn(()=>(e.value,!!n()))}function V8(n,e,t={}){const{window:r=Pt,...i}=t;let o;const s=yo(()=>r&&"MutationObserver"in r),l=()=>{o&&(o.disconnect(),o=void 0)},a=Rn(()=>{const h=Ue(n),d=(Array.isArray(h)?h:[h]).map(Ee).filter(Bu);return new Set(d)}),c=zt(()=>a.value,h=>{l(),s.value&&h.size&&(o=new MutationObserver(e),h.forEach(d=>o.observe(d,i)))},{immediate:!0,flush:"post"}),u=()=>o==null?void 0:o.takeRecords(),f=()=>{c(),l()};return cr(f),{isSupported:s,stop:f,takeRecords:u}}function yp(n,e={}){const{window:t=Pt}=e,r=yo(()=>t&&"matchMedia"in t&&typeof t.matchMedia=="function");let i;const o=Be(!1),s=c=>{o.value=c.matches},l=()=>{i&&("removeEventListener"in i?i.removeEventListener("change",s):i.removeListener(s))},a=Ru(()=>{r.value&&(l(),i=t.matchMedia(Ue(n)),"addEventListener"in i?i.addEventListener("change",s):i.addListener(s),o.value=i.matches)});return cr(()=>{a(),l(),i=void 0}),o}function bp(n){return JSON.parse(JSON.stringify(n))}function H8(n={}){const{document:e=mp}=n;if(!e)return Be("visible");const t=Be(e.visibilityState);return kn(e,"visibilitychange",()=>{t.value=e.visibilityState}),t}function wp(n,e,t={}){const{window:r=Pt,...i}=t;let o;const s=yo(()=>r&&"ResizeObserver"in r),l=()=>{o&&(o.disconnect(),o=void 0)},a=Rn(()=>{const f=Ue(n);return Array.isArray(f)?f.map(h=>Ee(h)):[Ee(f)]}),c=zt(a,f=>{if(l(),s.value&&r){o=new ResizeObserver(e);for(const h of f)h&&o.observe(h,i)}},{immediate:!0,flush:"post"}),u=()=>{l(),c()};return cr(u),{isSupported:s,stop:u}}function $8(n,e={width:0,height:0},t={}){const{window:r=Pt,box:i="content-box"}=t,o=Rn(()=>{var f,h;return(h=(f=Ee(n))==null?void 0:f.namespaceURI)==null?void 0:h.includes("svg")}),s=Be(e.width),l=Be(e.height),{stop:a}=wp(n,([f])=>{const h=i==="border-box"?f.borderBoxSize:i==="content-box"?f.contentBoxSize:f.devicePixelContentBoxSize;if(r&&o.value){const d=Ee(n);if(d){const p=d.getBoundingClientRect();s.value=p.width,l.value=p.height}}else if(h){const d=Array.isArray(h)?h:[h];s.value=d.reduce((p,{inlineSize:m})=>p+m,0),l.value=d.reduce((p,{blockSize:m})=>p+m,0)}else s.value=f.contentRect.width,l.value=f.contentRect.height},t);Hu(()=>{const f=Ee(n);f&&(s.value="offsetWidth"in f?f.offsetWidth:e.width,l.value="offsetHeight"in f?f.offsetHeight:e.height)});const c=zt(()=>Ee(n),f=>{s.value=f?e.width:0,l.value=f?e.height:0});function u(){a(),c()}return{width:s,height:l,stop:u}}function j8(n,e,t={}){const{root:r,rootMargin:i="0px",threshold:o=0,window:s=Pt,immediate:l=!0}=t,a=yo(()=>s&&"IntersectionObserver"in s),c=Rn(()=>{const p=Ue(n);return(Array.isArray(p)?p:[p]).map(Ee).filter(Bu)});let u=ut;const f=Be(l),h=a.value?zt(()=>[c.value,Ee(r),f.value],([p,m])=>{if(u(),!f.value||!p.length)return;const y=new IntersectionObserver(e,{root:Ee(m),rootMargin:i,threshold:o});p.forEach(g=>g&&y.observe(g)),u=()=>{y.disconnect(),u=ut}},{immediate:l,flush:"post"}):ut,d=()=>{u(),h(),f.value=!1};return cr(d),{isSupported:a,isActive:f,pause(){u(),f.value=!1},resume(){f.value=!0},stop:d}}function q8(n,e,t,r={}){var i,o,s;const{clone:l=!1,passive:a=!1,eventName:c,deep:u=!1,defaultValue:f,shouldEmit:h}=r,d=Al(),p=t||(d==null?void 0:d.emit)||((i=d==null?void 0:d.$emit)==null?void 0:i.bind(d))||((s=(o=d==null?void 0:d.proxy)==null?void 0:o.$emit)==null?void 0:s.bind(d==null?void 0:d.proxy));let m=c;e||(e="modelValue"),m=m||`update:${e.toString()}`;const y=x=>l?typeof l=="function"?l(x):bp(x):x,g=()=>sp(n[e])?y(n[e]):f,v=x=>{h?h(x)&&p(m,x):p(m,x)};if(a){const x=g(),C=Be(x);let O=!1;return zt(()=>n[e],k=>{O||(O=!0,C.value=y(k),Lu(()=>O=!1))}),zt(C,k=>{!O&&(k!==n[e]||u)&&v(k)},{deep:u}),C}else return Rn({get(){return g()},set(x){v(x)}})}function W8(n={}){const{window:e=Pt}=n;if(!e)return Be(!1);const t=Be(e.document.hasFocus());return kn(e,"blur",()=>{t.value=!1}),kn(e,"focus",()=>{t.value=!0}),t}function U8(n={}){const{window:e=Pt,initialWidth:t=Number.POSITIVE_INFINITY,initialHeight:r=Number.POSITIVE_INFINITY,listenOrientation:i=!0,includeScrollbar:o=!0,type:s="inner"}=n,l=Be(t),a=Be(r),c=()=>{e&&(s==="outer"?(l.value=e.outerWidth,a.value=e.outerHeight):o?(l.value=e.innerWidth,a.value=e.innerHeight):(l.value=e.document.documentElement.clientWidth,a.value=e.document.documentElement.clientHeight))};if(c(),Hu(c),kn("resize",c,{passive:!0}),i){const u=yp("(orientation: portrait)");zt(u,()=>c())}return{width:l,height:a}}var Fe="top",rt="bottom",it="right",Pe="left",Ol="auto",ei=[Fe,rt,it,Pe],Xn="start",$r="end",xp="clippingParents",$u="viewport",wr="popper",kp="reference",fa=ei.reduce(function(n,e){return n.concat([e+"-"+Xn,e+"-"+$r])},[]),ju=[].concat(ei,[Ol]).reduce(function(n,e){return n.concat([e,e+"-"+Xn,e+"-"+$r])},[]),Sp="beforeRead",vp="read",Cp="afterRead",Ap="beforeMain",Op="main",Mp="afterMain",Ep="beforeWrite",_p="write",Tp="afterWrite",Np=[Sp,vp,Cp,Ap,Op,Mp,Ep,_p,Tp];function St(n){return n?(n.nodeName||"").toLowerCase():null}function mt(n){if(n==null)return window;if(n.toString()!=="[object Window]"){var e=n.ownerDocument;return e&&e.defaultView||window}return n}function Qn(n){var e=mt(n).Element;return n instanceof e||n instanceof Element}function et(n){var e=mt(n).HTMLElement;return n instanceof e||n instanceof HTMLElement}function Ml(n){if(typeof ShadowRoot>"u")return!1;var e=mt(n).ShadowRoot;return n instanceof e||n instanceof ShadowRoot}function Dp(n){var e=n.state;Object.keys(e.elements).forEach(function(t){var r=e.styles[t]||{},i=e.attributes[t]||{},o=e.elements[t];!et(o)||!St(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(s){var l=i[s];l===!1?o.removeAttribute(s):o.setAttribute(s,l===!0?"":l)}))})}function Ip(n){var e=n.state,t={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,t.popper),e.styles=t,e.elements.arrow&&Object.assign(e.elements.arrow.style,t.arrow),function(){Object.keys(e.elements).forEach(function(r){var i=e.elements[r],o=e.attributes[r]||{},s=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:t[r]),l=s.reduce(function(a,c){return a[c]="",a},{});!et(i)||!St(i)||(Object.assign(i.style,l),Object.keys(o).forEach(function(a){i.removeAttribute(a)}))})}}var qu={name:"applyStyles",enabled:!0,phase:"write",fn:Dp,effect:Ip,requires:["computeStyles"]};function kt(n){return n.split("-")[0]}var Sn=Math.max,Ki=Math.min,Zn=Math.round;function er(n,e){e===void 0&&(e=!1);var t=n.getBoundingClientRect(),r=1,i=1;if(et(n)&&e){var o=n.offsetHeight,s=n.offsetWidth;s>0&&(r=Zn(t.width)/s||1),o>0&&(i=Zn(t.height)/o||1)}return{width:t.width/r,height:t.height/i,top:t.top/i,right:t.right/r,bottom:t.bottom/i,left:t.left/r,x:t.left/r,y:t.top/i}}function El(n){var e=er(n),t=n.offsetWidth,r=n.offsetHeight;return Math.abs(e.width-t)<=1&&(t=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:n.offsetLeft,y:n.offsetTop,width:t,height:r}}function Wu(n,e){var t=e.getRootNode&&e.getRootNode();if(n.contains(e))return!0;if(t&&Ml(t)){var r=e;do{if(r&&n.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Ft(n){return mt(n).getComputedStyle(n)}function Rp(n){return["table","td","th"].indexOf(St(n))>=0}function sn(n){return((Qn(n)?n.ownerDocument:n.document)||window.document).documentElement}function bo(n){return St(n)==="html"?n:n.assignedSlot||n.parentNode||(Ml(n)?n.host:null)||sn(n)}function ha(n){return!et(n)||Ft(n).position==="fixed"?null:n.offsetParent}function zp(n){var e=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,t=navigator.userAgent.indexOf("Trident")!==-1;if(t&&et(n)){var r=Ft(n);if(r.position==="fixed")return null}var i=bo(n);for(Ml(i)&&(i=i.host);et(i)&&["html","body"].indexOf(St(i))<0;){var o=Ft(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||e&&o.willChange==="filter"||e&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function ti(n){for(var e=mt(n),t=ha(n);t&&Rp(t)&&Ft(t).position==="static";)t=ha(t);return t&&(St(t)==="html"||St(t)==="body"&&Ft(t).position==="static")?e:t||zp(n)||e}function _l(n){return["top","bottom"].indexOf(n)>=0?"x":"y"}function Er(n,e,t){return Sn(n,Ki(e,t))}function Fp(n,e,t){var r=Er(n,e,t);return r>t?t:r}function Uu(){return{top:0,right:0,bottom:0,left:0}}function Ju(n){return Object.assign({},Uu(),n)}function Ku(n,e){return e.reduce(function(t,r){return t[r]=n,t},{})}var Pp=function(n,e){return n=typeof n=="function"?n(Object.assign({},e.rects,{placement:e.placement})):n,Ju(typeof n!="number"?n:Ku(n,ei))};function Lp(n){var e,t=n.state,r=n.name,i=n.options,o=t.elements.arrow,s=t.modifiersData.popperOffsets,l=kt(t.placement),a=_l(l),c=[Pe,it].indexOf(l)>=0,u=c?"height":"width";if(!(!o||!s)){var f=Pp(i.padding,t),h=El(o),d=a==="y"?Fe:Pe,p=a==="y"?rt:it,m=t.rects.reference[u]+t.rects.reference[a]-s[a]-t.rects.popper[u],y=s[a]-t.rects.reference[a],g=ti(o),v=g?a==="y"?g.clientHeight||0:g.clientWidth||0:0,x=m/2-y/2,C=f[d],O=v-h[u]-f[p],k=v/2-h[u]/2+x,I=Er(C,k,O),L=a;t.modifiersData[r]=(e={},e[L]=I,e.centerOffset=I-k,e)}}function Bp(n){var e=n.state,t=n.options,r=t.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=e.elements.popper.querySelector(i),!i)||!Wu(e.elements.popper,i)||(e.elements.arrow=i))}var Vp={name:"arrow",enabled:!0,phase:"main",fn:Lp,effect:Bp,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function tr(n){return n.split("-")[1]}var Hp={top:"auto",right:"auto",bottom:"auto",left:"auto"};function $p(n){var e=n.x,t=n.y,r=window,i=r.devicePixelRatio||1;return{x:Zn(e*i)/i||0,y:Zn(t*i)/i||0}}function da(n){var e,t=n.popper,r=n.popperRect,i=n.placement,o=n.variation,s=n.offsets,l=n.position,a=n.gpuAcceleration,c=n.adaptive,u=n.roundOffsets,f=n.isFixed,h=s.x,d=h===void 0?0:h,p=s.y,m=p===void 0?0:p,y=typeof u=="function"?u({x:d,y:m}):{x:d,y:m};d=y.x,m=y.y;var g=s.hasOwnProperty("x"),v=s.hasOwnProperty("y"),x=Pe,C=Fe,O=window;if(c){var k=ti(t),I="clientHeight",L="clientWidth";if(k===mt(t)&&(k=sn(t),Ft(k).position!=="static"&&l==="absolute"&&(I="scrollHeight",L="scrollWidth")),k=k,i===Fe||(i===Pe||i===it)&&o===$r){C=rt;var E=f&&k===O&&O.visualViewport?O.visualViewport.height:k[I];m-=E-r.height,m*=a?1:-1}if(i===Pe||(i===Fe||i===rt)&&o===$r){x=it;var S=f&&k===O&&O.visualViewport?O.visualViewport.width:k[L];d-=S-r.width,d*=a?1:-1}}var T=Object.assign({position:l},c&&Hp),D=u===!0?$p({x:d,y:m}):{x:d,y:m};if(d=D.x,m=D.y,a){var B;return Object.assign({},T,(B={},B[C]=v?"0":"",B[x]=g?"0":"",B.transform=(O.devicePixelRatio||1)<=1?"translate("+d+"px, "+m+"px)":"translate3d("+d+"px, "+m+"px, 0)",B))}return Object.assign({},T,(e={},e[C]=v?m+"px":"",e[x]=g?d+"px":"",e.transform="",e))}function jp(n){var e=n.state,t=n.options,r=t.gpuAcceleration,i=r===void 0?!0:r,o=t.adaptive,s=o===void 0?!0:o,l=t.roundOffsets,a=l===void 0?!0:l,c={placement:kt(e.placement),variation:tr(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,da(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:a})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,da(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:a})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}var Yu={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:jp,data:{}},bi={passive:!0};function qp(n){var e=n.state,t=n.instance,r=n.options,i=r.scroll,o=i===void 0?!0:i,s=r.resize,l=s===void 0?!0:s,a=mt(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach(function(u){u.addEventListener("scroll",t.update,bi)}),l&&a.addEventListener("resize",t.update,bi),function(){o&&c.forEach(function(u){u.removeEventListener("scroll",t.update,bi)}),l&&a.removeEventListener("resize",t.update,bi)}}var Gu={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:qp,data:{}},Wp={left:"right",right:"left",bottom:"top",top:"bottom"};function zi(n){return n.replace(/left|right|bottom|top/g,function(e){return Wp[e]})}var Up={start:"end",end:"start"};function pa(n){return n.replace(/start|end/g,function(e){return Up[e]})}function Tl(n){var e=mt(n),t=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:t,scrollTop:r}}function Nl(n){return er(sn(n)).left+Tl(n).scrollLeft}function Jp(n){var e=mt(n),t=sn(n),r=e.visualViewport,i=t.clientWidth,o=t.clientHeight,s=0,l=0;return r&&(i=r.width,o=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(s=r.offsetLeft,l=r.offsetTop)),{width:i,height:o,x:s+Nl(n),y:l}}function Kp(n){var e,t=sn(n),r=Tl(n),i=(e=n.ownerDocument)==null?void 0:e.body,o=Sn(t.scrollWidth,t.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=Sn(t.scrollHeight,t.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),l=-r.scrollLeft+Nl(n),a=-r.scrollTop;return Ft(i||t).direction==="rtl"&&(l+=Sn(t.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:l,y:a}}function Dl(n){var e=Ft(n),t=e.overflow,r=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(t+i+r)}function Xu(n){return["html","body","#document"].indexOf(St(n))>=0?n.ownerDocument.body:et(n)&&Dl(n)?n:Xu(bo(n))}function _r(n,e){var t;e===void 0&&(e=[]);var r=Xu(n),i=r===((t=n.ownerDocument)==null?void 0:t.body),o=mt(r),s=i?[o].concat(o.visualViewport||[],Dl(r)?r:[]):r,l=e.concat(s);return i?l:l.concat(_r(bo(s)))}function Cs(n){return Object.assign({},n,{left:n.x,top:n.y,right:n.x+n.width,bottom:n.y+n.height})}function Yp(n){var e=er(n);return e.top=e.top+n.clientTop,e.left=e.left+n.clientLeft,e.bottom=e.top+n.clientHeight,e.right=e.left+n.clientWidth,e.width=n.clientWidth,e.height=n.clientHeight,e.x=e.left,e.y=e.top,e}function ma(n,e){return e===$u?Cs(Jp(n)):Qn(e)?Yp(e):Cs(Kp(sn(n)))}function Gp(n){var e=_r(bo(n)),t=["absolute","fixed"].indexOf(Ft(n).position)>=0,r=t&&et(n)?ti(n):n;return Qn(r)?e.filter(function(i){return Qn(i)&&Wu(i,r)&&St(i)!=="body"}):[]}function Xp(n,e,t){var r=e==="clippingParents"?Gp(n):[].concat(e),i=[].concat(r,[t]),o=i[0],s=i.reduce(function(l,a){var c=ma(n,a);return l.top=Sn(c.top,l.top),l.right=Ki(c.right,l.right),l.bottom=Ki(c.bottom,l.bottom),l.left=Sn(c.left,l.left),l},ma(n,o));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Qu(n){var e=n.reference,t=n.element,r=n.placement,i=r?kt(r):null,o=r?tr(r):null,s=e.x+e.width/2-t.width/2,l=e.y+e.height/2-t.height/2,a;switch(i){case Fe:a={x:s,y:e.y-t.height};break;case rt:a={x:s,y:e.y+e.height};break;case it:a={x:e.x+e.width,y:l};break;case Pe:a={x:e.x-t.width,y:l};break;default:a={x:e.x,y:e.y}}var c=i?_l(i):null;if(c!=null){var u=c==="y"?"height":"width";switch(o){case Xn:a[c]=a[c]-(e[u]/2-t[u]/2);break;case $r:a[c]=a[c]+(e[u]/2-t[u]/2);break}}return a}function jr(n,e){e===void 0&&(e={});var t=e,r=t.placement,i=r===void 0?n.placement:r,o=t.boundary,s=o===void 0?xp:o,l=t.rootBoundary,a=l===void 0?$u:l,c=t.elementContext,u=c===void 0?wr:c,f=t.altBoundary,h=f===void 0?!1:f,d=t.padding,p=d===void 0?0:d,m=Ju(typeof p!="number"?p:Ku(p,ei)),y=u===wr?kp:wr,g=n.rects.popper,v=n.elements[h?y:u],x=Xp(Qn(v)?v:v.contextElement||sn(n.elements.popper),s,a),C=er(n.elements.reference),O=Qu({reference:C,element:g,strategy:"absolute",placement:i}),k=Cs(Object.assign({},g,O)),I=u===wr?k:C,L={top:x.top-I.top+m.top,bottom:I.bottom-x.bottom+m.bottom,left:x.left-I.left+m.left,right:I.right-x.right+m.right},E=n.modifiersData.offset;if(u===wr&&E){var S=E[i];Object.keys(L).forEach(function(T){var D=[it,rt].indexOf(T)>=0?1:-1,B=[Fe,rt].indexOf(T)>=0?"y":"x";L[T]+=S[B]*D})}return L}function Qp(n,e){e===void 0&&(e={});var t=e,r=t.placement,i=t.boundary,o=t.rootBoundary,s=t.padding,l=t.flipVariations,a=t.allowedAutoPlacements,c=a===void 0?ju:a,u=tr(r),f=u?l?fa:fa.filter(function(p){return tr(p)===u}):ei,h=f.filter(function(p){return c.indexOf(p)>=0});h.length===0&&(h=f);var d=h.reduce(function(p,m){return p[m]=jr(n,{placement:m,boundary:i,rootBoundary:o,padding:s})[kt(m)],p},{});return Object.keys(d).sort(function(p,m){return d[p]-d[m]})}function Zp(n){if(kt(n)===Ol)return[];var e=zi(n);return[pa(n),e,pa(e)]}function e0(n){var e=n.state,t=n.options,r=n.name;if(!e.modifiersData[r]._skip){for(var i=t.mainAxis,o=i===void 0?!0:i,s=t.altAxis,l=s===void 0?!0:s,a=t.fallbackPlacements,c=t.padding,u=t.boundary,f=t.rootBoundary,h=t.altBoundary,d=t.flipVariations,p=d===void 0?!0:d,m=t.allowedAutoPlacements,y=e.options.placement,g=kt(y),v=g===y,x=a||(v||!p?[zi(y)]:Zp(y)),C=[y].concat(x).reduce(function(ce,de){return ce.concat(kt(de)===Ol?Qp(e,{placement:de,boundary:u,rootBoundary:f,padding:c,flipVariations:p,allowedAutoPlacements:m}):de)},[]),O=e.rects.reference,k=e.rects.popper,I=new Map,L=!0,E=C[0],S=0;S=0,j=W?"width":"height",J=jr(e,{placement:T,boundary:u,rootBoundary:f,altBoundary:h,padding:c}),K=W?B?it:Pe:B?rt:Fe;O[j]>k[j]&&(K=zi(K));var re=zi(K),ne=[];if(o&&ne.push(J[D]<=0),l&&ne.push(J[K]<=0,J[re]<=0),ne.every(function(ce){return ce})){E=T,L=!1;break}I.set(T,ne)}if(L)for(var b=p?3:1,ve=function(ce){var de=C.find(function(ie){var st=I.get(ie);if(st)return st.slice(0,ce).every(function(Ae){return Ae})});if(de)return E=de,"break"},Ce=b;Ce>0;Ce--){var w=ve(Ce);if(w==="break")break}e.placement!==E&&(e.modifiersData[r]._skip=!0,e.placement=E,e.reset=!0)}}var t0={name:"flip",enabled:!0,phase:"main",fn:e0,requiresIfExists:["offset"],data:{_skip:!1}};function ga(n,e,t){return t===void 0&&(t={x:0,y:0}),{top:n.top-e.height-t.y,right:n.right-e.width+t.x,bottom:n.bottom-e.height+t.y,left:n.left-e.width-t.x}}function ya(n){return[Fe,it,rt,Pe].some(function(e){return n[e]>=0})}function n0(n){var e=n.state,t=n.name,r=e.rects.reference,i=e.rects.popper,o=e.modifiersData.preventOverflow,s=jr(e,{elementContext:"reference"}),l=jr(e,{altBoundary:!0}),a=ga(s,r),c=ga(l,i,o),u=ya(a),f=ya(c);e.modifiersData[t]={referenceClippingOffsets:a,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:f},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":f})}var r0={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:n0};function i0(n,e,t){var r=kt(n),i=[Pe,Fe].indexOf(r)>=0?-1:1,o=typeof t=="function"?t(Object.assign({},e,{placement:n})):t,s=o[0],l=o[1];return s=s||0,l=(l||0)*i,[Pe,it].indexOf(r)>=0?{x:l,y:s}:{x:s,y:l}}function o0(n){var e=n.state,t=n.options,r=n.name,i=t.offset,o=i===void 0?[0,0]:i,s=ju.reduce(function(u,f){return u[f]=i0(f,e.rects,o),u},{}),l=s[e.placement],a=l.x,c=l.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=a,e.modifiersData.popperOffsets.y+=c),e.modifiersData[r]=s}var s0={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:o0};function l0(n){var e=n.state,t=n.name;e.modifiersData[t]=Qu({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}var Zu={name:"popperOffsets",enabled:!0,phase:"read",fn:l0,data:{}};function a0(n){return n==="x"?"y":"x"}function c0(n){var e=n.state,t=n.options,r=n.name,i=t.mainAxis,o=i===void 0?!0:i,s=t.altAxis,l=s===void 0?!1:s,a=t.boundary,c=t.rootBoundary,u=t.altBoundary,f=t.padding,h=t.tether,d=h===void 0?!0:h,p=t.tetherOffset,m=p===void 0?0:p,y=jr(e,{boundary:a,rootBoundary:c,padding:f,altBoundary:u}),g=kt(e.placement),v=tr(e.placement),x=!v,C=_l(g),O=a0(C),k=e.modifiersData.popperOffsets,I=e.rects.reference,L=e.rects.popper,E=typeof m=="function"?m(Object.assign({},e.rects,{placement:e.placement})):m,S=typeof E=="number"?{mainAxis:E,altAxis:E}:Object.assign({mainAxis:0,altAxis:0},E),T=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,D={x:0,y:0};if(k){if(o){var B,W=C==="y"?Fe:Pe,j=C==="y"?rt:it,J=C==="y"?"height":"width",K=k[C],re=K+y[W],ne=K-y[j],b=d?-L[J]/2:0,ve=v===Xn?I[J]:L[J],Ce=v===Xn?-L[J]:-I[J],w=e.elements.arrow,ce=d&&w?El(w):{width:0,height:0},de=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:Uu(),ie=de[W],st=de[j],Ae=Er(0,I[J],ce[J]),Vt=x?I[J]/2-b-Ae-ie-S.mainAxis:ve-Ae-ie-S.mainAxis,Ht=x?-I[J]/2+b+Ae+st+S.mainAxis:Ce+Ae+st+S.mainAxis,$t=e.elements.arrow&&ti(e.elements.arrow),Fo=$t?C==="y"?$t.clientTop||0:$t.clientLeft||0:0,hi=(B=T==null?void 0:T[C])!=null?B:0,Po=K+Vt-hi-Fo,di=K+Ht-hi,pr=Er(d?Ki(re,Po):re,K,d?Sn(ne,di):ne);k[C]=pr,D[C]=pr-K}if(l){var mr,Lo=C==="x"?Fe:Pe,pi=C==="x"?rt:it,gt=k[O],zn=O==="y"?"height":"width",mi=gt+y[Lo],gi=gt-y[pi],gr=[Fe,Pe].indexOf(g)!==-1,yi=(mr=T==null?void 0:T[O])!=null?mr:0,A=gr?mi:gt-I[zn]-L[zn]-yi+S.altAxis,N=gr?gt+I[zn]+L[zn]-yi-S.altAxis:gi,H=d&&gr?Fp(A,gt,N):Er(d?A:mi,gt,d?N:gi);k[O]=H,D[O]=H-gt}e.modifiersData[r]=D}}var u0={name:"preventOverflow",enabled:!0,phase:"main",fn:c0,requiresIfExists:["offset"]};function f0(n){return{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}}function h0(n){return n===mt(n)||!et(n)?Tl(n):f0(n)}function d0(n){var e=n.getBoundingClientRect(),t=Zn(e.width)/n.offsetWidth||1,r=Zn(e.height)/n.offsetHeight||1;return t!==1||r!==1}function p0(n,e,t){t===void 0&&(t=!1);var r=et(e),i=et(e)&&d0(e),o=sn(e),s=er(n,i),l={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(r||!r&&!t)&&((St(e)!=="body"||Dl(o))&&(l=h0(e)),et(e)?(a=er(e,!0),a.x+=e.clientLeft,a.y+=e.clientTop):o&&(a.x=Nl(o))),{x:s.left+l.scrollLeft-a.x,y:s.top+l.scrollTop-a.y,width:s.width,height:s.height}}function m0(n){var e=new Map,t=new Set,r=[];n.forEach(function(o){e.set(o.name,o)});function i(o){t.add(o.name);var s=[].concat(o.requires||[],o.requiresIfExists||[]);s.forEach(function(l){if(!t.has(l)){var a=e.get(l);a&&i(a)}}),r.push(o)}return n.forEach(function(o){t.has(o.name)||i(o)}),r}function g0(n){var e=m0(n);return Np.reduce(function(t,r){return t.concat(e.filter(function(i){return i.phase===r}))},[])}function y0(n){var e;return function(){return e||(e=new Promise(function(t){Promise.resolve().then(function(){e=void 0,t(n())})})),e}}function b0(n){var e=n.reduce(function(t,r){var i=t[r.name];return t[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,t},{});return Object.keys(e).map(function(t){return e[t]})}var ba={placement:"bottom",modifiers:[],strategy:"absolute"};function wa(){for(var n=arguments.length,e=new Array(n),t=0;t({x:n,y:n}),k0={left:"right",right:"left",bottom:"top",top:"bottom"},S0={start:"end",end:"start"};function Rl(n,e){return typeof n=="function"?n(e):n}function nr(n){return n.split("-")[0]}function wo(n){return n.split("-")[1]}function v0(n){return n==="x"?"y":"x"}function ef(n){return n==="y"?"height":"width"}function qr(n){return["top","bottom"].includes(nr(n))?"y":"x"}function tf(n){return v0(qr(n))}function C0(n,e,t){t===void 0&&(t=!1);const r=wo(n),i=tf(n),o=ef(i);let s=i==="x"?r===(t?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(s=Gi(s)),[s,Gi(s)]}function A0(n){const e=Gi(n);return[As(n),e,As(e)]}function As(n){return n.replace(/start|end/g,e=>S0[e])}function O0(n,e,t){const r=["left","right"],i=["right","left"],o=["top","bottom"],s=["bottom","top"];switch(n){case"top":case"bottom":return t?e?i:r:e?r:i;case"left":case"right":return e?o:s;default:return[]}}function M0(n,e,t,r){const i=wo(n);let o=O0(nr(n),t==="start",r);return i&&(o=o.map(s=>s+"-"+i),e&&(o=o.concat(o.map(As)))),o}function Gi(n){return n.replace(/left|right|bottom|top/g,e=>k0[e])}function E0(n){return{top:0,right:0,bottom:0,left:0,...n}}function _0(n){return typeof n!="number"?E0(n):{top:n,right:n,bottom:n,left:n}}function Xi(n){const{x:e,y:t,width:r,height:i}=n;return{width:r,height:i,top:t,left:e,right:e+r,bottom:t+i,x:e,y:t}}function ka(n,e,t){let{reference:r,floating:i}=n;const o=qr(e),s=tf(e),l=ef(s),a=nr(e),c=o==="y",u=r.x+r.width/2-i.width/2,f=r.y+r.height/2-i.height/2,h=r[l]/2-i[l]/2;let d;switch(a){case"top":d={x:u,y:r.y-i.height};break;case"bottom":d={x:u,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:f};break;case"left":d={x:r.x-i.width,y:f};break;default:d={x:r.x,y:r.y}}switch(wo(e)){case"start":d[s]-=h*(t&&c?-1:1);break;case"end":d[s]+=h*(t&&c?-1:1);break}return d}const T0=async(n,e,t)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:s}=t,l=o.filter(Boolean),a=await(s.isRTL==null?void 0:s.isRTL(e));let c=await s.getElementRects({reference:n,floating:e,strategy:i}),{x:u,y:f}=ka(c,r,a),h=r,d={},p=0;for(let m=0;mW<=0)){var T,D;const W=(((T=o.flip)==null?void 0:T.index)||0)+1,j=I[W];if(j)return{data:{index:W,overflows:S},reset:{placement:j}};let J=(D=S.filter(K=>K.overflows[0]<=0).sort((K,re)=>K.overflows[1]-re.overflows[1])[0])==null?void 0:D.placement;if(!J)switch(d){case"bestFit":{var B;const K=(B=S.filter(re=>{if(k){const ne=qr(re.placement);return ne===v||ne==="y"}return!0}).map(re=>[re.placement,re.overflows.filter(ne=>ne>0).reduce((ne,b)=>ne+b,0)]).sort((re,ne)=>re[1]-ne[1])[0])==null?void 0:B[0];K&&(J=K);break}case"initialPlacement":J=l;break}if(i!==J)return{reset:{placement:J}}}return{}}}};async function I0(n,e){const{placement:t,platform:r,elements:i}=n,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),s=nr(t),l=wo(t),a=qr(t)==="y",c=["left","top"].includes(s)?-1:1,u=o&&a?-1:1,f=Rl(e,n);let{mainAxis:h,crossAxis:d,alignmentAxis:p}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return l&&typeof p=="number"&&(d=l==="end"?p*-1:p),a?{x:d*u,y:h*c}:{x:h*c,y:d*u}}const R0=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(e){var t,r;const{x:i,y:o,placement:s,middlewareData:l}=e,a=await I0(e,n);return s===((t=l.offset)==null?void 0:t.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:i+a.x,y:o+a.y,data:{...a,placement:s}}}}};function ur(n){return nf(n)?(n.nodeName||"").toLowerCase():"#document"}function Je(n){var e;return(n==null||(e=n.ownerDocument)==null?void 0:e.defaultView)||window}function ln(n){var e;return(e=(nf(n)?n.ownerDocument:n.document)||window.document)==null?void 0:e.documentElement}function nf(n){return n instanceof Node||n instanceof Je(n).Node}function ht(n){return n instanceof Element||n instanceof Je(n).Element}function vt(n){return n instanceof HTMLElement||n instanceof Je(n).HTMLElement}function Sa(n){return typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof Je(n).ShadowRoot}function ni(n){const{overflow:e,overflowX:t,overflowY:r,display:i}=dt(n);return/auto|scroll|overlay|hidden|clip/.test(e+r+t)&&!["inline","contents"].includes(i)}function z0(n){return["table","td","th"].includes(ur(n))}function xo(n){return[":popover-open",":modal"].some(e=>{try{return n.matches(e)}catch{return!1}})}function zl(n){const e=Fl(),t=ht(n)?dt(n):n;return t.transform!=="none"||t.perspective!=="none"||(t.containerType?t.containerType!=="normal":!1)||!e&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!e&&(t.filter?t.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(t.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(t.contain||"").includes(r))}function F0(n){let e=rn(n);for(;vt(e)&&!rr(e);){if(zl(e))return e;if(xo(e))return null;e=rn(e)}return null}function Fl(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function rr(n){return["html","body","#document"].includes(ur(n))}function dt(n){return Je(n).getComputedStyle(n)}function ko(n){return ht(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function rn(n){if(ur(n)==="html")return n;const e=n.assignedSlot||n.parentNode||Sa(n)&&n.host||ln(n);return Sa(e)?e.host:e}function rf(n){const e=rn(n);return rr(e)?n.ownerDocument?n.ownerDocument.body:n.body:vt(e)&&ni(e)?e:rf(e)}function Os(n,e,t){var r;e===void 0&&(e=[]),t===void 0&&(t=!0);const i=rf(n),o=i===((r=n.ownerDocument)==null?void 0:r.body),s=Je(i);if(o){const l=Ms(s);return e.concat(s,s.visualViewport||[],ni(i)?i:[],l&&t?Os(l):[])}return e.concat(i,Os(i,[],t))}function Ms(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function of(n){const e=dt(n);let t=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=vt(n),o=i?n.offsetWidth:t,s=i?n.offsetHeight:r,l=Yi(t)!==o||Yi(r)!==s;return l&&(t=o,r=s),{width:t,height:r,$:l}}function sf(n){return ht(n)?n:n.contextElement}function Un(n){const e=sf(n);if(!vt(e))return nn(1);const t=e.getBoundingClientRect(),{width:r,height:i,$:o}=of(e);let s=(o?Yi(t.width):t.width)/r,l=(o?Yi(t.height):t.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}const P0=nn(0);function lf(n){const e=Je(n);return!Fl()||!e.visualViewport?P0:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function L0(n,e,t){return e===void 0&&(e=!1),!t||e&&t!==Je(n)?!1:e}function Wr(n,e,t,r){e===void 0&&(e=!1),t===void 0&&(t=!1);const i=n.getBoundingClientRect(),o=sf(n);let s=nn(1);e&&(r?ht(r)&&(s=Un(r)):s=Un(n));const l=L0(o,t,r)?lf(o):nn(0);let a=(i.left+l.x)/s.x,c=(i.top+l.y)/s.y,u=i.width/s.x,f=i.height/s.y;if(o){const h=Je(o),d=r&&ht(r)?Je(r):r;let p=h,m=Ms(p);for(;m&&r&&d!==p;){const y=Un(m),g=m.getBoundingClientRect(),v=dt(m),x=g.left+(m.clientLeft+parseFloat(v.paddingLeft))*y.x,C=g.top+(m.clientTop+parseFloat(v.paddingTop))*y.y;a*=y.x,c*=y.y,u*=y.x,f*=y.y,a+=x,c+=C,p=Je(m),m=Ms(p)}}return Xi({width:u,height:f,x:a,y:c})}function B0(n){let{elements:e,rect:t,offsetParent:r,strategy:i}=n;const o=i==="fixed",s=ln(r),l=e?xo(e.floating):!1;if(r===s||l&&o)return t;let a={scrollLeft:0,scrollTop:0},c=nn(1);const u=nn(0),f=vt(r);if((f||!f&&!o)&&((ur(r)!=="body"||ni(s))&&(a=ko(r)),vt(r))){const h=Wr(r);c=Un(r),u.x=h.x+r.clientLeft,u.y=h.y+r.clientTop}return{width:t.width*c.x,height:t.height*c.y,x:t.x*c.x-a.scrollLeft*c.x+u.x,y:t.y*c.y-a.scrollTop*c.y+u.y}}function V0(n){return Array.from(n.getClientRects())}function af(n){return Wr(ln(n)).left+ko(n).scrollLeft}function H0(n){const e=ln(n),t=ko(n),r=n.ownerDocument.body,i=Tr(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),o=Tr(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let s=-t.scrollLeft+af(n);const l=-t.scrollTop;return dt(r).direction==="rtl"&&(s+=Tr(e.clientWidth,r.clientWidth)-i),{width:i,height:o,x:s,y:l}}function $0(n,e){const t=Je(n),r=ln(n),i=t.visualViewport;let o=r.clientWidth,s=r.clientHeight,l=0,a=0;if(i){o=i.width,s=i.height;const c=Fl();(!c||c&&e==="fixed")&&(l=i.offsetLeft,a=i.offsetTop)}return{width:o,height:s,x:l,y:a}}function j0(n,e){const t=Wr(n,!0,e==="fixed"),r=t.top+n.clientTop,i=t.left+n.clientLeft,o=vt(n)?Un(n):nn(1),s=n.clientWidth*o.x,l=n.clientHeight*o.y,a=i*o.x,c=r*o.y;return{width:s,height:l,x:a,y:c}}function va(n,e,t){let r;if(e==="viewport")r=$0(n,t);else if(e==="document")r=H0(ln(n));else if(ht(e))r=j0(e,t);else{const i=lf(n);r={...e,x:e.x-i.x,y:e.y-i.y}}return Xi(r)}function cf(n,e){const t=rn(n);return t===e||!ht(t)||rr(t)?!1:dt(t).position==="fixed"||cf(t,e)}function q0(n,e){const t=e.get(n);if(t)return t;let r=Os(n,[],!1).filter(l=>ht(l)&&ur(l)!=="body"),i=null;const o=dt(n).position==="fixed";let s=o?rn(n):n;for(;ht(s)&&!rr(s);){const l=dt(s),a=zl(s);!a&&l.position==="fixed"&&(i=null),(o?!a&&!i:!a&&l.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||ni(s)&&!a&&cf(n,s))?r=r.filter(u=>u!==s):i=l,s=rn(s)}return e.set(n,r),r}function W0(n){let{element:e,boundary:t,rootBoundary:r,strategy:i}=n;const s=[...t==="clippingAncestors"?xo(e)?[]:q0(e,this._c):[].concat(t),r],l=s[0],a=s.reduce((c,u)=>{const f=va(e,u,i);return c.top=Tr(f.top,c.top),c.right=xa(f.right,c.right),c.bottom=xa(f.bottom,c.bottom),c.left=Tr(f.left,c.left),c},va(e,l,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function U0(n){const{width:e,height:t}=of(n);return{width:e,height:t}}function J0(n,e,t){const r=vt(e),i=ln(e),o=t==="fixed",s=Wr(n,!0,o,e);let l={scrollLeft:0,scrollTop:0};const a=nn(0);if(r||!r&&!o)if((ur(e)!=="body"||ni(i))&&(l=ko(e)),r){const f=Wr(e,!0,o,e);a.x=f.x+e.clientLeft,a.y=f.y+e.clientTop}else i&&(a.x=af(i));const c=s.left+l.scrollLeft-a.x,u=s.top+l.scrollTop-a.y;return{x:c,y:u,width:s.width,height:s.height}}function Ho(n){return dt(n).position==="static"}function Ca(n,e){return!vt(n)||dt(n).position==="fixed"?null:e?e(n):n.offsetParent}function uf(n,e){const t=Je(n);if(xo(n))return t;if(!vt(n)){let i=rn(n);for(;i&&!rr(i);){if(ht(i)&&!Ho(i))return i;i=rn(i)}return t}let r=Ca(n,e);for(;r&&z0(r)&&Ho(r);)r=Ca(r,e);return r&&rr(r)&&Ho(r)&&!zl(r)?t:r||F0(n)||t}const K0=async function(n){const e=this.getOffsetParent||uf,t=this.getDimensions,r=await t(n.floating);return{reference:J0(n.reference,await e(n.floating),n.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Y0(n){return dt(n).direction==="rtl"}const G0={convertOffsetParentRelativeRectToViewportRelativeRect:B0,getDocumentElement:ln,getClippingRect:W0,getOffsetParent:uf,getElementRects:K0,getClientRects:V0,getDimensions:U0,getScale:Un,isElement:ht,isRTL:Y0},K8=R0,Y8=D0,G8=(n,e,t)=>{const r=new Map,i={platform:G0,...t},o={...i.platform,_c:r};return T0(n,e,{...i,platform:o})};/*! Element Plus Icons Vue v2.3.2 */var X0=z({name:"AlarmClock",__name:"alarm-clock",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M512 832a320 320 0 1 0 0-640 320 320 0 0 0 0 640m0 64a384 384 0 1 1 0-768 384 384 0 0 1 0 768"}),M("path",{fill:"currentColor",d:"m292.288 824.576 55.424 32-48 83.136a32 32 0 1 1-55.424-32zm439.424 0-55.424 32 48 83.136a32 32 0 1 0 55.424-32zM512 512h160a32 32 0 1 1 0 64H480a32 32 0 0 1-32-32V320a32 32 0 0 1 64 0zM90.496 312.256A160 160 0 0 1 312.32 90.496l-46.848 46.848a96 96 0 0 0-128 128L90.56 312.256zm835.264 0A160 160 0 0 0 704 90.496l46.848 46.848a96 96 0 0 1 128 128z"})]))}}),X8=X0,Q0=z({name:"ArrowDown",__name:"arrow-down",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.59 30.59 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.59 30.59 0 0 0-42.752 0z"})]))}}),Q8=Q0,Z0=z({name:"ArrowLeftBold",__name:"arrow-left-bold",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M685.248 104.704a64 64 0 0 1 0 90.496L368.448 512l316.8 316.8a64 64 0 0 1-90.496 90.496L232.704 557.248a64 64 0 0 1 0-90.496l362.048-362.048a64 64 0 0 1 90.496 0"})]))}}),Z8=Z0,em=z({name:"ArrowLeft",__name:"arrow-left",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M609.408 149.376 277.76 489.6a32 32 0 0 0 0 44.672l331.648 340.352a29.12 29.12 0 0 0 41.728 0 30.59 30.59 0 0 0 0-42.752L339.264 511.936l311.872-319.872a30.59 30.59 0 0 0 0-42.688 29.12 29.12 0 0 0-41.728 0"})]))}}),eS=em,tm=z({name:"ArrowRightBold",__name:"arrow-right-bold",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M338.752 104.704a64 64 0 0 0 0 90.496l316.8 316.8-316.8 316.8a64 64 0 0 0 90.496 90.496l362.048-362.048a64 64 0 0 0 0-90.496L429.248 104.704a64 64 0 0 0-90.496 0"})]))}}),tS=tm,nm=z({name:"ArrowRight",__name:"arrow-right",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M340.864 149.312a30.59 30.59 0 0 0 0 42.752L652.736 512 340.864 831.872a30.59 30.59 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"})]))}}),nS=nm,rm=z({name:"ArrowUp",__name:"arrow-up",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"m488.832 344.32-339.84 356.672a32 32 0 0 0 0 44.16l.384.384a29.44 29.44 0 0 0 42.688 0l320-335.872 319.872 335.872a29.44 29.44 0 0 0 42.688 0l.384-.384a32 32 0 0 0 0-44.16L535.168 344.32a32 32 0 0 0-46.336 0"})]))}}),rS=rm,im=z({name:"Avatar",__name:"avatar",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M628.736 528.896A416 416 0 0 1 928 928H96a415.87 415.87 0 0 1 299.264-399.104L512 704zM720 304a208 208 0 1 1-416 0 208 208 0 0 1 416 0"})]))}}),iS=im,om=z({name:"Back",__name:"back",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M224 480h640a32 32 0 1 1 0 64H224a32 32 0 0 1 0-64"}),M("path",{fill:"currentColor",d:"m237.248 512 265.408 265.344a32 32 0 0 1-45.312 45.312l-288-288a32 32 0 0 1 0-45.312l288-288a32 32 0 1 1 45.312 45.312z"})]))}}),oS=om,sm=z({name:"Baseball",__name:"baseball",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M195.2 828.8a448 448 0 1 1 633.6-633.6 448 448 0 0 1-633.6 633.6m45.248-45.248a384 384 0 1 0 543.104-543.104 384 384 0 0 0-543.104 543.104"}),M("path",{fill:"currentColor",d:"M497.472 96.896c22.784 4.672 44.416 9.472 64.896 14.528a256.128 256.128 0 0 0 350.208 350.208c5.056 20.48 9.856 42.112 14.528 64.896A320.128 320.128 0 0 1 497.472 96.896M108.48 491.904a320.128 320.128 0 0 1 423.616 423.68c-23.04-3.648-44.992-7.424-65.728-11.52a256.128 256.128 0 0 0-346.496-346.432 1737 1737 0 0 1-11.392-65.728"})]))}}),sS=sm,lm=z({name:"Bell",__name:"bell",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M512 64a64 64 0 0 1 64 64v64H448v-64a64 64 0 0 1 64-64"}),M("path",{fill:"currentColor",d:"M256 768h512V448a256 256 0 1 0-512 0zm256-640a320 320 0 0 1 320 320v384H192V448a320 320 0 0 1 320-320"}),M("path",{fill:"currentColor",d:"M96 768h832q32 0 32 32t-32 32H96q-32 0-32-32t32-32m352 128h128a64 64 0 0 1-128 0"})]))}}),lS=lm,am=z({name:"Bottom",__name:"bottom",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M544 805.888V168a32 32 0 1 0-64 0v637.888L246.656 557.952a30.72 30.72 0 0 0-45.312 0 35.52 35.52 0 0 0 0 48.064l288 306.048a30.72 30.72 0 0 0 45.312 0l288-306.048a35.52 35.52 0 0 0 0-48 30.72 30.72 0 0 0-45.312 0L544 805.824z"})]))}}),aS=am,cm=z({name:"Calendar",__name:"calendar",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M128 384v512h768V192H768v32a32 32 0 1 1-64 0v-32H320v32a32 32 0 0 1-64 0v-32H128v128h768v64zm192-256h384V96a32 32 0 1 1 64 0v32h160a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h160V96a32 32 0 0 1 64 0zm-32 384h64a32 32 0 0 1 0 64h-64a32 32 0 0 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m192-192h64a32 32 0 0 1 0 64h-64a32 32 0 0 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m192-192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64"})]))}}),cS=cm,um=z({name:"CameraFilled",__name:"camera-filled",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M160 224a64 64 0 0 0-64 64v512a64 64 0 0 0 64 64h704a64 64 0 0 0 64-64V288a64 64 0 0 0-64-64H748.416l-46.464-92.672A64 64 0 0 0 644.736 96H379.328a64 64 0 0 0-57.216 35.392L275.776 224zm352 435.2a115.2 115.2 0 1 0 0-230.4 115.2 115.2 0 0 0 0 230.4m0 140.8a256 256 0 1 1 0-512 256 256 0 0 1 0 512"})]))}}),uS=um,fm=z({name:"ChatDotRound",__name:"chat-dot-round",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"m174.72 855.68 135.296-45.12 23.68 11.84C388.096 849.536 448.576 864 512 864c211.84 0 384-166.784 384-352S723.84 160 512 160 128 326.784 128 512c0 69.12 24.96 139.264 70.848 199.232l22.08 28.8-46.272 115.584zm-45.248 82.56A32 32 0 0 1 89.6 896l58.368-145.92C94.72 680.32 64 596.864 64 512 64 299.904 256 96 512 96s448 203.904 448 416-192 416-448 416a461.06 461.06 0 0 1-206.912-48.384l-175.616 58.56z"}),M("path",{fill:"currentColor",d:"M512 563.2a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4m192 0a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4m-384 0a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4"})]))}}),fS=fm,hm=z({name:"ChatDotSquare",__name:"chat-dot-square",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M273.536 736H800a64 64 0 0 0 64-64V256a64 64 0 0 0-64-64H224a64 64 0 0 0-64 64v570.88zM296 800 147.968 918.4A32 32 0 0 1 96 893.44V256a128 128 0 0 1 128-128h576a128 128 0 0 1 128 128v416a128 128 0 0 1-128 128z"}),M("path",{fill:"currentColor",d:"M512 499.2a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4m192 0a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4m-384 0a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4"})]))}}),hS=hm,dm=z({name:"Check",__name:"check",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M406.656 706.944 195.84 496.256a32 32 0 1 0-45.248 45.248l256 256 512-512a32 32 0 0 0-45.248-45.248L406.592 706.944z"})]))}}),dS=dm,pm=z({name:"CircleCheckFilled",__name:"circle-check-filled",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.27 38.27 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"})]))}}),pS=pm,mm=z({name:"CircleCheck",__name:"circle-check",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),M("path",{fill:"currentColor",d:"M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752z"})]))}}),mS=mm,gm=z({name:"CircleCloseFilled",__name:"circle-close-filled",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336z"})]))}}),gS=gm,ym=z({name:"CircleClose",__name:"circle-close",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z"}),M("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})]))}}),yS=ym,bm=z({name:"Clock",__name:"clock",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),M("path",{fill:"currentColor",d:"M480 256a32 32 0 0 1 32 32v256a32 32 0 0 1-64 0V288a32 32 0 0 1 32-32"}),M("path",{fill:"currentColor",d:"M480 512h256q32 0 32 32t-32 32H480q-32 0-32-32t32-32"})]))}}),bS=bm,wm=z({name:"CloseBold",__name:"close-bold",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M195.2 195.2a64 64 0 0 1 90.496 0L512 421.504 738.304 195.2a64 64 0 0 1 90.496 90.496L602.496 512 828.8 738.304a64 64 0 0 1-90.496 90.496L512 602.496 285.696 828.8a64 64 0 0 1-90.496-90.496L421.504 512 195.2 285.696a64 64 0 0 1 0-90.496"})]))}}),wS=wm,xm=z({name:"Close",__name:"close",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})]))}}),xS=xm,km=z({name:"Comment",__name:"comment",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M736 504a56 56 0 1 1 0-112 56 56 0 0 1 0 112m-224 0a56 56 0 1 1 0-112 56 56 0 0 1 0 112m-224 0a56 56 0 1 1 0-112 56 56 0 0 1 0 112M128 128v640h192v160l224-160h352V128z"})]))}}),kS=km,Sm=z({name:"CopyDocument",__name:"copy-document",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M768 832a128 128 0 0 1-128 128H192A128 128 0 0 1 64 832V384a128 128 0 0 1 128-128v64a64 64 0 0 0-64 64v448a64 64 0 0 0 64 64h448a64 64 0 0 0 64-64z"}),M("path",{fill:"currentColor",d:"M384 128a64 64 0 0 0-64 64v448a64 64 0 0 0 64 64h448a64 64 0 0 0 64-64V192a64 64 0 0 0-64-64zm0-64h448a128 128 0 0 1 128 128v448a128 128 0 0 1-128 128H384a128 128 0 0 1-128-128V192A128 128 0 0 1 384 64"})]))}}),SS=Sm,vm=z({name:"DArrowLeft",__name:"d-arrow-left",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M529.408 149.376a29.12 29.12 0 0 1 41.728 0 30.59 30.59 0 0 1 0 42.688L259.264 511.936l311.872 319.936a30.59 30.59 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L197.76 534.272a32 32 0 0 1 0-44.672zm256 0a29.12 29.12 0 0 1 41.728 0 30.59 30.59 0 0 1 0 42.688L515.264 511.936l311.872 319.936a30.59 30.59 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L453.76 534.272a32 32 0 0 1 0-44.672z"})]))}}),vS=vm,Cm=z({name:"DArrowRight",__name:"d-arrow-right",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M452.864 149.312a29.12 29.12 0 0 1 41.728.064L826.24 489.664a32 32 0 0 1 0 44.672L494.592 874.624a29.12 29.12 0 0 1-41.728 0 30.59 30.59 0 0 1 0-42.752L764.736 512 452.864 192a30.59 30.59 0 0 1 0-42.688m-256 0a29.12 29.12 0 0 1 41.728.064L570.24 489.664a32 32 0 0 1 0 44.672L238.592 874.624a29.12 29.12 0 0 1-41.728 0 30.59 30.59 0 0 1 0-42.752L508.736 512 196.864 192a30.59 30.59 0 0 1 0-42.688"})]))}}),CS=Cm,Am=z({name:"DeleteFilled",__name:"delete-filled",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M352 192V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64H96a32 32 0 0 1 0-64zm64 0h192v-64H416zM192 960a32 32 0 0 1-32-32V256h704v672a32 32 0 0 1-32 32zm224-192a32 32 0 0 0 32-32V416a32 32 0 0 0-64 0v320a32 32 0 0 0 32 32m192 0a32 32 0 0 0 32-32V416a32 32 0 0 0-64 0v320a32 32 0 0 0 32 32"})]))}}),AS=Am,Om=z({name:"Delete",__name:"delete",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"})]))}}),OS=Om,Mm=z({name:"Document",__name:"document",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M832 384H576V128H192v768h640zm-26.496-64L640 154.496V320zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m160 448h384v64H320zm0-192h160v64H320zm0 384h384v64H320z"})]))}}),MS=Mm,Em=z({name:"Download",__name:"download",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64m384-253.696 236.288-236.352 45.248 45.248L508.8 704 192 387.2l45.248-45.248L480 584.704V128h64z"})]))}}),ES=Em,_m=z({name:"EditPen",__name:"edit-pen",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"m199.04 672.64 193.984 112 224-387.968-193.92-112-224 388.032zm-23.872 60.16 32.896 148.288 144.896-45.696zM455.04 229.248l193.92 112 56.704-98.112-193.984-112zM104.32 708.8l384-665.024 304.768 175.936L409.152 884.8h.064l-248.448 78.336zm384 254.272v-64h448v64z"})]))}}),_S=_m,Tm=z({name:"Edit",__name:"edit",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M832 512a32 32 0 1 1 64 0v352a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h352a32 32 0 0 1 0 64H192v640h640z"}),M("path",{fill:"currentColor",d:"m469.952 554.24 52.8-7.552L847.104 222.4a32 32 0 1 0-45.248-45.248L477.44 501.44l-7.552 52.8zm422.4-422.4a96 96 0 0 1 0 135.808l-331.84 331.84a32 32 0 0 1-18.112 9.088L436.8 623.68a32 32 0 0 1-36.224-36.224l15.104-105.6a32 32 0 0 1 9.024-18.112l331.904-331.84a96 96 0 0 1 135.744 0z"})]))}}),TS=Tm,Nm=z({name:"Expand",__name:"expand",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M128 192h768v128H128zm0 256h512v128H128zm0 256h768v128H128zm576-352 192 160-192 128z"})]))}}),NS=Nm,Dm=z({name:"FullScreen",__name:"full-screen",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"m160 96.064 192 .192a32 32 0 0 1 0 64l-192-.192V352a32 32 0 0 1-64 0V96h64zm0 831.872V928H96V672a32 32 0 1 1 64 0v191.936l192-.192a32 32 0 1 1 0 64zM864 96.064V96h64v256a32 32 0 1 1-64 0V160.064l-192 .192a32 32 0 1 1 0-64zm0 831.872-192-.192a32 32 0 0 1 0-64l192 .192V672a32 32 0 1 1 64 0v256h-64z"})]))}}),DS=Dm,Im=z({name:"Guide",__name:"guide",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M640 608h-64V416h64zm0 160v160a32 32 0 0 1-32 32H416a32 32 0 0 1-32-32V768h64v128h128V768zM384 608V416h64v192zm256-352h-64V128H448v128h-64V96a32 32 0 0 1 32-32h192a32 32 0 0 1 32 32z"}),M("path",{fill:"currentColor",d:"m220.8 256-71.232 80 71.168 80H768V256zm-14.4-64H800a32 32 0 0 1 32 32v224a32 32 0 0 1-32 32H206.4a32 32 0 0 1-23.936-10.752l-99.584-112a32 32 0 0 1 0-42.496l99.584-112A32 32 0 0 1 206.4 192m678.784 496-71.104 80H266.816V608h547.2zm-56.768-144H234.88a32 32 0 0 0-32 32v224a32 32 0 0 0 32 32h593.6a32 32 0 0 0 23.936-10.752l99.584-112a32 32 0 0 0 0-42.496l-99.584-112A32 32 0 0 0 828.48 544z"})]))}}),IS=Im,Rm=z({name:"Hide",__name:"hide",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M876.8 156.8c0-9.6-3.2-16-9.6-22.4s-12.8-9.6-22.4-9.6-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176S0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4s3.2 16 9.6 22.4 12.8 9.6 22.4 9.6 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4m-646.4 528Q115.2 579.2 76.8 512q43.2-72 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4m140.8-96Q352 555.2 352 512c0-44.8 16-83.2 48-112s67.2-48 112-48c28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6q-43.2 72-153.6 172.8c-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176S1024 528 1024 512s-48.001-73.6-134.401-176"}),M("path",{fill:"currentColor",d:"M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112s-67.2 48-112 48"})]))}}),RS=Rm,zm=z({name:"HomeFilled",__name:"home-filled",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M512 128 128 447.936V896h255.936V640H640v256h255.936V447.936z"})]))}}),zS=zm,Fm=z({name:"InfoFilled",__name:"info-filled",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64m67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344M590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.99 12.99 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"})]))}}),FS=Fm,Pm=z({name:"Iphone",__name:"iphone",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M224 768v96.064a64 64 0 0 0 64 64h448a64 64 0 0 0 64-64V768zm0-64h576V160a64 64 0 0 0-64-64H288a64 64 0 0 0-64 64zm32 288a96 96 0 0 1-96-96V128a96 96 0 0 1 96-96h512a96 96 0 0 1 96 96v768a96 96 0 0 1-96 96zm304-144a48 48 0 1 1-96 0 48 48 0 0 1 96 0"})]))}}),PS=Pm,Lm=z({name:"Link",__name:"link",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M715.648 625.152 670.4 579.904l90.496-90.56c75.008-74.944 85.12-186.368 22.656-248.896-62.528-62.464-173.952-52.352-248.96 22.656L444.16 353.6l-45.248-45.248 90.496-90.496c100.032-99.968 251.968-110.08 339.456-22.656 87.488 87.488 77.312 239.424-22.656 339.456l-90.496 90.496zm-90.496 90.496-90.496 90.496C434.624 906.112 282.688 916.224 195.2 828.8c-87.488-87.488-77.312-239.424 22.656-339.456l90.496-90.496 45.248 45.248-90.496 90.56c-75.008 74.944-85.12 186.368-22.656 248.896 62.528 62.464 173.952 52.352 248.96-22.656l90.496-90.496zm0-362.048 45.248 45.248L398.848 670.4 353.6 625.152z"})]))}}),LS=Lm,Bm=z({name:"Loading",__name:"loading",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248m452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248M828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0"})]))}}),BS=Bm,Vm=z({name:"Lock",__name:"lock",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M224 448a32 32 0 0 0-32 32v384a32 32 0 0 0 32 32h576a32 32 0 0 0 32-32V480a32 32 0 0 0-32-32zm0-64h576a96 96 0 0 1 96 96v384a96 96 0 0 1-96 96H224a96 96 0 0 1-96-96V480a96 96 0 0 1 96-96"}),M("path",{fill:"currentColor",d:"M512 544a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V576a32 32 0 0 1 32-32m192-160v-64a192 192 0 1 0-384 0v64zM512 64a256 256 0 0 1 256 256v128H256V320A256 256 0 0 1 512 64"})]))}}),VS=Vm,Hm=z({name:"Memo",__name:"memo",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg","xml:space":"preserve",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M480 320h192c21.33 0 32-10.67 32-32s-10.67-32-32-32H480c-21.33 0-32 10.67-32 32s10.67 32 32 32"}),M("path",{fill:"currentColor",d:"M887.01 72.99C881.01 67 873.34 64 864 64H160c-9.35 0-17.02 3-23.01 8.99C131 78.99 128 86.66 128 96v832c0 9.35 2.99 17.02 8.99 23.01S150.66 960 160 960h704c9.35 0 17.02-2.99 23.01-8.99S896 937.34 896 928V96c0-9.35-3-17.02-8.99-23.01M192 896V128h96v768zm640 0H352V128h480z"}),M("path",{fill:"currentColor",d:"M480 512h192c21.33 0 32-10.67 32-32s-10.67-32-32-32H480c-21.33 0-32 10.67-32 32s10.67 32 32 32m0 192h192c21.33 0 32-10.67 32-32s-10.67-32-32-32H480c-21.33 0-32 10.67-32 32s10.67 32 32 32"})]))}}),HS=Hm,$m=z({name:"Message",__name:"message",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M128 224v512a64 64 0 0 0 64 64h640a64 64 0 0 0 64-64V224zm0-64h768a64 64 0 0 1 64 64v512a128 128 0 0 1-128 128H192A128 128 0 0 1 64 736V224a64 64 0 0 1 64-64"}),M("path",{fill:"currentColor",d:"M904 224 656.512 506.88a192 192 0 0 1-289.024 0L120 224zm-698.944 0 210.56 240.704a128 128 0 0 0 192.704 0L818.944 224z"})]))}}),$S=$m,jm=z({name:"Money",__name:"money",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M256 640v192h640V384H768v-64h150.976c14.272 0 19.456 1.472 24.64 4.288a29.06 29.06 0 0 1 12.16 12.096c2.752 5.184 4.224 10.368 4.224 24.64v493.952c0 14.272-1.472 19.456-4.288 24.64a29.06 29.06 0 0 1-12.096 12.16c-5.184 2.752-10.368 4.224-24.64 4.224H233.024c-14.272 0-19.456-1.472-24.64-4.288a29.06 29.06 0 0 1-12.16-12.096c-2.688-5.184-4.224-10.368-4.224-24.576V640z"}),M("path",{fill:"currentColor",d:"M768 192H128v448h640zm64-22.976v493.952c0 14.272-1.472 19.456-4.288 24.64a29.06 29.06 0 0 1-12.096 12.16c-5.184 2.752-10.368 4.224-24.64 4.224H105.024c-14.272 0-19.456-1.472-24.64-4.288a29.06 29.06 0 0 1-12.16-12.096C65.536 682.432 64 677.248 64 663.04V169.024c0-14.272 1.472-19.456 4.288-24.64a29.06 29.06 0 0 1 12.096-12.16C85.568 129.536 90.752 128 104.96 128h685.952c14.272 0 19.456 1.472 24.64 4.288a29.06 29.06 0 0 1 12.16 12.096c2.752 5.184 4.224 10.368 4.224 24.64z"}),M("path",{fill:"currentColor",d:"M448 576a160 160 0 1 1 0-320 160 160 0 0 1 0 320m0-64a96 96 0 1 0 0-192 96 96 0 0 0 0 192"})]))}}),jS=jm,qm=z({name:"MoreFilled",__name:"more-filled",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M176 416a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224"})]))}}),qS=qm,Wm=z({name:"More",__name:"more",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M176 416a112 112 0 1 0 0 224 112 112 0 0 0 0-224m0 64a48 48 0 1 1 0 96 48 48 0 0 1 0-96m336-64a112 112 0 1 1 0 224 112 112 0 0 1 0-224m0 64a48 48 0 1 0 0 96 48 48 0 0 0 0-96m336-64a112 112 0 1 1 0 224 112 112 0 0 1 0-224m0 64a48 48 0 1 0 0 96 48 48 0 0 0 0-96"})]))}}),WS=Wm,Um=z({name:"Notebook",__name:"notebook",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M192 128v768h640V128zm-32-64h704a32 32 0 0 1 32 32v832a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32"}),M("path",{fill:"currentColor",d:"M672 128h64v768h-64zM96 192h128q32 0 32 32t-32 32H96q-32 0-32-32t32-32m0 192h128q32 0 32 32t-32 32H96q-32 0-32-32t32-32m0 192h128q32 0 32 32t-32 32H96q-32 0-32-32t32-32m0 192h128q32 0 32 32t-32 32H96q-32 0-32-32t32-32"})]))}}),US=Um,Jm=z({name:"Notification",__name:"notification",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M512 128v64H256a64 64 0 0 0-64 64v512a64 64 0 0 0 64 64h512a64 64 0 0 0 64-64V512h64v256a128 128 0 0 1-128 128H256a128 128 0 0 1-128-128V256a128 128 0 0 1 128-128z"}),M("path",{fill:"currentColor",d:"M768 384a128 128 0 1 0 0-256 128 128 0 0 0 0 256m0 64a192 192 0 1 1 0-384 192 192 0 0 1 0 384"})]))}}),JS=Jm,Km=z({name:"Operation",__name:"operation",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M389.44 768a96.064 96.064 0 0 1 181.12 0H896v64H570.56a96.064 96.064 0 0 1-181.12 0H128v-64zm192-288a96.064 96.064 0 0 1 181.12 0H896v64H762.56a96.064 96.064 0 0 1-181.12 0H128v-64zm-320-288a96.064 96.064 0 0 1 181.12 0H896v64H442.56a96.064 96.064 0 0 1-181.12 0H128v-64z"})]))}}),KS=Km,Ym=z({name:"PictureFilled",__name:"picture-filled",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M96 896a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h832a32 32 0 0 1 32 32v704a32 32 0 0 1-32 32zm315.52-228.48-68.928-68.928a32 32 0 0 0-45.248 0L128 768.064h778.688l-242.112-290.56a32 32 0 0 0-49.216 0L458.752 665.408a32 32 0 0 1-47.232 2.112M256 384a96 96 0 1 0 192.064-.064A96 96 0 0 0 256 384"})]))}}),YS=Ym,Gm=z({name:"Picture",__name:"picture",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M160 160v704h704V160zm-32-64h768a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32H128a32 32 0 0 1-32-32V128a32 32 0 0 1 32-32"}),M("path",{fill:"currentColor",d:"M384 288q64 0 64 64t-64 64-64-64 64-64M185.408 876.992l-50.816-38.912L350.72 556.032a96 96 0 0 1 134.592-17.856l1.856 1.472 122.88 99.136a32 32 0 0 0 44.992-4.864l216-269.888 49.92 39.936-215.808 269.824-.256.32a96 96 0 0 1-135.04 14.464l-122.88-99.072-.64-.512a32 32 0 0 0-44.8 5.952z"})]))}}),GS=Gm,Xm=z({name:"Plus",__name:"plus",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64z"})]))}}),XS=Xm,Qm=z({name:"Postcard",__name:"postcard",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M160 224a32 32 0 0 0-32 32v512a32 32 0 0 0 32 32h704a32 32 0 0 0 32-32V256a32 32 0 0 0-32-32zm0-64h704a96 96 0 0 1 96 96v512a96 96 0 0 1-96 96H160a96 96 0 0 1-96-96V256a96 96 0 0 1 96-96"}),M("path",{fill:"currentColor",d:"M704 320a64 64 0 1 1 0 128 64 64 0 0 1 0-128M288 448h256q32 0 32 32t-32 32H288q-32 0-32-32t32-32m0 128h256q32 0 32 32t-32 32H288q-32 0-32-32t32-32"})]))}}),QS=Qm,Zm=z({name:"Reading",__name:"reading",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"m512 863.36 384-54.848v-638.72L525.568 222.72a96 96 0 0 1-27.136 0L128 169.792v638.72zM137.024 106.432l370.432 52.928a32 32 0 0 0 9.088 0l370.432-52.928A64 64 0 0 1 960 169.792v638.72a64 64 0 0 1-54.976 63.36l-388.48 55.488a32 32 0 0 1-9.088 0l-388.48-55.488A64 64 0 0 1 64 808.512v-638.72a64 64 0 0 1 73.024-63.36"}),M("path",{fill:"currentColor",d:"M480 192h64v704h-64z"})]))}}),ZS=Zm,e1=z({name:"RefreshLeft",__name:"refresh-left",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M289.088 296.704h92.992a32 32 0 0 1 0 64H232.96a32 32 0 0 1-32-32V179.712a32 32 0 0 1 64 0v50.56a384 384 0 0 1 643.84 282.88 384 384 0 0 1-383.936 384 384 384 0 0 1-384-384h64a320 320 0 1 0 640 0 320 320 0 0 0-555.712-216.448z"})]))}}),ev=e1,t1=z({name:"RefreshRight",__name:"refresh-right",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M784.512 230.272v-50.56a32 32 0 1 1 64 0v149.056a32 32 0 0 1-32 32H667.52a32 32 0 1 1 0-64h92.992A320 320 0 1 0 524.8 833.152a320 320 0 0 0 320-320h64a384 384 0 0 1-384 384 384 384 0 0 1-384-384 384 384 0 0 1 643.712-282.88"})]))}}),tv=t1,n1=z({name:"ScaleToOriginal",__name:"scale-to-original",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M813.176 180.706a60.235 60.235 0 0 1 60.236 60.235v481.883a60.235 60.235 0 0 1-60.236 60.235H210.824a60.235 60.235 0 0 1-60.236-60.235V240.94a60.235 60.235 0 0 1 60.236-60.235h602.352zm0-60.235H210.824A120.47 120.47 0 0 0 90.353 240.94v481.883a120.47 120.47 0 0 0 120.47 120.47h602.353a120.47 120.47 0 0 0 120.471-120.47V240.94a120.47 120.47 0 0 0-120.47-120.47zm-120.47 180.705a30.12 30.12 0 0 0-30.118 30.118v301.177a30.118 30.118 0 0 0 60.236 0V331.294a30.12 30.12 0 0 0-30.118-30.118m-361.412 0a30.12 30.12 0 0 0-30.118 30.118v301.177a30.118 30.118 0 1 0 60.236 0V331.294a30.12 30.12 0 0 0-30.118-30.118M512 361.412a30.12 30.12 0 0 0-30.118 30.117v30.118a30.118 30.118 0 0 0 60.236 0V391.53A30.12 30.12 0 0 0 512 361.412M512 512a30.12 30.12 0 0 0-30.118 30.118v30.117a30.118 30.118 0 0 0 60.236 0v-30.117A30.12 30.12 0 0 0 512 512"})]))}}),nv=n1,r1=z({name:"Search",__name:"search",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704"})]))}}),rv=r1,i1=z({name:"SuccessFilled",__name:"success-filled",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.27 38.27 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"})]))}}),iv=i1,o1=z({name:"Tickets",__name:"tickets",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M192 128v768h640V128zm-32-64h704a32 32 0 0 1 32 32v832a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m160 448h384v64H320zm0-192h192v64H320zm0 384h384v64H320z"})]))}}),ov=o1,s1=z({name:"Timer",__name:"timer",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M512 896a320 320 0 1 0 0-640 320 320 0 0 0 0 640m0 64a384 384 0 1 1 0-768 384 384 0 0 1 0 768"}),M("path",{fill:"currentColor",d:"M512 320a32 32 0 0 1 32 32l-.512 224a32 32 0 1 1-64 0L480 352a32 32 0 0 1 32-32"}),M("path",{fill:"currentColor",d:"M448 576a64 64 0 1 0 128 0 64 64 0 1 0-128 0m96-448v128h-64V128h-96a32 32 0 0 1 0-64h256a32 32 0 1 1 0 64z"})]))}}),sv=s1,l1=z({name:"TopRight",__name:"top-right",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M768 256H353.6a32 32 0 1 1 0-64H800a32 32 0 0 1 32 32v448a32 32 0 0 1-64 0z"}),M("path",{fill:"currentColor",d:"M777.344 201.344a32 32 0 0 1 45.312 45.312l-544 544a32 32 0 0 1-45.312-45.312z"})]))}}),lv=l1,a1=z({name:"Top",__name:"top",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M572.235 205.282v600.365a30.118 30.118 0 1 1-60.235 0V205.282L292.382 438.633a28.913 28.913 0 0 1-42.646 0 33.43 33.43 0 0 1 0-45.236l271.058-288.045a28.913 28.913 0 0 1 42.647 0L834.5 393.397a33.43 33.43 0 0 1 0 45.176 28.913 28.913 0 0 1-42.647 0l-219.618-233.23z"})]))}}),av=a1,c1=z({name:"UploadFilled",__name:"upload-filled",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M544 864V672h128L512 480 352 672h128v192H320v-1.6c-5.376.32-10.496 1.6-16 1.6A240 240 0 0 1 64 624c0-123.136 93.12-223.488 212.608-237.248A239.81 239.81 0 0 1 512 192a239.87 239.87 0 0 1 235.456 194.752c119.488 13.76 212.48 114.112 212.48 237.248a240 240 0 0 1-240 240c-5.376 0-10.56-1.28-16-1.6v1.6z"})]))}}),cv=c1,u1=z({name:"User",__name:"user",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M512 512a192 192 0 1 0 0-384 192 192 0 0 0 0 384m0 64a256 256 0 1 1 0-512 256 256 0 0 1 0 512m320 320v-96a96 96 0 0 0-96-96H288a96 96 0 0 0-96 96v96a32 32 0 1 1-64 0v-96a160 160 0 0 1 160-160h448a160 160 0 0 1 160 160v96a32 32 0 1 1-64 0"})]))}}),uv=u1,f1=z({name:"VideoPlay",__name:"video-play",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 832a384 384 0 0 0 0-768 384 384 0 0 0 0 768m-48-247.616L668.608 512 464 375.616zm10.624-342.656 249.472 166.336a48 48 0 0 1 0 79.872L474.624 718.272A48 48 0 0 1 400 678.336V345.6a48 48 0 0 1 74.624-39.936z"})]))}}),fv=f1,h1=z({name:"View",__name:"view",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288m0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.19 160.19 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"})]))}}),hv=h1,d1=z({name:"WarningFilled",__name:"warning-filled",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 192a58.43 58.43 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.43 58.43 0 0 0 512 256m0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4"})]))}}),dv=d1,p1=z({name:"ZoomIn",__name:"zoom-in",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704m-32-384v-96a32 32 0 0 1 64 0v96h96a32 32 0 0 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64z"})]))}}),pv=p1,m1=z({name:"ZoomOut",__name:"zoom-out",setup(n){return(e,t)=>(F(),P("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[M("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704M352 448h256a32 32 0 0 1 0 64H352a32 32 0 0 1 0-64"})]))}}),mv=m1;function gn(){return gn=Object.assign?Object.assign.bind():function(n){for(var e=1;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Fi(n,e,t){return y1()?Fi=Reflect.construct.bind():Fi=function(i,o,s){var l=[null];l.push.apply(l,o);var a=Function.bind.apply(i,l),c=new a;return s&&Ur(c,s.prototype),c},Fi.apply(null,arguments)}function b1(n){return Function.toString.call(n).indexOf("[native code]")!==-1}function _s(n){var e=typeof Map=="function"?new Map:void 0;return _s=function(r){if(r===null||!b1(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(r))return e.get(r);e.set(r,i)}function i(){return Fi(r,arguments,Es(this).constructor)}return i.prototype=Object.create(r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Ur(i,r)},_s(n)}var w1=/%[sdj%]/g,x1=function(){};typeof process<"u"&&process.env;function Ts(n){if(!n||!n.length)return null;var e={};return n.forEach(function(t){var r=t.field;e[r]=e[r]||[],e[r].push(t)}),e}function We(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r=o)return l;switch(l){case"%s":return String(t[i++]);case"%d":return Number(t[i++]);case"%j":try{return JSON.stringify(t[i++])}catch{return"[Circular]"}break;default:return l}});return s}return n}function k1(n){return n==="string"||n==="url"||n==="hex"||n==="email"||n==="date"||n==="pattern"}function fe(n,e){return!!(n==null||e==="array"&&Array.isArray(n)&&!n.length||k1(e)&&typeof n=="string"&&!n)}function S1(n,e,t){var r=[],i=0,o=n.length;function s(l){r.push.apply(r,l||[]),i++,i===o&&t(r)}n.forEach(function(l){e(l,s)})}function Aa(n,e,t){var r=0,i=n.length;function o(s){if(s&&s.length){t(s);return}var l=r;r=r+1,l()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},Sr={integer:function(e){return Sr.number(e)&&parseInt(e,10)===e},float:function(e){return Sr.number(e)&&!Sr.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch{return!1}},date:function(e){return typeof e.getTime=="function"&&typeof e.getMonth=="function"&&typeof e.getYear=="function"&&!isNaN(e.getTime())},number:function(e){return isNaN(e)?!1:typeof e=="number"},object:function(e){return typeof e=="object"&&!Sr.array(e)},method:function(e){return typeof e=="function"},email:function(e){return typeof e=="string"&&e.length<=320&&!!e.match(_a.email)},url:function(e){return typeof e=="string"&&e.length<=2048&&!!e.match(E1())},hex:function(e){return typeof e=="string"&&!!e.match(_a.hex)}},_1=function(e,t,r,i,o){if(e.required&&t===void 0){ff(e,t,r,i,o);return}var s=["integer","float","array","regexp","object","method","email","number","date","url","hex"],l=e.type;s.indexOf(l)>-1?Sr[l](t)||i.push(We(o.messages.types[l],e.fullField,e.type)):l&&typeof t!==e.type&&i.push(We(o.messages.types[l],e.fullField,e.type))},T1=function(e,t,r,i,o){var s=typeof e.len=="number",l=typeof e.min=="number",a=typeof e.max=="number",c=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,u=t,f=null,h=typeof t=="number",d=typeof t=="string",p=Array.isArray(t);if(h?f="number":d?f="string":p&&(f="array"),!f)return!1;p&&(u=t.length),d&&(u=t.replace(c,"_").length),s?u!==e.len&&i.push(We(o.messages[f].len,e.fullField,e.len)):l&&!a&&ue.max?i.push(We(o.messages[f].max,e.fullField,e.max)):l&&a&&(ue.max)&&i.push(We(o.messages[f].range,e.fullField,e.min,e.max))},Ln="enum",N1=function(e,t,r,i,o){e[Ln]=Array.isArray(e[Ln])?e[Ln]:[],e[Ln].indexOf(t)===-1&&i.push(We(o.messages[Ln],e.fullField,e[Ln].join(", ")))},D1=function(e,t,r,i,o){if(e.pattern){if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(t)||i.push(We(o.messages.pattern.mismatch,e.fullField,t,e.pattern));else if(typeof e.pattern=="string"){var s=new RegExp(e.pattern);s.test(t)||i.push(We(o.messages.pattern.mismatch,e.fullField,t,e.pattern))}}},Y={required:ff,whitespace:M1,type:_1,range:T1,enum:N1,pattern:D1},I1=function(e,t,r,i,o){var s=[],l=e.required||!e.required&&i.hasOwnProperty(e.field);if(l){if(fe(t,"string")&&!e.required)return r();Y.required(e,t,i,s,o,"string"),fe(t,"string")||(Y.type(e,t,i,s,o),Y.range(e,t,i,s,o),Y.pattern(e,t,i,s,o),e.whitespace===!0&&Y.whitespace(e,t,i,s,o))}r(s)},R1=function(e,t,r,i,o){var s=[],l=e.required||!e.required&&i.hasOwnProperty(e.field);if(l){if(fe(t)&&!e.required)return r();Y.required(e,t,i,s,o),t!==void 0&&Y.type(e,t,i,s,o)}r(s)},z1=function(e,t,r,i,o){var s=[],l=e.required||!e.required&&i.hasOwnProperty(e.field);if(l){if(t===""&&(t=void 0),fe(t)&&!e.required)return r();Y.required(e,t,i,s,o),t!==void 0&&(Y.type(e,t,i,s,o),Y.range(e,t,i,s,o))}r(s)},F1=function(e,t,r,i,o){var s=[],l=e.required||!e.required&&i.hasOwnProperty(e.field);if(l){if(fe(t)&&!e.required)return r();Y.required(e,t,i,s,o),t!==void 0&&Y.type(e,t,i,s,o)}r(s)},P1=function(e,t,r,i,o){var s=[],l=e.required||!e.required&&i.hasOwnProperty(e.field);if(l){if(fe(t)&&!e.required)return r();Y.required(e,t,i,s,o),fe(t)||Y.type(e,t,i,s,o)}r(s)},L1=function(e,t,r,i,o){var s=[],l=e.required||!e.required&&i.hasOwnProperty(e.field);if(l){if(fe(t)&&!e.required)return r();Y.required(e,t,i,s,o),t!==void 0&&(Y.type(e,t,i,s,o),Y.range(e,t,i,s,o))}r(s)},B1=function(e,t,r,i,o){var s=[],l=e.required||!e.required&&i.hasOwnProperty(e.field);if(l){if(fe(t)&&!e.required)return r();Y.required(e,t,i,s,o),t!==void 0&&(Y.type(e,t,i,s,o),Y.range(e,t,i,s,o))}r(s)},V1=function(e,t,r,i,o){var s=[],l=e.required||!e.required&&i.hasOwnProperty(e.field);if(l){if(t==null&&!e.required)return r();Y.required(e,t,i,s,o,"array"),t!=null&&(Y.type(e,t,i,s,o),Y.range(e,t,i,s,o))}r(s)},H1=function(e,t,r,i,o){var s=[],l=e.required||!e.required&&i.hasOwnProperty(e.field);if(l){if(fe(t)&&!e.required)return r();Y.required(e,t,i,s,o),t!==void 0&&Y.type(e,t,i,s,o)}r(s)},$1="enum",j1=function(e,t,r,i,o){var s=[],l=e.required||!e.required&&i.hasOwnProperty(e.field);if(l){if(fe(t)&&!e.required)return r();Y.required(e,t,i,s,o),t!==void 0&&Y[$1](e,t,i,s,o)}r(s)},q1=function(e,t,r,i,o){var s=[],l=e.required||!e.required&&i.hasOwnProperty(e.field);if(l){if(fe(t,"string")&&!e.required)return r();Y.required(e,t,i,s,o),fe(t,"string")||Y.pattern(e,t,i,s,o)}r(s)},W1=function(e,t,r,i,o){var s=[],l=e.required||!e.required&&i.hasOwnProperty(e.field);if(l){if(fe(t,"date")&&!e.required)return r();if(Y.required(e,t,i,s,o),!fe(t,"date")){var a;t instanceof Date?a=t:a=new Date(t),Y.type(e,a,i,s,o),a&&Y.range(e,a.getTime(),i,s,o)}}r(s)},U1=function(e,t,r,i,o){var s=[],l=Array.isArray(t)?"array":typeof t;Y.required(e,t,i,s,o,l),r(s)},$o=function(e,t,r,i,o){var s=e.type,l=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(fe(t,s)&&!e.required)return r();Y.required(e,t,i,l,o,s),fe(t,s)||Y.type(e,t,i,l,o)}r(l)},J1=function(e,t,r,i,o){var s=[],l=e.required||!e.required&&i.hasOwnProperty(e.field);if(l){if(fe(t)&&!e.required)return r();Y.required(e,t,i,s,o)}r(s)},Nr={string:I1,method:R1,number:z1,boolean:F1,regexp:P1,integer:L1,float:B1,array:V1,object:H1,enum:j1,pattern:q1,date:W1,url:$o,hex:$o,email:$o,required:U1,any:J1};function Ns(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var Ds=Ns(),So=function(){function n(t){this.rules=null,this._messages=Ds,this.define(t)}var e=n.prototype;return e.define=function(r){var i=this;if(!r)throw new Error("Cannot configure a schema with no rules");if(typeof r!="object"||Array.isArray(r))throw new Error("Rules must be an object");this.rules={},Object.keys(r).forEach(function(o){var s=r[o];i.rules[o]=Array.isArray(s)?s:[s]})},e.messages=function(r){return r&&(this._messages=Ea(Ns(),r)),this._messages},e.validate=function(r,i,o){var s=this;i===void 0&&(i={}),o===void 0&&(o=function(){});var l=r,a=i,c=o;if(typeof a=="function"&&(c=a,a={}),!this.rules||Object.keys(this.rules).length===0)return c&&c(null,l),Promise.resolve(l);function u(m){var y=[],g={};function v(C){if(Array.isArray(C)){var O;y=(O=y).concat.apply(O,C)}else y.push(C)}for(var x=0;x1)&&(n=1),n}function ki(n){return Number(n)<=1?`${Number(n)*100}%`:n}function yn(n){return n.length===1?"0"+n:String(n)}function G1(n,e,t){return{r:ye(n,255)*255,g:ye(e,255)*255,b:ye(t,255)*255}}function Ta(n,e,t){n=ye(n,255),e=ye(e,255),t=ye(t,255);const r=Math.max(n,e,t),i=Math.min(n,e,t);let o=0,s=0;const l=(r+i)/2;if(r===i)s=0,o=0;else{const a=r-i;switch(s=l>.5?a/(2-r-i):a/(r+i),r){case n:o=(e-t)/a+(e1&&(t-=1),t<1/6?n+(e-n)*(6*t):t<1/2?e:t<2/3?n+(e-n)*(2/3-t)*6:n}function X1(n,e,t){let r,i,o;if(n=ye(n,360),e=ye(e,100),t=ye(t,100),e===0)i=t,o=t,r=t;else{const s=t<.5?t*(1+e):t+e-t*e,l=2*t-s;r=jo(l,s,n+1/3),i=jo(l,s,n),o=jo(l,s,n-1/3)}return{r:r*255,g:i*255,b:o*255}}function Na(n,e,t){n=ye(n,255),e=ye(e,255),t=ye(t,255);const r=Math.max(n,e,t),i=Math.min(n,e,t);let o=0;const s=r,l=r-i,a=r===0?0:l/r;if(r===i)o=0;else{switch(r){case n:o=(e-t)/l+(e>16,g:(n&65280)>>8,b:n&255}}const Is={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function rg(n){let e={r:0,g:0,b:0},t=1,r=null,i=null,o=null,s=!1,l=!1;return typeof n=="string"&&(n=sg(n)),typeof n=="object"&&($e(n.r)&&$e(n.g)&&$e(n.b)?(e=G1(n.r,n.g,n.b),s=!0,l=String(n.r).substr(-1)==="%"?"prgb":"rgb"):$e(n.h)&&$e(n.s)&&$e(n.v)?(r=ki(n.s),i=ki(n.v),e=Q1(n.h,r,i),s=!0,l="hsv"):$e(n.h)&&$e(n.s)&&$e(n.l)?(r=ki(n.s),o=ki(n.l),e=X1(n.h,r,o),s=!0,l="hsl"):$e(n.c)&&$e(n.m)&&$e(n.y)&&$e(n.k)&&(e=eg(n.c,n.m,n.y,n.k),s=!0,l="cmyk"),Object.prototype.hasOwnProperty.call(n,"a")&&(t=n.a)),t=hf(t),{ok:s,format:n.format||l,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:t}}const ig="[-\\+]?\\d+%?",og="[-\\+]?\\d*\\.\\d+%?",Yt="(?:"+og+")|(?:"+ig+")",qo="[\\s|\\(]+("+Yt+")[,|\\s]+("+Yt+")[,|\\s]+("+Yt+")\\s*\\)?",Si="[\\s|\\(]+("+Yt+")[,|\\s]+("+Yt+")[,|\\s]+("+Yt+")[,|\\s]+("+Yt+")\\s*\\)?",Ye={CSS_UNIT:new RegExp(Yt),rgb:new RegExp("rgb"+qo),rgba:new RegExp("rgba"+Si),hsl:new RegExp("hsl"+qo),hsla:new RegExp("hsla"+Si),hsv:new RegExp("hsv"+qo),hsva:new RegExp("hsva"+Si),cmyk:new RegExp("cmyk"+Si),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function sg(n){if(n=n.trim().toLowerCase(),n.length===0)return!1;let e=!1;if(Is[n])n=Is[n],e=!0;else if(n==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};let t=Ye.rgb.exec(n);return t?{r:t[1],g:t[2],b:t[3]}:(t=Ye.rgba.exec(n),t?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=Ye.hsl.exec(n),t?{h:t[1],s:t[2],l:t[3]}:(t=Ye.hsla.exec(n),t?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=Ye.hsv.exec(n),t?{h:t[1],s:t[2],v:t[3]}:(t=Ye.hsva.exec(n),t?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=Ye.cmyk.exec(n),t?{c:t[1],m:t[2],y:t[3],k:t[4]}:(t=Ye.hex8.exec(n),t?{r:je(t[1]),g:je(t[2]),b:je(t[3]),a:Ra(t[4]),format:e?"name":"hex8"}:(t=Ye.hex6.exec(n),t?{r:je(t[1]),g:je(t[2]),b:je(t[3]),format:e?"name":"hex"}:(t=Ye.hex4.exec(n),t?{r:je(t[1]+t[1]),g:je(t[2]+t[2]),b:je(t[3]+t[3]),a:Ra(t[4]+t[4]),format:e?"name":"hex8"}:(t=Ye.hex3.exec(n),t?{r:je(t[1]+t[1]),g:je(t[2]+t[2]),b:je(t[3]+t[3]),format:e?"name":"hex"}:!1))))))))))}function $e(n){return typeof n=="number"?!Number.isNaN(n):Ye.CSS_UNIT.test(n)}class le{constructor(e="",t={}){if(e instanceof le)return e;typeof e=="number"&&(e=ng(e)),this.originalInput=e;const r=rg(e);this.originalInput=e,this.r=r.r,this.g=r.g,this.b=r.b,this.a=r.a,this.roundA=Math.round(100*this.a)/100,this.format=t.format??r.format,this.gradientType=t.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=r.ok}isDark(){return this.getBrightness()<128}isLight(){return!this.isDark()}getBrightness(){const e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3}getLuminance(){const e=this.toRgb();let t,r,i;const o=e.r/255,s=e.g/255,l=e.b/255;return o<=.03928?t=o/12.92:t=Math.pow((o+.055)/1.055,2.4),s<=.03928?r=s/12.92:r=Math.pow((s+.055)/1.055,2.4),l<=.03928?i=l/12.92:i=Math.pow((l+.055)/1.055,2.4),.2126*t+.7152*r+.0722*i}getAlpha(){return this.a}setAlpha(e){return this.a=hf(e),this.roundA=Math.round(100*this.a)/100,this}isMonochrome(){const{s:e}=this.toHsl();return e===0}toHsv(){const e=Na(this.r,this.g,this.b);return{h:e.h*360,s:e.s,v:e.v,a:this.a}}toHsvString(){const e=Na(this.r,this.g,this.b),t=Math.round(e.h*360),r=Math.round(e.s*100),i=Math.round(e.v*100);return this.a===1?`hsv(${t}, ${r}%, ${i}%)`:`hsva(${t}, ${r}%, ${i}%, ${this.roundA})`}toHsl(){const e=Ta(this.r,this.g,this.b);return{h:e.h*360,s:e.s,l:e.l,a:this.a}}toHslString(){const e=Ta(this.r,this.g,this.b),t=Math.round(e.h*360),r=Math.round(e.s*100),i=Math.round(e.l*100);return this.a===1?`hsl(${t}, ${r}%, ${i}%)`:`hsla(${t}, ${r}%, ${i}%, ${this.roundA})`}toHex(e=!1){return Da(this.r,this.g,this.b,e)}toHexString(e=!1){return"#"+this.toHex(e)}toHex8(e=!1){return Z1(this.r,this.g,this.b,this.a,e)}toHex8String(e=!1){return"#"+this.toHex8(e)}toHexShortString(e=!1){return this.a===1?this.toHexString(e):this.toHex8String(e)}toRgb(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}}toRgbString(){const e=Math.round(this.r),t=Math.round(this.g),r=Math.round(this.b);return this.a===1?`rgb(${e}, ${t}, ${r})`:`rgba(${e}, ${t}, ${r}, ${this.roundA})`}toPercentageRgb(){const e=t=>`${Math.round(ye(t,255)*100)}%`;return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}}toPercentageRgbString(){const e=t=>Math.round(ye(t,255)*100);return this.a===1?`rgb(${e(this.r)}%, ${e(this.g)}%, ${e(this.b)}%)`:`rgba(${e(this.r)}%, ${e(this.g)}%, ${e(this.b)}%, ${this.roundA})`}toCmyk(){return{...Ia(this.r,this.g,this.b)}}toCmykString(){const{c:e,m:t,y:r,k:i}=Ia(this.r,this.g,this.b);return`cmyk(${e}, ${t}, ${r}, ${i})`}toName(){if(this.a===0)return"transparent";if(this.a<1)return!1;const e="#"+Da(this.r,this.g,this.b,!1);for(const[t,r]of Object.entries(Is))if(e===r)return t;return!1}toString(e){const t=!!e;e=e??this.format;let r=!1;const i=this.a<1&&this.a>=0;return!t&&i&&(e.startsWith("hex")||e==="name")?e==="name"&&this.a===0?this.toName():this.toRgbString():(e==="rgb"&&(r=this.toRgbString()),e==="prgb"&&(r=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(r=this.toHexString()),e==="hex3"&&(r=this.toHexString(!0)),e==="hex4"&&(r=this.toHex8String(!0)),e==="hex8"&&(r=this.toHex8String()),e==="name"&&(r=this.toName()),e==="hsl"&&(r=this.toHslString()),e==="hsv"&&(r=this.toHsvString()),e==="cmyk"&&(r=this.toCmykString()),r||this.toHexString())}toNumber(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)}clone(){return new le(this.toString())}lighten(e=10){const t=this.toHsl();return t.l+=e/100,t.l=xi(t.l),new le(t)}brighten(e=10){const t=this.toRgb();return t.r=Math.max(0,Math.min(255,t.r-Math.round(255*-(e/100)))),t.g=Math.max(0,Math.min(255,t.g-Math.round(255*-(e/100)))),t.b=Math.max(0,Math.min(255,t.b-Math.round(255*-(e/100)))),new le(t)}darken(e=10){const t=this.toHsl();return t.l-=e/100,t.l=xi(t.l),new le(t)}tint(e=10){return this.mix("white",e)}shade(e=10){return this.mix("black",e)}desaturate(e=10){const t=this.toHsl();return t.s-=e/100,t.s=xi(t.s),new le(t)}saturate(e=10){const t=this.toHsl();return t.s+=e/100,t.s=xi(t.s),new le(t)}greyscale(){return this.desaturate(100)}spin(e){const t=this.toHsl(),r=(t.h+e)%360;return t.h=r<0?360+r:r,new le(t)}mix(e,t=50){const r=this.toRgb(),i=new le(e).toRgb(),o=t/100,s={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return new le(s)}analogous(e=6,t=30){const r=this.toHsl(),i=360/t,o=[this];for(r.h=(r.h-(i*e>>1)+720)%360;--e;)r.h=(r.h+i)%360,o.push(new le(r));return o}complement(){const e=this.toHsl();return e.h=(e.h+180)%360,new le(e)}monochromatic(e=6){const t=this.toHsv(),{h:r}=t,{s:i}=t;let{v:o}=t;const s=[],l=1/e;for(;e--;)s.push(new le({h:r,s:i,v:o})),o=(o+l)%1;return s}splitcomplement(){const e=this.toHsl(),{h:t}=e;return[this,new le({h:(t+72)%360,s:e.s,l:e.l}),new le({h:(t+216)%360,s:e.s,l:e.l})]}onBackground(e){const t=this.toRgb(),r=new le(e).toRgb(),i=t.a+r.a*(1-t.a);return new le({r:(t.r*t.a+r.r*r.a*(1-t.a))/i,g:(t.g*t.a+r.g*r.a*(1-t.a))/i,b:(t.b*t.a+r.b*r.a*(1-t.a))/i,a:i})}triad(){return this.polyad(3)}tetrad(){return this.polyad(4)}polyad(e){const t=this.toHsl(),{h:r}=t,i=[this],o=360/e;for(let s=1;spn},ie64:function(){return Hs.ie()&&pf},firefox:function(){return De()||Rs},opera:function(){return De()||zs},webkit:function(){return De()||Pi},safari:function(){return Hs.webkit()},chrome:function(){return De()||Li},windows:function(){return De()||Fs},osx:function(){return De()||Bi},linux:function(){return De()||Ps},iphone:function(){return De()||Bs},mobile:function(){return De()||Bs||Vs||Ls||gf},nativeApp:function(){return De()||mf},android:function(){return De()||Ls},ipad:function(){return De()||Vs}},lg=Hs,vi=!!(typeof window<"u"&&window.document&&window.document.createElement),ag={canUseDOM:vi,canUseWorkers:typeof Worker<"u",canUseEventListeners:vi&&!!(window.addEventListener||window.attachEvent),canUseViewport:vi&&!!window.screen,isInWorker:!vi},yf=ag,bf;yf.canUseDOM&&(bf=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);function cg(n,e){if(!yf.canUseDOM||e&&!("addEventListener"in document))return!1;var t="on"+n,r=t in document;if(!r){var i=document.createElement("div");i.setAttribute(t,"return;"),r=typeof i[t]=="function"}return!r&&bf&&n==="wheel"&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var ug=cg,Fa=10,Pa=40,La=800;function wf(n){var e=0,t=0,r=0,i=0;return"detail"in n&&(t=n.detail),"wheelDelta"in n&&(t=-n.wheelDelta/120),"wheelDeltaY"in n&&(t=-n.wheelDeltaY/120),"wheelDeltaX"in n&&(e=-n.wheelDeltaX/120),"axis"in n&&n.axis===n.HORIZONTAL_AXIS&&(e=t,t=0),r=e*Fa,i=t*Fa,"deltaY"in n&&(i=n.deltaY),"deltaX"in n&&(r=n.deltaX),(r||i)&&n.deltaMode&&(n.deltaMode==1?(r*=Pa,i*=Pa):(r*=La,i*=La)),r&&!e&&(e=r<1?-1:1),i&&!t&&(t=i<1?-1:1),{spinX:e,spinY:t,pixelX:r,pixelY:i}}wf.getEventType=function(){return lg.firefox()?"DOMMouseScroll":ug("wheel")?"wheel":"mousewheel"};var gv=wf;/** * Checks if an event is supported in the current execution environment. * * NOTE: This will not work correctly for non-generic events such as `change`, * `reset`, `load`, `error`, and `select`. * * Borrows from Modernizr. * * @param {string} eventNameSuffix Event name, e.g. "click". * @param {?boolean} capture Check if the capture phase is supported. * @return {boolean} True if the event is supported. * @internal * @license Modernizr 3.0.0pre (Custom Build) | MIT */var yv=!1,yt=(n=>(n.LOADING="loading",n.LOADED="loaded",n.ERROR="error",n))(yt||{});const fg=typeof window<"u"&&window!==null,hg=gg(),dg=Object.prototype.propertyIsEnumerable,Ba=Object.getOwnPropertySymbols;function Dr(n){return typeof n=="function"||toString.call(n)==="[object Object]"}function pg(n){return typeof n=="object"?n===null:typeof n!="function"}function mg(n){return n!=="__proto__"&&n!=="constructor"&&n!=="prototype"}function gg(){return fg&&"IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype?("isIntersecting"in window.IntersectionObserverEntry.prototype||Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get(){return this.intersectionRatio>0}}),!0):!1}function yg(n,...e){if(!Dr(n))throw new TypeError("expected the first argument to be an object");if(e.length===0||typeof Symbol!="function"||typeof Ba!="function")return n;for(const t of e){const r=Ba(t);for(const i of r)dg.call(t,i)&&(n[i]=t[i])}return n}function xf(n,...e){let t=0;for(pg(n)&&(n=e[t++]),n||(n={});t{this._logger("Not support IntersectionObserver!")})),this._initIntersectionObserver(e,r,o,s,l)}update(e,t){var l;if(!e)return;(l=this._realObserver(e))==null||l.unobserve(e);const{src:r,error:i,lifecycle:o,delay:s}=this._valueFormatter(typeof t=="string"?t:t.value);this._initIntersectionObserver(e,r,i,o,s)}unmount(e){var t;e&&((t=this._realObserver(e))==null||t.unobserve(e),this._images.delete(e))}loadImages(e,t,r,i){this._setImageSrc(e,t,r,i)}_setImageSrc(e,t,r,i){e.tagName.toLowerCase()==="img"?(t&&e.getAttribute("src")!==t&&e.setAttribute("src",t),this._listenImageStatus(e,()=>{this._lifecycle(yt.LOADED,i,e)},()=>{var o;e.onload=null,this._lifecycle(yt.ERROR,i,e),(o=this._realObserver(e))==null||o.disconnect(),r&&e.getAttribute("src")!==r&&e.setAttribute("src",r),this._log(()=>{this._logger(`Image failed to load!And failed src was: ${t} `)})})):e.style.backgroundImage=`url('${t}')`}_initIntersectionObserver(e,t,r,i,o){var l;const s=this.options.observerOptions;this._images.set(e,new IntersectionObserver(a=>{Array.prototype.forEach.call(a,c=>{o&&o>0?this._delayedIntersectionCallback(e,c,o,t,r,i):this._intersectionCallback(e,c,t,r,i)})},s)),(l=this._realObserver(e))==null||l.observe(e)}_intersectionCallback(e,t,r,i,o){var s;t.isIntersecting&&((s=this._realObserver(e))==null||s.unobserve(t.target),this._setImageSrc(e,r,i,o))}_delayedIntersectionCallback(e,t,r,i,o,s){if(t.isIntersecting){if(t.target.hasAttribute(Bn))return;const l=setTimeout(()=>{this._intersectionCallback(e,t,i,o,s),t.target.removeAttribute(Bn)},r);t.target.setAttribute(Bn,String(l))}else t.target.hasAttribute(Bn)&&(clearTimeout(Number(t.target.getAttribute(Bn))),t.target.removeAttribute(Bn))}_listenImageStatus(e,t,r){e.onload=t,e.onerror=r}_valueFormatter(e){let t=e,r=this.options.loading,i=this.options.error,o=this.options.lifecycle,s=this.options.delay;return Dr(e)&&(t=e.src,r=e.loading||this.options.loading,i=e.error||this.options.error,o=e.lifecycle||this.options.lifecycle,s=e.delay||this.options.delay),{src:t,loading:r,error:i,lifecycle:o,delay:s}}_log(e){this.options.log&&e()}_lifecycle(e,t,r){switch(e){case yt.LOADING:r==null||r.setAttribute("lazy",yt.LOADING),t!=null&&t.loading&&t.loading(r);break;case yt.LOADED:r==null||r.setAttribute("lazy",yt.LOADED),t!=null&&t.loaded&&t.loaded(r);break;case yt.ERROR:r==null||r.setAttribute("lazy",yt.ERROR),t!=null&&t.error&&t.error(r);break}}_realObserver(e){return this._images.get(e)}_logger(e,...t){let r=console.error;switch(this.options.logLevel){case"error":r=console.error;break;case"warn":r=console.warn;break;case"info":r=console.info;break;case"debug":r=console.debug;break}r(e,t)}}const bv={install(n,e){const t=new xg(e);n.config.globalProperties.$Lazyload=t,n.provide("Lazyload",t),n.directive("lazy",{mounted:t.mount.bind(t),updated:t.update.bind(t),unmounted:t.unmount.bind(t)})}};function pe(n){this.content=n}pe.prototype={constructor:pe,find:function(n){for(var e=0;e>1}};pe.from=function(n){if(n instanceof pe)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new pe(e)};function kf(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let i=n.child(r),o=e.child(r);if(i==o){t+=i.nodeSize;continue}if(!i.sameMarkup(o))return t;if(i.isText&&i.text!=o.text){for(let s=0;i.text[s]==o.text[s];s++)t++;return t}if(i.content.size||o.content.size){let s=kf(i.content,o.content,t+1);if(s!=null)return s}t+=i.nodeSize}}function Sf(n,e,t,r){for(let i=n.childCount,o=e.childCount;;){if(i==0||o==0)return i==o?null:{a:t,b:r};let s=n.child(--i),l=e.child(--o),a=s.nodeSize;if(s==l){t-=a,r-=a;continue}if(!s.sameMarkup(l))return{a:t,b:r};if(s.isText&&s.text!=l.text){let c=0,u=Math.min(s.text.length,l.text.length);for(;ce&&r(a,i+l,o||null,s)!==!1&&a.content.size){let u=l+1;a.nodesBetween(Math.max(0,e-u),Math.min(a.content.size,t-u),r,i+u)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,i){let o="",s=!0;return this.nodesBetween(e,t,(l,a)=>{let c=l.isText?l.text.slice(Math.max(e,a)-a,t-a):l.isLeaf?i?typeof i=="function"?i(l):i:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&r&&(s?s=!1:o+=r),o+=c},0),o}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,i=this.content.slice(),o=0;for(t.isText&&t.sameMarkup(r)&&(i[i.length-1]=t.withText(t.text+r.text),o=1);oe)for(let o=0,s=0;se&&((st)&&(l.isText?l=l.cut(Math.max(0,e-s),Math.min(l.text.length,t-s)):l=l.cut(Math.max(0,e-s-1),Math.min(l.content.size,t-s-1))),r.push(l),i+=l.nodeSize),s=a}return new Oe(r,i)}cutByIndex(e,t){return e==t?Oe.empty:e==0&&t==this.content.length?this:new Oe(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let i=this.content.slice(),o=this.size+t.nodeSize-r.nodeSize;return i[e]=t,new Oe(i,o)}addToStart(e){return new Oe([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new Oe(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;tthis.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let r=0,i=0;;r++){let o=this.child(r),s=i+o.nodeSize;if(s>=e)return s==e||t>0?Ci(r+1,s):Ci(r,i);i=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return Oe.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new Oe(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return Oe.empty;let t,r=0;for(let i=0;ithis.type.rank&&(t||(t=e.slice(0,i)),t.push(this),r=!0),t&&t.push(o)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;tr.type.rank-i.type.rank),t}};ee.none=[];class Zi extends Error{}class R{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=Cf(this.content,e+this.openStart,t);return r&&new R(r,this.openStart,this.openEnd)}removeBetween(e,t){return new R(vf(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return R.empty;let r=t.openStart||0,i=t.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new R(_.fromJSON(e,t.content),r,i)}static maxOpen(e,t=!0){let r=0,i=0;for(let o=e.firstChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.firstChild)r++;for(let o=e.lastChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.lastChild)i++;return new R(e,r,i)}}R.empty=new R(_.empty,0,0);function vf(n,e,t){let{index:r,offset:i}=n.findIndex(e),o=n.maybeChild(r),{index:s,offset:l}=n.findIndex(t);if(i==e||o.isText){if(l!=t&&!n.child(s).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=s)throw new RangeError("Removing non-flat range");return n.replaceChild(r,o.copy(vf(o.content,e-i-1,t-i-1)))}function Cf(n,e,t,r){let{index:i,offset:o}=n.findIndex(e),s=n.maybeChild(i);if(o==e||s.isText)return r&&!r.canReplace(i,i,t)?null:n.cut(0,e).append(t).append(n.cut(e));let l=Cf(s.content,e-o-1,t);return l&&n.replaceChild(i,s.copy(l))}function kg(n,e,t){if(t.openStart>n.depth)throw new Zi("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new Zi("Inconsistent open depths");return Af(n,e,t,0)}function Af(n,e,t,r){let i=n.index(r),o=n.node(r);if(i==e.index(r)&&r=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function Ir(n,e,t,r){let i=(e||n).node(t),o=0,s=e?e.index(t):i.childCount;n&&(o=n.index(t),n.depth>t?o++:n.textOffset&&(vn(n.nodeAfter,r),o++));for(let l=o;li&&js(n,e,i+1),s=r.depth>i&&js(t,r,i+1),l=[];return Ir(null,n,i,l),o&&s&&e.index(i)==t.index(i)?(Of(o,s),vn(Cn(o,Mf(n,e,t,r,i+1)),l)):(o&&vn(Cn(o,eo(n,e,i+1)),l),Ir(e,t,i,l),s&&vn(Cn(s,eo(t,r,i+1)),l)),Ir(r,null,i,l),new _(l)}function eo(n,e,t){let r=[];if(Ir(null,n,t,r),n.depth>t){let i=js(n,e,t+1);vn(Cn(i,eo(n,e,t+1)),r)}return Ir(e,null,t,r),new _(r)}function Sg(n,e){let t=e.depth-n.openStart,i=e.node(t).copy(n.content);for(let o=t-1;o>=0;o--)i=e.node(o).copy(_.from(i));return{start:i.resolveNoCache(n.openStart+t),end:i.resolveNoCache(i.content.size-n.openEnd-t)}}class Jr{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(t);return r?e.child(t).cut(r):i}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],i=t==0?0:this.path[t*3-1]+1;for(let o=0;o0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new Ef(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],i=0,o=t;for(let s=e;;){let{index:l,offset:a}=s.content.findIndex(o),c=o-a;if(r.push(s,l,i+a),!c||(s=s.child(l),s.isText))break;o=c-1,i+=a+1}return new Jr(t,r,o)}static resolveCached(e,t){let r=Ha.get(e);if(r)for(let o=0;oe&&this.nodesBetween(e,t,o=>(r.isInSet(o.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),_f(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=_.empty,i=0,o=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,i,o),l=s&&s.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let a=i;at.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let i=_.fromJSON(e,t.content),o=e.nodeType(t.type).create(t.attrs,i,r);return o.type.checkAttrs(o.attrs),o}};An.prototype.text=void 0;class to extends An{constructor(e,t,r,i){if(super(e,t,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):_f(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new to(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new to(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function _f(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class _n{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new Og(e,t);if(r.next==null)return _n.empty;let i=Tf(r);r.next&&r.err("Unexpected trailing text");let o=Ig(Dg(i));return Rg(o,r),o}matchType(e){for(let t=0;tc.createAndFill()));for(let c=0;c=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let i=0;i{let o=i+(r.validEnd?"*":" ")+" ";for(let s=0;s"+e.indexOf(r.next[s].next);return o}).join(` `)}}_n.empty=new _n(!0);class Og{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function Tf(n){let e=[];do e.push(Mg(n));while(n.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function Mg(n){let e=[];do e.push(Eg(n));while(n.next&&n.next!=")"&&n.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function Eg(n){let e=Ng(n);for(;;)if(n.eat("+"))e={type:"plus",expr:e};else if(n.eat("*"))e={type:"star",expr:e};else if(n.eat("?"))e={type:"opt",expr:e};else if(n.eat("{"))e=_g(n,e);else break;return e}function $a(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let e=Number(n.next);return n.pos++,e}function _g(n,e){let t=$a(n),r=t;return n.eat(",")&&(n.next!="}"?r=$a(n):r=-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:t,max:r,expr:e}}function Tg(n,e){let t=n.nodeTypes,r=t[e];if(r)return[r];let i=[];for(let o in t){let s=t[o];s.groups.indexOf(e)>-1&&i.push(s)}return i.length==0&&n.err("No node type or group '"+e+"' found"),i}function Ng(n){if(n.eat("(")){let e=Tf(n);return n.eat(")")||n.err("Missing closing paren"),e}else if(/\W/.test(n.next))n.err("Unexpected token '"+n.next+"'");else{let e=Tg(n,n.next).map(t=>(n.inline==null?n.inline=t.isInline:n.inline!=t.isInline&&n.err("Mixing inline and block content"),{type:"name",value:t}));return n.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function Dg(n){let e=[[]];return i(o(n,0),t()),e;function t(){return e.push([])-1}function r(s,l,a){let c={term:a,to:l};return e[s].push(c),c}function i(s,l){s.forEach(a=>a.to=l)}function o(s,l){if(s.type=="choice")return s.exprs.reduce((a,c)=>a.concat(o(c,l)),[]);if(s.type=="seq")for(let a=0;;a++){let c=o(s.exprs[a],l);if(a==s.exprs.length-1)return c;i(c,l=t())}else if(s.type=="star"){let a=t();return r(l,a),i(o(s.expr,a),a),[r(a)]}else if(s.type=="plus"){let a=t();return i(o(s.expr,l),a),i(o(s.expr,a),a),[r(a)]}else{if(s.type=="opt")return[r(l)].concat(o(s.expr,l));if(s.type=="range"){let a=l;for(let c=0;c{n[s].forEach(({term:l,to:a})=>{if(!l)return;let c;for(let u=0;u{c||i.push([l,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let o=e[r.join(",")]=new _n(r.indexOf(n.length-1)>-1);for(let s=0;s-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;tr[o]=new Ff(o,t,s));let i=t.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let o in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function zg(n,e,t){let r=t.split("|");return i=>{let o=i===null?"null":typeof i;if(r.indexOf(o)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${n}, got ${o}`)}}class Fg{constructor(e,t,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?zg(e,t,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class vo{constructor(e,t,r,i){this.name=e,this.rank=t,this.schema=r,this.spec=i,this.attrs=zf(e,i.attrs),this.excluded=null;let o=Df(this.attrs);this.instance=o?new ee(this,o):null}create(e=null){return!e&&this.instance?this.instance:new ee(this,If(this.attrs,e))}static compile(e,t){let r=Object.create(null),i=0;return e.forEach((o,s)=>r[o]=new vo(o,i++,t,s)),r}removeFromSet(e){for(var t=0;t-1}}class wv{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let i in e)t[i]=e[i];t.nodes=pe.from(e.nodes),t.marks=pe.from(e.marks||{}),this.nodes=qa.compile(this.spec.nodes,this),this.marks=vo.compile(this.spec.marks,this);let r=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let o=this.nodes[i],s=o.spec.content||"",l=o.spec.marks;if(o.contentMatch=r[s]||(r[s]=_n.parse(s,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!o.isInline||!o.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=o}o.markSet=l=="_"?null:l?Wa(this,l.split(" ")):l==""||!o.inlineContent?[]:null}for(let i in this.marks){let o=this.marks[i],s=o.spec.excludes;o.excluded=s==null?[o]:s==""?[]:Wa(this,s.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,r,i){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof qa){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(t,r,i)}text(e,t){let r=this.nodes.text;return new to(r,r.defaultAttrs,e,ee.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeFromJSON(e){return An.fromJSON(this,e)}markFromJSON(e){return ee.fromJSON(this,e)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function Wa(n,e){let t=[];for(let r=0;r-1)&&t.push(s=a)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return t}function Pg(n){return n.tag!=null}function Lg(n){return n.style!=null}class Kr{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let r=this.matchedStyles=[];t.forEach(i=>{if(Pg(i))this.tags.push(i);else if(Lg(i)){let o=/[^=]*/.exec(i.style)[0];r.indexOf(o)<0&&r.push(o),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let o=e.nodes[i.node];return o.contentMatch.matchType(o)})}parse(e,t={}){let r=new Ja(this,t,!1);return r.addAll(e,ee.none,t.from,t.to),r.finish()}parseSlice(e,t={}){let r=new Ja(this,t,!0);return r.addAll(e,ee.none,t.from,t.to),R.maxOpen(r.finish())}matchTag(e,t,r){for(let i=r?this.tags.indexOf(r)+1:0;ie.length&&(l.charCodeAt(e.length)!=61||l.slice(e.length+1)!=t))){if(s.getAttrs){let a=s.getAttrs(t);if(a===!1)continue;s.attrs=a||void 0}return s}}}static schemaRules(e){let t=[];function r(i){let o=i.priority==null?50:i.priority,s=0;for(;s{r(s=Ka(s)),s.mark||s.ignore||s.clearMark||(s.mark=i)})}for(let i in e.nodes){let o=e.nodes[i].spec.parseDOM;o&&o.forEach(s=>{r(s=Ka(s)),s.node||s.ignore||s.mark||(s.node=i)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Kr(e,Kr.schemaRules(e)))}}const Pf={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Bg={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Lf={ol:!0,ul:!0},no=1,ro=2,Rr=4;function Ua(n,e,t){return e!=null?(e?no:0)|(e==="full"?ro:0):n&&n.whitespace=="pre"?no|ro:t&~Rr}class Ai{constructor(e,t,r,i,o,s){this.type=e,this.attrs=t,this.marks=r,this.solid=i,this.options=s,this.content=[],this.activeMarks=ee.none,this.match=o||(s&Rr?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(_.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let r=this.type.contentMatch,i;return(i=r.findWrapping(e.type))?(this.match=r,i):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&no)){let r=this.content[this.content.length-1],i;if(r&&r.isText&&(i=/[ \t\r\n\u000c]+$/.exec(r.text))){let o=r;r.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=o.withText(o.text.slice(0,o.text.length-i[0].length))}}let t=_.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(_.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!Pf.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class Ja{constructor(e,t,r){this.parser=e,this.options=t,this.isOpen=r,this.open=0;let i=t.topNode,o,s=Ua(null,t.preserveWhitespace,0)|(r?Rr:0);i?o=new Ai(i.type,i.attrs,ee.none,!0,t.topMatch||i.type.contentMatch,s):r?o=new Ai(null,null,ee.none,!0,null,s):o=new Ai(e.schema.topNodeType,null,ee.none,!0,null,s),this.nodes=[o],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){e.nodeType==3?this.addTextNode(e,t):e.nodeType==1&&this.addElement(e,t)}addTextNode(e,t){let r=e.nodeValue,i=this.top;if(i.options&ro||i.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(i.options&no)i.options&ro?r=r.replace(/\r\n?/g,` `):r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let o=i.content[i.content.length-1],s=e.previousSibling;(!o||s&&s.nodeName=="BR"||o.isText&&/[ \t\r\n\u000c]$/.test(o.text))&&(r=r.slice(1))}r&&this.insertNode(this.parser.schema.text(r),t),this.findInText(e)}else this.findInside(e)}addElement(e,t,r){let i=e.nodeName.toLowerCase(),o;Lf.hasOwnProperty(i)&&this.parser.normalizeLists&&Vg(e);let s=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(o=this.parser.matchTag(e,this,r));if(s?s.ignore:Bg.hasOwnProperty(i))this.findInside(e),this.ignoreFallback(e,t);else if(!s||s.skip||s.closeParent){s&&s.closeParent?this.open=Math.max(0,this.open-1):s&&s.skip.nodeType&&(e=s.skip);let l,a=this.top,c=this.needsBlock;if(Pf.hasOwnProperty(i))a.content.length&&a.content[0].isInline&&this.open&&(this.open--,a=this.top),l=!0,a.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);return}let u=s&&s.skip?t:this.readStyles(e,t);u&&this.addAll(e,u),l&&this.sync(a),this.needsBlock=c}else{let l=this.readStyles(e,t);l&&this.addElementByRule(e,s,l,s.consuming===!1?o:void 0)}}leafFallback(e,t){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(` `),t)}ignoreFallback(e,t){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),t)}readStyles(e,t){let r=e.style;if(r&&r.length)for(let i=0;i!a.clearMark(c)):t=t.concat(this.parser.schema.marks[a.mark].create(a.attrs)),a.consuming===!1)l=a;else break}}return t}addElementByRule(e,t,r,i){let o,s;if(t.node)if(s=this.parser.schema.nodes[t.node],s.isLeaf)this.insertNode(s.create(t.attrs),r)||this.leafFallback(e,r);else{let a=this.enter(s,t.attrs||null,r,t.preserveWhitespace);a&&(o=!0,r=a)}else{let a=this.parser.schema.marks[t.mark];r=r.concat(a.create(t.attrs))}let l=this.top;if(s&&s.isLeaf)this.findInside(e);else if(i)this.addElement(e,r,i);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(a=>this.insertNode(a,r));else{let a=e;typeof t.contentElement=="string"?a=e.querySelector(t.contentElement):typeof t.contentElement=="function"?a=t.contentElement(e):t.contentElement&&(a=t.contentElement),this.findAround(e,a,!0),this.addAll(a,r)}o&&this.sync(l)&&this.open--}addAll(e,t,r,i){let o=r||0;for(let s=r?e.childNodes[r]:e.firstChild,l=i==null?null:e.childNodes[i];s!=l;s=s.nextSibling,++o)this.findAtPoint(e,o),this.addDOM(s,t);this.findAtPoint(e,o)}findPlace(e,t){let r,i;for(let o=this.open;o>=0;o--){let s=this.nodes[o],l=s.findWrapping(e);if(l&&(!r||r.length>l.length)&&(r=l,i=s,!l.length)||s.solid)break}if(!r)return null;this.sync(i);for(let o=0;o(s.type?s.type.allowsMarkType(c.type):Ya(c.type,e))?(a=c.addToSet(a),!1):!0),this.nodes.push(new Ai(e,t,a,i,null,l)),this.open++,r}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(e){for(let t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let r=this.nodes[t].content;for(let i=r.length-1;i>=0;i--)e+=r[i].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let r=0;r-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),o=-(r?r.depth+1:0)+(i?0:1),s=(l,a)=>{for(;l>=0;l--){let c=t[l];if(c==""){if(l==t.length-1||l==0)continue;for(;a>=o;a--)if(s(l-1,a))return!0;return!1}else{let u=a>0||a==0&&i?this.nodes[a].type:r&&a>=o?r.node(a-o).type:null;if(!u||u.name!=c&&u.groups.indexOf(c)==-1)return!1;a--}}return!0};return s(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let r=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let t in this.parser.schema.nodes){let r=this.parser.schema.nodes[t];if(r.isTextblock&&r.defaultAttrs)return r}}}function Vg(n){for(let e=n.firstChild,t=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&Lf.hasOwnProperty(r)&&t?(t.appendChild(e),e=t):r=="li"?t=e:r&&(t=null)}}function Hg(n,e){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,e)}function Ka(n){let e={};for(let t in n)e[t]=n[t];return e}function Ya(n,e){let t=e.schema.nodes;for(let r in t){let i=t[r];if(!i.allowsMarkType(n))continue;let o=[],s=l=>{o.push(l);for(let a=0;a{if(o.length||s.marks.length){let l=0,a=0;for(;l=0;i--){let o=this.serializeMark(e.marks[i],e.isInline,t);o&&((o.contentDOM||o.dom).appendChild(r),r=o.dom)}return r}serializeMark(e,t,r={}){let i=this.marks[e.type.name];return i&&Vi(Uo(r),i(e,t),null,e.attrs)}static renderSpec(e,t,r=null,i){return Vi(e,t,r,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new fr(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=Ga(e.nodes);return t.text||(t.text=r=>r.text),t}static marksFromSchema(e){return Ga(e.marks)}}function Ga(n){let e={};for(let t in n){let r=n[t].spec.toDOM;r&&(e[t]=r)}return e}function Uo(n){return n.document||window.document}const Xa=new WeakMap;function $g(n){let e=Xa.get(n);return e===void 0&&Xa.set(n,e=jg(n)),e}function jg(n){let e=null;function t(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let i=0;i-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let s=i.indexOf(" ");s>0&&(t=i.slice(0,s),i=i.slice(s+1));let l,a=t?n.createElementNS(t,i):n.createElement(i),c=e[1],u=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){u=2;for(let f in c)if(c[f]!=null){let h=f.indexOf(" ");h>0?a.setAttributeNS(f.slice(0,h),f.slice(h+1),c[f]):a.setAttribute(f,c[f])}}for(let f=u;fu)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}else{let{dom:d,contentDOM:p}=Vi(n,h,t,r);if(a.appendChild(d),p){if(l)throw new RangeError("Multiple content holes");l=p}}}return{dom:a,contentDOM:l}}const qg={};function Pl(n,e){const t=e||qg,r=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,i=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return Bf(n,r,i)}function Bf(n,e,t){if(Wg(n)){if("value"in n)return n.type==="html"&&!t?"":n.value;if(e&&"alt"in n&&n.alt)return n.alt;if("children"in n)return Qa(n.children,e,t)}return Array.isArray(n)?Qa(n,e,t):""}function Qa(n,e,t){const r=[];let i=-1;for(;++ii?0:i+e:e=e>i?i:e,t=t>0?t:0,r.length<1e4)s=Array.from(r),s.unshift(e,t),n.splice(...s);else for(t&&n.splice(e,t);o0?(tt(n,n.length,0,e),n):e}const ec={}.hasOwnProperty;function Vf(n){const e={};let t=-1;for(;++t13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function ft(n){return n.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Me=an(/[A-Za-z]/),Re=an(/[\dA-Za-z]/),Kg=an(/[#-'*+\--9=?A-Z^-~]/);function io(n){return n!==null&&(n<32||n===127)}const Ws=an(/\d/),Yg=an(/[\dA-Fa-f]/),Gg=an(/[!-/:-@[-`{-~]/);function V(n){return n!==null&&n<-2}function te(n){return n!==null&&(n<0||n===32)}function U(n){return n===-2||n===-1||n===32}const Co=an(/\p{P}|\p{S}/u),Tn=an(/\s/);function an(n){return e;function e(t){return t!==null&&t>-1&&n.test(String.fromCharCode(t))}}function Q(n,e,t,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return s;function s(a){return U(a)?(n.enter(t),l(a)):e(a)}function l(a){return U(a)&&o++s))return;const I=e.events.length;let L=I,E,S;for(;L--;)if(e.events[L][0]==="exit"&&e.events[L][1].type==="chunkFlow"){if(E){S=e.events[L][1].end;break}E=!0}for(g(r),k=I;kx;){const O=t[C];e.containerState=O[1],O[0].exit.call(e,n)}t.length=x}function v(){i.write([null]),o=void 0,i=void 0,e.containerState._closeFlow=void 0}}function t2(n,e,t){return Q(n,n.attempt(this.parser.constructs.document,e,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function oo(n){if(n===null||te(n)||Tn(n))return 1;if(Co(n))return 2}function Ao(n,e,t){const r=[];let i=-1;for(;++i1&&n[t][1].end.offset-n[t][1].start.offset>1?2:1;const f=Object.assign({},n[r][1].end),h=Object.assign({},n[t][1].start);nc(f,-a),nc(h,a),s={type:a>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},n[r][1].end)},l={type:a>1?"strongSequence":"emphasisSequence",start:Object.assign({},n[t][1].start),end:h},o={type:a>1?"strongText":"emphasisText",start:Object.assign({},n[r][1].end),end:Object.assign({},n[t][1].start)},i={type:a>1?"strong":"emphasis",start:Object.assign({},s.start),end:Object.assign({},l.end)},n[r][1].end=Object.assign({},s.start),n[t][1].start=Object.assign({},l.end),c=[],n[r][1].end.offset-n[r][1].start.offset&&(c=Xe(c,[["enter",n[r][1],e],["exit",n[r][1],e]])),c=Xe(c,[["enter",i,e],["enter",s,e],["exit",s,e],["enter",o,e]]),c=Xe(c,Ao(e.parser.constructs.insideSpan.null,n.slice(r+1,t),e)),c=Xe(c,[["exit",o,e],["enter",l,e],["exit",l,e],["exit",i,e]]),n[t][1].end.offset-n[t][1].start.offset?(u=2,c=Xe(c,[["enter",n[t][1],e],["exit",n[t][1],e]])):u=0,tt(n,r-1,t-r+3,c),t=r+c.length-u-2;break}}for(t=-1;++t0&&U(k)?Q(n,v,"linePrefix",o+1)(k):v(k)}function v(k){return k===null||V(k)?n.check(rc,m,C)(k):(n.enter("codeFlowValue"),x(k))}function x(k){return k===null||V(k)?(n.exit("codeFlowValue"),v(k)):(n.consume(k),x)}function C(k){return n.exit("codeFenced"),e(k)}function O(k,I,L){let E=0;return S;function S(j){return k.enter("lineEnding"),k.consume(j),k.exit("lineEnding"),T}function T(j){return k.enter("codeFencedFence"),U(j)?Q(k,D,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):D(j)}function D(j){return j===l?(k.enter("codeFencedFenceSequence"),B(j)):L(j)}function B(j){return j===l?(E++,k.consume(j),B):E>=s?(k.exit("codeFencedFenceSequence"),U(j)?Q(k,W,"whitespace")(j):W(j)):L(j)}function W(j){return j===null||V(j)?(k.exit("codeFencedFence"),I(j)):L(j)}}}function d2(n,e,t){const r=this;return i;function i(s){return s===null?t(s):(n.enter("lineEnding"),n.consume(s),n.exit("lineEnding"),o)}function o(s){return r.parser.lazy[r.now().line]?t(s):e(s)}}const Jo={name:"codeIndented",tokenize:m2},p2={tokenize:g2,partial:!0};function m2(n,e,t){const r=this;return i;function i(c){return n.enter("codeIndented"),Q(n,o,"linePrefix",4+1)(c)}function o(c){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?s(c):t(c)}function s(c){return c===null?a(c):V(c)?n.attempt(p2,s,a)(c):(n.enter("codeFlowValue"),l(c))}function l(c){return c===null||V(c)?(n.exit("codeFlowValue"),s(c)):(n.consume(c),l)}function a(c){return n.exit("codeIndented"),e(c)}}function g2(n,e,t){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?t(s):V(s)?(n.enter("lineEnding"),n.consume(s),n.exit("lineEnding"),i):Q(n,o,"linePrefix",4+1)(s)}function o(s){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?e(s):V(s)?i(s):t(s)}}const y2={name:"codeText",tokenize:x2,resolve:b2,previous:w2};function b2(n){let e=n.length-4,t=3,r,i;if((n[t][1].type==="lineEnding"||n[t][1].type==="space")&&(n[e][1].type==="lineEnding"||n[e][1].type==="space")){for(r=t;++r=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return ethis.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(e,t,r){const i=t||0;this.setCursor(Math.trunc(e));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&xr(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),xr(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),xr(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e=4?e(s):n.interrupt(r.parser.constructs.flow,t,e)(s)}}function Uf(n,e,t,r,i,o,s,l,a){const c=a||Number.POSITIVE_INFINITY;let u=0;return f;function f(g){return g===60?(n.enter(r),n.enter(i),n.enter(o),n.consume(g),n.exit(o),h):g===null||g===32||g===41||io(g)?t(g):(n.enter(r),n.enter(s),n.enter(l),n.enter("chunkString",{contentType:"string"}),m(g))}function h(g){return g===62?(n.enter(o),n.consume(g),n.exit(o),n.exit(i),n.exit(r),e):(n.enter(l),n.enter("chunkString",{contentType:"string"}),d(g))}function d(g){return g===62?(n.exit("chunkString"),n.exit(l),h(g)):g===null||g===60||V(g)?t(g):(n.consume(g),g===92?p:d)}function p(g){return g===60||g===62||g===92?(n.consume(g),d):d(g)}function m(g){return!u&&(g===null||g===41||te(g))?(n.exit("chunkString"),n.exit(l),n.exit(s),n.exit(r),e(g)):u999||d===null||d===91||d===93&&!a||d===94&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?t(d):d===93?(n.exit(o),n.enter(i),n.consume(d),n.exit(i),n.exit(r),e):V(d)?(n.enter("lineEnding"),n.consume(d),n.exit("lineEnding"),u):(n.enter("chunkString",{contentType:"string"}),f(d))}function f(d){return d===null||d===91||d===93||V(d)||l++>999?(n.exit("chunkString"),u(d)):(n.consume(d),a||(a=!U(d)),d===92?h:f)}function h(d){return d===91||d===92||d===93?(n.consume(d),l++,f):f(d)}}function Kf(n,e,t,r,i,o){let s;return l;function l(h){return h===34||h===39||h===40?(n.enter(r),n.enter(i),n.consume(h),n.exit(i),s=h===40?41:h,a):t(h)}function a(h){return h===s?(n.enter(i),n.consume(h),n.exit(i),n.exit(r),e):(n.enter(o),c(h))}function c(h){return h===s?(n.exit(o),a(s)):h===null?t(h):V(h)?(n.enter("lineEnding"),n.consume(h),n.exit("lineEnding"),Q(n,c,"linePrefix")):(n.enter("chunkString",{contentType:"string"}),u(h))}function u(h){return h===s||h===null||V(h)?(n.exit("chunkString"),c(h)):(n.consume(h),h===92?f:u)}function f(h){return h===s||h===92?(n.consume(h),u):u(h)}}function zr(n,e){let t;return r;function r(i){return V(i)?(n.enter("lineEnding"),n.consume(i),n.exit("lineEnding"),t=!0,r):U(i)?Q(n,r,t?"linePrefix":"lineSuffix")(i):e(i)}}const E2={name:"definition",tokenize:T2},_2={tokenize:N2,partial:!0};function T2(n,e,t){const r=this;let i;return o;function o(d){return n.enter("definition"),s(d)}function s(d){return Jf.call(r,n,l,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}function l(d){return i=ft(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),d===58?(n.enter("definitionMarker"),n.consume(d),n.exit("definitionMarker"),a):t(d)}function a(d){return te(d)?zr(n,c)(d):c(d)}function c(d){return Uf(n,u,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function u(d){return n.attempt(_2,f,f)(d)}function f(d){return U(d)?Q(n,h,"whitespace")(d):h(d)}function h(d){return d===null||V(d)?(n.exit("definition"),r.parser.defined.push(i),e(d)):t(d)}}function N2(n,e,t){return r;function r(l){return te(l)?zr(n,i)(l):t(l)}function i(l){return Kf(n,o,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function o(l){return U(l)?Q(n,s,"whitespace")(l):s(l)}function s(l){return l===null||V(l)?e(l):t(l)}}const D2={name:"hardBreakEscape",tokenize:I2};function I2(n,e,t){return r;function r(o){return n.enter("hardBreakEscape"),n.consume(o),i}function i(o){return V(o)?(n.exit("hardBreakEscape"),e(o)):t(o)}}const R2={name:"headingAtx",tokenize:F2,resolve:z2};function z2(n,e){let t=n.length-2,r=3,i,o;return n[r][1].type==="whitespace"&&(r+=2),t-2>r&&n[t][1].type==="whitespace"&&(t-=2),n[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&n[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(i={type:"atxHeadingText",start:n[r][1].start,end:n[t][1].end},o={type:"chunkText",start:n[r][1].start,end:n[t][1].end,contentType:"text"},tt(n,r,t-r+1,[["enter",i,e],["enter",o,e],["exit",o,e],["exit",i,e]])),n}function F2(n,e,t){let r=0;return i;function i(u){return n.enter("atxHeading"),o(u)}function o(u){return n.enter("atxHeadingSequence"),s(u)}function s(u){return u===35&&r++<6?(n.consume(u),s):u===null||te(u)?(n.exit("atxHeadingSequence"),l(u)):t(u)}function l(u){return u===35?(n.enter("atxHeadingSequence"),a(u)):u===null||V(u)?(n.exit("atxHeading"),e(u)):U(u)?Q(n,l,"whitespace")(u):(n.enter("atxHeadingText"),c(u))}function a(u){return u===35?(n.consume(u),a):(n.exit("atxHeadingSequence"),l(u))}function c(u){return u===null||u===35||te(u)?(n.exit("atxHeadingText"),l(u)):(n.consume(u),c)}}const P2=["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"],oc=["pre","script","style","textarea"],L2={name:"htmlFlow",tokenize:$2,resolveTo:H2,concrete:!0},B2={tokenize:q2,partial:!0},V2={tokenize:j2,partial:!0};function H2(n){let e=n.length;for(;e--&&!(n[e][0]==="enter"&&n[e][1].type==="htmlFlow"););return e>1&&n[e-2][1].type==="linePrefix"&&(n[e][1].start=n[e-2][1].start,n[e+1][1].start=n[e-2][1].start,n.splice(e-2,2)),n}function $2(n,e,t){const r=this;let i,o,s,l,a;return c;function c(w){return u(w)}function u(w){return n.enter("htmlFlow"),n.enter("htmlFlowData"),n.consume(w),f}function f(w){return w===33?(n.consume(w),h):w===47?(n.consume(w),o=!0,m):w===63?(n.consume(w),i=3,r.interrupt?e:b):Me(w)?(n.consume(w),s=String.fromCharCode(w),y):t(w)}function h(w){return w===45?(n.consume(w),i=2,d):w===91?(n.consume(w),i=5,l=0,p):Me(w)?(n.consume(w),i=4,r.interrupt?e:b):t(w)}function d(w){return w===45?(n.consume(w),r.interrupt?e:b):t(w)}function p(w){const ce="CDATA[";return w===ce.charCodeAt(l++)?(n.consume(w),l===ce.length?r.interrupt?e:D:p):t(w)}function m(w){return Me(w)?(n.consume(w),s=String.fromCharCode(w),y):t(w)}function y(w){if(w===null||w===47||w===62||te(w)){const ce=w===47,de=s.toLowerCase();return!ce&&!o&&oc.includes(de)?(i=1,r.interrupt?e(w):D(w)):P2.includes(s.toLowerCase())?(i=6,ce?(n.consume(w),g):r.interrupt?e(w):D(w)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(w):o?v(w):x(w))}return w===45||Re(w)?(n.consume(w),s+=String.fromCharCode(w),y):t(w)}function g(w){return w===62?(n.consume(w),r.interrupt?e:D):t(w)}function v(w){return U(w)?(n.consume(w),v):S(w)}function x(w){return w===47?(n.consume(w),S):w===58||w===95||Me(w)?(n.consume(w),C):U(w)?(n.consume(w),x):S(w)}function C(w){return w===45||w===46||w===58||w===95||Re(w)?(n.consume(w),C):O(w)}function O(w){return w===61?(n.consume(w),k):U(w)?(n.consume(w),O):x(w)}function k(w){return w===null||w===60||w===61||w===62||w===96?t(w):w===34||w===39?(n.consume(w),a=w,I):U(w)?(n.consume(w),k):L(w)}function I(w){return w===a?(n.consume(w),a=null,E):w===null||V(w)?t(w):(n.consume(w),I)}function L(w){return w===null||w===34||w===39||w===47||w===60||w===61||w===62||w===96||te(w)?O(w):(n.consume(w),L)}function E(w){return w===47||w===62||U(w)?x(w):t(w)}function S(w){return w===62?(n.consume(w),T):t(w)}function T(w){return w===null||V(w)?D(w):U(w)?(n.consume(w),T):t(w)}function D(w){return w===45&&i===2?(n.consume(w),J):w===60&&i===1?(n.consume(w),K):w===62&&i===4?(n.consume(w),ve):w===63&&i===3?(n.consume(w),b):w===93&&i===5?(n.consume(w),ne):V(w)&&(i===6||i===7)?(n.exit("htmlFlowData"),n.check(B2,Ce,B)(w)):w===null||V(w)?(n.exit("htmlFlowData"),B(w)):(n.consume(w),D)}function B(w){return n.check(V2,W,Ce)(w)}function W(w){return n.enter("lineEnding"),n.consume(w),n.exit("lineEnding"),j}function j(w){return w===null||V(w)?B(w):(n.enter("htmlFlowData"),D(w))}function J(w){return w===45?(n.consume(w),b):D(w)}function K(w){return w===47?(n.consume(w),s="",re):D(w)}function re(w){if(w===62){const ce=s.toLowerCase();return oc.includes(ce)?(n.consume(w),ve):D(w)}return Me(w)&&s.length<8?(n.consume(w),s+=String.fromCharCode(w),re):D(w)}function ne(w){return w===93?(n.consume(w),b):D(w)}function b(w){return w===62?(n.consume(w),ve):w===45&&i===2?(n.consume(w),b):D(w)}function ve(w){return w===null||V(w)?(n.exit("htmlFlowData"),Ce(w)):(n.consume(w),ve)}function Ce(w){return n.exit("htmlFlow"),e(w)}}function j2(n,e,t){const r=this;return i;function i(s){return V(s)?(n.enter("lineEnding"),n.consume(s),n.exit("lineEnding"),o):t(s)}function o(s){return r.parser.lazy[r.now().line]?t(s):e(s)}}function q2(n,e,t){return r;function r(i){return n.enter("lineEnding"),n.consume(i),n.exit("lineEnding"),n.attempt(ri,e,t)}}const W2={name:"htmlText",tokenize:U2};function U2(n,e,t){const r=this;let i,o,s;return l;function l(b){return n.enter("htmlText"),n.enter("htmlTextData"),n.consume(b),a}function a(b){return b===33?(n.consume(b),c):b===47?(n.consume(b),O):b===63?(n.consume(b),x):Me(b)?(n.consume(b),L):t(b)}function c(b){return b===45?(n.consume(b),u):b===91?(n.consume(b),o=0,p):Me(b)?(n.consume(b),v):t(b)}function u(b){return b===45?(n.consume(b),d):t(b)}function f(b){return b===null?t(b):b===45?(n.consume(b),h):V(b)?(s=f,K(b)):(n.consume(b),f)}function h(b){return b===45?(n.consume(b),d):f(b)}function d(b){return b===62?J(b):b===45?h(b):f(b)}function p(b){const ve="CDATA[";return b===ve.charCodeAt(o++)?(n.consume(b),o===ve.length?m:p):t(b)}function m(b){return b===null?t(b):b===93?(n.consume(b),y):V(b)?(s=m,K(b)):(n.consume(b),m)}function y(b){return b===93?(n.consume(b),g):m(b)}function g(b){return b===62?J(b):b===93?(n.consume(b),g):m(b)}function v(b){return b===null||b===62?J(b):V(b)?(s=v,K(b)):(n.consume(b),v)}function x(b){return b===null?t(b):b===63?(n.consume(b),C):V(b)?(s=x,K(b)):(n.consume(b),x)}function C(b){return b===62?J(b):x(b)}function O(b){return Me(b)?(n.consume(b),k):t(b)}function k(b){return b===45||Re(b)?(n.consume(b),k):I(b)}function I(b){return V(b)?(s=I,K(b)):U(b)?(n.consume(b),I):J(b)}function L(b){return b===45||Re(b)?(n.consume(b),L):b===47||b===62||te(b)?E(b):t(b)}function E(b){return b===47?(n.consume(b),J):b===58||b===95||Me(b)?(n.consume(b),S):V(b)?(s=E,K(b)):U(b)?(n.consume(b),E):J(b)}function S(b){return b===45||b===46||b===58||b===95||Re(b)?(n.consume(b),S):T(b)}function T(b){return b===61?(n.consume(b),D):V(b)?(s=T,K(b)):U(b)?(n.consume(b),T):E(b)}function D(b){return b===null||b===60||b===61||b===62||b===96?t(b):b===34||b===39?(n.consume(b),i=b,B):V(b)?(s=D,K(b)):U(b)?(n.consume(b),D):(n.consume(b),W)}function B(b){return b===i?(n.consume(b),i=void 0,j):b===null?t(b):V(b)?(s=B,K(b)):(n.consume(b),B)}function W(b){return b===null||b===34||b===39||b===60||b===61||b===96?t(b):b===47||b===62||te(b)?E(b):(n.consume(b),W)}function j(b){return b===47||b===62||te(b)?E(b):t(b)}function J(b){return b===62?(n.consume(b),n.exit("htmlTextData"),n.exit("htmlText"),e):t(b)}function K(b){return n.exit("htmlTextData"),n.enter("lineEnding"),n.consume(b),n.exit("lineEnding"),re}function re(b){return U(b)?Q(n,ne,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(b):ne(b)}function ne(b){return n.enter("htmlTextData"),s(b)}}const Bl={name:"labelEnd",tokenize:Q2,resolveTo:X2,resolveAll:G2},J2={tokenize:Z2},K2={tokenize:ey},Y2={tokenize:ty};function G2(n){let e=-1;for(;++e=3&&(c===null||V(c))?(n.exit("thematicBreak"),e(c)):t(c)}function a(c){return c===i?(n.consume(c),r++,a):(n.exit("thematicBreakSequence"),U(c)?Q(n,l,"whitespace")(c):l(c))}}const Ie={name:"list",tokenize:uy,continuation:{tokenize:fy},exit:dy},ay={tokenize:py,partial:!0},cy={tokenize:hy,partial:!0};function uy(n,e,t){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return l;function l(d){const p=r.containerState.type||(d===42||d===43||d===45?"listUnordered":"listOrdered");if(p==="listUnordered"?!r.containerState.marker||d===r.containerState.marker:Ws(d)){if(r.containerState.type||(r.containerState.type=p,n.enter(p,{_container:!0})),p==="listUnordered")return n.enter("listItemPrefix"),d===42||d===45?n.check(Hi,t,c)(d):c(d);if(!r.interrupt||d===49)return n.enter("listItemPrefix"),n.enter("listItemValue"),a(d)}return t(d)}function a(d){return Ws(d)&&++s<10?(n.consume(d),a):(!r.interrupt||s<2)&&(r.containerState.marker?d===r.containerState.marker:d===41||d===46)?(n.exit("listItemValue"),c(d)):t(d)}function c(d){return n.enter("listItemMarker"),n.consume(d),n.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||d,n.check(ri,r.interrupt?t:u,n.attempt(ay,h,f))}function u(d){return r.containerState.initialBlankLine=!0,o++,h(d)}function f(d){return U(d)?(n.enter("listItemPrefixWhitespace"),n.consume(d),n.exit("listItemPrefixWhitespace"),h):t(d)}function h(d){return r.containerState.size=o+r.sliceSerialize(n.exit("listItemPrefix"),!0).length,e(d)}}function fy(n,e,t){const r=this;return r.containerState._closeFlow=void 0,n.check(ri,i,o);function i(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Q(n,e,"listItemIndent",r.containerState.size+1)(l)}function o(l){return r.containerState.furtherBlankLines||!U(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,n.attempt(cy,e,s)(l))}function s(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,Q(n,n.attempt(Ie,e,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function hy(n,e,t){const r=this;return Q(n,i,"listItemIndent",r.containerState.size+1);function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?e(o):t(o)}}function dy(n){n.exit(this.containerState.type)}function py(n,e,t){const r=this;return Q(n,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4+1);function i(o){const s=r.events[r.events.length-1];return!U(o)&&s&&s[1].type==="listItemPrefixWhitespace"?e(o):t(o)}}const sc={name:"setextUnderline",tokenize:gy,resolveTo:my};function my(n,e){let t=n.length,r,i,o;for(;t--;)if(n[t][0]==="enter"){if(n[t][1].type==="content"){r=t;break}n[t][1].type==="paragraph"&&(i=t)}else n[t][1].type==="content"&&n.splice(t,1),!o&&n[t][1].type==="definition"&&(o=t);const s={type:"setextHeading",start:Object.assign({},n[i][1].start),end:Object.assign({},n[n.length-1][1].end)};return n[i][1].type="setextHeadingText",o?(n.splice(i,0,["enter",s,e]),n.splice(o+1,0,["exit",n[r][1],e]),n[r][1].end=Object.assign({},n[o][1].end)):n[r][1]=s,n.push(["exit",s,e]),n}function gy(n,e,t){const r=this;let i;return o;function o(c){let u=r.events.length,f;for(;u--;)if(r.events[u][1].type!=="lineEnding"&&r.events[u][1].type!=="linePrefix"&&r.events[u][1].type!=="content"){f=r.events[u][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(n.enter("setextHeadingLine"),i=c,s(c)):t(c)}function s(c){return n.enter("setextHeadingLineSequence"),l(c)}function l(c){return c===i?(n.consume(c),l):(n.exit("setextHeadingLineSequence"),U(c)?Q(n,a,"lineSuffix")(c):a(c))}function a(c){return c===null||V(c)?(n.exit("setextHeadingLine"),e(c)):t(c)}}const yy={tokenize:by};function by(n){const e=this,t=n.attempt(ri,r,n.attempt(this.parser.constructs.flowInitial,i,Q(n,n.attempt(this.parser.constructs.flow,i,n.attempt(v2,i)),"linePrefix")));return t;function r(o){if(o===null){n.consume(o);return}return n.enter("lineEndingBlank"),n.consume(o),n.exit("lineEndingBlank"),e.currentConstruct=void 0,t}function i(o){if(o===null){n.consume(o);return}return n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),e.currentConstruct=void 0,t}}const wy={resolveAll:Gf()},xy=Yf("string"),ky=Yf("text");function Yf(n){return{tokenize:e,resolveAll:Gf(n==="text"?Sy:void 0)};function e(t){const r=this,i=this.parser.constructs[n],o=t.attempt(i,s,l);return s;function s(u){return c(u)?o(u):l(u)}function l(u){if(u===null){t.consume(u);return}return t.enter("data"),t.consume(u),a}function a(u){return c(u)?(t.exit("data"),o(u)):(t.consume(u),a)}function c(u){if(u===null)return!0;const f=i[u];let h=-1;if(f)for(;++h-1){const l=s[0];typeof l=="string"?s[0]=l.slice(r):s.shift()}o>0&&s.push(n[i].slice(0,o))}return s}function Ay(n,e){let t=-1;const r=[];let i;for(;++t0){const lt=H.tokenStack[H.tokenStack.length-1];(lt[1]||uc).call(H,void 0,lt[0])}for(N.position={start:jt(A.length>0?A[0][1].start:{line:1,column:1,offset:0}),end:jt(A.length>0?A[A.length-2][1].end:{line:1,column:1,offset:0})},Z=-1;++Z "),o.shift(2);const s=t.indentLines(t.containerFlow(n,o.current()),Ky);return i(),s}function Ky(n,e,t){return">"+(t?"":" ")+n}function th(n,e){return dc(n,e.inConstruct,!0)&&!dc(n,e.notInConstruct,!1)}function dc(n,e,t){if(typeof e=="string"&&(e=[e]),!e||e.length===0)return t;let r=-1;for(;++rs&&(s=o):o=1,i=r+e.length,r=t.indexOf(e,i);return s}function Ks(n,e){return!!(e.options.fences===!1&&n.value&&!n.lang&&/[^ \r\n]/.test(n.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(n.value))}function Gy(n){const e=n.options.fence||"`";if(e!=="`"&&e!=="~")throw new Error("Cannot serialize code with `"+e+"` for `options.fence`, expected `` ` `` or `~`");return e}function Xy(n,e,t,r){const i=Gy(t),o=n.value||"",s=i==="`"?"GraveAccent":"Tilde";if(Ks(n,t)){const f=t.enter("codeIndented"),h=t.indentLines(o,Qy);return f(),h}const l=t.createTracker(r),a=i.repeat(Math.max(Yy(o,i)+1,3)),c=t.enter("codeFenced");let u=l.move(a);if(n.lang){const f=t.enter(`codeFencedLang${s}`);u+=l.move(t.safe(n.lang,{before:u,after:" ",encode:["`"],...l.current()})),f()}if(n.lang&&n.meta){const f=t.enter(`codeFencedMeta${s}`);u+=l.move(" "),u+=l.move(t.safe(n.meta,{before:u,after:` `,encode:["`"],...l.current()})),f()}return u+=l.move(` `),o&&(u+=l.move(o+` `)),u+=l.move(a),c(),u}function Qy(n,e,t){return(t?"":" ")+n}function Vl(n){const e=n.options.quote||'"';if(e!=='"'&&e!=="'")throw new Error("Cannot serialize title with `"+e+"` for `options.quote`, expected `\"`, or `'`");return e}function Zy(n,e,t,r){const i=Vl(t),o=i==='"'?"Quote":"Apostrophe",s=t.enter("definition");let l=t.enter("label");const a=t.createTracker(r);let c=a.move("[");return c+=a.move(t.safe(t.associationId(n),{before:c,after:"]",...a.current()})),c+=a.move("]: "),l(),!n.url||/[\0- \u007F]/.test(n.url)?(l=t.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(t.safe(n.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(l=t.enter("destinationRaw"),c+=a.move(t.safe(n.url,{before:c,after:n.title?" ":` `,...a.current()}))),l(),n.title&&(l=t.enter(`title${o}`),c+=a.move(" "+i),c+=a.move(t.safe(n.title,{before:c,after:i,...a.current()})),c+=a.move(i),l()),s(),c}function e4(n){const e=n.options.emphasis||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize emphasis with `"+e+"` for `options.emphasis`, expected `*`, or `_`");return e}nh.peek=t4;function nh(n,e,t,r){const i=e4(t),o=t.enter("emphasis"),s=t.createTracker(r);let l=s.move(i);return l+=s.move(t.containerPhrasing(n,{before:l,after:i,...s.current()})),l+=s.move(i),o(),l}function t4(n,e,t){return t.options.emphasis||"*"}const Oo=function(n){if(n==null)return o4;if(typeof n=="function")return Mo(n);if(typeof n=="object")return Array.isArray(n)?n4(n):r4(n);if(typeof n=="string")return i4(n);throw new Error("Expected function, string, or object as test")};function n4(n){const e=[];let t=-1;for(;++t":""))+")"})}return h;function h(){let d=rh,p,m,y;if((!e||o(a,c,u[u.length-1]||void 0))&&(d=a4(t(a,u)),d[0]===Ys))return d;if("children"in a&&a.children){const g=a;if(g.children&&d[0]!==Gs)for(m=(r?g.children.length:-1)+s,y=u.concat(g);m>-1&&m",...a.current()})),c+=a.move(">")):(l=t.enter("destinationRaw"),c+=a.move(t.safe(n.url,{before:c,after:n.title?" ":")",...a.current()}))),l(),n.title&&(l=t.enter(`title${o}`),c+=a.move(" "+i),c+=a.move(t.safe(n.title,{before:c,after:i,...a.current()})),c+=a.move(i),l()),c+=a.move(")"),s(),c}function f4(){return"!"}ah.peek=h4;function ah(n,e,t,r){const i=n.referenceType,o=t.enter("imageReference");let s=t.enter("label");const l=t.createTracker(r);let a=l.move("![");const c=t.safe(n.alt,{before:a,after:"]",...l.current()});a+=l.move(c+"]["),s();const u=t.stack;t.stack=[],s=t.enter("reference");const f=t.safe(t.associationId(n),{before:a,after:"]",...l.current()});return s(),t.stack=u,o(),i==="full"||!c||c!==f?a+=l.move(f+"]"):i==="shortcut"?a=a.slice(0,-1):a+=l.move("]"),a}function h4(){return"!"}ch.peek=d4;function ch(n,e,t){let r=n.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o\u007F]/.test(n.url))}fh.peek=p4;function fh(n,e,t,r){const i=Vl(t),o=i==='"'?"Quote":"Apostrophe",s=t.createTracker(r);let l,a;if(uh(n,t)){const u=t.stack;t.stack=[],l=t.enter("autolink");let f=s.move("<");return f+=s.move(t.containerPhrasing(n,{before:f,after:">",...s.current()})),f+=s.move(">"),l(),t.stack=u,f}l=t.enter("link"),a=t.enter("label");let c=s.move("[");return c+=s.move(t.containerPhrasing(n,{before:c,after:"](",...s.current()})),c+=s.move("]("),a(),!n.url&&n.title||/[\0- \u007F]/.test(n.url)?(a=t.enter("destinationLiteral"),c+=s.move("<"),c+=s.move(t.safe(n.url,{before:c,after:">",...s.current()})),c+=s.move(">")):(a=t.enter("destinationRaw"),c+=s.move(t.safe(n.url,{before:c,after:n.title?" ":")",...s.current()}))),a(),n.title&&(a=t.enter(`title${o}`),c+=s.move(" "+i),c+=s.move(t.safe(n.title,{before:c,after:i,...s.current()})),c+=s.move(i),a()),c+=s.move(")"),l(),c}function p4(n,e,t){return uh(n,t)?"<":"["}hh.peek=m4;function hh(n,e,t,r){const i=n.referenceType,o=t.enter("linkReference");let s=t.enter("label");const l=t.createTracker(r);let a=l.move("[");const c=t.containerPhrasing(n,{before:a,after:"]",...l.current()});a+=l.move(c+"]["),s();const u=t.stack;t.stack=[],s=t.enter("reference");const f=t.safe(t.associationId(n),{before:a,after:"]",...l.current()});return s(),t.stack=u,o(),i==="full"||!c||c!==f?a+=l.move(f+"]"):i==="shortcut"?a=a.slice(0,-1):a+=l.move("]"),a}function m4(){return"["}function $l(n){const e=n.options.bullet||"*";if(e!=="*"&&e!=="+"&&e!=="-")throw new Error("Cannot serialize items with `"+e+"` for `options.bullet`, expected `*`, `+`, or `-`");return e}function g4(n){const e=$l(n),t=n.options.bulletOther;if(!t)return e==="*"?"-":"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(t===e)throw new Error("Expected `bullet` (`"+e+"`) and `bulletOther` (`"+t+"`) to be different");return t}function y4(n){const e=n.options.bulletOrdered||".";if(e!=="."&&e!==")")throw new Error("Cannot serialize items with `"+e+"` for `options.bulletOrdered`, expected `.` or `)`");return e}function dh(n){const e=n.options.rule||"*";if(e!=="*"&&e!=="-"&&e!=="_")throw new Error("Cannot serialize rules with `"+e+"` for `options.rule`, expected `*`, `-`, or `_`");return e}function b4(n,e,t,r){const i=t.enter("list"),o=t.bulletCurrent;let s=n.ordered?y4(t):$l(t);const l=n.ordered?s==="."?")":".":g4(t);let a=e&&t.bulletLastUsed?s===t.bulletLastUsed:!1;if(!n.ordered){const u=n.children?n.children[0]:void 0;if((s==="*"||s==="-")&&u&&(!u.children||!u.children[0])&&t.stack[t.stack.length-1]==="list"&&t.stack[t.stack.length-2]==="listItem"&&t.stack[t.stack.length-3]==="list"&&t.stack[t.stack.length-4]==="listItem"&&t.indexStack[t.indexStack.length-1]===0&&t.indexStack[t.indexStack.length-2]===0&&t.indexStack[t.indexStack.length-3]===0&&(a=!0),dh(t)===s&&u){let f=-1;for(;++f-1?e.start:1)+(t.options.incrementListMarker===!1?0:e.children.indexOf(n))+o);let s=o.length+1;(i==="tab"||i==="mixed"&&(e&&e.type==="list"&&e.spread||n.spread))&&(s=Math.ceil(s/4)*4);const l=t.createTracker(r);l.move(o+" ".repeat(s-o.length)),l.shift(s);const a=t.enter("listItem"),c=t.indentLines(t.containerFlow(n,l.current()),u);return a(),c;function u(f,h,d){return h?(d?"":" ".repeat(s))+f:(d?o:o+" ".repeat(s-o.length))+f}}function k4(n,e,t,r){const i=t.enter("paragraph"),o=t.enter("phrasing"),s=t.containerPhrasing(n,r);return o(),i(),s}const S4=Oo(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function v4(n,e,t,r){return(n.children.some(function(s){return S4(s)})?t.containerPhrasing:t.containerFlow).call(t,n,r)}function C4(n){const e=n.options.strong||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize strong with `"+e+"` for `options.strong`, expected `*`, or `_`");return e}ph.peek=A4;function ph(n,e,t,r){const i=C4(t),o=t.enter("strong"),s=t.createTracker(r);let l=s.move(i+i);return l+=s.move(t.containerPhrasing(n,{before:l,after:i,...s.current()})),l+=s.move(i+i),o(),l}function A4(n,e,t){return t.options.strong||"*"}function O4(n,e,t,r){return t.safe(n.value,r)}function M4(n){const e=n.options.ruleRepetition||3;if(e<3)throw new Error("Cannot serialize rules with repetition `"+e+"` for `options.ruleRepetition`, expected `3` or more");return e}function E4(n,e,t){const r=(dh(t)+(t.options.ruleSpaces?" ":"")).repeat(M4(t));return t.options.ruleSpaces?r.slice(0,-1):r}const jl={blockquote:Jy,break:pc,code:Xy,definition:Zy,emphasis:nh,hardBreak:pc,heading:c4,html:sh,image:lh,imageReference:ah,inlineCode:ch,link:fh,linkReference:hh,list:b4,listItem:x4,paragraph:k4,root:v4,strong:ph,text:O4,thematicBreak:E4},_4=[T4];function T4(n,e,t,r){if(e.type==="code"&&Ks(e,r)&&(n.type==="list"||n.type===e.type&&Ks(n,r)))return!1;if("spread"in t&&typeof t.spread=="boolean")return n.type==="paragraph"&&(n.type===e.type||e.type==="definition"||e.type==="heading"&&oh(e,r))?void 0:t.spread?1:0}const hn=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],N4=[{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"\r",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:` `,inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"!",after:"\\[",inConstruct:"phrasing",notInConstruct:hn},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:`(?:[\r ]|$)`},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:hn},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:`(?:[ \r *])`},{character:"*",inConstruct:"phrasing",notInConstruct:hn},{atBreak:!0,character:"+",after:`(?:[ \r ])`},{atBreak:!0,character:"-",after:`(?:[ \r -])`},{atBreak:!0,before:"\\d+",character:".",after:`(?:[ \r ]|$)`},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:hn},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:hn},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:hn},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:hn},{atBreak:!0,character:"~"}];function D4(n){return n.label||!n.identifier?n.label||"":Xf(n.identifier)}function I4(n){if(!n._compiled){const e=(n.atBreak?"[\\r\\n][\\t ]*":"")+(n.before?"(?:"+n.before+")":"");n._compiled=new RegExp((e?"("+e+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(n.character)?"\\":"")+n.character+(n.after?"(?:"+n.after+")":""),"g")}return n._compiled}function R4(n,e,t){const r=e.indexStack,i=n.children||[],o=[];let s=-1,l=t.before;r.push(-1);let a=e.createTracker(t);for(;++s0&&(l==="\r"||l===` `)&&c.type==="html"&&(o[o.length-1]=o[o.length-1].replace(/(\r?\n|\r)$/," "),l=" ",a=e.createTracker(t),a.move(o.join(""))),o.push(a.move(e.handle(c,n,e,{...a.current(),before:l,after:u}))),l=o[o.length-1].slice(-1)}return r.pop(),o.join("")}function z4(n,e,t){const r=e.indexStack,i=n.children||[],o=e.createTracker(t),s=[];let l=-1;for(r.push(-1);++l `}return` `}const P4=/\r?\n|\r/g;function L4(n,e){const t=[];let r=0,i=0,o;for(;o=P4.exec(n);)s(n.slice(r,o.index)),t.push(o[0]),r=o.index+o[0].length,i++;return s(n.slice(r)),t.join("");function s(l){t.push(e(l,i,!l))}}function B4(n,e,t){const r=(t.before||"")+(e||"")+(t.after||""),i=[],o=[],s={};let l=-1;for(;++l=c||u+1"u"||$i.call(e,i)},kc=function(e,t){yc&&t.name==="__proto__"?yc(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Sc=function(e,t){if(t==="__proto__")if($i.call(e,t)){if(bc)return bc(e,t).value}else return;return e[t]},Y4=function n(){var e,t,r,i,o,s,l=arguments[0],a=1,c=arguments.length,u=!1;for(typeof l=="boolean"&&(u=l,l=arguments[1]||{},a=2),(l==null||typeof l!="object"&&typeof l!="function")&&(l={});as.length;let a;l&&s.push(i);try{a=n.apply(this,s)}catch(c){const u=c;if(l&&t)throw u;return i(u)}l||(a&&a.then&&typeof a.then=="function"?a.then(o,i):a instanceof Error?i(a):o(a))}function i(s,...l){t||(t=!0,e(s,...l))}function o(s){i(null,s)}}class Ve extends Error{constructor(e,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let i="",o={},s=!1;if(t&&("line"in t&&"column"in t?o={place:t}:"start"in t&&"end"in t?o={place:t}:"type"in t?o={ancestors:[t],place:t.position}:o={...t}),typeof e=="string"?i=e:!o.cause&&e&&(s=!0,i=e.message,o.cause=e),!o.ruleId&&!o.source&&typeof r=="string"){const a=r.indexOf(":");a===-1?o.ruleId=r:(o.source=r.slice(0,a),o.ruleId=r.slice(a+1))}if(!o.place&&o.ancestors&&o.ancestors){const a=o.ancestors[o.ancestors.length-1];a&&(o.place=a.position)}const l=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=l?l.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=l?l.line:void 0,this.name=Fr(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=s&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}Ve.prototype.file="";Ve.prototype.name="";Ve.prototype.reason="";Ve.prototype.message="";Ve.prototype.stack="";Ve.prototype.column=void 0;Ve.prototype.line=void 0;Ve.prototype.ancestors=void 0;Ve.prototype.cause=void 0;Ve.prototype.fatal=void 0;Ve.prototype.place=void 0;Ve.prototype.ruleId=void 0;Ve.prototype.source=void 0;const bt={basename:Q4,dirname:Z4,extname:eb,join:tb,sep:"/"};function Q4(n,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');ii(n);let t=0,r=-1,i=n.length,o;if(e===void 0||e.length===0||e.length>n.length){for(;i--;)if(n.codePointAt(i)===47){if(o){t=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":n.slice(t,r)}if(e===n)return"";let s=-1,l=e.length-1;for(;i--;)if(n.codePointAt(i)===47){if(o){t=i+1;break}}else s<0&&(o=!0,s=i+1),l>-1&&(n.codePointAt(i)===e.codePointAt(l--)?l<0&&(r=i):(l=-1,r=s));return t===r?r=s:r<0&&(r=n.length),n.slice(t,r)}function Z4(n){if(ii(n),n.length===0)return".";let e=-1,t=n.length,r;for(;--t;)if(n.codePointAt(t)===47){if(r){e=t;break}}else r||(r=!0);return e<0?n.codePointAt(0)===47?"/":".":e===1&&n.codePointAt(0)===47?"//":n.slice(0,e)}function eb(n){ii(n);let e=n.length,t=-1,r=0,i=-1,o=0,s;for(;e--;){const l=n.codePointAt(e);if(l===47){if(s){r=e+1;break}continue}t<0&&(s=!0,t=e+1),l===46?i<0?i=e:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||t<0||o===0||o===1&&i===t-1&&i===r+1?"":n.slice(i,t)}function tb(...n){let e=-1,t;for(;++e0&&n.codePointAt(n.length-1)===47&&(t+="/"),e?"/"+t:t}function rb(n,e){let t="",r=0,i=-1,o=0,s=-1,l,a;for(;++s<=n.length;){if(s2){if(a=t.lastIndexOf("/"),a!==t.length-1){a<0?(t="",r=0):(t=t.slice(0,a),r=t.length-1-t.lastIndexOf("/")),i=s,o=0;continue}}else if(t.length>0){t="",r=0,i=s,o=0;continue}}e&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+n.slice(i+1,s):t=n.slice(i+1,s),r=s-i-1;i=s,o=0}else l===46&&o>-1?o++:o=-1}return t}function ii(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}const ib={cwd:ob};function ob(){return"/"}function Qs(n){return!!(n!==null&&typeof n=="object"&&"href"in n&&n.href&&"protocol"in n&&n.protocol&&n.auth===void 0)}function sb(n){if(typeof n=="string")n=new URL(n);else if(!Qs(n)){const e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+n+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(n.protocol!=="file:"){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return lb(n)}function lb(n){if(n.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const e=n.pathname;let t=-1;for(;++t0){let[d,...p]=u;const m=r[h][1];Xs(m)&&Xs(d)&&(d=Yo(!0,m,d)),r[h]=[c,d,...p]}}}}const Sv=new ql().freeze();function Zo(n,e){if(typeof e!="function")throw new TypeError("Cannot `"+n+"` without `parser`")}function es(n,e){if(typeof e!="function")throw new TypeError("Cannot `"+n+"` without `compiler`")}function ts(n,e){if(e)throw new Error("Cannot call `"+n+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Cc(n){if(!Xs(n)||typeof n.type!="string")throw new TypeError("Expected node, got `"+n+"`")}function Ac(n,e,t){if(!t)throw new Error("`"+n+"` finished async. Use `"+e+"` instead")}function Oi(n){return hb(n)?n:new ab(n)}function hb(n){return!!(n&&typeof n=="object"&&"message"in n&&"messages"in n)}function db(n){return typeof n=="string"||pb(n)}function pb(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const gh=65535,yh=Math.pow(2,16);function mb(n,e){return n+e*yh}function Oc(n){return n&gh}function gb(n){return(n-(n&gh))/yh}const bh=1,wh=2,ji=4,xh=8;class Zs{constructor(e,t,r){this.pos=e,this.delInfo=t,this.recover=r}get deleted(){return(this.delInfo&xh)>0}get deletedBefore(){return(this.delInfo&(bh|ji))>0}get deletedAfter(){return(this.delInfo&(wh|ji))>0}get deletedAcross(){return(this.delInfo&ji)>0}}class qe{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&qe.empty)return qe.empty}recover(e){let t=0,r=Oc(e);if(!this.inverted)for(let i=0;ie)break;let c=this.ranges[l+o],u=this.ranges[l+s],f=a+c;if(e<=f){let h=c?e==a?-1:e==f?1:t:t,d=a+i+(h<0?0:u);if(r)return d;let p=e==(t<0?a:f)?null:mb(l/3,e-a),m=e==a?wh:e==f?bh:ji;return(t<0?e!=a:e!=f)&&(m|=xh),new Zs(d,m,p)}i+=u-c}return r?e+i:new Zs(e+i,0,null)}touches(e,t){let r=0,i=Oc(t),o=this.inverted?2:1,s=this.inverted?1:2;for(let l=0;le)break;let c=this.ranges[l+o],u=a+c;if(e<=u&&l==i*3)return!0;r+=this.ranges[l+s]-c}return!1}forEach(e){let t=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,o=0;i=0;t--){let i=e.getMirror(t);this.appendMap(e.maps[t].invert(),i!=null&&i>t?r-i-1:void 0)}}invert(){let e=new Jn;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let r=this.from;ro&&a!s.isAtom||!l.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),i),t.openStart,t.openEnd);return ae.fromReplace(e,this.from,this.to,o)}invert(){return new xt(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new Gt(t.pos,r.pos,this.mark)}merge(e){return e instanceof Gt&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Gt(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Gt(t.from,t.to,e.markFromJSON(t.mark))}}Se.jsonID("addMark",Gt);class xt extends Se{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=new R(Wl(t.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),t.openStart,t.openEnd);return ae.fromReplace(e,this.from,this.to,r)}invert(){return new Gt(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new xt(t.pos,r.pos,this.mark)}merge(e){return e instanceof xt&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new xt(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new xt(t.from,t.to,e.markFromJSON(t.mark))}}Se.jsonID("removeMark",xt);class Xt extends Se{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return ae.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return ae.fromReplace(e,this.pos,this.pos+1,new R(_.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let r=this.mark.addToSet(t.marks);if(r.length==t.marks.length){for(let i=0;ir.pos?null:new ke(t.pos,r.pos,i,o,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new ke(t.from,t.to,t.gapFrom,t.gapTo,R.fromJSON(e,t.slice),t.insert,!!t.structure)}}Se.jsonID("replaceAround",ke);function el(n,e,t){let r=n.resolve(e),i=t-e,o=r.depth;for(;i>0&&o>0&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0){let s=r.node(o).maybeChild(r.indexAfter(o));for(;i>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,i--}}return!1}function yb(n,e,t,r){let i=[],o=[],s,l;n.doc.nodesBetween(e,t,(a,c,u)=>{if(!a.isInline)return;let f=a.marks;if(!r.isInSet(f)&&u.type.allowsMarkType(r.type)){let h=Math.max(c,e),d=Math.min(c+a.nodeSize,t),p=r.addToSet(f);for(let m=0;mn.step(a)),o.forEach(a=>n.step(a))}function bb(n,e,t,r){let i=[],o=0;n.doc.nodesBetween(e,t,(s,l)=>{if(!s.isInline)return;o++;let a=null;if(r instanceof vo){let c=s.marks,u;for(;u=r.isInSet(c);)(a||(a=[])).push(u),c=u.removeFromSet(c)}else r?r.isInSet(s.marks)&&(a=[r]):a=s.marks;if(a&&a.length){let c=Math.min(l+s.nodeSize,t);for(let u=0;un.step(new xt(s.from,s.to,s.style)))}function kh(n,e,t,r=t.contentMatch,i=!0){let o=n.doc.nodeAt(e),s=[],l=e+1;for(let a=0;a=0;a--)n.step(s[a])}function wb(n,e,t){return(e==0||n.canReplace(e,n.childCount))&&(t==n.childCount||n.canReplace(0,t))}function Eo(n){let t=n.parent.content.cutByIndex(n.startIndex,n.endIndex);for(let r=n.depth;;--r){let i=n.$from.node(r),o=n.$from.index(r),s=n.$to.indexAfter(r);if(rt;p--)m||r.index(p)>0?(m=!0,u=_.from(r.node(p).copy(u)),f++):a--;let h=_.empty,d=0;for(let p=o,m=!1;p>t;p--)m||i.after(p+1)=0;s--){if(r.size){let l=t[s].type.contentMatch.matchFragment(r);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=_.from(t[s].type.create(t[s].attrs,r))}let i=e.start,o=e.end;n.step(new ke(i,o,i,o,new R(r,0,0),t.length,!0))}function Cb(n,e,t,r,i){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let o=n.steps.length;n.doc.nodesBetween(e,t,(s,l)=>{let a=typeof i=="function"?i(s):i;if(s.isTextblock&&!s.hasMarkup(r,a)&&Mb(n.doc,n.mapping.slice(o).map(l),r)){let c=null;if(r.schema.linebreakReplacement){let d=r.whitespace=="pre",p=!!r.contentMatch.matchType(r.schema.linebreakReplacement);d&&!p?c=!1:!d&&p&&(c=!0)}c===!1&&Ob(n,s,l,o),kh(n,n.mapping.slice(o).map(l,1),r,void 0,c===null);let u=n.mapping.slice(o),f=u.map(l,1),h=u.map(l+s.nodeSize,1);return n.step(new ke(f,h,f+1,h-1,new R(_.from(r.create(a,null,s.marks)),0,0),1,!0)),c===!0&&Ab(n,s,l,o),!1}})}function Ab(n,e,t,r){e.forEach((i,o)=>{if(i.isText){let s,l=/\r?\n|\r/g;for(;s=l.exec(i.text);){let a=n.mapping.slice(r).map(t+1+o+s.index);n.replaceWith(a,a+1,e.type.schema.linebreakReplacement.create())}}})}function Ob(n,e,t,r){e.forEach((i,o)=>{if(i.type==i.type.schema.linebreakReplacement){let s=n.mapping.slice(r).map(t+1+o);n.replaceWith(s,s+1,e.type.schema.text(` `))}})}function Mb(n,e,t){let r=n.resolve(e),i=r.index();return r.parent.canReplaceWith(i,i+1,t)}function Eb(n,e,t,r,i){let o=n.doc.nodeAt(e);if(!o)throw new RangeError("No node at given position");t||(t=o.type);let s=t.create(r,null,i||o.marks);if(o.isLeaf)return n.replaceWith(e,e+o.nodeSize,s);if(!t.validContent(o.content))throw new RangeError("Invalid content for node type "+t.name);n.step(new ke(e,e+o.nodeSize,e+1,e+o.nodeSize-1,new R(_.from(s),0,0),1,!0))}function Pr(n,e,t=1,r){let i=n.resolve(e),o=i.depth-t,s=r&&r[r.length-1]||i.parent;if(o<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!s.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let c=i.depth-1,u=t-2;c>o;c--,u--){let f=i.node(c),h=i.index(c);if(f.type.spec.isolating)return!1;let d=f.content.cutByIndex(h,f.childCount),p=r&&r[u+1];p&&(d=d.replaceChild(0,p.type.create(p.attrs)));let m=r&&r[u]||f;if(!f.canReplace(h+1,f.childCount)||!m.type.validContent(d))return!1}let l=i.indexAfter(o),a=r&&r[0];return i.node(o).canReplaceWith(l,l,a?a.type:i.node(o+1).type)}function _b(n,e,t=1,r){let i=n.doc.resolve(e),o=_.empty,s=_.empty;for(let l=i.depth,a=i.depth-t,c=t-1;l>a;l--,c--){o=_.from(i.node(l).copy(o));let u=r&&r[c];s=_.from(u?u.type.create(u.attrs,s):i.node(l).copy(s))}n.step(new we(e,e,new R(o.append(s),t,t),!0))}function _o(n,e){let t=n.resolve(e),r=t.index();return Tb(t.nodeBefore,t.nodeAfter)&&t.parent.canReplace(r,r+1)}function Tb(n,e){return!!(n&&e&&!n.isLeaf&&n.canAppend(e))}function Nb(n,e,t){let r=new we(e-t,e+t,R.empty,!0);n.step(r)}function Db(n,e,t){let r=n.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),t))return e;if(r.parentOffset==0)for(let i=r.depth-1;i>=0;i--){let o=r.index(i);if(r.node(i).canReplaceWith(o,o,t))return r.before(i+1);if(o>0)return null}if(r.parentOffset==r.parent.content.size)for(let i=r.depth-1;i>=0;i--){let o=r.indexAfter(i);if(r.node(i).canReplaceWith(o,o,t))return r.after(i+1);if(o=0;s--){let l=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,a=r.index(s)+(l>0?1:0),c=r.node(s),u=!1;if(o==1)u=c.canReplace(a,a,i);else{let f=c.contentMatchAt(a).findWrapping(i.firstChild.type);u=f&&c.canReplaceWith(a,a,f[0])}if(u)return l==0?r.pos:l<0?r.before(s+1):r.after(s+1)}return null}function Ul(n,e,t=e,r=R.empty){if(e==t&&!r.size)return null;let i=n.resolve(e),o=n.resolve(t);return vh(i,o,r)?new we(e,t,r):new Rb(i,o,r).fit()}function vh(n,e,t){return!t.openStart&&!t.openEnd&&n.start()==e.start()&&n.parent.canReplace(n.index(),e.index(),t.content)}class Rb{constructor(e,t,r){this.$from=e,this.$to=t,this.unplaced=r,this.frontier=[],this.placed=_.empty;for(let i=0;i<=e.depth;i++){let o=e.node(i);this.frontier.push({type:o.type,match:o.contentMatchAt(e.indexAfter(i))})}for(let i=e.depth;i>0;i--)this.placed=_.from(e.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,r=this.$from,i=this.close(e<0?this.$to:r.doc.resolve(e));if(!i)return null;let o=this.placed,s=r.depth,l=i.depth;for(;s&&l&&o.childCount==1;)o=o.firstChild.content,s--,l--;let a=new R(o,s,l);return e>-1?new ke(r.pos,e,this.$to.pos,this.$to.end(),a,t):a.size||r.pos!=this.$to.pos?new we(r.pos,i.pos,a):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,r=0,i=this.unplaced.openEnd;r1&&(i=0),o.type.spec.isolating&&i<=r){e=r;break}t=o.content}for(let t=1;t<=2;t++)for(let r=t==1?e:this.unplaced.openStart;r>=0;r--){let i,o=null;r?(o=rs(this.unplaced.content,r-1).firstChild,i=o.content):i=this.unplaced.content;let s=i.firstChild;for(let l=this.depth;l>=0;l--){let{type:a,match:c}=this.frontier[l],u,f=null;if(t==1&&(s?c.matchType(s.type)||(f=c.fillBefore(_.from(s),!1)):o&&a.compatibleContent(o.type)))return{sliceDepth:r,frontierDepth:l,parent:o,inject:f};if(t==2&&s&&(u=c.findWrapping(s.type)))return{sliceDepth:r,frontierDepth:l,parent:o,wrap:u};if(o&&c.matchType(o.type))break}}}openMore(){let{content:e,openStart:t,openEnd:r}=this.unplaced,i=rs(e,t);return!i.childCount||i.firstChild.isLeaf?!1:(this.unplaced=new R(e,t+1,Math.max(r,i.size+t>=e.size-r?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:r}=this.unplaced,i=rs(e,t);if(i.childCount<=1&&t>0){let o=e.size-t<=t+i.size;this.unplaced=new R(vr(e,t-1,1),t-1,o?t-1:r)}else this.unplaced=new R(vr(e,t,1),t,r)}placeNodes({sliceDepth:e,frontierDepth:t,parent:r,inject:i,wrap:o}){for(;this.depth>t;)this.closeFrontierNode();if(o)for(let m=0;m1||a==0||m.content.size)&&(f=y,u.push(Ch(m.mark(h.allowedMarks(m.marks)),c==1?a:0,c==l.childCount?d:-1)))}let p=c==l.childCount;p||(d=-1),this.placed=Cr(this.placed,t,_.from(u)),this.frontier[t].match=f,p&&d<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,y=l;m1&&i==this.$to.end(--r);)++i;return i}findCloseLevel(e){e:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:r,type:i}=this.frontier[t],o=t=0;l--){let{match:a,type:c}=this.frontier[l],u=is(e,l,c,a,!0);if(!u||u.childCount)continue e}return{depth:t,fit:s,move:o?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=Cr(this.placed,t.depth,t.fit)),e=t.move;for(let r=t.depth+1;r<=e.depth;r++){let i=e.node(r),o=i.type.contentMatch.fillBefore(i.content,!0,e.index(r));this.openFrontierNode(i.type,i.attrs,o)}return e}openFrontierNode(e,t=null,r){let i=this.frontier[this.depth];i.match=i.match.matchType(e),this.placed=Cr(this.placed,this.depth,_.from(e.create(t,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(_.empty,!0);t.childCount&&(this.placed=Cr(this.placed,this.frontier.length,t))}}function vr(n,e,t){return e==0?n.cutByIndex(t,n.childCount):n.replaceChild(0,n.firstChild.copy(vr(n.firstChild.content,e-1,t)))}function Cr(n,e,t){return e==0?n.append(t):n.replaceChild(n.childCount-1,n.lastChild.copy(Cr(n.lastChild.content,e-1,t)))}function rs(n,e){for(let t=0;t1&&(r=r.replaceChild(0,Ch(r.firstChild,e-1,r.childCount==1?t-1:0))),e>0&&(r=n.type.contentMatch.fillBefore(r).append(r),t<=0&&(r=r.append(n.type.contentMatch.matchFragment(r).fillBefore(_.empty,!0)))),n.copy(r)}function is(n,e,t,r,i){let o=n.node(e),s=i?n.indexAfter(e):n.index(e);if(s==o.childCount&&!t.compatibleContent(o.type))return null;let l=r.fillBefore(o.content,!0,s);return l&&!zb(t,o.content,s)?l:null}function zb(n,e,t){for(let r=t;r0;h--,d--){let p=i.node(h).type.spec;if(p.defining||p.definingAsContext||p.isolating)break;s.indexOf(h)>-1?l=h:i.before(h)==d&&s.splice(1,0,-h)}let a=s.indexOf(l),c=[],u=r.openStart;for(let h=r.content,d=0;;d++){let p=h.firstChild;if(c.push(p),d==r.openStart)break;h=p.content}for(let h=u-1;h>=0;h--){let d=c[h],p=Fb(d.type);if(p&&!d.sameMarkup(i.node(Math.abs(l)-1)))u=h;else if(p||!d.type.isTextblock)break}for(let h=r.openStart;h>=0;h--){let d=(h+u+1)%(r.openStart+1),p=c[d];if(p)for(let m=0;m=0&&(n.replace(e,t,r),!(n.steps.length>f));h--){let d=s[h];d<0||(e=i.before(d),t=o.after(d))}}function Ah(n,e,t,r,i){if(er){let o=i.contentMatchAt(0),s=o.fillBefore(n).append(n);n=s.append(o.matchFragment(s).fillBefore(_.empty,!0))}return n}function Lb(n,e,t,r){if(!r.isInline&&e==t&&n.doc.resolve(e).parent.content.size){let i=Db(n.doc,e,r.type);i!=null&&(e=t=i)}n.replaceRange(e,t,new R(_.from(r),0,0))}function Bb(n,e,t){let r=n.doc.resolve(e),i=n.doc.resolve(t),o=Oh(r,i);for(let s=0;s0&&(a||r.node(l-1).canReplace(r.index(l-1),i.indexAfter(l-1))))return n.delete(r.before(l),i.after(l))}for(let s=1;s<=r.depth&&s<=i.depth;s++)if(e-r.start(s)==r.depth-s&&t>r.end(s)&&i.end(s)-t!=i.depth-s)return n.delete(r.before(s),t);n.delete(e,t)}function Oh(n,e){let t=[],r=Math.min(n.depth,e.depth);for(let i=r;i>=0;i--){let o=n.start(i);if(oe.pos+(e.depth-i)||n.node(i).type.spec.isolating||e.node(i).type.spec.isolating)break;(o==e.start(i)||i==n.depth&&i==e.depth&&n.parent.inlineContent&&e.parent.inlineContent&&i&&e.start(i-1)==o-1)&&t.push(i)}return t}class Kn extends Se{constructor(e,t,r){super(),this.pos=e,this.attr=t,this.value=r}apply(e){let t=e.nodeAt(this.pos);if(!t)return ae.fail("No node at attribute step's position");let r=Object.create(null);for(let o in t.attrs)r[o]=t.attrs[o];r[this.attr]=this.value;let i=t.type.create(r,null,t.marks);return ae.fromReplace(e,this.pos,this.pos+1,new R(_.from(i),0,t.isLeaf?0:1))}getMap(){return qe.empty}invert(e){return new Kn(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Kn(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.pos!="number"||typeof t.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new Kn(t.pos,t.attr,t.value)}}Se.jsonID("attr",Kn);class Yr extends Se{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let i in e.attrs)t[i]=e.attrs[i];t[this.attr]=this.value;let r=e.type.create(t,e.content,e.marks);return ae.ok(r)}getMap(){return qe.empty}invert(e){return new Yr(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Yr(t.attr,t.value)}}Se.jsonID("docAttr",Yr);let or=class extends Error{};or=function n(e){let t=Error.call(this,e);return t.__proto__=n.prototype,t};or.prototype=Object.create(Error.prototype);or.prototype.constructor=or;or.prototype.name="TransformError";class Mh{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Jn}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new or(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,r=R.empty){let i=Ul(this.doc,e,t,r);return i&&this.step(i),this}replaceWith(e,t,r){return this.replace(e,t,new R(_.from(r),0,0))}delete(e,t){return this.replace(e,t,R.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,r){return Pb(this,e,t,r),this}replaceRangeWith(e,t,r){return Lb(this,e,t,r),this}deleteRange(e,t){return Bb(this,e,t),this}lift(e,t){return xb(this,e,t),this}join(e,t=1){return Nb(this,e,t),this}wrap(e,t){return vb(this,e,t),this}setBlockType(e,t=e,r,i=null){return Cb(this,e,t,r,i),this}setNodeMarkup(e,t,r=null,i){return Eb(this,e,t,r,i),this}setNodeAttribute(e,t,r){return this.step(new Kn(e,t,r)),this}setDocAttribute(e,t){return this.step(new Yr(e,t)),this}addNodeMark(e,t){return this.step(new Xt(e,t)),this}removeNodeMark(e,t){if(!(t instanceof ee)){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(t=t.isInSet(r.marks),!t)return this}return this.step(new ir(e,t)),this}split(e,t=1,r){return _b(this,e,t,r),this}addMark(e,t,r){return yb(this,e,t,r),this}removeMark(e,t,r){return bb(this,e,t,r),this}clearIncompatible(e,t,r){return kh(this,e,t,r),this}}const ss=Object.create(null);class q{constructor(e,t,r){this.$anchor=e,this.$head=t,this.ranges=r||[new so(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t=0;o--){let s=t<0?jn(e.node(0),e.node(o),e.before(o+1),e.index(o),t,r):jn(e.node(0),e.node(o),e.after(o+1),e.index(o)+1,t,r);if(s)return s}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new Ke(e.node(0))}static atStart(e){return jn(e,e,0,0,1)||new Ke(e)}static atEnd(e){return jn(e,e,e.content.size,e.childCount,-1)||new Ke(e)}static fromJSON(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=ss[t.type];if(!r)throw new RangeError(`No selection type ${t.type} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in ss)throw new RangeError("Duplicate use of selection JSON ID "+e);return ss[e]=t,t.prototype.jsonID=e,t}getBookmark(){return X.between(this.$anchor,this.$head).getBookmark()}}q.prototype.visible=!0;class so{constructor(e,t){this.$from=e,this.$to=t}}let Ec=!1;function _c(n){!Ec&&!n.parent.inlineContent&&(Ec=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+n.parent.type.name+")"))}class X extends q{constructor(e,t=e){_c(e),_c(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let r=e.resolve(t.map(this.head));if(!r.parent.inlineContent)return q.near(r);let i=e.resolve(t.map(this.anchor));return new X(i.parent.inlineContent?i:r,r)}replace(e,t=R.empty){if(super.replace(e,t),t==R.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof X&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new To(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if(typeof t.anchor!="number"||typeof t.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new X(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,r=t){let i=e.resolve(t);return new this(i,r==t?i:e.resolve(r))}static between(e,t,r){let i=e.pos-t.pos;if((!r||i)&&(r=i>=0?1:-1),!t.parent.inlineContent){let o=q.findFrom(t,r,!0)||q.findFrom(t,-r,!0);if(o)t=o.$head;else return q.near(t,r)}return e.parent.inlineContent||(i==0?e=t:(e=(q.findFrom(e,-r,!0)||q.findFrom(e,r,!0)).$anchor,e.pos0?0:1);i>0?s=0;s+=i){let l=e.child(s);if(l.isAtom){if(!o&&$.isSelectable(l))return $.create(n,t-(i<0?l.nodeSize:0))}else{let a=jn(n,l,t+i,i<0?l.childCount:0,i,o);if(a)return a}t+=l.nodeSize*i}return null}function Tc(n,e,t){let r=n.steps.length-1;if(r{s==null&&(s=u)}),n.setSelection(q.near(n.doc.resolve(s),t))}const Nc=1,Mi=2,Dc=4;class Hb extends Mh{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor0}setStoredMarks(e){return this.storedMarks=e,this.updated|=Mi,this}ensureMarks(e){return ee.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&Mi)>0}addStep(e,t){super.addStep(e,t),this.updated=this.updated&~Mi,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let r=this.selection;return t&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||ee.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,r){let i=this.doc.type.schema;if(t==null)return e?this.replaceSelectionWith(i.text(e),!0):this.deleteSelection();{if(r==null&&(r=t),r=r??t,!e)return this.deleteRange(t,r);let o=this.storedMarks;if(!o){let s=this.doc.resolve(t);o=r==t?s.marks():s.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(t,r,i.text(e,o)),this.selection.empty||this.setSelection(q.near(this.selection.$to)),this}}setMeta(e,t){return this.meta[typeof e=="string"?e:e.key]=t,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=Dc,this}get scrolledIntoView(){return(this.updated&Dc)>0}}function Ic(n,e){return!e||!n?n:n.bind(e)}class Ar{constructor(e,t,r){this.name=e,this.init=Ic(t.init,r),this.apply=Ic(t.apply,r)}}const $b=[new Ar("doc",{init(n){return n.doc||n.schema.topNodeType.createAndFill()},apply(n){return n.doc}}),new Ar("selection",{init(n,e){return n.selection||q.atStart(e.doc)},apply(n){return n.selection}}),new Ar("storedMarks",{init(n){return n.storedMarks||null},apply(n,e,t,r){return r.selection.$cursor?n.storedMarks:null}}),new Ar("scrollToSelection",{init(){return 0},apply(n,e){return n.scrolledIntoView?e+1:e}})];class ls{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=$b.slice(),t&&t.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new Ar(r.key,r.spec.state,r))})}}class Or{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let r=0;rr.toJSON())),e&&typeof e=="object")for(let r in e){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let i=e[r],o=i.spec.state;o&&o.toJSON&&(t[r]=o.toJSON.call(i,this[i.key]))}return t}static fromJSON(e,t,r){if(!t)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let i=new ls(e.schema,e.plugins),o=new Or(i);return i.fields.forEach(s=>{if(s.name=="doc")o.doc=An.fromJSON(e.schema,t.doc);else if(s.name=="selection")o.selection=q.fromJSON(o.doc,t.selection);else if(s.name=="storedMarks")t.storedMarks&&(o.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let l in r){let a=r[l],c=a.spec.state;if(a.key==s.name&&c&&c.fromJSON&&Object.prototype.hasOwnProperty.call(t,l)){o[s.name]=c.fromJSON.call(a,e,t[l],o);return}}o[s.name]=s.init(e,o)}}),o}}function Eh(n,e,t){for(let r in n){let i=n[r];i instanceof Function?i=i.bind(e):r=="handleDOMEvents"&&(i=Eh(i,e,{})),t[r]=i}return t}class oi{constructor(e){this.spec=e,this.props={},e.props&&Eh(e.props,this,this.props),this.key=e.key?e.key.key:_h("plugin")}getState(e){return e[this.key]}}const as=Object.create(null);function _h(n){return n in as?n+"$"+ ++as[n]:(as[n]=0,n+"$")}class hr{constructor(e="key"){this.key=_h(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}class cn{constructor(e,t,r={}){this.match=e,this.match=e,this.handler=typeof t=="string"?jb(t):t,this.undoable=r.undoable!==!1,this.inCode=r.inCode||!1}}function jb(n){return function(e,t,r,i){let o=n;if(t[1]){let s=t[0].lastIndexOf(t[1]);o+=t[0].slice(s+t[1].length),r+=s;let l=r-i;l>0&&(o=t[0].slice(s-l,s)+o,r=i)}return e.tr.insertText(o,r,i)}}const vv=(n,e)=>{let t=n.plugins;for(let r=0;r=0;a--)s.step(l.steps[a].invert(l.docs[a]));if(o.text){let a=s.doc.resolve(o.from).marks();s.replaceWith(o.from,o.to,n.schema.text(o.text,a))}else s.delete(o.from,o.to);e(s)}return!0}}return!1};new cn(/--$/,"—");new cn(/\.\.\.$/,"…");new cn(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"“");new cn(/"$/,"”");new cn(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"‘");new cn(/'$/,"’");function Cv(n,e,t=null,r){return new cn(n,(i,o,s,l)=>{let a=t instanceof Function?t(o):t,c=i.tr.delete(s,l),u=c.doc.resolve(s),f=u.blockRange(),h=f&&Sh(f,e,a);if(!h)return null;c.wrap(f,h);let d=c.doc.resolve(s-1).nodeBefore;return d&&d.type==e&&_o(c.doc,s-1)&&(!r||r(o,d))&&c.join(s-1),c})}function Av(n,e,t=null){return new cn(n,(r,i,o,s)=>{let l=r.doc.resolve(o),a=t instanceof Function?t(i):t;return l.node(-1).canReplaceWith(l.index(-1),l.indexAfter(-1),e)?r.tr.delete(o,s).setBlockType(o,o,e,a):null})}const Th=(n,e)=>n.selection.empty?!1:(e&&e(n.tr.deleteSelection().scrollIntoView()),!0);function qb(n,e){let{$cursor:t}=n.selection;return!t||(e?!e.endOfTextblock("backward",n):t.parentOffset>0)?null:t}const Wb=(n,e,t)=>{let r=qb(n,t);if(!r)return!1;let i=Nh(r);if(!i){let s=r.blockRange(),l=s&&Eo(s);return l==null?!1:(e&&e(n.tr.lift(s,l).scrollIntoView()),!0)}let o=i.nodeBefore;if(Ih(n,i,e,-1))return!0;if(r.parent.content.size==0&&(sr(o,"end")||$.isSelectable(o)))for(let s=r.depth;;s--){let l=Ul(n.doc,r.before(s),r.after(s),R.empty);if(l&&l.slice.size1)break}return o.isAtom&&i.depth==r.depth-1?(e&&e(n.tr.delete(i.pos-o.nodeSize,i.pos).scrollIntoView()),!0):!1};function sr(n,e,t=!1){for(let r=n;r;r=e=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(t&&r.childCount!=1)return!1}return!1}const Ub=(n,e,t)=>{let{$head:r,empty:i}=n.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(t?!t.endOfTextblock("backward",n):r.parentOffset>0)return!1;o=Nh(r)}let s=o&&o.nodeBefore;return!s||!$.isSelectable(s)?!1:(e&&e(n.tr.setSelection($.create(n.doc,o.pos-s.nodeSize)).scrollIntoView()),!0)};function Nh(n){if(!n.parent.type.spec.isolating)for(let e=n.depth-1;e>=0;e--){if(n.index(e)>0)return n.doc.resolve(n.before(e+1));if(n.node(e).type.spec.isolating)break}return null}function Jb(n,e){let{$cursor:t}=n.selection;return!t||(e?!e.endOfTextblock("forward",n):t.parentOffset{let r=Jb(n,t);if(!r)return!1;let i=Dh(r);if(!i)return!1;let o=i.nodeAfter;if(Ih(n,i,e,1))return!0;if(r.parent.content.size==0&&(sr(o,"start")||$.isSelectable(o))){let s=Ul(n.doc,r.before(),r.after(),R.empty);if(s&&s.slice.size{let{$head:r,empty:i}=n.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(t?!t.endOfTextblock("forward",n):r.parentOffset=0;e--){let t=n.node(e);if(n.index(e)+1{let{$head:t,$anchor:r}=n.selection;return!t.parent.type.spec.code||!t.sameParent(r)?!1:(e&&e(n.tr.insertText(` `).scrollIntoView()),!0)};function Kl(n){for(let e=0;e{let{$head:t,$anchor:r}=n.selection;if(!t.parent.type.spec.code||!t.sameParent(r))return!1;let i=t.node(-1),o=t.indexAfter(-1),s=Kl(i.contentMatchAt(o));if(!s||!i.canReplaceWith(o,o,s))return!1;if(e){let l=t.after(),a=n.tr.replaceWith(l,l,s.createAndFill());a.setSelection(q.near(a.doc.resolve(l),1)),e(a.scrollIntoView())}return!0},Qb=(n,e)=>{let t=n.selection,{$from:r,$to:i}=t;if(t instanceof Ke||r.parent.inlineContent||i.parent.inlineContent)return!1;let o=Kl(i.parent.contentMatchAt(i.indexAfter()));if(!o||!o.isTextblock)return!1;if(e){let s=(!r.parentOffset&&i.index(){let{$cursor:t}=n.selection;if(!t||t.parent.content.size)return!1;if(t.depth>1&&t.after()!=t.end(-1)){let o=t.before();if(Pr(n.doc,o))return e&&e(n.tr.split(o).scrollIntoView()),!0}let r=t.blockRange(),i=r&&Eo(r);return i==null?!1:(e&&e(n.tr.lift(r,i).scrollIntoView()),!0)};function ew(n){return(e,t)=>{let{$from:r,$to:i}=e.selection;if(e.selection instanceof $&&e.selection.node.isBlock)return!r.parentOffset||!Pr(e.doc,r.pos)?!1:(t&&t(e.tr.split(r.pos).scrollIntoView()),!0);if(!r.parent.isBlock)return!1;if(t){let o=i.parentOffset==i.parent.content.size,s=e.tr;(e.selection instanceof X||e.selection instanceof Ke)&&s.deleteSelection();let l=r.depth==0?null:Kl(r.node(-1).contentMatchAt(r.indexAfter(-1))),a=n&&n(i.parent,o,r),c=a?[a]:o&&l?[{type:l}]:void 0,u=Pr(s.doc,s.mapping.map(r.pos),1,c);if(!c&&!u&&Pr(s.doc,s.mapping.map(r.pos),1,l?[{type:l}]:void 0)&&(l&&(c=[{type:l}]),u=!0),u&&(s.split(s.mapping.map(r.pos),1,c),!o&&!r.parentOffset&&r.parent.type!=l)){let f=s.mapping.map(r.before()),h=s.doc.resolve(f);l&&r.node(-1).canReplaceWith(h.index(),h.index()+1,l)&&s.setNodeMarkup(s.mapping.map(r.before()),l)}t(s.scrollIntoView())}return!0}}const tw=ew(),nw=(n,e)=>(e&&e(n.tr.setSelection(new Ke(n.doc))),!0);function rw(n,e,t){let r=e.nodeBefore,i=e.nodeAfter,o=e.index();return!r||!i||!r.type.compatibleContent(i.type)?!1:!r.content.size&&e.parent.canReplace(o-1,o)?(t&&t(n.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(o,o+1)||!(i.isTextblock||_o(n.doc,e.pos))?!1:(t&&t(n.tr.clearIncompatible(e.pos,r.type,r.contentMatchAt(r.childCount)).join(e.pos).scrollIntoView()),!0)}function Ih(n,e,t,r){let i=e.nodeBefore,o=e.nodeAfter,s,l,a=i.type.spec.isolating||o.type.spec.isolating;if(!a&&rw(n,e,t))return!0;let c=!a&&e.parent.canReplace(e.index(),e.index()+1);if(c&&(s=(l=i.contentMatchAt(i.childCount)).findWrapping(o.type))&&l.matchType(s[0]||o.type).validEnd){if(t){let d=e.pos+o.nodeSize,p=_.empty;for(let g=s.length-1;g>=0;g--)p=_.from(s[g].create(null,p));p=_.from(i.copy(p));let m=n.tr.step(new ke(e.pos-1,d,e.pos,d,new R(p,1,0),s.length,!0)),y=d+2*s.length;_o(m.doc,y)&&m.join(y),t(m.scrollIntoView())}return!0}let u=o.type.spec.isolating||r>0&&a?null:q.findFrom(e,1),f=u&&u.$from.blockRange(u.$to),h=f&&Eo(f);if(h!=null&&h>=e.depth)return t&&t(n.tr.lift(f,h).scrollIntoView()),!0;if(c&&sr(o,"start",!0)&&sr(i,"end")){let d=i,p=[];for(;p.push(d),!d.isTextblock;)d=d.lastChild;let m=o,y=1;for(;!m.isTextblock;m=m.firstChild)y++;if(d.canReplace(d.childCount,d.childCount,m.content)){if(t){let g=_.empty;for(let x=p.length-1;x>=0;x--)g=_.from(p[x].copy(g));let v=n.tr.step(new ke(e.pos-p.length,e.pos+o.nodeSize,e.pos+y,e.pos+o.nodeSize-y,new R(g,p.length,0),0,!0));t(v.scrollIntoView())}return!0}}return!1}function Rh(n){return function(e,t){let r=e.selection,i=n<0?r.$from:r.$to,o=i.depth;for(;i.node(o).isInline;){if(!o)return!1;o--}return i.node(o).isTextblock?(t&&t(e.tr.setSelection(X.create(e.doc,n<0?i.start(o):i.end(o)))),!0):!1}}const iw=Rh(-1),ow=Rh(1);function Ov(n,e=null){return function(t,r){let{$from:i,$to:o}=t.selection,s=i.blockRange(o),l=s&&Sh(s,n,e);return l?(r&&r(t.tr.wrap(s,l).scrollIntoView()),!0):!1}}function Mv(n,e=null){return function(t,r){let i=!1;for(let o=0;o{if(i)return!1;if(!(!a.isTextblock||a.hasMarkup(n,e)))if(a.type==n)i=!0;else{let u=t.doc.resolve(c),f=u.index();i=u.parent.canReplaceWith(f,f+1,n)}})}if(!i)return!1;if(r){let o=t.tr;for(let s=0;s{if(l||!r&&a.isAtom&&a.isInline&&c>=o.pos&&c+a.nodeSize<=s.pos)return!1;l=a.inlineContent&&a.type.allowsMarkType(t)}),l)return!0}return!1}function lw(n){let e=[];for(let t=0;t{if(o.isAtom&&o.content.size&&o.isInline&&s>=r.pos&&s+o.nodeSize<=i.pos)return s+1>r.pos&&e.push(new so(r,r.doc.resolve(s+1))),r=r.doc.resolve(s+1+o.content.size),!1}),r.poso.doc.rangeHasMark(h.$from.pos,h.$to.pos,n)):u=!c.every(h=>{let d=!1;return f.doc.nodesBetween(h.$from.pos,h.$to.pos,(p,m,y)=>{if(d)return!1;d=!n.isInSet(p.marks)&&!!y&&y.type.allowsMarkType(n)&&!(p.isText&&/^\s*$/.test(p.textBetween(Math.max(0,h.$from.pos-m),Math.min(p.nodeSize,h.$to.pos-m))))}),!d});for(let h=0;h",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},cw=typeof navigator<"u"&&/Mac/.test(navigator.platform),uw=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var me=0;me<10;me++)on[48+me]=on[96+me]=String(me);for(var me=1;me<=24;me++)on[me+111]="F"+me;for(var me=65;me<=90;me++)on[me]=String.fromCharCode(me+32),lo[me]=String.fromCharCode(me);for(var us in on)lo.hasOwnProperty(us)||(lo[us]=on[us]);function fw(n){var e=cw&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||uw&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?lo:on)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}const hw=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function dw(n){let e=n.split(/-(?!$)/),t=e[e.length-1];t=="Space"&&(t=" ");let r,i,o,s;for(let l=0;l127)&&(o=on[r.keyCode])&&o!=i){let l=e[fs(o,r)];if(l&&l(t.state,t.dispatch,t))return!0}}return!1}}const ge=function(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e},Gr=function(n){let e=n.assignedSlot||n.parentNode;return e&&e.nodeType==11?e.host:e};let tl=null;const Nt=function(n,e,t){let r=tl||(tl=document.createRange());return r.setEnd(n,t??n.nodeValue.length),r.setStart(n,e||0),r},mw=function(){tl=null},Nn=function(n,e,t,r){return t&&(zc(n,e,t,r,-1)||zc(n,e,t,r,1))},gw=/^(img|br|input|textarea|hr)$/i;function zc(n,e,t,r,i){for(;;){if(n==t&&e==r)return!0;if(e==(i<0?0:Qe(n))){let o=n.parentNode;if(!o||o.nodeType!=1||si(n)||gw.test(n.nodeName)||n.contentEditable=="false")return!1;e=ge(n)+(i<0?0:1),n=o}else if(n.nodeType==1){if(n=n.childNodes[e+(i<0?-1:0)],n.contentEditable=="false")return!1;e=i<0?Qe(n):0}else return!1}}function Qe(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function yw(n,e){for(;;){if(n.nodeType==3&&e)return n;if(n.nodeType==1&&e>0){if(n.contentEditable=="false")return null;n=n.childNodes[e-1],e=Qe(n)}else if(n.parentNode&&!si(n))e=ge(n),n=n.parentNode;else return null}}function bw(n,e){for(;;){if(n.nodeType==3&&e2),Ge=lr||(Ct?/Mac/.test(Ct.platform):!1),Sw=Ct?/Win/.test(Ct.platform):!1,at=/Android \d/.test(un),li=!!Fc&&"webkitFontSmoothing"in Fc.documentElement.style,vw=li?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function Cw(n){let e=n.defaultView&&n.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:n.documentElement.clientWidth,top:0,bottom:n.documentElement.clientHeight}}function _t(n,e){return typeof n=="number"?n:n[e]}function Aw(n){let e=n.getBoundingClientRect(),t=e.width/n.offsetWidth||1,r=e.height/n.offsetHeight||1;return{left:e.left,right:e.left+n.clientWidth*t,top:e.top,bottom:e.top+n.clientHeight*r}}function Pc(n,e,t){let r=n.someProp("scrollThreshold")||0,i=n.someProp("scrollMargin")||5,o=n.dom.ownerDocument;for(let s=t||n.dom;s;s=Gr(s)){if(s.nodeType!=1)continue;let l=s,a=l==o.body,c=a?Cw(o):Aw(l),u=0,f=0;if(e.topc.bottom-_t(r,"bottom")&&(f=e.bottom-e.top>c.bottom-c.top?e.top+_t(i,"top")-c.top:e.bottom-c.bottom+_t(i,"bottom")),e.leftc.right-_t(r,"right")&&(u=e.right-c.right+_t(i,"right")),u||f)if(a)o.defaultView.scrollBy(u,f);else{let h=l.scrollLeft,d=l.scrollTop;f&&(l.scrollTop+=f),u&&(l.scrollLeft+=u);let p=l.scrollLeft-h,m=l.scrollTop-d;e={left:e.left-p,top:e.top-m,right:e.right-p,bottom:e.bottom-m}}if(a||/^(fixed|sticky)$/.test(getComputedStyle(s).position))break}}function Ow(n){let e=n.dom.getBoundingClientRect(),t=Math.max(0,e.top),r,i;for(let o=(e.left+e.right)/2,s=t+1;s=t-20){r=l,i=a.top;break}}return{refDOM:r,refTop:i,stack:Bh(n.dom)}}function Bh(n){let e=[],t=n.ownerDocument;for(let r=n;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),n!=t);r=Gr(r));return e}function Mw({refDOM:n,refTop:e,stack:t}){let r=n?n.getBoundingClientRect().top:0;Vh(t,r==0?0:r-e)}function Vh(n,e){for(let t=0;t=l){s=Math.max(p.bottom,s),l=Math.min(p.top,l);let m=p.left>e.left?p.left-e.left:p.right=(p.left+p.right)/2?1:0));continue}}else p.top>e.top&&!a&&p.left<=e.left&&p.right>=e.left&&(a=u,c={left:Math.max(p.left,Math.min(p.right,e.left)),top:p.top});!t&&(e.left>=p.right&&e.top>=p.top||e.left>=p.left&&e.top>=p.bottom)&&(o=f+1)}}return!t&&a&&(t=a,i=c,r=0),t&&t.nodeType==3?_w(t,i):!t||r&&t.nodeType==1?{node:n,offset:o}:Hh(t,i)}function _w(n,e){let t=n.nodeValue.length,r=document.createRange();for(let i=0;i=(o.left+o.right)/2?1:0)}}return{node:n,offset:0}}function Gl(n,e){return n.left>=e.left-1&&n.left<=e.right+1&&n.top>=e.top-1&&n.top<=e.bottom+1}function Tw(n,e){let t=n.parentNode;return t&&/^li$/i.test(t.nodeName)&&e.left(s.left+s.right)/2?1:-1}return n.docView.posFromDOM(r,i,o)}function Dw(n,e,t,r){let i=-1;for(let o=e,s=!1;o!=n.dom;){let l=n.docView.nearestDesc(o,!0);if(!l)return null;if(l.dom.nodeType==1&&(l.node.isBlock&&l.parent||!l.contentDOM)){let a=l.dom.getBoundingClientRect();if(l.node.isBlock&&l.parent&&(!s&&a.left>r.left||a.top>r.top?i=l.posBefore:(!s&&a.right-1?i:n.docView.posFromDOM(e,t,-1)}function $h(n,e,t){let r=n.childNodes.length;if(r&&t.tope.top&&i++}let c;li&&i&&r.nodeType==1&&(c=r.childNodes[i-1]).nodeType==1&&c.contentEditable=="false"&&c.getBoundingClientRect().top>=e.top&&i--,r==n.dom&&i==r.childNodes.length-1&&r.lastChild.nodeType==1&&e.top>r.lastChild.getBoundingClientRect().bottom?l=n.state.doc.content.size:(i==0||r.nodeType!=1||r.childNodes[i-1].nodeName!="BR")&&(l=Dw(n,r,i,e))}l==null&&(l=Nw(n,s,e));let a=n.docView.nearestDesc(s,!0);return{pos:l,inside:a?a.posAtStart-a.border:-1}}function Lc(n){return n.top=0&&i==r.nodeValue.length?(a--,u=1):t<0?a--:c++,kr(qt(Nt(r,a,c),u),u<0)}if(!n.state.doc.resolve(e-(o||0)).parent.inlineContent){if(o==null&&i&&(t<0||i==Qe(r))){let a=r.childNodes[i-1];if(a.nodeType==1)return hs(a.getBoundingClientRect(),!1)}if(o==null&&i=0)}if(o==null&&i&&(t<0||i==Qe(r))){let a=r.childNodes[i-1],c=a.nodeType==3?Nt(a,Qe(a)-(s?0:1)):a.nodeType==1&&(a.nodeName!="BR"||!a.nextSibling)?a:null;if(c)return kr(qt(c,1),!1)}if(o==null&&i=0)}function kr(n,e){if(n.width==0)return n;let t=e?n.left:n.right;return{top:n.top,bottom:n.bottom,left:t,right:t}}function hs(n,e){if(n.height==0)return n;let t=e?n.top:n.bottom;return{top:t,bottom:t,left:n.left,right:n.right}}function qh(n,e,t){let r=n.state,i=n.root.activeElement;r!=e&&n.updateState(e),i!=n.dom&&n.focus();try{return t()}finally{r!=e&&n.updateState(r),i!=n.dom&&i&&i.focus()}}function zw(n,e,t){let r=e.selection,i=t=="up"?r.$from:r.$to;return qh(n,e,()=>{let{node:o}=n.docView.domFromPos(i.pos,t=="up"?-1:1);for(;;){let l=n.docView.nearestDesc(o,!0);if(!l)break;if(l.node.isBlock){o=l.contentDOM||l.dom;break}o=l.dom.parentNode}let s=jh(n,i.pos,1);for(let l=o.firstChild;l;l=l.nextSibling){let a;if(l.nodeType==1)a=l.getClientRects();else if(l.nodeType==3)a=Nt(l,0,l.nodeValue.length).getClientRects();else continue;for(let c=0;cu.top+1&&(t=="up"?s.top-u.top>(u.bottom-s.top)*2:u.bottom-s.bottom>(s.bottom-u.top)*2))return!1}}return!0})}const Fw=/[\u0590-\u08ac]/;function Pw(n,e,t){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let i=r.parentOffset,o=!i,s=i==r.parent.content.size,l=n.domSelection();return l?!Fw.test(r.parent.textContent)||!l.modify?t=="left"||t=="backward"?o:s:qh(n,e,()=>{let{focusNode:a,focusOffset:c,anchorNode:u,anchorOffset:f}=n.domSelectionRange(),h=l.caretBidiLevel;l.modify("move",t,"character");let d=r.depth?n.docView.domAfterPos(r.before()):n.dom,{focusNode:p,focusOffset:m}=n.domSelectionRange(),y=p&&!d.contains(p.nodeType==1?p:p.parentNode)||a==p&&c==m;try{l.collapse(u,f),a&&(a!=u||c!=f)&&l.extend&&l.extend(a,c)}catch{}return h!=null&&(l.caretBidiLevel=h),y}):r.pos==r.start()||r.pos==r.end()}let Bc=null,Vc=null,Hc=!1;function Lw(n,e,t){return Bc==e&&Vc==t?Hc:(Bc=e,Vc=t,Hc=t=="up"||t=="down"?zw(n,e,t):Pw(n,e,t))}const nt=0,$c=1,bn=2,At=3;class ai{constructor(e,t,r,i){this.parent=e,this.children=t,this.dom=r,this.contentDOM=i,this.dirty=nt,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,r){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;tge(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))i=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(t==0)for(let o=e;;o=o.parentNode){if(o==this.dom){i=!1;break}if(o.previousSibling)break}if(i==null&&t==e.childNodes.length)for(let o=e;;o=o.parentNode){if(o==this.dom){i=!0;break}if(o.nextSibling)break}}return i??r>0?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let r=!0,i=e;i;i=i.parentNode){let o=this.getDesc(i),s;if(o&&(!t||o.node))if(r&&(s=o.nodeDOM)&&!(s.nodeType==1?s.contains(e.nodeType==1?e:e.parentNode):s==e))r=!1;else return o}}getDesc(e){let t=e.pmViewDesc;for(let r=t;r;r=r.parent)if(r==this)return t}posFromDOM(e,t,r){for(let i=e;i;i=i.parentNode){let o=this.getDesc(i);if(o)return o.localPosFromDOM(e,t,r)}return-1}descAt(e){for(let t=0,r=0;te||s instanceof Uh){i=e-o;break}o=l}if(i)return this.children[r].domFromPos(i-this.children[r].border,t);for(let o;r&&!(o=this.children[r-1]).size&&o instanceof Wh&&o.side>=0;r--);if(t<=0){let o,s=!0;for(;o=r?this.children[r-1]:null,!(!o||o.dom.parentNode==this.contentDOM);r--,s=!1);return o&&t&&s&&!o.border&&!o.domAtom?o.domFromPos(o.size,t):{node:this.contentDOM,offset:o?ge(o.dom)+1:0}}else{let o,s=!0;for(;o=r=u&&t<=c-a.border&&a.node&&a.contentDOM&&this.contentDOM.contains(a.contentDOM))return a.parseRange(e,t,u);e=s;for(let f=l;f>0;f--){let h=this.children[f-1];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(1)){i=ge(h.dom)+1;break}e-=h.size}i==-1&&(i=0)}if(i>-1&&(c>t||l==this.children.length-1)){t=c;for(let u=l+1;ud&&st){let d=l;l=a,a=d}let h=document.createRange();h.setEnd(a.node,a.offset),h.setStart(l.node,l.offset),c.removeAllRanges(),c.addRange(h)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let r=0,i=0;i=r:er){let l=r+o.border,a=s-o.border;if(e>=l&&t<=a){this.dirty=e==r||t==s?bn:$c,e==l&&t==a&&(o.contentLost||o.dom.parentNode!=this.contentDOM)?o.dirty=At:o.markDirty(e-l,t-l);return}else o.dirty=o.dom==o.contentDOM&&o.dom.parentNode==this.contentDOM&&!o.children.length?bn:At}r=s}this.dirty=bn}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let r=e==1?bn:$c;t.dirty{if(!o)return i;if(o.parent)return o.parent.posBeforeChild(o)})),!t.type.spec.raw){if(s.nodeType!=1){let l=document.createElement("span");l.appendChild(s),s=l}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(e,[],s,null),this.widget=t,this.widget=t,o=this}matchesWidget(e){return this.dirty==nt&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return t?t(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class Bw extends ai{constructor(e,t,r,i){super(e,[],t,null),this.textDOM=r,this.text=i}get size(){return this.text.length}localPosFromDOM(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class Dn extends ai{constructor(e,t,r,i){super(e,[],r,i),this.mark=t}static create(e,t,r,i){let o=i.nodeViews[t.type.name],s=o&&o(t,i,r);return(!s||!s.dom)&&(s=fr.renderSpec(document,t.type.spec.toDOM(t,r),null,t.attrs)),new Dn(e,t,s.dom,s.contentDOM||s.dom)}parseRule(){return this.dirty&At||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=At&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),this.dirty!=nt){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty0&&(o=ll(o,0,e,r));for(let l=0;l{if(!a)return s;if(a.parent)return a.parent.posBeforeChild(a)},r,i),u=c&&c.dom,f=c&&c.contentDOM;if(t.isText){if(!u)u=document.createTextNode(t.text);else if(u.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else u||({dom:u,contentDOM:f}=fr.renderSpec(document,t.type.spec.toDOM(t),null,t.attrs));!f&&!t.isText&&u.nodeName!="BR"&&(u.hasAttribute("contenteditable")||(u.contentEditable="false"),t.type.spec.draggable&&(u.draggable=!0));let h=u;return u=Yh(u,r,t),c?a=new Vw(e,t,r,i,u,f||null,h,c,o,s+1):t.isText?new Do(e,t,r,i,u,h,o):new en(e,t,r,i,u,f||null,h,o,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let t=this.children.length-1;t>=0;t--){let r=this.children[t];if(this.dom.contains(r.dom.parentNode)){e.contentElement=r.dom.parentNode;break}}e.contentElement||(e.getContent=()=>_.empty)}return e}matchesNode(e,t,r){return this.dirty==nt&&e.eq(this.node)&&sl(t,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,t){let r=this.node.inlineContent,i=t,o=e.composing?this.localCompositionInfo(e,t):null,s=o&&o.pos>-1?o:null,l=o&&o.pos<0,a=new $w(this,s&&s.node,e);Ww(this.node,this.innerDeco,(c,u,f)=>{c.spec.marks?a.syncToMarks(c.spec.marks,r,e):c.type.side>=0&&!f&&a.syncToMarks(u==this.node.childCount?ee.none:this.node.child(u).marks,r,e),a.placeWidget(c,e,i)},(c,u,f,h)=>{a.syncToMarks(c.marks,r,e);let d;a.findNodeMatch(c,u,f,h)||l&&e.state.selection.from>i&&e.state.selection.to-1&&a.updateNodeAt(c,u,f,d,e)||a.updateNextNode(c,u,f,e,h,i)||a.addNode(c,u,f,e,i),i+=c.nodeSize}),a.syncToMarks([],r,e),this.node.isTextblock&&a.addTextblockHacks(),a.destroyRest(),(a.changed||this.dirty==bn)&&(s&&this.protectLocalComposition(e,s),Jh(this.contentDOM,this.children,e),lr&&Uw(this.dom))}localCompositionInfo(e,t){let{from:r,to:i}=e.state.selection;if(!(e.state.selection instanceof X)||rt+this.node.content.size)return null;let o=e.input.compositionNode;if(!o||!this.dom.contains(o.parentNode))return null;if(this.node.inlineContent){let s=o.nodeValue,l=Jw(this.node.content,s,r-t,i-t);return l<0?null:{node:o,pos:l,text:s}}else return{node:o,pos:-1,text:""}}protectLocalComposition(e,{node:t,pos:r,text:i}){if(this.getDesc(t))return;let o=t;for(;o.parentNode!=this.contentDOM;o=o.parentNode){for(;o.previousSibling;)o.parentNode.removeChild(o.previousSibling);for(;o.nextSibling;)o.parentNode.removeChild(o.nextSibling);o.pmViewDesc&&(o.pmViewDesc=void 0)}let s=new Bw(this,o,t,i);e.input.compositionNodes.push(s),this.children=ll(this.children,r,r+i.length,e,s)}update(e,t,r,i){return this.dirty==At||!e.sameMarkup(this.node)?!1:(this.updateInner(e,t,r,i),!0)}updateInner(e,t,r,i){this.updateOuterDeco(t),this.node=e,this.innerDeco=r,this.contentDOM&&this.updateChildren(i,this.posAtStart),this.dirty=nt}updateOuterDeco(e){if(sl(e,this.outerDeco))return;let t=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=Kh(this.dom,this.nodeDOM,ol(this.outerDeco,this.node,t),ol(e,this.node,t)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function jc(n,e,t,r,i){Yh(r,e,n);let o=new en(void 0,n,e,t,r,r,r,i,0);return o.contentDOM&&o.updateChildren(i,0),o}class Do extends en{constructor(e,t,r,i,o,s,l){super(e,t,r,i,o,null,s,l,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,t,r,i){return this.dirty==At||this.dirty!=nt&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(t),(this.dirty!=nt||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,i.trackWrites==this.nodeDOM&&(i.trackWrites=null)),this.node=e,this.dirty=nt,!0)}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,r){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,r)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,t,r){let i=this.node.cut(e,t),o=document.createTextNode(i.text);return new Do(this.parent,i,this.outerDeco,this.innerDeco,o,o,r)}markDirty(e,t){super.markDirty(e,t),this.dom!=this.nodeDOM&&(e==0||t==this.nodeDOM.nodeValue.length)&&(this.dirty=At)}get domAtom(){return!1}isText(e){return this.node.text==e}}class Uh extends ai{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==nt&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class Vw extends en{constructor(e,t,r,i,o,s,l,a,c,u){super(e,t,r,i,o,s,l,c,u),this.spec=a}update(e,t,r,i){if(this.dirty==At)return!1;if(this.spec.update){let o=this.spec.update(e,t,r);return o&&this.updateInner(e,t,r,i),o}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,t,r,i)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,r,i){this.spec.setSelection?this.spec.setSelection(e,t,r):super.setSelection(e,t,r,i)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function Jh(n,e,t){let r=n.firstChild,i=!1;for(let o=0;o>1,s=Math.min(o,e.length);for(;i-1)l>this.index&&(this.changed=!0,this.destroyBetween(this.index,l)),this.top=this.top.children[this.index];else{let a=Dn.create(this.top,e[o],t,r);this.top.children.splice(this.index,0,a),this.top=a,this.changed=!0}this.index=0,o++}}findNodeMatch(e,t,r,i){let o=-1,s;if(i>=this.preMatch.index&&(s=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&s.matchesNode(e,t,r))o=this.top.children.indexOf(s,this.index);else for(let l=this.index,a=Math.min(this.top.children.length,l+5);l0;){let l;for(;;)if(r){let c=t.children[r-1];if(c instanceof Dn)t=c,r=c.children.length;else{l=c,r--;break}}else{if(t==e)break e;r=t.parent.children.indexOf(t),t=t.parent}let a=l.node;if(a){if(a!=n.child(i-1))break;--i,o.set(l,i),s.push(l)}}return{index:i,matched:o,matches:s.reverse()}}function qw(n,e){return n.type.side-e.type.side}function Ww(n,e,t,r){let i=e.locals(n),o=0;if(i.length==0){for(let c=0;co;)l.push(i[s++]);let p=o+h.nodeSize;if(h.isText){let y=p;s!y.inline):l.slice();r(h,m,e.forChild(o,h),d),o=p}}function Uw(n){if(n.nodeName=="UL"||n.nodeName=="OL"){let e=n.style.cssText;n.style.cssText=e+"; list-style: square !important",window.getComputedStyle(n).listStyle,n.style.cssText=e}}function Jw(n,e,t,r){for(let i=0,o=0;i=t){if(o>=r&&a.slice(r-e.length-l,r-l)==e)return r-e.length;let c=l=0&&c+e.length+l>=t)return l+c;if(t==r&&a.length>=r+e.length-l&&a.slice(r-l,r-l+e.length)==e)return r}}return-1}function ll(n,e,t,r,i){let o=[];for(let s=0,l=0;s=t||u<=e?o.push(a):(ct&&o.push(a.slice(t-c,a.size,r)))}return o}function Xl(n,e=null){let t=n.domSelectionRange(),r=n.state.doc;if(!t.focusNode)return null;let i=n.docView.nearestDesc(t.focusNode),o=i&&i.size==0,s=n.docView.posFromDOM(t.focusNode,t.focusOffset,1);if(s<0)return null;let l=r.resolve(s),a,c;if(No(t)){for(a=l;i&&!i.node;)i=i.parent;let u=i.node;if(i&&u.isAtom&&$.isSelectable(u)&&i.parent&&!(u.isInline&&ww(t.focusNode,t.focusOffset,i.dom))){let f=i.posBefore;c=new $(s==f?l:r.resolve(f))}}else{let u=n.docView.posFromDOM(t.anchorNode,t.anchorOffset,1);if(u<0)return null;a=r.resolve(u)}if(!c){let u=e=="pointer"||n.state.selection.head{(t.anchorNode!=r||t.anchorOffset!=i)&&(e.removeEventListener("selectionchange",n.input.hideSelectionGuard),setTimeout(()=>{(!Gh(n)||n.state.selection.visible)&&n.dom.classList.remove("ProseMirror-hideselection")},20))})}function Yw(n){let e=n.domSelection(),t=document.createRange();if(!e)return;let r=n.cursorWrapper.dom,i=r.nodeName=="IMG";i?t.setStart(r.parentNode,ge(r)+1):t.setStart(r,0),t.collapse(!0),e.removeAllRanges(),e.addRange(t),!i&&!n.state.selection.visible&&Le&&Zt<=11&&(r.disabled=!0,r.disabled=!1)}function Xh(n,e){if(e instanceof $){let t=n.docView.descAt(e.from);t!=n.lastSelectedViewDesc&&(Kc(n),t&&t.selectNode(),n.lastSelectedViewDesc=t)}else Kc(n)}function Kc(n){n.lastSelectedViewDesc&&(n.lastSelectedViewDesc.parent&&n.lastSelectedViewDesc.deselectNode(),n.lastSelectedViewDesc=void 0)}function Ql(n,e,t,r){return n.someProp("createSelectionBetween",i=>i(n,e,t))||X.between(e,t,r)}function Yc(n){return n.editable&&!n.hasFocus()?!1:Qh(n)}function Qh(n){let e=n.domSelectionRange();if(!e.anchorNode)return!1;try{return n.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(n.editable||n.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function Gw(n){let e=n.docView.domFromPos(n.state.selection.anchor,0),t=n.domSelectionRange();return Nn(e.node,e.offset,t.anchorNode,t.anchorOffset)}function al(n,e){let{$anchor:t,$head:r}=n.selection,i=e>0?t.max(r):t.min(r),o=i.parent.inlineContent?i.depth?n.doc.resolve(e>0?i.after():i.before()):null:i;return o&&q.findFrom(o,e)}function Wt(n,e){return n.dispatch(n.state.tr.setSelection(e).scrollIntoView()),!0}function Gc(n,e,t){let r=n.state.selection;if(r instanceof X)if(t.indexOf("s")>-1){let{$head:i}=r,o=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter;if(!o||o.isText||!o.isLeaf)return!1;let s=n.state.doc.resolve(i.pos+o.nodeSize*(e<0?-1:1));return Wt(n,new X(r.$anchor,s))}else if(r.empty){if(n.endOfTextblock(e>0?"forward":"backward")){let i=al(n.state,e);return i&&i instanceof $?Wt(n,i):!1}else if(!(Ge&&t.indexOf("m")>-1)){let i=r.$head,o=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter,s;if(!o||o.isText)return!1;let l=e<0?i.pos-o.nodeSize:i.pos;return o.isAtom||(s=n.docView.descAt(l))&&!s.contentDOM?$.isSelectable(o)?Wt(n,new $(e<0?n.state.doc.resolve(i.pos-o.nodeSize):i)):li?Wt(n,new X(n.state.doc.resolve(e<0?l:l+o.nodeSize))):!1:!1}}else return!1;else{if(r instanceof $&&r.node.isInline)return Wt(n,new X(e>0?r.$to:r.$from));{let i=al(n.state,e);return i?Wt(n,i):!1}}}function ao(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function Br(n,e){let t=n.pmViewDesc;return t&&t.size==0&&(e<0||n.nextSibling||n.nodeName!="BR")}function Hn(n,e){return e<0?Xw(n):Qw(n)}function Xw(n){let e=n.domSelectionRange(),t=e.focusNode,r=e.focusOffset;if(!t)return;let i,o,s=!1;for(pt&&t.nodeType==1&&r0){if(t.nodeType!=1)break;{let l=t.childNodes[r-1];if(Br(l,-1))i=t,o=--r;else if(l.nodeType==3)t=l,r=t.nodeValue.length;else break}}else{if(Zh(t))break;{let l=t.previousSibling;for(;l&&Br(l,-1);)i=t.parentNode,o=ge(l),l=l.previousSibling;if(l)t=l,r=ao(t);else{if(t=t.parentNode,t==n.dom)break;r=0}}}s?cl(n,t,r):i&&cl(n,i,o)}function Qw(n){let e=n.domSelectionRange(),t=e.focusNode,r=e.focusOffset;if(!t)return;let i=ao(t),o,s;for(;;)if(r{n.state==i&&Rt(n)},50)}function Xc(n,e){let t=n.state.doc.resolve(e);if(!(xe||Sw)&&t.parent.inlineContent){let i=n.coordsAtPos(e);if(e>t.start()){let o=n.coordsAtPos(e-1),s=(o.top+o.bottom)/2;if(s>i.top&&s1)return o.lefti.top&&s1)return o.left>i.left?"ltr":"rtl"}}return getComputedStyle(n.dom).direction=="rtl"?"rtl":"ltr"}function Qc(n,e,t){let r=n.state.selection;if(r instanceof X&&!r.empty||t.indexOf("s")>-1||Ge&&t.indexOf("m")>-1)return!1;let{$from:i,$to:o}=r;if(!i.parent.inlineContent||n.endOfTextblock(e<0?"up":"down")){let s=al(n.state,e);if(s&&s instanceof $)return Wt(n,s)}if(!i.parent.inlineContent){let s=e<0?i:o,l=r instanceof Ke?q.near(s,e):q.findFrom(s,e);return l?Wt(n,l):!1}return!1}function Zc(n,e){if(!(n.state.selection instanceof X))return!0;let{$head:t,$anchor:r,empty:i}=n.state.selection;if(!t.sameParent(r))return!0;if(!i)return!1;if(n.endOfTextblock(e>0?"forward":"backward"))return!0;let o=!t.textOffset&&(e<0?t.nodeBefore:t.nodeAfter);if(o&&!o.isText){let s=n.state.tr;return e<0?s.delete(t.pos-o.nodeSize,t.pos):s.delete(t.pos,t.pos+o.nodeSize),n.dispatch(s),!0}return!1}function eu(n,e,t){n.domObserver.stop(),e.contentEditable=t,n.domObserver.start()}function tx(n){if(!_e||n.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:t}=n.domSelectionRange();if(e&&e.nodeType==1&&t==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let r=e.firstChild;eu(n,r,"true"),setTimeout(()=>eu(n,r,"false"),20)}return!1}function nx(n){let e="";return n.ctrlKey&&(e+="c"),n.metaKey&&(e+="m"),n.altKey&&(e+="a"),n.shiftKey&&(e+="s"),e}function rx(n,e){let t=e.keyCode,r=nx(e);if(t==8||Ge&&t==72&&r=="c")return Zc(n,-1)||Hn(n,-1);if(t==46&&!e.shiftKey||Ge&&t==68&&r=="c")return Zc(n,1)||Hn(n,1);if(t==13||t==27)return!0;if(t==37||Ge&&t==66&&r=="c"){let i=t==37?Xc(n,n.state.selection.from)=="ltr"?-1:1:-1;return Gc(n,i,r)||Hn(n,i)}else if(t==39||Ge&&t==70&&r=="c"){let i=t==39?Xc(n,n.state.selection.from)=="ltr"?1:-1:1;return Gc(n,i,r)||Hn(n,i)}else{if(t==38||Ge&&t==80&&r=="c")return Qc(n,-1,r)||Hn(n,-1);if(t==40||Ge&&t==78&&r=="c")return tx(n)||Qc(n,1,r)||Hn(n,1);if(r==(Ge?"m":"c")&&(t==66||t==73||t==89||t==90))return!0}return!1}function ed(n,e){n.someProp("transformCopied",d=>{e=d(e,n)});let t=[],{content:r,openStart:i,openEnd:o}=e;for(;i>1&&o>1&&r.childCount==1&&r.firstChild.childCount==1;){i--,o--;let d=r.firstChild;t.push(d.type.name,d.attrs!=d.type.defaultAttrs?d.attrs:null),r=d.content}let s=n.someProp("clipboardSerializer")||fr.fromSchema(n.state.schema),l=sd(),a=l.createElement("div");a.appendChild(s.serializeFragment(r,{document:l}));let c=a.firstChild,u,f=0;for(;c&&c.nodeType==1&&(u=od[c.nodeName.toLowerCase()]);){for(let d=u.length-1;d>=0;d--){let p=l.createElement(u[d]);for(;a.firstChild;)p.appendChild(a.firstChild);a.appendChild(p),f++}c=a.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${i} ${o}${f?` -${f}`:""} ${JSON.stringify(t)}`);let h=n.someProp("clipboardTextSerializer",d=>d(e,n))||e.content.textBetween(0,e.content.size,` `);return{dom:a,text:h,slice:e}}function td(n,e,t,r,i){let o=i.parent.type.spec.code,s,l;if(!t&&!e)return null;let a=e&&(r||o||!t);if(a){if(n.someProp("transformPastedText",h=>{e=h(e,o||r,n)}),o)return e?new R(_.from(n.state.schema.text(e.replace(/\r\n?/g,` `))),0,0):R.empty;let f=n.someProp("clipboardTextParser",h=>h(e,i,r,n));if(f)l=f;else{let h=i.marks(),{schema:d}=n.state,p=fr.fromSchema(d);s=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(m=>{let y=s.appendChild(document.createElement("p"));m&&y.appendChild(p.serializeNode(d.text(m,h)))})}}else n.someProp("transformPastedHTML",f=>{t=f(t,n)}),s=lx(t),li&&ax(s);let c=s&&s.querySelector("[data-pm-slice]"),u=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(u&&u[3])for(let f=+u[3];f>0;f--){let h=s.firstChild;for(;h&&h.nodeType!=1;)h=h.nextSibling;if(!h)break;s=h}if(l||(l=(n.someProp("clipboardParser")||n.someProp("domParser")||Kr.fromSchema(n.state.schema)).parseSlice(s,{preserveWhitespace:!!(a||u),context:i,ruleFromNode(h){return h.nodeName=="BR"&&!h.nextSibling&&h.parentNode&&!ix.test(h.parentNode.nodeName)?{ignore:!0}:null}})),u)l=cx(tu(l,+u[1],+u[2]),u[4]);else if(l=R.maxOpen(ox(l.content,i),!0),l.openStart||l.openEnd){let f=0,h=0;for(let d=l.content.firstChild;f{l=f(l,n)}),l}const ix=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function ox(n,e){if(n.childCount<2)return n;for(let t=e.depth;t>=0;t--){let i=e.node(t).contentMatchAt(e.index(t)),o,s=[];if(n.forEach(l=>{if(!s)return;let a=i.findWrapping(l.type),c;if(!a)return s=null;if(c=s.length&&o.length&&rd(a,o,l,s[s.length-1],0))s[s.length-1]=c;else{s.length&&(s[s.length-1]=id(s[s.length-1],o.length));let u=nd(l,a);s.push(u),i=i.matchType(u.type),o=a}}),s)return _.from(s)}return n}function nd(n,e,t=0){for(let r=e.length-1;r>=t;r--)n=e[r].create(null,_.from(n));return n}function rd(n,e,t,r,i){if(i1&&(o=0),i=t&&(l=e<0?s.contentMatchAt(0).fillBefore(l,o<=i).append(l):l.append(s.contentMatchAt(s.childCount).fillBefore(_.empty,!0))),n.replaceChild(e<0?0:n.childCount-1,s.copy(l))}function tu(n,e,t){return et}).createHTML(n):n}function lx(n){let e=/^(\s*]*>)*/.exec(n);e&&(n=n.slice(e[0].length));let t=sd().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(n),i;if((i=r&&od[r[1].toLowerCase()])&&(n=i.map(o=>"<"+o+">").join("")+n+i.map(o=>"").reverse().join("")),t.innerHTML=sx(n),i)for(let o=0;o=0;l-=2){let a=t.nodes[r[l]];if(!a||a.hasRequiredAttrs())break;i=_.from(a.create(r[l+1],i)),o++,s++}return new R(i,o,s)}const Te={},Ne={},ux={touchstart:!0,touchmove:!0};class fx{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastAndroidDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function hx(n){for(let e in Te){let t=Te[e];n.dom.addEventListener(e,n.input.eventHandlers[e]=r=>{px(n,r)&&!Zl(n,r)&&(n.editable||!(r.type in Ne))&&t(n,r)},ux[e]?{passive:!0}:void 0)}_e&&n.dom.addEventListener("input",()=>null),fl(n)}function Qt(n,e){n.input.lastSelectionOrigin=e,n.input.lastSelectionTime=Date.now()}function dx(n){n.domObserver.stop();for(let e in n.input.eventHandlers)n.dom.removeEventListener(e,n.input.eventHandlers[e]);clearTimeout(n.input.composingTimeout),clearTimeout(n.input.lastIOSEnterFallbackTimeout)}function fl(n){n.someProp("handleDOMEvents",e=>{for(let t in e)n.input.eventHandlers[t]||n.dom.addEventListener(t,n.input.eventHandlers[t]=r=>Zl(n,r))})}function Zl(n,e){return n.someProp("handleDOMEvents",t=>{let r=t[e.type];return r?r(n,e)||e.defaultPrevented:!1})}function px(n,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target;t!=n.dom;t=t.parentNode)if(!t||t.nodeType==11||t.pmViewDesc&&t.pmViewDesc.stopEvent(e))return!1;return!0}function mx(n,e){!Zl(n,e)&&Te[e.type]&&(n.editable||!(e.type in Ne))&&Te[e.type](n,e)}Ne.keydown=(n,e)=>{let t=e;if(n.input.shiftKey=t.keyCode==16||t.shiftKey,!ad(n,t)&&(n.input.lastKeyCode=t.keyCode,n.input.lastKeyCodeTime=Date.now(),!(at&&xe&&t.keyCode==13)))if(n.domObserver.selectionChanged(n.domSelectionRange())?n.domObserver.flush():t.keyCode!=229&&n.domObserver.forceFlush(),lr&&t.keyCode==13&&!t.ctrlKey&&!t.altKey&&!t.metaKey){let r=Date.now();n.input.lastIOSEnter=r,n.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{n.input.lastIOSEnter==r&&(n.someProp("handleKeyDown",i=>i(n,mn(13,"Enter"))),n.input.lastIOSEnter=0)},200)}else n.someProp("handleKeyDown",r=>r(n,t))||rx(n,t)?t.preventDefault():Qt(n,"key")};Ne.keyup=(n,e)=>{e.keyCode==16&&(n.input.shiftKey=!1)};Ne.keypress=(n,e)=>{let t=e;if(ad(n,t)||!t.charCode||t.ctrlKey&&!t.altKey||Ge&&t.metaKey)return;if(n.someProp("handleKeyPress",i=>i(n,t))){t.preventDefault();return}let r=n.state.selection;if(!(r instanceof X)||!r.$from.sameParent(r.$to)){let i=String.fromCharCode(t.charCode);!/[\r\n]/.test(i)&&!n.someProp("handleTextInput",o=>o(n,r.$from.pos,r.$to.pos,i))&&n.dispatch(n.state.tr.insertText(i).scrollIntoView()),t.preventDefault()}};function Io(n){return{left:n.clientX,top:n.clientY}}function gx(n,e){let t=e.x-n.clientX,r=e.y-n.clientY;return t*t+r*r<100}function ea(n,e,t,r,i){if(r==-1)return!1;let o=n.state.doc.resolve(r);for(let s=o.depth+1;s>0;s--)if(n.someProp(e,l=>s>o.depth?l(n,t,o.nodeAfter,o.before(s),i,!0):l(n,t,o.node(s),o.before(s),i,!1)))return!0;return!1}function Yn(n,e,t){if(n.focused||n.focus(),n.state.selection.eq(e))return;let r=n.state.tr.setSelection(e);t=="pointer"&&r.setMeta("pointer",!0),n.dispatch(r)}function yx(n,e){if(e==-1)return!1;let t=n.state.doc.resolve(e),r=t.nodeAfter;return r&&r.isAtom&&$.isSelectable(r)?(Yn(n,new $(t),"pointer"),!0):!1}function bx(n,e){if(e==-1)return!1;let t=n.state.selection,r,i;t instanceof $&&(r=t.node);let o=n.state.doc.resolve(e);for(let s=o.depth+1;s>0;s--){let l=s>o.depth?o.nodeAfter:o.node(s);if($.isSelectable(l)){r&&t.$from.depth>0&&s>=t.$from.depth&&o.before(t.$from.depth+1)==t.$from.pos?i=o.before(t.$from.depth):i=o.before(s);break}}return i!=null?(Yn(n,$.create(n.state.doc,i),"pointer"),!0):!1}function wx(n,e,t,r,i){return ea(n,"handleClickOn",e,t,r)||n.someProp("handleClick",o=>o(n,e,r))||(i?bx(n,t):yx(n,t))}function xx(n,e,t,r){return ea(n,"handleDoubleClickOn",e,t,r)||n.someProp("handleDoubleClick",i=>i(n,e,r))}function kx(n,e,t,r){return ea(n,"handleTripleClickOn",e,t,r)||n.someProp("handleTripleClick",i=>i(n,e,r))||Sx(n,t,r)}function Sx(n,e,t){if(t.button!=0)return!1;let r=n.state.doc;if(e==-1)return r.inlineContent?(Yn(n,X.create(r,0,r.content.size),"pointer"),!0):!1;let i=r.resolve(e);for(let o=i.depth+1;o>0;o--){let s=o>i.depth?i.nodeAfter:i.node(o),l=i.before(o);if(s.inlineContent)Yn(n,X.create(r,l+1,l+1+s.content.size),"pointer");else if($.isSelectable(s))Yn(n,$.create(r,l),"pointer");else continue;return!0}}function ta(n){return co(n)}const ld=Ge?"metaKey":"ctrlKey";Te.mousedown=(n,e)=>{let t=e;n.input.shiftKey=t.shiftKey;let r=ta(n),i=Date.now(),o="singleClick";i-n.input.lastClick.time<500&&gx(t,n.input.lastClick)&&!t[ld]&&(n.input.lastClick.type=="singleClick"?o="doubleClick":n.input.lastClick.type=="doubleClick"&&(o="tripleClick")),n.input.lastClick={time:i,x:t.clientX,y:t.clientY,type:o};let s=n.posAtCoords(Io(t));s&&(o=="singleClick"?(n.input.mouseDown&&n.input.mouseDown.done(),n.input.mouseDown=new vx(n,s,t,!!r)):(o=="doubleClick"?xx:kx)(n,s.pos,s.inside,t)?t.preventDefault():Qt(n,"pointer"))};class vx{constructor(e,t,r,i){this.view=e,this.pos=t,this.event=r,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!r[ld],this.allowDefault=r.shiftKey;let o,s;if(t.inside>-1)o=e.state.doc.nodeAt(t.inside),s=t.inside;else{let u=e.state.doc.resolve(t.pos);o=u.parent,s=u.depth?u.before():0}const l=i?null:r.target,a=l?e.docView.nearestDesc(l,!0):null;this.target=a&&a.dom.nodeType==1?a.dom:null;let{selection:c}=e.state;(r.button==0&&o.type.spec.draggable&&o.type.spec.selectable!==!1||c instanceof $&&c.from<=s&&c.to>s)&&(this.mightDrag={node:o,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&pt&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),Qt(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>Rt(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(Io(e))),this.updateAllowDefault(e),this.allowDefault||!t?Qt(this.view,"pointer"):wx(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||_e&&this.mightDrag&&!this.mightDrag.node.isAtom||xe&&!this.view.state.selection.visible&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(Yn(this.view,q.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):Qt(this.view,"pointer")}move(e){this.updateAllowDefault(e),Qt(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}Te.touchstart=n=>{n.input.lastTouch=Date.now(),ta(n),Qt(n,"pointer")};Te.touchmove=n=>{n.input.lastTouch=Date.now(),Qt(n,"pointer")};Te.contextmenu=n=>ta(n);function ad(n,e){return n.composing?!0:_e&&Math.abs(e.timeStamp-n.input.compositionEndedAt)<500?(n.input.compositionEndedAt=-2e8,!0):!1}const Cx=at?5e3:-1;Ne.compositionstart=Ne.compositionupdate=n=>{if(!n.composing){n.domObserver.flush();let{state:e}=n,t=e.selection.$to;if(e.selection instanceof X&&(e.storedMarks||!t.textOffset&&t.parentOffset&&t.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)))n.markCursor=n.state.storedMarks||t.marks(),co(n,!0),n.markCursor=null;else if(co(n,!e.selection.empty),pt&&e.selection.empty&&t.parentOffset&&!t.textOffset&&t.nodeBefore.marks.length){let r=n.domSelectionRange();for(let i=r.focusNode,o=r.focusOffset;i&&i.nodeType==1&&o!=0;){let s=o<0?i.lastChild:i.childNodes[o-1];if(!s)break;if(s.nodeType==3){let l=n.domSelection();l&&l.collapse(s,s.nodeValue.length);break}else i=s,o=-1}}n.input.composing=!0}cd(n,Cx)};Ne.compositionend=(n,e)=>{n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=e.timeStamp,n.input.compositionPendingChanges=n.domObserver.pendingRecords().length?n.input.compositionID:0,n.input.compositionNode=null,n.input.compositionPendingChanges&&Promise.resolve().then(()=>n.domObserver.flush()),n.input.compositionID++,cd(n,20))};function cd(n,e){clearTimeout(n.input.composingTimeout),e>-1&&(n.input.composingTimeout=setTimeout(()=>co(n),e))}function ud(n){for(n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=Ox());n.input.compositionNodes.length>0;)n.input.compositionNodes.pop().markParentsDirty()}function Ax(n){let e=n.domSelectionRange();if(!e.focusNode)return null;let t=yw(e.focusNode,e.focusOffset),r=bw(e.focusNode,e.focusOffset);if(t&&r&&t!=r){let i=r.pmViewDesc,o=n.domObserver.lastChangedTextNode;if(t==o||r==o)return o;if(!i||!i.isText(r.nodeValue))return r;if(n.input.compositionNode==r){let s=t.pmViewDesc;if(!(!s||!s.isText(t.nodeValue)))return r}}return t||r}function Ox(){let n=document.createEvent("Event");return n.initEvent("event",!0,!0),n.timeStamp}function co(n,e=!1){if(!(at&&n.domObserver.flushingSoon>=0)){if(n.domObserver.forceFlush(),ud(n),e||n.docView&&n.docView.dirty){let t=Xl(n);return t&&!t.eq(n.state.selection)?n.dispatch(n.state.tr.setSelection(t)):(n.markCursor||e)&&!n.state.selection.empty?n.dispatch(n.state.tr.deleteSelection()):n.updateState(n.state),!0}return!1}}function Mx(n,e){if(!n.dom.parentNode)return;let t=n.dom.parentNode.appendChild(document.createElement("div"));t.appendChild(e),t.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),i=document.createRange();i.selectNodeContents(e),n.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout(()=>{t.parentNode&&t.parentNode.removeChild(t),n.focus()},50)}const Xr=Le&&Zt<15||lr&&vw<604;Te.copy=Ne.cut=(n,e)=>{let t=e,r=n.state.selection,i=t.type=="cut";if(r.empty)return;let o=Xr?null:t.clipboardData,s=r.content(),{dom:l,text:a}=ed(n,s);o?(t.preventDefault(),o.clearData(),o.setData("text/html",l.innerHTML),o.setData("text/plain",a)):Mx(n,l),i&&n.dispatch(n.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function Ex(n){return n.openStart==0&&n.openEnd==0&&n.content.childCount==1?n.content.firstChild:null}function _x(n,e){if(!n.dom.parentNode)return;let t=n.input.shiftKey||n.state.selection.$from.parent.type.spec.code,r=n.dom.parentNode.appendChild(document.createElement(t?"textarea":"div"));t||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let i=n.input.shiftKey&&n.input.lastKeyCode!=45;setTimeout(()=>{n.focus(),r.parentNode&&r.parentNode.removeChild(r),t?Qr(n,r.value,null,i,e):Qr(n,r.textContent,r.innerHTML,i,e)},50)}function Qr(n,e,t,r,i){let o=td(n,e,t,r,n.state.selection.$from);if(n.someProp("handlePaste",a=>a(n,i,o||R.empty)))return!0;if(!o)return!1;let s=Ex(o),l=s?n.state.tr.replaceSelectionWith(s,r):n.state.tr.replaceSelection(o);return n.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function fd(n){let e=n.getData("text/plain")||n.getData("Text");if(e)return e;let t=n.getData("text/uri-list");return t?t.replace(/\r?\n/g," "):""}Ne.paste=(n,e)=>{let t=e;if(n.composing&&!at)return;let r=Xr?null:t.clipboardData,i=n.input.shiftKey&&n.input.lastKeyCode!=45;r&&Qr(n,fd(r),r.getData("text/html"),i,t)?t.preventDefault():_x(n,t)};class hd{constructor(e,t,r){this.slice=e,this.move=t,this.node=r}}const dd=Ge?"altKey":"ctrlKey";Te.dragstart=(n,e)=>{let t=e,r=n.input.mouseDown;if(r&&r.done(),!t.dataTransfer)return;let i=n.state.selection,o=i.empty?null:n.posAtCoords(Io(t)),s;if(!(o&&o.pos>=i.from&&o.pos<=(i instanceof $?i.to-1:i.to))){if(r&&r.mightDrag)s=$.create(n.state.doc,r.mightDrag.pos);else if(t.target&&t.target.nodeType==1){let f=n.docView.nearestDesc(t.target,!0);f&&f.node.type.spec.draggable&&f!=n.docView&&(s=$.create(n.state.doc,f.posBefore))}}let l=(s||n.state.selection).content(),{dom:a,text:c,slice:u}=ed(n,l);(!t.dataTransfer.files.length||!xe||Lh>120)&&t.dataTransfer.clearData(),t.dataTransfer.setData(Xr?"Text":"text/html",a.innerHTML),t.dataTransfer.effectAllowed="copyMove",Xr||t.dataTransfer.setData("text/plain",c),n.dragging=new hd(u,!t[dd],s)};Te.dragend=n=>{let e=n.dragging;window.setTimeout(()=>{n.dragging==e&&(n.dragging=null)},50)};Ne.dragover=Ne.dragenter=(n,e)=>e.preventDefault();Ne.drop=(n,e)=>{let t=e,r=n.dragging;if(n.dragging=null,!t.dataTransfer)return;let i=n.posAtCoords(Io(t));if(!i)return;let o=n.state.doc.resolve(i.pos),s=r&&r.slice;s?n.someProp("transformPasted",p=>{s=p(s,n)}):s=td(n,fd(t.dataTransfer),Xr?null:t.dataTransfer.getData("text/html"),!1,o);let l=!!(r&&!t[dd]);if(n.someProp("handleDrop",p=>p(n,t,s||R.empty,l))){t.preventDefault();return}if(!s)return;t.preventDefault();let a=s?Ib(n.state.doc,o.pos,s):o.pos;a==null&&(a=o.pos);let c=n.state.tr;if(l){let{node:p}=r;p?p.replace(c):c.deleteSelection()}let u=c.mapping.map(a),f=s.openStart==0&&s.openEnd==0&&s.content.childCount==1,h=c.doc;if(f?c.replaceRangeWith(u,u,s.content.firstChild):c.replaceRange(u,u,s),c.doc.eq(h))return;let d=c.doc.resolve(u);if(f&&$.isSelectable(s.content.firstChild)&&d.nodeAfter&&d.nodeAfter.sameMarkup(s.content.firstChild))c.setSelection(new $(d));else{let p=c.mapping.map(a);c.mapping.maps[c.mapping.maps.length-1].forEach((m,y,g,v)=>p=v),c.setSelection(Ql(n,d,c.doc.resolve(p)))}n.focus(),n.dispatch(c.setMeta("uiEvent","drop"))};Te.focus=n=>{n.input.lastFocus=Date.now(),n.focused||(n.domObserver.stop(),n.dom.classList.add("ProseMirror-focused"),n.domObserver.start(),n.focused=!0,setTimeout(()=>{n.docView&&n.hasFocus()&&!n.domObserver.currentSelection.eq(n.domSelectionRange())&&Rt(n)},20))};Te.blur=(n,e)=>{let t=e;n.focused&&(n.domObserver.stop(),n.dom.classList.remove("ProseMirror-focused"),n.domObserver.start(),t.relatedTarget&&n.dom.contains(t.relatedTarget)&&n.domObserver.currentSelection.clear(),n.focused=!1)};Te.beforeinput=(n,e)=>{if(xe&&at&&e.inputType=="deleteContentBackward"){n.domObserver.flushSoon();let{domChangeCount:r}=n.input;setTimeout(()=>{if(n.input.domChangeCount!=r||(n.dom.blur(),n.focus(),n.someProp("handleKeyDown",o=>o(n,mn(8,"Backspace")))))return;let{$cursor:i}=n.state.selection;i&&i.pos>0&&n.dispatch(n.state.tr.delete(i.pos-1,i.pos).scrollIntoView())},50)}};for(let n in Ne)Te[n]=Ne[n];function Zr(n,e){if(n==e)return!0;for(let t in n)if(n[t]!==e[t])return!1;for(let t in e)if(!(t in n))return!1;return!0}class uo{constructor(e,t){this.toDOM=e,this.spec=t||On,this.side=this.spec.side||0}map(e,t,r,i){let{pos:o,deleted:s}=e.mapResult(t.from+i,this.side<0?-1:1);return s?null:new ze(o-r,o-r,this)}valid(){return!0}eq(e){return this==e||e instanceof uo&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Zr(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class tn{constructor(e,t){this.attrs=e,this.spec=t||On}map(e,t,r,i){let o=e.map(t.from+i,this.spec.inclusiveStart?-1:1)-r,s=e.map(t.to+i,this.spec.inclusiveEnd?1:-1)-r;return o>=s?null:new ze(o,s,this)}valid(e,t){return t.from=e&&(!o||o(l.spec))&&r.push(l.copy(l.from+i,l.to+i))}for(let s=0;se){let l=this.children[s]+1;this.children[s+2].findInner(e-l,t-l,r,i+l,o)}}map(e,t,r){return this==be||e.maps.length==0?this:this.mapInner(e,t,0,0,r||On)}mapInner(e,t,r,i,o){let s;for(let l=0;l{let c=a+r,u;if(u=md(t,l,c)){for(i||(i=this.children.slice());ol&&f.to=e){this.children[l]==e&&(r=this.children[l+2]);break}let o=e+1,s=o+t.content.size;for(let l=0;lo&&a.type instanceof tn){let c=Math.max(o,a.from)-o,u=Math.min(s,a.to)-o;ci.map(e,t,On));return Jt.from(r)}forChild(e,t){if(t.isLeaf)return oe.empty;let r=[];for(let i=0;it instanceof oe)?e:e.reduce((t,r)=>t.concat(r instanceof oe?r:r.members),[]))}}forEachSet(e){for(let t=0;t{let y=m-p-(d-h);for(let g=0;gv+u-f)continue;let x=l[g]+u-f;d>=x?l[g+1]=h<=x?-2:-1:h>=u&&y&&(l[g]+=y,l[g+1]+=y)}f+=y}),u=t.maps[c].map(u,-1)}let a=!1;for(let c=0;c=r.content.size){a=!0;continue}let h=t.map(n[c+1]+o,-1),d=h-i,{index:p,offset:m}=r.content.findIndex(f),y=r.maybeChild(p);if(y&&m==f&&m+y.nodeSize==d){let g=l[c+2].mapInner(t,y,u+1,n[c]+o+1,s);g!=be?(l[c]=f,l[c+1]=d,l[c+2]=g):(l[c+1]=-2,a=!0)}else a=!0}if(a){let c=Nx(l,n,e,t,i,o,s),u=fo(c,r,0,s);e=u.local;for(let f=0;ft&&s.to{let c=md(n,l,a+t);if(c){o=!0;let u=fo(c,l,t+a+1,r);u!=be&&i.push(a,a+l.nodeSize,u)}});let s=pd(o?gd(n):n,-t).sort(Mn);for(let l=0;l0;)e++;n.splice(e,0,t)}function ps(n){let e=[];return n.someProp("decorations",t=>{let r=t(n.state);r&&r!=be&&e.push(r)}),n.cursorWrapper&&e.push(oe.create(n.state.doc,[n.cursorWrapper.deco])),Jt.from(e)}const Dx={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Ix=Le&&Zt<=11;class Rx{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class zx{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Rx,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let i=0;ii.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),Ix&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,Dx)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;tthis.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(Yc(this.view)){if(this.suppressingSelectionUpdates)return Rt(this.view);if(Le&&Zt<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&Nn(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let t=new Set,r;for(let o=e.focusNode;o;o=Gr(o))t.add(o);for(let o=e.anchorNode;o;o=Gr(o))if(t.has(o)){r=o;break}let i=r&&this.view.docView.nearestDesc(r);if(i&&i.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}selectionChanged(e){return!this.suppressingSelectionUpdates&&!this.currentSelection.eq(e)&&Yc(this.view)&&!this.ignoreSelectionChange(e)}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let t=this.pendingRecords();t.length&&(this.queue=[]);let r=e.domSelectionRange(),i=this.selectionChanged(r),o=-1,s=-1,l=!1,a=[];if(e.editable)for(let u=0;uf.nodeName=="BR");if(u.length==2){let[f,h]=u;f.parentNode&&f.parentNode.parentNode==h.parentNode?h.remove():f.remove()}else{let{focusNode:f}=this.currentSelection;for(let h of u){let d=h.parentNode;d&&d.nodeName=="LI"&&(!f||Lx(e,f)!=d)&&h.remove()}}}let c=null;o<0&&i&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)-1||i)&&(o>-1&&(e.docView.markDirty(o,s),Fx(e)),this.handleDOMChange(o,s,l,a),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||Rt(e),this.currentSelection.set(r))}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let r=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(r==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!r||r.ignoreMutation(e))return null;if(e.type=="childList"){for(let u=0;ui;y--){let g=r.childNodes[y-1],v=g.pmViewDesc;if(g.nodeName=="BR"&&!v){o=y;break}if(!v||v.size)break}let f=n.state.doc,h=n.someProp("domParser")||Kr.fromSchema(n.state.schema),d=f.resolve(s),p=null,m=h.parse(r,{topNode:d.parent,topMatch:d.parent.contentMatchAt(d.index()),topOpen:!0,from:i,to:o,preserveWhitespace:d.parent.type.whitespace=="pre"?"full":!0,findPositions:c,ruleFromNode:Vx,context:d});if(c&&c[0].pos!=null){let y=c[0].pos,g=c[1]&&c[1].pos;g==null&&(g=y),p={anchor:y+s,head:g+s}}return{doc:m,sel:p,from:s,to:l}}function Vx(n){let e=n.pmViewDesc;if(e)return e.parseRule();if(n.nodeName=="BR"&&n.parentNode){if(_e&&/^(ul|ol)$/i.test(n.parentNode.nodeName)){let t=document.createElement("div");return t.appendChild(document.createElement("li")),{skip:t}}else if(n.parentNode.lastChild==n||_e&&/^(tr|table)$/i.test(n.parentNode.nodeName))return{ignore:!0}}else if(n.nodeName=="IMG"&&n.getAttribute("mark-placeholder"))return{ignore:!0};return null}const Hx=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function $x(n,e,t,r,i){let o=n.input.compositionPendingChanges||(n.composing?n.input.compositionID:0);if(n.input.compositionPendingChanges=0,e<0){let E=n.input.lastSelectionTime>Date.now()-50?n.input.lastSelectionOrigin:null,S=Xl(n,E);if(S&&!n.state.selection.eq(S)){if(xe&&at&&n.input.lastKeyCode===13&&Date.now()-100D(n,mn(13,"Enter"))))return;let T=n.state.tr.setSelection(S);E=="pointer"?T.setMeta("pointer",!0):E=="key"&&T.scrollIntoView(),o&&T.setMeta("composition",o),n.dispatch(T)}return}let s=n.state.doc.resolve(e),l=s.sharedDepth(t);e=s.before(l+1),t=n.state.doc.resolve(t).after(l+1);let a=n.state.selection,c=Bx(n,e,t),u=n.state.doc,f=u.slice(c.from,c.to),h,d;n.input.lastKeyCode===8&&Date.now()-100Date.now()-225||at)&&i.some(E=>E.nodeType==1&&!Hx.test(E.nodeName))&&(!p||p.endA>=p.endB)&&n.someProp("handleKeyDown",E=>E(n,mn(13,"Enter")))){n.input.lastIOSEnter=0;return}if(!p)if(r&&a instanceof X&&!a.empty&&a.$head.sameParent(a.$anchor)&&!n.composing&&!(c.sel&&c.sel.anchor!=c.sel.head))p={start:a.from,endA:a.to,endB:a.to};else{if(c.sel){let E=lu(n,n.state.doc,c.sel);if(E&&!E.eq(n.state.selection)){let S=n.state.tr.setSelection(E);o&&S.setMeta("composition",o),n.dispatch(S)}}return}n.state.selection.fromn.state.selection.from&&p.start<=n.state.selection.from+2&&n.state.selection.from>=c.from?p.start=n.state.selection.from:p.endA=n.state.selection.to-2&&n.state.selection.to<=c.to&&(p.endB+=n.state.selection.to-p.endA,p.endA=n.state.selection.to)),Le&&Zt<=11&&p.endB==p.start+1&&p.endA==p.start&&p.start>c.from&&c.doc.textBetween(p.start-c.from-1,p.start-c.from+1)=="  "&&(p.start--,p.endA--,p.endB--);let m=c.doc.resolveNoCache(p.start-c.from),y=c.doc.resolveNoCache(p.endB-c.from),g=u.resolve(p.start),v=m.sameParent(y)&&m.parent.inlineContent&&g.end()>=p.endA,x;if((lr&&n.input.lastIOSEnter>Date.now()-225&&(!v||i.some(E=>E.nodeName=="DIV"||E.nodeName=="P"))||!v&&m.posE(n,mn(13,"Enter")))){n.input.lastIOSEnter=0;return}if(n.state.selection.anchor>p.start&&qx(u,p.start,p.endA,m,y)&&n.someProp("handleKeyDown",E=>E(n,mn(8,"Backspace")))){at&&xe&&n.domObserver.suppressSelectionUpdates();return}xe&&at&&p.endB==p.start&&(n.input.lastAndroidDelete=Date.now()),at&&!v&&m.start()!=y.start()&&y.parentOffset==0&&m.depth==y.depth&&c.sel&&c.sel.anchor==c.sel.head&&c.sel.head==p.endA&&(p.endB-=2,y=c.doc.resolveNoCache(p.endB-c.from),setTimeout(()=>{n.someProp("handleKeyDown",function(E){return E(n,mn(13,"Enter"))})},20));let C=p.start,O=p.endA,k,I,L;if(v){if(m.pos==y.pos)Le&&Zt<=11&&m.parentOffset==0&&(n.domObserver.suppressSelectionUpdates(),setTimeout(()=>Rt(n),20)),k=n.state.tr.delete(C,O),I=u.resolve(p.start).marksAcross(u.resolve(p.endA));else if(p.endA==p.endB&&(L=jx(m.parent.content.cut(m.parentOffset,y.parentOffset),g.parent.content.cut(g.parentOffset,p.endA-g.start()))))k=n.state.tr,L.type=="add"?k.addMark(C,O,L.mark):k.removeMark(C,O,L.mark);else if(m.parent.child(m.index()).isText&&m.index()==y.index()-(y.textOffset?0:1)){let E=m.parent.textBetween(m.parentOffset,y.parentOffset);if(n.someProp("handleTextInput",S=>S(n,C,O,E)))return;k=n.state.tr.insertText(E,C,O)}}if(k||(k=n.state.tr.replace(C,O,c.doc.slice(p.start-c.from,p.endB-c.from))),c.sel){let E=lu(n,k.doc,c.sel);E&&!(xe&&at&&n.composing&&E.empty&&(p.start!=p.endB||n.input.lastAndroidDeletee.content.size?null:Ql(n,e.resolve(t.anchor),e.resolve(t.head))}function jx(n,e){let t=n.firstChild.marks,r=e.firstChild.marks,i=t,o=r,s,l,a;for(let u=0;uu.mark(l.addToSet(u.marks));else if(i.length==0&&o.length==1)l=o[0],s="remove",a=u=>u.mark(l.removeFromSet(u.marks));else return null;let c=[];for(let u=0;ut||ms(s,!0,!1)0&&(e||n.indexAfter(r)==n.node(r).childCount);)r--,i++,e=!1;if(t){let o=n.node(r).maybeChild(n.indexAfter(r));for(;o&&!o.isLeaf;)o=o.firstChild,i++}return i}function Wx(n,e,t,r,i){let o=n.findDiffStart(e,t);if(o==null)return null;let{a:s,b:l}=n.findDiffEnd(e,t+n.size,t+e.size);if(i=="end"){let a=Math.max(0,o-Math.min(s,l));r-=s+a-o}if(s=s?o-r:0;o-=a,o&&o=l?o-r:0;o-=a,o&&o=56320&&e<=57343&&t>=55296&&t<=56319}class Nv{constructor(e,t){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new fx,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(du),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=fu(this),uu(this),this.nodeViews=hu(this),this.docView=jc(this.state.doc,cu(this),ps(this),this.dom,this),this.domObserver=new zx(this,(r,i,o,s)=>$x(this,r,i,o,s)),this.domObserver.start(),hx(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&fl(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(du),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let r in this._props)t[r]=this._props[r];t.state=this.state;for(let r in e)t[r]=e[r];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){var r;let i=this.state,o=!1,s=!1;e.storedMarks&&this.composing&&(ud(this),s=!0),this.state=e;let l=i.plugins!=e.plugins||this._props.plugins!=t.plugins;if(l||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let d=hu(this);Jx(d,this.nodeViews)&&(this.nodeViews=d,o=!0)}(l||t.handleDOMEvents!=this._props.handleDOMEvents)&&fl(this),this.editable=fu(this),uu(this);let a=ps(this),c=cu(this),u=i.plugins!=e.plugins&&!i.doc.eq(e.doc)?"reset":e.scrollToSelection>i.scrollToSelection?"to selection":"preserve",f=o||!this.docView.matchesNode(e.doc,c,a);(f||!e.selection.eq(i.selection))&&(s=!0);let h=u=="preserve"&&s&&this.dom.style.overflowAnchor==null&&Ow(this);if(s){this.domObserver.stop();let d=f&&(Le||xe)&&!this.composing&&!i.selection.empty&&!e.selection.empty&&Ux(i.selection,e.selection);if(f){let p=xe?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=Ax(this)),(o||!this.docView.update(e.doc,c,a,this))&&(this.docView.updateOuterDeco(c),this.docView.destroy(),this.docView=jc(e.doc,c,a,this.dom,this)),p&&!this.trackWrites&&(d=!0)}d||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&Gw(this))?Rt(this,d):(Xh(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(i),!((r=this.dragging)===null||r===void 0)&&r.node&&!i.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,i),u=="reset"?this.dom.scrollTop=0:u=="to selection"?this.scrollToSelection():h&&Mw(h)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!this.someProp("handleScrollToSelection",t=>t(this)))if(this.state.selection instanceof $){let t=this.docView.domAfterPos(this.state.selection.from);t.nodeType==1&&Pc(this,t.getBoundingClientRect(),e)}else Pc(this,this.coordsAtPos(this.state.selection.head,1),e)}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let t=0;t0&&this.state.doc.nodeAt(o))==r.node&&(i=o)}this.dragging=new hd(e.slice,e.move,i<0?void 0:$.create(this.state.doc,i))}someProp(e,t){let r=this._props&&this._props[e],i;if(r!=null&&(i=t?t(r):r))return i;for(let s=0;st.ownerDocument.getSelection()),this._root=t}return e||document}updateRoot(){this._root=null}posAtCoords(e){return Iw(this,e)}coordsAtPos(e,t=1){return jh(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,r=-1){let i=this.docView.posFromDOM(e,t,r);if(i==null)throw new RangeError("DOM position not inside the editor");return i}endOfTextblock(e,t){return Lw(this,t||this.state,e)}pasteHTML(e,t){return Qr(this,"",e,!1,t||new ClipboardEvent("paste"))}pasteText(e,t){return Qr(this,e,null,!0,t||new ClipboardEvent("paste"))}destroy(){this.docView&&(dx(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],ps(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,mw())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return mx(this,e)}dispatch(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))}domSelectionRange(){let e=this.domSelection();return e?_e&&this.root.nodeType===11&&xw(this.dom.ownerDocument)==this.dom&&Px(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function cu(n){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(n.editable),n.someProp("attributes",t=>{if(typeof t=="function"&&(t=t(n.state)),t)for(let r in t)r=="class"?e.class+=" "+t[r]:r=="style"?e.style=(e.style?e.style+";":"")+t[r]:!e[r]&&r!="contenteditable"&&r!="nodeName"&&(e[r]=String(t[r]))}),e.translate||(e.translate="no"),[ze.node(0,n.state.doc.content.size,e)]}function uu(n){if(n.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),n.cursorWrapper={dom:e,deco:ze.widget(n.state.selection.from,e,{raw:!0,marks:n.markCursor})}}else n.cursorWrapper=null}function fu(n){return!n.someProp("editable",e=>e(n.state)===!1)}function Ux(n,e){let t=Math.min(n.$anchor.sharedDepth(n.head),e.$anchor.sharedDepth(e.head));return n.$anchor.start(t)!=e.$anchor.start(t)}function hu(n){let e=Object.create(null);function t(r){for(let i in r)Object.prototype.hasOwnProperty.call(e,i)||(e[i]=r[i])}return n.someProp("nodeViews",t),n.someProp("markViews",t),e}function Jx(n,e){let t=0,r=0;for(let i in n){if(n[i]!=e[i])return!0;t++}for(let i in e)r++;return t!=r}function du(n){if(n.spec.state||n.spec.filterTransaction||n.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}let Kx=n=>crypto.getRandomValues(new Uint8Array(n)),Yx=(n,e,t)=>{let r=(2<{let s="";for(;;){let l=t(i),a=i|0;for(;a--;)if(s+=n[l[a]&r]||"",s.length>=o)return s}}},Dv=(n,e=21)=>Yx(n,e|0,Kx);function Ro(n){if(typeof n!="string")throw new TypeError("Expected a string");return n.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const Gx=[["ß","ss"],["ẞ","Ss"],["ä","ae"],["Ä","Ae"],["ö","oe"],["Ö","Oe"],["ü","ue"],["Ü","Ue"],["À","A"],["Á","A"],["Â","A"],["Ã","A"],["Ä","Ae"],["Å","A"],["Æ","AE"],["Ç","C"],["È","E"],["É","E"],["Ê","E"],["Ë","E"],["Ì","I"],["Í","I"],["Î","I"],["Ï","I"],["Ð","D"],["Ñ","N"],["Ò","O"],["Ó","O"],["Ô","O"],["Õ","O"],["Ö","Oe"],["Ő","O"],["Ø","O"],["Ù","U"],["Ú","U"],["Û","U"],["Ü","Ue"],["Ű","U"],["Ý","Y"],["Þ","TH"],["ß","ss"],["à","a"],["á","a"],["â","a"],["ã","a"],["ä","ae"],["å","a"],["æ","ae"],["ç","c"],["è","e"],["é","e"],["ê","e"],["ë","e"],["ì","i"],["í","i"],["î","i"],["ï","i"],["ð","d"],["ñ","n"],["ò","o"],["ó","o"],["ô","o"],["õ","o"],["ö","oe"],["ő","o"],["ø","o"],["ù","u"],["ú","u"],["û","u"],["ü","ue"],["ű","u"],["ý","y"],["þ","th"],["ÿ","y"],["ẞ","SS"],["à","a"],["À","A"],["á","a"],["Á","A"],["â","a"],["Â","A"],["ã","a"],["Ã","A"],["è","e"],["È","E"],["é","e"],["É","E"],["ê","e"],["Ê","E"],["ì","i"],["Ì","I"],["í","i"],["Í","I"],["ò","o"],["Ò","O"],["ó","o"],["Ó","O"],["ô","o"],["Ô","O"],["õ","o"],["Õ","O"],["ù","u"],["Ù","U"],["ú","u"],["Ú","U"],["ý","y"],["Ý","Y"],["ă","a"],["Ă","A"],["Đ","D"],["đ","d"],["ĩ","i"],["Ĩ","I"],["ũ","u"],["Ũ","U"],["ơ","o"],["Ơ","O"],["ư","u"],["Ư","U"],["ạ","a"],["Ạ","A"],["ả","a"],["Ả","A"],["ấ","a"],["Ấ","A"],["ầ","a"],["Ầ","A"],["ẩ","a"],["Ẩ","A"],["ẫ","a"],["Ẫ","A"],["ậ","a"],["Ậ","A"],["ắ","a"],["Ắ","A"],["ằ","a"],["Ằ","A"],["ẳ","a"],["Ẳ","A"],["ẵ","a"],["Ẵ","A"],["ặ","a"],["Ặ","A"],["ẹ","e"],["Ẹ","E"],["ẻ","e"],["Ẻ","E"],["ẽ","e"],["Ẽ","E"],["ế","e"],["Ế","E"],["ề","e"],["Ề","E"],["ể","e"],["Ể","E"],["ễ","e"],["Ễ","E"],["ệ","e"],["Ệ","E"],["ỉ","i"],["Ỉ","I"],["ị","i"],["Ị","I"],["ọ","o"],["Ọ","O"],["ỏ","o"],["Ỏ","O"],["ố","o"],["Ố","O"],["ồ","o"],["Ồ","O"],["ổ","o"],["Ổ","O"],["ỗ","o"],["Ỗ","O"],["ộ","o"],["Ộ","O"],["ớ","o"],["Ớ","O"],["ờ","o"],["Ờ","O"],["ở","o"],["Ở","O"],["ỡ","o"],["Ỡ","O"],["ợ","o"],["Ợ","O"],["ụ","u"],["Ụ","U"],["ủ","u"],["Ủ","U"],["ứ","u"],["Ứ","U"],["ừ","u"],["Ừ","U"],["ử","u"],["Ử","U"],["ữ","u"],["Ữ","U"],["ự","u"],["Ự","U"],["ỳ","y"],["Ỳ","Y"],["ỵ","y"],["Ỵ","Y"],["ỷ","y"],["Ỷ","Y"],["ỹ","y"],["Ỹ","Y"],["ء","e"],["آ","a"],["أ","a"],["ؤ","w"],["إ","i"],["ئ","y"],["ا","a"],["ب","b"],["ة","t"],["ت","t"],["ث","th"],["ج","j"],["ح","h"],["خ","kh"],["د","d"],["ذ","dh"],["ر","r"],["ز","z"],["س","s"],["ش","sh"],["ص","s"],["ض","d"],["ط","t"],["ظ","z"],["ع","e"],["غ","gh"],["ـ","_"],["ف","f"],["ق","q"],["ك","k"],["ل","l"],["م","m"],["ن","n"],["ه","h"],["و","w"],["ى","a"],["ي","y"],["َ‎","a"],["ُ","u"],["ِ‎","i"],["٠","0"],["١","1"],["٢","2"],["٣","3"],["٤","4"],["٥","5"],["٦","6"],["٧","7"],["٨","8"],["٩","9"],["چ","ch"],["ک","k"],["گ","g"],["پ","p"],["ژ","zh"],["ی","y"],["۰","0"],["۱","1"],["۲","2"],["۳","3"],["۴","4"],["۵","5"],["۶","6"],["۷","7"],["۸","8"],["۹","9"],["ټ","p"],["ځ","z"],["څ","c"],["ډ","d"],["ﺫ","d"],["ﺭ","r"],["ړ","r"],["ﺯ","z"],["ږ","g"],["ښ","x"],["ګ","g"],["ڼ","n"],["ۀ","e"],["ې","e"],["ۍ","ai"],["ٹ","t"],["ڈ","d"],["ڑ","r"],["ں","n"],["ہ","h"],["ھ","h"],["ے","e"],["А","A"],["а","a"],["Б","B"],["б","b"],["В","V"],["в","v"],["Г","G"],["г","g"],["Д","D"],["д","d"],["ъе","ye"],["Ъе","Ye"],["ъЕ","yE"],["ЪЕ","YE"],["Е","E"],["е","e"],["Ё","Yo"],["ё","yo"],["Ж","Zh"],["ж","zh"],["З","Z"],["з","z"],["И","I"],["и","i"],["ый","iy"],["Ый","Iy"],["ЫЙ","IY"],["ыЙ","iY"],["Й","Y"],["й","y"],["К","K"],["к","k"],["Л","L"],["л","l"],["М","M"],["м","m"],["Н","N"],["н","n"],["О","O"],["о","o"],["П","P"],["п","p"],["Р","R"],["р","r"],["С","S"],["с","s"],["Т","T"],["т","t"],["У","U"],["у","u"],["Ф","F"],["ф","f"],["Х","Kh"],["х","kh"],["Ц","Ts"],["ц","ts"],["Ч","Ch"],["ч","ch"],["Ш","Sh"],["ш","sh"],["Щ","Sch"],["щ","sch"],["Ъ",""],["ъ",""],["Ы","Y"],["ы","y"],["Ь",""],["ь",""],["Э","E"],["э","e"],["Ю","Yu"],["ю","yu"],["Я","Ya"],["я","ya"],["ă","a"],["Ă","A"],["ș","s"],["Ș","S"],["ț","t"],["Ț","T"],["ţ","t"],["Ţ","T"],["ş","s"],["Ş","S"],["ç","c"],["Ç","C"],["ğ","g"],["Ğ","G"],["ı","i"],["İ","I"],["ա","a"],["Ա","A"],["բ","b"],["Բ","B"],["գ","g"],["Գ","G"],["դ","d"],["Դ","D"],["ե","ye"],["Ե","Ye"],["զ","z"],["Զ","Z"],["է","e"],["Է","E"],["ը","y"],["Ը","Y"],["թ","t"],["Թ","T"],["ժ","zh"],["Ժ","Zh"],["ի","i"],["Ի","I"],["լ","l"],["Լ","L"],["խ","kh"],["Խ","Kh"],["ծ","ts"],["Ծ","Ts"],["կ","k"],["Կ","K"],["հ","h"],["Հ","H"],["ձ","dz"],["Ձ","Dz"],["ղ","gh"],["Ղ","Gh"],["ճ","tch"],["Ճ","Tch"],["մ","m"],["Մ","M"],["յ","y"],["Յ","Y"],["ն","n"],["Ն","N"],["շ","sh"],["Շ","Sh"],["ո","vo"],["Ո","Vo"],["չ","ch"],["Չ","Ch"],["պ","p"],["Պ","P"],["ջ","j"],["Ջ","J"],["ռ","r"],["Ռ","R"],["ս","s"],["Ս","S"],["վ","v"],["Վ","V"],["տ","t"],["Տ","T"],["ր","r"],["Ր","R"],["ց","c"],["Ց","C"],["ու","u"],["ՈՒ","U"],["Ու","U"],["փ","p"],["Փ","P"],["ք","q"],["Ք","Q"],["օ","o"],["Օ","O"],["ֆ","f"],["Ֆ","F"],["և","yev"],["ა","a"],["ბ","b"],["გ","g"],["დ","d"],["ე","e"],["ვ","v"],["ზ","z"],["თ","t"],["ი","i"],["კ","k"],["ლ","l"],["მ","m"],["ნ","n"],["ო","o"],["პ","p"],["ჟ","zh"],["რ","r"],["ს","s"],["ტ","t"],["უ","u"],["ფ","ph"],["ქ","q"],["ღ","gh"],["ყ","k"],["შ","sh"],["ჩ","ch"],["ც","ts"],["ძ","dz"],["წ","ts"],["ჭ","tch"],["ხ","kh"],["ჯ","j"],["ჰ","h"],["č","c"],["ď","d"],["ě","e"],["ň","n"],["ř","r"],["š","s"],["ť","t"],["ů","u"],["ž","z"],["Č","C"],["Ď","D"],["Ě","E"],["Ň","N"],["Ř","R"],["Š","S"],["Ť","T"],["Ů","U"],["Ž","Z"],["ހ","h"],["ށ","sh"],["ނ","n"],["ރ","r"],["ބ","b"],["ޅ","lh"],["ކ","k"],["އ","a"],["ވ","v"],["މ","m"],["ފ","f"],["ދ","dh"],["ތ","th"],["ލ","l"],["ގ","g"],["ޏ","gn"],["ސ","s"],["ޑ","d"],["ޒ","z"],["ޓ","t"],["ޔ","y"],["ޕ","p"],["ޖ","j"],["ޗ","ch"],["ޘ","tt"],["ޙ","hh"],["ޚ","kh"],["ޛ","th"],["ޜ","z"],["ޝ","sh"],["ޞ","s"],["ޟ","d"],["ޠ","t"],["ޡ","z"],["ޢ","a"],["ޣ","gh"],["ޤ","q"],["ޥ","w"],["ަ","a"],["ާ","aa"],["ި","i"],["ީ","ee"],["ު","u"],["ޫ","oo"],["ެ","e"],["ޭ","ey"],["ޮ","o"],["ޯ","oa"],["ް",""],["α","a"],["β","v"],["γ","g"],["δ","d"],["ε","e"],["ζ","z"],["η","i"],["θ","th"],["ι","i"],["κ","k"],["λ","l"],["μ","m"],["ν","n"],["ξ","ks"],["ο","o"],["π","p"],["ρ","r"],["σ","s"],["τ","t"],["υ","y"],["φ","f"],["χ","x"],["ψ","ps"],["ω","o"],["ά","a"],["έ","e"],["ί","i"],["ό","o"],["ύ","y"],["ή","i"],["ώ","o"],["ς","s"],["ϊ","i"],["ΰ","y"],["ϋ","y"],["ΐ","i"],["Α","A"],["Β","B"],["Γ","G"],["Δ","D"],["Ε","E"],["Ζ","Z"],["Η","I"],["Θ","TH"],["Ι","I"],["Κ","K"],["Λ","L"],["Μ","M"],["Ν","N"],["Ξ","KS"],["Ο","O"],["Π","P"],["Ρ","R"],["Σ","S"],["Τ","T"],["Υ","Y"],["Φ","F"],["Χ","X"],["Ψ","PS"],["Ω","O"],["Ά","A"],["Έ","E"],["Ί","I"],["Ό","O"],["Ύ","Y"],["Ή","I"],["Ώ","O"],["Ϊ","I"],["Ϋ","Y"],["ā","a"],["ē","e"],["ģ","g"],["ī","i"],["ķ","k"],["ļ","l"],["ņ","n"],["ū","u"],["Ā","A"],["Ē","E"],["Ģ","G"],["Ī","I"],["Ķ","K"],["Ļ","L"],["Ņ","N"],["Ū","U"],["č","c"],["š","s"],["ž","z"],["Č","C"],["Š","S"],["Ž","Z"],["ą","a"],["č","c"],["ę","e"],["ė","e"],["į","i"],["š","s"],["ų","u"],["ū","u"],["ž","z"],["Ą","A"],["Č","C"],["Ę","E"],["Ė","E"],["Į","I"],["Š","S"],["Ų","U"],["Ū","U"],["Ќ","Kj"],["ќ","kj"],["Љ","Lj"],["љ","lj"],["Њ","Nj"],["њ","nj"],["Тс","Ts"],["тс","ts"],["ą","a"],["ć","c"],["ę","e"],["ł","l"],["ń","n"],["ś","s"],["ź","z"],["ż","z"],["Ą","A"],["Ć","C"],["Ę","E"],["Ł","L"],["Ń","N"],["Ś","S"],["Ź","Z"],["Ż","Z"],["Є","Ye"],["І","I"],["Ї","Yi"],["Ґ","G"],["є","ye"],["і","i"],["ї","yi"],["ґ","g"],["IJ","IJ"],["ij","ij"],["¢","c"],["¥","Y"],["߿","b"],["৳","t"],["૱","Bo"],["฿","B"],["₠","CE"],["₡","C"],["₢","Cr"],["₣","F"],["₥","m"],["₦","N"],["₧","Pt"],["₨","Rs"],["₩","W"],["₫","s"],["€","E"],["₭","K"],["₮","T"],["₯","Dp"],["₰","S"],["₱","P"],["₲","G"],["₳","A"],["₴","S"],["₵","C"],["₶","tt"],["₷","S"],["₸","T"],["₹","R"],["₺","L"],["₽","P"],["₿","B"],["﹩","$"],["¢","c"],["¥","Y"],["₩","W"],["𝐀","A"],["𝐁","B"],["𝐂","C"],["𝐃","D"],["𝐄","E"],["𝐅","F"],["𝐆","G"],["𝐇","H"],["𝐈","I"],["𝐉","J"],["𝐊","K"],["𝐋","L"],["𝐌","M"],["𝐍","N"],["𝐎","O"],["𝐏","P"],["𝐐","Q"],["𝐑","R"],["𝐒","S"],["𝐓","T"],["𝐔","U"],["𝐕","V"],["𝐖","W"],["𝐗","X"],["𝐘","Y"],["𝐙","Z"],["𝐚","a"],["𝐛","b"],["𝐜","c"],["𝐝","d"],["𝐞","e"],["𝐟","f"],["𝐠","g"],["𝐡","h"],["𝐢","i"],["𝐣","j"],["𝐤","k"],["𝐥","l"],["𝐦","m"],["𝐧","n"],["𝐨","o"],["𝐩","p"],["𝐪","q"],["𝐫","r"],["𝐬","s"],["𝐭","t"],["𝐮","u"],["𝐯","v"],["𝐰","w"],["𝐱","x"],["𝐲","y"],["𝐳","z"],["𝐴","A"],["𝐵","B"],["𝐶","C"],["𝐷","D"],["𝐸","E"],["𝐹","F"],["𝐺","G"],["𝐻","H"],["𝐼","I"],["𝐽","J"],["𝐾","K"],["𝐿","L"],["𝑀","M"],["𝑁","N"],["𝑂","O"],["𝑃","P"],["𝑄","Q"],["𝑅","R"],["𝑆","S"],["𝑇","T"],["𝑈","U"],["𝑉","V"],["𝑊","W"],["𝑋","X"],["𝑌","Y"],["𝑍","Z"],["𝑎","a"],["𝑏","b"],["𝑐","c"],["𝑑","d"],["𝑒","e"],["𝑓","f"],["𝑔","g"],["𝑖","i"],["𝑗","j"],["𝑘","k"],["𝑙","l"],["𝑚","m"],["𝑛","n"],["𝑜","o"],["𝑝","p"],["𝑞","q"],["𝑟","r"],["𝑠","s"],["𝑡","t"],["𝑢","u"],["𝑣","v"],["𝑤","w"],["𝑥","x"],["𝑦","y"],["𝑧","z"],["𝑨","A"],["𝑩","B"],["𝑪","C"],["𝑫","D"],["𝑬","E"],["𝑭","F"],["𝑮","G"],["𝑯","H"],["𝑰","I"],["𝑱","J"],["𝑲","K"],["𝑳","L"],["𝑴","M"],["𝑵","N"],["𝑶","O"],["𝑷","P"],["𝑸","Q"],["𝑹","R"],["𝑺","S"],["𝑻","T"],["𝑼","U"],["𝑽","V"],["𝑾","W"],["𝑿","X"],["𝒀","Y"],["𝒁","Z"],["𝒂","a"],["𝒃","b"],["𝒄","c"],["𝒅","d"],["𝒆","e"],["𝒇","f"],["𝒈","g"],["𝒉","h"],["𝒊","i"],["𝒋","j"],["𝒌","k"],["𝒍","l"],["𝒎","m"],["𝒏","n"],["𝒐","o"],["𝒑","p"],["𝒒","q"],["𝒓","r"],["𝒔","s"],["𝒕","t"],["𝒖","u"],["𝒗","v"],["𝒘","w"],["𝒙","x"],["𝒚","y"],["𝒛","z"],["𝒜","A"],["𝒞","C"],["𝒟","D"],["𝒢","g"],["𝒥","J"],["𝒦","K"],["𝒩","N"],["𝒪","O"],["𝒫","P"],["𝒬","Q"],["𝒮","S"],["𝒯","T"],["𝒰","U"],["𝒱","V"],["𝒲","W"],["𝒳","X"],["𝒴","Y"],["𝒵","Z"],["𝒶","a"],["𝒷","b"],["𝒸","c"],["𝒹","d"],["𝒻","f"],["𝒽","h"],["𝒾","i"],["𝒿","j"],["𝓀","h"],["𝓁","l"],["𝓂","m"],["𝓃","n"],["𝓅","p"],["𝓆","q"],["𝓇","r"],["𝓈","s"],["𝓉","t"],["𝓊","u"],["𝓋","v"],["𝓌","w"],["𝓍","x"],["𝓎","y"],["𝓏","z"],["𝓐","A"],["𝓑","B"],["𝓒","C"],["𝓓","D"],["𝓔","E"],["𝓕","F"],["𝓖","G"],["𝓗","H"],["𝓘","I"],["𝓙","J"],["𝓚","K"],["𝓛","L"],["𝓜","M"],["𝓝","N"],["𝓞","O"],["𝓟","P"],["𝓠","Q"],["𝓡","R"],["𝓢","S"],["𝓣","T"],["𝓤","U"],["𝓥","V"],["𝓦","W"],["𝓧","X"],["𝓨","Y"],["𝓩","Z"],["𝓪","a"],["𝓫","b"],["𝓬","c"],["𝓭","d"],["𝓮","e"],["𝓯","f"],["𝓰","g"],["𝓱","h"],["𝓲","i"],["𝓳","j"],["𝓴","k"],["𝓵","l"],["𝓶","m"],["𝓷","n"],["𝓸","o"],["𝓹","p"],["𝓺","q"],["𝓻","r"],["𝓼","s"],["𝓽","t"],["𝓾","u"],["𝓿","v"],["𝔀","w"],["𝔁","x"],["𝔂","y"],["𝔃","z"],["𝔄","A"],["𝔅","B"],["𝔇","D"],["𝔈","E"],["𝔉","F"],["𝔊","G"],["𝔍","J"],["𝔎","K"],["𝔏","L"],["𝔐","M"],["𝔑","N"],["𝔒","O"],["𝔓","P"],["𝔔","Q"],["𝔖","S"],["𝔗","T"],["𝔘","U"],["𝔙","V"],["𝔚","W"],["𝔛","X"],["𝔜","Y"],["𝔞","a"],["𝔟","b"],["𝔠","c"],["𝔡","d"],["𝔢","e"],["𝔣","f"],["𝔤","g"],["𝔥","h"],["𝔦","i"],["𝔧","j"],["𝔨","k"],["𝔩","l"],["𝔪","m"],["𝔫","n"],["𝔬","o"],["𝔭","p"],["𝔮","q"],["𝔯","r"],["𝔰","s"],["𝔱","t"],["𝔲","u"],["𝔳","v"],["𝔴","w"],["𝔵","x"],["𝔶","y"],["𝔷","z"],["𝔸","A"],["𝔹","B"],["𝔻","D"],["𝔼","E"],["𝔽","F"],["𝔾","G"],["𝕀","I"],["𝕁","J"],["𝕂","K"],["𝕃","L"],["𝕄","M"],["𝕆","N"],["𝕊","S"],["𝕋","T"],["𝕌","U"],["𝕍","V"],["𝕎","W"],["𝕏","X"],["𝕐","Y"],["𝕒","a"],["𝕓","b"],["𝕔","c"],["𝕕","d"],["𝕖","e"],["𝕗","f"],["𝕘","g"],["𝕙","h"],["𝕚","i"],["𝕛","j"],["𝕜","k"],["𝕝","l"],["𝕞","m"],["𝕟","n"],["𝕠","o"],["𝕡","p"],["𝕢","q"],["𝕣","r"],["𝕤","s"],["𝕥","t"],["𝕦","u"],["𝕧","v"],["𝕨","w"],["𝕩","x"],["𝕪","y"],["𝕫","z"],["𝕬","A"],["𝕭","B"],["𝕮","C"],["𝕯","D"],["𝕰","E"],["𝕱","F"],["𝕲","G"],["𝕳","H"],["𝕴","I"],["𝕵","J"],["𝕶","K"],["𝕷","L"],["𝕸","M"],["𝕹","N"],["𝕺","O"],["𝕻","P"],["𝕼","Q"],["𝕽","R"],["𝕾","S"],["𝕿","T"],["𝖀","U"],["𝖁","V"],["𝖂","W"],["𝖃","X"],["𝖄","Y"],["𝖅","Z"],["𝖆","a"],["𝖇","b"],["𝖈","c"],["𝖉","d"],["𝖊","e"],["𝖋","f"],["𝖌","g"],["𝖍","h"],["𝖎","i"],["𝖏","j"],["𝖐","k"],["𝖑","l"],["𝖒","m"],["𝖓","n"],["𝖔","o"],["𝖕","p"],["𝖖","q"],["𝖗","r"],["𝖘","s"],["𝖙","t"],["𝖚","u"],["𝖛","v"],["𝖜","w"],["𝖝","x"],["𝖞","y"],["𝖟","z"],["𝖠","A"],["𝖡","B"],["𝖢","C"],["𝖣","D"],["𝖤","E"],["𝖥","F"],["𝖦","G"],["𝖧","H"],["𝖨","I"],["𝖩","J"],["𝖪","K"],["𝖫","L"],["𝖬","M"],["𝖭","N"],["𝖮","O"],["𝖯","P"],["𝖰","Q"],["𝖱","R"],["𝖲","S"],["𝖳","T"],["𝖴","U"],["𝖵","V"],["𝖶","W"],["𝖷","X"],["𝖸","Y"],["𝖹","Z"],["𝖺","a"],["𝖻","b"],["𝖼","c"],["𝖽","d"],["𝖾","e"],["𝖿","f"],["𝗀","g"],["𝗁","h"],["𝗂","i"],["𝗃","j"],["𝗄","k"],["𝗅","l"],["𝗆","m"],["𝗇","n"],["𝗈","o"],["𝗉","p"],["𝗊","q"],["𝗋","r"],["𝗌","s"],["𝗍","t"],["𝗎","u"],["𝗏","v"],["𝗐","w"],["𝗑","x"],["𝗒","y"],["𝗓","z"],["𝗔","A"],["𝗕","B"],["𝗖","C"],["𝗗","D"],["𝗘","E"],["𝗙","F"],["𝗚","G"],["𝗛","H"],["𝗜","I"],["𝗝","J"],["𝗞","K"],["𝗟","L"],["𝗠","M"],["𝗡","N"],["𝗢","O"],["𝗣","P"],["𝗤","Q"],["𝗥","R"],["𝗦","S"],["𝗧","T"],["𝗨","U"],["𝗩","V"],["𝗪","W"],["𝗫","X"],["𝗬","Y"],["𝗭","Z"],["𝗮","a"],["𝗯","b"],["𝗰","c"],["𝗱","d"],["𝗲","e"],["𝗳","f"],["𝗴","g"],["𝗵","h"],["𝗶","i"],["𝗷","j"],["𝗸","k"],["𝗹","l"],["𝗺","m"],["𝗻","n"],["𝗼","o"],["𝗽","p"],["𝗾","q"],["𝗿","r"],["𝘀","s"],["𝘁","t"],["𝘂","u"],["𝘃","v"],["𝘄","w"],["𝘅","x"],["𝘆","y"],["𝘇","z"],["𝘈","A"],["𝘉","B"],["𝘊","C"],["𝘋","D"],["𝘌","E"],["𝘍","F"],["𝘎","G"],["𝘏","H"],["𝘐","I"],["𝘑","J"],["𝘒","K"],["𝘓","L"],["𝘔","M"],["𝘕","N"],["𝘖","O"],["𝘗","P"],["𝘘","Q"],["𝘙","R"],["𝘚","S"],["𝘛","T"],["𝘜","U"],["𝘝","V"],["𝘞","W"],["𝘟","X"],["𝘠","Y"],["𝘡","Z"],["𝘢","a"],["𝘣","b"],["𝘤","c"],["𝘥","d"],["𝘦","e"],["𝘧","f"],["𝘨","g"],["𝘩","h"],["𝘪","i"],["𝘫","j"],["𝘬","k"],["𝘭","l"],["𝘮","m"],["𝘯","n"],["𝘰","o"],["𝘱","p"],["𝘲","q"],["𝘳","r"],["𝘴","s"],["𝘵","t"],["𝘶","u"],["𝘷","v"],["𝘸","w"],["𝘹","x"],["𝘺","y"],["𝘻","z"],["𝘼","A"],["𝘽","B"],["𝘾","C"],["𝘿","D"],["𝙀","E"],["𝙁","F"],["𝙂","G"],["𝙃","H"],["𝙄","I"],["𝙅","J"],["𝙆","K"],["𝙇","L"],["𝙈","M"],["𝙉","N"],["𝙊","O"],["𝙋","P"],["𝙌","Q"],["𝙍","R"],["𝙎","S"],["𝙏","T"],["𝙐","U"],["𝙑","V"],["𝙒","W"],["𝙓","X"],["𝙔","Y"],["𝙕","Z"],["𝙖","a"],["𝙗","b"],["𝙘","c"],["𝙙","d"],["𝙚","e"],["𝙛","f"],["𝙜","g"],["𝙝","h"],["𝙞","i"],["𝙟","j"],["𝙠","k"],["𝙡","l"],["𝙢","m"],["𝙣","n"],["𝙤","o"],["𝙥","p"],["𝙦","q"],["𝙧","r"],["𝙨","s"],["𝙩","t"],["𝙪","u"],["𝙫","v"],["𝙬","w"],["𝙭","x"],["𝙮","y"],["𝙯","z"],["𝙰","A"],["𝙱","B"],["𝙲","C"],["𝙳","D"],["𝙴","E"],["𝙵","F"],["𝙶","G"],["𝙷","H"],["𝙸","I"],["𝙹","J"],["𝙺","K"],["𝙻","L"],["𝙼","M"],["𝙽","N"],["𝙾","O"],["𝙿","P"],["𝚀","Q"],["𝚁","R"],["𝚂","S"],["𝚃","T"],["𝚄","U"],["𝚅","V"],["𝚆","W"],["𝚇","X"],["𝚈","Y"],["𝚉","Z"],["𝚊","a"],["𝚋","b"],["𝚌","c"],["𝚍","d"],["𝚎","e"],["𝚏","f"],["𝚐","g"],["𝚑","h"],["𝚒","i"],["𝚓","j"],["𝚔","k"],["𝚕","l"],["𝚖","m"],["𝚗","n"],["𝚘","o"],["𝚙","p"],["𝚚","q"],["𝚛","r"],["𝚜","s"],["𝚝","t"],["𝚞","u"],["𝚟","v"],["𝚠","w"],["𝚡","x"],["𝚢","y"],["𝚣","z"],["𝚤","l"],["𝚥","j"],["𝛢","A"],["𝛣","B"],["𝛤","G"],["𝛥","D"],["𝛦","E"],["𝛧","Z"],["𝛨","I"],["𝛩","TH"],["𝛪","I"],["𝛫","K"],["𝛬","L"],["𝛭","M"],["𝛮","N"],["𝛯","KS"],["𝛰","O"],["𝛱","P"],["𝛲","R"],["𝛳","TH"],["𝛴","S"],["𝛵","T"],["𝛶","Y"],["𝛷","F"],["𝛸","x"],["𝛹","PS"],["𝛺","O"],["𝛻","D"],["𝛼","a"],["𝛽","b"],["𝛾","g"],["𝛿","d"],["𝜀","e"],["𝜁","z"],["𝜂","i"],["𝜃","th"],["𝜄","i"],["𝜅","k"],["𝜆","l"],["𝜇","m"],["𝜈","n"],["𝜉","ks"],["𝜊","o"],["𝜋","p"],["𝜌","r"],["𝜍","s"],["𝜎","s"],["𝜏","t"],["𝜐","y"],["𝜑","f"],["𝜒","x"],["𝜓","ps"],["𝜔","o"],["𝜕","d"],["𝜖","E"],["𝜗","TH"],["𝜘","K"],["𝜙","f"],["𝜚","r"],["𝜛","p"],["𝜜","A"],["𝜝","V"],["𝜞","G"],["𝜟","D"],["𝜠","E"],["𝜡","Z"],["𝜢","I"],["𝜣","TH"],["𝜤","I"],["𝜥","K"],["𝜦","L"],["𝜧","M"],["𝜨","N"],["𝜩","KS"],["𝜪","O"],["𝜫","P"],["𝜬","S"],["𝜭","TH"],["𝜮","S"],["𝜯","T"],["𝜰","Y"],["𝜱","F"],["𝜲","X"],["𝜳","PS"],["𝜴","O"],["𝜵","D"],["𝜶","a"],["𝜷","v"],["𝜸","g"],["𝜹","d"],["𝜺","e"],["𝜻","z"],["𝜼","i"],["𝜽","th"],["𝜾","i"],["𝜿","k"],["𝝀","l"],["𝝁","m"],["𝝂","n"],["𝝃","ks"],["𝝄","o"],["𝝅","p"],["𝝆","r"],["𝝇","s"],["𝝈","s"],["𝝉","t"],["𝝊","y"],["𝝋","f"],["𝝌","x"],["𝝍","ps"],["𝝎","o"],["𝝏","a"],["𝝐","e"],["𝝑","i"],["𝝒","k"],["𝝓","f"],["𝝔","r"],["𝝕","p"],["𝝖","A"],["𝝗","B"],["𝝘","G"],["𝝙","D"],["𝝚","E"],["𝝛","Z"],["𝝜","I"],["𝝝","TH"],["𝝞","I"],["𝝟","K"],["𝝠","L"],["𝝡","M"],["𝝢","N"],["𝝣","KS"],["𝝤","O"],["𝝥","P"],["𝝦","R"],["𝝧","TH"],["𝝨","S"],["𝝩","T"],["𝝪","Y"],["𝝫","F"],["𝝬","X"],["𝝭","PS"],["𝝮","O"],["𝝯","D"],["𝝰","a"],["𝝱","v"],["𝝲","g"],["𝝳","d"],["𝝴","e"],["𝝵","z"],["𝝶","i"],["𝝷","th"],["𝝸","i"],["𝝹","k"],["𝝺","l"],["𝝻","m"],["𝝼","n"],["𝝽","ks"],["𝝾","o"],["𝝿","p"],["𝞀","r"],["𝞁","s"],["𝞂","s"],["𝞃","t"],["𝞄","y"],["𝞅","f"],["𝞆","x"],["𝞇","ps"],["𝞈","o"],["𝞉","a"],["𝞊","e"],["𝞋","i"],["𝞌","k"],["𝞍","f"],["𝞎","r"],["𝞏","p"],["𝞐","A"],["𝞑","V"],["𝞒","G"],["𝞓","D"],["𝞔","E"],["𝞕","Z"],["𝞖","I"],["𝞗","TH"],["𝞘","I"],["𝞙","K"],["𝞚","L"],["𝞛","M"],["𝞜","N"],["𝞝","KS"],["𝞞","O"],["𝞟","P"],["𝞠","S"],["𝞡","TH"],["𝞢","S"],["𝞣","T"],["𝞤","Y"],["𝞥","F"],["𝞦","X"],["𝞧","PS"],["𝞨","O"],["𝞩","D"],["𝞪","av"],["𝞫","g"],["𝞬","d"],["𝞭","e"],["𝞮","z"],["𝞯","i"],["𝞰","i"],["𝞱","th"],["𝞲","i"],["𝞳","k"],["𝞴","l"],["𝞵","m"],["𝞶","n"],["𝞷","ks"],["𝞸","o"],["𝞹","p"],["𝞺","r"],["𝞻","s"],["𝞼","s"],["𝞽","t"],["𝞾","y"],["𝞿","f"],["𝟀","x"],["𝟁","ps"],["𝟂","o"],["𝟃","a"],["𝟄","e"],["𝟅","i"],["𝟆","k"],["𝟇","f"],["𝟈","r"],["𝟉","p"],["𝟊","F"],["𝟋","f"],["⒜","(a)"],["⒝","(b)"],["⒞","(c)"],["⒟","(d)"],["⒠","(e)"],["⒡","(f)"],["⒢","(g)"],["⒣","(h)"],["⒤","(i)"],["⒥","(j)"],["⒦","(k)"],["⒧","(l)"],["⒨","(m)"],["⒩","(n)"],["⒪","(o)"],["⒫","(p)"],["⒬","(q)"],["⒭","(r)"],["⒮","(s)"],["⒯","(t)"],["⒰","(u)"],["⒱","(v)"],["⒲","(w)"],["⒳","(x)"],["⒴","(y)"],["⒵","(z)"],["Ⓐ","(A)"],["Ⓑ","(B)"],["Ⓒ","(C)"],["Ⓓ","(D)"],["Ⓔ","(E)"],["Ⓕ","(F)"],["Ⓖ","(G)"],["Ⓗ","(H)"],["Ⓘ","(I)"],["Ⓙ","(J)"],["Ⓚ","(K)"],["Ⓛ","(L)"],["Ⓝ","(N)"],["Ⓞ","(O)"],["Ⓟ","(P)"],["Ⓠ","(Q)"],["Ⓡ","(R)"],["Ⓢ","(S)"],["Ⓣ","(T)"],["Ⓤ","(U)"],["Ⓥ","(V)"],["Ⓦ","(W)"],["Ⓧ","(X)"],["Ⓨ","(Y)"],["Ⓩ","(Z)"],["ⓐ","(a)"],["ⓑ","(b)"],["ⓒ","(b)"],["ⓓ","(c)"],["ⓔ","(e)"],["ⓕ","(f)"],["ⓖ","(g)"],["ⓗ","(h)"],["ⓘ","(i)"],["ⓙ","(j)"],["ⓚ","(k)"],["ⓛ","(l)"],["ⓜ","(m)"],["ⓝ","(n)"],["ⓞ","(o)"],["ⓟ","(p)"],["ⓠ","(q)"],["ⓡ","(r)"],["ⓢ","(s)"],["ⓣ","(t)"],["ⓤ","(u)"],["ⓥ","(v)"],["ⓦ","(w)"],["ⓧ","(x)"],["ⓨ","(y)"],["ⓩ","(z)"],["Ċ","C"],["ċ","c"],["Ġ","G"],["ġ","g"],["Ħ","H"],["ħ","h"],["Ż","Z"],["ż","z"],["𝟎","0"],["𝟏","1"],["𝟐","2"],["𝟑","3"],["𝟒","4"],["𝟓","5"],["𝟔","6"],["𝟕","7"],["𝟖","8"],["𝟗","9"],["𝟘","0"],["𝟙","1"],["𝟚","2"],["𝟛","3"],["𝟜","4"],["𝟝","5"],["𝟞","6"],["𝟟","7"],["𝟠","8"],["𝟡","9"],["𝟢","0"],["𝟣","1"],["𝟤","2"],["𝟥","3"],["𝟦","4"],["𝟧","5"],["𝟨","6"],["𝟩","7"],["𝟪","8"],["𝟫","9"],["𝟬","0"],["𝟭","1"],["𝟮","2"],["𝟯","3"],["𝟰","4"],["𝟱","5"],["𝟲","6"],["𝟳","7"],["𝟴","8"],["𝟵","9"],["𝟶","0"],["𝟷","1"],["𝟸","2"],["𝟹","3"],["𝟺","4"],["𝟻","5"],["𝟼","6"],["𝟽","7"],["𝟾","8"],["𝟿","9"],["①","1"],["②","2"],["③","3"],["④","4"],["⑤","5"],["⑥","6"],["⑦","7"],["⑧","8"],["⑨","9"],["⑩","10"],["⑪","11"],["⑫","12"],["⑬","13"],["⑭","14"],["⑮","15"],["⑯","16"],["⑰","17"],["⑱","18"],["⑲","19"],["⑳","20"],["⑴","1"],["⑵","2"],["⑶","3"],["⑷","4"],["⑸","5"],["⑹","6"],["⑺","7"],["⑻","8"],["⑼","9"],["⑽","10"],["⑾","11"],["⑿","12"],["⒀","13"],["⒁","14"],["⒂","15"],["⒃","16"],["⒄","17"],["⒅","18"],["⒆","19"],["⒇","20"],["⒈","1."],["⒉","2."],["⒊","3."],["⒋","4."],["⒌","5."],["⒍","6."],["⒎","7."],["⒏","8."],["⒐","9."],["⒑","10."],["⒒","11."],["⒓","12."],["⒔","13."],["⒕","14."],["⒖","15."],["⒗","16."],["⒘","17."],["⒙","18."],["⒚","19."],["⒛","20."],["⓪","0"],["⓫","11"],["⓬","12"],["⓭","13"],["⓮","14"],["⓯","15"],["⓰","16"],["⓱","17"],["⓲","18"],["⓳","19"],["⓴","20"],["⓵","1"],["⓶","2"],["⓷","3"],["⓸","4"],["⓹","5"],["⓺","6"],["⓻","7"],["⓼","8"],["⓽","9"],["⓾","10"],["⓿","0"],["🙰","&"],["🙱","&"],["🙲","&"],["🙳","&"],["🙴","&"],["🙵","&"],["🙶",'"'],["🙷",'"'],["🙸",'"'],["‽","?!"],["🙹","?!"],["🙺","?!"],["🙻","?!"],["🙼","/"],["🙽","\\"],["🜇","AR"],["🜈","V"],["🜉","V"],["🜆","VR"],["🜅","VF"],["🜩","2"],["🜪","5"],["🝡","f"],["🝢","W"],["🝣","U"],["🝧","V"],["🝨","T"],["🝪","V"],["🝫","MB"],["🝬","VB"],["🝲","3B"],["🝳","3B"],["💯","100"],["🔙","BACK"],["🔚","END"],["🔛","ON!"],["🔜","SOON"],["🔝","TOP"],["🔞","18"],["🔤","abc"],["🔠","ABCD"],["🔡","abcd"],["🔢","1234"],["🔣","T&@%"],["#️⃣","#"],["*️⃣","*"],["0️⃣","0"],["1️⃣","1"],["2️⃣","2"],["3️⃣","3"],["4️⃣","4"],["5️⃣","5"],["6️⃣","6"],["7️⃣","7"],["8️⃣","8"],["9️⃣","9"],["🔟","10"],["🅰️","A"],["🅱️","B"],["🆎","AB"],["🆑","CL"],["🅾️","O"],["🅿","P"],["🆘","SOS"],["🅲","C"],["🅳","D"],["🅴","E"],["🅵","F"],["🅶","G"],["🅷","H"],["🅸","I"],["🅹","J"],["🅺","K"],["🅻","L"],["🅼","M"],["🅽","N"],["🆀","Q"],["🆁","R"],["🆂","S"],["🆃","T"],["🆄","U"],["🆅","V"],["🆆","W"],["🆇","X"],["🆈","Y"],["🆉","Z"]],Xx=(n,e)=>{for(const[t,r]of e)n=n.replace(new RegExp(Ro(t),"g"),r);return n};function Qx(n,e){if(typeof n!="string")throw new TypeError(`Expected a string, got \`${typeof n}\``);e={customReplacements:[],...e};const t=new Map([...Gx,...e.customReplacements]);return n=n.normalize(),n=Xx(n,t),n=n.normalize("NFD").replace(/\p{Diacritic}/gu,"").normalize(),n}const Zx=[["&"," and "],["🦄"," unicorn "],["♥"," love "]],e3=n=>n.replace(/([A-Z]{2,})(\d+)/g,"$1 $2").replace(/([a-z\d]+)([A-Z]{2,})/g,"$1 $2").replace(/([a-z\d])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-rt-z\d]+)/g,"$1 $2"),t3=(n,e)=>{const t=Ro(e);return n.replace(new RegExp(`${t}{2,}`,"g"),e).replace(new RegExp(`^${t}|${t}$`,"g"),"")},n3=n=>{let e="a-z\\d";if(e+=n.lowercase?"":"A-Z",n.preserveCharacters.length>0)for(const t of n.preserveCharacters){if(t===n.separator)throw new Error(`The separator character \`${n.separator}\` cannot be included in preserved characters: ${n.preserveCharacters}`);e+=Ro(t)}return new RegExp(`[^${e}]+`,"g")};function Iv(n,e){if(typeof n!="string")throw new TypeError(`Expected a string, got \`${typeof n}\``);e={separator:"-",lowercase:!0,decamelize:!0,customReplacements:[],preserveLeadingUnderscore:!1,preserveTrailingDash:!1,preserveCharacters:[],...e};const t=e.preserveLeadingUnderscore&&n.startsWith("_"),r=e.preserveTrailingDash&&n.endsWith("-"),i=new Map([...Zx,...e.customReplacements]);n=Qx(n,{customReplacements:i}),e.decamelize&&(n=e3(n));const o=n3(e);return e.lowercase&&(n=n.toLowerCase()),n=n.replace(/([a-zA-Z\d]+)'([ts])(\s|$)/g,"$1$2$3"),n=n.replace(o,e.separator),n=n.replace(/\\/g,""),e.separator&&(n=t3(n,e.separator)),t&&(n=`_${n}`),r&&(n=`${n}-`),n}function Rv(n,e){return function(t,r){let{$from:i,$to:o,node:s}=t.selection;if(s&&s.isBlock||i.depth<2||!i.sameParent(o))return!1;let l=i.node(-1);if(l.type!=n)return!1;if(i.parent.content.size==0&&i.node(-1).childCount==i.indexAfter(-1)){if(i.depth==3||i.node(-3).type!=n||i.index(-2)!=i.node(-2).childCount-1)return!1;if(r){let f=_.empty,h=i.index(-1)?1:i.index(-2)?2:3;for(let g=i.depth-h;g>=i.depth-3;g--)f=_.from(i.node(g).copy(f));let d=i.indexAfter(-1){if(y>-1)return!1;g.isTextblock&&g.content.size==0&&(y=v+1)}),y>-1&&m.setSelection(q.near(m.doc.resolve(y))),r(m.scrollIntoView())}return!0}let a=o.pos==i.end()?l.contentMatchAt(0).defaultType:null,c=t.tr.delete(i.pos,o.pos),u=a?[e?{type:n,attrs:e}:null,{type:a}]:void 0;return Pr(c.doc,i.pos,2,u)?(r&&r(c.split(i.pos,2,u).scrollIntoView()),!0):!1}}function zv(n){return function(e,t){let{$from:r,$to:i}=e.selection,o=r.blockRange(i,s=>s.childCount>0&&s.firstChild.type==n);return o?t?r.node(o.depth-1).type==n?r3(e,t,n,o):i3(e,t,o):!0:!1}}function r3(n,e,t,r){let i=n.tr,o=r.end,s=r.$to.end(r.depth);om;p--)d-=i.child(p).nodeSize,r.delete(d-1,d+1);let o=r.doc.resolve(t.start),s=o.nodeAfter;if(r.mapping.map(t.end)!=t.start+o.nodeAfter.nodeSize)return!1;let l=t.startIndex==0,a=t.endIndex==i.childCount,c=o.node(-1),u=o.index(-1);if(!c.canReplace(u+(l?0:1),u+1,s.content.append(a?_.empty:_.from(i))))return!1;let f=o.pos,h=f+s.nodeSize;return r.step(new ke(f-(l?1:0),h+(a?1:0),f+1,h-1,new R((l?_.empty:_.from(i.copy(_.empty))).append(a?_.empty:_.from(i.copy(_.empty))),l?0:1,a?0:1),l?0:1)),e(r.scrollIntoView()),!0}function Fv(n){return function(e,t){let{$from:r,$to:i}=e.selection,o=r.blockRange(i,c=>c.childCount>0&&c.firstChild.type==n);if(!o)return!1;let s=o.startIndex;if(s==0)return!1;let l=o.parent,a=l.child(s-1);if(a.type!=n)return!1;if(t){let c=a.lastChild&&a.lastChild.type==l.type,u=_.from(c?n.create():null),f=new R(_.from(n.create(null,_.from(l.type.create(null,u)))),c?3:1,0),h=o.start,d=o.end;t(e.tr.step(new ke(h-(c?3:1),d,h,d,f,1,!0)).scrollIntoView())}return!0}}function o3(n){const e=new Map;if(!n||!n.type)throw new Error("mdast-util-definitions expected node");return Hl(n,"definition",function(r){const i=pu(r.identifier);i&&!e.get(i)&&e.set(i,r)}),t;function t(r){const i=pu(r);return e.get(i)}}function pu(n){return String(n||"").toUpperCase()}function Pv(){return function(n){const e=o3(n);Hl(n,function(t,r,i){if(t.type==="definition"&&i!==void 0&&typeof r=="number")return i.children.splice(r,1),[Gs,r];if(t.type==="imageReference"||t.type==="linkReference"){const o=e(t.identifier);if(o&&i&&typeof r=="number")return i.children[r]=t.type==="imageReference"?{type:"image",url:o.url,title:o.title,alt:t.alt}:{type:"link",url:o.url,title:o.title,children:t.children},[Gs,r]}})}}var hl,dl;if(typeof WeakMap<"u"){let n=new WeakMap;hl=e=>n.get(e),dl=(e,t)=>(n.set(e,t),t)}else{const n=[];let t=0;hl=r=>{for(let i=0;i(t==10&&(t=0),n[t++]=r,n[t++]=i)}var se=class{constructor(n,e,t,r){this.width=n,this.height=e,this.map=t,this.problems=r}findCell(n){for(let e=0;e=t){(o||(o=[])).push({type:"overlong_rowspan",pos:u,n:g-x});break}const C=i+x*e;for(let O=0;Or&&(o+=c.attrs.colspan)}}for(let s=0;s1&&(t=!0)}e==-1?e=o:e!=o&&(e=Math.max(e,o))}return e}function a3(n,e,t){n.problems||(n.problems=[]);const r={};for(let i=0;iNumber(s)):null,i=Number(n.getAttribute("colspan")||1),o={colspan:i,rowspan:Number(n.getAttribute("rowspan")||1),colwidth:r&&r.length==i?r:null};for(const s in e){const l=e[s].getFromDOM,a=l&&l(n);a!=null&&(o[s]=a)}return o}function gu(n,e){const t={};n.attrs.colspan!=1&&(t.colspan=n.attrs.colspan),n.attrs.rowspan!=1&&(t.rowspan=n.attrs.rowspan),n.attrs.colwidth&&(t["data-colwidth"]=n.attrs.colwidth.join(","));for(const r in e){const i=e[r].setDOMAttr;i&&i(n.attrs[r],t)}return t}function Lv(n){const e=n.cellAttributes||{},t={colspan:{default:1},rowspan:{default:1},colwidth:{default:null}};for(const r in e)t[r]={default:e[r].default};return{table:{content:"table_row+",tableRole:"table",isolating:!0,group:n.tableGroup,parseDOM:[{tag:"table"}],toDOM(){return["table",["tbody",0]]}},table_row:{content:"(table_cell | table_header)*",tableRole:"row",parseDOM:[{tag:"tr"}],toDOM(){return["tr",0]}},table_cell:{content:n.cellContent,attrs:t,tableRole:"cell",isolating:!0,parseDOM:[{tag:"td",getAttrs:r=>mu(r,e)}],toDOM(r){return["td",gu(r,e),0]}},table_header:{content:n.cellContent,attrs:t,tableRole:"header_cell",isolating:!0,parseDOM:[{tag:"th",getAttrs:r=>mu(r,e)}],toDOM(r){return["th",gu(r,e),0]}}}}function ot(n){let e=n.cached.tableNodeTypes;if(!e){e=n.cached.tableNodeTypes={};for(const t in n.nodes){const r=n.nodes[t],i=r.spec.tableRole;i&&(e[i]=r)}}return e}var Kt=new hr("selectingCells");function ci(n){for(let e=n.depth-1;e>0;e--)if(n.node(e).type.spec.tableRole=="row")return n.node(0).resolve(n.before(e+1));return null}function Lt(n){const e=n.selection.$head;for(let t=e.depth;t>0;t--)if(e.node(t).type.spec.tableRole=="row")return!0;return!1}function zo(n){const e=n.selection;if("$anchorCell"in e&&e.$anchorCell)return e.$anchorCell.pos>e.$headCell.pos?e.$anchorCell:e.$headCell;if("node"in e&&e.node&&e.node.type.spec.tableRole=="cell")return e.$anchor;const t=ci(e.$head)||u3(e.$head);if(t)return t;throw new RangeError(`No cell found around position ${e.head}`)}function u3(n){for(let e=n.nodeAfter,t=n.pos;e;e=e.firstChild,t++){const r=e.type.spec.tableRole;if(r=="cell"||r=="header_cell")return n.doc.resolve(t)}for(let e=n.nodeBefore,t=n.pos;e;e=e.lastChild,t--){const r=e.type.spec.tableRole;if(r=="cell"||r=="header_cell")return n.doc.resolve(t-e.nodeSize)}}function pl(n){return n.parent.type.spec.tableRole=="row"&&!!n.nodeAfter}function f3(n){return n.node(0).resolve(n.pos+n.nodeAfter.nodeSize)}function ia(n,e){return n.depth==e.depth&&n.pos>=e.start(-1)&&n.pos<=e.end(-1)}function yd(n,e,t){const r=n.node(-1),i=se.get(r),o=n.start(-1),s=i.nextCell(n.pos-o,e,t);return s==null?null:n.node(0).resolve(o+s)}function In(n,e,t=1){const r={...n,colspan:n.colspan-t};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(e,t),r.colwidth.some(i=>i>0)||(r.colwidth=null)),r}function h3(n,e,t=1){const r={...n,colspan:n.colspan+t};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let i=0;iu!=t.pos-o);a.unshift(t.pos-o);const c=a.map(u=>{const f=r.nodeAt(u);if(!f)throw RangeError(`No cell with offset ${u} found`);const h=o+u+1;return new so(l.resolve(h),l.resolve(h+f.content.size))});super(c[0].$from,c[0].$to,c),this.$anchorCell=e,this.$headCell=t}map(e,t){const r=e.resolve(t.map(this.$anchorCell.pos)),i=e.resolve(t.map(this.$headCell.pos));if(pl(r)&&pl(i)&&ia(r,i)){const o=this.$anchorCell.node(-1)!=r.node(-1);return o&&this.isRowSelection()?Tt.rowSelection(r,i):o&&this.isColSelection()?Tt.colSelection(r,i):new Tt(r,i)}return X.between(r,i)}content(){const e=this.$anchorCell.node(-1),t=se.get(e),r=this.$anchorCell.start(-1),i=t.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r),o={},s=[];for(let a=i.top;a0||y>0){let g=p.attrs;if(m>0&&(g=In(g,0,m)),y>0&&(g=In(g,g.colspan-y,y)),d.lefti.bottom){const g={...p.attrs,rowspan:Math.min(d.bottom,i.bottom)-Math.max(d.top,i.top)};d.top0)return!1;const r=e+this.$anchorCell.nodeAfter.attrs.rowspan,i=t+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(r,i)==this.$headCell.node(-1).childCount}static colSelection(e,t=e){const r=e.node(-1),i=se.get(r),o=e.start(-1),s=i.findCell(e.pos-o),l=i.findCell(t.pos-o),a=e.node(0);return s.top<=l.top?(s.top>0&&(e=a.resolve(o+i.map[s.left])),l.bottom0&&(t=a.resolve(o+i.map[l.left])),s.bottom0)return!1;const s=i+this.$anchorCell.nodeAfter.attrs.colspan,l=o+this.$headCell.nodeAfter.attrs.colspan;return Math.max(s,l)==t.width}eq(e){return e instanceof Tt&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,t=e){const r=e.node(-1),i=se.get(r),o=e.start(-1),s=i.findCell(e.pos-o),l=i.findCell(t.pos-o),a=e.node(0);return s.left<=l.left?(s.left>0&&(e=a.resolve(o+i.map[s.top*i.width])),l.right0&&(t=a.resolve(o+i.map[l.top*i.width])),s.right{e.push(ze.node(r,r+t.nodeSize,{class:"selectedCell"}))}),oe.create(n.doc,e)}function g3({$from:n,$to:e}){if(n.pos==e.pos||n.pos=0&&!(n.after(i+1)=0&&!(e.before(o+1)>e.start(o));o--,r--);return t==r&&/row|table/.test(n.node(i).type.spec.tableRole)}function y3({$from:n,$to:e}){let t,r;for(let i=n.depth;i>0;i--){const o=n.node(i);if(o.type.spec.tableRole==="cell"||o.type.spec.tableRole==="header_cell"){t=o;break}}for(let i=e.depth;i>0;i--){const o=e.node(i);if(o.type.spec.tableRole==="cell"||o.type.spec.tableRole==="header_cell"){r=o;break}}return t!==r&&e.parentOffset===0}function b3(n,e,t){const r=(e||n).selection,i=(e||n).doc;let o,s;if(r instanceof $&&(s=r.node.type.spec.tableRole)){if(s=="cell"||s=="header_cell")o=ue.create(i,r.from);else if(s=="row"){const l=i.resolve(r.from+1);o=ue.rowSelection(l,l)}else if(!t){const l=se.get(r.node),a=r.from+1,c=a+l.map[l.width*l.height-1];o=ue.create(i,a+1,c)}}else r instanceof X&&g3(r)?o=X.create(i,r.from):r instanceof X&&y3(r)&&(o=X.create(i,r.$from.start(),r.$from.end()));return o&&(e||(e=n.tr)).setSelection(o),e}var w3=new hr("fix-tables");function wd(n,e,t,r){const i=n.childCount,o=e.childCount;e:for(let s=0,l=0;s{i.type.spec.tableRole=="table"&&(t=k3(n,i,o,t))};return e?e.doc!=n.doc&&wd(e.doc,n.doc,0,r):n.doc.descendants(r),t}function k3(n,e,t,r){const i=se.get(e);if(!i.problems)return r;r||(r=n.tr);const o=[];for(let a=0;a0){let d="cell";u.firstChild&&(d=u.firstChild.type.spec.tableRole);const p=[];for(let y=0;y0?-1:0;d3(e,r,i+o)&&(o=i==0||i==e.width?null:0);for(let s=0;s0&&i0&&e.map[l-1]==a||i0&&f==e.map[u-e.width]){const h=t.nodeAt(f).attrs;n.setNodeMarkup(n.mapping.slice(l).map(f+r),null,{...h,rowspan:h.rowspan-1}),c+=h.colspan-1}else if(i{s.attrs[n]!==e&&o.setNodeMarkup(l,null,{...s.attrs,[n]:e})}):o.setNodeMarkup(i.pos,null,{...i.nodeAfter.attrs,[n]:e}),r(o)}return!0}}function C3(n){return function(e,t){if(!Lt(e))return!1;if(t){const r=ot(e.schema),i=dr(e),o=e.tr,s=i.map.cellsInRect(n=="column"?{left:i.left,top:0,right:i.right,bottom:i.map.height}:n=="row"?{left:0,top:i.top,right:i.map.width,bottom:i.bottom}:i),l=s.map(a=>i.table.nodeAt(a));for(let a=0;a{const p=d+o.tableStart,m=s.doc.nodeAt(p);m&&s.setNodeMarkup(p,h,m.attrs)}),r(s)}return!0}}oa("row",{useDeprecatedLogic:!0});oa("column",{useDeprecatedLogic:!0});oa("cell",{useDeprecatedLogic:!0});function A3(n,e){if(e<0){const t=n.nodeBefore;if(t)return n.pos-t.nodeSize;for(let r=n.index(-1)-1,i=n.before();r>=0;r--){const o=n.node(-1).child(r),s=o.lastChild;if(s)return i-1-s.nodeSize;i-=o.nodeSize}}else{if(n.index()0;r--)if(t.node(r).type.spec.tableRole=="table")return e&&e(n.tr.delete(t.before(r),t.after(r)).scrollIntoView()),!0;return!1}function Ei(n,e){const t=n.selection;if(!(t instanceof ue))return!1;if(e){const r=n.tr,i=ot(n.schema).cell.createAndFill().content;t.forEachCell((o,s)=>{o.content.eq(i)||r.replace(r.mapping.map(s+1),r.mapping.map(s+o.nodeSize-1),new R(i,0,0))}),r.docChanged&&e(r)}return!0}function O3(n){if(!n.size)return null;let{content:e,openStart:t,openEnd:r}=n;for(;e.childCount==1&&(t>0&&r>0||e.child(0).type.spec.tableRole=="table");)t--,r--,e=e.child(0).content;const i=e.child(0),o=i.type.spec.tableRole,s=i.type.schema,l=[];if(o=="row")for(let a=0;a=0;s--){const{rowspan:l,colspan:a}=o.child(s).attrs;for(let c=i;c=e.length&&e.push(_.empty),t[i]r&&(h=h.type.createChecked(In(h.attrs,h.attrs.colspan,u+h.attrs.colspan-r),h.content)),c.push(h),u+=h.attrs.colspan;for(let d=1;di&&(f=f.type.create({...f.attrs,rowspan:Math.max(1,i-f.attrs.rowspan)},f.content)),a.push(f)}o.push(_.from(a))}t=o,e=i}return{width:n,height:e,rows:t}}function _3(n,e,t,r,i,o,s){const l=n.doc.type.schema,a=ot(l);let c,u;if(i>e.width)for(let f=0,h=0;fe.height){const f=[];for(let p=0,m=(e.height-1)*e.width;p=e.width?!1:t.nodeAt(e.map[m+p]).type==a.header_cell;f.push(y?u||(u=a.header_cell.createAndFill()):c||(c=a.cell.createAndFill()))}const h=a.row.create(null,_.from(f)),d=[];for(let p=e.height;p{if(!i)return!1;const o=t.selection;if(o instanceof ue)return qi(t,r,q.near(o.$headCell,e));if(n!="horiz"&&!o.empty)return!1;const s=kd(i,n,e);if(s==null)return!1;if(n=="horiz")return qi(t,r,q.near(t.doc.resolve(o.head+e),e));{const l=t.doc.resolve(s),a=yd(l,n,e);let c;return a?c=q.near(a,1):e<0?c=q.near(t.doc.resolve(l.before(-1)),-1):c=q.near(t.doc.resolve(l.after(-1)),1),qi(t,r,c)}}}function Ti(n,e){return(t,r,i)=>{if(!i)return!1;const o=t.selection;let s;if(o instanceof ue)s=o;else{const a=kd(i,n,e);if(a==null)return!1;s=new ue(t.doc.resolve(a))}const l=yd(s.$headCell,n,e);return l?qi(t,r,new ue(s.$anchorCell,l)):!1}}function N3(n,e){const t=n.state.doc,r=ci(t.resolve(e));return r?(n.dispatch(n.state.tr.setSelection(new ue(r))),!0):!1}function D3(n,e,t){if(!Lt(n.state))return!1;let r=O3(t);const i=n.state.selection;if(i instanceof ue){r||(r={width:1,height:1,rows:[_.from(ml(ot(n.state.schema).cell,t))]});const o=i.$anchorCell.node(-1),s=i.$anchorCell.start(-1),l=se.get(o).rectBetween(i.$anchorCell.pos-s,i.$headCell.pos-s);return r=E3(r,l.right-l.left,l.bottom-l.top),xu(n.state,n.dispatch,s,l,r),!0}else if(r){const o=zo(n.state),s=o.start(-1);return xu(n.state,n.dispatch,s,se.get(o.node(-1)).findCell(o.pos-s),r),!0}else return!1}function I3(n,e){var t;if(e.ctrlKey||e.metaKey)return;const r=ku(n,e.target);let i;if(e.shiftKey&&n.state.selection instanceof ue)o(n.state.selection.$anchorCell,e),e.preventDefault();else if(e.shiftKey&&r&&(i=ci(n.state.selection.$anchor))!=null&&((t=gs(n,e))==null?void 0:t.pos)!=i.pos)o(i,e),e.preventDefault();else if(!r)return;function o(a,c){let u=gs(n,c);const f=Kt.getState(n.state)==null;if(!u||!ia(a,u))if(f)u=a;else return;const h=new ue(a,u);if(f||!n.state.selection.eq(h)){const d=n.state.tr.setSelection(h);f&&d.setMeta(Kt,a.pos),n.dispatch(d)}}function s(){n.root.removeEventListener("mouseup",s),n.root.removeEventListener("dragstart",s),n.root.removeEventListener("mousemove",l),Kt.getState(n.state)!=null&&n.dispatch(n.state.tr.setMeta(Kt,-1))}function l(a){const c=a,u=Kt.getState(n.state);let f;if(u!=null)f=n.state.doc.resolve(u);else if(ku(n,c.target)!=r&&(f=gs(n,e),!f))return s();f&&o(f,c)}n.root.addEventListener("mouseup",s),n.root.addEventListener("dragstart",s),n.root.addEventListener("mousemove",l)}function kd(n,e,t){if(!(n.state.selection instanceof X))return null;const{$head:r}=n.state.selection;for(let i=r.depth-1;i>=0;i--){const o=r.node(i);if((t<0?r.index(i):r.indexAfter(i))!=(t<0?0:o.childCount))return null;if(o.type.spec.tableRole=="cell"||o.type.spec.tableRole=="header_cell"){const l=r.before(i),a=e=="vert"?t>0?"down":"up":t>0?"right":"left";return n.endOfTextblock(a)?l:null}}return null}function ku(n,e){for(;e&&e!=n.dom;e=e.parentNode)if(e.nodeName=="TD"||e.nodeName=="TH")return e;return null}function gs(n,e){const t=n.posAtCoords({left:e.clientX,top:e.clientY});return t&&t?ci(n.state.doc.resolve(t.pos)):null}var R3=class{constructor(n,e){this.node=n,this.cellMinWidth=e,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),gl(n,this.colgroup,this.table,e),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(n){return n.type!=this.node.type?!1:(this.node=n,gl(n,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(n){return n.type=="attributes"&&(n.target==this.table||this.colgroup.contains(n.target))}};function gl(n,e,t,r,i,o){var s;let l=0,a=!0,c=e.firstChild;const u=n.firstChild;if(u){for(let f=0,h=0;fnew t(f,e,h)),new z3(-1,!1)},apply(o,s){return s.apply(o)}},props:{attributes:o=>{const s=Ze.getState(o);return s&&s.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(o,s)=>{F3(o,s,n,e,r)},mouseleave:o=>{P3(o)},mousedown:(o,s)=>{L3(o,s,e)}},decorations:o=>{const s=Ze.getState(o);if(s&&s.activeHandle>-1)return q3(o,s.activeHandle)},nodeViews:{}}});return i}var z3=class Wi{constructor(e,t){this.activeHandle=e,this.dragging=t}apply(e){const t=this,r=e.getMeta(Ze);if(r&&r.setHandle!=null)return new Wi(r.setHandle,!1);if(r&&r.setDragging!==void 0)return new Wi(t.activeHandle,r.setDragging);if(t.activeHandle>-1&&e.docChanged){let i=e.mapping.map(t.activeHandle,-1);return pl(e.doc.resolve(i))||(i=-1),new Wi(i,t.dragging)}return t}};function F3(n,e,t,r,i){const o=Ze.getState(n.state);if(o&&!o.dragging){const s=V3(e.target);let l=-1;if(s){const{left:a,right:c}=s.getBoundingClientRect();e.clientX-a<=t?l=Su(n,e,"left",t):c-e.clientX<=t&&(l=Su(n,e,"right",t))}if(l!=o.activeHandle){if(!i&&l!==-1){const a=n.state.doc.resolve(l),c=a.node(-1),u=se.get(c),f=a.start(-1);if(u.colCount(a.pos-f)+a.nodeAfter.attrs.colspan-1==u.width-1)return}Sd(n,l)}}}function P3(n){const e=Ze.getState(n.state);e&&e.activeHandle>-1&&!e.dragging&&Sd(n,-1)}function L3(n,e,t){var r;const i=(r=n.dom.ownerDocument.defaultView)!=null?r:window,o=Ze.getState(n.state);if(!o||o.activeHandle==-1||o.dragging)return!1;const s=n.state.doc.nodeAt(o.activeHandle),l=B3(n,o.activeHandle,s.attrs);n.dispatch(n.state.tr.setMeta(Ze,{setDragging:{startX:e.clientX,startWidth:l}}));function a(u){i.removeEventListener("mouseup",a),i.removeEventListener("mousemove",c);const f=Ze.getState(n.state);f!=null&&f.dragging&&(H3(n,f.activeHandle,vu(f.dragging,u,t)),n.dispatch(n.state.tr.setMeta(Ze,{setDragging:null})))}function c(u){if(!u.which)return a(u);const f=Ze.getState(n.state);if(f&&f.dragging){const h=vu(f.dragging,u,t);$3(n,f.activeHandle,h,t)}}return i.addEventListener("mouseup",a),i.addEventListener("mousemove",c),e.preventDefault(),!0}function B3(n,e,{colspan:t,colwidth:r}){const i=r&&r[r.length-1];if(i)return i;const o=n.domAtPos(e);let l=o.node.childNodes[o.offset].offsetWidth,a=t;if(r)for(let c=0;c{yl=!0},compositionend:()=>{yl=!1}}}};function X3(n){const{$from:e,$to:t,to:r}=n.selection;if(yl&&e.sameParent(t)){const i=ze.widget(r,Q3,{ignoreSelection:!0,key:"safari-ime-span"});return oe.create(n.doc,[i])}}function Q3(n){const e=n.dom.ownerDocument.createElement("span");return e.className="ProseMirror-safari-ime-span",e}var Kv=new oi(Y3?G3:{key:vd});function Cu(n,e){const t=String(n);if(typeof e!="string")throw new TypeError("Expected character");let r=0,i=t.indexOf(e);for(;i!==-1;)r++,i=t.indexOf(e,i+e.length);return r}function Z3(n,e,t){const i=Oo((t||{}).ignore||[]),o=e6(e);let s=-1;for(;++s0?{type:"text",value:k}:void 0),k===!1?h.lastIndex=C+1:(p!==C&&v.push({type:"text",value:c.value.slice(p,C)}),Array.isArray(k)?v.push(...k):k&&v.push(k),p=C+x[0].length,g=!0),!h.global)break;x=h.exec(c.value)}return g?(p?\]}]+$/.exec(n);if(!e)return[n,void 0];n=n.slice(0,e.index);let t=e[0],r=t.indexOf(")");const i=Cu(n,"(");let o=Cu(n,")");for(;r!==-1&&i>o;)n+=t.slice(0,r+1),t=t.slice(r+1),r=t.indexOf(")"),o++;return[n,t]}function Cd(n,e){const t=n.input.charCodeAt(n.index-1);return(n.index===0||Tn(t)||Co(t))&&(!e||t!==47)}Ad.peek=A6;function m6(){return{enter:{gfmFootnoteDefinition:y6,gfmFootnoteDefinitionLabelString:b6,gfmFootnoteCall:k6,gfmFootnoteCallString:S6},exit:{gfmFootnoteDefinition:x6,gfmFootnoteDefinitionLabelString:w6,gfmFootnoteCall:C6,gfmFootnoteCallString:v6}}}function g6(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:O6,footnoteReference:Ad}}}function y6(n){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},n)}function b6(){this.buffer()}function w6(n){const e=this.resume(),t=this.stack[this.stack.length-1];t.type,t.label=e,t.identifier=ft(this.sliceSerialize(n)).toLowerCase()}function x6(n){this.exit(n)}function k6(n){this.enter({type:"footnoteReference",identifier:"",label:""},n)}function S6(){this.buffer()}function v6(n){const e=this.resume(),t=this.stack[this.stack.length-1];t.type,t.label=e,t.identifier=ft(this.sliceSerialize(n)).toLowerCase()}function C6(n){this.exit(n)}function Ad(n,e,t,r){const i=t.createTracker(r);let o=i.move("[^");const s=t.enter("footnoteReference"),l=t.enter("reference");return o+=i.move(t.safe(t.associationId(n),{...i.current(),before:o,after:"]"})),l(),s(),o+=i.move("]"),o}function A6(){return"["}function O6(n,e,t,r){const i=t.createTracker(r);let o=i.move("[^");const s=t.enter("footnoteDefinition"),l=t.enter("label");return o+=i.move(t.safe(t.associationId(n),{...i.current(),before:o,after:"]"})),l(),o+=i.move("]:"+(n.children&&n.children.length>0?" ":"")),i.shift(4),o+=i.move(t.indentLines(t.containerFlow(n,i.current()),M6)),s(),o}function M6(n,e,t){return e===0?n:(t?"":" ")+n}const E6=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Od.peek=I6;function _6(){return{canContainEols:["delete"],enter:{strikethrough:N6},exit:{strikethrough:D6}}}function T6(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:E6}],handlers:{delete:Od}}}function N6(n){this.enter({type:"delete",children:[]},n)}function D6(n){this.exit(n)}function Od(n,e,t,r){const i=t.createTracker(r),o=t.enter("strikethrough");let s=i.move("~~");return s+=t.containerPhrasing(n,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),o(),s}function I6(){return"~"}function R6(n,e={}){const t=(e.align||[]).concat(),r=e.stringLength||F6,i=[],o=[],s=[],l=[];let a=0,c=-1;for(;++ca&&(a=n[c].length);++yl[y])&&(l[y]=v)}p.push(g)}o[c]=p,s[c]=m}let u=-1;if(typeof t=="object"&&"length"in t)for(;++ul[u]&&(l[u]=g),h[u]=g),f[u]=v}o.splice(1,0,f),s.splice(1,0,h),c=-1;const d=[];for(;++c0&&!t&&(n[n.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}const lk={tokenize:mk,partial:!0};function ak(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:hk,continuation:{tokenize:dk},exit:pk}},text:{91:{name:"gfmFootnoteCall",tokenize:fk},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:ck,resolveTo:uk}}}}function ck(n,e,t){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const a=r.events[i][1];if(a.type==="labelImage"){s=a;break}if(a.type==="gfmFootnoteCall"||a.type==="labelLink"||a.type==="label"||a.type==="image"||a.type==="link")break}return l;function l(a){if(!s||!s._balanced)return t(a);const c=ft(r.sliceSerialize({start:s.end,end:r.now()}));return c.codePointAt(0)!==94||!o.includes(c.slice(1))?t(a):(n.enter("gfmFootnoteCallLabelMarker"),n.consume(a),n.exit("gfmFootnoteCallLabelMarker"),e(a))}}function uk(n,e){let t=n.length;for(;t--;)if(n[t][1].type==="labelImage"&&n[t][0]==="enter"){n[t][1];break}n[t+1][1].type="data",n[t+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},n[t+3][1].start),end:Object.assign({},n[n.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},n[t+3][1].end),end:Object.assign({},n[t+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},n[n.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},l=[n[t+1],n[t+2],["enter",r,e],n[t+3],n[t+4],["enter",i,e],["exit",i,e],["enter",o,e],["enter",s,e],["exit",s,e],["exit",o,e],n[n.length-2],n[n.length-1],["exit",r,e]];return n.splice(t,n.length-t+1,...l),n}function fk(n,e,t){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,s;return l;function l(f){return n.enter("gfmFootnoteCall"),n.enter("gfmFootnoteCallLabelMarker"),n.consume(f),n.exit("gfmFootnoteCallLabelMarker"),a}function a(f){return f!==94?t(f):(n.enter("gfmFootnoteCallMarker"),n.consume(f),n.exit("gfmFootnoteCallMarker"),n.enter("gfmFootnoteCallString"),n.enter("chunkString").contentType="string",c)}function c(f){if(o>999||f===93&&!s||f===null||f===91||te(f))return t(f);if(f===93){n.exit("chunkString");const h=n.exit("gfmFootnoteCallString");return i.includes(ft(r.sliceSerialize(h)))?(n.enter("gfmFootnoteCallLabelMarker"),n.consume(f),n.exit("gfmFootnoteCallLabelMarker"),n.exit("gfmFootnoteCall"),e):t(f)}return te(f)||(s=!0),o++,n.consume(f),f===92?u:c}function u(f){return f===91||f===92||f===93?(n.consume(f),o++,c):c(f)}}function hk(n,e,t){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,s=0,l;return a;function a(p){return n.enter("gfmFootnoteDefinition")._container=!0,n.enter("gfmFootnoteDefinitionLabel"),n.enter("gfmFootnoteDefinitionLabelMarker"),n.consume(p),n.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(p){return p===94?(n.enter("gfmFootnoteDefinitionMarker"),n.consume(p),n.exit("gfmFootnoteDefinitionMarker"),n.enter("gfmFootnoteDefinitionLabelString"),n.enter("chunkString").contentType="string",u):t(p)}function u(p){if(s>999||p===93&&!l||p===null||p===91||te(p))return t(p);if(p===93){n.exit("chunkString");const m=n.exit("gfmFootnoteDefinitionLabelString");return o=ft(r.sliceSerialize(m)),n.enter("gfmFootnoteDefinitionLabelMarker"),n.consume(p),n.exit("gfmFootnoteDefinitionLabelMarker"),n.exit("gfmFootnoteDefinitionLabel"),h}return te(p)||(l=!0),s++,n.consume(p),p===92?f:u}function f(p){return p===91||p===92||p===93?(n.consume(p),s++,u):u(p)}function h(p){return p===58?(n.enter("definitionMarker"),n.consume(p),n.exit("definitionMarker"),i.includes(o)||i.push(o),Q(n,d,"gfmFootnoteDefinitionWhitespace")):t(p)}function d(p){return e(p)}}function dk(n,e,t){return n.check(ri,e,n.attempt(lk,e,t))}function pk(n){n.exit("gfmFootnoteDefinition")}function mk(n,e,t){const r=this;return Q(n,i,"gfmFootnoteDefinitionIndent",4+1);function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?e(o):t(o)}}function gk(n){let t=(n||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return t==null&&(t=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,l){let a=-1;for(;++a1?a(p):(s.consume(p),f++,d);if(f<2&&!t)return a(p);const y=s.exit("strikethroughSequenceTemporary"),g=oo(p);return y._open=!g||g===2&&!!m,y._close=!m||m===2&&!!g,l(p)}}}class yk{constructor(){this.map=[]}add(e,t,r){bk(this,e,t,r)}consume(e){if(this.map.sort(function(o,s){return o[0]-s[0]}),this.map.length===0)return;let t=this.map.length;const r=[];for(;t>0;)t-=1,r.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];r.push([...e]),e.length=0;let i=r.pop();for(;i;)e.push(...i),i=r.pop();this.map.length=0}}function bk(n,e,t,r){let i=0;if(!(t===0&&r.length===0)){for(;i-1;){const W=r.events[T][1].type;if(W==="lineEnding"||W==="linePrefix")T--;else break}const D=T>-1?r.events[T][1].type:null,B=D==="tableHead"||D==="tableRow"?k:a;return B===k&&r.parser.lazy[r.now().line]?t(S):B(S)}function a(S){return n.enter("tableHead"),n.enter("tableRow"),c(S)}function c(S){return S===124||(s=!0,o+=1),u(S)}function u(S){return S===null?t(S):V(S)?o>1?(o=0,r.interrupt=!0,n.exit("tableRow"),n.enter("lineEnding"),n.consume(S),n.exit("lineEnding"),d):t(S):U(S)?Q(n,u,"whitespace")(S):(o+=1,s&&(s=!1,i+=1),S===124?(n.enter("tableCellDivider"),n.consume(S),n.exit("tableCellDivider"),s=!0,u):(n.enter("data"),f(S)))}function f(S){return S===null||S===124||te(S)?(n.exit("data"),u(S)):(n.consume(S),S===92?h:f)}function h(S){return S===92||S===124?(n.consume(S),f):f(S)}function d(S){return r.interrupt=!1,r.parser.lazy[r.now().line]?t(S):(n.enter("tableDelimiterRow"),s=!1,U(S)?Q(n,p,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):p(S))}function p(S){return S===45||S===58?y(S):S===124?(s=!0,n.enter("tableCellDivider"),n.consume(S),n.exit("tableCellDivider"),m):O(S)}function m(S){return U(S)?Q(n,y,"whitespace")(S):y(S)}function y(S){return S===58?(o+=1,s=!0,n.enter("tableDelimiterMarker"),n.consume(S),n.exit("tableDelimiterMarker"),g):S===45?(o+=1,g(S)):S===null||V(S)?C(S):O(S)}function g(S){return S===45?(n.enter("tableDelimiterFiller"),v(S)):O(S)}function v(S){return S===45?(n.consume(S),v):S===58?(s=!0,n.exit("tableDelimiterFiller"),n.enter("tableDelimiterMarker"),n.consume(S),n.exit("tableDelimiterMarker"),x):(n.exit("tableDelimiterFiller"),x(S))}function x(S){return U(S)?Q(n,C,"whitespace")(S):C(S)}function C(S){return S===124?p(S):S===null||V(S)?!s||i!==o?O(S):(n.exit("tableDelimiterRow"),n.exit("tableHead"),e(S)):O(S)}function O(S){return t(S)}function k(S){return n.enter("tableRow"),I(S)}function I(S){return S===124?(n.enter("tableCellDivider"),n.consume(S),n.exit("tableCellDivider"),I):S===null||V(S)?(n.exit("tableRow"),e(S)):U(S)?Q(n,I,"whitespace")(S):(n.enter("data"),L(S))}function L(S){return S===null||S===124||te(S)?(n.exit("data"),I(S)):(n.consume(S),S===92?E:L)}function E(S){return S===92||S===124?(n.consume(S),L):L(S)}}function Sk(n,e){let t=-1,r=!0,i=0,o=[0,0,0,0],s=[0,0,0,0],l=!1,a=0,c,u,f;const h=new yk;for(;++tt[2]+1){const p=t[2]+1,m=t[3]-t[2]-1;n.add(p,m,[])}}n.add(t[3]+1,0,[["exit",f,e]])}return i!==void 0&&(o.end=Object.assign({},Wn(e.events,i)),n.add(i,0,[["exit",o,e]]),o=void 0),o}function Eu(n,e,t,r,i){const o=[],s=Wn(e.events,t);i&&(i.end=Object.assign({},s),o.push(["exit",i,e])),r.end=Object.assign({},s),o.push(["exit",r,e]),n.add(t+1,0,o)}function Wn(n,e){const t=n[e],r=t[0]==="enter"?"start":"end";return t[1][r]}const vk={name:"tasklistCheck",tokenize:Ak};function Ck(){return{text:{91:vk}}}function Ak(n,e,t){const r=this;return i;function i(a){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?t(a):(n.enter("taskListCheck"),n.enter("taskListCheckMarker"),n.consume(a),n.exit("taskListCheckMarker"),o)}function o(a){return te(a)?(n.enter("taskListCheckValueUnchecked"),n.consume(a),n.exit("taskListCheckValueUnchecked"),s):a===88||a===120?(n.enter("taskListCheckValueChecked"),n.consume(a),n.exit("taskListCheckValueChecked"),s):t(a)}function s(a){return a===93?(n.enter("taskListCheckMarker"),n.consume(a),n.exit("taskListCheckMarker"),n.exit("taskListCheck"),l):t(a)}function l(a){return V(a)?e(a):U(a)?n.check({tokenize:Ok},e,t)(a):t(a)}}function Ok(n,e,t){return Q(n,r,"whitespace");function r(i){return i===null?t(i):e(i)}}function Mk(n){return Vf([Q6(),ak(),gk(n),xk(),Ck()])}const Ek={};function Yv(n){const e=this,t=n||Ek,r=e.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Mk(t)),o.push(K6()),s.push(Y6(t))}var po=200,he=function(){};he.prototype.append=function(e){return e.length?(e=he.from(e),!this.length&&e||e.length=t?he.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))};he.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};he.prototype.forEach=function(e,t,r){t===void 0&&(t=0),r===void 0&&(r=this.length),t<=r?this.forEachInner(e,t,r,0):this.forEachInvertedInner(e,t,r,0)};he.prototype.map=function(e,t,r){t===void 0&&(t=0),r===void 0&&(r=this.length);var i=[];return this.forEach(function(o,s){return i.push(e(o,s))},t,r),i};he.from=function(e){return e instanceof he?e:e&&e.length?new zd(e):he.empty};var zd=function(n){function e(r){n.call(this),this.values=r}n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e;var t={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(i,o){return i==0&&o==this.length?this:new e(this.values.slice(i,o))},e.prototype.getInner=function(i){return this.values[i]},e.prototype.forEachInner=function(i,o,s,l){for(var a=o;a=s;a--)if(i(this.values[a],l+a)===!1)return!1},e.prototype.leafAppend=function(i){if(this.length+i.length<=po)return new e(this.values.concat(i.flatten()))},e.prototype.leafPrepend=function(i){if(this.length+i.length<=po)return new e(i.flatten().concat(this.values))},t.length.get=function(){return this.values.length},t.depth.get=function(){return 0},Object.defineProperties(e.prototype,t),e}(he);he.empty=new zd([]);var _k=function(n){function e(t,r){n.call(this),this.left=t,this.right=r,this.length=t.length+r.length,this.depth=Math.max(t.depth,r.depth)+1}return n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return rl&&this.right.forEachInner(r,Math.max(i-l,0),Math.min(this.length,o)-l,s+l)===!1)return!1},e.prototype.forEachInvertedInner=function(r,i,o,s){var l=this.left.length;if(i>l&&this.right.forEachInvertedInner(r,i-l,Math.max(o,l)-l,s+l)===!1||o=o?this.right.slice(r-o,i-o):this.left.slice(r,o).append(this.right.slice(0,i-o))},e.prototype.leafAppend=function(r){var i=this.right.leafAppend(r);if(i)return new e(this.left,i)},e.prototype.leafPrepend=function(r){var i=this.left.leafPrepend(r);if(i)return new e(i,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e}(he);const Tk=500;class ct{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let i,o;t&&(i=this.remapping(r,this.items.length),o=i.maps.length);let s=e.tr,l,a,c=[],u=[];return this.items.forEach((f,h)=>{if(!f.step){i||(i=this.remapping(r,h+1),o=i.maps.length),o--,u.push(f);return}if(i){u.push(new wt(f.map));let d=f.step.map(i.slice(o)),p;d&&s.maybeStep(d).doc&&(p=s.mapping.maps[s.mapping.maps.length-1],c.push(new wt(p,void 0,void 0,c.length+u.length))),o--,p&&i.appendMap(p,o)}else s.maybeStep(f.step);if(f.selection)return l=i?f.selection.map(i.slice(o)):f.selection,a=new ct(this.items.slice(0,r).append(u.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:a,transform:s,selection:l}}addTransform(e,t,r,i){let o=[],s=this.eventCount,l=this.items,a=!i&&l.length?l.get(l.length-1):null;for(let u=0;uDk&&(l=Nk(l,c),s-=c),new ct(l.append(o),s)}remapping(e,t){let r=new Jn;return this.items.forEach((i,o)=>{let s=i.mirrorOffset!=null&&o-i.mirrorOffset>=e?r.maps.length-i.mirrorOffset:void 0;r.appendMap(i.map,s)},e,t),r}addMaps(e){return this.eventCount==0?this:new ct(this.items.append(e.map(t=>new wt(t))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-t),o=e.mapping,s=e.steps.length,l=this.eventCount;this.items.forEach(h=>{h.selection&&l--},i);let a=t;this.items.forEach(h=>{let d=o.getMirror(--a);if(d==null)return;s=Math.min(s,d);let p=o.maps[d];if(h.step){let m=e.steps[d].invert(e.docs[d]),y=h.selection&&h.selection.map(o.slice(a+1,d));y&&l++,r.push(new wt(p,m,y))}else r.push(new wt(p))},i);let c=[];for(let h=t;hTk&&(f=f.compress(this.items.length-r.length)),f}emptyItemCount(){let e=0;return this.items.forEach(t=>{t.step||e++}),e}compress(e=this.items.length){let t=this.remapping(0,e),r=t.maps.length,i=[],o=0;return this.items.forEach((s,l)=>{if(l>=e)i.push(s),s.selection&&o++;else if(s.step){let a=s.step.map(t.slice(r)),c=a&&a.getMap();if(r--,c&&t.appendMap(c,r),a){let u=s.selection&&s.selection.map(t.slice(r));u&&o++;let f=new wt(c.invert(),a,u),h,d=i.length-1;(h=i.length&&i[d].merge(f))?i[d]=h:i.push(f)}}else s.map&&r--},this.items.length,0),new ct(he.from(i.reverse()),o)}}ct.empty=new ct(he.empty,0);function Nk(n,e){let t;return n.forEach((r,i)=>{if(r.selection&&e--==0)return t=i,!1}),n.slice(t)}class wt{constructor(e,t,r,i){this.map=e,this.step=t,this.selection=r,this.mirrorOffset=i}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new wt(t.getMap().invert(),t,this.selection)}}}class Ut{constructor(e,t,r,i,o){this.done=e,this.undone=t,this.prevRanges=r,this.prevTime=i,this.prevComposition=o}}const Dk=20;function Ik(n,e,t,r){let i=t.getMeta(En),o;if(i)return i.historyState;t.getMeta(Fk)&&(n=new Ut(n.done,n.undone,null,0,-1));let s=t.getMeta("appendedTransaction");if(t.steps.length==0)return n;if(s&&s.getMeta(En))return s.getMeta(En).redo?new Ut(n.done.addTransform(t,void 0,r,Ui(e)),n.undone,_u(t.mapping.maps),n.prevTime,n.prevComposition):new Ut(n.done,n.undone.addTransform(t,void 0,r,Ui(e)),null,n.prevTime,n.prevComposition);if(t.getMeta("addToHistory")!==!1&&!(s&&s.getMeta("addToHistory")===!1)){let l=t.getMeta("composition"),a=n.prevTime==0||!s&&n.prevComposition!=l&&(n.prevTime<(t.time||0)-r.newGroupDelay||!Rk(t,n.prevRanges)),c=s?ks(n.prevRanges,t.mapping):_u(t.mapping.maps);return new Ut(n.done.addTransform(t,a?e.selection.getBookmark():void 0,r,Ui(e)),ct.empty,c,t.time,l??n.prevComposition)}else return(o=t.getMeta("rebased"))?new Ut(n.done.rebased(t,o),n.undone.rebased(t,o),ks(n.prevRanges,t.mapping),n.prevTime,n.prevComposition):new Ut(n.done.addMaps(t.mapping.maps),n.undone.addMaps(t.mapping.maps),ks(n.prevRanges,t.mapping),n.prevTime,n.prevComposition)}function Rk(n,e){if(!e)return!1;if(!n.docChanged)return!0;let t=!1;return n.mapping.maps[0].forEach((r,i)=>{for(let o=0;o=e[o]&&(t=!0)}),t}function _u(n){let e=[];for(let t=n.length-1;t>=0&&e.length==0;t--)n[t].forEach((r,i,o,s)=>e.push(o,s));return e}function ks(n,e){if(!n)return null;let t=[];for(let r=0;r{let i=En.getState(t);if(!i||(n?i.undone:i.done).eventCount==0)return!1;if(r){let o=zk(i,t,n);o&&r(e?o.scrollIntoView():o)}return!0}}const Pk=Fd(!1,!0),Lk=Fd(!0,!0);var xn,Gn;class Bk{constructor(e){Bo(this,xn,void 0);Bo(this,Gn,new Set);Vo(this,xn,e)}get current(){return Pn(this,xn)}set current(e){Pn(this,xn)!=e&&(Vo(this,xn,e),Pn(this,Gn).forEach(t=>t(e)))}on(e){return Pn(this,Gn).add(e),()=>Pn(this,Gn).delete(e)}}xn=new WeakMap,Gn=new WeakMap;const Pd=n=>new Bk(n),wl=Symbol.for("atomico.hooks");globalThis[wl]=globalThis[wl]||{};let ar=globalThis[wl];const Vk=Symbol.for("Atomico.suspense"),Ld=Symbol.for("Atomico.effect"),Hk=Symbol.for("Atomico.layoutEffect"),Bd=Symbol.for("Atomico.insertionEffect"),ui=(n,e,t)=>{const{i:r,hooks:i}=ar.c,o=i[r]=i[r]||{};return o.value=n(o.value),o.effect=e,o.tag=t,ar.c.i++,i[r].value},$k=n=>ui((e=Pd(n))=>e),jk=()=>ui((n=Pd(ar.c.host))=>n),qk=()=>ar.c.update,Wk=(n,e,t=0)=>{let r={},i=!1;const o=()=>i,s=(c,u)=>{for(const f in r){const h=r[f];h.effect&&h.tag===c&&(h.value=h.effect(h.value,u))}};return{load:c=>{ar.c={host:e,hooks:r,update:n,i:0,id:t};let u;try{i=!1,u=c()}catch(f){if(f!==Vk)throw f;i=!0}finally{ar.c=null}return u},cleanEffects:c=>(s(Bd,c),()=>(s(Hk,c),()=>{s(Ld,c)})),isSuspense:o}},fi=Symbol.for;function Vd(n,e){const t=n.length;if(t!==e.length)return!1;for(let r=0;rtypeof n=="function",Vr=n=>typeof n=="object",{isArray:Uk}=Array,xl=(n,e)=>(e?n instanceof HTMLStyleElement:!0)&&"hydrate"in((n==null?void 0:n.dataset)||{});function Hd(n,e){let t;const r=i=>{let{length:o}=i;for(let s=0;s(n.addEventListener(e,t),()=>n.removeEventListener(e,t));let jd=class{constructor(e,t,r){this.message=t,this.target=e,this.value=r}};class Jk extends jd{}class Kk extends jd{}const mo="Custom",Yk=null,Gk={true:1,"":1,1:1};function Xk(n,e,t,r,i){const{type:o,reflect:s,event:l,value:a,attr:c=Zk(e)}=(t==null?void 0:t.name)!=mo&&Vr(t)&&t!=Yk?t:{type:t},u=(o==null?void 0:o.name)===mo&&o.map,f=a!=null?o==Function||!It(a)?()=>a:a:null;Object.defineProperty(n,e,{configurable:!0,set(h){const d=this[e];f&&o!=Boolean&&h==null&&(h=f());const{error:p,value:m}=(u?n8:r8)(o,h);if(p&&m!=null)throw new Jk(this,`The value defined for prop '${e}' must be of type '${o.name}'`,m);d!=m&&(this._props[e]=m??void 0,this.update(),l&&Qk(this,l),this.updated.then(()=>{s&&(this._ignoreAttr=c,e8(this,o,c,this[e]),this._ignoreAttr=null)}))},get(){return this._props[e]}}),f&&(i[e]=f()),r[c]={prop:e,type:o}}const Qk=(n,{type:e,base:t=CustomEvent,...r})=>n.dispatchEvent(new t(e,r)),Zk=n=>n.replace(/([A-Z])/g,"-$1").toLowerCase(),e8=(n,e,t,r)=>r==null||e==Boolean&&!r?n.removeAttribute(t):n.setAttribute(t,(e==null?void 0:e.name)===mo&&(e!=null&&e.serialize)?e==null?void 0:e.serialize(r):Vr(r)?JSON.stringify(r):e==Boolean?"":r),t8=(n,e)=>n==Boolean?!!Gk[e]:n==Number?Number(e):n==String?e:n==Array||n==Object?JSON.parse(e):n.name==mo?e:new n(e),n8=({map:n},e)=>{try{return{value:n(e),error:!1}}catch{return{value:e,error:!0}}},r8=(n,e)=>n==null||e==null?{value:e,error:!1}:n!=String&&e===""?{value:void 0,error:!1}:n==Object||n==Array||n==Symbol?{value:e,error:{}.toString.call(e)!==`[object ${n.name}]`}:e instanceof n?{value:e,error:n==Number&&Number.isNaN(e.valueOf())}:n==String||n==Number||n==Boolean?{value:e,error:n==Number?typeof e!="number"?!0:Number.isNaN(e):n==String?typeof e!="string":typeof e!="boolean"}:{value:e,error:!0};let i8=0;const o8=n=>{var t;const e=((t=(n==null?void 0:n.dataset)||{})==null?void 0:t.hydrate)||"";return e||"c"+i8++},s8=(n,e=HTMLElement)=>{const t={},r={},i="prototype"in e&&e.prototype instanceof Element,o=i?e:"base"in e?e.base:HTMLElement,{props:s,styles:l}=i?n:e;class a extends o{constructor(){super(),this._setup(),this._render=()=>n({...this._props});for(const u in r)this[u]=r[u]}static get styles(){return[super.styles,l]}async _setup(){if(this._props)return;this._props={};let u,f;this.mounted=new Promise(y=>this.mount=()=>{y(),u!=this.parentNode&&(f!=u?this.unmounted.then(this.update):this.update()),u=this.parentNode}),this.unmounted=new Promise(y=>this.unmount=()=>{y(),(u!=this.parentNode||!this.isConnected)&&(h.cleanEffects(!0)()(),f=this.parentNode,u=null)}),this.symbolId=this.symbolId||Symbol(),this.symbolIdParent=Symbol();const h=Wk(()=>this.update(),this,o8(this));let d,p=!0;const m=xl(this);this.update=()=>(d||(d=!0,this.updated=(this.updated||this.mounted).then(()=>{try{const y=h.load(this._render),g=h.cleanEffects();return y&&y.render(this,this.symbolId,m),d=!1,p&&!h.isSuspense()&&(p=!1,!m&&l8(this)),g()}finally{d=!1}}).then(y=>{y&&y()})),this.updated),this.update()}connectedCallback(){this.mount(),super.connectedCallback&&super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback(),this.unmount()}attributeChangedCallback(u,f,h){if(t[u]){if(u===this._ignoreAttr||f===h)return;const{prop:d,type:p}=t[u];try{this[d]=t8(p,h)}catch{throw new Kk(this,`The value defined as attr '${u}' cannot be parsed by type '${p.name}'`,h)}}else super.attributeChangedCallback(u,f,h)}static get props(){return{...super.props,...s}}static get observedAttributes(){const u=super.observedAttributes||[];for(const f in s)Xk(this.prototype,f,s[f],t,r);return Object.keys(t).concat(u)}}return a};function l8(n){const{styles:e}=n.constructor,{shadowRoot:t}=n;if(t&&e.length){const r=[];Hd(e,i=>{i&&(i instanceof Element?t.appendChild(i.cloneNode(!0)):r.push(i))}),r.length&&(t.adoptedStyleSheets=r)}}const qd=n=>(e,t)=>{ui(([r,i]=[])=>((i||!i)&&(i&&Vd(i,t)?r=r||!0:(It(r)&&r(),r=null)),[r,t]),([r,i],o)=>o?(It(r)&&r(),[]):[r||e(),i],n)},Qv=qd(Ld),a8=qd(Bd);class c8 extends Array{constructor(e,t){let r=!0;const i=o=>{try{t(o,this,r)}finally{r=!1}};super(void 0,i,t),i(e)}}const Zv=n=>{const e=qk();return ui((t=new c8(n,(r,i,o)=>{r=It(r)?r(i[0]):r,r!==i[0]&&(i[0]=r,o||e())}))=>t)},u8=(n,e)=>{const[t]=ui(([r,i,o=0]=[])=>((!i||i&&!Vd(i,e))&&(r=n()),[r,e,o]));return t},eC=(n,e)=>u8(()=>n,e),kl=fi("atomico/options");globalThis[kl]=globalThis[kl]||{sheet:!!document.adoptedStyleSheets};const Wd=globalThis[kl];new Promise(n=>{Wd.ssr||(document.readyState==="loading"?$d(document,"DOMContentLoaded",n):n())});const f8={checked:1,value:1,selected:1},h8={list:1,type:1,size:1,form:1,width:1,height:1,src:1,href:1,slot:1},d8={shadowDom:1,staticNode:1,cloneNode:1,children:1,key:1},Ji={},Sl=[];class vl extends Text{}const p8=fi("atomico/id"),Hr=fi("atomico/type"),vs=fi("atomico/ref"),Ud=fi("atomico/vnode"),m8=()=>{};function g8(n,e,t){return Kd(this,n,e,t)}const Jd=(n,e,...t)=>{const r=e||Ji;let{children:i}=r;if(i=i??(t.length?t:Sl),n===m8)return i;const o=n?n instanceof Node?1:n.prototype instanceof HTMLElement&&2:0;if(o===!1&&n instanceof Function)return n(i!=Sl?{children:i,...r}:r);const s=Wd.render||g8;return{[Hr]:Ud,type:n,props:r,children:i,key:r.key,shadow:r.shadowDom,static:r.staticNode,raw:o,is:r.is,clone:r.cloneNode,render:s}};function Kd(n,e,t=p8,r,i){let o;if(e&&e[t]&&e[t].vnode==n||n[Hr]!=Ud)return e;(n||!e)&&(i=i||n.type=="svg",o=n.type!="host"&&(n.raw==1?(e&&n.clone?e[vs]:e)!=n.type:n.raw==2?!(e instanceof n.type):e?e[vs]||e.localName!=n.type:!e),o&&n.type!=null&&(n.raw==1&&n.clone?(r=!0,e=n.type.cloneNode(!0),e[vs]=n.type):e=n.raw==1?n.type:n.raw==2?new n.type:i?document.createElementNS("http://www.w3.org/2000/svg",n.type):document.createElement(n.type,n.is?{is:n.is}:void 0)));const s=e[t]?e[t]:Ji,{vnode:l=Ji,cycle:a=0}=s;let{fragment:c,handlers:u}=s;const{children:f=Sl,props:h=Ji}=l;if(u=o?{}:u||{},n.static&&!o)return e;if(n.shadow&&!e.shadowRoot&&e.attachShadow({mode:"open",...n.shadow}),n.props!=h&&w8(e,h,n.props,u,i),n.children!==f){const d=n.shadow?e.shadowRoot:e;c=b8(n.children,c,d,t,!a&&r,i&&n.type=="foreignObject"?!1:i)}return e[t]={vnode:n,handlers:u,fragment:c,cycle:a+1},e}function y8(n,e){const t=new vl(""),r=new vl("");let i;if(n[e?"prepend":"append"](t),e){let{lastElementChild:o}=n;for(;o;){const{previousElementSibling:s}=o;if(xl(o,!0)&&!xl(s,!0)){i=o;break}o=s}}return i?i.before(r):n.append(r),{markStart:t,markEnd:r}}function b8(n,e,t,r,i,o){n=n==null?null:Uk(n)?n:[n];const s=e||y8(t,i),{markStart:l,markEnd:a,keyes:c}=s;let u;const f=c&&new Set;let h=l;if(n&&Hd(n,d=>{if(typeof d=="object"&&!d[Hr])return;const p=d[Hr]&&d.key,m=c&&p!=null&&c.get(p);h!=a&&h===m?f.delete(h):h=h==a?a:h.nextSibling;const y=c?m:h;let g=y;if(d[Hr])g=Kd(d,y,r,i,o);else{const v=d+"";!(g instanceof Text)||g instanceof vl?g=new Text(v):g.data!=v&&(g.data=v)}g!=h&&(c&&f.delete(g),!y||c?(t.insertBefore(g,h),c&&h!=a&&f.add(h)):y==a?t.insertBefore(g,a):(t.replaceChild(g,y),h=g)),p!=null&&(u=u||new Map,u.set(p,g))}),h=h==a?a:h.nextSibling,e&&h!=a)for(;h!=a;){const d=h;h=h.nextSibling,d.remove()}return f&&f.forEach(d=>d.remove()),s.keyes=u,s}function w8(n,e,t,r,i){for(const o in e)!(o in t)&&Nu(n,o,e[o],null,i,r);for(const o in t)Nu(n,o,e[o],t[o],i,r)}function Nu(n,e,t,r,i,o){if(e=e=="class"&&!i?"className":e,t=t??null,r=r??null,e in n&&f8[e]&&(t=n[e]),!(r===t||d8[e]||e[0]=="_"))if(n.localName==="slot"&&e==="assignNode"&&"assign"in n)n.assign(r);else if(e[0]=="o"&&e[1]=="n"&&(It(r)||It(t)))x8(n,e.slice(2),r,o);else if(e=="ref")r&&(It(r)?r(n):r.current=n);else if(e=="style"){const{style:s}=n;t=t||"",r=r||"";const l=Vr(t),a=Vr(r);if(l)for(const c in t)if(a)!(c in r)&&Du(s,c,null);else break;if(a)for(const c in r){const u=r[c];l&&t[c]===u||Du(s,c,u)}else s.cssText=r}else{const s=e[0]=="$"?e.slice(1):e;s===e&&(!i&&!h8[e]&&e in n||It(r)||It(t))?n[e]=r??"":r==null?n.removeAttribute(s):n.setAttribute(s,Vr(r)?JSON.stringify(r):r)}}function x8(n,e,t,r){if(r.handleEvent||(r.handleEvent=i=>r[i.type].call(n,i)),t){if(!r[e]){const i=t.capture||t.once||t.passive?Object.assign({},t):null;n.addEventListener(e,r,i)}r[e]=t}else r[e]&&(n.removeEventListener(e,r),delete r[e])}function Du(n,e,t){let r="setProperty";t==null&&(r="removeProperty",t=null),~e.indexOf("-")?n[r](e,t):n[e]=t}const k8=Jd("host",{style:"display: contents"}),S8="value",v8=(n,e)=>{const t=jk(),r=$k();a8(()=>$d(t.current,"ConnectContext",i=>{i.composedPath().at(0)!==i.currentTarget&&n===i.detail.id&&(i.stopPropagation(),i.detail.connect(r))}),[n]),r.current=e},C8=n=>{const e=s8(({value:t})=>(v8(e,t),k8),{props:{value:{type:Object,value:()=>n}}});return e[S8]=n,e};C8({dispatch(n,e){}});const A8=0,$n=1,Di=2,Ii=3,Iu=4,Mr=5,Cl=6,Yd=0,O8=2,Gd=3,Xd=4,Qd=Mr,M8=Cl,Zd=(n,e,t,r)=>{let i;e[0]=0;for(let o=1;o{e===$n&&(a||(t=t.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?i.push(Yd,a,t):e===Ii&&(a||t)?(i.push(Gd,a,t),e=Di):e===Di&&t==="..."&&a?i.push(Xd,a,0):e===Di&&t&&!a?i.push(Qd,0,!0,t):e>=Mr&&((t||!a&&e===Mr)&&(i.push(e,0,t,s),e=Cl),a&&(i.push(e,a,0,s),e=Cl)),t=""};for(let a=0;a"?(e=$n,t=""):t=o+t[0]:r?o===r?r="":t+=o:o==='"'||o==="'"?r=o:o===">"?(l(),e=$n):e&&(o==="="?(e=Mr,s=t,t=""):o==="/"&&(e")?(l(),e===Ii&&(i=i[0]),e=i,(i=i[0]).push(O8,0,e),e=A8):o===" "||o===" "||o===` `||o==="\r"?(l(),e=Di):t+=o),e===Ii&&t==="!--"&&(e=Iu,i=i[0])}return l(),i},_8=new Map;function tC(n){let e=_8;return e=Zd(Jd,e.get(n)||(e.set(n,e=E8(n)),e),arguments,[]),e.length>1?e:e[0]}function ep(n){var e,t,r="";if(typeof n=="string"||typeof n=="number")r+=n;else if(typeof n=="object")if(Array.isArray(n)){var i=n.length;for(e=0;e