FrappeApplications/playbook/public/frontend/assets/vendor.8583bfd9.js

163 lines
724 KiB
JavaScript

var Zy=Object.defineProperty,ev=Object.defineProperties;var tv=Object.getOwnPropertyDescriptors;var Us=Object.getOwnPropertySymbols;var jf=Object.prototype.hasOwnProperty,Nf=Object.prototype.propertyIsEnumerable;var Lf=(e,t,n)=>t in e?Zy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,J=(e,t)=>{for(var n in t||(t={}))jf.call(t,n)&&Lf(e,n,t[n]);if(Us)for(var n of Us(t))Nf.call(t,n)&&Lf(e,n,t[n]);return e},Me=(e,t)=>ev(e,tv(t));var Ve=(e,t)=>{var n={};for(var r in e)jf.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Us)for(var r of Us(e))t.indexOf(r)<0&&Nf.call(e,r)&&(n[r]=e[r]);return n};var Ir=(e,t,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(e,t)).next())});function ql(e,t){const n=Object.create(null),r=e.split(",");for(let i=0;i<r.length;i++)n[r[i]]=!0;return t?i=>!!n[i.toLowerCase()]:i=>!!n[i]}const nv="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",rv=ql(nv);function Df(e){return!!e||e===""}function Mo(e){if(Ce(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],i=ht(r)?sv(r):Mo(r);if(i)for(const o in i)t[o]=i[o]}return t}else{if(ht(e))return e;if(at(e))return e}}const iv=/;(?![^(]*\))/g,ov=/:(.+)/;function sv(e){const t={};return e.split(iv).forEach(n=>{if(n){const r=n.split(ov);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function ft(e){let t="";if(ht(e))t=e;else if(Ce(e))for(let n=0;n<e.length;n++){const r=ft(e[n]);r&&(t+=r+" ")}else if(at(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function Ai(e){if(!e)return null;let{class:t,style:n}=e;return t&&!ht(t)&&(e.class=ft(t)),n&&(e.style=Mo(n)),e}const on=e=>e==null?"":Ce(e)||at(e)&&(e.toString===Hf||!Te(e.toString))?JSON.stringify(e,If,2):String(e),If=(e,t)=>t&&t.__v_isRef?If(e,t.value):Oi(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,i])=>(n[`${r} =>`]=i,n),{})}:$f(t)?{[`Set(${t.size})`]:[...t.values()]}:at(t)&&!Ce(t)&&!zf(t)?String(t):t,qe={},Ei=[],Cn=()=>{},av=()=>!1,lv=/^on[^a-z]/,Ks=e=>lv.test(e),Jl=e=>e.startsWith("onUpdate:"),At=Object.assign,Gl=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},cv=Object.prototype.hasOwnProperty,Be=(e,t)=>cv.call(e,t),Ce=Array.isArray,Oi=e=>qs(e)==="[object Map]",$f=e=>qs(e)==="[object Set]",Te=e=>typeof e=="function",ht=e=>typeof e=="string",Yl=e=>typeof e=="symbol",at=e=>e!==null&&typeof e=="object",Bf=e=>at(e)&&Te(e.then)&&Te(e.catch),Hf=Object.prototype.toString,qs=e=>Hf.call(e),uv=e=>qs(e).slice(8,-1),zf=e=>qs(e)==="[object Object]",Xl=e=>ht(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Js=ql(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Gs=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},dv=/-(\w)/g,Nn=Gs(e=>e.replace(dv,(t,n)=>n?n.toUpperCase():"")),fv=/\B([A-Z])/g,$r=Gs(e=>e.replace(fv,"-$1").toLowerCase()),Ys=Gs(e=>e.charAt(0).toUpperCase()+e.slice(1)),Ql=Gs(e=>e?`on${Ys(e)}`:""),Ao=(e,t)=>!Object.is(e,t),Zl=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},Xs=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},Ff=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Vf;const hv=()=>Vf||(Vf=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{});let Br;const Qs=[];class pv{constructor(t=!1){this.active=!0,this.effects=[],this.cleanups=[],!t&&Br&&(this.parent=Br,this.index=(Br.scopes||(Br.scopes=[])).push(this)-1)}run(t){if(this.active)try{return this.on(),t()}finally{this.off()}}on(){this.active&&(Qs.push(this),Br=this)}off(){this.active&&(Qs.pop(),Br=Qs[Qs.length-1])}stop(t){if(this.active){if(this.effects.forEach(n=>n.stop()),this.cleanups.forEach(n=>n()),this.scopes&&this.scopes.forEach(n=>n.stop(!0)),this.parent&&!t){const n=this.parent.scopes.pop();n&&n!==this&&(this.parent.scopes[this.index]=n,n.index=this.index)}this.active=!1}}}function mv(e,t){t=t||Br,t&&t.active&&t.effects.push(e)}const ec=e=>{const t=new Set(e);return t.w=0,t.n=0,t},Wf=e=>(e.w&sr)>0,Uf=e=>(e.n&sr)>0,gv=({deps:e})=>{if(e.length)for(let t=0;t<e.length;t++)e[t].w|=sr},yv=e=>{const{deps:t}=e;if(t.length){let n=0;for(let r=0;r<t.length;r++){const i=t[r];Wf(i)&&!Uf(i)?i.delete(e):t[n++]=i,i.w&=~sr,i.n&=~sr}t.length=n}},tc=new WeakMap;let Eo=0,sr=1;const nc=30,Oo=[];let Hr;const zr=Symbol(""),rc=Symbol("");class ic{constructor(t,n=null,r){this.fn=t,this.scheduler=n,this.active=!0,this.deps=[],mv(this,r)}run(){if(!this.active)return this.fn();if(!Oo.includes(this))try{return Oo.push(Hr=this),vv(),sr=1<<++Eo,Eo<=nc?gv(this):Kf(this),this.fn()}finally{Eo<=nc&&yv(this),sr=1<<--Eo,Fr(),Oo.pop();const t=Oo.length;Hr=t>0?Oo[t-1]:void 0}}stop(){this.active&&(Kf(this),this.onStop&&this.onStop(),this.active=!1)}}function Kf(e){const{deps:t}=e;if(t.length){for(let n=0;n<t.length;n++)t[n].delete(e);t.length=0}}let Ti=!0;const oc=[];function Pi(){oc.push(Ti),Ti=!1}function vv(){oc.push(Ti),Ti=!0}function Fr(){const e=oc.pop();Ti=e===void 0?!0:e}function Xt(e,t,n){if(!qf())return;let r=tc.get(e);r||tc.set(e,r=new Map);let i=r.get(n);i||r.set(n,i=ec()),Jf(i)}function qf(){return Ti&&Hr!==void 0}function Jf(e,t){let n=!1;Eo<=nc?Uf(e)||(e.n|=sr,n=!Wf(e)):n=!e.has(Hr),n&&(e.add(Hr),Hr.deps.push(e))}function Xn(e,t,n,r,i,o){const s=tc.get(e);if(!s)return;let a=[];if(t==="clear")a=[...s.values()];else if(n==="length"&&Ce(e))s.forEach((l,c)=>{(c==="length"||c>=r)&&a.push(l)});else switch(n!==void 0&&a.push(s.get(n)),t){case"add":Ce(e)?Xl(n)&&a.push(s.get("length")):(a.push(s.get(zr)),Oi(e)&&a.push(s.get(rc)));break;case"delete":Ce(e)||(a.push(s.get(zr)),Oi(e)&&a.push(s.get(rc)));break;case"set":Oi(e)&&a.push(s.get(zr));break}if(a.length===1)a[0]&&sc(a[0]);else{const l=[];for(const c of a)c&&l.push(...c);sc(ec(l))}}function sc(e,t){for(const n of Ce(e)?e:[...e])(n!==Hr||n.allowRecurse)&&(n.scheduler?n.scheduler():n.run())}const bv=ql("__proto__,__v_isRef,__isVue"),Gf=new Set(Object.getOwnPropertyNames(Symbol).map(e=>Symbol[e]).filter(Yl)),wv=ac(),xv=ac(!1,!0),kv=ac(!0),Yf=Sv();function Sv(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const r=fe(this);for(let o=0,s=this.length;o<s;o++)Xt(r,"get",o+"");const i=r[t](...n);return i===-1||i===!1?r[t](...n.map(fe)):i}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...n){Pi();const r=fe(this)[t].apply(this,n);return Fr(),r}}),e}function ac(e=!1,t=!1){return function(r,i,o){if(i==="__v_isReactive")return!e;if(i==="__v_isReadonly")return e;if(i==="__v_raw"&&o===(e?t?Bv:oh:t?ih:rh).get(r))return r;const s=Ce(r);if(!e&&s&&Be(Yf,i))return Reflect.get(Yf,i,o);const a=Reflect.get(r,i,o);return(Yl(i)?Gf.has(i):bv(i))||(e||Xt(r,"get",i),t)?a:Dt(a)?!s||!Xl(i)?a.value:a:at(a)?e?sh(a):sn(a):a}}const Cv=Xf(),_v=Xf(!0);function Xf(e=!1){return function(n,r,i,o){let s=n[r];if(!e&&!dc(i)&&(i=fe(i),s=fe(s),!Ce(n)&&Dt(s)&&!Dt(i)))return s.value=i,!0;const a=Ce(n)&&Xl(r)?Number(r)<n.length:Be(n,r),l=Reflect.set(n,r,i,o);return n===fe(o)&&(a?Ao(i,s)&&Xn(n,"set",r,i):Xn(n,"add",r,i)),l}}function Mv(e,t){const n=Be(e,t);e[t];const r=Reflect.deleteProperty(e,t);return r&&n&&Xn(e,"delete",t,void 0),r}function Av(e,t){const n=Reflect.has(e,t);return(!Yl(t)||!Gf.has(t))&&Xt(e,"has",t),n}function Ev(e){return Xt(e,"iterate",Ce(e)?"length":zr),Reflect.ownKeys(e)}const Qf={get:wv,set:Cv,deleteProperty:Mv,has:Av,ownKeys:Ev},Ov={get:kv,set(e,t){return!0},deleteProperty(e,t){return!0}},Tv=At({},Qf,{get:xv,set:_v}),lc=e=>e,Zs=e=>Reflect.getPrototypeOf(e);function ea(e,t,n=!1,r=!1){e=e.__v_raw;const i=fe(e),o=fe(t);t!==o&&!n&&Xt(i,"get",t),!n&&Xt(i,"get",o);const{has:s}=Zs(i),a=r?lc:n?fc:To;if(s.call(i,t))return a(e.get(t));if(s.call(i,o))return a(e.get(o));e!==i&&e.get(t)}function ta(e,t=!1){const n=this.__v_raw,r=fe(n),i=fe(e);return e!==i&&!t&&Xt(r,"has",e),!t&&Xt(r,"has",i),e===i?n.has(e):n.has(e)||n.has(i)}function na(e,t=!1){return e=e.__v_raw,!t&&Xt(fe(e),"iterate",zr),Reflect.get(e,"size",e)}function Zf(e){e=fe(e);const t=fe(this);return Zs(t).has.call(t,e)||(t.add(e),Xn(t,"add",e,e)),this}function eh(e,t){t=fe(t);const n=fe(this),{has:r,get:i}=Zs(n);let o=r.call(n,e);o||(e=fe(e),o=r.call(n,e));const s=i.call(n,e);return n.set(e,t),o?Ao(t,s)&&Xn(n,"set",e,t):Xn(n,"add",e,t),this}function th(e){const t=fe(this),{has:n,get:r}=Zs(t);let i=n.call(t,e);i||(e=fe(e),i=n.call(t,e)),r&&r.call(t,e);const o=t.delete(e);return i&&Xn(t,"delete",e,void 0),o}function nh(){const e=fe(this),t=e.size!==0,n=e.clear();return t&&Xn(e,"clear",void 0,void 0),n}function ra(e,t){return function(r,i){const o=this,s=o.__v_raw,a=fe(s),l=t?lc:e?fc:To;return!e&&Xt(a,"iterate",zr),s.forEach((c,u)=>r.call(i,l(c),l(u),o))}}function ia(e,t,n){return function(...r){const i=this.__v_raw,o=fe(i),s=Oi(o),a=e==="entries"||e===Symbol.iterator&&s,l=e==="keys"&&s,c=i[e](...r),u=n?lc:t?fc:To;return!t&&Xt(o,"iterate",l?rc:zr),{next(){const{value:f,done:h}=c.next();return h?{value:f,done:h}:{value:a?[u(f[0]),u(f[1])]:u(f),done:h}},[Symbol.iterator](){return this}}}}function ar(e){return function(...t){return e==="delete"?!1:this}}function Pv(){const e={get(o){return ea(this,o)},get size(){return na(this)},has:ta,add:Zf,set:eh,delete:th,clear:nh,forEach:ra(!1,!1)},t={get(o){return ea(this,o,!1,!0)},get size(){return na(this)},has:ta,add:Zf,set:eh,delete:th,clear:nh,forEach:ra(!1,!0)},n={get(o){return ea(this,o,!0)},get size(){return na(this,!0)},has(o){return ta.call(this,o,!0)},add:ar("add"),set:ar("set"),delete:ar("delete"),clear:ar("clear"),forEach:ra(!0,!1)},r={get(o){return ea(this,o,!0,!0)},get size(){return na(this,!0)},has(o){return ta.call(this,o,!0)},add:ar("add"),set:ar("set"),delete:ar("delete"),clear:ar("clear"),forEach:ra(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(o=>{e[o]=ia(o,!1,!1),n[o]=ia(o,!0,!1),t[o]=ia(o,!1,!0),r[o]=ia(o,!0,!0)}),[e,n,t,r]}const[Rv,jv,Nv,Lv]=Pv();function cc(e,t){const n=t?e?Lv:Nv:e?jv:Rv;return(r,i,o)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?r:Reflect.get(Be(n,i)&&i in r?n:r,i,o)}const Dv={get:cc(!1,!1)},Iv={get:cc(!1,!0)},$v={get:cc(!0,!1)},rh=new WeakMap,ih=new WeakMap,oh=new WeakMap,Bv=new WeakMap;function Hv(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function zv(e){return e.__v_skip||!Object.isExtensible(e)?0:Hv(uv(e))}function sn(e){return e&&e.__v_isReadonly?e:uc(e,!1,Qf,Dv,rh)}function Fv(e){return uc(e,!1,Tv,Iv,ih)}function sh(e){return uc(e,!0,Ov,$v,oh)}function uc(e,t,n,r,i){if(!at(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=i.get(e);if(o)return o;const s=zv(e);if(s===0)return e;const a=new Proxy(e,s===2?r:n);return i.set(e,a),a}function Ri(e){return dc(e)?Ri(e.__v_raw):!!(e&&e.__v_isReactive)}function dc(e){return!!(e&&e.__v_isReadonly)}function ah(e){return Ri(e)||dc(e)}function fe(e){const t=e&&e.__v_raw;return t?fe(t):e}function lh(e){return Xs(e,"__v_skip",!0),e}const To=e=>at(e)?sn(e):e,fc=e=>at(e)?sh(e):e;function ch(e){qf()&&(e=fe(e),e.dep||(e.dep=ec()),Jf(e.dep))}function uh(e,t){e=fe(e),e.dep&&sc(e.dep)}function Dt(e){return Boolean(e&&e.__v_isRef===!0)}function se(e){return fh(e,!1)}function dh(e){return fh(e,!0)}function fh(e,t){return Dt(e)?e:new Vv(e,t)}class Vv{constructor(t,n){this._shallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:fe(t),this._value=n?t:To(t)}get value(){return ch(this),this._value}set value(t){t=this._shallow?t:fe(t),Ao(t,this._rawValue)&&(this._rawValue=t,this._value=this._shallow?t:To(t),uh(this))}}function Rt(e){return Dt(e)?e.value:e}const Wv={get:(e,t,n)=>Rt(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const i=e[t];return Dt(i)&&!Dt(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function hh(e){return Ri(e)?e:new Proxy(e,Wv)}class Uv{constructor(t,n,r,i){this._setter=n,this.dep=void 0,this._dirty=!0,this.__v_isRef=!0,this.effect=new ic(t,()=>{this._dirty||(this._dirty=!0,uh(this))}),this.effect.active=!i,this.__v_isReadonly=r}get value(){const t=fe(this);return ch(t),t._dirty&&(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}function ph(e,t,n=!1){let r,i;const o=Te(e);return o?(r=e,i=Cn):(r=e.get,i=e.set),new Uv(r,i,o||!i,n)}Promise.resolve();function lr(e,t,n,r){let i;try{i=r?e(...r):e()}catch(o){Po(o,t,n)}return i}function an(e,t,n,r){if(Te(e)){const o=lr(e,t,n,r);return o&&Bf(o)&&o.catch(s=>{Po(s,t,n)}),o}const i=[];for(let o=0;o<e.length;o++)i.push(an(e[o],t,n,r));return i}function Po(e,t,n,r=!0){const i=t?t.vnode:null;if(t){let o=t.parent;const s=t.proxy,a=n;for(;o;){const c=o.ec;if(c){for(let u=0;u<c.length;u++)if(c[u](e,s,a)===!1)return}o=o.parent}const l=t.appContext.config.errorHandler;if(l){lr(l,null,10,[e,s,a]);return}}Kv(e,n,i,r)}function Kv(e,t,n,r=!0){console.error(e)}let oa=!1,hc=!1;const Qt=[];let Qn=0;const Ro=[];let jo=null,ji=0;const No=[];let cr=null,Ni=0;const mh=Promise.resolve();let pc=null,mc=null;function bt(e){const t=pc||mh;return e?t.then(this?e.bind(this):e):t}function qv(e){let t=Qn+1,n=Qt.length;for(;t<n;){const r=t+n>>>1;Lo(Qt[r])<e?t=r+1:n=r}return t}function gc(e){(!Qt.length||!Qt.includes(e,oa&&e.allowRecurse?Qn+1:Qn))&&e!==mc&&(e.id==null?Qt.push(e):Qt.splice(qv(e.id),0,e),gh())}function gh(){!oa&&!hc&&(hc=!0,pc=mh.then(bh))}function Jv(e){const t=Qt.indexOf(e);t>Qn&&Qt.splice(t,1)}function yh(e,t,n,r){Ce(e)?n.push(...e):(!t||!t.includes(e,e.allowRecurse?r+1:r))&&n.push(e),gh()}function Gv(e){yh(e,jo,Ro,ji)}function Yv(e){yh(e,cr,No,Ni)}function yc(e,t=null){if(Ro.length){for(mc=t,jo=[...new Set(Ro)],Ro.length=0,ji=0;ji<jo.length;ji++)jo[ji]();jo=null,ji=0,mc=null,yc(e,t)}}function vh(e){if(No.length){const t=[...new Set(No)];if(No.length=0,cr){cr.push(...t);return}for(cr=t,cr.sort((n,r)=>Lo(n)-Lo(r)),Ni=0;Ni<cr.length;Ni++)cr[Ni]();cr=null,Ni=0}}const Lo=e=>e.id==null?1/0:e.id;function bh(e){hc=!1,oa=!0,yc(e),Qt.sort((n,r)=>Lo(n)-Lo(r));const t=Cn;try{for(Qn=0;Qn<Qt.length;Qn++){const n=Qt[Qn];n&&n.active!==!1&&lr(n,null,14)}}finally{Qn=0,Qt.length=0,vh(),oa=!1,pc=null,(Qt.length||Ro.length||No.length)&&bh(e)}}function Xv(e,t,...n){const r=e.vnode.props||qe;let i=n;const o=t.startsWith("update:"),s=o&&t.slice(7);if(s&&s in r){const u=`${s==="modelValue"?"model":s}Modifiers`,{number:f,trim:h}=r[u]||qe;h?i=n.map(p=>p.trim()):f&&(i=n.map(Ff))}let a,l=r[a=Ql(t)]||r[a=Ql(Nn(t))];!l&&o&&(l=r[a=Ql($r(t))]),l&&an(l,e,6,i);const c=r[a+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,an(c,e,6,i)}}function wh(e,t,n=!1){const r=t.emitsCache,i=r.get(e);if(i!==void 0)return i;const o=e.emits;let s={},a=!1;if(!Te(e)){const l=c=>{const u=wh(c,t,!0);u&&(a=!0,At(s,u))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!o&&!a?(r.set(e,null),null):(Ce(o)?o.forEach(l=>s[l]=null):At(s,o),r.set(e,s),s)}function vc(e,t){return!e||!Ks(t)?!1:(t=t.slice(2).replace(/Once$/,""),Be(e,t[0].toLowerCase()+t.slice(1))||Be(e,$r(t))||Be(e,t))}let Zt=null,xh=null;function sa(e){const t=Zt;return Zt=e,xh=e&&e.type.__scopeId||null,t}function ln(e,t=Zt,n){if(!t||e._n)return e;const r=(...i)=>{r._d&&qh(-1);const o=sa(t),s=e(...i);return sa(o),r._d&&qh(1),s};return r._n=!0,r._c=!0,r._d=!0,r}function bc(e){const{type:t,vnode:n,proxy:r,withProxy:i,props:o,propsOptions:[s],slots:a,attrs:l,emit:c,render:u,renderCache:f,data:h,setupState:p,ctx:g,inheritAttrs:v}=e;let b,w;const k=sa(e);try{if(n.shapeFlag&4){const d=i||r;b=Ln(u.call(d,d,f,o,p,h,g)),w=l}else{const d=t;b=Ln(d.length>1?d(o,{attrs:l,slots:a,emit:c}):d(o,null)),w=t.props?l:Qv(l)}}catch(d){Bo.length=0,Po(d,e,1),b=We(Mn)}let A=b;if(w&&v!==!1){const d=Object.keys(w),{shapeFlag:y}=A;d.length&&y&(1|6)&&(s&&d.some(Jl)&&(w=Zv(w,s)),A=Yr(A,w))}return n.dirs&&(A.dirs=A.dirs?A.dirs.concat(n.dirs):n.dirs),n.transition&&(A.transition=n.transition),b=A,sa(k),b}const Qv=e=>{let t;for(const n in e)(n==="class"||n==="style"||Ks(n))&&((t||(t={}))[n]=e[n]);return t},Zv=(e,t)=>{const n={};for(const r in e)(!Jl(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function e2(e,t,n){const{props:r,children:i,component:o}=e,{props:s,children:a,patchFlag:l}=t,c=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?kh(r,s,c):!!s;if(l&8){const u=t.dynamicProps;for(let f=0;f<u.length;f++){const h=u[f];if(s[h]!==r[h]&&!vc(c,h))return!0}}}else return(i||a)&&(!a||!a.$stable)?!0:r===s?!1:r?s?kh(r,s,c):!0:!!s;return!1}function kh(e,t,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let i=0;i<r.length;i++){const o=r[i];if(t[o]!==e[o]&&!vc(n,o))return!0}return!1}function t2({vnode:e,parent:t},n){for(;t&&t.subTree===e;)(e=t.vnode).el=n,t=t.parent}const n2=e=>e.__isSuspense;function r2(e,t){t&&t.pendingBranch?Ce(e)?t.effects.push(...e):t.effects.push(e):Yv(e)}function wt(e,t){if(pt){let n=pt.provides;const r=pt.parent&&pt.parent.provides;r===n&&(n=pt.provides=Object.create(r)),n[e]=t}}function Xe(e,t,n=!1){const r=pt||Zt;if(r){const i=r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides;if(i&&e in i)return i[e];if(arguments.length>1)return n&&Te(t)?t.call(r.proxy):t}}function xt(e,t){return wc(e,null,t)}const Sh={};function Ht(e,t,n){return wc(e,t,n)}function wc(e,t,{immediate:n,deep:r,flush:i,onTrack:o,onTrigger:s}=qe){const a=pt;let l,c=!1,u=!1;if(Dt(e)?(l=()=>e.value,c=!!e._shallow):Ri(e)?(l=()=>e,r=!0):Ce(e)?(u=!0,c=e.some(Ri),l=()=>e.map(w=>{if(Dt(w))return w.value;if(Ri(w))return Vr(w);if(Te(w))return lr(w,a,2)})):Te(e)?t?l=()=>lr(e,a,2):l=()=>{if(!(a&&a.isUnmounted))return f&&f(),an(e,a,3,[h])}:l=Cn,t&&r){const w=l;l=()=>Vr(w())}let f,h=w=>{f=b.onStop=()=>{lr(w,a,4)}};if(Di)return h=Cn,t?n&&an(t,a,3,[l(),u?[]:void 0,h]):l(),Cn;let p=u?[]:Sh;const g=()=>{if(!!b.active)if(t){const w=b.run();(r||c||(u?w.some((k,A)=>Ao(k,p[A])):Ao(w,p)))&&(f&&f(),an(t,a,3,[w,p===Sh?void 0:p,h]),p=w)}else b.run()};g.allowRecurse=!!t;let v;i==="sync"?v=g:i==="post"?v=()=>zt(g,a&&a.suspense):v=()=>{!a||a.isMounted?Gv(g):g()};const b=new ic(l,v);return t?n?g():p=b.run():i==="post"?zt(b.run.bind(b),a&&a.suspense):b.run(),()=>{b.stop(),a&&a.scope&&Gl(a.scope.effects,b)}}function i2(e,t,n){const r=this.proxy,i=ht(e)?e.includes(".")?Ch(r,e):()=>r[e]:e.bind(r,r);let o;Te(t)?o=t:(o=t.handler,n=t);const s=pt;Li(this);const a=wc(i,o.bind(r),n);return s?Li(s):Qr(),a}function Ch(e,t){const n=t.split(".");return()=>{let r=e;for(let i=0;i<n.length&&r;i++)r=r[n[i]];return r}}function Vr(e,t){if(!at(e)||e.__v_skip||(t=t||new Set,t.has(e)))return e;if(t.add(e),Dt(e))Vr(e.value,t);else if(Ce(e))for(let n=0;n<e.length;n++)Vr(e[n],t);else if($f(e)||Oi(e))e.forEach(n=>{Vr(n,t)});else if(zf(e))for(const n in e)Vr(e[n],t);return e}function o2(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Je(()=>{e.isMounted=!0}),Io(()=>{e.isUnmounting=!0}),e}const cn=[Function,Array],s2={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:cn,onEnter:cn,onAfterEnter:cn,onEnterCancelled:cn,onBeforeLeave:cn,onLeave:cn,onAfterLeave:cn,onLeaveCancelled:cn,onBeforeAppear:cn,onAppear:cn,onAfterAppear:cn,onAppearCancelled:cn},setup(e,{slots:t}){const n=$c(),r=o2();let i;return()=>{const o=t.default&&Eh(t.default(),!0);if(!o||!o.length)return;const s=fe(e),{mode:a}=s,l=o[0];if(r.isLeaving)return kc(l);const c=Ah(l);if(!c)return kc(l);const u=xc(c,s,r,n);Sc(c,u);const f=n.subTree,h=f&&Ah(f);let p=!1;const{getTransitionKey:g}=c.type;if(g){const v=g();i===void 0?i=v:v!==i&&(i=v,p=!0)}if(h&&h.type!==Mn&&(!Jr(c,h)||p)){const v=xc(h,s,r,n);if(Sc(h,v),a==="out-in")return r.isLeaving=!0,v.afterLeave=()=>{r.isLeaving=!1,n.update()},kc(l);a==="in-out"&&c.type!==Mn&&(v.delayLeave=(b,w,k)=>{const A=Mh(r,h);A[String(h.key)]=h,b._leaveCb=()=>{w(),b._leaveCb=void 0,delete u.delayedLeave},u.delayedLeave=k})}return l}}},_h=s2;function Mh(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function xc(e,t,n,r){const{appear:i,mode:o,persisted:s=!1,onBeforeEnter:a,onEnter:l,onAfterEnter:c,onEnterCancelled:u,onBeforeLeave:f,onLeave:h,onAfterLeave:p,onLeaveCancelled:g,onBeforeAppear:v,onAppear:b,onAfterAppear:w,onAppearCancelled:k}=t,A=String(e.key),d=Mh(n,e),y=(x,S)=>{x&&an(x,r,9,S)},m={mode:o,persisted:s,beforeEnter(x){let S=a;if(!n.isMounted)if(i)S=v||a;else return;x._leaveCb&&x._leaveCb(!0);const _=d[A];_&&Jr(e,_)&&_.el._leaveCb&&_.el._leaveCb(),y(S,[x])},enter(x){let S=l,_=c,C=u;if(!n.isMounted)if(i)S=b||l,_=w||c,C=k||u;else return;let E=!1;const T=x._enterCb=R=>{E||(E=!0,R?y(C,[x]):y(_,[x]),m.delayedLeave&&m.delayedLeave(),x._enterCb=void 0)};S?(S(x,T),S.length<=1&&T()):T()},leave(x,S){const _=String(e.key);if(x._enterCb&&x._enterCb(!0),n.isUnmounting)return S();y(f,[x]);let C=!1;const E=x._leaveCb=T=>{C||(C=!0,S(),T?y(g,[x]):y(p,[x]),x._leaveCb=void 0,d[_]===e&&delete d[_])};d[_]=e,h?(h(x,E),h.length<=1&&E()):E()},clone(x){return xc(x,t,n,r)}};return m}function kc(e){if(Do(e))return e=Yr(e),e.children=null,e}function Ah(e){return Do(e)?e.children?e.children[0]:void 0:e}function Sc(e,t){e.shapeFlag&6&&e.component?Sc(e.component.subTree,t):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Eh(e,t=!1){let n=[],r=0;for(let i=0;i<e.length;i++){const o=e[i];o.type===lt?(o.patchFlag&128&&r++,n=n.concat(Eh(o.children,t))):(t||o.type!==Mn)&&n.push(o)}if(r>1)for(let i=0;i<n.length;i++)n[i].patchFlag=-2;return n}function je(e){return Te(e)?{setup:e,name:e.name}:e}const Cc=e=>!!e.type.__asyncLoader;function aa(e){Te(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:r,delay:i=200,timeout:o,suspensible:s=!0,onError:a}=e;let l=null,c,u=0;const f=()=>(u++,l=null,h()),h=()=>{let p;return l||(p=l=t().catch(g=>{if(g=g instanceof Error?g:new Error(String(g)),a)return new Promise((v,b)=>{a(g,()=>v(f()),()=>b(g),u+1)});throw g}).then(g=>p!==l&&l?l:(g&&(g.__esModule||g[Symbol.toStringTag]==="Module")&&(g=g.default),c=g,g)))};return je({name:"AsyncComponentWrapper",__asyncLoader:h,get __asyncResolved(){return c},setup(){const p=pt;if(c)return()=>_c(c,p);const g=k=>{l=null,Po(k,p,13,!r)};if(s&&p.suspense||Di)return h().then(k=>()=>_c(k,p)).catch(k=>(g(k),()=>r?We(r,{error:k}):null));const v=se(!1),b=se(),w=se(!!i);return i&&setTimeout(()=>{w.value=!1},i),o!=null&&setTimeout(()=>{if(!v.value&&!b.value){const k=new Error(`Async component timed out after ${o}ms.`);g(k),b.value=k}},o),h().then(()=>{v.value=!0,p.parent&&Do(p.parent.vnode)&&gc(p.parent.update)}).catch(k=>{g(k),b.value=k}),()=>{if(v.value&&c)return _c(c,p);if(b.value&&r)return We(r,{error:b.value});if(n&&!w.value)return We(n)}}})}function _c(e,{vnode:{ref:t,props:n,children:r}}){const i=We(e,n,r);return i.ref=t,i}const Do=e=>e.type.__isKeepAlive;function a2(e,t){Oh(e,"a",t)}function l2(e,t){Oh(e,"da",t)}function Oh(e,t,n=pt){const r=e.__wdc||(e.__wdc=()=>{let i=n;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(la(t,r,n),n){let i=n.parent;for(;i&&i.parent;)Do(i.parent.vnode)&&c2(r,t,n,i),i=i.parent}}function c2(e,t,n,r){const i=la(t,e,r,!0);Et(()=>{Gl(r[t],i)},n)}function la(e,t,n=pt,r=!1){if(n){const i=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...s)=>{if(n.isUnmounted)return;Pi(),Li(n);const a=an(t,n,e,s);return Qr(),Fr(),a});return r?i.unshift(o):i.push(o),o}}const Zn=e=>(t,n=pt)=>(!Di||e==="sp")&&la(e,t,n),u2=Zn("bm"),Je=Zn("m"),d2=Zn("bu"),f2=Zn("u"),Io=Zn("bum"),Et=Zn("um"),h2=Zn("sp"),p2=Zn("rtg"),m2=Zn("rtc");function g2(e,t=pt){la("ec",e,t)}let Mc=!0;function y2(e){const t=Rh(e),n=e.proxy,r=e.ctx;Mc=!1,t.beforeCreate&&Th(t.beforeCreate,e,"bc");const{data:i,computed:o,methods:s,watch:a,provide:l,inject:c,created:u,beforeMount:f,mounted:h,beforeUpdate:p,updated:g,activated:v,deactivated:b,beforeDestroy:w,beforeUnmount:k,destroyed:A,unmounted:d,render:y,renderTracked:m,renderTriggered:x,errorCaptured:S,serverPrefetch:_,expose:C,inheritAttrs:E,components:T,directives:R,filters:N}=t;if(c&&v2(c,r,null,e.appContext.config.unwrapInjectedRef),s)for(const P in s){const L=s[P];Te(L)&&(r[P]=L.bind(n))}if(i){const P=i.call(n,n);at(P)&&(e.data=sn(P))}if(Mc=!0,o)for(const P in o){const L=o[P],H=Te(L)?L.bind(n,n):Te(L.get)?L.get.bind(n,n):Cn,te=!Te(L)&&Te(L.set)?L.set.bind(n):Cn,q=ph({get:H,set:te});Object.defineProperty(r,P,{enumerable:!0,configurable:!0,get:()=>q.value,set:ae=>q.value=ae})}if(a)for(const P in a)Ph(a[P],r,n,P);if(l){const P=Te(l)?l.call(n):l;Reflect.ownKeys(P).forEach(L=>{wt(L,P[L])})}u&&Th(u,e,"c");function M(P,L){Ce(L)?L.forEach(H=>P(H.bind(n))):L&&P(L.bind(n))}if(M(u2,f),M(Je,h),M(d2,p),M(f2,g),M(a2,v),M(l2,b),M(g2,S),M(m2,m),M(p2,x),M(Io,k),M(Et,d),M(h2,_),Ce(C))if(C.length){const P=e.exposed||(e.exposed={});C.forEach(L=>{Object.defineProperty(P,L,{get:()=>n[L],set:H=>n[L]=H})})}else e.exposed||(e.exposed={});y&&e.render===Cn&&(e.render=y),E!=null&&(e.inheritAttrs=E),T&&(e.components=T),R&&(e.directives=R)}function v2(e,t,n=Cn,r=!1){Ce(e)&&(e=Ac(e));for(const i in e){const o=e[i];let s;at(o)?"default"in o?s=Xe(o.from||i,o.default,!0):s=Xe(o.from||i):s=Xe(o),Dt(s)&&r?Object.defineProperty(t,i,{enumerable:!0,configurable:!0,get:()=>s.value,set:a=>s.value=a}):t[i]=s}}function Th(e,t,n){an(Ce(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function Ph(e,t,n,r){const i=r.includes(".")?Ch(n,r):()=>n[r];if(ht(e)){const o=t[e];Te(o)&&Ht(i,o)}else if(Te(e))Ht(i,e.bind(n));else if(at(e))if(Ce(e))e.forEach(o=>Ph(o,t,n,r));else{const o=Te(e.handler)?e.handler.bind(n):t[e.handler];Te(o)&&Ht(i,o,e)}}function Rh(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:o,config:{optionMergeStrategies:s}}=e.appContext,a=o.get(t);let l;return a?l=a:!i.length&&!n&&!r?l=t:(l={},i.length&&i.forEach(c=>ca(l,c,s,!0)),ca(l,t,s)),o.set(t,l),l}function ca(e,t,n,r=!1){const{mixins:i,extends:o}=t;o&&ca(e,o,n,!0),i&&i.forEach(s=>ca(e,s,n,!0));for(const s in t)if(!(r&&s==="expose")){const a=b2[s]||n&&n[s];e[s]=a?a(e[s],t[s]):t[s]}return e}const b2={data:jh,props:Wr,emits:Wr,methods:Wr,computed:Wr,beforeCreate:It,created:It,beforeMount:It,mounted:It,beforeUpdate:It,updated:It,beforeDestroy:It,beforeUnmount:It,destroyed:It,unmounted:It,activated:It,deactivated:It,errorCaptured:It,serverPrefetch:It,components:Wr,directives:Wr,watch:x2,provide:jh,inject:w2};function jh(e,t){return t?e?function(){return At(Te(e)?e.call(this,this):e,Te(t)?t.call(this,this):t)}:t:e}function w2(e,t){return Wr(Ac(e),Ac(t))}function Ac(e){if(Ce(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function It(e,t){return e?[...new Set([].concat(e,t))]:t}function Wr(e,t){return e?At(At(Object.create(null),e),t):t}function x2(e,t){if(!e)return t;if(!t)return e;const n=At(Object.create(null),e);for(const r in t)n[r]=It(e[r],t[r]);return n}function k2(e,t,n,r=!1){const i={},o={};Xs(o,ha,1),e.propsDefaults=Object.create(null),Nh(e,t,i,o);for(const s in e.propsOptions[0])s in i||(i[s]=void 0);n?e.props=r?i:Fv(i):e.type.props?e.props=i:e.props=o,e.attrs=o}function S2(e,t,n,r){const{props:i,attrs:o,vnode:{patchFlag:s}}=e,a=fe(i),[l]=e.propsOptions;let c=!1;if((r||s>0)&&!(s&16)){if(s&8){const u=e.vnode.dynamicProps;for(let f=0;f<u.length;f++){let h=u[f];const p=t[h];if(l)if(Be(o,h))p!==o[h]&&(o[h]=p,c=!0);else{const g=Nn(h);i[g]=Ec(l,a,g,p,e,!1)}else p!==o[h]&&(o[h]=p,c=!0)}}}else{Nh(e,t,i,o)&&(c=!0);let u;for(const f in a)(!t||!Be(t,f)&&((u=$r(f))===f||!Be(t,u)))&&(l?n&&(n[f]!==void 0||n[u]!==void 0)&&(i[f]=Ec(l,a,f,void 0,e,!0)):delete i[f]);if(o!==a)for(const f in o)(!t||!Be(t,f))&&(delete o[f],c=!0)}c&&Xn(e,"set","$attrs")}function Nh(e,t,n,r){const[i,o]=e.propsOptions;let s=!1,a;if(t)for(let l in t){if(Js(l))continue;const c=t[l];let u;i&&Be(i,u=Nn(l))?!o||!o.includes(u)?n[u]=c:(a||(a={}))[u]=c:vc(e.emitsOptions,l)||(!(l in r)||c!==r[l])&&(r[l]=c,s=!0)}if(o){const l=fe(n),c=a||qe;for(let u=0;u<o.length;u++){const f=o[u];n[f]=Ec(i,l,f,c[f],e,!Be(c,f))}}return s}function Ec(e,t,n,r,i,o){const s=e[n];if(s!=null){const a=Be(s,"default");if(a&&r===void 0){const l=s.default;if(s.type!==Function&&Te(l)){const{propsDefaults:c}=i;n in c?r=c[n]:(Li(i),r=c[n]=l.call(null,t),Qr())}else r=l}s[0]&&(o&&!a?r=!1:s[1]&&(r===""||r===$r(n))&&(r=!0))}return r}function Lh(e,t,n=!1){const r=t.propsCache,i=r.get(e);if(i)return i;const o=e.props,s={},a=[];let l=!1;if(!Te(e)){const u=f=>{l=!0;const[h,p]=Lh(f,t,!0);At(s,h),p&&a.push(...p)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!o&&!l)return r.set(e,Ei),Ei;if(Ce(o))for(let u=0;u<o.length;u++){const f=Nn(o[u]);Dh(f)&&(s[f]=qe)}else if(o)for(const u in o){const f=Nn(u);if(Dh(f)){const h=o[u],p=s[f]=Ce(h)||Te(h)?{type:h}:h;if(p){const g=Bh(Boolean,p.type),v=Bh(String,p.type);p[0]=g>-1,p[1]=v<0||g<v,(g>-1||Be(p,"default"))&&a.push(f)}}}const c=[s,a];return r.set(e,c),c}function Dh(e){return e[0]!=="$"}function Ih(e){const t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:e===null?"null":""}function $h(e,t){return Ih(e)===Ih(t)}function Bh(e,t){return Ce(t)?t.findIndex(n=>$h(n,e)):Te(t)&&$h(t,e)?0:-1}const Hh=e=>e[0]==="_"||e==="$stable",Oc=e=>Ce(e)?e.map(Ln):[Ln(e)],C2=(e,t,n)=>{const r=ln((...i)=>Oc(t(...i)),n);return r._c=!1,r},zh=(e,t,n)=>{const r=e._ctx;for(const i in e){if(Hh(i))continue;const o=e[i];if(Te(o))t[i]=C2(i,o,r);else if(o!=null){const s=Oc(o);t[i]=()=>s}}},Fh=(e,t)=>{const n=Oc(t);e.slots.default=()=>n},_2=(e,t)=>{if(e.vnode.shapeFlag&32){const n=t._;n?(e.slots=fe(t),Xs(t,"_",n)):zh(t,e.slots={})}else e.slots={},t&&Fh(e,t);Xs(e.slots,ha,1)},M2=(e,t,n)=>{const{vnode:r,slots:i}=e;let o=!0,s=qe;if(r.shapeFlag&32){const a=t._;a?n&&a===1?o=!1:(At(i,t),!n&&a===1&&delete i._):(o=!t.$stable,zh(t,i)),s=t}else t&&(Fh(e,t),s={default:1});if(o)for(const a in i)!Hh(a)&&!(a in s)&&delete i[a]};function A2(e,t){const n=Zt;if(n===null)return e;const r=n.proxy,i=e.dirs||(e.dirs=[]);for(let o=0;o<t.length;o++){let[s,a,l,c=qe]=t[o];Te(s)&&(s={mounted:s,updated:s}),s.deep&&Vr(a),i.push({dir:s,instance:r,value:a,oldValue:void 0,arg:l,modifiers:c})}return e}function Ur(e,t,n,r){const i=e.dirs,o=t&&t.dirs;for(let s=0;s<i.length;s++){const a=i[s];o&&(a.oldValue=o[s].value);let l=a.dir[r];l&&(Pi(),an(l,n,8,[e.el,a,e,t]),Fr())}}function Vh(){return{app:null,config:{isNativeTag:av,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let E2=0;function O2(e,t){return function(r,i=null){i!=null&&!at(i)&&(i=null);const o=Vh(),s=new Set;let a=!1;const l=o.app={_uid:E2++,_component:r,_props:i,_container:null,_context:o,_instance:null,version:X2,get config(){return o.config},set config(c){},use(c,...u){return s.has(c)||(c&&Te(c.install)?(s.add(c),c.install(l,...u)):Te(c)&&(s.add(c),c(l,...u))),l},mixin(c){return o.mixins.includes(c)||o.mixins.push(c),l},component(c,u){return u?(o.components[c]=u,l):o.components[c]},directive(c,u){return u?(o.directives[c]=u,l):o.directives[c]},mount(c,u,f){if(!a){const h=We(r,i);return h.appContext=o,u&&t?t(h,c):e(h,c,f),a=!0,l._container=c,c.__vue_app__=l,Bc(h.component)||h.component.proxy}},unmount(){a&&(e(null,l._container),delete l._container.__vue_app__)},provide(c,u){return o.provides[c]=u,l}};return l}}function Tc(e,t,n,r,i=!1){if(Ce(e)){e.forEach((h,p)=>Tc(h,t&&(Ce(t)?t[p]:t),n,r,i));return}if(Cc(r)&&!i)return;const o=r.shapeFlag&4?Bc(r.component)||r.component.proxy:r.el,s=i?null:o,{i:a,r:l}=e,c=t&&t.r,u=a.refs===qe?a.refs={}:a.refs,f=a.setupState;if(c!=null&&c!==l&&(ht(c)?(u[c]=null,Be(f,c)&&(f[c]=null)):Dt(c)&&(c.value=null)),Te(l))lr(l,a,12,[s,u]);else{const h=ht(l),p=Dt(l);if(h||p){const g=()=>{if(e.f){const v=h?u[l]:l.value;i?Ce(v)&&Gl(v,o):Ce(v)?v.includes(o)||v.push(o):h?u[l]=[o]:(l.value=[o],e.k&&(u[e.k]=l.value))}else h?(u[l]=s,Be(f,l)&&(f[l]=s)):Dt(l)&&(l.value=s,e.k&&(u[e.k]=s))};s?(g.id=-1,zt(g,n)):g()}}}const zt=r2;function T2(e){return P2(e)}function P2(e,t){const n=hv();n.__VUE__=!0;const{insert:r,remove:i,patchProp:o,createElement:s,createText:a,createComment:l,setText:c,setElementText:u,parentNode:f,nextSibling:h,setScopeId:p=Cn,cloneNode:g,insertStaticContent:v}=e,b=(O,j,$,F=null,z=null,Q=null,ne=!1,W=null,G=!!j.dynamicChildren)=>{if(O===j)return;O&&!Jr(O,j)&&(F=ee(O),ge(O,z,Q,!0),O=null),j.patchFlag===-2&&(G=!1,j.dynamicChildren=null);const{type:U,ref:le,shapeFlag:oe}=j;switch(U){case Nc:w(O,j,$,F);break;case Mn:k(O,j,$,F);break;case Lc:O==null&&A(j,$,F,ne);break;case lt:R(O,j,$,F,z,Q,ne,W,G);break;default:oe&1?m(O,j,$,F,z,Q,ne,W,G):oe&6?N(O,j,$,F,z,Q,ne,W,G):(oe&64||oe&128)&&U.process(O,j,$,F,z,Q,ne,W,G,Ee)}le!=null&&z&&Tc(le,O&&O.ref,Q,j||O,!j)},w=(O,j,$,F)=>{if(O==null)r(j.el=a(j.children),$,F);else{const z=j.el=O.el;j.children!==O.children&&c(z,j.children)}},k=(O,j,$,F)=>{O==null?r(j.el=l(j.children||""),$,F):j.el=O.el},A=(O,j,$,F)=>{[O.el,O.anchor]=v(O.children,j,$,F,O.el,O.anchor)},d=({el:O,anchor:j},$,F)=>{let z;for(;O&&O!==j;)z=h(O),r(O,$,F),O=z;r(j,$,F)},y=({el:O,anchor:j})=>{let $;for(;O&&O!==j;)$=h(O),i(O),O=$;i(j)},m=(O,j,$,F,z,Q,ne,W,G)=>{ne=ne||j.type==="svg",O==null?x(j,$,F,z,Q,ne,W,G):C(O,j,z,Q,ne,W,G)},x=(O,j,$,F,z,Q,ne,W)=>{let G,U;const{type:le,props:oe,shapeFlag:de,transition:ye,patchFlag:Oe,dirs:$e}=O;if(O.el&&g!==void 0&&Oe===-1)G=O.el=g(O.el);else{if(G=O.el=s(O.type,Q,oe&&oe.is,oe),de&8?u(G,O.children):de&16&&_(O.children,G,null,F,z,Q&&le!=="foreignObject",ne,W),$e&&Ur(O,null,F,"created"),oe){for(const Ke in oe)Ke!=="value"&&!Js(Ke)&&o(G,Ke,null,oe[Ke],Q,O.children,F,z,V);"value"in oe&&o(G,"value",null,oe.value),(U=oe.onVnodeBeforeMount)&&Dn(U,F,O)}S(G,O,O.scopeId,ne,F)}$e&&Ur(O,null,F,"beforeMount");const ze=(!z||z&&!z.pendingBranch)&&ye&&!ye.persisted;ze&&ye.beforeEnter(G),r(G,j,$),((U=oe&&oe.onVnodeMounted)||ze||$e)&&zt(()=>{U&&Dn(U,F,O),ze&&ye.enter(G),$e&&Ur(O,null,F,"mounted")},z)},S=(O,j,$,F,z)=>{if($&&p(O,$),F)for(let Q=0;Q<F.length;Q++)p(O,F[Q]);if(z){let Q=z.subTree;if(j===Q){const ne=z.vnode;S(O,ne,ne.scopeId,ne.slotScopeIds,z.parent)}}},_=(O,j,$,F,z,Q,ne,W,G=0)=>{for(let U=G;U<O.length;U++){const le=O[U]=W?ur(O[U]):Ln(O[U]);b(null,le,j,$,F,z,Q,ne,W)}},C=(O,j,$,F,z,Q,ne)=>{const W=j.el=O.el;let{patchFlag:G,dynamicChildren:U,dirs:le}=j;G|=O.patchFlag&16;const oe=O.props||qe,de=j.props||qe;let ye;$&&Kr($,!1),(ye=de.onVnodeBeforeUpdate)&&Dn(ye,$,j,O),le&&Ur(j,O,$,"beforeUpdate"),$&&Kr($,!0);const Oe=z&&j.type!=="foreignObject";if(U?E(O.dynamicChildren,U,W,$,F,Oe,Q):ne||H(O,j,W,null,$,F,Oe,Q,!1),G>0){if(G&16)T(W,j,oe,de,$,F,z);else if(G&2&&oe.class!==de.class&&o(W,"class",null,de.class,z),G&4&&o(W,"style",oe.style,de.style,z),G&8){const $e=j.dynamicProps;for(let ze=0;ze<$e.length;ze++){const Ke=$e[ze],Yt=oe[Ke],or=de[Ke];(or!==Yt||Ke==="value")&&o(W,Ke,Yt,or,z,O.children,$,F,V)}}G&1&&O.children!==j.children&&u(W,j.children)}else!ne&&U==null&&T(W,j,oe,de,$,F,z);((ye=de.onVnodeUpdated)||le)&&zt(()=>{ye&&Dn(ye,$,j,O),le&&Ur(j,O,$,"updated")},F)},E=(O,j,$,F,z,Q,ne)=>{for(let W=0;W<j.length;W++){const G=O[W],U=j[W],le=G.el&&(G.type===lt||!Jr(G,U)||G.shapeFlag&(6|64))?f(G.el):$;b(G,U,le,null,F,z,Q,ne,!0)}},T=(O,j,$,F,z,Q,ne)=>{if($!==F){for(const W in F){if(Js(W))continue;const G=F[W],U=$[W];G!==U&&W!=="value"&&o(O,W,U,G,ne,j.children,z,Q,V)}if($!==qe)for(const W in $)!Js(W)&&!(W in F)&&o(O,W,$[W],null,ne,j.children,z,Q,V);"value"in F&&o(O,"value",$.value,F.value)}},R=(O,j,$,F,z,Q,ne,W,G)=>{const U=j.el=O?O.el:a(""),le=j.anchor=O?O.anchor:a("");let{patchFlag:oe,dynamicChildren:de,slotScopeIds:ye}=j;ye&&(W=W?W.concat(ye):ye),O==null?(r(U,$,F),r(le,$,F),_(j.children,$,le,z,Q,ne,W,G)):oe>0&&oe&64&&de&&O.dynamicChildren?(E(O.dynamicChildren,de,$,z,Q,ne,W),(j.key!=null||z&&j===z.subTree)&&Pc(O,j,!0)):H(O,j,$,le,z,Q,ne,W,G)},N=(O,j,$,F,z,Q,ne,W,G)=>{j.slotScopeIds=W,O==null?j.shapeFlag&512?z.ctx.activate(j,$,F,ne,G):D(j,$,F,z,Q,ne,G):M(O,j,G)},D=(O,j,$,F,z,Q,ne)=>{const W=O.component=V2(O,F,z);if(Do(O)&&(W.ctx.renderer=Ee),W2(W),W.asyncDep){if(z&&z.registerDep(W,P),!O.el){const G=W.subTree=We(Mn);k(null,G,j,$)}return}P(W,O,j,$,z,Q,ne)},M=(O,j,$)=>{const F=j.component=O.component;if(e2(O,j,$))if(F.asyncDep&&!F.asyncResolved){L(F,j,$);return}else F.next=j,Jv(F.update),F.update();else j.component=O.component,j.el=O.el,F.vnode=j},P=(O,j,$,F,z,Q,ne)=>{const W=()=>{if(O.isMounted){let{next:le,bu:oe,u:de,parent:ye,vnode:Oe}=O,$e=le,ze;Kr(O,!1),le?(le.el=Oe.el,L(O,le,ne)):le=Oe,oe&&Zl(oe),(ze=le.props&&le.props.onVnodeBeforeUpdate)&&Dn(ze,ye,le,Oe),Kr(O,!0);const Ke=bc(O),Yt=O.subTree;O.subTree=Ke,b(Yt,Ke,f(Yt.el),ee(Yt),O,z,Q),le.el=Ke.el,$e===null&&t2(O,Ke.el),de&&zt(de,z),(ze=le.props&&le.props.onVnodeUpdated)&&zt(()=>Dn(ze,ye,le,Oe),z)}else{let le;const{el:oe,props:de}=j,{bm:ye,m:Oe,parent:$e}=O,ze=Cc(j);if(Kr(O,!1),ye&&Zl(ye),!ze&&(le=de&&de.onVnodeBeforeMount)&&Dn(le,$e,j),Kr(O,!0),oe&&xe){const Ke=()=>{O.subTree=bc(O),xe(oe,O.subTree,O,z,null)};ze?j.type.__asyncLoader().then(()=>!O.isUnmounted&&Ke()):Ke()}else{const Ke=O.subTree=bc(O);b(null,Ke,$,F,O,z,Q),j.el=Ke.el}if(Oe&&zt(Oe,z),!ze&&(le=de&&de.onVnodeMounted)){const Ke=j;zt(()=>Dn(le,$e,Ke),z)}j.shapeFlag&256&&O.a&&zt(O.a,z),O.isMounted=!0,j=$=F=null}},G=O.effect=new ic(W,()=>gc(O.update),O.scope),U=O.update=G.run.bind(G);U.id=O.uid,Kr(O,!0),U()},L=(O,j,$)=>{j.component=O;const F=O.vnode.props;O.vnode=j,O.next=null,S2(O,j.props,F,$),M2(O,j.children,$),Pi(),yc(void 0,O.update),Fr()},H=(O,j,$,F,z,Q,ne,W,G=!1)=>{const U=O&&O.children,le=O?O.shapeFlag:0,oe=j.children,{patchFlag:de,shapeFlag:ye}=j;if(de>0){if(de&128){q(U,oe,$,F,z,Q,ne,W,G);return}else if(de&256){te(U,oe,$,F,z,Q,ne,W,G);return}}ye&8?(le&16&&V(U,z,Q),oe!==U&&u($,oe)):le&16?ye&16?q(U,oe,$,F,z,Q,ne,W,G):V(U,z,Q,!0):(le&8&&u($,""),ye&16&&_(oe,$,F,z,Q,ne,W,G))},te=(O,j,$,F,z,Q,ne,W,G)=>{O=O||Ei,j=j||Ei;const U=O.length,le=j.length,oe=Math.min(U,le);let de;for(de=0;de<oe;de++){const ye=j[de]=G?ur(j[de]):Ln(j[de]);b(O[de],ye,$,null,z,Q,ne,W,G)}U>le?V(O,z,Q,!0,!1,oe):_(j,$,F,z,Q,ne,W,G,oe)},q=(O,j,$,F,z,Q,ne,W,G)=>{let U=0;const le=j.length;let oe=O.length-1,de=le-1;for(;U<=oe&&U<=de;){const ye=O[U],Oe=j[U]=G?ur(j[U]):Ln(j[U]);if(Jr(ye,Oe))b(ye,Oe,$,null,z,Q,ne,W,G);else break;U++}for(;U<=oe&&U<=de;){const ye=O[oe],Oe=j[de]=G?ur(j[de]):Ln(j[de]);if(Jr(ye,Oe))b(ye,Oe,$,null,z,Q,ne,W,G);else break;oe--,de--}if(U>oe){if(U<=de){const ye=de+1,Oe=ye<le?j[ye].el:F;for(;U<=de;)b(null,j[U]=G?ur(j[U]):Ln(j[U]),$,Oe,z,Q,ne,W,G),U++}}else if(U>de)for(;U<=oe;)ge(O[U],z,Q,!0),U++;else{const ye=U,Oe=U,$e=new Map;for(U=Oe;U<=de;U++){const pe=j[U]=G?ur(j[U]):Ln(j[U]);pe.key!=null&&$e.set(pe.key,U)}let ze,Ke=0;const Yt=de-Oe+1;let or=!1,Fs=0;const B=new Array(Yt);for(U=0;U<Yt;U++)B[U]=0;for(U=ye;U<=oe;U++){const pe=O[U];if(Ke>=Yt){ge(pe,z,Q,!0);continue}let Pe;if(pe.key!=null)Pe=$e.get(pe.key);else for(ze=Oe;ze<=de;ze++)if(B[ze-Oe]===0&&Jr(pe,j[ze])){Pe=ze;break}Pe===void 0?ge(pe,z,Q,!0):(B[Pe-Oe]=U+1,Pe>=Fs?Fs=Pe:or=!0,b(pe,j[Pe],$,null,z,Q,ne,W,G),Ke++)}const ce=or?R2(B):Ei;for(ze=ce.length-1,U=Yt-1;U>=0;U--){const pe=Oe+U,Pe=j[pe],Re=pe+1<le?j[pe+1].el:F;B[U]===0?b(null,Pe,$,Re,z,Q,ne,W,G):or&&(ze<0||U!==ce[ze]?ae(Pe,$,Re,2):ze--)}}},ae=(O,j,$,F,z=null)=>{const{el:Q,type:ne,transition:W,children:G,shapeFlag:U}=O;if(U&6){ae(O.component.subTree,j,$,F);return}if(U&128){O.suspense.move(j,$,F);return}if(U&64){ne.move(O,j,$,Ee);return}if(ne===lt){r(Q,j,$);for(let oe=0;oe<G.length;oe++)ae(G[oe],j,$,F);r(O.anchor,j,$);return}if(ne===Lc){d(O,j,$);return}if(F!==2&&U&1&&W)if(F===0)W.beforeEnter(Q),r(Q,j,$),zt(()=>W.enter(Q),z);else{const{leave:oe,delayLeave:de,afterLeave:ye}=W,Oe=()=>r(Q,j,$),$e=()=>{oe(Q,()=>{Oe(),ye&&ye()})};de?de(Q,Oe,$e):$e()}else r(Q,j,$)},ge=(O,j,$,F=!1,z=!1)=>{const{type:Q,props:ne,ref:W,children:G,dynamicChildren:U,shapeFlag:le,patchFlag:oe,dirs:de}=O;if(W!=null&&Tc(W,null,$,O,!0),le&256){j.ctx.deactivate(O);return}const ye=le&1&&de,Oe=!Cc(O);let $e;if(Oe&&($e=ne&&ne.onVnodeBeforeUnmount)&&Dn($e,j,O),le&6)Y(O.component,$,F);else{if(le&128){O.suspense.unmount($,F);return}ye&&Ur(O,null,j,"beforeUnmount"),le&64?O.type.remove(O,j,$,z,Ee,F):U&&(Q!==lt||oe>0&&oe&64)?V(U,j,$,!1,!0):(Q===lt&&oe&(128|256)||!z&&le&16)&&V(G,j,$),F&&_e(O)}(Oe&&($e=ne&&ne.onVnodeUnmounted)||ye)&&zt(()=>{$e&&Dn($e,j,O),ye&&Ur(O,null,j,"unmounted")},$)},_e=O=>{const{type:j,el:$,anchor:F,transition:z}=O;if(j===lt){I($,F);return}if(j===Lc){y(O);return}const Q=()=>{i($),z&&!z.persisted&&z.afterLeave&&z.afterLeave()};if(O.shapeFlag&1&&z&&!z.persisted){const{leave:ne,delayLeave:W}=z,G=()=>ne($,Q);W?W(O.el,Q,G):G()}else Q()},I=(O,j)=>{let $;for(;O!==j;)$=h(O),i(O),O=$;i(j)},Y=(O,j,$)=>{const{bum:F,scope:z,update:Q,subTree:ne,um:W}=O;F&&Zl(F),z.stop(),Q&&(Q.active=!1,ge(ne,O,j,$)),W&&zt(W,j),zt(()=>{O.isUnmounted=!0},j),j&&j.pendingBranch&&!j.isUnmounted&&O.asyncDep&&!O.asyncResolved&&O.suspenseId===j.pendingId&&(j.deps--,j.deps===0&&j.resolve())},V=(O,j,$,F=!1,z=!1,Q=0)=>{for(let ne=Q;ne<O.length;ne++)ge(O[ne],j,$,F,z)},ee=O=>O.shapeFlag&6?ee(O.component.subTree):O.shapeFlag&128?O.suspense.next():h(O.anchor||O.el),Ae=(O,j,$)=>{O==null?j._vnode&&ge(j._vnode,null,null,!0):b(j._vnode||null,O,j,null,null,null,$),vh(),j._vnode=O},Ee={p:b,um:ge,m:ae,r:_e,mt:D,mc:_,pc:H,pbc:E,n:ee,o:e};let we,xe;return t&&([we,xe]=t(Ee)),{render:Ae,hydrate:we,createApp:O2(Ae,we)}}function Kr({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function Pc(e,t,n=!1){const r=e.children,i=t.children;if(Ce(r)&&Ce(i))for(let o=0;o<r.length;o++){const s=r[o];let a=i[o];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=i[o]=ur(i[o]),a.el=s.el),n||Pc(s,a))}}function R2(e){const t=e.slice(),n=[0];let r,i,o,s,a;const l=e.length;for(r=0;r<l;r++){const c=e[r];if(c!==0){if(i=n[n.length-1],e[i]<c){t[r]=i,n.push(r);continue}for(o=0,s=n.length-1;o<s;)a=o+s>>1,e[n[a]]<c?o=a+1:s=a;c<e[n[o]]&&(o>0&&(t[r]=n[o-1]),n[o]=r)}}for(o=n.length,s=n[o-1];o-- >0;)n[o]=s,s=t[s];return n}const j2=e=>e.__isTeleport,$o=e=>e&&(e.disabled||e.disabled===""),Wh=e=>typeof SVGElement!="undefined"&&e instanceof SVGElement,Rc=(e,t)=>{const n=e&&e.to;return ht(n)?t?t(n):null:n},N2={__isTeleport:!0,process(e,t,n,r,i,o,s,a,l,c){const{mc:u,pc:f,pbc:h,o:{insert:p,querySelector:g,createText:v,createComment:b}}=c,w=$o(t.props);let{shapeFlag:k,children:A,dynamicChildren:d}=t;if(e==null){const y=t.el=v(""),m=t.anchor=v("");p(y,n,r),p(m,n,r);const x=t.target=Rc(t.props,g),S=t.targetAnchor=v("");x&&(p(S,x),s=s||Wh(x));const _=(C,E)=>{k&16&&u(A,C,E,i,o,s,a,l)};w?_(n,m):x&&_(x,S)}else{t.el=e.el;const y=t.anchor=e.anchor,m=t.target=e.target,x=t.targetAnchor=e.targetAnchor,S=$o(e.props),_=S?n:m,C=S?y:x;if(s=s||Wh(m),d?(h(e.dynamicChildren,d,_,i,o,s,a),Pc(e,t,!0)):l||f(e,t,_,C,i,o,s,a,!1),w)S||ua(t,n,y,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const E=t.target=Rc(t.props,g);E&&ua(t,E,null,c,0)}else S&&ua(t,m,x,c,1)}},remove(e,t,n,r,{um:i,o:{remove:o}},s){const{shapeFlag:a,children:l,anchor:c,targetAnchor:u,target:f,props:h}=e;if(f&&o(u),(s||!$o(h))&&(o(c),a&16))for(let p=0;p<l.length;p++){const g=l[p];i(g,t,n,!0,!!g.dynamicChildren)}},move:ua,hydrate:L2};function ua(e,t,n,{o:{insert:r},m:i},o=2){o===0&&r(e.targetAnchor,t,n);const{el:s,anchor:a,shapeFlag:l,children:c,props:u}=e,f=o===2;if(f&&r(s,t,n),(!f||$o(u))&&l&16)for(let h=0;h<c.length;h++)i(c[h],t,n,2);f&&r(a,t,n)}function L2(e,t,n,r,i,o,{o:{nextSibling:s,parentNode:a,querySelector:l}},c){const u=t.target=Rc(t.props,l);if(u){const f=u._lpa||u.firstChild;t.shapeFlag&16&&($o(t.props)?(t.anchor=c(s(e),t,a(e),n,r,i,o),t.targetAnchor=f):(t.anchor=s(e),t.targetAnchor=c(f,t,u,n,r,i,o)),u._lpa=t.targetAnchor&&s(t.targetAnchor))}return t.anchor&&s(t.anchor)}const jc=N2,Uh="components";function _n(e,t){return I2(Uh,e,!0,t)||e}const D2=Symbol();function I2(e,t,n=!0,r=!1){const i=Zt||pt;if(i){const o=i.type;if(e===Uh){const a=q2(o);if(a&&(a===t||a===Nn(t)||a===Ys(Nn(t))))return o}const s=Kh(i[e]||o[e],t)||Kh(i.appContext[e],t);return!s&&r?o:s}}function Kh(e,t){return e&&(e[t]||e[Nn(t)]||e[Ys(Nn(t))])}const lt=Symbol(void 0),Nc=Symbol(void 0),Mn=Symbol(void 0),Lc=Symbol(void 0),Bo=[];let qr=null;function ue(e=!1){Bo.push(qr=e?null:[])}function $2(){Bo.pop(),qr=Bo[Bo.length-1]||null}let da=1;function qh(e){da+=e}function Jh(e){return e.dynamicChildren=da>0?qr||Ei:null,$2(),da>0&&qr&&qr.push(e),e}function ve(e,t,n,r,i,o){return Jh(ie(e,t,n,r,i,o,!0))}function An(e,t,n,r,i){return Jh(We(e,t,n,r,i,!0))}function fa(e){return e?e.__v_isVNode===!0:!1}function Jr(e,t){return e.type===t.type&&e.key===t.key}const ha="__vInternal",Gh=({key:e})=>e!=null?e:null,pa=({ref:e,ref_key:t,ref_for:n})=>e!=null?ht(e)||Dt(e)||Te(e)?{i:Zt,r:e,k:t,f:!!n}:e:null;function ie(e,t=null,n=null,r=0,i=null,o=e===lt?0:1,s=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Gh(t),ref:t&&pa(t),scopeId:xh,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null};return a?(Dc(l,n),o&128&&e.normalize(l)):n&&(l.shapeFlag|=ht(n)?8:16),da>0&&!s&&qr&&(l.patchFlag>0||o&6)&&l.patchFlag!==32&&qr.push(l),l}const We=B2;function B2(e,t=null,n=null,r=0,i=null,o=!1){if((!e||e===D2)&&(e=Mn),fa(e)){const a=Yr(e,t,!0);return n&&Dc(a,n),a}if(J2(e)&&(e=e.__vccOpts),t){t=Gr(t);let{class:a,style:l}=t;a&&!ht(a)&&(t.class=ft(a)),at(l)&&(ah(l)&&!Ce(l)&&(l=At({},l)),t.style=Mo(l))}const s=ht(e)?1:n2(e)?128:j2(e)?64:at(e)?4:Te(e)?2:0;return ie(e,t,n,r,i,s,o,!0)}function Gr(e){return e?ah(e)||ha in e?At({},e):e:null}function Yr(e,t,n=!1){const{props:r,ref:i,patchFlag:o,children:s}=e,a=t?Xr(r||{},t):r;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:a,key:a&&Gh(a),ref:t&&t.ref?n&&i?Ce(i)?i.concat(pa(t)):[i,pa(t)]:pa(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==lt?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Yr(e.ssContent),ssFallback:e.ssFallback&&Yr(e.ssFallback),el:e.el,anchor:e.anchor}}function Ho(e=" ",t=0){return We(Nc,null,e,t)}function kt(e="",t=!1){return t?(ue(),An(Mn,null,e)):We(Mn,null,e)}function Ln(e){return e==null||typeof e=="boolean"?We(Mn):Ce(e)?We(lt,null,e.slice()):typeof e=="object"?ur(e):We(Nc,null,String(e))}function ur(e){return e.el===null||e.memo?e:Yr(e)}function Dc(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(Ce(t))n=16;else if(typeof t=="object")if(r&(1|64)){const i=t.default;i&&(i._c&&(i._d=!1),Dc(e,i()),i._c&&(i._d=!0));return}else{n=32;const i=t._;!i&&!(ha in t)?t._ctx=Zt:i===3&&Zt&&(Zt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Te(t)?(t={default:t,_ctx:Zt},n=32):(t=String(t),r&64?(n=16,t=[Ho(t)]):n=8);e.children=t,e.shapeFlag|=n}function Xr(...e){const t={};for(let n=0;n<e.length;n++){const r=e[n];for(const i in r)if(i==="class")t.class!==r.class&&(t.class=ft([t.class,r.class]));else if(i==="style")t.style=Mo([t.style,r.style]);else if(Ks(i)){const o=t[i],s=r[i];o!==s&&!(Ce(o)&&o.includes(s))&&(t[i]=o?[].concat(o,s):s)}else i!==""&&(t[i]=r[i])}return t}function Dn(e,t,n,r=null){an(e,t,7,[n,r])}function Yh(e,t,n,r){let i;const o=n&&n[r];if(Ce(e)||ht(e)){i=new Array(e.length);for(let s=0,a=e.length;s<a;s++)i[s]=t(e[s],s,void 0,o&&o[s])}else if(typeof e=="number"){i=new Array(e);for(let s=0;s<e;s++)i[s]=t(s+1,s,void 0,o&&o[s])}else if(at(e))if(e[Symbol.iterator])i=Array.from(e,(s,a)=>t(s,a,void 0,o&&o[a]));else{const s=Object.keys(e);i=new Array(s.length);for(let a=0,l=s.length;a<l;a++){const c=s[a];i[a]=t(e[c],c,a,o&&o[a])}}else i=[];return n&&(n[r]=i),i}function St(e,t,n={},r,i){if(Zt.isCE)return We("slot",t==="default"?null:{name:t},r&&r());let o=e[t];o&&o._c&&(o._d=!1),ue();const s=o&&Xh(o(n)),a=An(lt,{key:n.key||`_${t}`},s||(r?r():[]),s&&e._===1?64:-2);return!i&&a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),o&&o._c&&(o._d=!0),a}function Xh(e){return e.some(t=>fa(t)?!(t.type===Mn||t.type===lt&&!Xh(t.children)):!0)?e:null}const Ic=e=>e?Qh(e)?Bc(e)||e.proxy:Ic(e.parent):null,ma=At(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Ic(e.parent),$root:e=>Ic(e.root),$emit:e=>e.emit,$options:e=>Rh(e),$forceUpdate:e=>()=>gc(e.update),$nextTick:e=>bt.bind(e.proxy),$watch:e=>i2.bind(e)}),H2={get({_:e},t){const{ctx:n,setupState:r,data:i,props:o,accessCache:s,type:a,appContext:l}=e;let c;if(t[0]!=="$"){const p=s[t];if(p!==void 0)switch(p){case 1:return r[t];case 2:return i[t];case 4:return n[t];case 3:return o[t]}else{if(r!==qe&&Be(r,t))return s[t]=1,r[t];if(i!==qe&&Be(i,t))return s[t]=2,i[t];if((c=e.propsOptions[0])&&Be(c,t))return s[t]=3,o[t];if(n!==qe&&Be(n,t))return s[t]=4,n[t];Mc&&(s[t]=0)}}const u=ma[t];let f,h;if(u)return t==="$attrs"&&Xt(e,"get",t),u(e);if((f=a.__cssModules)&&(f=f[t]))return f;if(n!==qe&&Be(n,t))return s[t]=4,n[t];if(h=l.config.globalProperties,Be(h,t))return h[t]},set({_:e},t,n){const{data:r,setupState:i,ctx:o}=e;if(i!==qe&&Be(i,t))i[t]=n;else if(r!==qe&&Be(r,t))r[t]=n;else if(Be(e.props,t))return!1;return t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:i,propsOptions:o}},s){let a;return!!n[s]||e!==qe&&Be(e,s)||t!==qe&&Be(t,s)||(a=o[0])&&Be(a,s)||Be(r,s)||Be(ma,s)||Be(i.config.globalProperties,s)}},z2=Vh();let F2=0;function V2(e,t,n){const r=e.type,i=(t?t.appContext:e.appContext)||z2,o={uid:F2++,vnode:e,type:r,parent:t,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,scope:new pv(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(i.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Lh(r,i),emitsOptions:wh(r,i),emit:null,emitted:null,propsDefaults:qe,inheritAttrs:r.inheritAttrs,ctx:qe,data:qe,props:qe,attrs:qe,slots:qe,refs:qe,setupState:qe,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return o.ctx={_:o},o.root=t?t.root:o,o.emit=Xv.bind(null,o),e.ce&&e.ce(o),o}let pt=null;const $c=()=>pt||Zt,Li=e=>{pt=e,e.scope.on()},Qr=()=>{pt&&pt.scope.off(),pt=null};function Qh(e){return e.vnode.shapeFlag&4}let Di=!1;function W2(e,t=!1){Di=t;const{props:n,children:r}=e.vnode,i=Qh(e);k2(e,n,i,t),_2(e,r);const o=i?U2(e,t):void 0;return Di=!1,o}function U2(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=lh(new Proxy(e.ctx,H2));const{setup:r}=n;if(r){const i=e.setupContext=r.length>1?np(e):null;Li(e),Pi();const o=lr(r,e,0,[e.props,i]);if(Fr(),Qr(),Bf(o)){if(o.then(Qr,Qr),t)return o.then(s=>{Zh(e,s,t)}).catch(s=>{Po(s,e,0)});e.asyncDep=o}else Zh(e,o,t)}else tp(e,t)}function Zh(e,t,n){Te(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:at(t)&&(e.setupState=hh(t)),tp(e,n)}let ep;function tp(e,t,n){const r=e.type;if(!e.render){if(!t&&ep&&!r.render){const i=r.template;if(i){const{isCustomElement:o,compilerOptions:s}=e.appContext.config,{delimiters:a,compilerOptions:l}=r,c=At(At({isCustomElement:o,delimiters:a},s),l);r.render=ep(i,c)}}e.render=r.render||Cn}Li(e),Pi(),y2(e),Fr(),Qr()}function K2(e){return new Proxy(e.attrs,{get(t,n){return Xt(e,"get","$attrs"),t[n]}})}function np(e){const t=r=>{e.exposed=r||{}};let n;return{get attrs(){return n||(n=K2(e))},slots:e.slots,emit:e.emit,expose:t}}function Bc(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(hh(lh(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in ma)return ma[n](e)}}))}function q2(e){return Te(e)&&e.displayName||e.name}function J2(e){return Te(e)&&"__vccOpts"in e}const X=(e,t)=>ph(e,t,Di);function G2(){return Y2().slots}function Y2(){const e=$c();return e.setupContext||(e.setupContext=np(e))}function He(e,t,n){const r=arguments.length;return r===2?at(t)&&!Ce(t)?fa(t)?We(e,null,[t]):We(e,t):We(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&fa(n)&&(n=[n]),We(e,t,n))}const X2="3.2.27",Q2="http://www.w3.org/2000/svg",Zr=typeof document!="undefined"?document:null,rp=Zr&&Zr.createElement("template"),Z2={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const i=t?Zr.createElementNS(Q2,e):Zr.createElement(e,n?{is:n}:void 0);return e==="select"&&r&&r.multiple!=null&&i.setAttribute("multiple",r.multiple),i},createText:e=>Zr.createTextNode(e),createComment:e=>Zr.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Zr.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},cloneNode(e){const t=e.cloneNode(!0);return"_value"in e&&(t._value=e._value),t},insertStaticContent(e,t,n,r,i,o){const s=n?n.previousSibling:t.lastChild;if(i&&o)for(;t.insertBefore(i.cloneNode(!0),n),!(i===o||!(i=i.nextSibling)););else{rp.innerHTML=r?`<svg>${e}</svg>`:e;const a=rp.content;if(r){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,n)}return[s?s.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}};function eb(e,t,n){const r=e._vtc;r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}function tb(e,t,n){const r=e.style,i=ht(n);if(n&&!i){for(const o in n)Hc(r,o,n[o]);if(t&&!ht(t))for(const o in t)n[o]==null&&Hc(r,o,"")}else{const o=r.display;i?t!==n&&(r.cssText=n):t&&e.removeAttribute("style"),"_vod"in e&&(r.display=o)}}const ip=/\s*!important$/;function Hc(e,t,n){if(Ce(n))n.forEach(r=>Hc(e,t,r));else if(t.startsWith("--"))e.setProperty(t,n);else{const r=nb(e,t);ip.test(n)?e.setProperty($r(r),n.replace(ip,""),"important"):e[r]=n}}const op=["Webkit","Moz","ms"],zc={};function nb(e,t){const n=zc[t];if(n)return n;let r=Nn(t);if(r!=="filter"&&r in e)return zc[t]=r;r=Ys(r);for(let i=0;i<op.length;i++){const o=op[i]+r;if(o in e)return zc[t]=o}return t}const sp="http://www.w3.org/1999/xlink";function rb(e,t,n,r,i){if(r&&t.startsWith("xlink:"))n==null?e.removeAttributeNS(sp,t.slice(6,t.length)):e.setAttributeNS(sp,t,n);else{const o=rv(t);n==null||o&&!Df(n)?e.removeAttribute(t):e.setAttribute(t,o?"":n)}}function ib(e,t,n,r,i,o,s){if(t==="innerHTML"||t==="textContent"){r&&s(r,i,o),e[t]=n==null?"":n;return}if(t==="value"&&e.tagName!=="PROGRESS"&&!e.tagName.includes("-")){e._value=n;const a=n==null?"":n;(e.value!==a||e.tagName==="OPTION")&&(e.value=a),n==null&&e.removeAttribute(t);return}if(n===""||n==null){const a=typeof e[t];if(a==="boolean"){e[t]=Df(n);return}else if(n==null&&a==="string"){e[t]="",e.removeAttribute(t);return}else if(a==="number"){try{e[t]=0}catch(l){}e.removeAttribute(t);return}}try{e[t]=n}catch(a){}}let ga=Date.now,ap=!1;if(typeof window!="undefined"){ga()>document.createEvent("Event").timeStamp&&(ga=()=>performance.now());const e=navigator.userAgent.match(/firefox\/(\d+)/i);ap=!!(e&&Number(e[1])<=53)}let Fc=0;const ob=Promise.resolve(),sb=()=>{Fc=0},ab=()=>Fc||(ob.then(sb),Fc=ga());function lb(e,t,n,r){e.addEventListener(t,n,r)}function cb(e,t,n,r){e.removeEventListener(t,n,r)}function ub(e,t,n,r,i=null){const o=e._vei||(e._vei={}),s=o[t];if(r&&s)s.value=r;else{const[a,l]=db(t);if(r){const c=o[t]=fb(r,i);lb(e,a,c,l)}else s&&(cb(e,a,s,l),o[t]=void 0)}}const lp=/(?:Once|Passive|Capture)$/;function db(e){let t;if(lp.test(e)){t={};let n;for(;n=e.match(lp);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[$r(e.slice(2)),t]}function fb(e,t){const n=r=>{const i=r.timeStamp||ga();(ap||i>=n.attached-1)&&an(hb(r,n.value),t,5,[r])};return n.value=e,n.attached=ab(),n}function hb(e,t){if(Ce(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>i=>!i._stopped&&r(i))}else return t}const cp=/^on[a-z]/,pb=(e,t,n,r,i=!1,o,s,a,l)=>{t==="class"?eb(e,r,i):t==="style"?tb(e,n,r):Ks(t)?Jl(t)||ub(e,t,n,r,s):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):mb(e,t,r,i))?ib(e,t,r,o,s,a,l):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),rb(e,t,r,i))};function mb(e,t,n,r){return r?!!(t==="innerHTML"||t==="textContent"||t in e&&cp.test(t)&&Te(n)):t==="spellcheck"||t==="draggable"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA"||cp.test(t)&&ht(n)?!1:t in e}const dr="transition",zo="animation",Vc=(e,{slots:t})=>He(_h,gb(e),t);Vc.displayName="Transition";const up={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String};Vc.props=At({},_h.props,up);const ei=(e,t=[])=>{Ce(e)?e.forEach(n=>n(...t)):e&&e(...t)},dp=e=>e?Ce(e)?e.some(t=>t.length>1):e.length>1:!1;function gb(e){const t={};for(const T in e)T in up||(t[T]=e[T]);if(e.css===!1)return t;const{name:n="v",type:r,duration:i,enterFromClass:o=`${n}-enter-from`,enterActiveClass:s=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:l=o,appearActiveClass:c=s,appearToClass:u=a,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:h=`${n}-leave-active`,leaveToClass:p=`${n}-leave-to`}=e,g=yb(i),v=g&&g[0],b=g&&g[1],{onBeforeEnter:w,onEnter:k,onEnterCancelled:A,onLeave:d,onLeaveCancelled:y,onBeforeAppear:m=w,onAppear:x=k,onAppearCancelled:S=A}=t,_=(T,R,N)=>{Ii(T,R?u:a),Ii(T,R?c:s),N&&N()},C=(T,R)=>{Ii(T,p),Ii(T,h),R&&R()},E=T=>(R,N)=>{const D=T?x:k,M=()=>_(R,T,N);ei(D,[R,M]),fp(()=>{Ii(R,T?l:o),fr(R,T?u:a),dp(D)||hp(R,r,v,M)})};return At(t,{onBeforeEnter(T){ei(w,[T]),fr(T,o),fr(T,s)},onBeforeAppear(T){ei(m,[T]),fr(T,l),fr(T,c)},onEnter:E(!1),onAppear:E(!0),onLeave(T,R){const N=()=>C(T,R);fr(T,f),wb(),fr(T,h),fp(()=>{Ii(T,f),fr(T,p),dp(d)||hp(T,r,b,N)}),ei(d,[T,N])},onEnterCancelled(T){_(T,!1),ei(A,[T])},onAppearCancelled(T){_(T,!0),ei(S,[T])},onLeaveCancelled(T){C(T),ei(y,[T])}})}function yb(e){if(e==null)return null;if(at(e))return[Wc(e.enter),Wc(e.leave)];{const t=Wc(e);return[t,t]}}function Wc(e){return Ff(e)}function fr(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e._vtc||(e._vtc=new Set)).add(t)}function Ii(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const{_vtc:n}=e;n&&(n.delete(t),n.size||(e._vtc=void 0))}function fp(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let vb=0;function hp(e,t,n,r){const i=e._endId=++vb,o=()=>{i===e._endId&&r()};if(n)return setTimeout(o,n);const{type:s,timeout:a,propCount:l}=bb(e,t);if(!s)return r();const c=s+"end";let u=0;const f=()=>{e.removeEventListener(c,h),o()},h=p=>{p.target===e&&++u>=l&&f()};setTimeout(()=>{u<l&&f()},a+1),e.addEventListener(c,h)}function bb(e,t){const n=window.getComputedStyle(e),r=g=>(n[g]||"").split(", "),i=r(dr+"Delay"),o=r(dr+"Duration"),s=pp(i,o),a=r(zo+"Delay"),l=r(zo+"Duration"),c=pp(a,l);let u=null,f=0,h=0;t===dr?s>0&&(u=dr,f=s,h=o.length):t===zo?c>0&&(u=zo,f=c,h=l.length):(f=Math.max(s,c),u=f>0?s>c?dr:zo:null,h=u?u===dr?o.length:l.length:0);const p=u===dr&&/\b(transform|all)(,|$)/.test(n[dr+"Property"]);return{type:u,timeout:f,propCount:h,hasTransform:p}}function pp(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>mp(n)+mp(e[r])))}function mp(e){return Number(e.slice(0,-1).replace(",","."))*1e3}function wb(){return document.body.offsetHeight}const xb=["ctrl","shift","alt","meta"],kb={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>xb.some(n=>e[`${n}Key`]&&!t.includes(n))},lP=(e,t)=>(n,...r)=>{for(let i=0;i<t.length;i++){const o=kb[t[i]];if(o&&o(n,t))return}return e(n,...r)},Sb={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},cP=(e,t)=>n=>{if(!("key"in n))return;const r=$r(n.key);if(t.some(i=>i===r||Sb[i]===r))return e(n)},Cb={beforeMount(e,{value:t},{transition:n}){e._vod=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Fo(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),Fo(e,!0),r.enter(e)):r.leave(e,()=>{Fo(e,!1)}):Fo(e,t))},beforeUnmount(e,{value:t}){Fo(e,t)}};function Fo(e,t){e.style.display=t?e._vod:"none"}const _b=At({patchProp:pb},Z2);let gp;function Mb(){return gp||(gp=T2(_b))}const uP=(...e)=>{const t=Mb().createApp(...e),{mount:n}=t;return t.mount=r=>{const i=Ab(r);if(!i)return;const o=t._component;!Te(o)&&!o.render&&!o.template&&(o.template=i.innerHTML),i.innerHTML="";const s=n(i,!1,i instanceof SVGElement);return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),s},t};function Ab(e){return ht(e)?document.querySelector(e):e}/*!
* vue-router v4.0.12
* (c) 2021 Eduardo San Martin Morote
* @license MIT
*/const yp=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol",$i=e=>yp?Symbol(e):"_vr_"+e,Eb=$i("rvlm"),vp=$i("rvd"),ya=$i("r"),bp=$i("rl"),Uc=$i("rvl"),Bi=typeof window!="undefined";function Ob(e){return e.__esModule||yp&&e[Symbol.toStringTag]==="Module"}const Ge=Object.assign;function Kc(e,t){const n={};for(const r in t){const i=t[r];n[r]=Array.isArray(i)?i.map(e):e(i)}return n}const Vo=()=>{},Tb=/\/$/,Pb=e=>e.replace(Tb,"");function qc(e,t,n="/"){let r,i={},o="",s="";const a=t.indexOf("?"),l=t.indexOf("#",a>-1?a:0);return a>-1&&(r=t.slice(0,a),o=t.slice(a+1,l>-1?l:t.length),i=e(o)),l>-1&&(r=r||t.slice(0,l),s=t.slice(l,t.length)),r=Lb(r!=null?r:t,n),{fullPath:r+(o&&"?")+o+s,path:r,query:i,hash:s}}function Rb(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function wp(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function jb(e,t,n){const r=t.matched.length-1,i=n.matched.length-1;return r>-1&&r===i&&Hi(t.matched[r],n.matched[i])&&xp(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Hi(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function xp(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!Nb(e[n],t[n]))return!1;return!0}function Nb(e,t){return Array.isArray(e)?kp(e,t):Array.isArray(t)?kp(t,e):e===t}function kp(e,t){return Array.isArray(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function Lb(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/");let i=n.length-1,o,s;for(o=0;o<r.length;o++)if(s=r[o],!(i===1||s==="."))if(s==="..")i--;else break;return n.slice(0,i).join("/")+"/"+r.slice(o-(o===r.length?1:0)).join("/")}var Wo;(function(e){e.pop="pop",e.push="push"})(Wo||(Wo={}));var Uo;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Uo||(Uo={}));function Db(e){if(!e)if(Bi){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Pb(e)}const Ib=/^[^#]+#/;function $b(e,t){return e.replace(Ib,"#")+t}function Bb(e,t){const n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const va=()=>({left:window.pageXOffset,top:window.pageYOffset});function Hb(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#"),i=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;t=Bb(i,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function Sp(e,t){return(history.state?history.state.position-t:-1)+e}const Jc=new Map;function zb(e,t){Jc.set(e,t)}function Fb(e){const t=Jc.get(e);return Jc.delete(e),t}let Vb=()=>location.protocol+"//"+location.host;function Cp(e,t){const{pathname:n,search:r,hash:i}=t,o=e.indexOf("#");if(o>-1){let a=i.includes(e.slice(o))?e.slice(o).length:1,l=i.slice(a);return l[0]!=="/"&&(l="/"+l),wp(l,"")}return wp(n,e)+r+i}function Wb(e,t,n,r){let i=[],o=[],s=null;const a=({state:h})=>{const p=Cp(e,location),g=n.value,v=t.value;let b=0;if(h){if(n.value=p,t.value=h,s&&s===g){s=null;return}b=v?h.position-v.position:0}else r(p);i.forEach(w=>{w(n.value,g,{delta:b,type:Wo.pop,direction:b?b>0?Uo.forward:Uo.back:Uo.unknown})})};function l(){s=n.value}function c(h){i.push(h);const p=()=>{const g=i.indexOf(h);g>-1&&i.splice(g,1)};return o.push(p),p}function u(){const{history:h}=window;!h.state||h.replaceState(Ge({},h.state,{scroll:va()}),"")}function f(){for(const h of o)h();o=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",u),{pauseListeners:l,listen:c,destroy:f}}function _p(e,t,n,r=!1,i=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:i?va():null}}function Ub(e){const{history:t,location:n}=window,r={value:Cp(e,n)},i={value:t.state};i.value||o(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function o(l,c,u){const f=e.indexOf("#"),h=f>-1?(n.host&&document.querySelector("base")?e:e.slice(f))+l:Vb()+e+l;try{t[u?"replaceState":"pushState"](c,"",h),i.value=c}catch(p){console.error(p),n[u?"replace":"assign"](h)}}function s(l,c){const u=Ge({},t.state,_p(i.value.back,l,i.value.forward,!0),c,{position:i.value.position});o(l,u,!0),r.value=l}function a(l,c){const u=Ge({},i.value,t.state,{forward:l,scroll:va()});o(u.current,u,!0);const f=Ge({},_p(r.value,l,null),{position:u.position+1},c);o(l,f,!1),r.value=l}return{location:r,state:i,push:a,replace:s}}function dP(e){e=Db(e);const t=Ub(e),n=Wb(e,t.state,t.location,t.replace);function r(o,s=!0){s||n.pauseListeners(),history.go(o)}const i=Ge({location:"",base:e,go:r,createHref:$b.bind(null,e)},t,n);return Object.defineProperty(i,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(i,"state",{enumerable:!0,get:()=>t.state.value}),i}function Kb(e){return typeof e=="string"||e&&typeof e=="object"}function Mp(e){return typeof e=="string"||typeof e=="symbol"}const hr={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},Ap=$i("nf");var Ep;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(Ep||(Ep={}));function zi(e,t){return Ge(new Error,{type:e,[Ap]:!0},t)}function ti(e,t){return e instanceof Error&&Ap in e&&(t==null||!!(e.type&t))}const Op="[^/]+?",qb={sensitive:!1,strict:!1,start:!0,end:!0},Jb=/[.+*?^${}()[\]/\\]/g;function Gb(e,t){const n=Ge({},qb,t),r=[];let i=n.start?"^":"";const o=[];for(const c of e){const u=c.length?[]:[90];n.strict&&!c.length&&(i+="/");for(let f=0;f<c.length;f++){const h=c[f];let p=40+(n.sensitive?.25:0);if(h.type===0)f||(i+="/"),i+=h.value.replace(Jb,"\\$&"),p+=40;else if(h.type===1){const{value:g,repeatable:v,optional:b,regexp:w}=h;o.push({name:g,repeatable:v,optional:b});const k=w||Op;if(k!==Op){p+=10;try{new RegExp(`(${k})`)}catch(d){throw new Error(`Invalid custom RegExp for param "${g}" (${k}): `+d.message)}}let A=v?`((?:${k})(?:/(?:${k}))*)`:`(${k})`;f||(A=b&&c.length<2?`(?:/${A})`:"/"+A),b&&(A+="?"),i+=A,p+=20,b&&(p+=-8),v&&(p+=-20),k===".*"&&(p+=-50)}u.push(p)}r.push(u)}if(n.strict&&n.end){const c=r.length-1;r[c][r[c].length-1]+=.7000000000000001}n.strict||(i+="/?"),n.end?i+="$":n.strict&&(i+="(?:/|$)");const s=new RegExp(i,n.sensitive?"":"i");function a(c){const u=c.match(s),f={};if(!u)return null;for(let h=1;h<u.length;h++){const p=u[h]||"",g=o[h-1];f[g.name]=p&&g.repeatable?p.split("/"):p}return f}function l(c){let u="",f=!1;for(const h of e){(!f||!u.endsWith("/"))&&(u+="/"),f=!1;for(const p of h)if(p.type===0)u+=p.value;else if(p.type===1){const{value:g,repeatable:v,optional:b}=p,w=g in c?c[g]:"";if(Array.isArray(w)&&!v)throw new Error(`Provided param "${g}" is an array but it is not repeatable (* or + modifiers)`);const k=Array.isArray(w)?w.join("/"):w;if(!k)if(b)h.length<2&&(u.endsWith("/")?u=u.slice(0,-1):f=!0);else throw new Error(`Missing required param "${g}"`);u+=k}}return u}return{re:s,score:r,keys:o,parse:a,stringify:l}}function Yb(e,t){let n=0;for(;n<e.length&&n<t.length;){const r=t[n]-e[n];if(r)return r;n++}return e.length<t.length?e.length===1&&e[0]===40+40?-1:1:e.length>t.length?t.length===1&&t[0]===40+40?1:-1:0}function Xb(e,t){let n=0;const r=e.score,i=t.score;for(;n<r.length&&n<i.length;){const o=Yb(r[n],i[n]);if(o)return o;n++}return i.length-r.length}const Qb={type:0,value:""},Zb=/[a-zA-Z0-9_]/;function ew(e){if(!e)return[[]];if(e==="/")return[[Qb]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(p){throw new Error(`ERR (${n})/"${c}": ${p}`)}let n=0,r=n;const i=[];let o;function s(){o&&i.push(o),o=[]}let a=0,l,c="",u="";function f(){!c||(n===0?o.push({type:0,value:c}):n===1||n===2||n===3?(o.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),o.push({type:1,value:c,regexp:u,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),c="")}function h(){c+=l}for(;a<e.length;){if(l=e[a++],l==="\\"&&n!==2){r=n,n=4;continue}switch(n){case 0:l==="/"?(c&&f(),s()):l===":"?(f(),n=1):h();break;case 4:h(),n=r;break;case 1:l==="("?n=2:Zb.test(l)?h():(f(),n=0,l!=="*"&&l!=="?"&&l!=="+"&&a--);break;case 2:l===")"?u[u.length-1]=="\\"?u=u.slice(0,-1)+l:n=3:u+=l;break;case 3:f(),n=0,l!=="*"&&l!=="?"&&l!=="+"&&a--,u="";break;default:t("Unknown state");break}}return n===2&&t(`Unfinished custom RegExp for param "${c}"`),f(),s(),i}function tw(e,t,n){const r=Gb(ew(e.path),n),i=Ge(r,{record:e,parent:t,children:[],alias:[]});return t&&!i.record.aliasOf==!t.record.aliasOf&&t.children.push(i),i}function nw(e,t){const n=[],r=new Map;t=Pp({strict:!1,end:!0,sensitive:!1},t);function i(u){return r.get(u)}function o(u,f,h){const p=!h,g=iw(u);g.aliasOf=h&&h.record;const v=Pp(t,u),b=[g];if("alias"in u){const A=typeof u.alias=="string"?[u.alias]:u.alias;for(const d of A)b.push(Ge({},g,{components:h?h.record.components:g.components,path:d,aliasOf:h?h.record:g}))}let w,k;for(const A of b){const{path:d}=A;if(f&&d[0]!=="/"){const y=f.record.path,m=y[y.length-1]==="/"?"":"/";A.path=f.record.path+(d&&m+d)}if(w=tw(A,f,v),h?h.alias.push(w):(k=k||w,k!==w&&k.alias.push(w),p&&u.name&&!Tp(w)&&s(u.name)),"children"in g){const y=g.children;for(let m=0;m<y.length;m++)o(y[m],w,h&&h.children[m])}h=h||w,l(w)}return k?()=>{s(k)}:Vo}function s(u){if(Mp(u)){const f=r.get(u);f&&(r.delete(u),n.splice(n.indexOf(f),1),f.children.forEach(s),f.alias.forEach(s))}else{const f=n.indexOf(u);f>-1&&(n.splice(f,1),u.record.name&&r.delete(u.record.name),u.children.forEach(s),u.alias.forEach(s))}}function a(){return n}function l(u){let f=0;for(;f<n.length&&Xb(u,n[f])>=0;)f++;n.splice(f,0,u),u.record.name&&!Tp(u)&&r.set(u.record.name,u)}function c(u,f){let h,p={},g,v;if("name"in u&&u.name){if(h=r.get(u.name),!h)throw zi(1,{location:u});v=h.record.name,p=Ge(rw(f.params,h.keys.filter(k=>!k.optional).map(k=>k.name)),u.params),g=h.stringify(p)}else if("path"in u)g=u.path,h=n.find(k=>k.re.test(g)),h&&(p=h.parse(g),v=h.record.name);else{if(h=f.name?r.get(f.name):n.find(k=>k.re.test(f.path)),!h)throw zi(1,{location:u,currentLocation:f});v=h.record.name,p=Ge({},f.params,u.params),g=h.stringify(p)}const b=[];let w=h;for(;w;)b.unshift(w.record),w=w.parent;return{name:v,path:g,params:p,matched:b,meta:sw(b)}}return e.forEach(u=>o(u)),{addRoute:o,resolve:c,removeRoute:s,getRoutes:a,getRecordMatcher:i}}function rw(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function iw(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:ow(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||{}:{default:e.component}}}function ow(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="boolean"?n:n[r];return t}function Tp(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function sw(e){return e.reduce((t,n)=>Ge(t,n.meta),{})}function Pp(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}const Rp=/#/g,aw=/&/g,lw=/\//g,cw=/=/g,uw=/\?/g,jp=/\+/g,dw=/%5B/g,fw=/%5D/g,Np=/%5E/g,hw=/%60/g,Lp=/%7B/g,pw=/%7C/g,Dp=/%7D/g,mw=/%20/g;function Gc(e){return encodeURI(""+e).replace(pw,"|").replace(dw,"[").replace(fw,"]")}function gw(e){return Gc(e).replace(Lp,"{").replace(Dp,"}").replace(Np,"^")}function Yc(e){return Gc(e).replace(jp,"%2B").replace(mw,"+").replace(Rp,"%23").replace(aw,"%26").replace(hw,"`").replace(Lp,"{").replace(Dp,"}").replace(Np,"^")}function yw(e){return Yc(e).replace(cw,"%3D")}function vw(e){return Gc(e).replace(Rp,"%23").replace(uw,"%3F")}function bw(e){return e==null?"":vw(e).replace(lw,"%2F")}function ba(e){try{return decodeURIComponent(""+e)}catch(t){}return""+e}function ww(e){const t={};if(e===""||e==="?")return t;const r=(e[0]==="?"?e.slice(1):e).split("&");for(let i=0;i<r.length;++i){const o=r[i].replace(jp," "),s=o.indexOf("="),a=ba(s<0?o:o.slice(0,s)),l=s<0?null:ba(o.slice(s+1));if(a in t){let c=t[a];Array.isArray(c)||(c=t[a]=[c]),c.push(l)}else t[a]=l}return t}function Ip(e){let t="";for(let n in e){const r=e[n];if(n=yw(n),r==null){r!==void 0&&(t+=(t.length?"&":"")+n);continue}(Array.isArray(r)?r.map(o=>o&&Yc(o)):[r&&Yc(r)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+n,o!=null&&(t+="="+o))})}return t}function xw(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=Array.isArray(r)?r.map(i=>i==null?null:""+i):r==null?r:""+r)}return t}function Ko(){let e=[];function t(r){return e.push(r),()=>{const i=e.indexOf(r);i>-1&&e.splice(i,1)}}function n(){e=[]}return{add:t,list:()=>e,reset:n}}function pr(e,t,n,r,i){const o=r&&(r.enterCallbacks[i]=r.enterCallbacks[i]||[]);return()=>new Promise((s,a)=>{const l=f=>{f===!1?a(zi(4,{from:n,to:t})):f instanceof Error?a(f):Kb(f)?a(zi(2,{from:t,to:f})):(o&&r.enterCallbacks[i]===o&&typeof f=="function"&&o.push(f),s())},c=e.call(r&&r.instances[i],t,n,l);let u=Promise.resolve(c);e.length<3&&(u=u.then(l)),u.catch(f=>a(f))})}function Xc(e,t,n,r){const i=[];for(const o of e)for(const s in o.components){let a=o.components[s];if(!(t!=="beforeRouteEnter"&&!o.instances[s]))if(kw(a)){const c=(a.__vccOpts||a)[t];c&&i.push(pr(c,n,r,o,s))}else{let l=a();i.push(()=>l.then(c=>{if(!c)return Promise.reject(new Error(`Couldn't resolve component "${s}" at "${o.path}"`));const u=Ob(c)?c.default:c;o.components[s]=u;const h=(u.__vccOpts||u)[t];return h&&pr(h,n,r,o,s)()}))}}return i}function kw(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function $p(e){const t=Xe(ya),n=Xe(bp),r=X(()=>t.resolve(Rt(e.to))),i=X(()=>{const{matched:l}=r.value,{length:c}=l,u=l[c-1],f=n.matched;if(!u||!f.length)return-1;const h=f.findIndex(Hi.bind(null,u));if(h>-1)return h;const p=Bp(l[c-2]);return c>1&&Bp(u)===p&&f[f.length-1].path!==p?f.findIndex(Hi.bind(null,l[c-2])):h}),o=X(()=>i.value>-1&&Mw(n.params,r.value.params)),s=X(()=>i.value>-1&&i.value===n.matched.length-1&&xp(n.params,r.value.params));function a(l={}){return _w(l)?t[Rt(e.replace)?"replace":"push"](Rt(e.to)).catch(Vo):Promise.resolve()}return{route:r,href:X(()=>r.value.href),isActive:o,isExactActive:s,navigate:a}}const Sw=je({name:"RouterLink",props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:$p,setup(e,{slots:t}){const n=sn($p(e)),{options:r}=Xe(ya),i=X(()=>({[Hp(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[Hp(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=t.default&&t.default(n);return e.custom?o:He("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:i.value},o)}}}),Cw=Sw;function _w(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Mw(e,t){for(const n in t){const r=t[n],i=e[n];if(typeof r=="string"){if(r!==i)return!1}else if(!Array.isArray(i)||i.length!==r.length||r.some((o,s)=>o!==i[s]))return!1}return!0}function Bp(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Hp=(e,t,n)=>e!=null?e:t!=null?t:n,Aw=je({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},setup(e,{attrs:t,slots:n}){const r=Xe(Uc),i=X(()=>e.route||r.value),o=Xe(vp,0),s=X(()=>i.value.matched[o]);wt(vp,o+1),wt(Eb,s),wt(Uc,i);const a=se();return Ht(()=>[a.value,s.value,e.name],([l,c,u],[f,h,p])=>{c&&(c.instances[u]=l,h&&h!==c&&l&&l===f&&(c.leaveGuards.size||(c.leaveGuards=h.leaveGuards),c.updateGuards.size||(c.updateGuards=h.updateGuards))),l&&c&&(!h||!Hi(c,h)||!f)&&(c.enterCallbacks[u]||[]).forEach(g=>g(l))},{flush:"post"}),()=>{const l=i.value,c=s.value,u=c&&c.components[e.name],f=e.name;if(!u)return zp(n.default,{Component:u,route:l});const h=c.props[e.name],p=h?h===!0?l.params:typeof h=="function"?h(l):h:null,v=He(u,Ge({},p,t,{onVnodeUnmounted:b=>{b.component.isUnmounted&&(c.instances[f]=null)},ref:a}));return zp(n.default,{Component:v,route:l})||v}}});function zp(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const Ew=Aw;function fP(e){const t=nw(e.routes,e),n=e.parseQuery||ww,r=e.stringifyQuery||Ip,i=e.history,o=Ko(),s=Ko(),a=Ko(),l=dh(hr);let c=hr;Bi&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=Kc.bind(null,I=>""+I),f=Kc.bind(null,bw),h=Kc.bind(null,ba);function p(I,Y){let V,ee;return Mp(I)?(V=t.getRecordMatcher(I),ee=Y):ee=I,t.addRoute(ee,V)}function g(I){const Y=t.getRecordMatcher(I);Y&&t.removeRoute(Y)}function v(){return t.getRoutes().map(I=>I.record)}function b(I){return!!t.getRecordMatcher(I)}function w(I,Y){if(Y=Ge({},Y||l.value),typeof I=="string"){const xe=qc(n,I,Y.path),O=t.resolve({path:xe.path},Y),j=i.createHref(xe.fullPath);return Ge(xe,O,{params:h(O.params),hash:ba(xe.hash),redirectedFrom:void 0,href:j})}let V;if("path"in I)V=Ge({},I,{path:qc(n,I.path,Y.path).path});else{const xe=Ge({},I.params);for(const O in xe)xe[O]==null&&delete xe[O];V=Ge({},I,{params:f(I.params)}),Y.params=f(Y.params)}const ee=t.resolve(V,Y),Ae=I.hash||"";ee.params=u(h(ee.params));const Ee=Rb(r,Ge({},I,{hash:gw(Ae),path:ee.path})),we=i.createHref(Ee);return Ge({fullPath:Ee,hash:Ae,query:r===Ip?xw(I.query):I.query||{}},ee,{redirectedFrom:void 0,href:we})}function k(I){return typeof I=="string"?qc(n,I,l.value.path):Ge({},I)}function A(I,Y){if(c!==I)return zi(8,{from:Y,to:I})}function d(I){return x(I)}function y(I){return d(Ge(k(I),{replace:!0}))}function m(I){const Y=I.matched[I.matched.length-1];if(Y&&Y.redirect){const{redirect:V}=Y;let ee=typeof V=="function"?V(I):V;return typeof ee=="string"&&(ee=ee.includes("?")||ee.includes("#")?ee=k(ee):{path:ee},ee.params={}),Ge({query:I.query,hash:I.hash,params:I.params},ee)}}function x(I,Y){const V=c=w(I),ee=l.value,Ae=I.state,Ee=I.force,we=I.replace===!0,xe=m(V);if(xe)return x(Ge(k(xe),{state:Ae,force:Ee,replace:we}),Y||V);const O=V;O.redirectedFrom=Y;let j;return!Ee&&jb(r,ee,V)&&(j=zi(16,{to:O,from:ee}),te(ee,ee,!0,!1)),(j?Promise.resolve(j):_(O,ee)).catch($=>ti($)?$:P($,O,ee)).then($=>{if($){if(ti($,2))return x(Ge(k($.to),{state:Ae,force:Ee,replace:we}),Y||O)}else $=E(O,ee,!0,we,Ae);return C(O,ee,$),$})}function S(I,Y){const V=A(I,Y);return V?Promise.reject(V):Promise.resolve()}function _(I,Y){let V;const[ee,Ae,Ee]=Ow(I,Y);V=Xc(ee.reverse(),"beforeRouteLeave",I,Y);for(const xe of ee)xe.leaveGuards.forEach(O=>{V.push(pr(O,I,Y))});const we=S.bind(null,I,Y);return V.push(we),Fi(V).then(()=>{V=[];for(const xe of o.list())V.push(pr(xe,I,Y));return V.push(we),Fi(V)}).then(()=>{V=Xc(Ae,"beforeRouteUpdate",I,Y);for(const xe of Ae)xe.updateGuards.forEach(O=>{V.push(pr(O,I,Y))});return V.push(we),Fi(V)}).then(()=>{V=[];for(const xe of I.matched)if(xe.beforeEnter&&!Y.matched.includes(xe))if(Array.isArray(xe.beforeEnter))for(const O of xe.beforeEnter)V.push(pr(O,I,Y));else V.push(pr(xe.beforeEnter,I,Y));return V.push(we),Fi(V)}).then(()=>(I.matched.forEach(xe=>xe.enterCallbacks={}),V=Xc(Ee,"beforeRouteEnter",I,Y),V.push(we),Fi(V))).then(()=>{V=[];for(const xe of s.list())V.push(pr(xe,I,Y));return V.push(we),Fi(V)}).catch(xe=>ti(xe,8)?xe:Promise.reject(xe))}function C(I,Y,V){for(const ee of a.list())ee(I,Y,V)}function E(I,Y,V,ee,Ae){const Ee=A(I,Y);if(Ee)return Ee;const we=Y===hr,xe=Bi?history.state:{};V&&(ee||we?i.replace(I.fullPath,Ge({scroll:we&&xe&&xe.scroll},Ae)):i.push(I.fullPath,Ae)),l.value=I,te(I,Y,V,we),H()}let T;function R(){T=i.listen((I,Y,V)=>{const ee=w(I),Ae=m(ee);if(Ae){x(Ge(Ae,{replace:!0}),ee).catch(Vo);return}c=ee;const Ee=l.value;Bi&&zb(Sp(Ee.fullPath,V.delta),va()),_(ee,Ee).catch(we=>ti(we,4|8)?we:ti(we,2)?(x(we.to,ee).then(xe=>{ti(xe,4|16)&&!V.delta&&V.type===Wo.pop&&i.go(-1,!1)}).catch(Vo),Promise.reject()):(V.delta&&i.go(-V.delta,!1),P(we,ee,Ee))).then(we=>{we=we||E(ee,Ee,!1),we&&(V.delta?i.go(-V.delta,!1):V.type===Wo.pop&&ti(we,4|16)&&i.go(-1,!1)),C(ee,Ee,we)}).catch(Vo)})}let N=Ko(),D=Ko(),M;function P(I,Y,V){H(I);const ee=D.list();return ee.length?ee.forEach(Ae=>Ae(I,Y,V)):console.error(I),Promise.reject(I)}function L(){return M&&l.value!==hr?Promise.resolve():new Promise((I,Y)=>{N.add([I,Y])})}function H(I){M||(M=!0,R(),N.list().forEach(([Y,V])=>I?V(I):Y()),N.reset())}function te(I,Y,V,ee){const{scrollBehavior:Ae}=e;if(!Bi||!Ae)return Promise.resolve();const Ee=!V&&Fb(Sp(I.fullPath,0))||(ee||!V)&&history.state&&history.state.scroll||null;return bt().then(()=>Ae(I,Y,Ee)).then(we=>we&&Hb(we)).catch(we=>P(we,I,Y))}const q=I=>i.go(I);let ae;const ge=new Set;return{currentRoute:l,addRoute:p,removeRoute:g,hasRoute:b,getRoutes:v,resolve:w,options:e,push:d,replace:y,go:q,back:()=>q(-1),forward:()=>q(1),beforeEach:o.add,beforeResolve:s.add,afterEach:a.add,onError:D.add,isReady:L,install(I){const Y=this;I.component("RouterLink",Cw),I.component("RouterView",Ew),I.config.globalProperties.$router=Y,Object.defineProperty(I.config.globalProperties,"$route",{enumerable:!0,get:()=>Rt(l)}),Bi&&!ae&&l.value===hr&&(ae=!0,d(i.location).catch(Ae=>{}));const V={};for(const Ae in hr)V[Ae]=X(()=>l.value[Ae]);I.provide(ya,Y),I.provide(bp,sn(V)),I.provide(Uc,l);const ee=I.unmount;ge.add(I),I.unmount=function(){ge.delete(I),ge.size<1&&(c=hr,T&&T(),l.value=hr,ae=!1,M=!1),ee()}}}}function Fi(e){return e.reduce((t,n)=>t.then(()=>n()),Promise.resolve())}function Ow(e,t){const n=[],r=[],i=[],o=Math.max(t.matched.length,e.matched.length);for(let s=0;s<o;s++){const a=t.matched[s];a&&(e.matched.find(c=>Hi(c,a))?r.push(a):n.push(a));const l=e.matched[s];l&&(t.matched.find(c=>Hi(c,l))||i.push(l))}return[n,r,i]}function Tw(){return Xe(ya)}var Ie=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n};function ct(e,t,...n){if(e in t){let i=t[e];return typeof i=="function"?i(...n):i}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(i=>`"${i}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,ct),r}var In=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(In||{}),mr=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(mr||{});function Ye(o){var s=o,{visible:e=!0,features:t=0,ourProps:n,theirProps:r}=s,i=Ve(s,["visible","features","ourProps","theirProps"]);var a;let l=Vp(r,n),c=Object.assign(i,{props:l});if(e||t&2&&l.static)return Qc(c);if(t&1){let u=(a=l.unmount)==null||a?0:1;return ct(u,{[0](){return null},[1](){return Qc(Me(J({},i),{props:Me(J({},l),{hidden:!0,style:{display:"none"}})}))}})}return Qc(c)}function Qc({props:e,attrs:t,slots:n,slot:r,name:i}){var o,s;let f=qo(e,["unmount","static"]),{as:a}=f,l=Ve(f,["as"]),c=(o=n.default)==null?void 0:o.call(n,r),u={};if(r){let h=!1,p=[];for(let[g,v]of Object.entries(r))typeof v=="boolean"&&(h=!0),v===!0&&p.push(g);h&&(u["data-headlessui-state"]=p.join(" "))}if(a==="template"){if(c=Fp(c!=null?c:[]),Object.keys(l).length>0||Object.keys(t).length>0){let[h,...p]=c!=null?c:[];if(!Pw(h)||p.length>0)throw new Error(['Passing props on "template"!',"",`The current component <${i} /> is rendering a "template".`,"However we need to passthrough the following props:",Object.keys(l).concat(Object.keys(t)).map(b=>b.trim()).filter((b,w,k)=>k.indexOf(b)===w).sort((b,w)=>b.localeCompare(w)).map(b=>` - ${b}`).join(`
`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".',"Render a single element as the child so that we can forward the props onto that element."].map(b=>` - ${b}`).join(`
`)].join(`
`));let g=Vp((s=h.props)!=null?s:{},l),v=Yr(h,g);for(let b in g)b.startsWith("on")&&(v.props||(v.props={}),v.props[b]=g[b]);return v}return Array.isArray(c)&&c.length===1?c[0]:c}return He(a,Object.assign({},l,u),{default:()=>c})}function Fp(e){return e.flatMap(t=>t.type===lt?Fp(t.children):[t])}function Vp(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let i in r)i.startsWith("on")&&typeof r[i]=="function"?(n[i]!=null||(n[i]=[]),n[i].push(r[i])):t[i]=r[i];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map(r=>[r,void 0])));for(let r in n)Object.assign(t,{[r](i,...o){let s=n[r];for(let a of s){if(i instanceof Event&&i.defaultPrevented)return;a(i,...o)}}});return t}function Wp(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function qo(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function Pw(e){return e==null?!1:typeof e.type=="string"||typeof e.type=="object"||typeof e.type=="function"}let Rw=0;function jw(){return++Rw}function Ct(){return jw()}var Ne=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(Ne||{});function Nw(e){throw new Error("Unexpected object: "+e)}var Fe=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(Fe||{});function Up(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),i=r!=null?r:-1,o=(()=>{switch(e.focus){case 0:return n.findIndex(s=>!t.resolveDisabled(s));case 1:{let s=n.slice().reverse().findIndex((a,l,c)=>i!==-1&&c.length-l-1>=i?!1:!t.resolveDisabled(a));return s===-1?s:n.length-1-s}case 2:return n.findIndex((s,a)=>a<=i?!1:!t.resolveDisabled(s));case 3:{let s=n.slice().reverse().findIndex(a=>!t.resolveDisabled(a));return s===-1?s:n.length-1-s}case 4:return n.findIndex(s=>t.resolveId(s)===e.id);case 5:return null;default:Nw(e)}})();return o===-1?r:o}function he(e){var t;return e==null||e.value==null?null:(t=e.value.$el)!=null?t:e.value}let Kp=Symbol("Context");var st=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(st||{});function Lw(){return Jo()!==null}function Jo(){return Xe(Kp,null)}function Zc(e){wt(Kp,e)}function qp(e,t){if(e)return e;let n=t!=null?t:"button";if(typeof n=="string"&&n.toLowerCase()==="button")return"button"}function Jp(e,t){let n=se(qp(e.value.type,e.value.as));return Je(()=>{n.value=qp(e.value.type,e.value.as)}),xt(()=>{var r;n.value||he(t)&&he(t)instanceof HTMLButtonElement&&!((r=he(t))!=null&&r.hasAttribute("type"))&&(n.value="button")}),n}var Dw=Object.defineProperty,Iw=(e,t,n)=>t in e?Dw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Gp=(e,t,n)=>(Iw(e,typeof t!="symbol"?t+"":t,n),n);class $w{constructor(){Gp(this,"current",this.detect()),Gp(this,"currentId",0)}set(t){this.current!==t&&(this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window=="undefined"||typeof document=="undefined"?"server":"client"}}let Go=new $w;function un(e){if(Go.isServer)return null;if(e instanceof Node)return e.ownerDocument;if(e!=null&&e.hasOwnProperty("value")){let t=he(e);if(t)return t.ownerDocument}return document}function eu({container:e,accept:t,walk:n,enabled:r}){xt(()=>{let i=e.value;if(!i||r!==void 0&&!r.value)return;let o=un(e);if(!o)return;let s=Object.assign(l=>t(l),{acceptNode:t}),a=o.createTreeWalker(i,NodeFilter.SHOW_ELEMENT,s,!1);for(;a.nextNode();)n(a.currentNode)})}let tu=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var Ft=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(Ft||{}),wa=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(wa||{}),Bw=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(Bw||{});function Yp(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(tu)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var nu=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(nu||{});function ru(e,t=0){var n;return e===((n=un(e))==null?void 0:n.body)?!1:ct(t,{[0](){return e.matches(tu)},[1](){let r=e;for(;r!==null;){if(r.matches(tu))return!0;r=r.parentElement}return!1}})}function Xp(e){let t=un(e);bt(()=>{t&&!ru(t.activeElement,0)&&gr(e)})}var Hw=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Hw||{});typeof window!="undefined"&&typeof document!="undefined"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function gr(e){e==null||e.focus({preventScroll:!0})}let zw=["textarea","input"].join(",");function Fw(e){var t,n;return(n=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,zw))!=null?n:!1}function xa(e,t=n=>n){return e.slice().sort((n,r)=>{let i=t(n),o=t(r);if(i===null||o===null)return 0;let s=i.compareDocumentPosition(o);return s&Node.DOCUMENT_POSITION_FOLLOWING?-1:s&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Vw(e,t){return ni(Yp(),t,{relativeTo:e})}function ni(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:i=[]}={}){var o;let s=(o=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e==null?void 0:e.ownerDocument)!=null?o:document,a=Array.isArray(e)?n?xa(e):e:Yp(e);i.length>0&&a.length>1&&(a=a.filter(g=>!i.includes(g))),r=r!=null?r:s.activeElement;let l=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,a.indexOf(r))-1;if(t&4)return Math.max(0,a.indexOf(r))+1;if(t&8)return a.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=t&32?{preventScroll:!0}:{},f=0,h=a.length,p;do{if(f>=h||f+h<=0)return 0;let g=c+f;if(t&16)g=(g+h)%h;else{if(g<0)return 3;if(g>=h)return 1}p=a[g],p==null||p.focus(u),f+=l}while(p!==s.activeElement);return t&6&&Fw(p)&&p.select(),2}function ka(e,t,n){Go.isServer||xt(r=>{document.addEventListener(e,t,n),r(()=>document.removeEventListener(e,t,n))})}function Qp(e,t,n){Go.isServer||xt(r=>{window.addEventListener(e,t,n),r(()=>window.removeEventListener(e,t,n))})}function iu(e,t,n=X(()=>!0)){function r(o,s){if(!n.value||o.defaultPrevented)return;let a=s(o);if(a===null||!a.getRootNode().contains(a))return;let l=function c(u){return typeof u=="function"?c(u()):Array.isArray(u)||u instanceof Set?u:[u]}(e);for(let c of l){if(c===null)continue;let u=c instanceof HTMLElement?c:he(c);if(u!=null&&u.contains(a)||o.composed&&o.composedPath().includes(u))return}return!ru(a,nu.Loose)&&a.tabIndex!==-1&&o.preventDefault(),t(o,a)}let i=se(null);ka("pointerdown",o=>{var s,a;n.value&&(i.value=((a=(s=o.composedPath)==null?void 0:s.call(o))==null?void 0:a[0])||o.target)},!0),ka("mousedown",o=>{var s,a;n.value&&(i.value=((a=(s=o.composedPath)==null?void 0:s.call(o))==null?void 0:a[0])||o.target)},!0),ka("click",o=>{i.value&&(r(o,()=>i.value),i.value=null)},!0),ka("touchend",o=>r(o,()=>o.target instanceof HTMLElement?o.target:null),!0),Qp("blur",o=>r(o,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}var Vi=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Vi||{});let Yo=je({name:"Hidden",props:{as:{type:[Object,String],default:"div"},features:{type:Number,default:1}},setup(e,{slots:t,attrs:n}){return()=>{let s=e,{features:r}=s,i=Ve(s,["features"]),o={"aria-hidden":(r&2)==2?!0:void 0,style:J({position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"},(r&4)==4&&(r&2)!=2&&{display:"none"})};return Ye({ourProps:o,theirProps:i,slot:{},attrs:n,slots:t,name:"Hidden"})}}});function ou(e={},t=null,n=[]){for(let[r,i]of Object.entries(e))em(n,Zp(t,r),i);return n}function Zp(e,t){return e?e+"["+t+"]":t}function em(e,t,n){if(Array.isArray(n))for(let[r,i]of n.entries())em(e,Zp(t,r.toString()),i);else n instanceof Date?e.push([t,n.toISOString()]):typeof n=="boolean"?e.push([t,n?"1":"0"]):typeof n=="string"?e.push([t,n]):typeof n=="number"?e.push([t,`${n}`]):n==null?e.push([t,""]):ou(n,t,e)}function Ww(e){var t,n;let r=(t=e==null?void 0:e.form)!=null?t:e.closest("form");if(r){for(let i of r.elements)if(i!==e&&(i.tagName==="INPUT"&&i.type==="submit"||i.tagName==="BUTTON"&&i.type==="submit"||i.nodeName==="INPUT"&&i.type==="image")){i.click();return}(n=r.requestSubmit)==null||n.call(r)}}function tm(e,t,n){let r=se(n==null?void 0:n.value),i=X(()=>e.value!==void 0);return[X(()=>i.value?e.value:r.value),function(o){return i.value||(r.value=o),t==null?void 0:t(o)}]}function nm(e){return[e.screenX,e.screenY]}function rm(){let e=se([-1,-1]);return{wasMoved(t){let n=nm(t);return e.value[0]===n[0]&&e.value[1]===n[1]?!1:(e.value=n,!0)},update(t){e.value=nm(t)}}}function im(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function Uw(){return/Android/gi.test(window.navigator.userAgent)}function Kw(){return im()||Uw()}function su(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Wi(){let e=[],t={addEventListener(n,r,i,o){return n.addEventListener(r,i,o),t.add(()=>n.removeEventListener(r,i,o))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){t.requestAnimationFrame(()=>{t.requestAnimationFrame(...n)})},setTimeout(...n){let r=setTimeout(...n);t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return su(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,i){let o=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:i}),this.add(()=>{Object.assign(n.style,{[r]:o})})},group(n){let r=Wi();return n(r),this.add(()=>r.dispose())},add(n){return e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let i of e.splice(r,1))i()}},dispose(){for(let n of e.splice(0))n()}};return t}function qw(e,t){return e===t}var Jw=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Jw||{}),Gw=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(Gw||{}),Yw=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Yw||{});let om=Symbol("ComboboxContext");function Ui(e){let t=Xe(om,null);if(t===null){let n=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Ui),n}return t}let hP=je({name:"Combobox",emits:{"update:modelValue":e=>!0},props:{as:{type:[Object,String],default:"template"},disabled:{type:[Boolean],default:!1},by:{type:[String,Function],default:()=>qw},modelValue:{type:[Object,String,Number,Boolean],default:void 0},defaultValue:{type:[Object,String,Number,Boolean],default:void 0},form:{type:String,optional:!0},name:{type:String,optional:!0},nullable:{type:Boolean,default:!1},multiple:{type:[Boolean],default:!1}},inheritAttrs:!1,setup(e,{slots:t,attrs:n,emit:r}){let i=se(1),o=se(null),s=se(null),a=se(null),l=se(null),c=se({static:!1,hold:!1}),u=se([]),f=se(null),h=se(1),p=se(!1);function g(_=C=>C){let C=f.value!==null?u.value[f.value]:null,E=xa(_(u.value.slice()),R=>he(R.dataRef.domRef)),T=C?E.indexOf(C):null;return T===-1&&(T=null),{options:E,activeOptionIndex:T}}let v=X(()=>e.multiple?1:0),b=X(()=>e.nullable),[w,k]=tm(X(()=>e.modelValue),_=>r("update:modelValue",_),X(()=>e.defaultValue)),A=X(()=>w.value===void 0?ct(v.value,{[1]:[],[0]:void 0}):w.value),d=null,y=null,m={comboboxState:i,value:A,mode:v,compare(_,C){if(typeof e.by=="string"){let E=e.by;return(_==null?void 0:_[E])===(C==null?void 0:C[E])}return e.by(_,C)},defaultValue:X(()=>e.defaultValue),nullable:b,inputRef:s,labelRef:o,buttonRef:a,optionsRef:l,disabled:X(()=>e.disabled),options:u,change(_){k(_)},activeOptionIndex:X(()=>{if(p.value&&f.value===null&&u.value.length>0){let _=u.value.findIndex(C=>!C.dataRef.disabled);_!==-1&&(f.value=_)}return f.value}),activationTrigger:h,optionsPropsRef:c,closeCombobox(){p.value=!1,!e.disabled&&i.value!==1&&(i.value=1,f.value=null)},openCombobox(){if(p.value=!0,e.disabled||i.value===0)return;let _=u.value.findIndex(C=>{let E=fe(C.dataRef.value);return ct(v.value,{[0]:()=>m.compare(fe(m.value.value),fe(E)),[1]:()=>fe(m.value.value).some(T=>m.compare(fe(T),fe(E)))})});_!==-1&&(f.value=_),i.value=0},goToOption(_,C,E){p.value=!1,d!==null&&cancelAnimationFrame(d),d=requestAnimationFrame(()=>{if(e.disabled||l.value&&!c.value.static&&i.value===1)return;let T=g();if(T.activeOptionIndex===null){let N=T.options.findIndex(D=>!D.dataRef.disabled);N!==-1&&(T.activeOptionIndex=N)}let R=Up(_===Fe.Specific?{focus:Fe.Specific,id:C}:{focus:_},{resolveItems:()=>T.options,resolveActiveIndex:()=>T.activeOptionIndex,resolveId:N=>N.id,resolveDisabled:N=>N.dataRef.disabled});f.value=R,h.value=E!=null?E:1,u.value=T.options})},selectOption(_){let C=u.value.find(T=>T.id===_);if(!C)return;let{dataRef:E}=C;k(ct(v.value,{[0]:()=>E.value,[1]:()=>{let T=fe(m.value.value).slice(),R=fe(E.value),N=T.findIndex(D=>m.compare(R,fe(D)));return N===-1?T.push(R):T.splice(N,1),T}}))},selectActiveOption(){if(m.activeOptionIndex.value===null)return;let{dataRef:_,id:C}=u.value[m.activeOptionIndex.value];k(ct(v.value,{[0]:()=>_.value,[1]:()=>{let E=fe(m.value.value).slice(),T=fe(_.value),R=E.findIndex(N=>m.compare(T,fe(N)));return R===-1?E.push(T):E.splice(R,1),E}})),m.goToOption(Fe.Specific,C)},registerOption(_,C){y&&cancelAnimationFrame(y);let E={id:_,dataRef:C},T=g(R=>(R.push(E),R));if(f.value===null){let R=C.value.value;ct(v.value,{[0]:()=>m.compare(fe(m.value.value),fe(R)),[1]:()=>fe(m.value.value).some(N=>m.compare(fe(N),fe(R)))})&&(T.activeOptionIndex=T.options.indexOf(E))}u.value=T.options,f.value=T.activeOptionIndex,h.value=1,T.options.some(R=>!he(R.dataRef.domRef))&&(y=requestAnimationFrame(()=>{let R=g();u.value=R.options,f.value=R.activeOptionIndex}))},unregisterOption(_){var C;m.activeOptionIndex.value!==null&&((C=m.options.value[m.activeOptionIndex.value])==null?void 0:C.id)===_&&(p.value=!0);let E=g(T=>{let R=T.findIndex(N=>N.id===_);return R!==-1&&T.splice(R,1),T});u.value=E.options,f.value=E.activeOptionIndex,h.value=1}};iu([s,a,l],()=>m.closeCombobox(),X(()=>i.value===0)),wt(om,m),Zc(X(()=>ct(i.value,{[0]:st.Open,[1]:st.Closed})));let x=X(()=>m.activeOptionIndex.value===null?null:u.value[m.activeOptionIndex.value].dataRef.value),S=X(()=>{var _;return(_=he(s))==null?void 0:_.closest("form")});return Je(()=>{Ht([S],()=>{if(!S.value||e.defaultValue===void 0)return;function _(){m.change(e.defaultValue)}return S.value.addEventListener("reset",_),()=>{var C;(C=S.value)==null||C.removeEventListener("reset",_)}},{immediate:!0})}),()=>{let N=e,{name:_,disabled:C,form:E}=N,T=Ve(N,["name","disabled","form"]),R={open:i.value===0,disabled:C,activeIndex:m.activeOptionIndex.value,activeOption:x.value,value:A.value};return He(lt,[..._!=null&&A.value!=null?ou({[_]:A.value}).map(([D,M])=>He(Yo,Wp({features:Vi.Hidden,key:D,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:E,name:D,value:M}))):[],Ye({theirProps:J(J({},n),qo(T,["modelValue","defaultValue","nullable","multiple","onUpdate:modelValue","by"])),ourProps:{},slot:R,slots:t,attrs:n,name:"Combobox"})])}}});je({name:"ComboboxLabel",props:{as:{type:[Object,String],default:"label"},id:{type:String,default:()=>`headlessui-combobox-label-${Ct()}`}},setup(e,{attrs:t,slots:n}){let r=Ui("ComboboxLabel");function i(){var o;(o=he(r.inputRef))==null||o.focus({preventScroll:!0})}return()=>{let o={open:r.comboboxState.value===0,disabled:r.disabled.value},c=e,{id:s}=c,a=Ve(c,["id"]),l={id:s,ref:r.labelRef,onClick:i};return Ye({ourProps:l,theirProps:a,slot:o,attrs:t,slots:n,name:"ComboboxLabel"})}}});let pP=je({name:"ComboboxButton",props:{as:{type:[Object,String],default:"button"},id:{type:String,default:()=>`headlessui-combobox-button-${Ct()}`}},setup(e,{attrs:t,slots:n,expose:r}){let i=Ui("ComboboxButton");r({el:i.buttonRef,$el:i.buttonRef});function o(l){i.disabled.value||(i.comboboxState.value===0?i.closeCombobox():(l.preventDefault(),i.openCombobox()),bt(()=>{var c;return(c=he(i.inputRef))==null?void 0:c.focus({preventScroll:!0})}))}function s(l){switch(l.key){case Ne.ArrowDown:l.preventDefault(),l.stopPropagation(),i.comboboxState.value===1&&i.openCombobox(),bt(()=>{var c;return(c=i.inputRef.value)==null?void 0:c.focus({preventScroll:!0})});return;case Ne.ArrowUp:l.preventDefault(),l.stopPropagation(),i.comboboxState.value===1&&(i.openCombobox(),bt(()=>{i.value.value||i.goToOption(Fe.Last)})),bt(()=>{var c;return(c=i.inputRef.value)==null?void 0:c.focus({preventScroll:!0})});return;case Ne.Escape:if(i.comboboxState.value!==0)return;l.preventDefault(),i.optionsRef.value&&!i.optionsPropsRef.value.static&&l.stopPropagation(),i.closeCombobox(),bt(()=>{var c;return(c=i.inputRef.value)==null?void 0:c.focus({preventScroll:!0})});return}}let a=Jp(X(()=>({as:e.as,type:t.type})),i.buttonRef);return()=>{var l,c;let u={open:i.comboboxState.value===0,disabled:i.disabled.value,value:i.value.value},g=e,{id:f}=g,h=Ve(g,["id"]),p={ref:i.buttonRef,id:f,type:a.value,tabindex:"-1","aria-haspopup":"listbox","aria-controls":(l=he(i.optionsRef))==null?void 0:l.id,"aria-expanded":i.comboboxState.value===0,"aria-labelledby":i.labelRef.value?[(c=he(i.labelRef))==null?void 0:c.id,f].join(" "):void 0,disabled:i.disabled.value===!0?!0:void 0,onKeydown:s,onClick:o};return Ye({ourProps:p,theirProps:h,slot:u,attrs:t,slots:n,name:"ComboboxButton"})}}}),mP=je({name:"ComboboxInput",props:{as:{type:[Object,String],default:"input"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},displayValue:{type:Function},defaultValue:{type:String,default:void 0},id:{type:String,default:()=>`headlessui-combobox-input-${Ct()}`}},emits:{change:e=>!0},setup(e,{emit:t,attrs:n,slots:r,expose:i}){let o=Ui("ComboboxInput"),s=X(()=>un(he(o.inputRef))),a={value:!1};i({el:o.inputRef,$el:o.inputRef});function l(){o.change(null);let w=he(o.optionsRef);w&&(w.scrollTop=0),o.goToOption(Fe.Nothing)}let c=X(()=>{var w;let k=o.value.value;return he(o.inputRef)?typeof e.displayValue!="undefined"&&k!==void 0?(w=e.displayValue(k))!=null?w:"":typeof k=="string"?k:"":""});Je(()=>{Ht([c,o.comboboxState,s],([w,k],[A,d])=>{if(a.value)return;let y=he(o.inputRef);y&&((d===0&&k===1||w!==A)&&(y.value=w),requestAnimationFrame(()=>{var m;if(a.value||!y||((m=s.value)==null?void 0:m.activeElement)!==y)return;let{selectionStart:x,selectionEnd:S}=y;Math.abs((S!=null?S:0)-(x!=null?x:0))===0&&x===0&&y.setSelectionRange(y.value.length,y.value.length)}))},{immediate:!0}),Ht([o.comboboxState],([w],[k])=>{if(w===0&&k===1){if(a.value)return;let A=he(o.inputRef);if(!A)return;let d=A.value,{selectionStart:y,selectionEnd:m,selectionDirection:x}=A;A.value="",A.value=d,x!==null?A.setSelectionRange(y,m,x):A.setSelectionRange(y,m)}})});let u=se(!1);function f(){u.value=!0}function h(){Wi().nextFrame(()=>{u.value=!1})}function p(w){switch(a.value=!0,w.key){case Ne.Enter:if(a.value=!1,o.comboboxState.value!==0||u.value)return;if(w.preventDefault(),w.stopPropagation(),o.activeOptionIndex.value===null){o.closeCombobox();return}o.selectActiveOption(),o.mode.value===0&&o.closeCombobox();break;case Ne.ArrowDown:return a.value=!1,w.preventDefault(),w.stopPropagation(),ct(o.comboboxState.value,{[0]:()=>o.goToOption(Fe.Next),[1]:()=>o.openCombobox()});case Ne.ArrowUp:return a.value=!1,w.preventDefault(),w.stopPropagation(),ct(o.comboboxState.value,{[0]:()=>o.goToOption(Fe.Previous),[1]:()=>{o.openCombobox(),bt(()=>{o.value.value||o.goToOption(Fe.Last)})}});case Ne.Home:if(w.shiftKey)break;return a.value=!1,w.preventDefault(),w.stopPropagation(),o.goToOption(Fe.First);case Ne.PageUp:return a.value=!1,w.preventDefault(),w.stopPropagation(),o.goToOption(Fe.First);case Ne.End:if(w.shiftKey)break;return a.value=!1,w.preventDefault(),w.stopPropagation(),o.goToOption(Fe.Last);case Ne.PageDown:return a.value=!1,w.preventDefault(),w.stopPropagation(),o.goToOption(Fe.Last);case Ne.Escape:if(a.value=!1,o.comboboxState.value!==0)return;w.preventDefault(),o.optionsRef.value&&!o.optionsPropsRef.value.static&&w.stopPropagation(),o.nullable.value&&o.mode.value===0&&o.value.value===null&&l(),o.closeCombobox();break;case Ne.Tab:if(a.value=!1,o.comboboxState.value!==0)return;o.mode.value===0&&o.selectActiveOption(),o.closeCombobox();break}}function g(w){t("change",w),o.nullable.value&&o.mode.value===0&&w.target.value===""&&l(),o.openCombobox()}function v(){a.value=!1}let b=X(()=>{var w,k,A,d;return(d=(A=(k=e.defaultValue)!=null?k:o.defaultValue.value!==void 0?(w=e.displayValue)==null?void 0:w.call(e,o.defaultValue.value):null)!=null?A:o.defaultValue.value)!=null?d:""});return()=>{var w,k,A,d,y,m;let x={open:o.comboboxState.value===0},R=e,{id:S,displayValue:_,onChange:C}=R,E=Ve(R,["id","displayValue","onChange"]),T={"aria-controls":(w=o.optionsRef.value)==null?void 0:w.id,"aria-expanded":o.comboboxState.value===0,"aria-activedescendant":o.activeOptionIndex.value===null||(k=o.options.value[o.activeOptionIndex.value])==null?void 0:k.id,"aria-labelledby":(y=(A=he(o.labelRef))==null?void 0:A.id)!=null?y:(d=he(o.buttonRef))==null?void 0:d.id,"aria-autocomplete":"list",id:S,onCompositionstart:f,onCompositionend:h,onKeydown:p,onInput:g,onBlur:v,role:"combobox",type:(m=n.type)!=null?m:"text",tabIndex:0,ref:o.inputRef,defaultValue:b.value,disabled:o.disabled.value===!0?!0:void 0};return Ye({ourProps:T,theirProps:E,slot:x,attrs:n,slots:r,features:In.RenderStrategy|In.Static,name:"ComboboxInput"})}}}),gP=je({name:"ComboboxOptions",props:{as:{type:[Object,String],default:"ul"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},hold:{type:[Boolean],default:!1}},setup(e,{attrs:t,slots:n,expose:r}){let i=Ui("ComboboxOptions"),o=`headlessui-combobox-options-${Ct()}`;r({el:i.optionsRef,$el:i.optionsRef}),xt(()=>{i.optionsPropsRef.value.static=e.static}),xt(()=>{i.optionsPropsRef.value.hold=e.hold});let s=Jo(),a=X(()=>s!==null?(s.value&st.Open)===st.Open:i.comboboxState.value===0);return eu({container:X(()=>he(i.optionsRef)),enabled:X(()=>i.comboboxState.value===0),accept(l){return l.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:l.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(l){l.setAttribute("role","none")}}),()=>{var l,c,u;let f={open:i.comboboxState.value===0},h={"aria-labelledby":(u=(l=he(i.labelRef))==null?void 0:l.id)!=null?u:(c=he(i.buttonRef))==null?void 0:c.id,id:o,ref:i.optionsRef,role:"listbox","aria-multiselectable":i.mode.value===1?!0:void 0},p=qo(e,["hold"]);return Ye({ourProps:h,theirProps:p,slot:f,attrs:t,slots:n,features:In.RenderStrategy|In.Static,visible:a.value,name:"ComboboxOptions"})}}}),yP=je({name:"ComboboxOption",props:{as:{type:[Object,String],default:"li"},value:{type:[Object,String,Number,Boolean]},disabled:{type:Boolean,default:!1}},setup(e,{slots:t,attrs:n,expose:r}){let i=Ui("ComboboxOption"),o=`headlessui-combobox-option-${Ct()}`,s=se(null);r({el:s,$el:s});let a=X(()=>i.activeOptionIndex.value!==null?i.options.value[i.activeOptionIndex.value].id===o:!1),l=X(()=>ct(i.mode.value,{[0]:()=>i.compare(fe(i.value.value),fe(e.value)),[1]:()=>fe(i.value.value).some(b=>i.compare(fe(b),fe(e.value)))})),c=X(()=>({disabled:e.disabled,value:e.value,domRef:s}));Je(()=>i.registerOption(o,c)),Et(()=>i.unregisterOption(o)),xt(()=>{i.comboboxState.value===0&&a.value&&i.activationTrigger.value!==0&&bt(()=>{var b,w;return(w=(b=he(s))==null?void 0:b.scrollIntoView)==null?void 0:w.call(b,{block:"nearest"})})});function u(b){if(e.disabled)return b.preventDefault();i.selectOption(o),i.mode.value===0&&i.closeCombobox(),Kw()||requestAnimationFrame(()=>{var w;return(w=he(i.inputRef))==null?void 0:w.focus()})}function f(){if(e.disabled)return i.goToOption(Fe.Nothing);i.goToOption(Fe.Specific,o)}let h=rm();function p(b){h.update(b)}function g(b){h.wasMoved(b)&&(e.disabled||a.value||i.goToOption(Fe.Specific,o,0))}function v(b){h.wasMoved(b)&&(e.disabled||a.value&&(i.optionsPropsRef.value.hold||i.goToOption(Fe.Nothing)))}return()=>{let{disabled:b}=e,w={active:a.value,selected:l.value,disabled:b},k={id:o,ref:s,role:"option",tabIndex:b===!0?void 0:-1,"aria-disabled":b===!0?!0:void 0,"aria-selected":l.value,disabled:void 0,onClick:u,onFocus:f,onPointerenter:p,onMouseenter:p,onPointermove:g,onMousemove:g,onPointerleave:v,onMouseleave:v};return Ye({ourProps:k,theirProps:e,slot:w,attrs:n,slots:t,name:"ComboboxOption"})}}});var Xo=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(Xo||{});function Xw(){let e=se(0);return Qp("keydown",t=>{t.key==="Tab"&&(e.value=t.shiftKey?1:0)}),e}function sm(e,t,n,r){Go.isServer||xt(i=>{e=e!=null?e:window,e.addEventListener(t,n,r),i(()=>e.removeEventListener(t,n,r))})}function Qw(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window!="undefined"&&typeof document!="undefined"&&(document.addEventListener("DOMContentLoaded",t),t())}function am(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let n of e.value){let r=he(n);r instanceof HTMLElement&&t.add(r)}return t}var lm=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(lm||{});let Qo=Object.assign(je({name:"FocusTrap",props:{as:{type:[Object,String],default:"div"},initialFocus:{type:Object,default:null},features:{type:Number,default:30},containers:{type:[Object,Function],default:se(new Set)}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:r}){let i=se(null);r({el:i,$el:i});let o=X(()=>un(i)),s=se(!1);Je(()=>s.value=!0),Et(()=>s.value=!1),ex({ownerDocument:o},X(()=>s.value&&Boolean(e.features&16)));let a=tx({ownerDocument:o,container:i,initialFocus:X(()=>e.initialFocus)},X(()=>s.value&&Boolean(e.features&2)));nx({ownerDocument:o,container:i,containers:e.containers,previousActiveElement:a},X(()=>s.value&&Boolean(e.features&8)));let l=Xw();function c(p){let g=he(i);!g||(v=>v())(()=>{ct(l.value,{[Xo.Forwards]:()=>{ni(g,Ft.First,{skipElements:[p.relatedTarget]})},[Xo.Backwards]:()=>{ni(g,Ft.Last,{skipElements:[p.relatedTarget]})}})})}let u=se(!1);function f(p){p.key==="Tab"&&(u.value=!0,requestAnimationFrame(()=>{u.value=!1}))}function h(p){if(!s.value)return;let g=am(e.containers);he(i)instanceof HTMLElement&&g.add(he(i));let v=p.relatedTarget;v instanceof HTMLElement&&v.dataset.headlessuiFocusGuard!=="true"&&(cm(g,v)||(u.value?ni(he(i),ct(l.value,{[Xo.Forwards]:()=>Ft.Next,[Xo.Backwards]:()=>Ft.Previous})|Ft.WrapAround,{relativeTo:p.target}):p.target instanceof HTMLElement&&gr(p.target)))}return()=>{let p={},g={ref:i,onKeydown:f,onFocusout:h},A=e,{features:v,initialFocus:b,containers:w}=A,k=Ve(A,["features","initialFocus","containers"]);return He(lt,[Boolean(v&4)&&He(Yo,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:c,features:Vi.Focusable}),Ye({ourProps:g,theirProps:J(J({},t),k),slot:p,attrs:t,slots:n,name:"FocusTrap"}),Boolean(v&4)&&He(Yo,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:c,features:Vi.Focusable})])}}}),{features:lm}),ri=[];Qw(()=>{function e(t){t.target instanceof HTMLElement&&t.target!==document.body&&ri[0]!==t.target&&(ri.unshift(t.target),ri=ri.filter(n=>n!=null&&n.isConnected),ri.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function Zw(e){let t=se(ri.slice());return Ht([e],([n],[r])=>{r===!0&&n===!1?su(()=>{t.value.splice(0)}):r===!1&&n===!0&&(t.value=ri.slice())},{flush:"post"}),()=>{var n;return(n=t.value.find(r=>r!=null&&r.isConnected))!=null?n:null}}function ex({ownerDocument:e},t){let n=Zw(t);Je(()=>{xt(()=>{var r,i;t.value||((r=e.value)==null?void 0:r.activeElement)===((i=e.value)==null?void 0:i.body)&&gr(n())},{flush:"post"})}),Et(()=>{t.value&&gr(n())})}function tx({ownerDocument:e,container:t,initialFocus:n},r){let i=se(null),o=se(!1);return Je(()=>o.value=!0),Et(()=>o.value=!1),Je(()=>{Ht([t,n,r],(s,a)=>{if(s.every((c,u)=>(a==null?void 0:a[u])===c)||!r.value)return;let l=he(t);l&&su(()=>{var c,u;if(!o.value)return;let f=he(n),h=(c=e.value)==null?void 0:c.activeElement;if(f){if(f===h){i.value=h;return}}else if(l.contains(h)){i.value=h;return}f?gr(f):ni(l,Ft.First|Ft.NoScroll)===wa.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),i.value=(u=e.value)==null?void 0:u.activeElement})},{immediate:!0,flush:"post"})}),i}function nx({ownerDocument:e,container:t,containers:n,previousActiveElement:r},i){var o;sm((o=e.value)==null?void 0:o.defaultView,"focus",s=>{if(!i.value)return;let a=am(n);he(t)instanceof HTMLElement&&a.add(he(t));let l=r.value;if(!l)return;let c=s.target;c&&c instanceof HTMLElement?cm(a,c)?(r.value=c,gr(c)):(s.preventDefault(),s.stopPropagation(),gr(l)):gr(r.value)},!0)}function cm(e,t){for(let n of e)if(n.contains(t))return!0;return!1}let au=new Map,Zo=new Map;function um(e,t=se(!0)){xt(n=>{var r;if(!t.value)return;let i=he(e);if(!i)return;n(function(){var s;if(!i)return;let a=(s=Zo.get(i))!=null?s:1;if(a===1?Zo.delete(i):Zo.set(i,a-1),a!==1)return;let l=au.get(i);l&&(l["aria-hidden"]===null?i.removeAttribute("aria-hidden"):i.setAttribute("aria-hidden",l["aria-hidden"]),i.inert=l.inert,au.delete(i))});let o=(r=Zo.get(i))!=null?r:0;Zo.set(i,o+1),o===0&&(au.set(i,{"aria-hidden":i.getAttribute("aria-hidden"),inert:i.inert}),i.setAttribute("aria-hidden","true"),i.inert=!0)})}let dm=Symbol("ForcePortalRootContext");function rx(){return Xe(dm,!1)}let lu=je({name:"ForcePortalRoot",props:{as:{type:[Object,String],default:"template"},force:{type:Boolean,default:!1}},setup(e,{slots:t,attrs:n}){return wt(dm,e.force),()=>{let o=e,{force:r}=o,i=Ve(o,["force"]);return Ye({theirProps:i,ourProps:{},slot:{},slots:t,attrs:n,name:"ForcePortalRoot"})}}});function ix(e){let t=un(e);if(!t){if(e===null)return null;throw new Error(`[Headless UI]: Cannot find ownerDocument for contextElement: ${e}`)}let n=t.getElementById("headlessui-portal-root");if(n)return n;let r=t.createElement("div");return r.setAttribute("id","headlessui-portal-root"),t.body.appendChild(r)}let fm=je({name:"Portal",props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n}){let r=se(null),i=X(()=>un(r)),o=rx(),s=Xe(hm,null),a=se(o===!0||s==null?ix(r.value):s.resolveTarget());xt(()=>{o||s!=null&&(a.value=s.resolveTarget())});let l=Xe(cu,null);return Je(()=>{let c=he(r);c&&l&&Et(l.register(c))}),Et(()=>{var c,u;let f=(c=i.value)==null?void 0:c.getElementById("headlessui-portal-root");f&&a.value===f&&a.value.children.length<=0&&((u=a.value.parentElement)==null||u.removeChild(a.value))}),()=>{if(a.value===null)return null;let c={ref:r,"data-headlessui-portal":""};return He(jc,{to:a.value},Ye({ourProps:c,theirProps:e,slot:{},attrs:n,slots:t,name:"Portal"}))}}}),cu=Symbol("PortalParentContext");function ox(){let e=Xe(cu,null),t=se([]);function n(o){return t.value.push(o),e&&e.register(o),()=>r(o)}function r(o){let s=t.value.indexOf(o);s!==-1&&t.value.splice(s,1),e&&e.unregister(o)}let i={register:n,unregister:r,portals:t};return[t,je({name:"PortalWrapper",setup(o,{slots:s}){return wt(cu,i),()=>{var a;return(a=s.default)==null?void 0:a.call(s)}}})]}let hm=Symbol("PortalGroupContext"),sx=je({name:"PortalGroup",props:{as:{type:[Object,String],default:"template"},target:{type:Object,default:null}},setup(e,{attrs:t,slots:n}){let r=sn({resolveTarget(){return e.target}});return wt(hm,r),()=>{let s=e,{target:i}=s,o=Ve(s,["target"]);return Ye({theirProps:o,ourProps:{},slot:{},attrs:t,slots:n,name:"PortalGroup"})}}}),pm=Symbol("StackContext");var uu=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(uu||{});function ax(){return Xe(pm,()=>{})}function lx({type:e,enabled:t,element:n,onUpdate:r}){let i=ax();function o(...s){r==null||r(...s),i(...s)}Je(()=>{Ht(t,(s,a)=>{s?o(0,e,n):a===!0&&o(1,e,n)},{immediate:!0,flush:"sync"})}),Et(()=>{t.value&&o(1,e,n)}),wt(pm,o)}let mm=Symbol("DescriptionContext");function cx(){let e=Xe(mm,null);if(e===null)throw new Error("Missing parent");return e}function du({slot:e=se({}),name:t="Description",props:n={}}={}){let r=se([]);function i(o){return r.value.push(o),()=>{let s=r.value.indexOf(o);s!==-1&&r.value.splice(s,1)}}return wt(mm,{register:i,slot:e,name:t,props:n}),X(()=>r.value.length>0?r.value.join(" "):void 0)}let vP=je({name:"Description",props:{as:{type:[Object,String],default:"p"},id:{type:String,default:()=>`headlessui-description-${Ct()}`}},setup(e,{attrs:t,slots:n}){let r=cx();return Je(()=>Et(r.register(e.id))),()=>{let{name:i="Description",slot:o=se({}),props:s={}}=r,u=e,{id:a}=u,l=Ve(u,["id"]),c=Me(J({},Object.entries(s).reduce((f,[h,p])=>Object.assign(f,{[h]:Rt(p)}),{})),{id:a});return Ye({ourProps:c,theirProps:l,slot:o.value,attrs:t,slots:n,name:i})}}});function ux(e){let t=dh(e.getSnapshot());return Et(e.subscribe(()=>{t.value=e.getSnapshot()})),t}function dx(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(i){return r.add(i),()=>r.delete(i)},dispatch(i,...o){let s=t[i].call(n,...o);s&&(n=s,r.forEach(a=>a()))}}}function fx(){let e;return{before({doc:t}){var n;let r=t.documentElement;e=((n=t.defaultView)!=null?n:window).innerWidth-r.clientWidth},after({doc:t,d:n}){let r=t.documentElement,i=r.clientWidth-r.offsetWidth,o=e-i;n.style(r,"paddingRight",`${o}px`)}}}function hx(){if(!im())return{};let e;return{before(){e=window.pageYOffset},after({doc:t,d:n,meta:r}){function i(s){return r.containers.flatMap(a=>a()).some(a=>a.contains(s))}if(window.getComputedStyle(t.documentElement).scrollBehavior!=="auto"){let s=Wi();s.style(t.documentElement,"scroll-behavior","auto"),n.add(()=>n.microTask(()=>s.dispose()))}n.style(t.body,"marginTop",`-${e}px`),window.scrollTo(0,0);let o=null;n.addEventListener(t,"click",s=>{if(s.target instanceof HTMLElement)try{let a=s.target.closest("a");if(!a)return;let{hash:l}=new URL(a.href),c=t.querySelector(l);c&&!i(c)&&(o=c)}catch(a){}},!0),n.addEventListener(t,"touchmove",s=>{s.target instanceof HTMLElement&&!i(s.target)&&s.preventDefault()},{passive:!1}),n.add(()=>{window.scrollTo(0,window.pageYOffset+e),o&&o.isConnected&&(o.scrollIntoView({block:"nearest"}),o=null)})}}}function px(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function mx(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let ii=dx(()=>new Map,{PUSH(e,t){var n;let r=(n=this.get(e))!=null?n:{doc:e,count:0,d:Wi(),meta:new Set};return r.count++,r.meta.add(t),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let r={doc:e,d:t,meta:mx(n)},i=[hx(),fx(),px()];i.forEach(({before:o})=>o==null?void 0:o(r)),i.forEach(({after:o})=>o==null?void 0:o(r))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});ii.subscribe(()=>{let e=ii.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let r=t.get(n.doc)==="hidden",i=n.count!==0;(i&&!r||!i&&r)&&ii.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&ii.dispatch("TEARDOWN",n)}});function gx(e,t,n){let r=ux(ii),i=X(()=>{let o=e.value?r.value.get(e.value):void 0;return o?o.count>0:!1});return Ht([e,t],([o,s],[a],l)=>{if(!o||!s)return;ii.dispatch("PUSH",o,n);let c=!1;l(()=>{c||(ii.dispatch("POP",a!=null?a:o,n),c=!0)})},{immediate:!0}),i}function yx({defaultContainers:e=[],portals:t,mainTreeNodeRef:n}={}){let r=se(null),i=un(r);function o(){var s;let a=[];for(let l of e)l!==null&&(l instanceof HTMLElement?a.push(l):"value"in l&&l.value instanceof HTMLElement&&a.push(l.value));if(t!=null&&t.value)for(let l of t.value)a.push(l);for(let l of(s=i==null?void 0:i.querySelectorAll("html > *, body > *"))!=null?s:[])l!==document.body&&l!==document.head&&l instanceof HTMLElement&&l.id!=="headlessui-portal-root"&&(l.contains(he(r))||a.some(c=>l.contains(c))||a.push(l));return a}return{resolveContainers:o,contains(s){return o().some(a=>a.contains(s))},mainTreeNodeRef:r,MainTreeNode(){return n!=null?null:He(Yo,{features:Vi.Hidden,ref:r})}}}var vx=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(vx||{});let fu=Symbol("DialogContext");function es(e){let t=Xe(fu,null);if(t===null){let n=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,es),n}return t}let Sa="DC8F892D-2EBD-447C-A4C8-A03058436FF4",bx=je({name:"Dialog",inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},open:{type:[Boolean,String],default:Sa},initialFocus:{type:Object,default:null},id:{type:String,default:()=>`headlessui-dialog-${Ct()}`}},emits:{close:e=>!0},setup(e,{emit:t,attrs:n,slots:r,expose:i}){var o;let s=se(!1);Je(()=>{s.value=!0});let a=se(0),l=Jo(),c=X(()=>e.open===Sa&&l!==null?(l.value&st.Open)===st.Open:e.open),u=se(null),f=X(()=>un(u));if(i({el:u,$el:u}),!(e.open!==Sa||l!==null))throw new Error("You forgot to provide an `open` prop to the `Dialog`.");if(typeof c.value!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${c.value===Sa?void 0:e.open}`);let h=X(()=>s.value&&c.value?0:1),p=X(()=>h.value===0),g=X(()=>a.value>1),v=Xe(fu,null)!==null,[b,w]=ox(),{resolveContainers:k,mainTreeNodeRef:A,MainTreeNode:d}=yx({portals:b,defaultContainers:[X(()=>{var P;return(P=R.panelRef.value)!=null?P:u.value})]}),y=X(()=>g.value?"parent":"leaf"),m=X(()=>l!==null?(l.value&st.Closing)===st.Closing:!1),x=X(()=>v||m.value?!1:p.value),S=X(()=>{var P,L,H;return(H=Array.from((L=(P=f.value)==null?void 0:P.querySelectorAll("body > *"))!=null?L:[]).find(te=>te.id==="headlessui-portal-root"?!1:te.contains(he(A))&&te instanceof HTMLElement))!=null?H:null});um(S,x);let _=X(()=>g.value?!0:p.value),C=X(()=>{var P,L,H;return(H=Array.from((L=(P=f.value)==null?void 0:P.querySelectorAll("[data-headlessui-portal]"))!=null?L:[]).find(te=>te.contains(he(A))&&te instanceof HTMLElement))!=null?H:null});um(C,_),lx({type:"Dialog",enabled:X(()=>h.value===0),element:u,onUpdate:(P,L)=>{if(L==="Dialog")return ct(P,{[uu.Add]:()=>a.value+=1,[uu.Remove]:()=>a.value-=1})}});let E=du({name:"DialogDescription",slot:X(()=>({open:c.value}))}),T=se(null),R={titleId:T,panelRef:se(null),dialogState:h,setTitleId(P){T.value!==P&&(T.value=P)},close(){t("close",!1)}};wt(fu,R);let N=X(()=>!(!p.value||g.value));iu(k,(P,L)=>{R.close(),bt(()=>L==null?void 0:L.focus())},N);let D=X(()=>!(g.value||h.value!==0));sm((o=f.value)==null?void 0:o.defaultView,"keydown",P=>{D.value&&(P.defaultPrevented||P.key===Ne.Escape&&(P.preventDefault(),P.stopPropagation(),R.close()))});let M=X(()=>!(m.value||h.value!==0||v));return gx(f,M,P=>{var L;return{containers:[...(L=P.containers)!=null?L:[],k]}}),xt(P=>{if(h.value!==0)return;let L=he(u);if(!L)return;let H=new ResizeObserver(te=>{for(let q of te){let ae=q.target.getBoundingClientRect();ae.x===0&&ae.y===0&&ae.width===0&&ae.height===0&&R.close()}});H.observe(L),P(()=>H.disconnect())}),()=>{let ge=e,{id:P,open:L,initialFocus:H}=ge,te=Ve(ge,["id","open","initialFocus"]),q=Me(J({},n),{ref:u,id:P,role:"dialog","aria-modal":h.value===0?!0:void 0,"aria-labelledby":T.value,"aria-describedby":E.value}),ae={open:h.value===0};return He(lu,{force:!0},()=>[He(fm,()=>He(sx,{target:u.value},()=>He(lu,{force:!1},()=>He(Qo,{initialFocus:H,containers:k,features:p.value?ct(y.value,{parent:Qo.features.RestoreFocus,leaf:Qo.features.All&~Qo.features.FocusLock}):Qo.features.None},()=>He(w,{},()=>Ye({ourProps:q,theirProps:J(J({},te),n),slot:ae,attrs:n,slots:r,visible:h.value===0,features:In.RenderStrategy|In.Static,name:"Dialog"})))))),He(d)])}}});je({name:"DialogOverlay",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:()=>`headlessui-dialog-overlay-${Ct()}`}},setup(e,{attrs:t,slots:n}){let r=es("DialogOverlay");function i(o){o.target===o.currentTarget&&(o.preventDefault(),o.stopPropagation(),r.close())}return()=>{let a=e,{id:o}=a,s=Ve(a,["id"]);return Ye({ourProps:{id:o,"aria-hidden":!0,onClick:i},theirProps:s,slot:{open:r.dialogState.value===0},attrs:t,slots:n,name:"DialogOverlay"})}}});je({name:"DialogBackdrop",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:()=>`headlessui-dialog-backdrop-${Ct()}`}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:r}){let i=es("DialogBackdrop"),o=se(null);return r({el:o,$el:o}),Je(()=>{if(i.panelRef.value===null)throw new Error("A <DialogBackdrop /> component is being used, but a <DialogPanel /> component is missing.")}),()=>{let c=e,{id:s}=c,a=Ve(c,["id"]),l={id:s,ref:o,"aria-hidden":!0};return He(lu,{force:!0},()=>He(fm,()=>Ye({ourProps:l,theirProps:J(J({},t),a),slot:{open:i.dialogState.value===0},attrs:t,slots:n,name:"DialogBackdrop"})))}}});let wx=je({name:"DialogPanel",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:()=>`headlessui-dialog-panel-${Ct()}`}},setup(e,{attrs:t,slots:n,expose:r}){let i=es("DialogPanel");r({el:i.panelRef,$el:i.panelRef});function o(s){s.stopPropagation()}return()=>{let c=e,{id:s}=c,a=Ve(c,["id"]),l={id:s,ref:i.panelRef,onClick:o};return Ye({ourProps:l,theirProps:a,slot:{open:i.dialogState.value===0},attrs:t,slots:n,name:"DialogPanel"})}}}),xx=je({name:"DialogTitle",props:{as:{type:[Object,String],default:"h2"},id:{type:String,default:()=>`headlessui-dialog-title-${Ct()}`}},setup(e,{attrs:t,slots:n}){let r=es("DialogTitle");return Je(()=>{r.setTitleId(e.id),Et(()=>r.setTitleId(null))}),()=>{let s=e,{id:i}=s,o=Ve(s,["id"]);return Ye({ourProps:{id:i},theirProps:o,slot:{open:r.dialogState.value===0},attrs:t,slots:n,name:"DialogTitle"})}}}),gm=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function ym(e){var t,n;let r=(t=e.innerText)!=null?t:"",i=e.cloneNode(!0);if(!(i instanceof HTMLElement))return r;let o=!1;for(let a of i.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))a.remove(),o=!0;let s=o?(n=i.innerText)!=null?n:"":r;return gm.test(s)&&(s=s.replace(gm,"")),s}function kx(e){let t=e.getAttribute("aria-label");if(typeof t=="string")return t.trim();let n=e.getAttribute("aria-labelledby");if(n){let r=n.split(" ").map(i=>{let o=document.getElementById(i);if(o){let s=o.getAttribute("aria-label");return typeof s=="string"?s.trim():ym(o).trim()}return null}).filter(Boolean);if(r.length>0)return r.join(", ")}return ym(e).trim()}function Sx(e){let t=se(""),n=se("");return()=>{let r=he(e);if(!r)return"";let i=r.innerText;if(t.value===i)return n.value;let o=kx(r).trim().toLowerCase();return t.value=i,n.value=o,o}}var Cx=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Cx||{}),_x=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(_x||{});function Mx(e){requestAnimationFrame(()=>requestAnimationFrame(e))}let vm=Symbol("MenuContext");function Ca(e){let t=Xe(vm,null);if(t===null){let n=new Error(`<${e} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Ca),n}return t}let bP=je({name:"Menu",props:{as:{type:[Object,String],default:"template"}},setup(e,{slots:t,attrs:n}){let r=se(1),i=se(null),o=se(null),s=se([]),a=se(""),l=se(null),c=se(1);function u(h=p=>p){let p=l.value!==null?s.value[l.value]:null,g=xa(h(s.value.slice()),b=>he(b.dataRef.domRef)),v=p?g.indexOf(p):null;return v===-1&&(v=null),{items:g,activeItemIndex:v}}let f={menuState:r,buttonRef:i,itemsRef:o,items:s,searchQuery:a,activeItemIndex:l,activationTrigger:c,closeMenu:()=>{r.value=1,l.value=null},openMenu:()=>r.value=0,goToItem(h,p,g){let v=u(),b=Up(h===Fe.Specific?{focus:Fe.Specific,id:p}:{focus:h},{resolveItems:()=>v.items,resolveActiveIndex:()=>v.activeItemIndex,resolveId:w=>w.id,resolveDisabled:w=>w.dataRef.disabled});a.value="",l.value=b,c.value=g!=null?g:1,s.value=v.items},search(h){let p=a.value!==""?0:1;a.value+=h.toLowerCase();let g=(l.value!==null?s.value.slice(l.value+p).concat(s.value.slice(0,l.value+p)):s.value).find(b=>b.dataRef.textValue.startsWith(a.value)&&!b.dataRef.disabled),v=g?s.value.indexOf(g):-1;v===-1||v===l.value||(l.value=v,c.value=1)},clearSearch(){a.value=""},registerItem(h,p){let g=u(v=>[...v,{id:h,dataRef:p}]);s.value=g.items,l.value=g.activeItemIndex,c.value=1},unregisterItem(h){let p=u(g=>{let v=g.findIndex(b=>b.id===h);return v!==-1&&g.splice(v,1),g});s.value=p.items,l.value=p.activeItemIndex,c.value=1}};return iu([i,o],(h,p)=>{var g;f.closeMenu(),ru(p,nu.Loose)||(h.preventDefault(),(g=he(i))==null||g.focus())},X(()=>r.value===0)),wt(vm,f),Zc(X(()=>ct(r.value,{[0]:st.Open,[1]:st.Closed}))),()=>{let h={open:r.value===0,close:f.closeMenu};return Ye({ourProps:{},theirProps:e,slot:h,slots:t,attrs:n,name:"Menu"})}}}),wP=je({name:"MenuButton",props:{disabled:{type:Boolean,default:!1},as:{type:[Object,String],default:"button"},id:{type:String,default:()=>`headlessui-menu-button-${Ct()}`}},setup(e,{attrs:t,slots:n,expose:r}){let i=Ca("MenuButton");r({el:i.buttonRef,$el:i.buttonRef});function o(c){switch(c.key){case Ne.Space:case Ne.Enter:case Ne.ArrowDown:c.preventDefault(),c.stopPropagation(),i.openMenu(),bt(()=>{var u;(u=he(i.itemsRef))==null||u.focus({preventScroll:!0}),i.goToItem(Fe.First)});break;case Ne.ArrowUp:c.preventDefault(),c.stopPropagation(),i.openMenu(),bt(()=>{var u;(u=he(i.itemsRef))==null||u.focus({preventScroll:!0}),i.goToItem(Fe.Last)});break}}function s(c){switch(c.key){case Ne.Space:c.preventDefault();break}}function a(c){e.disabled||(i.menuState.value===0?(i.closeMenu(),bt(()=>{var u;return(u=he(i.buttonRef))==null?void 0:u.focus({preventScroll:!0})})):(c.preventDefault(),i.openMenu(),Mx(()=>{var u;return(u=he(i.itemsRef))==null?void 0:u.focus({preventScroll:!0})})))}let l=Jp(X(()=>({as:e.as,type:t.type})),i.buttonRef);return()=>{var c;let u={open:i.menuState.value===0},g=e,{id:f}=g,h=Ve(g,["id"]),p={ref:i.buttonRef,id:f,type:l.value,"aria-haspopup":"menu","aria-controls":(c=he(i.itemsRef))==null?void 0:c.id,"aria-expanded":i.menuState.value===0,onKeydown:o,onKeyup:s,onClick:a};return Ye({ourProps:p,theirProps:h,slot:u,attrs:t,slots:n,name:"MenuButton"})}}}),xP=je({name:"MenuItems",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:()=>`headlessui-menu-items-${Ct()}`}},setup(e,{attrs:t,slots:n,expose:r}){let i=Ca("MenuItems"),o=se(null);r({el:i.itemsRef,$el:i.itemsRef}),eu({container:X(()=>he(i.itemsRef)),enabled:X(()=>i.menuState.value===0),accept(u){return u.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:u.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(u){u.setAttribute("role","none")}});function s(u){var f;switch(o.value&&clearTimeout(o.value),u.key){case Ne.Space:if(i.searchQuery.value!=="")return u.preventDefault(),u.stopPropagation(),i.search(u.key);case Ne.Enter:if(u.preventDefault(),u.stopPropagation(),i.activeItemIndex.value!==null){let h=i.items.value[i.activeItemIndex.value];(f=he(h.dataRef.domRef))==null||f.click()}i.closeMenu(),Xp(he(i.buttonRef));break;case Ne.ArrowDown:return u.preventDefault(),u.stopPropagation(),i.goToItem(Fe.Next);case Ne.ArrowUp:return u.preventDefault(),u.stopPropagation(),i.goToItem(Fe.Previous);case Ne.Home:case Ne.PageUp:return u.preventDefault(),u.stopPropagation(),i.goToItem(Fe.First);case Ne.End:case Ne.PageDown:return u.preventDefault(),u.stopPropagation(),i.goToItem(Fe.Last);case Ne.Escape:u.preventDefault(),u.stopPropagation(),i.closeMenu(),bt(()=>{var h;return(h=he(i.buttonRef))==null?void 0:h.focus({preventScroll:!0})});break;case Ne.Tab:u.preventDefault(),u.stopPropagation(),i.closeMenu(),bt(()=>Vw(he(i.buttonRef),u.shiftKey?Ft.Previous:Ft.Next));break;default:u.key.length===1&&(i.search(u.key),o.value=setTimeout(()=>i.clearSearch(),350));break}}function a(u){switch(u.key){case Ne.Space:u.preventDefault();break}}let l=Jo(),c=X(()=>l!==null?(l.value&st.Open)===st.Open:i.menuState.value===0);return()=>{var u,f;let h={open:i.menuState.value===0},b=e,{id:p}=b,g=Ve(b,["id"]),v={"aria-activedescendant":i.activeItemIndex.value===null||(u=i.items.value[i.activeItemIndex.value])==null?void 0:u.id,"aria-labelledby":(f=he(i.buttonRef))==null?void 0:f.id,id:p,onKeydown:s,onKeyup:a,role:"menu",tabIndex:0,ref:i.itemsRef};return Ye({ourProps:v,theirProps:g,slot:h,attrs:t,slots:n,features:In.RenderStrategy|In.Static,visible:c.value,name:"MenuItems"})}}}),kP=je({name:"MenuItem",inheritAttrs:!1,props:{as:{type:[Object,String],default:"template"},disabled:{type:Boolean,default:!1},id:{type:String,default:()=>`headlessui-menu-item-${Ct()}`}},setup(e,{slots:t,attrs:n,expose:r}){let i=Ca("MenuItem"),o=se(null);r({el:o,$el:o});let s=X(()=>i.activeItemIndex.value!==null?i.items.value[i.activeItemIndex.value].id===e.id:!1),a=Sx(o),l=X(()=>({disabled:e.disabled,get textValue(){return a()},domRef:o}));Je(()=>i.registerItem(e.id,l)),Et(()=>i.unregisterItem(e.id)),xt(()=>{i.menuState.value===0&&s.value&&i.activationTrigger.value!==0&&bt(()=>{var v,b;return(b=(v=he(o))==null?void 0:v.scrollIntoView)==null?void 0:b.call(v,{block:"nearest"})})});function c(v){if(e.disabled)return v.preventDefault();i.closeMenu(),Xp(he(i.buttonRef))}function u(){if(e.disabled)return i.goToItem(Fe.Nothing);i.goToItem(Fe.Specific,e.id)}let f=rm();function h(v){f.update(v)}function p(v){f.wasMoved(v)&&(e.disabled||s.value||i.goToItem(Fe.Specific,e.id,0))}function g(v){f.wasMoved(v)&&(e.disabled||s.value&&i.goToItem(Fe.Nothing))}return()=>{let{disabled:v}=e,b={active:s.value,disabled:v,close:i.closeMenu},A=e,{id:w}=A,k=Ve(A,["id"]);return Ye({ourProps:{id:w,ref:o,role:"menuitem",tabIndex:v===!0?void 0:-1,"aria-disabled":v===!0?!0:void 0,disabled:void 0,onClick:c,onFocus:u,onPointerenter:h,onMouseenter:h,onPointermove:p,onMousemove:p,onPointerleave:g,onMouseleave:g},theirProps:J(J({},n),k),slot:b,attrs:n,slots:t,name:"MenuItem"})}}}),bm=Symbol("LabelContext");function wm(){let e=Xe(bm,null);if(e===null){let t=new Error("You used a <Label /> component, but it is not inside a parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,wm),t}return e}function xm({slot:e={},name:t="Label",props:n={}}={}){let r=se([]);function i(o){return r.value.push(o),()=>{let s=r.value.indexOf(o);s!==-1&&r.value.splice(s,1)}}return wt(bm,{register:i,slot:e,name:t,props:n}),X(()=>r.value.length>0?r.value.join(" "):void 0)}let SP=je({name:"Label",props:{as:{type:[Object,String],default:"label"},passive:{type:[Boolean],default:!1},id:{type:String,default:()=>`headlessui-label-${Ct()}`}},setup(e,{slots:t,attrs:n}){let r=wm();return Je(()=>Et(r.register(e.id))),()=>{let{name:i="Label",slot:o={},props:s={}}=r,f=e,{id:a,passive:l}=f,c=Ve(f,["id","passive"]),u=Me(J({},Object.entries(s).reduce((h,[p,g])=>Object.assign(h,{[p]:Rt(g)}),{})),{id:a});return l&&(delete u.onClick,delete u.htmlFor,delete c.onClick),Ye({ourProps:u,theirProps:c,slot:o,attrs:n,slots:t,name:i})}}});function Ax(e,t){return e===t}let km=Symbol("RadioGroupContext");function Sm(e){let t=Xe(km,null);if(t===null){let n=new Error(`<${e} /> is missing a parent <RadioGroup /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Sm),n}return t}let CP=je({name:"RadioGroup",emits:{"update:modelValue":e=>!0},props:{as:{type:[Object,String],default:"div"},disabled:{type:[Boolean],default:!1},by:{type:[String,Function],default:()=>Ax},modelValue:{type:[Object,String,Number,Boolean],default:void 0},defaultValue:{type:[Object,String,Number,Boolean],default:void 0},form:{type:String,optional:!0},name:{type:String,optional:!0},id:{type:String,default:()=>`headlessui-radiogroup-${Ct()}`}},inheritAttrs:!1,setup(e,{emit:t,attrs:n,slots:r,expose:i}){let o=se(null),s=se([]),a=xm({name:"RadioGroupLabel"}),l=du({name:"RadioGroupDescription"});i({el:o,$el:o});let[c,u]=tm(X(()=>e.modelValue),g=>t("update:modelValue",g),X(()=>e.defaultValue)),f={options:s,value:c,disabled:X(()=>e.disabled),firstOption:X(()=>s.value.find(g=>!g.propsRef.disabled)),containsCheckedOption:X(()=>s.value.some(g=>f.compare(fe(g.propsRef.value),fe(e.modelValue)))),compare(g,v){if(typeof e.by=="string"){let b=e.by;return(g==null?void 0:g[b])===(v==null?void 0:v[b])}return e.by(g,v)},change(g){var v;if(e.disabled||f.compare(fe(c.value),fe(g)))return!1;let b=(v=s.value.find(w=>f.compare(fe(w.propsRef.value),fe(g))))==null?void 0:v.propsRef;return b!=null&&b.disabled?!1:(u(g),!0)},registerOption(g){s.value.push(g),s.value=xa(s.value,v=>v.element)},unregisterOption(g){let v=s.value.findIndex(b=>b.id===g);v!==-1&&s.value.splice(v,1)}};wt(km,f),eu({container:X(()=>he(o)),accept(g){return g.getAttribute("role")==="radio"?NodeFilter.FILTER_REJECT:g.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(g){g.setAttribute("role","none")}});function h(g){if(!o.value||!o.value.contains(g.target))return;let v=s.value.filter(b=>b.propsRef.disabled===!1).map(b=>b.element);switch(g.key){case Ne.Enter:Ww(g.currentTarget);break;case Ne.ArrowLeft:case Ne.ArrowUp:if(g.preventDefault(),g.stopPropagation(),ni(v,Ft.Previous|Ft.WrapAround)===wa.Success){let b=s.value.find(w=>{var k;return w.element===((k=un(o))==null?void 0:k.activeElement)});b&&f.change(b.propsRef.value)}break;case Ne.ArrowRight:case Ne.ArrowDown:if(g.preventDefault(),g.stopPropagation(),ni(v,Ft.Next|Ft.WrapAround)===wa.Success){let b=s.value.find(w=>{var k;return w.element===((k=un(w.element))==null?void 0:k.activeElement)});b&&f.change(b.propsRef.value)}break;case Ne.Space:{g.preventDefault(),g.stopPropagation();let b=s.value.find(w=>{var k;return w.element===((k=un(w.element))==null?void 0:k.activeElement)});b&&f.change(b.propsRef.value)}break}}let p=X(()=>{var g;return(g=he(o))==null?void 0:g.closest("form")});return Je(()=>{Ht([p],()=>{if(!p.value||e.defaultValue===void 0)return;function g(){f.change(e.defaultValue)}return p.value.addEventListener("reset",g),()=>{var v;(v=p.value)==null||v.removeEventListener("reset",g)}},{immediate:!0})}),()=>{let d=e,{disabled:g,name:v,id:b,form:w}=d,k=Ve(d,["disabled","name","id","form"]),A={ref:o,id:b,role:"radiogroup","aria-labelledby":a.value,"aria-describedby":l.value,onKeydown:h};return He(lt,[...v!=null&&c.value!=null?ou({[v]:c.value}).map(([y,m])=>He(Yo,Wp({features:Vi.Hidden,key:y,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:w,name:y,value:m}))):[],Ye({ourProps:A,theirProps:J(J({},n),qo(k,["modelValue","defaultValue","by"])),slot:{},attrs:n,slots:r,name:"RadioGroup"})])}}});var Ex=(e=>(e[e.Empty=1]="Empty",e[e.Active=2]="Active",e))(Ex||{});let _P=je({name:"RadioGroupOption",props:{as:{type:[Object,String],default:"div"},value:{type:[Object,String,Number,Boolean]},disabled:{type:Boolean,default:!1},id:{type:String,default:()=>`headlessui-radiogroup-option-${Ct()}`}},setup(e,{attrs:t,slots:n,expose:r}){let i=Sm("RadioGroupOption"),o=xm({name:"RadioGroupLabel"}),s=du({name:"RadioGroupDescription"}),a=se(null),l=X(()=>({value:e.value,disabled:e.disabled})),c=se(1);r({el:a,$el:a});let u=X(()=>he(a));Je(()=>i.registerOption({id:e.id,element:u,propsRef:l})),Et(()=>i.unregisterOption(e.id));let f=X(()=>{var k;return((k=i.firstOption.value)==null?void 0:k.id)===e.id}),h=X(()=>i.disabled.value||e.disabled),p=X(()=>i.compare(fe(i.value.value),fe(e.value))),g=X(()=>h.value?-1:p.value||!i.containsCheckedOption.value&&f.value?0:-1);function v(){var k;i.change(e.value)&&(c.value|=2,(k=he(a))==null||k.focus())}function b(){c.value|=2}function w(){c.value&=-3}return()=>{let S=e,{id:k,value:A,disabled:d}=S,y=Ve(S,["id","value","disabled"]),m={checked:p.value,disabled:h.value,active:Boolean(c.value&2)},x={id:k,ref:a,role:"radio","aria-checked":p.value?"true":"false","aria-labelledby":o.value,"aria-describedby":s.value,"aria-disabled":h.value?!0:void 0,tabIndex:g.value,onClick:h.value?void 0:v,onFocus:h.value?void 0:b,onBlur:h.value?void 0:w};return Ye({ourProps:x,theirProps:y,slot:m,attrs:t,slots:n,name:"RadioGroupOption"})}}});function Ox(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function hu(e,...t){e&&t.length>0&&e.classList.add(...t)}function _a(e,...t){e&&t.length>0&&e.classList.remove(...t)}var pu=(e=>(e.Finished="finished",e.Cancelled="cancelled",e))(pu||{});function Tx(e,t){let n=Wi();if(!e)return n.dispose;let{transitionDuration:r,transitionDelay:i}=getComputedStyle(e),[o,s]=[r,i].map(a=>{let[l=0]=a.split(",").filter(Boolean).map(c=>c.includes("ms")?parseFloat(c):parseFloat(c)*1e3).sort((c,u)=>u-c);return l});return o!==0?n.setTimeout(()=>t("finished"),o+s):t("finished"),n.add(()=>t("cancelled")),n.dispose}function Cm(e,t,n,r,i,o){let s=Wi(),a=o!==void 0?Ox(o):()=>{};return _a(e,...i),hu(e,...t,...n),s.nextFrame(()=>{_a(e,...n),hu(e,...r),s.add(Tx(e,l=>(_a(e,...r,...t),hu(e,...i),a(l))))}),s.add(()=>_a(e,...t,...n,...r,...i)),s.add(()=>a("cancelled")),s.dispose}function oi(e=""){return e.split(" ").filter(t=>t.trim().length>1)}let mu=Symbol("TransitionContext");var Px=(e=>(e.Visible="visible",e.Hidden="hidden",e))(Px||{});function Rx(){return Xe(mu,null)!==null}function jx(){let e=Xe(mu,null);if(e===null)throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");return e}function Nx(){let e=Xe(gu,null);if(e===null)throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");return e}let gu=Symbol("NestingContext");function Ma(e){return"children"in e?Ma(e.children):e.value.filter(({state:t})=>t==="visible").length>0}function _m(e){let t=se([]),n=se(!1);Je(()=>n.value=!0),Et(()=>n.value=!1);function r(o,s=mr.Hidden){let a=t.value.findIndex(({id:l})=>l===o);a!==-1&&(ct(s,{[mr.Unmount](){t.value.splice(a,1)},[mr.Hidden](){t.value[a].state="hidden"}}),!Ma(t)&&n.value&&(e==null||e()))}function i(o){let s=t.value.find(({id:a})=>a===o);return s?s.state!=="visible"&&(s.state="visible"):t.value.push({id:o,state:"visible"}),()=>r(o,mr.Unmount)}return{children:t,register:i,unregister:r}}let Mm=In.RenderStrategy,Am=je({props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},entered:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(e,{emit:t,attrs:n,slots:r,expose:i}){let o=se(0);function s(){o.value|=st.Opening,t("beforeEnter")}function a(){o.value&=~st.Opening,t("afterEnter")}function l(){o.value|=st.Closing,t("beforeLeave")}function c(){o.value&=~st.Closing,t("afterLeave")}if(!Rx()&&Lw())return()=>He(Em,Me(J({},e),{onBeforeEnter:s,onAfterEnter:a,onBeforeLeave:l,onAfterLeave:c}),r);let u=se(null),f=X(()=>e.unmount?mr.Unmount:mr.Hidden);i({el:u,$el:u});let{show:h,appear:p}=jx(),{register:g,unregister:v}=Nx(),b=se(h.value?"visible":"hidden"),w={value:!0},k=Ct(),A={value:!1},d=_m(()=>{!A.value&&b.value!=="hidden"&&(b.value="hidden",v(k),c())});Je(()=>{let R=g(k);Et(R)}),xt(()=>{if(f.value===mr.Hidden&&k){if(h.value&&b.value!=="visible"){b.value="visible";return}ct(b.value,{hidden:()=>v(k),visible:()=>g(k)})}});let y=oi(e.enter),m=oi(e.enterFrom),x=oi(e.enterTo),S=oi(e.entered),_=oi(e.leave),C=oi(e.leaveFrom),E=oi(e.leaveTo);Je(()=>{xt(()=>{if(b.value==="visible"){let R=he(u);if(R instanceof Comment&&R.data==="")throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}})});function T(R){let N=w.value&&!p.value,D=he(u);!D||!(D instanceof HTMLElement)||N||(A.value=!0,h.value&&s(),h.value||l(),R(h.value?Cm(D,y,m,x,S,M=>{A.value=!1,M===pu.Finished&&a()}):Cm(D,_,C,E,S,M=>{A.value=!1,M===pu.Finished&&(Ma(d)||(b.value="hidden",v(k),c()))})))}return Je(()=>{Ht([h],(R,N,D)=>{T(D),w.value=!1},{immediate:!0})}),wt(gu,d),Zc(X(()=>ct(b.value,{visible:st.Open,hidden:st.Closed})|o.value)),()=>{let I=e,{appear:R,show:N,enter:D,enterFrom:M,enterTo:P,entered:L,leave:H,leaveFrom:te,leaveTo:q}=I,ae=Ve(I,["appear","show","enter","enterFrom","enterTo","entered","leave","leaveFrom","leaveTo"]),ge={ref:u},_e=J(J({},ae),p.value&&h.value&&Go.isServer?{class:ft([n.class,ae.class,...y,...m])}:{});return Ye({theirProps:_e,ourProps:ge,slot:{},slots:r,attrs:n,features:Mm,visible:b.value==="visible",name:"TransitionChild"})}}}),Lx=Am,Em=je({inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},entered:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(e,{emit:t,attrs:n,slots:r}){let i=Jo(),o=X(()=>e.show===null&&i!==null?(i.value&st.Open)===st.Open:e.show);xt(()=>{if(![!0,!1].includes(o.value))throw new Error('A <Transition /> is used but it is missing a `:show="true | false"` prop.')});let s=se(o.value?"visible":"hidden"),a=_m(()=>{s.value="hidden"}),l=se(!0),c={show:o,appear:X(()=>e.appear||!l.value)};return Je(()=>{xt(()=>{l.value=!1,o.value?s.value="visible":Ma(a)||(s.value="hidden")})}),wt(gu,a),wt(mu,c),()=>{let u=qo(e,["show","appear","unmount","onBeforeEnter","onBeforeLeave","onAfterEnter","onAfterLeave"]),f={unmount:e.unmount};return Ye({ourProps:Me(J({},f),{as:"template"}),theirProps:{},slot:{},slots:Me(J({},r),{default:()=>[He(Lx,J(J(J({onBeforeEnter:()=>t("beforeEnter"),onAfterEnter:()=>t("afterEnter"),onBeforeLeave:()=>t("beforeLeave"),onAfterLeave:()=>t("afterLeave")},n),f),u),r.default)]}),attrs:{},features:Mm,visible:s.value==="visible",name:"Transition"})}}});var Vt="top",dn="bottom",fn="right",Wt="left",yu="auto",ts=[Vt,dn,fn,Wt],Ki="start",ns="end",Dx="clippingParents",Om="viewport",rs="popper",Ix="reference",Tm=ts.reduce(function(e,t){return e.concat([t+"-"+Ki,t+"-"+ns])},[]),Pm=[].concat(ts,[yu]).reduce(function(e,t){return e.concat([t,t+"-"+Ki,t+"-"+ns])},[]),$x="beforeRead",Bx="read",Hx="afterRead",zx="beforeMain",Fx="main",Vx="afterMain",Wx="beforeWrite",Ux="write",Kx="afterWrite",qx=[$x,Bx,Hx,zx,Fx,Vx,Wx,Ux,Kx];function $n(e){return e?(e.nodeName||"").toLowerCase():null}function En(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function qi(e){var t=En(e).Element;return e instanceof t||e instanceof Element}function hn(e){var t=En(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Rm(e){if(typeof ShadowRoot=="undefined")return!1;var t=En(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Jx(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!hn(o)||!$n(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(s){var a=i[s];a===!1?o.removeAttribute(s):o.setAttribute(s,a===!0?"":a)}))})}function Gx(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},s=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),a=s.reduce(function(l,c){return l[c]="",l},{});!hn(i)||!$n(i)||(Object.assign(i.style,a),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}var Yx={name:"applyStyles",enabled:!0,phase:"write",fn:Jx,effect:Gx,requires:["computeStyles"]};function Bn(e){return e.split("-")[0]}var si=Math.max,Aa=Math.min,Ji=Math.round;function Gi(e,t){t===void 0&&(t=!1);var n=e.getBoundingClientRect(),r=1,i=1;if(hn(e)&&t){var o=e.offsetHeight,s=e.offsetWidth;s>0&&(r=Ji(n.width)/s||1),o>0&&(i=Ji(n.height)/o||1)}return{width:n.width/r,height:n.height/i,top:n.top/i,right:n.right/r,bottom:n.bottom/i,left:n.left/r,x:n.left/r,y:n.top/i}}function vu(e){var t=Gi(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function jm(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Rm(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function er(e){return En(e).getComputedStyle(e)}function Xx(e){return["table","td","th"].indexOf($n(e))>=0}function yr(e){return((qi(e)?e.ownerDocument:e.document)||window.document).documentElement}function Ea(e){return $n(e)==="html"?e:e.assignedSlot||e.parentNode||(Rm(e)?e.host:null)||yr(e)}function Nm(e){return!hn(e)||er(e).position==="fixed"?null:e.offsetParent}function Qx(e){var t=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,n=navigator.userAgent.indexOf("Trident")!==-1;if(n&&hn(e)){var r=er(e);if(r.position==="fixed")return null}for(var i=Ea(e);hn(i)&&["html","body"].indexOf($n(i))<0;){var o=er(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function is(e){for(var t=En(e),n=Nm(e);n&&Xx(n)&&er(n).position==="static";)n=Nm(n);return n&&($n(n)==="html"||$n(n)==="body"&&er(n).position==="static")?t:n||Qx(e)||t}function bu(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ss(e,t,n){return si(e,Aa(t,n))}function Zx(e,t,n){var r=ss(e,t,n);return r>n?n:r}function Lm(){return{top:0,right:0,bottom:0,left:0}}function Dm(e){return Object.assign({},Lm(),e)}function Im(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var e3=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,Dm(typeof t!="number"?t:Im(t,ts))};function t3(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,a=Bn(n.placement),l=bu(a),c=[Wt,fn].indexOf(a)>=0,u=c?"height":"width";if(!(!o||!s)){var f=e3(i.padding,n),h=vu(o),p=l==="y"?Vt:Wt,g=l==="y"?dn:fn,v=n.rects.reference[u]+n.rects.reference[l]-s[l]-n.rects.popper[u],b=s[l]-n.rects.reference[l],w=is(o),k=w?l==="y"?w.clientHeight||0:w.clientWidth||0:0,A=v/2-b/2,d=f[p],y=k-h[u]-f[g],m=k/2-h[u]/2+A,x=ss(d,m,y),S=l;n.modifiersData[r]=(t={},t[S]=x,t.centerOffset=x-m,t)}}function n3(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||!jm(t.elements.popper,i)||(t.elements.arrow=i))}var r3={name:"arrow",enabled:!0,phase:"main",fn:t3,effect:n3,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Yi(e){return e.split("-")[1]}var i3={top:"auto",right:"auto",bottom:"auto",left:"auto"};function o3(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:Ji(t*i)/i||0,y:Ji(n*i)/i||0}}function $m(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,s=e.offsets,a=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,f=e.isFixed,h=s.x,p=h===void 0?0:h,g=s.y,v=g===void 0?0:g,b=typeof u=="function"?u({x:p,y:v}):{x:p,y:v};p=b.x,v=b.y;var w=s.hasOwnProperty("x"),k=s.hasOwnProperty("y"),A=Wt,d=Vt,y=window;if(c){var m=is(n),x="clientHeight",S="clientWidth";if(m===En(n)&&(m=yr(n),er(m).position!=="static"&&a==="absolute"&&(x="scrollHeight",S="scrollWidth")),m=m,i===Vt||(i===Wt||i===fn)&&o===ns){d=dn;var _=f&&y.visualViewport?y.visualViewport.height:m[x];v-=_-r.height,v*=l?1:-1}if(i===Wt||(i===Vt||i===dn)&&o===ns){A=fn;var C=f&&y.visualViewport?y.visualViewport.width:m[S];p-=C-r.width,p*=l?1:-1}}var E=Object.assign({position:a},c&&i3),T=u===!0?o3({x:p,y:v}):{x:p,y:v};if(p=T.x,v=T.y,l){var R;return Object.assign({},E,(R={},R[d]=k?"0":"",R[A]=w?"0":"",R.transform=(y.devicePixelRatio||1)<=1?"translate("+p+"px, "+v+"px)":"translate3d("+p+"px, "+v+"px, 0)",R))}return Object.assign({},E,(t={},t[d]=k?v+"px":"",t[A]=w?p+"px":"",t.transform="",t))}function s3(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,s=o===void 0?!0:o,a=n.roundOffsets,l=a===void 0?!0:a,c={placement:Bn(t.placement),variation:Yi(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,$m(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,$m(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var a3={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:s3,data:{}},Oa={passive:!0};function l3(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,s=r.resize,a=s===void 0?!0:s,l=En(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(u){u.addEventListener("scroll",n.update,Oa)}),a&&l.addEventListener("resize",n.update,Oa),function(){o&&c.forEach(function(u){u.removeEventListener("scroll",n.update,Oa)}),a&&l.removeEventListener("resize",n.update,Oa)}}var c3={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:l3,data:{}},u3={left:"right",right:"left",bottom:"top",top:"bottom"};function Ta(e){return e.replace(/left|right|bottom|top/g,function(t){return u3[t]})}var d3={start:"end",end:"start"};function Bm(e){return e.replace(/start|end/g,function(t){return d3[t]})}function wu(e){var t=En(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function xu(e){return Gi(yr(e)).left+wu(e).scrollLeft}function f3(e){var t=En(e),n=yr(e),r=t.visualViewport,i=n.clientWidth,o=n.clientHeight,s=0,a=0;return r&&(i=r.width,o=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(s=r.offsetLeft,a=r.offsetTop)),{width:i,height:o,x:s+xu(e),y:a}}function h3(e){var t,n=yr(e),r=wu(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=si(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=si(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+xu(e),l=-r.scrollTop;return er(i||n).direction==="rtl"&&(a+=si(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}function ku(e){var t=er(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function Hm(e){return["html","body","#document"].indexOf($n(e))>=0?e.ownerDocument.body:hn(e)&&ku(e)?e:Hm(Ea(e))}function as(e,t){var n;t===void 0&&(t=[]);var r=Hm(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=En(r),s=i?[o].concat(o.visualViewport||[],ku(r)?r:[]):r,a=t.concat(s);return i?a:a.concat(as(Ea(s)))}function Su(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function p3(e){var t=Gi(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}function zm(e,t){return t===Om?Su(f3(e)):qi(t)?p3(t):Su(h3(yr(e)))}function m3(e){var t=as(Ea(e)),n=["absolute","fixed"].indexOf(er(e).position)>=0,r=n&&hn(e)?is(e):e;return qi(r)?t.filter(function(i){return qi(i)&&jm(i,r)&&$n(i)!=="body"}):[]}function g3(e,t,n){var r=t==="clippingParents"?m3(e):[].concat(t),i=[].concat(r,[n]),o=i[0],s=i.reduce(function(a,l){var c=zm(e,l);return a.top=si(c.top,a.top),a.right=Aa(c.right,a.right),a.bottom=Aa(c.bottom,a.bottom),a.left=si(c.left,a.left),a},zm(e,o));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Fm(e){var t=e.reference,n=e.element,r=e.placement,i=r?Bn(r):null,o=r?Yi(r):null,s=t.x+t.width/2-n.width/2,a=t.y+t.height/2-n.height/2,l;switch(i){case Vt:l={x:s,y:t.y-n.height};break;case dn:l={x:s,y:t.y+t.height};break;case fn:l={x:t.x+t.width,y:a};break;case Wt:l={x:t.x-n.width,y:a};break;default:l={x:t.x,y:t.y}}var c=i?bu(i):null;if(c!=null){var u=c==="y"?"height":"width";switch(o){case Ki:l[c]=l[c]-(t[u]/2-n[u]/2);break;case ns:l[c]=l[c]+(t[u]/2-n[u]/2);break}}return l}function ls(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.boundary,s=o===void 0?Dx:o,a=n.rootBoundary,l=a===void 0?Om:a,c=n.elementContext,u=c===void 0?rs:c,f=n.altBoundary,h=f===void 0?!1:f,p=n.padding,g=p===void 0?0:p,v=Dm(typeof g!="number"?g:Im(g,ts)),b=u===rs?Ix:rs,w=e.rects.popper,k=e.elements[h?b:u],A=g3(qi(k)?k:k.contextElement||yr(e.elements.popper),s,l),d=Gi(e.elements.reference),y=Fm({reference:d,element:w,strategy:"absolute",placement:i}),m=Su(Object.assign({},w,y)),x=u===rs?m:d,S={top:A.top-x.top+v.top,bottom:x.bottom-A.bottom+v.bottom,left:A.left-x.left+v.left,right:x.right-A.right+v.right},_=e.modifiersData.offset;if(u===rs&&_){var C=_[i];Object.keys(S).forEach(function(E){var T=[fn,dn].indexOf(E)>=0?1:-1,R=[Vt,dn].indexOf(E)>=0?"y":"x";S[E]+=C[R]*T})}return S}function y3(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?Pm:l,u=Yi(r),f=u?a?Tm:Tm.filter(function(g){return Yi(g)===u}):ts,h=f.filter(function(g){return c.indexOf(g)>=0});h.length===0&&(h=f);var p=h.reduce(function(g,v){return g[v]=ls(e,{placement:v,boundary:i,rootBoundary:o,padding:s})[Bn(v)],g},{});return Object.keys(p).sort(function(g,v){return p[g]-p[v]})}function v3(e){if(Bn(e)===yu)return[];var t=Ta(e);return[Bm(e),t,Bm(t)]}function b3(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,a=s===void 0?!0:s,l=n.fallbackPlacements,c=n.padding,u=n.boundary,f=n.rootBoundary,h=n.altBoundary,p=n.flipVariations,g=p===void 0?!0:p,v=n.allowedAutoPlacements,b=t.options.placement,w=Bn(b),k=w===b,A=l||(k||!g?[Ta(b)]:v3(b)),d=[b].concat(A).reduce(function(_e,I){return _e.concat(Bn(I)===yu?y3(t,{placement:I,boundary:u,rootBoundary:f,padding:c,flipVariations:g,allowedAutoPlacements:v}):I)},[]),y=t.rects.reference,m=t.rects.popper,x=new Map,S=!0,_=d[0],C=0;C<d.length;C++){var E=d[C],T=Bn(E),R=Yi(E)===Ki,N=[Vt,dn].indexOf(T)>=0,D=N?"width":"height",M=ls(t,{placement:E,boundary:u,rootBoundary:f,altBoundary:h,padding:c}),P=N?R?fn:Wt:R?dn:Vt;y[D]>m[D]&&(P=Ta(P));var L=Ta(P),H=[];if(o&&H.push(M[T]<=0),a&&H.push(M[P]<=0,M[L]<=0),H.every(function(_e){return _e})){_=E,S=!1;break}x.set(E,H)}if(S)for(var te=g?3:1,q=function(I){var Y=d.find(function(V){var ee=x.get(V);if(ee)return ee.slice(0,I).every(function(Ae){return Ae})});if(Y)return _=Y,"break"},ae=te;ae>0;ae--){var ge=q(ae);if(ge==="break")break}t.placement!==_&&(t.modifiersData[r]._skip=!0,t.placement=_,t.reset=!0)}}var w3={name:"flip",enabled:!0,phase:"main",fn:b3,requiresIfExists:["offset"],data:{_skip:!1}};function Vm(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Wm(e){return[Vt,fn,dn,Wt].some(function(t){return e[t]>=0})}function x3(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,s=ls(t,{elementContext:"reference"}),a=ls(t,{altBoundary:!0}),l=Vm(s,r),c=Vm(a,i,o),u=Wm(l),f=Wm(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":f})}var k3={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:x3};function S3(e,t,n){var r=Bn(e),i=[Wt,Vt].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,s=o[0],a=o[1];return s=s||0,a=(a||0)*i,[Wt,fn].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}function C3(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,s=Pm.reduce(function(u,f){return u[f]=S3(f,t.rects,o),u},{}),a=s[t.placement],l=a.x,c=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=s}var _3={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:C3};function M3(e){var t=e.state,n=e.name;t.modifiersData[n]=Fm({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var A3={name:"popperOffsets",enabled:!0,phase:"read",fn:M3,data:{}};function E3(e){return e==="x"?"y":"x"}function O3(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,a=s===void 0?!1:s,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,f=n.padding,h=n.tether,p=h===void 0?!0:h,g=n.tetherOffset,v=g===void 0?0:g,b=ls(t,{boundary:l,rootBoundary:c,padding:f,altBoundary:u}),w=Bn(t.placement),k=Yi(t.placement),A=!k,d=bu(w),y=E3(d),m=t.modifiersData.popperOffsets,x=t.rects.reference,S=t.rects.popper,_=typeof v=="function"?v(Object.assign({},t.rects,{placement:t.placement})):v,C=typeof _=="number"?{mainAxis:_,altAxis:_}:Object.assign({mainAxis:0,altAxis:0},_),E=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,T={x:0,y:0};if(!!m){if(o){var R,N=d==="y"?Vt:Wt,D=d==="y"?dn:fn,M=d==="y"?"height":"width",P=m[d],L=P+b[N],H=P-b[D],te=p?-S[M]/2:0,q=k===Ki?x[M]:S[M],ae=k===Ki?-S[M]:-x[M],ge=t.elements.arrow,_e=p&&ge?vu(ge):{width:0,height:0},I=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Lm(),Y=I[N],V=I[D],ee=ss(0,x[M],_e[M]),Ae=A?x[M]/2-te-ee-Y-C.mainAxis:q-ee-Y-C.mainAxis,Ee=A?-x[M]/2+te+ee+V+C.mainAxis:ae+ee+V+C.mainAxis,we=t.elements.arrow&&is(t.elements.arrow),xe=we?d==="y"?we.clientTop||0:we.clientLeft||0:0,O=(R=E==null?void 0:E[d])!=null?R:0,j=P+Ae-O-xe,$=P+Ee-O,F=ss(p?Aa(L,j):L,P,p?si(H,$):H);m[d]=F,T[d]=F-P}if(a){var z,Q=d==="x"?Vt:Wt,ne=d==="x"?dn:fn,W=m[y],G=y==="y"?"height":"width",U=W+b[Q],le=W-b[ne],oe=[Vt,Wt].indexOf(w)!==-1,de=(z=E==null?void 0:E[y])!=null?z:0,ye=oe?U:W-x[G]-S[G]-de+C.altAxis,Oe=oe?W+x[G]+S[G]-de-C.altAxis:le,$e=p&&oe?Zx(ye,W,Oe):ss(p?ye:U,W,p?Oe:le);m[y]=$e,T[y]=$e-W}t.modifiersData[r]=T}}var T3={name:"preventOverflow",enabled:!0,phase:"main",fn:O3,requiresIfExists:["offset"]};function P3(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function R3(e){return e===En(e)||!hn(e)?wu(e):P3(e)}function j3(e){var t=e.getBoundingClientRect(),n=Ji(t.width)/e.offsetWidth||1,r=Ji(t.height)/e.offsetHeight||1;return n!==1||r!==1}function N3(e,t,n){n===void 0&&(n=!1);var r=hn(t),i=hn(t)&&j3(t),o=yr(t),s=Gi(e,i),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&(($n(t)!=="body"||ku(o))&&(a=R3(t)),hn(t)?(l=Gi(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=xu(o))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function L3(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var s=[].concat(o.requires||[],o.requiresIfExists||[]);s.forEach(function(a){if(!n.has(a)){var l=t.get(a);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function D3(e){var t=L3(e);return qx.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function I3(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function $3(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var Um={placement:"bottom",modifiers:[],strategy:"absolute"};function Km(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function B3(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,o=i===void 0?Um:i;return function(a,l,c){c===void 0&&(c=o);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},Um,o),modifiersData:{},elements:{reference:a,popper:l},attributes:{},styles:{}},f=[],h=!1,p={state:u,setOptions:function(w){var k=typeof w=="function"?w(u.options):w;v(),u.options=Object.assign({},o,u.options,k),u.scrollParents={reference:qi(a)?as(a):a.contextElement?as(a.contextElement):[],popper:as(l)};var A=D3($3([].concat(r,u.options.modifiers)));return u.orderedModifiers=A.filter(function(d){return d.enabled}),g(),p.update()},forceUpdate:function(){if(!h){var w=u.elements,k=w.reference,A=w.popper;if(!!Km(k,A)){u.rects={reference:N3(k,is(A),u.options.strategy==="fixed"),popper:vu(A)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(C){return u.modifiersData[C.name]=Object.assign({},C.data)});for(var d=0;d<u.orderedModifiers.length;d++){if(u.reset===!0){u.reset=!1,d=-1;continue}var y=u.orderedModifiers[d],m=y.fn,x=y.options,S=x===void 0?{}:x,_=y.name;typeof m=="function"&&(u=m({state:u,options:S,name:_,instance:p})||u)}}}},update:I3(function(){return new Promise(function(b){p.forceUpdate(),b(u)})}),destroy:function(){v(),h=!0}};if(!Km(a,l))return p;p.setOptions(c).then(function(b){!h&&c.onFirstUpdate&&c.onFirstUpdate(b)});function g(){u.orderedModifiers.forEach(function(b){var w=b.name,k=b.options,A=k===void 0?{}:k,d=b.effect;if(typeof d=="function"){var y=d({state:u,name:w,instance:p,options:A}),m=function(){};f.push(y||m)}})}function v(){f.forEach(function(b){return b()}),f=[]}return p}}var H3=[c3,A3,a3,Yx,_3,w3,T3,r3,k3],z3=B3({defaultModifiers:H3});const F3={name:"Popover",inheritAttrs:!1,props:{show:{default:void 0},trigger:{type:String,default:"click"},hoverDelay:{type:Number,default:0},leaveDelay:{type:Number,default:0},placement:{type:String,default:"bottom-start"},popoverClass:[String,Object,Array],transition:{default:null},hideOnBlur:{default:!0}},emits:["open","close","update:show"],expose:["open","close"],data(){return{showPopup:!1,targetWidth:null,pointerOverTargetOrPopup:!1}},watch:{show(e){e?this.open():this.close()}},created(){if(typeof window!="undefined"&&!document.getElementById("frappeui-popper-root")){const e=document.createElement("div");e.id="frappeui-popper-root",document.body.appendChild(e)}},mounted(){this.listener=e=>{[this.$refs.reference,this.$refs.popover].some(r=>r&&(e.target===r||r.contains(e.target)))||this.close()},this.hideOnBlur&&document.addEventListener("click",this.listener),this.$nextTick(()=>{this.targetWidth=this.$refs.target.clientWidth})},beforeDestroy(){this.popper&&this.popper.destroy(),document.removeEventListener("click",this.listener)},computed:{showPropPassed(){return this.show!=null},isOpen:{get(){return this.showPropPassed?this.show:this.showPopup},set(e){e=Boolean(e),this.showPropPassed?this.$emit("update:show",e):this.showPopup=e,e===!1?this.$emit("close"):e===!0&&this.$emit("open")}},popupTransition(){let e={default:{enterActiveClass:"transition duration-150 ease-out",enterFromClass:"translate-y-1 opacity-0",enterToClass:"translate-y-0 opacity-100",leaveActiveClass:"transition duration-150 ease-in",leaveFromClass:"translate-y-0 opacity-100",leaveToClass:"translate-y-1 opacity-0"}};return typeof this.transition=="string"?e[this.transition]:this.transition}},methods:{setupPopper(){this.popper?this.updatePosition():this.popper=z3(this.$refs.reference,this.$refs.popover,{placement:this.placement})},updatePosition(){this.popper&&this.popper.update()},togglePopover(e){e instanceof Event&&(e=null),e==null&&(e=!this.isOpen),e=Boolean(e),e?this.open():this.close()},open(){this.isOpen=!0,this.$nextTick(()=>this.setupPopper())},close(){this.isOpen=!1},onMouseover(){this.pointerOverTargetOrPopup=!0,this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.trigger==="hover"&&(this.hoverDelay?this.hoverTimer=setTimeout(()=>{this.pointerOverTargetOrPopup&&this.open()},Number(this.hoverDelay)*1e3):this.open())},onMouseleave(e){this.pointerOverTargetOrPopup=!1,this.hoverTimer&&(clearTimeout(this.hoverTimer),this.hoverTimer=null),this.trigger==="hover"&&(this.leaveTimer&&clearTimeout(this.leaveTimer),this.leaveDelay?this.leaveTimer=setTimeout(()=>{this.pointerOverTargetOrPopup||this.close()},Number(this.leaveDelay)*1e3):this.pointerOverTargetOrPopup||this.close())}}},V3={ref:"reference"},W3={class:"rounded-lg border border-gray-100 bg-white shadow-xl"};function U3(e,t,n,r,i,o){return ue(),ve("div",V3,[ie("div",{ref:"target",class:ft(["flex",e.$attrs.class]),onClick:t[0]||(t[0]=(...s)=>o.updatePosition&&o.updatePosition(...s)),onFocusin:t[1]||(t[1]=(...s)=>o.updatePosition&&o.updatePosition(...s)),onKeydown:t[2]||(t[2]=(...s)=>o.updatePosition&&o.updatePosition(...s)),onMouseover:t[3]||(t[3]=(...s)=>o.onMouseover&&o.onMouseover(...s)),onMouseleave:t[4]||(t[4]=(...s)=>o.onMouseleave&&o.onMouseleave(...s))},[St(e.$slots,"target",Ai(Gr({togglePopover:o.togglePopover,updatePosition:o.updatePosition,open:o.open,close:o.close,isOpen:o.isOpen})))],34),(ue(),An(jc,{to:"#frappeui-popper-root"},[ie("div",{ref:"popover",class:ft([n.popoverClass,"popover-container relative z-[100]"]),style:Mo({minWidth:i.targetWidth?i.targetWidth+"px":null}),onMouseover:t[5]||(t[5]=s=>i.pointerOverTargetOrPopup=!0),onMouseleave:t[6]||(t[6]=(...s)=>o.onMouseleave&&o.onMouseleave(...s))},[We(Vc,Ai(Gr(o.popupTransition)),{default:ln(()=>[A2(ie("div",null,[St(e.$slots,"body",Ai(Gr({togglePopover:o.togglePopover,updatePosition:o.updatePosition,open:o.open,close:o.close,isOpen:o.isOpen})),()=>[ie("div",W3,[St(e.$slots,"body-main",Ai(Gr({togglePopover:o.togglePopover,updatePosition:o.updatePosition,open:o.open,close:o.close,isOpen:o.isOpen})))])])],512),[[Cb,o.isOpen]])]),_:3},16)],38)]))],512)}var K3=Ie(F3,[["render",U3]]),qm=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function q3(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Jm={exports:{}};(function(e,t){(function(r,i){e.exports=i()})(typeof self!="undefined"?self:qm,function(){return function(n){var r={};function i(o){if(r[o])return r[o].exports;var s=r[o]={i:o,l:!1,exports:{}};return n[o].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=n,i.c=r,i.d=function(o,s,a){i.o(o,s)||Object.defineProperty(o,s,{configurable:!1,enumerable:!0,get:a})},i.r=function(o){Object.defineProperty(o,"__esModule",{value:!0})},i.n=function(o){var s=o&&o.__esModule?function(){return o.default}:function(){return o};return i.d(s,"a",s),s},i.o=function(o,s){return Object.prototype.hasOwnProperty.call(o,s)},i.p="",i(i.s=0)}({"./dist/icons.json":function(n){n.exports={activity:'<polyline points="22 12 18 12 15 21 9 3 6 12 2 12"></polyline>',airplay:'<path d="M5 17H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-1"></path><polygon points="12 15 17 21 7 21 12 15"></polygon>',"alert-circle":'<circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line>',"alert-octagon":'<polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"></polygon><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line>',"alert-triangle":'<path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path><line x1="12" y1="9" x2="12" y2="13"></line><line x1="12" y1="17" x2="12.01" y2="17"></line>',"align-center":'<line x1="18" y1="10" x2="6" y2="10"></line><line x1="21" y1="6" x2="3" y2="6"></line><line x1="21" y1="14" x2="3" y2="14"></line><line x1="18" y1="18" x2="6" y2="18"></line>',"align-justify":'<line x1="21" y1="10" x2="3" y2="10"></line><line x1="21" y1="6" x2="3" y2="6"></line><line x1="21" y1="14" x2="3" y2="14"></line><line x1="21" y1="18" x2="3" y2="18"></line>',"align-left":'<line x1="17" y1="10" x2="3" y2="10"></line><line x1="21" y1="6" x2="3" y2="6"></line><line x1="21" y1="14" x2="3" y2="14"></line><line x1="17" y1="18" x2="3" y2="18"></line>',"align-right":'<line x1="21" y1="10" x2="7" y2="10"></line><line x1="21" y1="6" x2="3" y2="6"></line><line x1="21" y1="14" x2="3" y2="14"></line><line x1="21" y1="18" x2="7" y2="18"></line>',anchor:'<circle cx="12" cy="5" r="3"></circle><line x1="12" y1="22" x2="12" y2="8"></line><path d="M5 12H2a10 10 0 0 0 20 0h-3"></path>',aperture:'<circle cx="12" cy="12" r="10"></circle><line x1="14.31" y1="8" x2="20.05" y2="17.94"></line><line x1="9.69" y1="8" x2="21.17" y2="8"></line><line x1="7.38" y1="12" x2="13.12" y2="2.06"></line><line x1="9.69" y1="16" x2="3.95" y2="6.06"></line><line x1="14.31" y1="16" x2="2.83" y2="16"></line><line x1="16.62" y1="12" x2="10.88" y2="21.94"></line>',archive:'<polyline points="21 8 21 21 3 21 3 8"></polyline><rect x="1" y="3" width="22" height="5"></rect><line x1="10" y1="12" x2="14" y2="12"></line>',"arrow-down-circle":'<circle cx="12" cy="12" r="10"></circle><polyline points="8 12 12 16 16 12"></polyline><line x1="12" y1="8" x2="12" y2="16"></line>',"arrow-down-left":'<line x1="17" y1="7" x2="7" y2="17"></line><polyline points="17 17 7 17 7 7"></polyline>',"arrow-down-right":'<line x1="7" y1="7" x2="17" y2="17"></line><polyline points="17 7 17 17 7 17"></polyline>',"arrow-down":'<line x1="12" y1="5" x2="12" y2="19"></line><polyline points="19 12 12 19 5 12"></polyline>',"arrow-left-circle":'<circle cx="12" cy="12" r="10"></circle><polyline points="12 8 8 12 12 16"></polyline><line x1="16" y1="12" x2="8" y2="12"></line>',"arrow-left":'<line x1="19" y1="12" x2="5" y2="12"></line><polyline points="12 19 5 12 12 5"></polyline>',"arrow-right-circle":'<circle cx="12" cy="12" r="10"></circle><polyline points="12 16 16 12 12 8"></polyline><line x1="8" y1="12" x2="16" y2="12"></line>',"arrow-right":'<line x1="5" y1="12" x2="19" y2="12"></line><polyline points="12 5 19 12 12 19"></polyline>',"arrow-up-circle":'<circle cx="12" cy="12" r="10"></circle><polyline points="16 12 12 8 8 12"></polyline><line x1="12" y1="16" x2="12" y2="8"></line>',"arrow-up-left":'<line x1="17" y1="17" x2="7" y2="7"></line><polyline points="7 17 7 7 17 7"></polyline>',"arrow-up-right":'<line x1="7" y1="17" x2="17" y2="7"></line><polyline points="7 7 17 7 17 17"></polyline>',"arrow-up":'<line x1="12" y1="19" x2="12" y2="5"></line><polyline points="5 12 12 5 19 12"></polyline>',"at-sign":'<circle cx="12" cy="12" r="4"></circle><path d="M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-3.92 7.94"></path>',award:'<circle cx="12" cy="8" r="7"></circle><polyline points="8.21 13.89 7 23 12 20 17 23 15.79 13.88"></polyline>',"bar-chart-2":'<line x1="18" y1="20" x2="18" y2="10"></line><line x1="12" y1="20" x2="12" y2="4"></line><line x1="6" y1="20" x2="6" y2="14"></line>',"bar-chart":'<line x1="12" y1="20" x2="12" y2="10"></line><line x1="18" y1="20" x2="18" y2="4"></line><line x1="6" y1="20" x2="6" y2="16"></line>',"battery-charging":'<path d="M5 18H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h3.19M15 6h2a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-3.19"></path><line x1="23" y1="13" x2="23" y2="11"></line><polyline points="11 6 7 12 13 12 9 18"></polyline>',battery:'<rect x="1" y="6" width="18" height="12" rx="2" ry="2"></rect><line x1="23" y1="13" x2="23" y2="11"></line>',"bell-off":'<path d="M13.73 21a2 2 0 0 1-3.46 0"></path><path d="M18.63 13A17.89 17.89 0 0 1 18 8"></path><path d="M6.26 6.26A5.86 5.86 0 0 0 6 8c0 7-3 9-3 9h14"></path><path d="M18 8a6 6 0 0 0-9.33-5"></path><line x1="1" y1="1" x2="23" y2="23"></line>',bell:'<path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"></path><path d="M13.73 21a2 2 0 0 1-3.46 0"></path>',bluetooth:'<polyline points="6.5 6.5 17.5 17.5 12 23 12 1 17.5 6.5 6.5 17.5"></polyline>',bold:'<path d="M6 4h8a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"></path><path d="M6 12h9a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"></path>',"book-open":'<path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"></path><path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"></path>',book:'<path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20"></path><path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"></path>',bookmark:'<path d="M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"></path>',box:'<path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path><polyline points="3.27 6.96 12 12.01 20.73 6.96"></polyline><line x1="12" y1="22.08" x2="12" y2="12"></line>',briefcase:'<rect x="2" y="7" width="20" height="14" rx="2" ry="2"></rect><path d="M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16"></path>',calendar:'<rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line>',"camera-off":'<line x1="1" y1="1" x2="23" y2="23"></line><path d="M21 21H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h3m3-3h6l2 3h4a2 2 0 0 1 2 2v9.34m-7.72-2.06a4 4 0 1 1-5.56-5.56"></path>',camera:'<path d="M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"></path><circle cx="12" cy="13" r="4"></circle>',cast:'<path d="M2 16.1A5 5 0 0 1 5.9 20M2 12.05A9 9 0 0 1 9.95 20M2 8V6a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-6"></path><line x1="2" y1="20" x2="2.01" y2="20"></line>',"check-circle":'<path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path><polyline points="22 4 12 14.01 9 11.01"></polyline>',"check-square":'<polyline points="9 11 12 14 22 4"></polyline><path d="M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"></path>',check:'<polyline points="20 6 9 17 4 12"></polyline>',"chevron-down":'<polyline points="6 9 12 15 18 9"></polyline>',"chevron-left":'<polyline points="15 18 9 12 15 6"></polyline>',"chevron-right":'<polyline points="9 18 15 12 9 6"></polyline>',"chevron-up":'<polyline points="18 15 12 9 6 15"></polyline>',"chevrons-down":'<polyline points="7 13 12 18 17 13"></polyline><polyline points="7 6 12 11 17 6"></polyline>',"chevrons-left":'<polyline points="11 17 6 12 11 7"></polyline><polyline points="18 17 13 12 18 7"></polyline>',"chevrons-right":'<polyline points="13 17 18 12 13 7"></polyline><polyline points="6 17 11 12 6 7"></polyline>',"chevrons-up":'<polyline points="17 11 12 6 7 11"></polyline><polyline points="17 18 12 13 7 18"></polyline>',chrome:'<circle cx="12" cy="12" r="10"></circle><circle cx="12" cy="12" r="4"></circle><line x1="21.17" y1="8" x2="12" y2="8"></line><line x1="3.95" y1="6.06" x2="8.54" y2="14"></line><line x1="10.88" y1="21.94" x2="15.46" y2="14"></line>',circle:'<circle cx="12" cy="12" r="10"></circle>',clipboard:'<path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"></path><rect x="8" y="2" width="8" height="4" rx="1" ry="1"></rect>',clock:'<circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline>',"cloud-drizzle":'<line x1="8" y1="19" x2="8" y2="21"></line><line x1="8" y1="13" x2="8" y2="15"></line><line x1="16" y1="19" x2="16" y2="21"></line><line x1="16" y1="13" x2="16" y2="15"></line><line x1="12" y1="21" x2="12" y2="23"></line><line x1="12" y1="15" x2="12" y2="17"></line><path d="M20 16.58A5 5 0 0 0 18 7h-1.26A8 8 0 1 0 4 15.25"></path>',"cloud-lightning":'<path d="M19 16.9A5 5 0 0 0 18 7h-1.26a8 8 0 1 0-11.62 9"></path><polyline points="13 11 9 17 15 17 11 23"></polyline>',"cloud-off":'<path d="M22.61 16.95A5 5 0 0 0 18 10h-1.26a8 8 0 0 0-7.05-6M5 5a8 8 0 0 0 4 15h9a5 5 0 0 0 1.7-.3"></path><line x1="1" y1="1" x2="23" y2="23"></line>',"cloud-rain":'<line x1="16" y1="13" x2="16" y2="21"></line><line x1="8" y1="13" x2="8" y2="21"></line><line x1="12" y1="15" x2="12" y2="23"></line><path d="M20 16.58A5 5 0 0 0 18 7h-1.26A8 8 0 1 0 4 15.25"></path>',"cloud-snow":'<path d="M20 17.58A5 5 0 0 0 18 8h-1.26A8 8 0 1 0 4 16.25"></path><line x1="8" y1="16" x2="8.01" y2="16"></line><line x1="8" y1="20" x2="8.01" y2="20"></line><line x1="12" y1="18" x2="12.01" y2="18"></line><line x1="12" y1="22" x2="12.01" y2="22"></line><line x1="16" y1="16" x2="16.01" y2="16"></line><line x1="16" y1="20" x2="16.01" y2="20"></line>',cloud:'<path d="M18 10h-1.26A8 8 0 1 0 9 20h9a5 5 0 0 0 0-10z"></path>',code:'<polyline points="16 18 22 12 16 6"></polyline><polyline points="8 6 2 12 8 18"></polyline>',codepen:'<polygon points="12 2 22 8.5 22 15.5 12 22 2 15.5 2 8.5 12 2"></polygon><line x1="12" y1="22" x2="12" y2="15.5"></line><polyline points="22 8.5 12 15.5 2 8.5"></polyline><polyline points="2 15.5 12 8.5 22 15.5"></polyline><line x1="12" y1="2" x2="12" y2="8.5"></line>',codesandbox:'<path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path><polyline points="7.5 4.21 12 6.81 16.5 4.21"></polyline><polyline points="7.5 19.79 7.5 14.6 3 12"></polyline><polyline points="21 12 16.5 14.6 16.5 19.79"></polyline><polyline points="3.27 6.96 12 12.01 20.73 6.96"></polyline><line x1="12" y1="22.08" x2="12" y2="12"></line>',coffee:'<path d="M18 8h1a4 4 0 0 1 0 8h-1"></path><path d="M2 8h16v9a4 4 0 0 1-4 4H6a4 4 0 0 1-4-4V8z"></path><line x1="6" y1="1" x2="6" y2="4"></line><line x1="10" y1="1" x2="10" y2="4"></line><line x1="14" y1="1" x2="14" y2="4"></line>',columns:'<path d="M12 3h7a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-7m0-18H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h7m0-18v18"></path>',command:'<path d="M18 3a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3 3 3 0 0 0 3-3 3 3 0 0 0-3-3H6a3 3 0 0 0-3 3 3 3 0 0 0 3 3 3 3 0 0 0 3-3V6a3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3h12a3 3 0 0 0 3-3 3 3 0 0 0-3-3z"></path>',compass:'<circle cx="12" cy="12" r="10"></circle><polygon points="16.24 7.76 14.12 14.12 7.76 16.24 9.88 9.88 16.24 7.76"></polygon>',copy:'<rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>',"corner-down-left":'<polyline points="9 10 4 15 9 20"></polyline><path d="M20 4v7a4 4 0 0 1-4 4H4"></path>',"corner-down-right":'<polyline points="15 10 20 15 15 20"></polyline><path d="M4 4v7a4 4 0 0 0 4 4h12"></path>',"corner-left-down":'<polyline points="14 15 9 20 4 15"></polyline><path d="M20 4h-7a4 4 0 0 0-4 4v12"></path>',"corner-left-up":'<polyline points="14 9 9 4 4 9"></polyline><path d="M20 20h-7a4 4 0 0 1-4-4V4"></path>',"corner-right-down":'<polyline points="10 15 15 20 20 15"></polyline><path d="M4 4h7a4 4 0 0 1 4 4v12"></path>',"corner-right-up":'<polyline points="10 9 15 4 20 9"></polyline><path d="M4 20h7a4 4 0 0 0 4-4V4"></path>',"corner-up-left":'<polyline points="9 14 4 9 9 4"></polyline><path d="M20 20v-7a4 4 0 0 0-4-4H4"></path>',"corner-up-right":'<polyline points="15 14 20 9 15 4"></polyline><path d="M4 20v-7a4 4 0 0 1 4-4h12"></path>',cpu:'<rect x="4" y="4" width="16" height="16" rx="2" ry="2"></rect><rect x="9" y="9" width="6" height="6"></rect><line x1="9" y1="1" x2="9" y2="4"></line><line x1="15" y1="1" x2="15" y2="4"></line><line x1="9" y1="20" x2="9" y2="23"></line><line x1="15" y1="20" x2="15" y2="23"></line><line x1="20" y1="9" x2="23" y2="9"></line><line x1="20" y1="14" x2="23" y2="14"></line><line x1="1" y1="9" x2="4" y2="9"></line><line x1="1" y1="14" x2="4" y2="14"></line>',"credit-card":'<rect x="1" y="4" width="22" height="16" rx="2" ry="2"></rect><line x1="1" y1="10" x2="23" y2="10"></line>',crop:'<path d="M6.13 1L6 16a2 2 0 0 0 2 2h15"></path><path d="M1 6.13L16 6a2 2 0 0 1 2 2v15"></path>',crosshair:'<circle cx="12" cy="12" r="10"></circle><line x1="22" y1="12" x2="18" y2="12"></line><line x1="6" y1="12" x2="2" y2="12"></line><line x1="12" y1="6" x2="12" y2="2"></line><line x1="12" y1="22" x2="12" y2="18"></line>',database:'<ellipse cx="12" cy="5" rx="9" ry="3"></ellipse><path d="M21 12c0 1.66-4 3-9 3s-9-1.34-9-3"></path><path d="M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5"></path>',delete:'<path d="M21 4H8l-7 8 7 8h13a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z"></path><line x1="18" y1="9" x2="12" y2="15"></line><line x1="12" y1="9" x2="18" y2="15"></line>',disc:'<circle cx="12" cy="12" r="10"></circle><circle cx="12" cy="12" r="3"></circle>',"divide-circle":'<line x1="8" y1="12" x2="16" y2="12"></line><line x1="12" y1="16" x2="12" y2="16"></line><line x1="12" y1="8" x2="12" y2="8"></line><circle cx="12" cy="12" r="10"></circle>',"divide-square":'<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="8" y1="12" x2="16" y2="12"></line><line x1="12" y1="16" x2="12" y2="16"></line><line x1="12" y1="8" x2="12" y2="8"></line>',divide:'<circle cx="12" cy="6" r="2"></circle><line x1="5" y1="12" x2="19" y2="12"></line><circle cx="12" cy="18" r="2"></circle>',"dollar-sign":'<line x1="12" y1="1" x2="12" y2="23"></line><path d="M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6"></path>',"download-cloud":'<polyline points="8 17 12 21 16 17"></polyline><line x1="12" y1="12" x2="12" y2="21"></line><path d="M20.88 18.09A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.29"></path>',download:'<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line>',dribbble:'<circle cx="12" cy="12" r="10"></circle><path d="M8.56 2.75c4.37 6.03 6.02 9.42 8.03 17.72m2.54-15.38c-3.72 4.35-8.94 5.66-16.88 5.85m19.5 1.9c-3.5-.93-6.63-.82-8.94 0-2.58.92-5.01 2.86-7.44 6.32"></path>',droplet:'<path d="M12 2.69l5.66 5.66a8 8 0 1 1-11.31 0z"></path>',"edit-2":'<path d="M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"></path>',"edit-3":'<path d="M12 20h9"></path><path d="M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"></path>',edit:'<path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"></path><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"></path>',"external-link":'<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line>',"eye-off":'<path d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"></path><line x1="1" y1="1" x2="23" y2="23"></line>',eye:'<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path><circle cx="12" cy="12" r="3"></circle>',facebook:'<path d="M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z"></path>',"fast-forward":'<polygon points="13 19 22 12 13 5 13 19"></polygon><polygon points="2 19 11 12 2 5 2 19"></polygon>',feather:'<path d="M20.24 12.24a6 6 0 0 0-8.49-8.49L5 10.5V19h8.5z"></path><line x1="16" y1="8" x2="2" y2="22"></line><line x1="17.5" y1="15" x2="9" y2="15"></line>',figma:'<path d="M5 5.5A3.5 3.5 0 0 1 8.5 2H12v7H8.5A3.5 3.5 0 0 1 5 5.5z"></path><path d="M12 2h3.5a3.5 3.5 0 1 1 0 7H12V2z"></path><path d="M12 12.5a3.5 3.5 0 1 1 7 0 3.5 3.5 0 1 1-7 0z"></path><path d="M5 19.5A3.5 3.5 0 0 1 8.5 16H12v3.5a3.5 3.5 0 1 1-7 0z"></path><path d="M5 12.5A3.5 3.5 0 0 1 8.5 9H12v7H8.5A3.5 3.5 0 0 1 5 12.5z"></path>',"file-minus":'<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="9" y1="15" x2="15" y2="15"></line>',"file-plus":'<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="12" y1="18" x2="12" y2="12"></line><line x1="9" y1="15" x2="15" y2="15"></line>',"file-text":'<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="16" y1="13" x2="8" y2="13"></line><line x1="16" y1="17" x2="8" y2="17"></line><polyline points="10 9 9 9 8 9"></polyline>',file:'<path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"></path><polyline points="13 2 13 9 20 9"></polyline>',film:'<rect x="2" y="2" width="20" height="20" rx="2.18" ry="2.18"></rect><line x1="7" y1="2" x2="7" y2="22"></line><line x1="17" y1="2" x2="17" y2="22"></line><line x1="2" y1="12" x2="22" y2="12"></line><line x1="2" y1="7" x2="7" y2="7"></line><line x1="2" y1="17" x2="7" y2="17"></line><line x1="17" y1="17" x2="22" y2="17"></line><line x1="17" y1="7" x2="22" y2="7"></line>',filter:'<polygon points="22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3"></polygon>',flag:'<path d="M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z"></path><line x1="4" y1="22" x2="4" y2="15"></line>',"folder-minus":'<path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path><line x1="9" y1="14" x2="15" y2="14"></line>',"folder-plus":'<path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path><line x1="12" y1="11" x2="12" y2="17"></line><line x1="9" y1="14" x2="15" y2="14"></line>',folder:'<path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path>',framer:'<path d="M5 16V9h14V2H5l14 14h-7m-7 0l7 7v-7m-7 0h7"></path>',frown:'<circle cx="12" cy="12" r="10"></circle><path d="M16 16s-1.5-2-4-2-4 2-4 2"></path><line x1="9" y1="9" x2="9.01" y2="9"></line><line x1="15" y1="9" x2="15.01" y2="9"></line>',gift:'<polyline points="20 12 20 22 4 22 4 12"></polyline><rect x="2" y="7" width="20" height="5"></rect><line x1="12" y1="22" x2="12" y2="7"></line><path d="M12 7H7.5a2.5 2.5 0 0 1 0-5C11 2 12 7 12 7z"></path><path d="M12 7h4.5a2.5 2.5 0 0 0 0-5C13 2 12 7 12 7z"></path>',"git-branch":'<line x1="6" y1="3" x2="6" y2="15"></line><circle cx="18" cy="6" r="3"></circle><circle cx="6" cy="18" r="3"></circle><path d="M18 9a9 9 0 0 1-9 9"></path>',"git-commit":'<circle cx="12" cy="12" r="4"></circle><line x1="1.05" y1="12" x2="7" y2="12"></line><line x1="17.01" y1="12" x2="22.96" y2="12"></line>',"git-merge":'<circle cx="18" cy="18" r="3"></circle><circle cx="6" cy="6" r="3"></circle><path d="M6 21V9a9 9 0 0 0 9 9"></path>',"git-pull-request":'<circle cx="18" cy="18" r="3"></circle><circle cx="6" cy="6" r="3"></circle><path d="M13 6h3a2 2 0 0 1 2 2v7"></path><line x1="6" y1="9" x2="6" y2="21"></line>',github:'<path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"></path>',gitlab:'<path d="M22.65 14.39L12 22.13 1.35 14.39a.84.84 0 0 1-.3-.94l1.22-3.78 2.44-7.51A.42.42 0 0 1 4.82 2a.43.43 0 0 1 .58 0 .42.42 0 0 1 .11.18l2.44 7.49h8.1l2.44-7.51A.42.42 0 0 1 18.6 2a.43.43 0 0 1 .58 0 .42.42 0 0 1 .11.18l2.44 7.51L23 13.45a.84.84 0 0 1-.35.94z"></path>',globe:'<circle cx="12" cy="12" r="10"></circle><line x1="2" y1="12" x2="22" y2="12"></line><path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"></path>',grid:'<rect x="3" y="3" width="7" height="7"></rect><rect x="14" y="3" width="7" height="7"></rect><rect x="14" y="14" width="7" height="7"></rect><rect x="3" y="14" width="7" height="7"></rect>',"hard-drive":'<line x1="22" y1="12" x2="2" y2="12"></line><path d="M5.45 5.11L2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z"></path><line x1="6" y1="16" x2="6.01" y2="16"></line><line x1="10" y1="16" x2="10.01" y2="16"></line>',hash:'<line x1="4" y1="9" x2="20" y2="9"></line><line x1="4" y1="15" x2="20" y2="15"></line><line x1="10" y1="3" x2="8" y2="21"></line><line x1="16" y1="3" x2="14" y2="21"></line>',headphones:'<path d="M3 18v-6a9 9 0 0 1 18 0v6"></path><path d="M21 19a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3zM3 19a2 2 0 0 0 2 2h1a2 2 0 0 0 2-2v-3a2 2 0 0 0-2-2H3z"></path>',heart:'<path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"></path>',"help-circle":'<circle cx="12" cy="12" r="10"></circle><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"></path><line x1="12" y1="17" x2="12.01" y2="17"></line>',hexagon:'<path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path>',home:'<path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path><polyline points="9 22 9 12 15 12 15 22"></polyline>',image:'<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><circle cx="8.5" cy="8.5" r="1.5"></circle><polyline points="21 15 16 10 5 21"></polyline>',inbox:'<polyline points="22 12 16 12 14 15 10 15 8 12 2 12"></polyline><path d="M5.45 5.11L2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z"></path>',info:'<circle cx="12" cy="12" r="10"></circle><line x1="12" y1="16" x2="12" y2="12"></line><line x1="12" y1="8" x2="12.01" y2="8"></line>',instagram:'<rect x="2" y="2" width="20" height="20" rx="5" ry="5"></rect><path d="M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z"></path><line x1="17.5" y1="6.5" x2="17.51" y2="6.5"></line>',italic:'<line x1="19" y1="4" x2="10" y2="4"></line><line x1="14" y1="20" x2="5" y2="20"></line><line x1="15" y1="4" x2="9" y2="20"></line>',key:'<path d="M21 2l-2 2m-7.61 7.61a5.5 5.5 0 1 1-7.778 7.778 5.5 5.5 0 0 1 7.777-7.777zm0 0L15.5 7.5m0 0l3 3L22 7l-3-3m-3.5 3.5L19 4"></path>',layers:'<polygon points="12 2 2 7 12 12 22 7 12 2"></polygon><polyline points="2 17 12 22 22 17"></polyline><polyline points="2 12 12 17 22 12"></polyline>',layout:'<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="3" y1="9" x2="21" y2="9"></line><line x1="9" y1="21" x2="9" y2="9"></line>',"life-buoy":'<circle cx="12" cy="12" r="10"></circle><circle cx="12" cy="12" r="4"></circle><line x1="4.93" y1="4.93" x2="9.17" y2="9.17"></line><line x1="14.83" y1="14.83" x2="19.07" y2="19.07"></line><line x1="14.83" y1="9.17" x2="19.07" y2="4.93"></line><line x1="14.83" y1="9.17" x2="18.36" y2="5.64"></line><line x1="4.93" y1="19.07" x2="9.17" y2="14.83"></line>',"link-2":'<path d="M15 7h3a5 5 0 0 1 5 5 5 5 0 0 1-5 5h-3m-6 0H6a5 5 0 0 1-5-5 5 5 0 0 1 5-5h3"></path><line x1="8" y1="12" x2="16" y2="12"></line>',link:'<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path>',linkedin:'<path d="M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z"></path><rect x="2" y="9" width="4" height="12"></rect><circle cx="4" cy="4" r="2"></circle>',list:'<line x1="8" y1="6" x2="21" y2="6"></line><line x1="8" y1="12" x2="21" y2="12"></line><line x1="8" y1="18" x2="21" y2="18"></line><line x1="3" y1="6" x2="3.01" y2="6"></line><line x1="3" y1="12" x2="3.01" y2="12"></line><line x1="3" y1="18" x2="3.01" y2="18"></line>',loader:'<line x1="12" y1="2" x2="12" y2="6"></line><line x1="12" y1="18" x2="12" y2="22"></line><line x1="4.93" y1="4.93" x2="7.76" y2="7.76"></line><line x1="16.24" y1="16.24" x2="19.07" y2="19.07"></line><line x1="2" y1="12" x2="6" y2="12"></line><line x1="18" y1="12" x2="22" y2="12"></line><line x1="4.93" y1="19.07" x2="7.76" y2="16.24"></line><line x1="16.24" y1="7.76" x2="19.07" y2="4.93"></line>',lock:'<rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect><path d="M7 11V7a5 5 0 0 1 10 0v4"></path>',"log-in":'<path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"></path><polyline points="10 17 15 12 10 7"></polyline><line x1="15" y1="12" x2="3" y2="12"></line>',"log-out":'<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path><polyline points="16 17 21 12 16 7"></polyline><line x1="21" y1="12" x2="9" y2="12"></line>',mail:'<path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"></path><polyline points="22,6 12,13 2,6"></polyline>',"map-pin":'<path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"></path><circle cx="12" cy="10" r="3"></circle>',map:'<polygon points="1 6 1 22 8 18 16 22 23 18 23 2 16 6 8 2 1 6"></polygon><line x1="8" y1="2" x2="8" y2="18"></line><line x1="16" y1="6" x2="16" y2="22"></line>',"maximize-2":'<polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" y1="3" x2="14" y2="10"></line><line x1="3" y1="21" x2="10" y2="14"></line>',maximize:'<path d="M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"></path>',meh:'<circle cx="12" cy="12" r="10"></circle><line x1="8" y1="15" x2="16" y2="15"></line><line x1="9" y1="9" x2="9.01" y2="9"></line><line x1="15" y1="9" x2="15.01" y2="9"></line>',menu:'<line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line>',"message-circle":'<path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"></path>',"message-square":'<path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path>',"mic-off":'<line x1="1" y1="1" x2="23" y2="23"></line><path d="M9 9v3a3 3 0 0 0 5.12 2.12M15 9.34V4a3 3 0 0 0-5.94-.6"></path><path d="M17 16.95A7 7 0 0 1 5 12v-2m14 0v2a7 7 0 0 1-.11 1.23"></path><line x1="12" y1="19" x2="12" y2="23"></line><line x1="8" y1="23" x2="16" y2="23"></line>',mic:'<path d="M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"></path><path d="M19 10v2a7 7 0 0 1-14 0v-2"></path><line x1="12" y1="19" x2="12" y2="23"></line><line x1="8" y1="23" x2="16" y2="23"></line>',"minimize-2":'<polyline points="4 14 10 14 10 20"></polyline><polyline points="20 10 14 10 14 4"></polyline><line x1="14" y1="10" x2="21" y2="3"></line><line x1="3" y1="21" x2="10" y2="14"></line>',minimize:'<path d="M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3"></path>',"minus-circle":'<circle cx="12" cy="12" r="10"></circle><line x1="8" y1="12" x2="16" y2="12"></line>',"minus-square":'<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="8" y1="12" x2="16" y2="12"></line>',minus:'<line x1="5" y1="12" x2="19" y2="12"></line>',monitor:'<rect x="2" y="3" width="20" height="14" rx="2" ry="2"></rect><line x1="8" y1="21" x2="16" y2="21"></line><line x1="12" y1="17" x2="12" y2="21"></line>',moon:'<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path>',"more-horizontal":'<circle cx="12" cy="12" r="1"></circle><circle cx="19" cy="12" r="1"></circle><circle cx="5" cy="12" r="1"></circle>',"more-vertical":'<circle cx="12" cy="12" r="1"></circle><circle cx="12" cy="5" r="1"></circle><circle cx="12" cy="19" r="1"></circle>',"mouse-pointer":'<path d="M3 3l7.07 16.97 2.51-7.39 7.39-2.51L3 3z"></path><path d="M13 13l6 6"></path>',move:'<polyline points="5 9 2 12 5 15"></polyline><polyline points="9 5 12 2 15 5"></polyline><polyline points="15 19 12 22 9 19"></polyline><polyline points="19 9 22 12 19 15"></polyline><line x1="2" y1="12" x2="22" y2="12"></line><line x1="12" y1="2" x2="12" y2="22"></line>',music:'<path d="M9 18V5l12-2v13"></path><circle cx="6" cy="18" r="3"></circle><circle cx="18" cy="16" r="3"></circle>',"navigation-2":'<polygon points="12 2 19 21 12 17 5 21 12 2"></polygon>',navigation:'<polygon points="3 11 22 2 13 21 11 13 3 11"></polygon>',octagon:'<polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"></polygon>',package:'<line x1="16.5" y1="9.4" x2="7.5" y2="4.21"></line><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path><polyline points="3.27 6.96 12 12.01 20.73 6.96"></polyline><line x1="12" y1="22.08" x2="12" y2="12"></line>',paperclip:'<path d="M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48"></path>',"pause-circle":'<circle cx="12" cy="12" r="10"></circle><line x1="10" y1="15" x2="10" y2="9"></line><line x1="14" y1="15" x2="14" y2="9"></line>',pause:'<rect x="6" y="4" width="4" height="16"></rect><rect x="14" y="4" width="4" height="16"></rect>',"pen-tool":'<path d="M12 19l7-7 3 3-7 7-3-3z"></path><path d="M18 13l-1.5-7.5L2 2l3.5 14.5L13 18l5-5z"></path><path d="M2 2l7.586 7.586"></path><circle cx="11" cy="11" r="2"></circle>',percent:'<line x1="19" y1="5" x2="5" y2="19"></line><circle cx="6.5" cy="6.5" r="2.5"></circle><circle cx="17.5" cy="17.5" r="2.5"></circle>',"phone-call":'<path d="M15.05 5A5 5 0 0 1 19 8.95M15.05 1A9 9 0 0 1 23 8.94m-1 7.98v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path>',"phone-forwarded":'<polyline points="19 1 23 5 19 9"></polyline><line x1="15" y1="5" x2="23" y2="5"></line><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path>',"phone-incoming":'<polyline points="16 2 16 8 22 8"></polyline><line x1="23" y1="1" x2="16" y2="8"></line><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path>',"phone-missed":'<line x1="23" y1="1" x2="17" y2="7"></line><line x1="17" y1="1" x2="23" y2="7"></line><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path>',"phone-off":'<path d="M10.68 13.31a16 16 0 0 0 3.41 2.6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7 2 2 0 0 1 1.72 2v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.42 19.42 0 0 1-3.33-2.67m-2.67-3.34a19.79 19.79 0 0 1-3.07-8.63A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91"></path><line x1="23" y1="1" x2="1" y2="23"></line>',"phone-outgoing":'<polyline points="23 7 23 1 17 1"></polyline><line x1="16" y1="8" x2="23" y2="1"></line><path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path>',phone:'<path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"></path>',"pie-chart":'<path d="M21.21 15.89A10 10 0 1 1 8 2.83"></path><path d="M22 12A10 10 0 0 0 12 2v10z"></path>',"play-circle":'<circle cx="12" cy="12" r="10"></circle><polygon points="10 8 16 12 10 16 10 8"></polygon>',play:'<polygon points="5 3 19 12 5 21 5 3"></polygon>',"plus-circle":'<circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="16"></line><line x1="8" y1="12" x2="16" y2="12"></line>',"plus-square":'<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="12" y1="8" x2="12" y2="16"></line><line x1="8" y1="12" x2="16" y2="12"></line>',plus:'<line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line>',pocket:'<path d="M4 3h16a2 2 0 0 1 2 2v6a10 10 0 0 1-10 10A10 10 0 0 1 2 11V5a2 2 0 0 1 2-2z"></path><polyline points="8 10 12 14 16 10"></polyline>',power:'<path d="M18.36 6.64a9 9 0 1 1-12.73 0"></path><line x1="12" y1="2" x2="12" y2="12"></line>',printer:'<polyline points="6 9 6 2 18 2 18 9"></polyline><path d="M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2"></path><rect x="6" y="14" width="12" height="8"></rect>',radio:'<circle cx="12" cy="12" r="2"></circle><path d="M16.24 7.76a6 6 0 0 1 0 8.49m-8.48-.01a6 6 0 0 1 0-8.49m11.31-2.82a10 10 0 0 1 0 14.14m-14.14 0a10 10 0 0 1 0-14.14"></path>',"refresh-ccw":'<polyline points="1 4 1 10 7 10"></polyline><polyline points="23 20 23 14 17 14"></polyline><path d="M20.49 9A9 9 0 0 0 5.64 5.64L1 10m22 4l-4.64 4.36A9 9 0 0 1 3.51 15"></path>',"refresh-cw":'<polyline points="23 4 23 10 17 10"></polyline><polyline points="1 20 1 14 7 14"></polyline><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"></path>',repeat:'<polyline points="17 1 21 5 17 9"></polyline><path d="M3 11V9a4 4 0 0 1 4-4h14"></path><polyline points="7 23 3 19 7 15"></polyline><path d="M21 13v2a4 4 0 0 1-4 4H3"></path>',rewind:'<polygon points="11 19 2 12 11 5 11 19"></polygon><polygon points="22 19 13 12 22 5 22 19"></polygon>',"rotate-ccw":'<polyline points="1 4 1 10 7 10"></polyline><path d="M3.51 15a9 9 0 1 0 2.13-9.36L1 10"></path>',"rotate-cw":'<polyline points="23 4 23 10 17 10"></polyline><path d="M20.49 15a9 9 0 1 1-2.12-9.36L23 10"></path>',rss:'<path d="M4 11a9 9 0 0 1 9 9"></path><path d="M4 4a16 16 0 0 1 16 16"></path><circle cx="5" cy="19" r="1"></circle>',save:'<path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"></path><polyline points="17 21 17 13 7 13 7 21"></polyline><polyline points="7 3 7 8 15 8"></polyline>',scissors:'<circle cx="6" cy="6" r="3"></circle><circle cx="6" cy="18" r="3"></circle><line x1="20" y1="4" x2="8.12" y2="15.88"></line><line x1="14.47" y1="14.48" x2="20" y2="20"></line><line x1="8.12" y1="8.12" x2="12" y2="12"></line>',search:'<circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line>',send:'<line x1="22" y1="2" x2="11" y2="13"></line><polygon points="22 2 15 22 11 13 2 9 22 2"></polygon>',server:'<rect x="2" y="2" width="20" height="8" rx="2" ry="2"></rect><rect x="2" y="14" width="20" height="8" rx="2" ry="2"></rect><line x1="6" y1="6" x2="6.01" y2="6"></line><line x1="6" y1="18" x2="6.01" y2="18"></line>',settings:'<circle cx="12" cy="12" r="3"></circle><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"></path>',"share-2":'<circle cx="18" cy="5" r="3"></circle><circle cx="6" cy="12" r="3"></circle><circle cx="18" cy="19" r="3"></circle><line x1="8.59" y1="13.51" x2="15.42" y2="17.49"></line><line x1="15.41" y1="6.51" x2="8.59" y2="10.49"></line>',share:'<path d="M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"></path><polyline points="16 6 12 2 8 6"></polyline><line x1="12" y1="2" x2="12" y2="15"></line>',"shield-off":'<path d="M19.69 14a6.9 6.9 0 0 0 .31-2V5l-8-3-3.16 1.18"></path><path d="M4.73 4.73L4 5v7c0 6 8 10 8 10a20.29 20.29 0 0 0 5.62-4.38"></path><line x1="1" y1="1" x2="23" y2="23"></line>',shield:'<path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"></path>',"shopping-bag":'<path d="M6 2L3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z"></path><line x1="3" y1="6" x2="21" y2="6"></line><path d="M16 10a4 4 0 0 1-8 0"></path>',"shopping-cart":'<circle cx="9" cy="21" r="1"></circle><circle cx="20" cy="21" r="1"></circle><path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"></path>',shuffle:'<polyline points="16 3 21 3 21 8"></polyline><line x1="4" y1="20" x2="21" y2="3"></line><polyline points="21 16 21 21 16 21"></polyline><line x1="15" y1="15" x2="21" y2="21"></line><line x1="4" y1="4" x2="9" y2="9"></line>',sidebar:'<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="9" y1="3" x2="9" y2="21"></line>',"skip-back":'<polygon points="19 20 9 12 19 4 19 20"></polygon><line x1="5" y1="19" x2="5" y2="5"></line>',"skip-forward":'<polygon points="5 4 15 12 5 20 5 4"></polygon><line x1="19" y1="5" x2="19" y2="19"></line>',slack:'<path d="M14.5 10c-.83 0-1.5-.67-1.5-1.5v-5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5v5c0 .83-.67 1.5-1.5 1.5z"></path><path d="M20.5 10H19V8.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"></path><path d="M9.5 14c.83 0 1.5.67 1.5 1.5v5c0 .83-.67 1.5-1.5 1.5S8 21.33 8 20.5v-5c0-.83.67-1.5 1.5-1.5z"></path><path d="M3.5 14H5v1.5c0 .83-.67 1.5-1.5 1.5S2 16.33 2 15.5 2.67 14 3.5 14z"></path><path d="M14 14.5c0-.83.67-1.5 1.5-1.5h5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-5c-.83 0-1.5-.67-1.5-1.5z"></path><path d="M15.5 19H14v1.5c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5-.67-1.5-1.5-1.5z"></path><path d="M10 9.5C10 8.67 9.33 8 8.5 8h-5C2.67 8 2 8.67 2 9.5S2.67 11 3.5 11h5c.83 0 1.5-.67 1.5-1.5z"></path><path d="M8.5 5H10V3.5C10 2.67 9.33 2 8.5 2S7 2.67 7 3.5 7.67 5 8.5 5z"></path>',slash:'<circle cx="12" cy="12" r="10"></circle><line x1="4.93" y1="4.93" x2="19.07" y2="19.07"></line>',sliders:'<line x1="4" y1="21" x2="4" y2="14"></line><line x1="4" y1="10" x2="4" y2="3"></line><line x1="12" y1="21" x2="12" y2="12"></line><line x1="12" y1="8" x2="12" y2="3"></line><line x1="20" y1="21" x2="20" y2="16"></line><line x1="20" y1="12" x2="20" y2="3"></line><line x1="1" y1="14" x2="7" y2="14"></line><line x1="9" y1="8" x2="15" y2="8"></line><line x1="17" y1="16" x2="23" y2="16"></line>',smartphone:'<rect x="5" y="2" width="14" height="20" rx="2" ry="2"></rect><line x1="12" y1="18" x2="12.01" y2="18"></line>',smile:'<circle cx="12" cy="12" r="10"></circle><path d="M8 14s1.5 2 4 2 4-2 4-2"></path><line x1="9" y1="9" x2="9.01" y2="9"></line><line x1="15" y1="9" x2="15.01" y2="9"></line>',speaker:'<rect x="4" y="2" width="16" height="20" rx="2" ry="2"></rect><circle cx="12" cy="14" r="4"></circle><line x1="12" y1="6" x2="12.01" y2="6"></line>',square:'<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect>',star:'<polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon>',"stop-circle":'<circle cx="12" cy="12" r="10"></circle><rect x="9" y="9" width="6" height="6"></rect>',sun:'<circle cx="12" cy="12" r="5"></circle><line x1="12" y1="1" x2="12" y2="3"></line><line x1="12" y1="21" x2="12" y2="23"></line><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line><line x1="1" y1="12" x2="3" y2="12"></line><line x1="21" y1="12" x2="23" y2="12"></line><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>',sunrise:'<path d="M17 18a5 5 0 0 0-10 0"></path><line x1="12" y1="2" x2="12" y2="9"></line><line x1="4.22" y1="10.22" x2="5.64" y2="11.64"></line><line x1="1" y1="18" x2="3" y2="18"></line><line x1="21" y1="18" x2="23" y2="18"></line><line x1="18.36" y1="11.64" x2="19.78" y2="10.22"></line><line x1="23" y1="22" x2="1" y2="22"></line><polyline points="8 6 12 2 16 6"></polyline>',sunset:'<path d="M17 18a5 5 0 0 0-10 0"></path><line x1="12" y1="9" x2="12" y2="2"></line><line x1="4.22" y1="10.22" x2="5.64" y2="11.64"></line><line x1="1" y1="18" x2="3" y2="18"></line><line x1="21" y1="18" x2="23" y2="18"></line><line x1="18.36" y1="11.64" x2="19.78" y2="10.22"></line><line x1="23" y1="22" x2="1" y2="22"></line><polyline points="16 5 12 9 8 5"></polyline>',tablet:'<rect x="4" y="2" width="16" height="20" rx="2" ry="2"></rect><line x1="12" y1="18" x2="12.01" y2="18"></line>',tag:'<path d="M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z"></path><line x1="7" y1="7" x2="7.01" y2="7"></line>',target:'<circle cx="12" cy="12" r="10"></circle><circle cx="12" cy="12" r="6"></circle><circle cx="12" cy="12" r="2"></circle>',terminal:'<polyline points="4 17 10 11 4 5"></polyline><line x1="12" y1="19" x2="20" y2="19"></line>',thermometer:'<path d="M14 14.76V3.5a2.5 2.5 0 0 0-5 0v11.26a4.5 4.5 0 1 0 5 0z"></path>',"thumbs-down":'<path d="M10 15v4a3 3 0 0 0 3 3l4-9V2H5.72a2 2 0 0 0-2 1.7l-1.38 9a2 2 0 0 0 2 2.3zm7-13h2.67A2.31 2.31 0 0 1 22 4v7a2.31 2.31 0 0 1-2.33 2H17"></path>',"thumbs-up":'<path d="M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3"></path>',"toggle-left":'<rect x="1" y="5" width="22" height="14" rx="7" ry="7"></rect><circle cx="8" cy="12" r="3"></circle>',"toggle-right":'<rect x="1" y="5" width="22" height="14" rx="7" ry="7"></rect><circle cx="16" cy="12" r="3"></circle>',tool:'<path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"></path>',"trash-2":'<polyline points="3 6 5 6 21 6"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path><line x1="10" y1="11" x2="10" y2="17"></line><line x1="14" y1="11" x2="14" y2="17"></line>',trash:'<polyline points="3 6 5 6 21 6"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path>',trello:'<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><rect x="7" y="7" width="3" height="9"></rect><rect x="14" y="7" width="3" height="5"></rect>',"trending-down":'<polyline points="23 18 13.5 8.5 8.5 13.5 1 6"></polyline><polyline points="17 18 23 18 23 12"></polyline>',"trending-up":'<polyline points="23 6 13.5 15.5 8.5 10.5 1 18"></polyline><polyline points="17 6 23 6 23 12"></polyline>',triangle:'<path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path>',truck:'<rect x="1" y="3" width="15" height="13"></rect><polygon points="16 8 20 8 23 11 23 16 16 16 16 8"></polygon><circle cx="5.5" cy="18.5" r="2.5"></circle><circle cx="18.5" cy="18.5" r="2.5"></circle>',tv:'<rect x="2" y="7" width="20" height="15" rx="2" ry="2"></rect><polyline points="17 2 12 7 7 2"></polyline>',twitch:'<path d="M21 2H3v16h5v4l4-4h5l4-4V2zm-10 9V7m5 4V7"></path>',twitter:'<path d="M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z"></path>',type:'<polyline points="4 7 4 4 20 4 20 7"></polyline><line x1="9" y1="20" x2="15" y2="20"></line><line x1="12" y1="4" x2="12" y2="20"></line>',umbrella:'<path d="M23 12a11.05 11.05 0 0 0-22 0zm-5 7a3 3 0 0 1-6 0v-7"></path>',underline:'<path d="M6 3v7a6 6 0 0 0 6 6 6 6 0 0 0 6-6V3"></path><line x1="4" y1="21" x2="20" y2="21"></line>',unlock:'<rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect><path d="M7 11V7a5 5 0 0 1 9.9-1"></path>',"upload-cloud":'<polyline points="16 16 12 12 8 16"></polyline><line x1="12" y1="12" x2="12" y2="21"></line><path d="M20.39 18.39A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.3"></path><polyline points="16 16 12 12 8 16"></polyline>',upload:'<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="17 8 12 3 7 8"></polyline><line x1="12" y1="3" x2="12" y2="15"></line>',"user-check":'<path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><polyline points="17 11 19 13 23 9"></polyline>',"user-minus":'<path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><line x1="23" y1="11" x2="17" y2="11"></line>',"user-plus":'<path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><line x1="20" y1="8" x2="20" y2="14"></line><line x1="23" y1="11" x2="17" y2="11"></line>',"user-x":'<path d="M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="8.5" cy="7" r="4"></circle><line x1="18" y1="8" x2="23" y2="13"></line><line x1="23" y1="8" x2="18" y2="13"></line>',user:'<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle>',users:'<path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="9" cy="7" r="4"></circle><path d="M23 21v-2a4 4 0 0 0-3-3.87"></path><path d="M16 3.13a4 4 0 0 1 0 7.75"></path>',"video-off":'<path d="M16 16v1a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h2m5.66 0H14a2 2 0 0 1 2 2v3.34l1 1L23 7v10"></path><line x1="1" y1="1" x2="23" y2="23"></line>',video:'<polygon points="23 7 16 12 23 17 23 7"></polygon><rect x="1" y="5" width="15" height="14" rx="2" ry="2"></rect>',voicemail:'<circle cx="5.5" cy="11.5" r="4.5"></circle><circle cx="18.5" cy="11.5" r="4.5"></circle><line x1="5.5" y1="16" x2="18.5" y2="16"></line>',"volume-1":'<polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon><path d="M15.54 8.46a5 5 0 0 1 0 7.07"></path>',"volume-2":'<polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon><path d="M19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07"></path>',"volume-x":'<polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon><line x1="23" y1="9" x2="17" y2="15"></line><line x1="17" y1="9" x2="23" y2="15"></line>',volume:'<polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon>',watch:'<circle cx="12" cy="12" r="7"></circle><polyline points="12 9 12 12 13.5 13.5"></polyline><path d="M16.51 17.35l-.35 3.83a2 2 0 0 1-2 1.82H9.83a2 2 0 0 1-2-1.82l-.35-3.83m.01-10.7l.35-3.83A2 2 0 0 1 9.83 1h4.35a2 2 0 0 1 2 1.82l.35 3.83"></path>',"wifi-off":'<line x1="1" y1="1" x2="23" y2="23"></line><path d="M16.72 11.06A10.94 10.94 0 0 1 19 12.55"></path><path d="M5 12.55a10.94 10.94 0 0 1 5.17-2.39"></path><path d="M10.71 5.05A16 16 0 0 1 22.58 9"></path><path d="M1.42 9a15.91 15.91 0 0 1 4.7-2.88"></path><path d="M8.53 16.11a6 6 0 0 1 6.95 0"></path><line x1="12" y1="20" x2="12.01" y2="20"></line>',wifi:'<path d="M5 12.55a11 11 0 0 1 14.08 0"></path><path d="M1.42 9a16 16 0 0 1 21.16 0"></path><path d="M8.53 16.11a6 6 0 0 1 6.95 0"></path><line x1="12" y1="20" x2="12.01" y2="20"></line>',wind:'<path d="M9.59 4.59A2 2 0 1 1 11 8H2m10.59 11.41A2 2 0 1 0 14 16H2m15.73-8.27A2.5 2.5 0 1 1 19.5 12H2"></path>',"x-circle":'<circle cx="12" cy="12" r="10"></circle><line x1="15" y1="9" x2="9" y2="15"></line><line x1="9" y1="9" x2="15" y2="15"></line>',"x-octagon":'<polygon points="7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"></polygon><line x1="15" y1="9" x2="9" y2="15"></line><line x1="9" y1="9" x2="15" y2="15"></line>',"x-square":'<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><line x1="9" y1="9" x2="15" y2="15"></line><line x1="15" y1="9" x2="9" y2="15"></line>',x:'<line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line>',youtube:'<path d="M22.54 6.42a2.78 2.78 0 0 0-1.94-2C18.88 4 12 4 12 4s-6.88 0-8.6.46a2.78 2.78 0 0 0-1.94 2A29 29 0 0 0 1 11.75a29 29 0 0 0 .46 5.33A2.78 2.78 0 0 0 3.4 19c1.72.46 8.6.46 8.6.46s6.88 0 8.6-.46a2.78 2.78 0 0 0 1.94-2 29 29 0 0 0 .46-5.25 29 29 0 0 0-.46-5.33z"></path><polygon points="9.75 15.02 15.5 11.75 9.75 8.48 9.75 15.02"></polygon>',"zap-off":'<polyline points="12.41 6.75 13 2 10.57 4.92"></polyline><polyline points="18.57 12.91 21 10 15.66 10"></polyline><polyline points="8 8 3 14 12 14 11 22 16 16"></polyline><line x1="1" y1="1" x2="23" y2="23"></line>',zap:'<polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"></polygon>',"zoom-in":'<circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line><line x1="11" y1="8" x2="11" y2="14"></line><line x1="8" y1="11" x2="14" y2="11"></line>',"zoom-out":'<circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line><line x1="8" y1="11" x2="14" y2="11"></line>'}},"./node_modules/classnames/dedupe.js":function(n,r,i){var o,s;/*!
Copyright (c) 2016 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/(function(){var a=function(){function l(){}l.prototype=Object.create(null);function c(w,k){for(var A=k.length,d=0;d<A;++d)v(w,k[d])}var u={}.hasOwnProperty;function f(w,k){w[k]=!0}function h(w,k){for(var A in k)u.call(k,A)&&(w[A]=!!k[A])}var p=/\s+/;function g(w,k){for(var A=k.split(p),d=A.length,y=0;y<d;++y)w[A[y]]=!0}function v(w,k){if(!!k){var A=typeof k;A==="string"?g(w,k):Array.isArray(k)?c(w,k):A==="object"?h(w,k):A==="number"&&f(w,k)}}function b(){for(var w=arguments.length,k=Array(w),A=0;A<w;A++)k[A]=arguments[A];var d=new l;c(d,k);var y=[];for(var m in d)d[m]&&y.push(m);return y.join(" ")}return b}();typeof n!="undefined"&&n.exports?n.exports=a:(o=[],s=function(){return a}.apply(r,o),s!==void 0&&(n.exports=s))})()},"./node_modules/core-js/es/array/from.js":function(n,r,i){i("./node_modules/core-js/modules/es.string.iterator.js"),i("./node_modules/core-js/modules/es.array.from.js");var o=i("./node_modules/core-js/internals/path.js");n.exports=o.Array.from},"./node_modules/core-js/internals/a-function.js":function(n,r){n.exports=function(i){if(typeof i!="function")throw TypeError(String(i)+" is not a function");return i}},"./node_modules/core-js/internals/an-object.js":function(n,r,i){var o=i("./node_modules/core-js/internals/is-object.js");n.exports=function(s){if(!o(s))throw TypeError(String(s)+" is not an object");return s}},"./node_modules/core-js/internals/array-from.js":function(n,r,i){var o=i("./node_modules/core-js/internals/bind-context.js"),s=i("./node_modules/core-js/internals/to-object.js"),a=i("./node_modules/core-js/internals/call-with-safe-iteration-closing.js"),l=i("./node_modules/core-js/internals/is-array-iterator-method.js"),c=i("./node_modules/core-js/internals/to-length.js"),u=i("./node_modules/core-js/internals/create-property.js"),f=i("./node_modules/core-js/internals/get-iterator-method.js");n.exports=function(p){var g=s(p),v=typeof this=="function"?this:Array,b=arguments.length,w=b>1?arguments[1]:void 0,k=w!==void 0,A=0,d=f(g),y,m,x,S;if(k&&(w=o(w,b>2?arguments[2]:void 0,2)),d!=null&&!(v==Array&&l(d)))for(S=d.call(g),m=new v;!(x=S.next()).done;A++)u(m,A,k?a(S,w,[x.value,A],!0):x.value);else for(y=c(g.length),m=new v(y);y>A;A++)u(m,A,k?w(g[A],A):g[A]);return m.length=A,m}},"./node_modules/core-js/internals/array-includes.js":function(n,r,i){var o=i("./node_modules/core-js/internals/to-indexed-object.js"),s=i("./node_modules/core-js/internals/to-length.js"),a=i("./node_modules/core-js/internals/to-absolute-index.js");n.exports=function(l){return function(c,u,f){var h=o(c),p=s(h.length),g=a(f,p),v;if(l&&u!=u){for(;p>g;)if(v=h[g++],v!=v)return!0}else for(;p>g;g++)if((l||g in h)&&h[g]===u)return l||g||0;return!l&&-1}}},"./node_modules/core-js/internals/bind-context.js":function(n,r,i){var o=i("./node_modules/core-js/internals/a-function.js");n.exports=function(s,a,l){if(o(s),a===void 0)return s;switch(l){case 0:return function(){return s.call(a)};case 1:return function(c){return s.call(a,c)};case 2:return function(c,u){return s.call(a,c,u)};case 3:return function(c,u,f){return s.call(a,c,u,f)}}return function(){return s.apply(a,arguments)}}},"./node_modules/core-js/internals/call-with-safe-iteration-closing.js":function(n,r,i){var o=i("./node_modules/core-js/internals/an-object.js");n.exports=function(s,a,l,c){try{return c?a(o(l)[0],l[1]):a(l)}catch(f){var u=s.return;throw u!==void 0&&o(u.call(s)),f}}},"./node_modules/core-js/internals/check-correctness-of-iteration.js":function(n,r,i){var o=i("./node_modules/core-js/internals/well-known-symbol.js"),s=o("iterator"),a=!1;try{var l=0,c={next:function(){return{done:!!l++}},return:function(){a=!0}};c[s]=function(){return this},Array.from(c,function(){throw 2})}catch(u){}n.exports=function(u,f){if(!f&&!a)return!1;var h=!1;try{var p={};p[s]=function(){return{next:function(){return{done:h=!0}}}},u(p)}catch(g){}return h}},"./node_modules/core-js/internals/classof-raw.js":function(n,r){var i={}.toString;n.exports=function(o){return i.call(o).slice(8,-1)}},"./node_modules/core-js/internals/classof.js":function(n,r,i){var o=i("./node_modules/core-js/internals/classof-raw.js"),s=i("./node_modules/core-js/internals/well-known-symbol.js"),a=s("toStringTag"),l=o(function(){return arguments}())=="Arguments",c=function(u,f){try{return u[f]}catch(h){}};n.exports=function(u){var f,h,p;return u===void 0?"Undefined":u===null?"Null":typeof(h=c(f=Object(u),a))=="string"?h:l?o(f):(p=o(f))=="Object"&&typeof f.callee=="function"?"Arguments":p}},"./node_modules/core-js/internals/copy-constructor-properties.js":function(n,r,i){var o=i("./node_modules/core-js/internals/has.js"),s=i("./node_modules/core-js/internals/own-keys.js"),a=i("./node_modules/core-js/internals/object-get-own-property-descriptor.js"),l=i("./node_modules/core-js/internals/object-define-property.js");n.exports=function(c,u){for(var f=s(u),h=l.f,p=a.f,g=0;g<f.length;g++){var v=f[g];o(c,v)||h(c,v,p(u,v))}}},"./node_modules/core-js/internals/correct-prototype-getter.js":function(n,r,i){var o=i("./node_modules/core-js/internals/fails.js");n.exports=!o(function(){function s(){}return s.prototype.constructor=null,Object.getPrototypeOf(new s)!==s.prototype})},"./node_modules/core-js/internals/create-iterator-constructor.js":function(n,r,i){var o=i("./node_modules/core-js/internals/iterators-core.js").IteratorPrototype,s=i("./node_modules/core-js/internals/object-create.js"),a=i("./node_modules/core-js/internals/create-property-descriptor.js"),l=i("./node_modules/core-js/internals/set-to-string-tag.js"),c=i("./node_modules/core-js/internals/iterators.js"),u=function(){return this};n.exports=function(f,h,p){var g=h+" Iterator";return f.prototype=s(o,{next:a(1,p)}),l(f,g,!1,!0),c[g]=u,f}},"./node_modules/core-js/internals/create-property-descriptor.js":function(n,r){n.exports=function(i,o){return{enumerable:!(i&1),configurable:!(i&2),writable:!(i&4),value:o}}},"./node_modules/core-js/internals/create-property.js":function(n,r,i){var o=i("./node_modules/core-js/internals/to-primitive.js"),s=i("./node_modules/core-js/internals/object-define-property.js"),a=i("./node_modules/core-js/internals/create-property-descriptor.js");n.exports=function(l,c,u){var f=o(c);f in l?s.f(l,f,a(0,u)):l[f]=u}},"./node_modules/core-js/internals/define-iterator.js":function(n,r,i){var o=i("./node_modules/core-js/internals/export.js"),s=i("./node_modules/core-js/internals/create-iterator-constructor.js"),a=i("./node_modules/core-js/internals/object-get-prototype-of.js"),l=i("./node_modules/core-js/internals/object-set-prototype-of.js"),c=i("./node_modules/core-js/internals/set-to-string-tag.js"),u=i("./node_modules/core-js/internals/hide.js"),f=i("./node_modules/core-js/internals/redefine.js"),h=i("./node_modules/core-js/internals/well-known-symbol.js"),p=i("./node_modules/core-js/internals/is-pure.js"),g=i("./node_modules/core-js/internals/iterators.js"),v=i("./node_modules/core-js/internals/iterators-core.js"),b=v.IteratorPrototype,w=v.BUGGY_SAFARI_ITERATORS,k=h("iterator"),A="keys",d="values",y="entries",m=function(){return this};n.exports=function(x,S,_,C,E,T,R){s(_,S,C);var N=function(_e){if(_e===E&&H)return H;if(!w&&_e in P)return P[_e];switch(_e){case A:return function(){return new _(this,_e)};case d:return function(){return new _(this,_e)};case y:return function(){return new _(this,_e)}}return function(){return new _(this)}},D=S+" Iterator",M=!1,P=x.prototype,L=P[k]||P["@@iterator"]||E&&P[E],H=!w&&L||N(E),te=S=="Array"&&P.entries||L,q,ae,ge;if(te&&(q=a(te.call(new x)),b!==Object.prototype&&q.next&&(!p&&a(q)!==b&&(l?l(q,b):typeof q[k]!="function"&&u(q,k,m)),c(q,D,!0,!0),p&&(g[D]=m))),E==d&&L&&L.name!==d&&(M=!0,H=function(){return L.call(this)}),(!p||R)&&P[k]!==H&&u(P,k,H),g[S]=H,E)if(ae={values:N(d),keys:T?H:N(A),entries:N(y)},R)for(ge in ae)(w||M||!(ge in P))&&f(P,ge,ae[ge]);else o({target:S,proto:!0,forced:w||M},ae);return ae}},"./node_modules/core-js/internals/descriptors.js":function(n,r,i){var o=i("./node_modules/core-js/internals/fails.js");n.exports=!o(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},"./node_modules/core-js/internals/document-create-element.js":function(n,r,i){var o=i("./node_modules/core-js/internals/global.js"),s=i("./node_modules/core-js/internals/is-object.js"),a=o.document,l=s(a)&&s(a.createElement);n.exports=function(c){return l?a.createElement(c):{}}},"./node_modules/core-js/internals/enum-bug-keys.js":function(n,r){n.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"./node_modules/core-js/internals/export.js":function(n,r,i){var o=i("./node_modules/core-js/internals/global.js"),s=i("./node_modules/core-js/internals/object-get-own-property-descriptor.js").f,a=i("./node_modules/core-js/internals/hide.js"),l=i("./node_modules/core-js/internals/redefine.js"),c=i("./node_modules/core-js/internals/set-global.js"),u=i("./node_modules/core-js/internals/copy-constructor-properties.js"),f=i("./node_modules/core-js/internals/is-forced.js");n.exports=function(h,p){var g=h.target,v=h.global,b=h.stat,w,k,A,d,y,m;if(v?k=o:b?k=o[g]||c(g,{}):k=(o[g]||{}).prototype,k)for(A in p){if(y=p[A],h.noTargetGet?(m=s(k,A),d=m&&m.value):d=k[A],w=f(v?A:g+(b?".":"#")+A,h.forced),!w&&d!==void 0){if(typeof y==typeof d)continue;u(y,d)}(h.sham||d&&d.sham)&&a(y,"sham",!0),l(k,A,y,h)}}},"./node_modules/core-js/internals/fails.js":function(n,r){n.exports=function(i){try{return!!i()}catch(o){return!0}}},"./node_modules/core-js/internals/function-to-string.js":function(n,r,i){var o=i("./node_modules/core-js/internals/shared.js");n.exports=o("native-function-to-string",Function.toString)},"./node_modules/core-js/internals/get-iterator-method.js":function(n,r,i){var o=i("./node_modules/core-js/internals/classof.js"),s=i("./node_modules/core-js/internals/iterators.js"),a=i("./node_modules/core-js/internals/well-known-symbol.js"),l=a("iterator");n.exports=function(c){if(c!=null)return c[l]||c["@@iterator"]||s[o(c)]}},"./node_modules/core-js/internals/global.js":function(n,r,i){(function(o){var s="object",a=function(l){return l&&l.Math==Math&&l};n.exports=a(typeof globalThis==s&&globalThis)||a(typeof window==s&&window)||a(typeof self==s&&self)||a(typeof o==s&&o)||Function("return this")()}).call(this,i("./node_modules/webpack/buildin/global.js"))},"./node_modules/core-js/internals/has.js":function(n,r){var i={}.hasOwnProperty;n.exports=function(o,s){return i.call(o,s)}},"./node_modules/core-js/internals/hidden-keys.js":function(n,r){n.exports={}},"./node_modules/core-js/internals/hide.js":function(n,r,i){var o=i("./node_modules/core-js/internals/descriptors.js"),s=i("./node_modules/core-js/internals/object-define-property.js"),a=i("./node_modules/core-js/internals/create-property-descriptor.js");n.exports=o?function(l,c,u){return s.f(l,c,a(1,u))}:function(l,c,u){return l[c]=u,l}},"./node_modules/core-js/internals/html.js":function(n,r,i){var o=i("./node_modules/core-js/internals/global.js"),s=o.document;n.exports=s&&s.documentElement},"./node_modules/core-js/internals/ie8-dom-define.js":function(n,r,i){var o=i("./node_modules/core-js/internals/descriptors.js"),s=i("./node_modules/core-js/internals/fails.js"),a=i("./node_modules/core-js/internals/document-create-element.js");n.exports=!o&&!s(function(){return Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a!=7})},"./node_modules/core-js/internals/indexed-object.js":function(n,r,i){var o=i("./node_modules/core-js/internals/fails.js"),s=i("./node_modules/core-js/internals/classof-raw.js"),a="".split;n.exports=o(function(){return!Object("z").propertyIsEnumerable(0)})?function(l){return s(l)=="String"?a.call(l,""):Object(l)}:Object},"./node_modules/core-js/internals/internal-state.js":function(n,r,i){var o=i("./node_modules/core-js/internals/native-weak-map.js"),s=i("./node_modules/core-js/internals/global.js"),a=i("./node_modules/core-js/internals/is-object.js"),l=i("./node_modules/core-js/internals/hide.js"),c=i("./node_modules/core-js/internals/has.js"),u=i("./node_modules/core-js/internals/shared-key.js"),f=i("./node_modules/core-js/internals/hidden-keys.js"),h=s.WeakMap,p,g,v,b=function(x){return v(x)?g(x):p(x,{})},w=function(x){return function(S){var _;if(!a(S)||(_=g(S)).type!==x)throw TypeError("Incompatible receiver, "+x+" required");return _}};if(o){var k=new h,A=k.get,d=k.has,y=k.set;p=function(x,S){return y.call(k,x,S),S},g=function(x){return A.call(k,x)||{}},v=function(x){return d.call(k,x)}}else{var m=u("state");f[m]=!0,p=function(x,S){return l(x,m,S),S},g=function(x){return c(x,m)?x[m]:{}},v=function(x){return c(x,m)}}n.exports={set:p,get:g,has:v,enforce:b,getterFor:w}},"./node_modules/core-js/internals/is-array-iterator-method.js":function(n,r,i){var o=i("./node_modules/core-js/internals/well-known-symbol.js"),s=i("./node_modules/core-js/internals/iterators.js"),a=o("iterator"),l=Array.prototype;n.exports=function(c){return c!==void 0&&(s.Array===c||l[a]===c)}},"./node_modules/core-js/internals/is-forced.js":function(n,r,i){var o=i("./node_modules/core-js/internals/fails.js"),s=/#|\.prototype\./,a=function(h,p){var g=c[l(h)];return g==f?!0:g==u?!1:typeof p=="function"?o(p):!!p},l=a.normalize=function(h){return String(h).replace(s,".").toLowerCase()},c=a.data={},u=a.NATIVE="N",f=a.POLYFILL="P";n.exports=a},"./node_modules/core-js/internals/is-object.js":function(n,r){n.exports=function(i){return typeof i=="object"?i!==null:typeof i=="function"}},"./node_modules/core-js/internals/is-pure.js":function(n,r){n.exports=!1},"./node_modules/core-js/internals/iterators-core.js":function(n,r,i){var o=i("./node_modules/core-js/internals/object-get-prototype-of.js"),s=i("./node_modules/core-js/internals/hide.js"),a=i("./node_modules/core-js/internals/has.js"),l=i("./node_modules/core-js/internals/well-known-symbol.js"),c=i("./node_modules/core-js/internals/is-pure.js"),u=l("iterator"),f=!1,h=function(){return this},p,g,v;[].keys&&(v=[].keys(),"next"in v?(g=o(o(v)),g!==Object.prototype&&(p=g)):f=!0),p==null&&(p={}),!c&&!a(p,u)&&s(p,u,h),n.exports={IteratorPrototype:p,BUGGY_SAFARI_ITERATORS:f}},"./node_modules/core-js/internals/iterators.js":function(n,r){n.exports={}},"./node_modules/core-js/internals/native-symbol.js":function(n,r,i){var o=i("./node_modules/core-js/internals/fails.js");n.exports=!!Object.getOwnPropertySymbols&&!o(function(){return!String(Symbol())})},"./node_modules/core-js/internals/native-weak-map.js":function(n,r,i){var o=i("./node_modules/core-js/internals/global.js"),s=i("./node_modules/core-js/internals/function-to-string.js"),a=o.WeakMap;n.exports=typeof a=="function"&&/native code/.test(s.call(a))},"./node_modules/core-js/internals/object-create.js":function(n,r,i){var o=i("./node_modules/core-js/internals/an-object.js"),s=i("./node_modules/core-js/internals/object-define-properties.js"),a=i("./node_modules/core-js/internals/enum-bug-keys.js"),l=i("./node_modules/core-js/internals/hidden-keys.js"),c=i("./node_modules/core-js/internals/html.js"),u=i("./node_modules/core-js/internals/document-create-element.js"),f=i("./node_modules/core-js/internals/shared-key.js"),h=f("IE_PROTO"),p="prototype",g=function(){},v=function(){var b=u("iframe"),w=a.length,k="<",A="script",d=">",y="java"+A+":",m;for(b.style.display="none",c.appendChild(b),b.src=String(y),m=b.contentWindow.document,m.open(),m.write(k+A+d+"document.F=Object"+k+"/"+A+d),m.close(),v=m.F;w--;)delete v[p][a[w]];return v()};n.exports=Object.create||function(w,k){var A;return w!==null?(g[p]=o(w),A=new g,g[p]=null,A[h]=w):A=v(),k===void 0?A:s(A,k)},l[h]=!0},"./node_modules/core-js/internals/object-define-properties.js":function(n,r,i){var o=i("./node_modules/core-js/internals/descriptors.js"),s=i("./node_modules/core-js/internals/object-define-property.js"),a=i("./node_modules/core-js/internals/an-object.js"),l=i("./node_modules/core-js/internals/object-keys.js");n.exports=o?Object.defineProperties:function(u,f){a(u);for(var h=l(f),p=h.length,g=0,v;p>g;)s.f(u,v=h[g++],f[v]);return u}},"./node_modules/core-js/internals/object-define-property.js":function(n,r,i){var o=i("./node_modules/core-js/internals/descriptors.js"),s=i("./node_modules/core-js/internals/ie8-dom-define.js"),a=i("./node_modules/core-js/internals/an-object.js"),l=i("./node_modules/core-js/internals/to-primitive.js"),c=Object.defineProperty;r.f=o?c:function(f,h,p){if(a(f),h=l(h,!0),a(p),s)try{return c(f,h,p)}catch(g){}if("get"in p||"set"in p)throw TypeError("Accessors not supported");return"value"in p&&(f[h]=p.value),f}},"./node_modules/core-js/internals/object-get-own-property-descriptor.js":function(n,r,i){var o=i("./node_modules/core-js/internals/descriptors.js"),s=i("./node_modules/core-js/internals/object-property-is-enumerable.js"),a=i("./node_modules/core-js/internals/create-property-descriptor.js"),l=i("./node_modules/core-js/internals/to-indexed-object.js"),c=i("./node_modules/core-js/internals/to-primitive.js"),u=i("./node_modules/core-js/internals/has.js"),f=i("./node_modules/core-js/internals/ie8-dom-define.js"),h=Object.getOwnPropertyDescriptor;r.f=o?h:function(g,v){if(g=l(g),v=c(v,!0),f)try{return h(g,v)}catch(b){}if(u(g,v))return a(!s.f.call(g,v),g[v])}},"./node_modules/core-js/internals/object-get-own-property-names.js":function(n,r,i){var o=i("./node_modules/core-js/internals/object-keys-internal.js"),s=i("./node_modules/core-js/internals/enum-bug-keys.js"),a=s.concat("length","prototype");r.f=Object.getOwnPropertyNames||function(c){return o(c,a)}},"./node_modules/core-js/internals/object-get-own-property-symbols.js":function(n,r){r.f=Object.getOwnPropertySymbols},"./node_modules/core-js/internals/object-get-prototype-of.js":function(n,r,i){var o=i("./node_modules/core-js/internals/has.js"),s=i("./node_modules/core-js/internals/to-object.js"),a=i("./node_modules/core-js/internals/shared-key.js"),l=i("./node_modules/core-js/internals/correct-prototype-getter.js"),c=a("IE_PROTO"),u=Object.prototype;n.exports=l?Object.getPrototypeOf:function(f){return f=s(f),o(f,c)?f[c]:typeof f.constructor=="function"&&f instanceof f.constructor?f.constructor.prototype:f instanceof Object?u:null}},"./node_modules/core-js/internals/object-keys-internal.js":function(n,r,i){var o=i("./node_modules/core-js/internals/has.js"),s=i("./node_modules/core-js/internals/to-indexed-object.js"),a=i("./node_modules/core-js/internals/array-includes.js"),l=i("./node_modules/core-js/internals/hidden-keys.js"),c=a(!1);n.exports=function(u,f){var h=s(u),p=0,g=[],v;for(v in h)!o(l,v)&&o(h,v)&&g.push(v);for(;f.length>p;)o(h,v=f[p++])&&(~c(g,v)||g.push(v));return g}},"./node_modules/core-js/internals/object-keys.js":function(n,r,i){var o=i("./node_modules/core-js/internals/object-keys-internal.js"),s=i("./node_modules/core-js/internals/enum-bug-keys.js");n.exports=Object.keys||function(l){return o(l,s)}},"./node_modules/core-js/internals/object-property-is-enumerable.js":function(n,r,i){var o={}.propertyIsEnumerable,s=Object.getOwnPropertyDescriptor,a=s&&!o.call({1:2},1);r.f=a?function(c){var u=s(this,c);return!!u&&u.enumerable}:o},"./node_modules/core-js/internals/object-set-prototype-of.js":function(n,r,i){var o=i("./node_modules/core-js/internals/validate-set-prototype-of-arguments.js");n.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var s=!1,a={},l;try{l=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,l.call(a,[]),s=a instanceof Array}catch(c){}return function(u,f){return o(u,f),s?l.call(u,f):u.__proto__=f,u}}():void 0)},"./node_modules/core-js/internals/own-keys.js":function(n,r,i){var o=i("./node_modules/core-js/internals/global.js"),s=i("./node_modules/core-js/internals/object-get-own-property-names.js"),a=i("./node_modules/core-js/internals/object-get-own-property-symbols.js"),l=i("./node_modules/core-js/internals/an-object.js"),c=o.Reflect;n.exports=c&&c.ownKeys||function(f){var h=s.f(l(f)),p=a.f;return p?h.concat(p(f)):h}},"./node_modules/core-js/internals/path.js":function(n,r,i){n.exports=i("./node_modules/core-js/internals/global.js")},"./node_modules/core-js/internals/redefine.js":function(n,r,i){var o=i("./node_modules/core-js/internals/global.js"),s=i("./node_modules/core-js/internals/shared.js"),a=i("./node_modules/core-js/internals/hide.js"),l=i("./node_modules/core-js/internals/has.js"),c=i("./node_modules/core-js/internals/set-global.js"),u=i("./node_modules/core-js/internals/function-to-string.js"),f=i("./node_modules/core-js/internals/internal-state.js"),h=f.get,p=f.enforce,g=String(u).split("toString");s("inspectSource",function(v){return u.call(v)}),(n.exports=function(v,b,w,k){var A=k?!!k.unsafe:!1,d=k?!!k.enumerable:!1,y=k?!!k.noTargetGet:!1;if(typeof w=="function"&&(typeof b=="string"&&!l(w,"name")&&a(w,"name",b),p(w).source=g.join(typeof b=="string"?b:"")),v===o){d?v[b]=w:c(b,w);return}else A?!y&&v[b]&&(d=!0):delete v[b];d?v[b]=w:a(v,b,w)})(Function.prototype,"toString",function(){return typeof this=="function"&&h(this).source||u.call(this)})},"./node_modules/core-js/internals/require-object-coercible.js":function(n,r){n.exports=function(i){if(i==null)throw TypeError("Can't call method on "+i);return i}},"./node_modules/core-js/internals/set-global.js":function(n,r,i){var o=i("./node_modules/core-js/internals/global.js"),s=i("./node_modules/core-js/internals/hide.js");n.exports=function(a,l){try{s(o,a,l)}catch(c){o[a]=l}return l}},"./node_modules/core-js/internals/set-to-string-tag.js":function(n,r,i){var o=i("./node_modules/core-js/internals/object-define-property.js").f,s=i("./node_modules/core-js/internals/has.js"),a=i("./node_modules/core-js/internals/well-known-symbol.js"),l=a("toStringTag");n.exports=function(c,u,f){c&&!s(c=f?c:c.prototype,l)&&o(c,l,{configurable:!0,value:u})}},"./node_modules/core-js/internals/shared-key.js":function(n,r,i){var o=i("./node_modules/core-js/internals/shared.js"),s=i("./node_modules/core-js/internals/uid.js"),a=o("keys");n.exports=function(l){return a[l]||(a[l]=s(l))}},"./node_modules/core-js/internals/shared.js":function(n,r,i){var o=i("./node_modules/core-js/internals/global.js"),s=i("./node_modules/core-js/internals/set-global.js"),a=i("./node_modules/core-js/internals/is-pure.js"),l="__core-js_shared__",c=o[l]||s(l,{});(n.exports=function(u,f){return c[u]||(c[u]=f!==void 0?f:{})})("versions",[]).push({version:"3.1.3",mode:a?"pure":"global",copyright:"\xA9 2019 Denis Pushkarev (zloirock.ru)"})},"./node_modules/core-js/internals/string-at.js":function(n,r,i){var o=i("./node_modules/core-js/internals/to-integer.js"),s=i("./node_modules/core-js/internals/require-object-coercible.js");n.exports=function(a,l,c){var u=String(s(a)),f=o(l),h=u.length,p,g;return f<0||f>=h?c?"":void 0:(p=u.charCodeAt(f),p<55296||p>56319||f+1===h||(g=u.charCodeAt(f+1))<56320||g>57343?c?u.charAt(f):p:c?u.slice(f,f+2):(p-55296<<10)+(g-56320)+65536)}},"./node_modules/core-js/internals/to-absolute-index.js":function(n,r,i){var o=i("./node_modules/core-js/internals/to-integer.js"),s=Math.max,a=Math.min;n.exports=function(l,c){var u=o(l);return u<0?s(u+c,0):a(u,c)}},"./node_modules/core-js/internals/to-indexed-object.js":function(n,r,i){var o=i("./node_modules/core-js/internals/indexed-object.js"),s=i("./node_modules/core-js/internals/require-object-coercible.js");n.exports=function(a){return o(s(a))}},"./node_modules/core-js/internals/to-integer.js":function(n,r){var i=Math.ceil,o=Math.floor;n.exports=function(s){return isNaN(s=+s)?0:(s>0?o:i)(s)}},"./node_modules/core-js/internals/to-length.js":function(n,r,i){var o=i("./node_modules/core-js/internals/to-integer.js"),s=Math.min;n.exports=function(a){return a>0?s(o(a),9007199254740991):0}},"./node_modules/core-js/internals/to-object.js":function(n,r,i){var o=i("./node_modules/core-js/internals/require-object-coercible.js");n.exports=function(s){return Object(o(s))}},"./node_modules/core-js/internals/to-primitive.js":function(n,r,i){var o=i("./node_modules/core-js/internals/is-object.js");n.exports=function(s,a){if(!o(s))return s;var l,c;if(a&&typeof(l=s.toString)=="function"&&!o(c=l.call(s))||typeof(l=s.valueOf)=="function"&&!o(c=l.call(s))||!a&&typeof(l=s.toString)=="function"&&!o(c=l.call(s)))return c;throw TypeError("Can't convert object to primitive value")}},"./node_modules/core-js/internals/uid.js":function(n,r){var i=0,o=Math.random();n.exports=function(s){return"Symbol(".concat(s===void 0?"":s,")_",(++i+o).toString(36))}},"./node_modules/core-js/internals/validate-set-prototype-of-arguments.js":function(n,r,i){var o=i("./node_modules/core-js/internals/is-object.js"),s=i("./node_modules/core-js/internals/an-object.js");n.exports=function(a,l){if(s(a),!o(l)&&l!==null)throw TypeError("Can't set "+String(l)+" as a prototype")}},"./node_modules/core-js/internals/well-known-symbol.js":function(n,r,i){var o=i("./node_modules/core-js/internals/global.js"),s=i("./node_modules/core-js/internals/shared.js"),a=i("./node_modules/core-js/internals/uid.js"),l=i("./node_modules/core-js/internals/native-symbol.js"),c=o.Symbol,u=s("wks");n.exports=function(f){return u[f]||(u[f]=l&&c[f]||(l?c:a)("Symbol."+f))}},"./node_modules/core-js/modules/es.array.from.js":function(n,r,i){var o=i("./node_modules/core-js/internals/export.js"),s=i("./node_modules/core-js/internals/array-from.js"),a=i("./node_modules/core-js/internals/check-correctness-of-iteration.js"),l=!a(function(c){Array.from(c)});o({target:"Array",stat:!0,forced:l},{from:s})},"./node_modules/core-js/modules/es.string.iterator.js":function(n,r,i){var o=i("./node_modules/core-js/internals/string-at.js"),s=i("./node_modules/core-js/internals/internal-state.js"),a=i("./node_modules/core-js/internals/define-iterator.js"),l="String Iterator",c=s.set,u=s.getterFor(l);a(String,"String",function(f){c(this,{type:l,string:String(f),index:0})},function(){var h=u(this),p=h.string,g=h.index,v;return g>=p.length?{value:void 0,done:!0}:(v=o(p,g,!0),h.index+=v.length,{value:v,done:!1})})},"./node_modules/webpack/buildin/global.js":function(n,r){var i;i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(o){typeof window=="object"&&(i=window)}n.exports=i},"./src/default-attrs.json":function(n){n.exports={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"}},"./src/icon.js":function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=Object.assign||function(v){for(var b=1;b<arguments.length;b++){var w=arguments[b];for(var k in w)Object.prototype.hasOwnProperty.call(w,k)&&(v[k]=w[k])}return v},s=function(){function v(b,w){for(var k=0;k<w.length;k++){var A=w[k];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(b,A.key,A)}}return function(b,w,k){return w&&v(b.prototype,w),k&&v(b,k),b}}(),a=i("./node_modules/classnames/dedupe.js"),l=f(a),c=i("./src/default-attrs.json"),u=f(c);function f(v){return v&&v.__esModule?v:{default:v}}function h(v,b){if(!(v instanceof b))throw new TypeError("Cannot call a class as a function")}var p=function(){function v(b,w){var k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];h(this,v),this.name=b,this.contents=w,this.tags=k,this.attrs=o({},u.default,{class:"feather feather-"+b})}return s(v,[{key:"toSvg",value:function(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},k=o({},this.attrs,w,{class:(0,l.default)(this.attrs.class,w.class)});return"<svg "+g(k)+">"+this.contents+"</svg>"}},{key:"toString",value:function(){return this.contents}}]),v}();function g(v){return Object.keys(v).map(function(b){return b+'="'+v[b]+'"'}).join(" ")}r.default=p},"./src/icons.js":function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=i("./src/icon.js"),s=f(o),a=i("./dist/icons.json"),l=f(a),c=i("./src/tags.json"),u=f(c);function f(h){return h&&h.__esModule?h:{default:h}}r.default=Object.keys(l.default).map(function(h){return new s.default(h,l.default[h],u.default[h])}).reduce(function(h,p){return h[p.name]=p,h},{})},"./src/index.js":function(n,r,i){var o=i("./src/icons.js"),s=f(o),a=i("./src/to-svg.js"),l=f(a),c=i("./src/replace.js"),u=f(c);function f(h){return h&&h.__esModule?h:{default:h}}n.exports={icons:s.default,toSvg:l.default,replace:u.default}},"./src/replace.js":function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=Object.assign||function(g){for(var v=1;v<arguments.length;v++){var b=arguments[v];for(var w in b)Object.prototype.hasOwnProperty.call(b,w)&&(g[w]=b[w])}return g},s=i("./node_modules/classnames/dedupe.js"),a=u(s),l=i("./src/icons.js"),c=u(l);function u(g){return g&&g.__esModule?g:{default:g}}function f(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(typeof document=="undefined")throw new Error("`feather.replace()` only works in a browser environment.");var v=document.querySelectorAll("[data-feather]");Array.from(v).forEach(function(b){return h(b,g)})}function h(g){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},b=p(g),w=b["data-feather"];delete b["data-feather"];var k=c.default[w].toSvg(o({},v,b,{class:(0,a.default)(v.class,b.class)})),A=new DOMParser().parseFromString(k,"image/svg+xml"),d=A.querySelector("svg");g.parentNode.replaceChild(d,g)}function p(g){return Array.from(g.attributes).reduce(function(v,b){return v[b.name]=b.value,v},{})}r.default=f},"./src/tags.json":function(n){n.exports={activity:["pulse","health","action","motion"],airplay:["stream","cast","mirroring"],"alert-circle":["warning","alert","danger"],"alert-octagon":["warning","alert","danger"],"alert-triangle":["warning","alert","danger"],"align-center":["text alignment","center"],"align-justify":["text alignment","justified"],"align-left":["text alignment","left"],"align-right":["text alignment","right"],anchor:[],archive:["index","box"],"at-sign":["mention","at","email","message"],award:["achievement","badge"],aperture:["camera","photo"],"bar-chart":["statistics","diagram","graph"],"bar-chart-2":["statistics","diagram","graph"],battery:["power","electricity"],"battery-charging":["power","electricity"],bell:["alarm","notification","sound"],"bell-off":["alarm","notification","silent"],bluetooth:["wireless"],"book-open":["read","library"],book:["read","dictionary","booklet","magazine","library"],bookmark:["read","clip","marker","tag"],box:["cube"],briefcase:["work","bag","baggage","folder"],calendar:["date"],camera:["photo"],cast:["chromecast","airplay"],circle:["off","zero","record"],clipboard:["copy"],clock:["time","watch","alarm"],"cloud-drizzle":["weather","shower"],"cloud-lightning":["weather","bolt"],"cloud-rain":["weather"],"cloud-snow":["weather","blizzard"],cloud:["weather"],codepen:["logo"],codesandbox:["logo"],code:["source","programming"],coffee:["drink","cup","mug","tea","cafe","hot","beverage"],columns:["layout"],command:["keyboard","cmd","terminal","prompt"],compass:["navigation","safari","travel","direction"],copy:["clone","duplicate"],"corner-down-left":["arrow","return"],"corner-down-right":["arrow"],"corner-left-down":["arrow"],"corner-left-up":["arrow"],"corner-right-down":["arrow"],"corner-right-up":["arrow"],"corner-up-left":["arrow"],"corner-up-right":["arrow"],cpu:["processor","technology"],"credit-card":["purchase","payment","cc"],crop:["photo","image"],crosshair:["aim","target"],database:["storage","memory"],delete:["remove"],disc:["album","cd","dvd","music"],"dollar-sign":["currency","money","payment"],droplet:["water"],edit:["pencil","change"],"edit-2":["pencil","change"],"edit-3":["pencil","change"],eye:["view","watch"],"eye-off":["view","watch","hide","hidden"],"external-link":["outbound"],facebook:["logo","social"],"fast-forward":["music"],figma:["logo","design","tool"],"file-minus":["delete","remove","erase"],"file-plus":["add","create","new"],"file-text":["data","txt","pdf"],film:["movie","video"],filter:["funnel","hopper"],flag:["report"],"folder-minus":["directory"],"folder-plus":["directory"],folder:["directory"],framer:["logo","design","tool"],frown:["emoji","face","bad","sad","emotion"],gift:["present","box","birthday","party"],"git-branch":["code","version control"],"git-commit":["code","version control"],"git-merge":["code","version control"],"git-pull-request":["code","version control"],github:["logo","version control"],gitlab:["logo","version control"],globe:["world","browser","language","translate"],"hard-drive":["computer","server","memory","data"],hash:["hashtag","number","pound"],headphones:["music","audio","sound"],heart:["like","love","emotion"],"help-circle":["question mark"],hexagon:["shape","node.js","logo"],home:["house","living"],image:["picture"],inbox:["email"],instagram:["logo","camera"],key:["password","login","authentication","secure"],layers:["stack"],layout:["window","webpage"],"life-bouy":["help","life ring","support"],link:["chain","url"],"link-2":["chain","url"],linkedin:["logo","social media"],list:["options"],lock:["security","password","secure"],"log-in":["sign in","arrow","enter"],"log-out":["sign out","arrow","exit"],mail:["email","message"],"map-pin":["location","navigation","travel","marker"],map:["location","navigation","travel"],maximize:["fullscreen"],"maximize-2":["fullscreen","arrows","expand"],meh:["emoji","face","neutral","emotion"],menu:["bars","navigation","hamburger"],"message-circle":["comment","chat"],"message-square":["comment","chat"],"mic-off":["record","sound","mute"],mic:["record","sound","listen"],minimize:["exit fullscreen","close"],"minimize-2":["exit fullscreen","arrows","close"],minus:["subtract"],monitor:["tv","screen","display"],moon:["dark","night"],"more-horizontal":["ellipsis"],"more-vertical":["ellipsis"],"mouse-pointer":["arrow","cursor"],move:["arrows"],music:["note"],navigation:["location","travel"],"navigation-2":["location","travel"],octagon:["stop"],package:["box","container"],paperclip:["attachment"],pause:["music","stop"],"pause-circle":["music","audio","stop"],"pen-tool":["vector","drawing"],percent:["discount"],"phone-call":["ring"],"phone-forwarded":["call"],"phone-incoming":["call"],"phone-missed":["call"],"phone-off":["call","mute"],"phone-outgoing":["call"],phone:["call"],play:["music","start"],"pie-chart":["statistics","diagram"],"play-circle":["music","start"],plus:["add","new"],"plus-circle":["add","new"],"plus-square":["add","new"],pocket:["logo","save"],power:["on","off"],printer:["fax","office","device"],radio:["signal"],"refresh-cw":["synchronise","arrows"],"refresh-ccw":["arrows"],repeat:["loop","arrows"],rewind:["music"],"rotate-ccw":["arrow"],"rotate-cw":["arrow"],rss:["feed","subscribe"],save:["floppy disk"],scissors:["cut"],search:["find","magnifier","magnifying glass"],send:["message","mail","email","paper airplane","paper aeroplane"],settings:["cog","edit","gear","preferences"],"share-2":["network","connections"],shield:["security","secure"],"shield-off":["security","insecure"],"shopping-bag":["ecommerce","cart","purchase","store"],"shopping-cart":["ecommerce","cart","purchase","store"],shuffle:["music"],"skip-back":["music"],"skip-forward":["music"],slack:["logo"],slash:["ban","no"],sliders:["settings","controls"],smartphone:["cellphone","device"],smile:["emoji","face","happy","good","emotion"],speaker:["audio","music"],star:["bookmark","favorite","like"],"stop-circle":["media","music"],sun:["brightness","weather","light"],sunrise:["weather","time","morning","day"],sunset:["weather","time","evening","night"],tablet:["device"],tag:["label"],target:["logo","bullseye"],terminal:["code","command line","prompt"],thermometer:["temperature","celsius","fahrenheit","weather"],"thumbs-down":["dislike","bad","emotion"],"thumbs-up":["like","good","emotion"],"toggle-left":["on","off","switch"],"toggle-right":["on","off","switch"],tool:["settings","spanner"],trash:["garbage","delete","remove","bin"],"trash-2":["garbage","delete","remove","bin"],triangle:["delta"],truck:["delivery","van","shipping","transport","lorry"],tv:["television","stream"],twitch:["logo"],twitter:["logo","social"],type:["text"],umbrella:["rain","weather"],unlock:["security"],"user-check":["followed","subscribed"],"user-minus":["delete","remove","unfollow","unsubscribe"],"user-plus":["new","add","create","follow","subscribe"],"user-x":["delete","remove","unfollow","unsubscribe","unavailable"],user:["person","account"],users:["group"],"video-off":["camera","movie","film"],video:["camera","movie","film"],voicemail:["phone"],volume:["music","sound","mute"],"volume-1":["music","sound"],"volume-2":["music","sound"],"volume-x":["music","sound","mute"],watch:["clock","time"],"wifi-off":["disabled"],wifi:["connection","signal","wireless"],wind:["weather","air"],"x-circle":["cancel","close","delete","remove","times","clear"],"x-octagon":["delete","stop","alert","warning","times","clear"],"x-square":["cancel","close","delete","remove","times","clear"],x:["cancel","close","delete","remove","times","clear"],youtube:["logo","video","play"],"zap-off":["flash","camera","lightning"],zap:["flash","camera","lightning"],"zoom-in":["magnifying glass"],"zoom-out":["magnifying glass"]}},"./src/to-svg.js":function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var o=i("./src/icons.js"),s=a(o);function a(c){return c&&c.__esModule?c:{default:c}}function l(c){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(console.warn("feather.toSvg() is deprecated. Please use feather.icons[name].toSvg() instead."),!c)throw new Error("The required `key` (icon name) parameter is missing.");if(!s.default[c])throw new Error("No icon matching '"+c+"'. See the complete list of icons at https://feathericons.com");return s.default[c].toSvg(u)}r.default=l},0:function(n,r,i){i("./node_modules/core-js/es/array/from.js"),n.exports=i("./src/index.js")}})})})(Jm);var Cu=q3(Jm.exports);const Gm=Object.keys(Cu.icons),cs={props:{name:{type:String,required:!0,validator(e){const t=Gm.includes(e);return t||(console.groupCollapsed("[frappe-ui] name property for feather-icon must be one of "),console.dir(Gm),console.groupEnd()),t}},color:{type:String,default:null},strokeWidth:{type:Number,default:1.5}},render(){let e=Cu.icons[this.name];return e||(e=Cu.icons.circle),He("svg",Xr(e.attrs,{fill:"none",stroke:"currentColor",color:this.color,"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":this.strokeWidth,width:null,height:null,class:[e.attrs.class,"shrink-0"],innerHTML:e.contents},this.$attrs))}},J3={name:"LoadingIndicator"},G3={class:"max-w-xs animate-spin",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},Y3=ie("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),X3=ie("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1),Q3=[Y3,X3];function Z3(e,t,n,r,i,o){return ue(),ve("svg",G3,Q3)}var Ym=Ie(J3,[["render",Z3]]);const ek=["disabled","ariaLabel"],tk=je({props:{theme:{default:"gray"},size:{default:"sm"},variant:{default:"subtle"},label:null,icon:null,iconLeft:null,iconRight:null,loading:{type:Boolean,default:!1},loadingText:null,disabled:{type:Boolean,default:!1},route:null,link:null},setup(e){const t=e,n=G2(),r=Tw(),i=X(()=>{let u={gray:"text-white bg-gray-900 hover:bg-gray-800 active:bg-gray-700",blue:"text-white bg-blue-500 hover:bg-blue-600 active:bg-blue-700",green:"text-white bg-green-600 hover:bg-green-700 active:bg-green-800",red:"text-white bg-red-600 hover:bg-red-700 active:bg-red-800"}[t.theme],f={gray:"text-gray-800 bg-gray-100 hover:bg-gray-200 active:bg-gray-300",blue:"text-blue-600 bg-blue-100 hover:bg-blue-200 active:bg-blue-300",green:"text-green-800 bg-green-100 hover:bg-green-200 active:bg-green-300",red:"text-red-700 bg-red-100 hover:bg-red-200 active:bg-red-300"}[t.theme],h={gray:"text-gray-800 bg-white border border-gray-300 hover:border-gray-400 active:border-gray-400 active:bg-gray-300",blue:"text-blue-600 bg-white border border-blue-300 hover:border-blue-400 active:border-blue-400 active:bg-blue-300",green:"text-green-800 bg-white border border-green-400 hover:border-green-500 active:border-green-500 active:bg-green-300",red:"text-red-700 bg-white border border-red-300 hover:border-red-400 active:border-red-400 active:bg-red-200"}[t.theme],p={gray:"text-gray-800 bg-transparent hover:bg-gray-200 active:bg-gray-300",blue:"text-blue-600 bg-transparent hover:bg-blue-200 active:bg-blue-300",green:"text-green-800 bg-transparent hover:bg-green-200 active:bg-green-300",red:"text-red-700 bg-transparent hover:bg-red-200 active:bg-red-300"}[t.theme],g={gray:"focus-visible:ring focus-visible:ring-gray-400",blue:"focus-visible:ring focus-visible:ring-blue-400",green:"focus-visible:ring focus-visible:ring-green-400",red:"focus-visible:ring focus-visible:ring-red-400"}[t.theme],v={subtle:f,solid:u,outline:h,ghost:p}[t.variant],b=`${t.theme}-${t.variant}`,w={gray:"bg-gray-100 text-gray-500","gray-outline":"bg-gray-100 text-gray-500 border border-gray-300","gray-ghost":"text-gray-500","blue-solid":"bg-blue-300 text-white","blue-subtle":"bg-blue-100 text-blue-400","blue-outline":"bg-blue-100 text-blue-400 border border-blue-300","blue-ghost":"text-blue-400",green:"bg-green-100 text-green-500","green-outline":"bg-green-100 text-green-500 border border-green-400","green-ghost":"text-green-500",red:"bg-red-100 text-red-400","red-outline":"bg-red-100 text-red-400 border border-red-300","red-ghost":"text-red-400"},k=w[b]||w[t.theme],A={sm:"h-7 text-base px-2 rounded",md:"h-8 text-base font-medium px-2.5 rounded",lg:"h-10 text-lg font-medium px-3 rounded-md",xl:"h-11.5 text-xl font-medium px-3.5 rounded-lg","2xl":"h-13 text-2xl font-medium px-3.5 rounded-xl"}[t.size];return l.value&&(A={sm:"h-7 w-7 rounded",md:"h-8 w-8 rounded",lg:"h-10 w-10 rounded-md",xl:"h-11.5 w-11.5 rounded-lg","2xl":"h-13 w-13 rounded-xl"}[t.size]),["inline-flex items-center justify-center gap-2 transition-colors focus:outline-none",s.value?k:v,g,A]}),o=X(()=>({sm:"h-4",md:"h-4.5",lg:"h-5",xl:"h-6","2xl":"h-6"})[t.size]),s=X(()=>t.disabled||t.loading),a=X(()=>l.value?t.label:null),l=X(()=>t.icon||n.icon),c=()=>{if(t.route)return r.push(t.route);if(t.link)return window.open(t.link,"_blank")};return(u,f)=>(ue(),ve("button",Xr(u.$attrs,{class:Rt(i),onClick:c,disabled:Rt(s),ariaLabel:Rt(a)}),[e.loading?(ue(),An(Ym,{key:0,class:ft({"h-3 w-3":e.size=="sm","h-[13.5px] w-[13.5px]":e.size=="md","h-[15px] w-[15px]":e.size=="lg","h-4.5 w-4.5":e.size=="xl"||e.size=="2xl"})},null,8,["class"])):u.$slots.prefix||e.iconLeft?St(u.$slots,"prefix",{key:1},()=>[e.iconLeft?(ue(),An(cs,{key:0,name:e.iconLeft,class:ft(Rt(o)),"aria-hidden":"true"},null,8,["name","class"])):kt("",!0)]):kt("",!0),e.loading&&e.loadingText?(ue(),ve(lt,{key:2},[Ho(on(e.loadingText),1)],64)):Rt(l)&&!e.loading?(ue(),ve(lt,{key:3},[e.icon?(ue(),An(cs,{key:0,name:e.icon,class:ft(Rt(o)),"aria-label":e.label},null,8,["name","class","aria-label"])):u.$slots.icon?St(u.$slots,"icon",{key:1}):kt("",!0)],64)):(ue(),ve("span",{key:4,class:ft({"sr-only":Rt(l)})},[St(u.$slots,"default",{},()=>[Ho(on(e.label),1)])],2)),St(u.$slots,"suffix",{},()=>[e.iconRight?(ue(),An(cs,{key:0,name:e.iconRight,class:ft(Rt(o)),"aria-hidden":"true"},null,8,["name","class"])):kt("",!0)])],16,ek))}}),nk={name:"Loading",props:{text:{type:String,default:"Loading..."}},components:{LoadingIndicator:Ym}},rk={class:"flex items-center text-base text-gray-500"};function ik(e,t,n,r,i,o){const s=_n("LoadingIndicator");return ue(),ve("div",rk,[We(s,{class:"-ml-1 mr-2 h-3 w-3"}),Ho(" "+on(n.text),1)])}var ok=Ie(nk,[["render",ik]]);const sk={name:"Card",props:["title","subtitle","loading"],components:{LoadingText:ok}},ak={class:"flex flex-col rounded-lg border bg-white px-6 py-5 shadow"},lk={class:"flex items-baseline justify-between"},ck={class:"flex items-baseline space-x-2"},uk={key:0,class:"flex items-center space-x-2"},dk={class:"text-xl font-semibold"},fk={key:0,class:"flex items-center space-x-2"},hk={key:0,class:"mt-1.5 text-base text-gray-600"},pk={key:1,class:"mt-4 flex flex-auto flex-col items-center justify-center rounded-md"},mk={key:2,class:"mt-4 flex-auto overflow-auto"};function gk(e,t,n,r,i,o){const s=_n("LoadingText");return ue(),ve("div",ak,[ie("div",lk,[ie("div",ck,[e.$slots["actions-left"]?(ue(),ve("div",uk,[St(e.$slots,"actions-left")])):kt("",!0),ie("h2",dk,on(n.title),1)]),e.$slots.actions?(ue(),ve("div",fk,[St(e.$slots,"actions")])):kt("",!0)]),n.subtitle?(ue(),ve("p",hk,on(n.subtitle),1)):kt("",!0),n.loading?(ue(),ve("div",pk,[We(s)])):e.$slots.default?(ue(),ve("div",mk,[St(e.$slots,"default")])):kt("",!0)])}var MP=Ie(sk,[["render",gk]]);function Xm(e,t,n){var r;return function(){var i=this,o=arguments,s=function(){r=void 0,n||e.apply(i,o)},a=n&&!r;clearTimeout(r),r=window.setTimeout(s,t),a&&e.apply(i,o)}}const yk={name:"Input",inheritAttrs:!1,expose:["getInputValue"],components:{FeatherIcon:cs},props:{label:{type:String},type:{type:String,default:"text",validator(e){let t=["text","number","checkbox","textarea","select","email","password","date"].includes(e);return t||console.warn(`Invalid value "${e}" for "type" prop for Input`),t}},modelValue:{type:[String,Number,Boolean,Object,Array]},inputClass:{type:[String,Array,Object]},debounce:{type:Number},options:{type:Array},disabled:{type:Boolean},rows:{type:Number,default:3},placeholder:{type:String},iconLeft:{type:String}},emits:["input","change","update:modelValue"],methods:{focus(){this.$refs.input.focus()},blur(){this.$refs.input.blur()},getInputValue(e){let t=e?e.target:this.$refs.input,n=t.value;return this.type=="checkbox"&&(n=t.checked),n}},computed:{passedInputValue(){return"value"in this.$attrs?this.$attrs.value:this.modelValue||null},inputAttributes(){let e={},t=n=>{this.$emit("input",this.getInputValue(n))};return this.debounce&&(t=Xm(t,this.debounce)),this.type=="checkbox"&&(e.checked=this.passedInputValue),Object.assign(e,this.$attrs,{onInput:t,onChange:n=>{this.$emit("change",this.getInputValue(n)),this.$emit("update:modelValue",this.getInputValue(n))}})},selectOptions(){return this.options.map(e=>typeof e=="string"?{label:e,value:e}:e).filter(Boolean)},isNormalInput(){return["text","number","checkbox","email","password","date"].includes(this.type)}}},vk={key:0,class:"mb-2 block text-sm leading-4 text-gray-700"},bk=["type","disabled","placeholder","value"],wk=["placeholder","value","disabled","rows"],xk=["disabled"],kk=["value","disabled","selected"],Sk={key:1,class:"ml-2 inline-block text-base leading-4"};function Ck(e,t,n,r,i,o){const s=_n("FeatherIcon");return ue(),ve("label",{class:ft([n.type=="checkbox"?"flex":"block",e.$attrs.class])},[n.label&&n.type!="checkbox"?(ue(),ve("span",vk,on(n.label),1)):kt("",!0),ie("div",{class:ft(["relative flex",{"items-center":o.isNormalInput||n.type=="select"}])},[n.iconLeft&&n.type!="checkbox"?(ue(),An(s,{key:0,name:n.iconLeft,class:ft(["absolute mx-2 h-4 w-4 text-gray-600",{"mt-2":n.type=="textarea"}])},null,8,["name","class"])):kt("",!0),o.isNormalInput?(ue(),ve("input",Xr({key:1},o.inputAttributes,{class:["border-gray-400 placeholder-gray-500",[{"form-input block w-full":n.type!="checkbox","form-checkbox":n.type=="checkbox","pl-8":n.iconLeft&&n.type!="checkbox"},n.inputClass]],ref:"input",type:n.type||"text",disabled:n.disabled,placeholder:n.placeholder,value:o.passedInputValue}),null,16,bk)):kt("",!0),n.type==="textarea"?(ue(),ve("textarea",Xr({key:2},o.inputAttributes,{placeholder:n.placeholder,class:["placeholder-gray-500",["form-textarea block w-full resize-none",n.inputClass,{"pl-8":n.iconLeft}]],ref:"input",value:o.passedInputValue,disabled:n.disabled,rows:n.rows}),null,16,wk)):kt("",!0),n.type==="select"?(ue(),ve("select",Xr({key:3},o.inputAttributes,{class:["form-select block w-full",{"pl-8":n.iconLeft}],ref:"input",disabled:n.disabled}),[(ue(!0),ve(lt,null,Yh(o.selectOptions,a=>(ue(),ve("option",{key:a.value,value:a.value,disabled:a.disabled||!1,selected:o.passedInputValue===a.value},on(a.label),9,kk))),128))],16,xk)):kt("",!0)],2),n.label&&n.type=="checkbox"?(ue(),ve("span",Sk,on(n.label),1)):kt("",!0)],2)}var AP=Ie(yk,[["render",Ck]]);const _k={name:"Dialog",props:{modelValue:{type:Boolean,required:!0},options:{type:Object,default(){return{}}}},emits:["update:modelValue","close","after-leave"],components:{HDialog:bx,DialogPanel:wx,DialogTitle:xx,TransitionChild:Am,TransitionRoot:Em,Button:tk,FeatherIcon:cs},data(){return{dialogActions:[]}},watch:{"options.actions":{handler(e){!e||(this.dialogActions=e.map(t=>{let n=Me(J({},t),{loading:!1,_onClick:t.onClick,onClick:()=>this.handleAction(n)});return n}))},immediate:!0}},methods:{handleAction(e){if(e._onClick&&typeof e._onClick=="function"){e.loading=!0;let t=e._onClick({close:this.close});t&&t.then?t.then(()=>e.loading=!1).catch(()=>e.loading=!1):e.loading=!1}else this.close()},close(){this.open=!1}},computed:{open:{get(){return this.modelValue},set(e){this.$emit("update:modelValue",e),e||this.$emit("close")}},icon(){var t;if(!((t=this.options)==null?void 0:t.icon))return null;let e=this.options.icon;return typeof e=="string"&&(e={name:e}),e},dialogPositionClasses(){var t;let e=((t=this.options)==null?void 0:t.position)||"center";return{"justify-center":e==="center","pt-[20vh]":e==="top"}}}},Mk=["data-dialog"],Ak={class:"bg-white px-4 pb-6 pt-5 sm:px-6"},Ek={class:"flex"},Ok={class:"flex-1"},Tk={class:"mb-6 flex items-center justify-between"},Pk={class:"flex items-center space-x-2"},Rk={class:"text-2xl font-semibold leading-6 text-gray-900"},jk=ie("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[ie("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.8567 3.85355C13.052 3.65829 13.052 3.34171 12.8567 3.14645C12.6615 2.95118 12.3449 2.95118 12.1496 3.14645L8.00201 7.29405L3.85441 3.14645C3.65914 2.95118 3.34256 2.95118 3.1473 3.14645C2.95204 3.34171 2.95204 3.65829 3.1473 3.85355L7.29491 8.00116L3.14645 12.1496C2.95118 12.3449 2.95118 12.6615 3.14645 12.8567C3.34171 13.052 3.65829 13.052 3.85355 12.8567L8.00201 8.70827L12.1505 12.8567C12.3457 13.052 12.6623 13.052 12.8576 12.8567C13.0528 12.6615 13.0528 12.3449 12.8576 12.1496L8.70912 8.00116L12.8567 3.85355Z",fill:"#383838"})],-1),Nk={key:0,class:"text-p-base text-gray-700"},Lk={key:0,class:"px-4 pb-7 pt-4 sm:px-6"},Dk={class:"space-y-2"};function Ik(e,t,n,r,i,o){const s=_n("TransitionChild"),a=_n("FeatherIcon"),l=_n("DialogTitle"),c=_n("Button"),u=_n("DialogPanel"),f=_n("HDialog"),h=_n("TransitionRoot");return ue(),An(h,{as:"template",show:o.open,onAfterLeave:t[0]||(t[0]=p=>e.$emit("after-leave"))},{default:ln(()=>[We(f,{as:"div",class:"fixed inset-0 z-10 overflow-y-auto",onClose:o.close},{default:ln(()=>[ie("div",{class:ft(["flex min-h-screen flex-col items-center px-4 py-4 text-center",o.dialogPositionClasses])},[We(s,{as:"template",enter:"ease-out duration-150","enter-from":"opacity-0","enter-to":"opacity-100",leave:"ease-in duration-150","leave-from":"opacity-100","leave-to":"opacity-0"},{default:ln(()=>[ie("div",{class:"fixed inset-0 bg-black-overlay-200 transition-opacity","data-dialog":n.options.title},null,8,Mk)]),_:1}),We(s,{as:"template",enter:"ease-out duration-150","enter-from":"opacity-50 translate-y-2 scale-95","enter-to":"opacity-100 translate-y-0 scale-100",leave:"ease-in duration-150","leave-from":"opacity-100 translate-y-0 scale-100","leave-to":"opacity-50 translate-y-4 translate-y-4 scale-95"},{default:ln(()=>[We(u,{class:ft(["my-8 inline-block w-full transform overflow-hidden rounded-xl bg-white text-left align-middle shadow-xl transition-all",{"max-w-7xl":n.options.size==="7xl","max-w-6xl":n.options.size==="6xl","max-w-5xl":n.options.size==="5xl","max-w-4xl":n.options.size==="4xl","max-w-3xl":n.options.size==="3xl","max-w-2xl":n.options.size==="2xl","max-w-xl":n.options.size==="xl","max-w-lg":n.options.size==="lg"||!n.options.size,"max-w-md":n.options.size==="md","max-w-sm":n.options.size==="sm","max-w-xs":n.options.size==="xs"}])},{default:ln(()=>[St(e.$slots,"body",{},()=>[St(e.$slots,"body-main",{},()=>[ie("div",Ak,[ie("div",Ek,[ie("div",Ok,[ie("div",Tk,[ie("div",Pk,[o.icon?(ue(),ve("div",{key:0,class:ft(["flex h-7 w-7 flex-shrink-0 items-center justify-center rounded-full",{"bg-gray-100":!o.icon.appearance,"bg-yellow-100":o.icon.appearance==="warning","bg-blue-100":o.icon.appearance==="info","bg-red-100":o.icon.appearance==="danger","bg-green-100":o.icon.appearance==="success"}])},[We(a,{name:o.icon.name,class:ft(["h-4 w-4",{"text-gray-600":!o.icon.appearance,"text-yellow-600":o.icon.appearance==="warning","text-blue-600":o.icon.appearance==="info","text-red-600":o.icon.appearance==="danger","text-green-600":o.icon.appearance==="success"}]),"aria-hidden":"true"},null,8,["name","class"])],2)):kt("",!0),We(l,{as:"header"},{default:ln(()=>[St(e.$slots,"body-title",{},()=>[ie("h3",Rk,on(n.options.title||"Untitled"),1)])]),_:3})]),We(c,{variant:"ghost",onClick:o.close},{icon:ln(()=>[jk]),_:1},8,["onClick"])]),St(e.$slots,"body-content",{},()=>[n.options.message?(ue(),ve("p",Nk,on(n.options.message),1)):kt("",!0)])])])])]),i.dialogActions.length||e.$slots.actions?(ue(),ve("div",Lk,[St(e.$slots,"actions",Ai(Gr({close:o.close})),()=>[ie("div",Dk,[(ue(!0),ve(lt,null,Yh(i.dialogActions,p=>(ue(),An(c,Xr({class:"w-full",key:p.label},p),{default:ln(()=>[Ho(on(p.label),1)]),_:2},1040))),128))])])])):kt("",!0)])]),_:3},8,["class"])]),_:3})],2)]),_:3},8,["onClose"])]),_:3},8,["show"])}var EP=Ie(_k,[["render",Ik]]);class $k{constructor(){this.listeners={},this.failed=!1}on(t,n){this.listeners[t]=this.listeners[t]||[],this.listeners[t].push(n)}trigger(t,n){(this.listeners[t]||[]).forEach(i=>{i.call(this,n)})}upload(t,n){return new Promise((r,i)=>{let o=new XMLHttpRequest;o.upload.addEventListener("loadstart",()=>{this.trigger("start")}),o.upload.addEventListener("progress",l=>{l.lengthComputable&&this.trigger("progress",{uploaded:l.loaded,total:l.total})}),o.upload.addEventListener("load",()=>{this.trigger("finish")}),o.addEventListener("error",()=>{this.trigger("error"),i()}),o.onreadystatechange=()=>{if(o.readyState==XMLHttpRequest.DONE){let l;if(o.status===200){let c=null;try{c=JSON.parse(o.responseText)}catch(f){c=o.responseText}let u=c.message||c;r(u)}else if(o.status===403)l=JSON.parse(o.responseText);else{this.failed=!0;try{l=JSON.parse(o.responseText)}catch(c){}}l&&l.exc&&console.error(JSON.parse(l.exc)[0]),i(l)}};const s=n.upload_endpoint||"/api/method/upload_file";o.open("POST",s,!0),o.setRequestHeader("Accept","application/json"),window.csrf_token&&window.csrf_token!=="{{ csrf_token }}"&&o.setRequestHeader("X-Frappe-CSRF-Token",window.csrf_token);let a=new FormData;t&&a.append("file",t,t.name),a.append("is_private",n.private?"1":"0"),a.append("folder",n.folder||"Home"),n.file_url&&a.append("file_url",n.file_url),n.doctype&&n.docname&&(a.append("doctype",n.doctype),a.append("docname",n.docname),n.fieldname&&a.append("fieldname",n.fieldname)),n.method&&a.append("method",n.method),n.type&&a.append("type",n.type),o.send(a)})}}const Bk={name:"FileUploader",props:["fileTypes","uploadArgs","validateFile"],data(){return{uploader:null,uploading:!1,uploaded:0,error:null,message:"",total:0,file:null,finishedUploading:!1}},computed:{progress(){let e=Math.floor(this.uploaded/this.total*100);return isNaN(e)?0:e},success(){return this.finishedUploading&&!this.error}},methods:{openFileSelector(){this.$refs.input.click()},onFileAdd(e){return Ir(this,null,function*(){if(this.error=null,this.file=e.target.files[0],this.file&&this.validateFile)try{let t=yield this.validateFile(this.file);t&&(this.error=t)}catch(t){this.error=t}this.error||this.uploadFile(this.file)})},uploadFile(e){return Ir(this,null,function*(){this.error=null,this.uploaded=0,this.total=0,this.uploader=new $k,this.uploader.on("start",()=>{this.uploading=!0}),this.uploader.on("progress",t=>{this.uploaded=t.uploaded,this.total=t.total}),this.uploader.on("error",()=>{this.uploading=!1,this.error="Error Uploading File"}),this.uploader.on("finish",()=>{this.uploading=!1,this.finishedUploading=!0}),this.uploader.upload(e,this.uploadArgs||{}).then(t=>{this.$emit("success",t)}).catch(t=>{this.uploading=!1;let n="Error Uploading File";(t==null?void 0:t._server_messages)?n=JSON.parse(JSON.parse(t._server_messages)[0]).message:(t==null?void 0:t.exc)&&(n=JSON.parse(t.exc)[0].split(`
`).slice(-2,-1)[0]),this.error=n,this.$emit("failure",t)})})}}},Hk=["accept"];function zk(e,t,n,r,i,o){return ue(),ve("div",null,[ie("input",{ref:"input",type:"file",accept:n.fileTypes,class:"hidden",onChange:t[0]||(t[0]=(...s)=>o.onFileAdd&&o.onFileAdd(...s))},null,40,Hk),St(e.$slots,"default",Ai(Gr({file:i.file,uploading:i.uploading,progress:o.progress,uploaded:i.uploaded,message:i.message,error:i.error,total:i.total,success:o.success,openFileSelector:o.openFileSelector})))])}var OP=Ie(Bk,[["render",zk]]);var Qm;(function(e){e[e.DEFAULT=0]="DEFAULT",e[e.ONLY_LABEL=1]="ONLY_LABEL",e[e.WITH_LABEL_AND_DESCRIPTION=2]="WITH_LABEL_AND_DESCRIPTION"})(Qm||(Qm={}));function $t(e){this.content=e}$t.prototype={constructor:$t,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,i=r.find(e),o=r.content.slice();return i==-1?o.push(n||e,t):(o[i+1]=t,n&&(o[i]=n)),new $t(o)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new $t(n)},addToStart:function(e,t){return new $t([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new $t(n)},addBefore:function(e,t,n){var r=this.remove(t),i=r.content.slice(),o=r.find(e);return i.splice(o==-1?i.length:o,0,t,n),new $t(i)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return e=$t.from(e),e.size?new $t(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=$t.from(e),e.size?new $t(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=$t.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}};$t.from=function(e){if(e instanceof $t)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new $t(t)};function Zm(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let i=e.child(r),o=t.child(r);if(i==o){n+=i.nodeSize;continue}if(!i.sameMarkup(o))return n;if(i.isText&&i.text!=o.text){for(let s=0;i.text[s]==o.text[s];s++)n++;return n}if(i.content.size||o.content.size){let s=Zm(i.content,o.content,n+1);if(s!=null)return s}n+=i.nodeSize}}function eg(e,t,n,r){for(let i=e.childCount,o=t.childCount;;){if(i==0||o==0)return i==o?null:{a:n,b:r};let s=e.child(--i),a=t.child(--o),l=s.nodeSize;if(s==a){n-=l,r-=l;continue}if(!s.sameMarkup(a))return{a:n,b:r};if(s.isText&&s.text!=a.text){let c=0,u=Math.min(s.text.length,a.text.length);for(;c<u&&s.text[s.text.length-c-1]==a.text[a.text.length-c-1];)c++,n--,r--;return{a:n,b:r}}if(s.content.size||a.content.size){let c=eg(s.content,a.content,n-1,r-1);if(c)return c}n-=l,r-=l}}class K{constructor(t,n){if(this.content=t,this.size=n||0,n==null)for(let r=0;r<t.length;r++)this.size+=t[r].nodeSize}nodesBetween(t,n,r,i=0,o){for(let s=0,a=0;a<n;s++){let l=this.content[s],c=a+l.nodeSize;if(c>t&&r(l,i+a,o||null,s)!==!1&&l.content.size){let u=a+1;l.nodesBetween(Math.max(0,t-u),Math.min(l.content.size,n-u),r,i+u)}a=c}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,r,i){let o="",s=!0;return this.nodesBetween(t,n,(a,l)=>{a.isText?(o+=a.text.slice(Math.max(t,l)-l,n-l),s=!r):a.isLeaf?(i?o+=typeof i=="function"?i(a):i:a.type.spec.leafText&&(o+=a.type.spec.leafText(a)),s=!r):!s&&a.isBlock&&(o+=r,s=!0)},0),o}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,i=this.content.slice(),o=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),o=1);o<t.content.length;o++)i.push(t.content[o]);return new K(i,this.size+t.size)}cut(t,n=this.size){if(t==0&&n==this.size)return this;let r=[],i=0;if(n>t)for(let o=0,s=0;s<n;o++){let a=this.content[o],l=s+a.nodeSize;l>t&&((s<t||l>n)&&(a.isText?a=a.cut(Math.max(0,t-s),Math.min(a.text.length,n-s)):a=a.cut(Math.max(0,t-s-1),Math.min(a.content.size,n-s-1))),r.push(a),i+=a.nodeSize),s=l}return new K(r,i)}cutByIndex(t,n){return t==n?K.empty:t==0&&n==this.content.length?this:new K(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let i=this.content.slice(),o=this.size+n.nodeSize-r.nodeSize;return i[t]=n,new K(i,o)}addToStart(t){return new K([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new K(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(t.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(t){let n=this.content[t];if(!n)throw new RangeError("Index "+t+" out of range for "+this);return n}maybeChild(t){return this.content[t]||null}forEach(t){for(let n=0,r=0;n<this.content.length;n++){let i=this.content[n];t(i,r,n),r+=i.nodeSize}}findDiffStart(t,n=0){return Zm(this,t,n)}findDiffEnd(t,n=this.size,r=t.size){return eg(this,t,n,r)}findIndex(t,n=-1){if(t==0)return Pa(0,t);if(t==this.size)return Pa(this.content.length,t);if(t>this.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let r=0,i=0;;r++){let o=this.child(r),s=i+o.nodeSize;if(s>=t)return s==t||n>0?Pa(r+1,s):Pa(r,i);i=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,n){if(!n)return K.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new K(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return K.empty;let n,r=0;for(let i=0;i<t.length;i++){let o=t[i];r+=o.nodeSize,i&&o.isText&&t[i-1].sameMarkup(o)?(n||(n=t.slice(0,i)),n[n.length-1]=o.withText(n[n.length-1].text+o.text)):n&&n.push(o)}return new K(n||t,r)}static from(t){if(!t)return K.empty;if(t instanceof K)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new K([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}K.empty=new K([],0);const _u={index:0,offset:0};function Pa(e,t){return _u.index=e,_u.offset=t,_u}function Ra(e,t){if(e===t)return!0;if(!(e&&typeof e=="object")||!(t&&typeof t=="object"))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!Ra(e[r],t[r]))return!1}else{for(let r in e)if(!(r in t)||!Ra(e[r],t[r]))return!1;for(let r in t)if(!(r in e))return!1}return!0}class nt{constructor(t,n){this.type=t,this.attrs=n}addToSet(t){let n,r=!1;for(let i=0;i<t.length;i++){let o=t[i];if(this.eq(o))return t;if(this.type.excludes(o.type))n||(n=t.slice(0,i));else{if(o.type.excludes(this.type))return t;!r&&o.type.rank>this.type.rank&&(n||(n=t.slice(0,i)),n.push(this),r=!0),n&&n.push(o)}}return n||(n=t.slice()),r||n.push(this),n}removeFromSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return t.slice(0,n).concat(t.slice(n+1));return t}isInSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return!0;return!1}eq(t){return this==t||this.type==t.type&&Ra(this.attrs,t.attrs)}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=t.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);return r.create(n.attrs)}static sameSet(t,n){if(t==n)return!0;if(t.length!=n.length)return!1;for(let r=0;r<t.length;r++)if(!t[r].eq(n[r]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return nt.none;if(t instanceof nt)return[t];let n=t.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}}nt.none=[];class ja extends Error{}class re{constructor(t,n,r){this.content=t,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=ng(this.content,t+this.openStart,n);return r&&new re(r,this.openStart,this.openEnd)}removeBetween(t,n){return new re(tg(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,n){if(!n)return re.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new re(K.fromJSON(t,n.content),r,i)}static maxOpen(t,n=!0){let r=0,i=0;for(let o=t.firstChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.firstChild)r++;for(let o=t.lastChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.lastChild)i++;return new re(t,r,i)}}re.empty=new re(K.empty,0,0);function tg(e,t,n){let{index:r,offset:i}=e.findIndex(t),o=e.maybeChild(r),{index:s,offset:a}=e.findIndex(n);if(i==t||o.isText){if(a!=n&&!e.child(s).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return e.replaceChild(r,o.copy(tg(o.content,t-i-1,n-i-1)))}function ng(e,t,n,r){let{index:i,offset:o}=e.findIndex(t),s=e.maybeChild(i);if(o==t||s.isText)return r&&!r.canReplace(i,i,n)?null:e.cut(0,t).append(n).append(e.cut(t));let a=ng(s.content,t-o-1,n);return a&&e.replaceChild(i,s.copy(a))}function Fk(e,t,n){if(n.openStart>e.depth)throw new ja("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new ja("Inconsistent open depths");return rg(e,t,n,0)}function rg(e,t,n,r){let i=e.index(r),o=e.node(r);if(i==t.index(r)&&r<e.depth-n.openStart){let s=rg(e,t,n,r+1);return o.copy(o.content.replaceChild(i,s))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&e.depth==r&&t.depth==r){let s=e.parent,a=s.content;return li(s,a.cut(0,e.parentOffset).append(n.content).append(a.cut(t.parentOffset)))}else{let{start:s,end:a}=Vk(n,e);return li(o,og(e,s,a,t,r))}else return li(o,Na(e,t,r))}function ig(e,t){if(!t.type.compatibleContent(e.type))throw new ja("Cannot join "+t.type.name+" onto "+e.type.name)}function Mu(e,t,n){let r=e.node(n);return ig(r,t.node(n)),r}function ai(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function us(e,t,n,r){let i=(t||e).node(n),o=0,s=t?t.index(n):i.childCount;e&&(o=e.index(n),e.depth>n?o++:e.textOffset&&(ai(e.nodeAfter,r),o++));for(let a=o;a<s;a++)ai(i.child(a),r);t&&t.depth==n&&t.textOffset&&ai(t.nodeBefore,r)}function li(e,t){return e.type.checkContent(t),e.copy(t)}function og(e,t,n,r,i){let o=e.depth>i&&Mu(e,t,i+1),s=r.depth>i&&Mu(n,r,i+1),a=[];return us(null,e,i,a),o&&s&&t.index(i)==n.index(i)?(ig(o,s),ai(li(o,og(e,t,n,r,i+1)),a)):(o&&ai(li(o,Na(e,t,i+1)),a),us(t,n,i,a),s&&ai(li(s,Na(n,r,i+1)),a)),us(r,null,i,a),new K(a)}function Na(e,t,n){let r=[];if(us(null,e,n,r),e.depth>n){let i=Mu(e,t,n+1);ai(li(i,Na(e,t,n+1)),r)}return us(t,null,n,r),new K(r)}function Vk(e,t){let n=t.depth-e.openStart,i=t.node(n).copy(e.content);for(let o=n-1;o>=0;o--)i=t.node(o).copy(K.from(i));return{start:i.resolveNoCache(e.openStart+n),end:i.resolveNoCache(i.content.size-e.openEnd-n)}}class ds{constructor(t,n,r){this.pos=t,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,n=this.index(this.depth);if(n==t.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=t.child(n);return r?t.child(n).cut(r):i}get nodeBefore(){let t=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(t).cut(0,n):t==0?null:this.parent.child(t-1)}posAtIndex(t,n){n=this.resolveDepth(n);let r=this.path[n*3],i=n==0?0:this.path[n*3-1]+1;for(let o=0;o<t;o++)i+=r.child(o).nodeSize;return i}marks(){let t=this.parent,n=this.index();if(t.content.size==0)return nt.none;if(this.textOffset)return t.child(n).marks;let r=t.maybeChild(n-1),i=t.maybeChild(n);if(!r){let a=r;r=i,i=a}let o=r.marks;for(var s=0;s<o.length;s++)o[s].type.spec.inclusive===!1&&(!i||!o[s].isInSet(i.marks))&&(o=o[s--].removeFromSet(o));return o}marksAcross(t){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,i=t.parent.maybeChild(t.index());for(var o=0;o<r.length;o++)r[o].type.spec.inclusive===!1&&(!i||!r[o].isInSet(i.marks))&&(r=r[o--].removeFromSet(r));return r}sharedDepth(t){for(let n=this.depth;n>0;n--)if(this.start(n)<=t&&this.end(n)>=t)return n;return 0}blockRange(t=this,n){if(t.pos<this.pos)return t.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);r>=0;r--)if(t.pos<=this.end(r)&&(!n||n(this.node(r))))return new La(this,t,r);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos<this.pos?t:this}toString(){let t="";for(let n=1;n<=this.depth;n++)t+=(t?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return t+":"+this.parentOffset}static resolve(t,n){if(!(n>=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");let r=[],i=0,o=n;for(let s=t;;){let{index:a,offset:l}=s.content.findIndex(o),c=o-l;if(r.push(s,a,i+l),!c||(s=s.child(a),s.isText))break;o=c-1,i+=l+1}return new ds(n,r,o)}static resolveCached(t,n){for(let i=0;i<Au.length;i++){let o=Au[i];if(o.pos==n&&o.doc==t)return o}let r=Au[Eu]=ds.resolve(t,n);return Eu=(Eu+1)%Wk,r}}let Au=[],Eu=0,Wk=12;class La{constructor(t,n,r){this.$from=t,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const Uk=Object.create(null);class Da{constructor(t,n,r,i=nt.none){this.type=t,this.attrs=n,this.marks=i,this.content=r||K.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(t){return this.content.child(t)}maybeChild(t){return this.content.maybeChild(t)}forEach(t){this.content.forEach(t)}nodesBetween(t,n,r,i=0){this.content.nodesBetween(t,n,r,i,this)}descendants(t){this.nodesBetween(0,this.content.size,t)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(t,n,r,i){return this.content.textBetween(t,n,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)}sameMarkup(t){return this.hasMarkup(t.type,t.attrs,t.marks)}hasMarkup(t,n,r){return this.type==t&&Ra(this.attrs,n||t.defaultAttrs||Uk)&&nt.sameSet(this.marks,r||nt.none)}copy(t=null){return t==this.content?this:new Da(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new Da(this.type,this.attrs,this.content,t)}cut(t,n=this.content.size){return t==0&&n==this.content.size?this:this.copy(this.content.cut(t,n))}slice(t,n=this.content.size,r=!1){if(t==n)return re.empty;let i=this.resolve(t),o=this.resolve(n),s=r?0:i.sharedDepth(n),a=i.start(s),c=i.node(s).content.cut(i.pos-a,o.pos-a);return new re(c,i.depth-s,o.depth-s)}replace(t,n,r){return Fk(this.resolve(t),this.resolve(n),r)}nodeAt(t){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(t);if(n=n.maybeChild(r),!n)return null;if(i==t||n.isText)return n;t-=i+1}}childAfter(t){let{index:n,offset:r}=this.content.findIndex(t);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(t){if(t==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(t);if(r<t)return{node:this.content.child(n),index:n,offset:r};let i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(t){return ds.resolveCached(this,t)}resolveNoCache(t){return ds.resolve(this,t)}rangeHasMark(t,n,r){let i=!1;return n>t&&this.nodesBetween(t,n,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 t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),Kk(this.marks,t)}contentMatchAt(t){let n=this.type.contentMatch.matchFragment(this.content,0,t);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(t,n,r=K.empty,i=0,o=r.childCount){let s=this.contentMatchAt(t).matchFragment(r,i,o),a=s&&s.matchFragment(this.content,n);if(!a||!a.validEnd)return!1;for(let l=i;l<o;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(t,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let o=this.contentMatchAt(t).matchType(r),s=o&&o.matchFragment(this.content,n);return s?s.validEnd:!1}canAppend(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)}check(){this.type.checkContent(this.content);let t=nt.none;for(let n=0;n<this.marks.length;n++)t=this.marks[n].addToSet(t);if(!nt.sameSet(t,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(n=>n.toJSON())),t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r=null;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(t.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(n.text,r)}let i=K.fromJSON(t,n.content);return t.nodeType(n.type).create(n.attrs,i,r)}}Da.prototype.text=void 0;function Kk(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class fs{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new qk(t,n);if(r.next==null)return fs.empty;let i=sg(r);r.next&&r.err("Unexpected trailing text");let o=e8(Zk(i));return t8(o,r),o}matchType(t){for(let n=0;n<this.next.length;n++)if(this.next[n].type==t)return this.next[n].next;return null}matchFragment(t,n=0,r=t.childCount){let i=this;for(let o=n;i&&o<r;o++)i=i.matchType(t.child(o).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let t=0;t<this.next.length;t++){let{type:n}=this.next[t];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(t){for(let n=0;n<this.next.length;n++)for(let r=0;r<t.next.length;r++)if(this.next[n].type==t.next[r].type)return!0;return!1}fillBefore(t,n=!1,r=0){let i=[this];function o(s,a){let l=s.matchFragment(t,r);if(l&&(!n||l.validEnd))return K.from(a.map(c=>c.createAndFill()));for(let c=0;c<s.next.length;c++){let{type:u,next:f}=s.next[c];if(!(u.isText||u.hasRequiredAttrs())&&i.indexOf(f)==-1){i.push(f);let h=o(f,a.concat(u));if(h)return h}}return null}return o(this,[])}findWrapping(t){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==t)return this.wrapCache[r+1];let n=this.computeWrapping(t);return this.wrapCache.push(t,n),n}computeWrapping(t){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),o=i.match;if(o.matchType(t)){let s=[];for(let a=i;a.type;a=a.via)s.push(a.type);return s.reverse()}for(let s=0;s<o.next.length;s++){let{type:a,next:l}=o.next[s];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in n)&&(!i.type||l.validEnd)&&(r.push({match:a.contentMatch,type:a,via:i}),n[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(t){if(t>=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function n(r){t.push(r);for(let i=0;i<r.next.length;i++)t.indexOf(r.next[i].next)==-1&&n(r.next[i].next)}return n(this),t.map((r,i)=>{let o=i+(r.validEnd?"*":" ")+" ";for(let s=0;s<r.next.length;s++)o+=(s?", ":"")+r.next[s].type.name+"->"+t.indexOf(r.next[s].next);return o}).join(`
`)}}fs.empty=new fs(!0);class qk{constructor(t,n){this.string=t,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=t.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(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function sg(e){let t=[];do t.push(Jk(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function Jk(e){let t=[];do t.push(Gk(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function Gk(e){let t=Qk(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=Yk(e,t);else break;return t}function ag(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function Yk(e,t){let n=ag(e),r=n;return e.eat(",")&&(e.next!="}"?r=ag(e):r=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function Xk(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let i=[];for(let o in n){let s=n[o];s.groups.indexOf(t)>-1&&i.push(s)}return i.length==0&&e.err("No node type or group '"+t+"' found"),i}function Qk(e){if(e.eat("(")){let t=sg(e);return e.eat(")")||e.err("Missing closing paren"),t}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=Xk(e,e.next).map(n=>(e.inline==null?e.inline=n.isInline:e.inline!=n.isInline&&e.err("Mixing inline and block content"),{type:"name",value:n}));return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function Zk(e){let t=[[]];return i(o(e,0),n()),t;function n(){return t.push([])-1}function r(s,a,l){let c={term:l,to:a};return t[s].push(c),c}function i(s,a){s.forEach(l=>l.to=a)}function o(s,a){if(s.type=="choice")return s.exprs.reduce((l,c)=>l.concat(o(c,a)),[]);if(s.type=="seq")for(let l=0;;l++){let c=o(s.exprs[l],a);if(l==s.exprs.length-1)return c;i(c,a=n())}else if(s.type=="star"){let l=n();return r(a,l),i(o(s.expr,l),l),[r(l)]}else if(s.type=="plus"){let l=n();return i(o(s.expr,a),l),i(o(s.expr,l),l),[r(l)]}else{if(s.type=="opt")return[r(a)].concat(o(s.expr,a));if(s.type=="range"){let l=a;for(let c=0;c<s.min;c++){let u=n();i(o(s.expr,l),u),l=u}if(s.max==-1)i(o(s.expr,l),l);else for(let c=s.min;c<s.max;c++){let u=n();r(l,u),i(o(s.expr,l),u),l=u}return[r(l)]}else{if(s.type=="name")return[r(a,void 0,s.value)];throw new Error("Unknown expr type")}}}}function lg(e,t){return t-e}function cg(e,t){let n=[];return r(t),n.sort(lg);function r(i){let o=e[i];if(o.length==1&&!o[0].term)return r(o[0].to);n.push(i);for(let s=0;s<o.length;s++){let{term:a,to:l}=o[s];!a&&n.indexOf(l)==-1&&r(l)}}}function e8(e){let t=Object.create(null);return n(cg(e,0));function n(r){let i=[];r.forEach(s=>{e[s].forEach(({term:a,to:l})=>{if(!a)return;let c;for(let u=0;u<i.length;u++)i[u][0]==a&&(c=i[u][1]);cg(e,l).forEach(u=>{c||i.push([a,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let o=t[r.join(",")]=new fs(r.indexOf(e.length-1)>-1);for(let s=0;s<i.length;s++){let a=i[s][1].sort(lg);o.next.push({type:i[s][0],next:t[a.join(",")]||n(a)})}return o}}function t8(e,t){for(let n=0,r=[e];n<r.length;n++){let i=r[n],o=!i.validEnd,s=[];for(let a=0;a<i.next.length;a++){let{type:l,next:c}=i.next[a];s.push(l.name),o&&!(l.isText||l.hasRequiredAttrs())&&(o=!1),r.indexOf(c)==-1&&r.push(c)}o&&t.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function n8(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function r8(e,t){let n=Object.create(null);for(let r in e){let i=t&&t[r];if(i===void 0){let o=e[r];if(o.hasDefault)i=o.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=i}return n}function i8(e){let t=Object.create(null);if(e)for(let n in e)t[n]=new o8(e[n]);return t}class o8{constructor(t){this.hasDefault=Object.prototype.hasOwnProperty.call(t,"default"),this.default=t.default}get isRequired(){return!this.hasDefault}}class Ou{constructor(t,n,r,i){this.name=t,this.rank=n,this.schema=r,this.spec=i,this.attrs=i8(i.attrs),this.excluded=null;let o=n8(this.attrs);this.instance=o?new nt(this,o):null}create(t=null){return!t&&this.instance?this.instance:new nt(this,r8(this.attrs,t))}static compile(t,n){let r=Object.create(null),i=0;return t.forEach((o,s)=>r[o]=new Ou(o,i++,n,s)),r}removeFromSet(t){for(var n=0;n<t.length;n++)t[n].type==this&&(t=t.slice(0,n).concat(t.slice(n+1)),n--);return t}isInSet(t){for(let n=0;n<t.length;n++)if(t[n].type==this)return t[n]}excludes(t){return this.excluded.indexOf(t)>-1}}class hs{constructor(t,n){this.schema=t,this.rules=n,this.tags=[],this.styles=[],n.forEach(r=>{r.tag?this.tags.push(r):r.style&&this.styles.push(r)}),this.normalizeLists=!this.tags.some(r=>{if(!/^(ul|ol)\b/.test(r.tag)||!r.node)return!1;let i=t.nodes[r.node];return i.contentMatch.matchType(i)})}parse(t,n={}){let r=new hg(this,n,!1);return r.addAll(t,n.from,n.to),r.finish()}parseSlice(t,n={}){let r=new hg(this,n,!0);return r.addAll(t,n.from,n.to),re.maxOpen(r.finish())}matchTag(t,n,r){for(let i=r?this.tags.indexOf(r)+1:0;i<this.tags.length;i++){let o=this.tags[i];if(l8(t,o.tag)&&(o.namespace===void 0||t.namespaceURI==o.namespace)&&(!o.context||n.matchesContext(o.context))){if(o.getAttrs){let s=o.getAttrs(t);if(s===!1)continue;o.attrs=s||void 0}return o}}}matchStyle(t,n,r,i){for(let o=i?this.styles.indexOf(i)+1:0;o<this.styles.length;o++){let s=this.styles[o],a=s.style;if(!(a.indexOf(t)!=0||s.context&&!r.matchesContext(s.context)||a.length>t.length&&(a.charCodeAt(t.length)!=61||a.slice(t.length+1)!=n))){if(s.getAttrs){let l=s.getAttrs(n);if(l===!1)continue;s.attrs=l||void 0}return s}}}static schemaRules(t){let n=[];function r(i){let o=i.priority==null?50:i.priority,s=0;for(;s<n.length;s++){let a=n[s];if((a.priority==null?50:a.priority)<o)break}n.splice(s,0,i)}for(let i in t.marks){let o=t.marks[i].spec.parseDOM;o&&o.forEach(s=>{r(s=pg(s)),s.mark||s.ignore||s.clearMark||(s.mark=i)})}for(let i in t.nodes){let o=t.nodes[i].spec.parseDOM;o&&o.forEach(s=>{r(s=pg(s)),s.node||s.ignore||s.mark||(s.node=i)})}return n}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new hs(t,hs.schemaRules(t)))}}const ug={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},s8={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},dg={ol:!0,ul:!0},Ia=1,$a=2,ps=4;function fg(e,t,n){return t!=null?(t?Ia:0)|(t==="full"?$a:0):e&&e.whitespace=="pre"?Ia|$a:n&~ps}class Ba{constructor(t,n,r,i,o,s,a){this.type=t,this.attrs=n,this.marks=r,this.pendingMarks=i,this.solid=o,this.options=a,this.content=[],this.activeMarks=nt.none,this.stashMarks=[],this.match=s||(a&ps?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(K.from(t));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,i;return(i=r.findWrapping(t.type))?(this.match=r,i):null}}return this.match.findWrapping(t.type)}finish(t){if(!(this.options&Ia)){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 n=K.from(this.content);return!t&&this.match&&(n=n.append(this.match.fillBefore(K.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}popFromStashMark(t){for(let n=this.stashMarks.length-1;n>=0;n--)if(t.eq(this.stashMarks[n]))return this.stashMarks.splice(n,1)[0]}applyPending(t){for(let n=0,r=this.pendingMarks;n<r.length;n++){let i=r[n];(this.type?this.type.allowsMarkType(i.type):u8(i.type,t))&&!i.isInSet(this.activeMarks)&&(this.activeMarks=i.addToSet(this.activeMarks),this.pendingMarks=i.removeFromSet(this.pendingMarks))}}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!ug.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}}class hg{constructor(t,n,r){this.parser=t,this.options=n,this.isOpen=r,this.open=0;let i=n.topNode,o,s=fg(null,n.preserveWhitespace,0)|(r?ps:0);i?o=new Ba(i.type,i.attrs,nt.none,nt.none,!0,n.topMatch||i.type.contentMatch,s):r?o=new Ba(null,null,nt.none,nt.none,!0,null,s):o=new Ba(t.schema.topNodeType,null,nt.none,nt.none,!0,null,s),this.nodes=[o],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t){if(t.nodeType==3)this.addTextNode(t);else if(t.nodeType==1){let n=t.getAttribute("style");if(!n)this.addElement(t);else{let r=this.readStyles(c8(n));if(!r)return;let[i,o]=r,s=this.top;for(let a=0;a<o.length;a++)this.removePendingMark(o[a],s);for(let a=0;a<i.length;a++)this.addPendingMark(i[a]);this.addElement(t);for(let a=0;a<i.length;a++)this.removePendingMark(i[a],s);for(let a=0;a<o.length;a++)this.addPendingMark(o[a])}}}addTextNode(t){let n=t.nodeValue,r=this.top;if(r.options&$a||r.inlineContext(t)||/[^ \t\r\n\u000c]/.test(n)){if(r.options&Ia)r.options&$a?n=n.replace(/\r\n?/g,`
`):n=n.replace(/\r?\n|\r/g," ");else if(n=n.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let i=r.content[r.content.length-1],o=t.previousSibling;(!i||o&&o.nodeName=="BR"||i.isText&&/[ \t\r\n\u000c]$/.test(i.text))&&(n=n.slice(1))}n&&this.insertNode(this.parser.schema.text(n)),this.findInText(t)}else this.findInside(t)}addElement(t,n){let r=t.nodeName.toLowerCase(),i;dg.hasOwnProperty(r)&&this.parser.normalizeLists&&a8(t);let o=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(i=this.parser.matchTag(t,this,n));if(o?o.ignore:s8.hasOwnProperty(r))this.findInside(t),this.ignoreFallback(t);else if(!o||o.skip||o.closeParent){o&&o.closeParent?this.open=Math.max(0,this.open-1):o&&o.skip.nodeType&&(t=o.skip);let s,a=this.top,l=this.needsBlock;if(ug.hasOwnProperty(r))a.content.length&&a.content[0].isInline&&this.open&&(this.open--,a=this.top),s=!0,a.type||(this.needsBlock=!0);else if(!t.firstChild){this.leafFallback(t);return}this.addAll(t),s&&this.sync(a),this.needsBlock=l}else this.addElementByRule(t,o,o.consuming===!1?i:void 0)}leafFallback(t){t.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode(`
`))}ignoreFallback(t){t.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"))}readStyles(t){let n=nt.none,r=nt.none;e:for(let i=0;i<t.length;i+=2)for(let o=void 0;;){let s=this.parser.matchStyle(t[i],t[i+1],this,o);if(!s)continue e;if(s.ignore)return null;if(s.clearMark?this.top.pendingMarks.forEach(a=>{s.clearMark(a)&&(r=a.addToSet(r))}):n=this.parser.schema.marks[s.mark].create(s.attrs).addToSet(n),s.consuming===!1)o=s;else break}return[n,r]}addElementByRule(t,n,r){let i,o,s;n.node?(o=this.parser.schema.nodes[n.node],o.isLeaf?this.insertNode(o.create(n.attrs))||this.leafFallback(t):i=this.enter(o,n.attrs||null,n.preserveWhitespace)):(s=this.parser.schema.marks[n.mark].create(n.attrs),this.addPendingMark(s));let a=this.top;if(o&&o.isLeaf)this.findInside(t);else if(r)this.addElement(t,r);else if(n.getContent)this.findInside(t),n.getContent(t,this.parser.schema).forEach(l=>this.insertNode(l));else{let l=t;typeof n.contentElement=="string"?l=t.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(t):n.contentElement&&(l=n.contentElement),this.findAround(t,l,!0),this.addAll(l)}i&&this.sync(a)&&this.open--,s&&this.removePendingMark(s,a)}addAll(t,n,r){let i=n||0;for(let o=n?t.childNodes[n]:t.firstChild,s=r==null?null:t.childNodes[r];o!=s;o=o.nextSibling,++i)this.findAtPoint(t,i),this.addDOM(o);this.findAtPoint(t,i)}findPlace(t){let n,r;for(let i=this.open;i>=0;i--){let o=this.nodes[i],s=o.findWrapping(t);if(s&&(!n||n.length>s.length)&&(n=s,r=o,!s.length)||o.solid)break}if(!n)return!1;this.sync(r);for(let i=0;i<n.length;i++)this.enterInner(n[i],null,!1);return!0}insertNode(t){if(t.isInline&&this.needsBlock&&!this.top.type){let n=this.textblockFromContext();n&&this.enterInner(n)}if(this.findPlace(t)){this.closeExtra();let n=this.top;n.applyPending(t.type),n.match&&(n.match=n.match.matchType(t.type));let r=n.activeMarks;for(let i=0;i<t.marks.length;i++)(!n.type||n.type.allowsMarkType(t.marks[i].type))&&(r=t.marks[i].addToSet(r));return n.content.push(t.mark(r)),!0}return!1}enter(t,n,r){let i=this.findPlace(t.create(n));return i&&this.enterInner(t,n,!0,r),i}enterInner(t,n=null,r=!1,i){this.closeExtra();let o=this.top;o.applyPending(t),o.match=o.match&&o.match.matchType(t);let s=fg(t,i,o.options);o.options&ps&&o.content.length==0&&(s|=ps),this.nodes.push(new Ba(t,n,o.activeMarks,o.pendingMarks,r,null,s)),this.open++}closeExtra(t=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(t));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(t){for(let n=this.open;n>=0;n--)if(this.nodes[n]==t)return this.open=n,!0;return!1}get currentPos(){this.closeExtra();let t=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let i=r.length-1;i>=0;i--)t+=r[i].nodeSize;n&&t++}return t}findAtPoint(t,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==t&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&t.nodeType==1&&t.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(t,n,r){if(t!=n&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&t.nodeType==1&&t.contains(this.find[i].node)&&n.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].pos=this.currentPos)}findInText(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==t&&(this.find[n].pos=this.currentPos-(t.nodeValue.length-this.find[n].offset))}matchesContext(t){if(t.indexOf("|")>-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let n=t.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=(a,l)=>{for(;a>=0;a--){let c=n[a];if(c==""){if(a==n.length-1||a==0)continue;for(;l>=o;l--)if(s(a-1,l))return!0;return!1}else{let u=l>0||l==0&&i?this.nodes[l].type:r&&l>=o?r.node(l-o).type:null;if(!u||u.name!=c&&u.groups.indexOf(c)==-1)return!1;l--}}return!0};return s(n.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}addPendingMark(t){let n=d8(t,this.top.pendingMarks);n&&this.top.stashMarks.push(n),this.top.pendingMarks=t.addToSet(this.top.pendingMarks)}removePendingMark(t,n){for(let r=this.open;r>=0;r--){let i=this.nodes[r];if(i.pendingMarks.lastIndexOf(t)>-1)i.pendingMarks=t.removeFromSet(i.pendingMarks);else{i.activeMarks=t.removeFromSet(i.activeMarks);let s=i.popFromStashMark(t);s&&i.type&&i.type.allowsMarkType(s.type)&&(i.activeMarks=s.addToSet(i.activeMarks))}if(i==n)break}}}function a8(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let r=t.nodeType==1?t.nodeName.toLowerCase():null;r&&dg.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):r=="li"?n=t:r&&(n=null)}}function l8(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function c8(e){let t=/\s*([\w-]+)\s*:\s*([^;]+)/g,n,r=[];for(;n=t.exec(e);)r.push(n[1],n[2].trim());return r}function pg(e){let t={};for(let n in e)t[n]=e[n];return t}function u8(e,t){let n=t.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(e))continue;let o=[],s=a=>{o.push(a);for(let l=0;l<a.edgeCount;l++){let{type:c,next:u}=a.edge(l);if(c==t||o.indexOf(u)<0&&s(u))return!0}};if(s(i.contentMatch))return!0}}function d8(e,t){for(let n=0;n<t.length;n++)if(e.eq(t[n]))return t[n]}class ci{constructor(t,n){this.nodes=t,this.marks=n}serializeFragment(t,n={},r){r||(r=Tu(n).createDocumentFragment());let i=r,o=[];return t.forEach(s=>{if(o.length||s.marks.length){let a=0,l=0;for(;a<o.length&&l<s.marks.length;){let c=s.marks[l];if(!this.marks[c.type.name]){l++;continue}if(!c.eq(o[a][0])||c.type.spec.spanning===!1)break;a++,l++}for(;a<o.length;)i=o.pop()[1];for(;l<s.marks.length;){let c=s.marks[l++],u=this.serializeMark(c,s.isInline,n);u&&(o.push([c,i]),i.appendChild(u.dom),i=u.contentDOM||u.dom)}}i.appendChild(this.serializeNodeInner(s,n))}),r}serializeNodeInner(t,n){let{dom:r,contentDOM:i}=ci.renderSpec(Tu(n),this.nodes[t.type.name](t));if(i){if(t.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(t.content,n,i)}return r}serializeNode(t,n={}){let r=this.serializeNodeInner(t,n);for(let i=t.marks.length-1;i>=0;i--){let o=this.serializeMark(t.marks[i],t.isInline,n);o&&((o.contentDOM||o.dom).appendChild(r),r=o.dom)}return r}serializeMark(t,n,r={}){let i=this.marks[t.type.name];return i&&ci.renderSpec(Tu(r),i(t,n))}static renderSpec(t,n,r=null){if(typeof n=="string")return{dom:t.createTextNode(n)};if(n.nodeType!=null)return{dom:n};if(n.dom&&n.dom.nodeType!=null)return n;let i=n[0],o=i.indexOf(" ");o>0&&(r=i.slice(0,o),i=i.slice(o+1));let s,a=r?t.createElementNS(r,i):t.createElement(i),l=n[1],c=1;if(l&&typeof l=="object"&&l.nodeType==null&&!Array.isArray(l)){c=2;for(let u in l)if(l[u]!=null){let f=u.indexOf(" ");f>0?a.setAttributeNS(u.slice(0,f),u.slice(f+1),l[u]):a.setAttribute(u,l[u])}}for(let u=c;u<n.length;u++){let f=n[u];if(f===0){if(u<n.length-1||u>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}else{let{dom:h,contentDOM:p}=ci.renderSpec(t,f,r);if(a.appendChild(h),p){if(s)throw new RangeError("Multiple content holes");s=p}}}return{dom:a,contentDOM:s}}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new ci(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let n=mg(t.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(t){return mg(t.marks)}}function mg(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function Tu(e){return e.document||window.document}const gg=65535,yg=Math.pow(2,16);function f8(e,t){return e+t*yg}function vg(e){return e&gg}function h8(e){return(e-(e&gg))/yg}const bg=1,wg=2,Ha=4,xg=8;class Pu{constructor(t,n,r){this.pos=t,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&xg)>0}get deletedBefore(){return(this.delInfo&(bg|Ha))>0}get deletedAfter(){return(this.delInfo&(wg|Ha))>0}get deletedAcross(){return(this.delInfo&Ha)>0}}class pn{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&pn.empty)return pn.empty}recover(t){let n=0,r=vg(t);if(!this.inverted)for(let i=0;i<r;i++)n+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[r*3]+n+h8(t)}mapResult(t,n=1){return this._map(t,n,!1)}map(t,n=1){return this._map(t,n,!0)}_map(t,n,r){let i=0,o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?i:0);if(l>t)break;let c=this.ranges[a+o],u=this.ranges[a+s],f=l+c;if(t<=f){let h=c?t==l?-1:t==f?1:n:n,p=l+i+(h<0?0:u);if(r)return p;let g=t==(n<0?l:f)?null:f8(a/3,t-l),v=t==l?wg:t==f?bg:Ha;return(n<0?t!=l:t!=f)&&(v|=xg),new Pu(p,v,g)}i+=u-c}return r?t+i:new Pu(t+i,0,null)}touches(t,n){let r=0,i=vg(n),o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?r:0);if(l>t)break;let c=this.ranges[a+o],u=l+c;if(t<=u&&a==i*3)return!0;r+=this.ranges[a+s]-c}return!1}forEach(t){let n=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,o=0;i<this.ranges.length;i+=3){let s=this.ranges[i],a=s-(this.inverted?o:0),l=s+(this.inverted?0:o),c=this.ranges[i+n],u=this.ranges[i+r];t(a,a+c,l,l+u),o+=u-c}}invert(){return new pn(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return t==0?pn.empty:new pn(t<0?[0,-t,0]:[0,0,t])}}pn.empty=new pn([]);class Xi{constructor(t=[],n,r=0,i=t.length){this.maps=t,this.mirror=n,this.from=r,this.to=i}slice(t=0,n=this.maps.length){return new Xi(this.maps,this.mirror,t,n)}copy(){return new Xi(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(t,n){this.to=this.maps.push(t),n!=null&&this.setMirror(this.maps.length-1,n)}appendMapping(t){for(let n=0,r=this.maps.length;n<t.maps.length;n++){let i=t.getMirror(n);this.appendMap(t.maps[n],i!=null&&i<n?r+i:void 0)}}getMirror(t){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==t)return this.mirror[n+(n%2?-1:1)]}}setMirror(t,n){this.mirror||(this.mirror=[]),this.mirror.push(t,n)}appendMappingInverted(t){for(let n=t.maps.length-1,r=this.maps.length+t.maps.length;n>=0;n--){let i=t.getMirror(n);this.appendMap(t.maps[n].invert(),i!=null&&i>n?r-i-1:void 0)}}invert(){let t=new Xi;return t.appendMappingInverted(this),t}map(t,n=1){if(this.mirror)return this._map(t,n,!0);for(let r=this.from;r<this.to;r++)t=this.maps[r].map(t,n);return t}mapResult(t,n=1){return this._map(t,n,!1)}_map(t,n,r){let i=0;for(let o=this.from;o<this.to;o++){let s=this.maps[o],a=s.mapResult(t,n);if(a.recover!=null){let l=this.getMirror(o);if(l!=null&&l>o&&l<this.to){o=l,t=this.maps[l].recover(a.recover);continue}}i|=a.delInfo,t=a.pos}return r?t:new Pu(t,i,null)}}const Ru=Object.create(null);class Ut{getMap(){return pn.empty}merge(t){return null}static fromJSON(t,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=Ru[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in Ru)throw new RangeError("Duplicate use of step JSON ID "+t);return Ru[t]=n,n.prototype.jsonID=t,n}}class mt{constructor(t,n){this.doc=t,this.failed=n}static ok(t){return new mt(t,null)}static fail(t){return new mt(null,t)}static fromReplace(t,n,r,i){try{return mt.ok(t.replace(n,r,i))}catch(o){if(o instanceof ja)return mt.fail(o.message);throw o}}}function ju(e,t,n){let r=[];for(let i=0;i<e.childCount;i++){let o=e.child(i);o.content.size&&(o=o.copy(ju(o.content,t,o))),o.isInline&&(o=t(o,n,i)),r.push(o)}return K.fromArray(r)}class vr extends Ut{constructor(t,n,r){super();this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=t.resolve(this.from),i=r.node(r.sharedDepth(this.to)),o=new re(ju(n.content,(s,a)=>!s.isAtom||!a.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),i),n.openStart,n.openEnd);return mt.fromReplace(t,this.from,this.to,o)}invert(){return new Hn(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new vr(n.pos,r.pos,this.mark)}merge(t){return t instanceof vr&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new vr(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new vr(n.from,n.to,t.markFromJSON(n.mark))}}Ut.jsonID("addMark",vr);class Hn extends Ut{constructor(t,n,r){super();this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=new re(ju(n.content,i=>i.mark(this.mark.removeFromSet(i.marks)),t),n.openStart,n.openEnd);return mt.fromReplace(t,this.from,this.to,r)}invert(){return new vr(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Hn(n.pos,r.pos,this.mark)}merge(t){return t instanceof Hn&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Hn(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Hn(n.from,n.to,t.markFromJSON(n.mark))}}Ut.jsonID("removeMark",Hn);class br extends Ut{constructor(t,n){super();this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return mt.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return mt.fromReplace(t,this.pos,this.pos+1,new re(K.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let i=0;i<n.marks.length;i++)if(!n.marks[i].isInSet(r))return new br(this.pos,n.marks[i]);return new br(this.pos,this.mark)}}return new Qi(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new br(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new br(n.pos,t.markFromJSON(n.mark))}}Ut.jsonID("addNodeMark",br);class Qi extends Ut{constructor(t,n){super();this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return mt.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return mt.fromReplace(t,this.pos,this.pos+1,new re(K.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new br(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new Qi(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Qi(n.pos,t.markFromJSON(n.mark))}}Ut.jsonID("removeNodeMark",Qi);class jt extends Ut{constructor(t,n,r,i=!1){super();this.from=t,this.to=n,this.slice=r,this.structure=i}apply(t){return this.structure&&Nu(t,this.from,this.to)?mt.fail("Structure replace would overwrite content"):mt.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new pn([this.from,this.to-this.from,this.slice.size])}invert(t){return new jt(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deletedAcross&&r.deletedAcross?null:new jt(n.pos,Math.max(n.pos,r.pos),this.slice)}merge(t){if(!(t instanceof jt)||t.structure||this.structure)return null;if(this.from+this.slice.size==t.from&&!this.slice.openEnd&&!t.slice.openStart){let n=this.slice.size+t.slice.size==0?re.empty:new re(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new jt(this.from,this.to+(t.to-t.from),n,this.structure)}else if(t.to==this.from&&!this.slice.openStart&&!t.slice.openEnd){let n=this.slice.size+t.slice.size==0?re.empty:new re(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new jt(t.from,this.to,n,this.structure)}else return null}toJSON(){let t={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new jt(n.from,n.to,re.fromJSON(t,n.slice),!!n.structure)}}Ut.jsonID("replace",jt);class _t extends Ut{constructor(t,n,r,i,o,s,a=!1){super();this.from=t,this.to=n,this.gapFrom=r,this.gapTo=i,this.slice=o,this.insert=s,this.structure=a}apply(t){if(this.structure&&(Nu(t,this.from,this.gapFrom)||Nu(t,this.gapTo,this.to)))return mt.fail("Structure gap-replace would overwrite content");let n=t.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return mt.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?mt.fromReplace(t,this.from,this.to,r):mt.fail("Content does not fit in gap")}getMap(){return new pn([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let n=this.gapTo-this.gapFrom;return new _t(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1),i=t.map(this.gapFrom,-1),o=t.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||o>r.pos?null:new _t(n.pos,r.pos,i,o,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new _t(n.from,n.to,n.gapFrom,n.gapTo,re.fromJSON(t,n.slice),n.insert,!!n.structure)}}Ut.jsonID("replaceAround",_t);function Nu(e,t,n){let r=e.resolve(t),i=n-t,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 p8(e,t,n,r){let i=[],o=[],s,a;e.doc.nodesBetween(t,n,(l,c,u)=>{if(!l.isInline)return;let f=l.marks;if(!r.isInSet(f)&&u.type.allowsMarkType(r.type)){let h=Math.max(c,t),p=Math.min(c+l.nodeSize,n),g=r.addToSet(f);for(let v=0;v<f.length;v++)f[v].isInSet(g)||(s&&s.to==h&&s.mark.eq(f[v])?s.to=p:i.push(s=new Hn(h,p,f[v])));a&&a.to==h?a.to=p:o.push(a=new vr(h,p,r))}}),i.forEach(l=>e.step(l)),o.forEach(l=>e.step(l))}function m8(e,t,n,r){let i=[],o=0;e.doc.nodesBetween(t,n,(s,a)=>{if(!s.isInline)return;o++;let l=null;if(r instanceof Ou){let c=s.marks,u;for(;u=r.isInSet(c);)(l||(l=[])).push(u),c=u.removeFromSet(c)}else r?r.isInSet(s.marks)&&(l=[r]):l=s.marks;if(l&&l.length){let c=Math.min(a+s.nodeSize,n);for(let u=0;u<l.length;u++){let f=l[u],h;for(let p=0;p<i.length;p++){let g=i[p];g.step==o-1&&f.eq(i[p].style)&&(h=g)}h?(h.to=c,h.step=o):i.push({style:f,from:Math.max(a,t),to:c,step:o})}}}),i.forEach(s=>e.step(new Hn(s.from,s.to,s.style)))}function g8(e,t,n,r=n.contentMatch){let i=e.doc.nodeAt(t),o=[],s=t+1;for(let a=0;a<i.childCount;a++){let l=i.child(a),c=s+l.nodeSize,u=r.matchType(l.type);if(!u)o.push(new jt(s,c,re.empty));else{r=u;for(let f=0;f<l.marks.length;f++)n.allowsMarkType(l.marks[f].type)||e.step(new Hn(s,c,l.marks[f]))}s=c}if(!r.validEnd){let a=r.fillBefore(K.empty,!0);e.replace(s,s,new re(a,0,0))}for(let a=o.length-1;a>=0;a--)e.step(o[a])}function y8(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function Zi(e){let n=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let r=e.depth;;--r){let i=e.$from.node(r),o=e.$from.index(r),s=e.$to.indexAfter(r);if(r<e.depth&&i.canReplace(o,s,n))return r;if(r==0||i.type.spec.isolating||!y8(i,o,s))break}return null}function v8(e,t,n){let{$from:r,$to:i,depth:o}=t,s=r.before(o+1),a=i.after(o+1),l=s,c=a,u=K.empty,f=0;for(let g=o,v=!1;g>n;g--)v||r.index(g)>0?(v=!0,u=K.from(r.node(g).copy(u)),f++):l--;let h=K.empty,p=0;for(let g=o,v=!1;g>n;g--)v||i.after(g+1)<i.end(g)?(v=!0,h=K.from(i.node(g).copy(h)),p++):c++;e.step(new _t(l,c,s,a,new re(u.append(h),f,p),u.size-f,!0))}function Lu(e,t,n=null,r=e){let i=b8(e,t),o=i&&w8(r,t);return o?i.map(kg).concat({type:t,attrs:n}).concat(o.map(kg)):null}function kg(e){return{type:e,attrs:null}}function b8(e,t){let{parent:n,startIndex:r,endIndex:i}=e,o=n.contentMatchAt(r).findWrapping(t);if(!o)return null;let s=o.length?o[0]:t;return n.canReplaceWith(r,i,s)?o:null}function w8(e,t){let{parent:n,startIndex:r,endIndex:i}=e,o=n.child(r),s=t.contentMatch.findWrapping(o.type);if(!s)return null;let l=(s.length?s[s.length-1]:t).contentMatch;for(let c=r;l&&c<i;c++)l=l.matchType(n.child(c).type);return!l||!l.validEnd?null:s}function x8(e,t,n){let r=K.empty;for(let s=n.length-1;s>=0;s--){if(r.size){let a=n[s].type.contentMatch.matchFragment(r);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=K.from(n[s].type.create(n[s].attrs,r))}let i=t.start,o=t.end;e.step(new _t(i,o,i,o,new re(r,0,0),n.length,!0))}function k8(e,t,n,r,i){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let o=e.steps.length;e.doc.nodesBetween(t,n,(s,a)=>{if(s.isTextblock&&!s.hasMarkup(r,i)&&S8(e.doc,e.mapping.slice(o).map(a),r)){e.clearIncompatible(e.mapping.slice(o).map(a,1),r);let l=e.mapping.slice(o),c=l.map(a,1),u=l.map(a+s.nodeSize,1);return e.step(new _t(c,u,c+1,u-1,new re(K.from(r.create(i,null,s.marks)),0,0),1,!0)),!1}})}function S8(e,t,n){let r=e.resolve(t),i=r.index();return r.parent.canReplaceWith(i,i+1,n)}function C8(e,t,n,r,i){let o=e.doc.nodeAt(t);if(!o)throw new RangeError("No node at given position");n||(n=o.type);let s=n.create(r,null,i||o.marks);if(o.isLeaf)return e.replaceWith(t,t+o.nodeSize,s);if(!n.validContent(o.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new _t(t,t+o.nodeSize,t+1,t+o.nodeSize-1,new re(K.from(s),0,0),1,!0))}function tr(e,t,n=1,r){let i=e.resolve(t),o=i.depth-n,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=n-2;c>o;c--,u--){let f=i.node(c),h=i.index(c);if(f.type.spec.isolating)return!1;let p=f.content.cutByIndex(h,f.childCount),g=r&&r[u]||f;if(g!=f&&(p=p.replaceChild(0,g.type.create(g.attrs))),!f.canReplace(h+1,f.childCount)||!g.type.validContent(p))return!1}let a=i.indexAfter(o),l=r&&r[0];return i.node(o).canReplaceWith(a,a,l?l.type:i.node(o+1).type)}function _8(e,t,n=1,r){let i=e.doc.resolve(t),o=K.empty,s=K.empty;for(let a=i.depth,l=i.depth-n,c=n-1;a>l;a--,c--){o=K.from(i.node(a).copy(o));let u=r&&r[c];s=K.from(u?u.type.create(u.attrs,s):i.node(a).copy(s))}e.step(new jt(t,t,new re(o.append(s),n,n),!0))}function wr(e,t){let n=e.resolve(t),r=n.index();return Sg(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function Sg(e,t){return!!(e&&t&&!e.isLeaf&&e.canAppend(t))}function za(e,t,n=-1){let r=e.resolve(t);for(let i=r.depth;;i--){let o,s,a=r.index(i);if(i==r.depth?(o=r.nodeBefore,s=r.nodeAfter):n>0?(o=r.node(i+1),a++,s=r.node(i).maybeChild(a)):(o=r.node(i).maybeChild(a-1),s=r.node(i+1)),o&&!o.isTextblock&&Sg(o,s)&&r.node(i).canReplace(a,a+1))return t;if(i==0)break;t=n<0?r.before(i):r.after(i)}}function M8(e,t,n){let r=new jt(t-n,t+n,re.empty,!0);e.step(r)}function A8(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;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,n))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,n))return r.after(i+1);if(o<r.node(i).childCount)return null}return null}function Cg(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let i=n.content;for(let o=0;o<n.openStart;o++)i=i.firstChild.content;for(let o=1;o<=(n.openStart==0&&n.size?2:1);o++)for(let s=r.depth;s>=0;s--){let a=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,l=r.index(s)+(a>0?1:0),c=r.node(s),u=!1;if(o==1)u=c.canReplace(l,l,i);else{let f=c.contentMatchAt(l).findWrapping(i.firstChild.type);u=f&&c.canReplaceWith(l,l,f[0])}if(u)return a==0?r.pos:a<0?r.before(s+1):r.after(s+1)}return null}function Du(e,t,n=t,r=re.empty){if(t==n&&!r.size)return null;let i=e.resolve(t),o=e.resolve(n);return _g(i,o,r)?new jt(t,n,r):new E8(i,o,r).fit()}function _g(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}class E8{constructor(t,n,r){this.$from=t,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=K.empty;for(let i=0;i<=t.depth;i++){let o=t.node(i);this.frontier.push({type:o.type,match:o.contentMatchAt(t.indexAfter(i))})}for(let i=t.depth;i>0;i--)this.placed=K.from(t.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 t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,i=this.close(t<0?this.$to:r.doc.resolve(t));if(!i)return null;let o=this.placed,s=r.depth,a=i.depth;for(;s&&a&&o.childCount==1;)o=o.firstChild.content,s--,a--;let l=new re(o,s,a);return t>-1?new _t(r.pos,t,this.$to.pos,this.$to.end(),l,n):l.size||r.pos!=this.$to.pos?new jt(r.pos,i.pos,l):null}findFittable(){let t=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,i=this.unplaced.openEnd;r<t;r++){let o=n.firstChild;if(n.childCount>1&&(i=0),o.type.spec.isolating&&i<=r){t=r;break}n=o.content}for(let n=1;n<=2;n++)for(let r=n==1?t:this.unplaced.openStart;r>=0;r--){let i,o=null;r?(o=Iu(this.unplaced.content,r-1).firstChild,i=o.content):i=this.unplaced.content;let s=i.firstChild;for(let a=this.depth;a>=0;a--){let{type:l,match:c}=this.frontier[a],u,f=null;if(n==1&&(s?c.matchType(s.type)||(f=c.fillBefore(K.from(s),!1)):o&&l.compatibleContent(o.type)))return{sliceDepth:r,frontierDepth:a,parent:o,inject:f};if(n==2&&s&&(u=c.findWrapping(s.type)))return{sliceDepth:r,frontierDepth:a,parent:o,wrap:u};if(o&&c.matchType(o.type))break}}}openMore(){let{content:t,openStart:n,openEnd:r}=this.unplaced,i=Iu(t,n);return!i.childCount||i.firstChild.isLeaf?!1:(this.unplaced=new re(t,n+1,Math.max(r,i.size+n>=t.size-r?n+1:0)),!0)}dropNode(){let{content:t,openStart:n,openEnd:r}=this.unplaced,i=Iu(t,n);if(i.childCount<=1&&n>0){let o=t.size-n<=n+i.size;this.unplaced=new re(ms(t,n-1,1),n-1,o?n-1:r)}else this.unplaced=new re(ms(t,n,1),n,r)}placeNodes({sliceDepth:t,frontierDepth:n,parent:r,inject:i,wrap:o}){for(;this.depth>n;)this.closeFrontierNode();if(o)for(let v=0;v<o.length;v++)this.openFrontierNode(o[v]);let s=this.unplaced,a=r?r.content:s.content,l=s.openStart-t,c=0,u=[],{match:f,type:h}=this.frontier[n];if(i){for(let v=0;v<i.childCount;v++)u.push(i.child(v));f=f.matchFragment(i)}let p=a.size+t-(s.content.size-s.openEnd);for(;c<a.childCount;){let v=a.child(c),b=f.matchType(v.type);if(!b)break;c++,(c>1||l==0||v.content.size)&&(f=b,u.push(Mg(v.mark(h.allowedMarks(v.marks)),c==1?l:0,c==a.childCount?p:-1)))}let g=c==a.childCount;g||(p=-1),this.placed=gs(this.placed,n,K.from(u)),this.frontier[n].match=f,g&&p<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let v=0,b=a;v<p;v++){let w=b.lastChild;this.frontier.push({type:w.type,match:w.contentMatchAt(w.childCount)}),b=w.content}this.unplaced=g?t==0?re.empty:new re(ms(s.content,t-1,1),t-1,p<0?s.openEnd:t-1):new re(ms(s.content,t,c),s.openStart,s.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let t=this.frontier[this.depth],n;if(!t.type.isTextblock||!$u(this.$to,this.$to.depth,t.type,t.match,!1)||this.$to.depth==this.depth&&(n=this.findCloseLevel(this.$to))&&n.depth==this.depth)return-1;let{depth:r}=this.$to,i=this.$to.after(r);for(;r>1&&i==this.$to.end(--r);)++i;return i}findCloseLevel(t){e:for(let n=Math.min(this.depth,t.depth);n>=0;n--){let{match:r,type:i}=this.frontier[n],o=n<t.depth&&t.end(n+1)==t.pos+(t.depth-(n+1)),s=$u(t,n,i,r,o);if(!!s){for(let a=n-1;a>=0;a--){let{match:l,type:c}=this.frontier[a],u=$u(t,a,c,l,!0);if(!u||u.childCount)continue e}return{depth:n,fit:s,move:o?t.doc.resolve(t.after(n+1)):t}}}}close(t){let n=this.findCloseLevel(t);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=gs(this.placed,n.depth,n.fit)),t=n.move;for(let r=n.depth+1;r<=t.depth;r++){let i=t.node(r),o=i.type.contentMatch.fillBefore(i.content,!0,t.index(r));this.openFrontierNode(i.type,i.attrs,o)}return t}openFrontierNode(t,n=null,r){let i=this.frontier[this.depth];i.match=i.match.matchType(t),this.placed=gs(this.placed,this.depth,K.from(t.create(n,r))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(K.empty,!0);n.childCount&&(this.placed=gs(this.placed,this.frontier.length,n))}}function ms(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(ms(e.firstChild.content,t-1,n)))}function gs(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(gs(e.lastChild.content,t-1,n)))}function Iu(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function Mg(e,t,n){if(t<=0)return e;let r=e.content;return t>1&&(r=r.replaceChild(0,Mg(r.firstChild,t-1,r.childCount==1?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(K.empty,!0)))),e.copy(r)}function $u(e,t,n,r,i){let o=e.node(t),s=i?e.indexAfter(t):e.index(t);if(s==o.childCount&&!n.compatibleContent(o.type))return null;let a=r.fillBefore(o.content,!0,s);return a&&!O8(n,o.content,s)?a:null}function O8(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}function T8(e){return e.spec.defining||e.spec.definingForContent}function P8(e,t,n,r){if(!r.size)return e.deleteRange(t,n);let i=e.doc.resolve(t),o=e.doc.resolve(n);if(_g(i,o,r))return e.step(new jt(t,n,r));let s=Eg(i,e.doc.resolve(n));s[s.length-1]==0&&s.pop();let a=-(i.depth+1);s.unshift(a);for(let h=i.depth,p=i.pos-1;h>0;h--,p--){let g=i.node(h).type.spec;if(g.defining||g.definingAsContext||g.isolating)break;s.indexOf(h)>-1?a=h:i.before(h)==p&&s.splice(1,0,-h)}let l=s.indexOf(a),c=[],u=r.openStart;for(let h=r.content,p=0;;p++){let g=h.firstChild;if(c.push(g),p==r.openStart)break;h=g.content}for(let h=u-1;h>=0;h--){let p=c[h].type,g=T8(p);if(g&&i.node(l).type!=p)u=h;else if(g||!p.isTextblock)break}for(let h=r.openStart;h>=0;h--){let p=(h+u+1)%(r.openStart+1),g=c[p];if(!!g)for(let v=0;v<s.length;v++){let b=s[(v+l)%s.length],w=!0;b<0&&(w=!1,b=-b);let k=i.node(b-1),A=i.index(b-1);if(k.canReplaceWith(A,A,g.type,g.marks))return e.replace(i.before(b),w?o.after(b):n,new re(Ag(r.content,0,r.openStart,p),p,r.openEnd))}}let f=e.steps.length;for(let h=s.length-1;h>=0&&(e.replace(t,n,r),!(e.steps.length>f));h--){let p=s[h];p<0||(t=i.before(p),n=o.after(p))}}function Ag(e,t,n,r,i){if(t<n){let o=e.firstChild;e=e.replaceChild(0,o.copy(Ag(o.content,t+1,n,r,o)))}if(t>r){let o=i.contentMatchAt(0),s=o.fillBefore(e).append(e);e=s.append(o.matchFragment(s).fillBefore(K.empty,!0))}return e}function R8(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let i=A8(e.doc,t,r.type);i!=null&&(t=n=i)}e.replaceRange(t,n,new re(K.from(r),0,0))}function j8(e,t,n){let r=e.doc.resolve(t),i=e.doc.resolve(n),o=Eg(r,i);for(let s=0;s<o.length;s++){let a=o[s],l=s==o.length-1;if(l&&a==0||r.node(a).type.contentMatch.validEnd)return e.delete(r.start(a),i.end(a));if(a>0&&(l||r.node(a-1).canReplace(r.index(a-1),i.indexAfter(a-1))))return e.delete(r.before(a),i.after(a))}for(let s=1;s<=r.depth&&s<=i.depth;s++)if(t-r.start(s)==r.depth-s&&n>r.end(s)&&i.end(s)-n!=i.depth-s)return e.delete(r.before(s),n);e.delete(t,n)}function Eg(e,t){let n=[],r=Math.min(e.depth,t.depth);for(let i=r;i>=0;i--){let o=e.start(i);if(o<e.pos-(e.depth-i)||t.end(i)>t.pos+(t.depth-i)||e.node(i).type.spec.isolating||t.node(i).type.spec.isolating)break;(o==t.start(i)||i==e.depth&&i==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&i&&t.start(i-1)==o-1)&&n.push(i)}return n}class eo extends Ut{constructor(t,n,r){super();this.pos=t,this.attr=n,this.value=r}apply(t){let n=t.nodeAt(this.pos);if(!n)return mt.fail("No node at attribute step's position");let r=Object.create(null);for(let o in n.attrs)r[o]=n.attrs[o];r[this.attr]=this.value;let i=n.type.create(r,null,n.marks);return mt.fromReplace(t,this.pos,this.pos+1,new re(K.from(i),0,n.isLeaf?0:1))}getMap(){return pn.empty}invert(t){return new eo(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new eo(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new eo(n.pos,n.attr,n.value)}}Ut.jsonID("attr",eo);let to=class extends Error{};to=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n};to.prototype=Object.create(Error.prototype);to.prototype.constructor=to;to.prototype.name="TransformError";class Og{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new Xi}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let n=this.maybeStep(t);if(n.failed)throw new to(n.failed);return this}maybeStep(t){let n=t.apply(this.doc);return n.failed||this.addStep(t,n.doc),n}get docChanged(){return this.steps.length>0}addStep(t,n){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=n}replace(t,n=t,r=re.empty){let i=Du(this.doc,t,n,r);return i&&this.step(i),this}replaceWith(t,n,r){return this.replace(t,n,new re(K.from(r),0,0))}delete(t,n){return this.replace(t,n,re.empty)}insert(t,n){return this.replaceWith(t,t,n)}replaceRange(t,n,r){return P8(this,t,n,r),this}replaceRangeWith(t,n,r){return R8(this,t,n,r),this}deleteRange(t,n){return j8(this,t,n),this}lift(t,n){return v8(this,t,n),this}join(t,n=1){return M8(this,t,n),this}wrap(t,n){return x8(this,t,n),this}setBlockType(t,n=t,r,i=null){return k8(this,t,n,r,i),this}setNodeMarkup(t,n,r=null,i){return C8(this,t,n,r,i),this}setNodeAttribute(t,n,r){return this.step(new eo(t,n,r)),this}addNodeMark(t,n){return this.step(new br(t,n)),this}removeNodeMark(t,n){if(!(n instanceof nt)){let r=this.doc.nodeAt(t);if(!r)throw new RangeError("No node at position "+t);if(n=n.isInSet(r.marks),!n)return this}return this.step(new Qi(t,n)),this}split(t,n=1,r){return _8(this,t,n,r),this}addMark(t,n,r){return p8(this,t,n,r),this}removeMark(t,n,r){return m8(this,t,n,r),this}clearIncompatible(t,n,r){return g8(this,t,n,r),this}}const Bu=Object.create(null);class Se{constructor(t,n,r){this.$anchor=t,this.$head=n,this.ranges=r||[new Tg(t.min(n),t.max(n))]}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 t=this.ranges;for(let n=0;n<t.length;n++)if(t[n].$from.pos!=t[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(t,n=re.empty){let r=n.content.lastChild,i=null;for(let a=0;a<n.openEnd;a++)i=r,r=r.lastChild;let o=t.steps.length,s=this.ranges;for(let a=0;a<s.length;a++){let{$from:l,$to:c}=s[a],u=t.mapping.slice(o);t.replaceRange(u.map(l.pos),u.map(c.pos),a?re.empty:n),a==0&&jg(t,o,(r?r.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(t,n){let r=t.steps.length,i=this.ranges;for(let o=0;o<i.length;o++){let{$from:s,$to:a}=i[o],l=t.mapping.slice(r),c=l.map(s.pos),u=l.map(a.pos);o?t.deleteRange(c,u):(t.replaceRangeWith(c,u,n),jg(t,r,n.isInline?-1:1))}}static findFrom(t,n,r=!1){let i=t.parent.inlineContent?new ke(t):no(t.node(0),t.parent,t.pos,t.index(),n,r);if(i)return i;for(let o=t.depth-1;o>=0;o--){let s=n<0?no(t.node(0),t.node(o),t.before(o+1),t.index(o),n,r):no(t.node(0),t.node(o),t.after(o+1),t.index(o)+1,n,r);if(s)return s}return null}static near(t,n=1){return this.findFrom(t,n)||this.findFrom(t,-n)||new en(t.node(0))}static atStart(t){return no(t,t,0,0,1)||new en(t)}static atEnd(t){return no(t,t,t.content.size,t.childCount,-1)||new en(t)}static fromJSON(t,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=Bu[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in Bu)throw new RangeError("Duplicate use of selection JSON ID "+t);return Bu[t]=n,n.prototype.jsonID=t,n}getBookmark(){return ke.between(this.$anchor,this.$head).getBookmark()}}Se.prototype.visible=!0;class Tg{constructor(t,n){this.$from=t,this.$to=n}}let Pg=!1;function Rg(e){!Pg&&!e.parent.inlineContent&&(Pg=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class ke extends Se{constructor(t,n=t){Rg(t),Rg(n);super(t,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,n){let r=t.resolve(n.map(this.head));if(!r.parent.inlineContent)return Se.near(r);let i=t.resolve(n.map(this.anchor));return new ke(i.parent.inlineContent?i:r,r)}replace(t,n=re.empty){if(super.replace(t,n),n==re.empty){let r=this.$from.marksAcross(this.$to);r&&t.ensureMarks(r)}}eq(t){return t instanceof ke&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new Fa(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new ke(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){let i=t.resolve(n);return new this(i,r==n?i:t.resolve(r))}static between(t,n,r){let i=t.pos-n.pos;if((!r||i)&&(r=i>=0?1:-1),!n.parent.inlineContent){let o=Se.findFrom(n,r,!0)||Se.findFrom(n,-r,!0);if(o)n=o.$head;else return Se.near(n,r)}return t.parent.inlineContent||(i==0?t=n:(t=(Se.findFrom(t,-r,!0)||Se.findFrom(t,r,!0)).$anchor,t.pos<n.pos!=i<0&&(t=n))),new ke(t,n)}}Se.jsonID("text",ke);class Fa{constructor(t,n){this.anchor=t,this.head=n}map(t){return new Fa(t.map(this.anchor),t.map(this.head))}resolve(t){return ke.between(t.resolve(this.anchor),t.resolve(this.head))}}class be extends Se{constructor(t){let n=t.nodeAfter,r=t.node(0).resolve(t.pos+n.nodeSize);super(t,r);this.node=n}map(t,n){let{deleted:r,pos:i}=n.mapResult(this.anchor),o=t.resolve(i);return r?Se.near(o):new be(o)}content(){return new re(K.from(this.node),0,0)}eq(t){return t instanceof be&&t.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new Hu(this.anchor)}static fromJSON(t,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new be(t.resolve(n.anchor))}static create(t,n){return new be(t.resolve(n))}static isSelectable(t){return!t.isText&&t.type.spec.selectable!==!1}}be.prototype.visible=!1;Se.jsonID("node",be);class Hu{constructor(t){this.anchor=t}map(t){let{deleted:n,pos:r}=t.mapResult(this.anchor);return n?new Fa(r,r):new Hu(r)}resolve(t){let n=t.resolve(this.anchor),r=n.nodeAfter;return r&&be.isSelectable(r)?new be(n):Se.near(n)}}class en extends Se{constructor(t){super(t.resolve(0),t.resolve(t.content.size))}replace(t,n=re.empty){if(n==re.empty){t.delete(0,t.doc.content.size);let r=Se.atStart(t.doc);r.eq(t.selection)||t.setSelection(r)}else super.replace(t,n)}toJSON(){return{type:"all"}}static fromJSON(t){return new en(t)}map(t){return new en(t)}eq(t){return t instanceof en}getBookmark(){return N8}}Se.jsonID("all",en);const N8={map(){return this},resolve(e){return new en(e)}};function no(e,t,n,r,i,o=!1){if(t.inlineContent)return ke.create(e,n);for(let s=r-(i>0?0:1);i>0?s<t.childCount:s>=0;s+=i){let a=t.child(s);if(a.isAtom){if(!o&&be.isSelectable(a))return be.create(e,n-(i<0?a.nodeSize:0))}else{let l=no(e,a,n+i,i<0?a.childCount:0,i,o);if(l)return l}n+=a.nodeSize*i}return null}function jg(e,t,n){let r=e.steps.length-1;if(r<t)return;let i=e.steps[r];if(!(i instanceof jt||i instanceof _t))return;let o=e.mapping.maps[r],s;o.forEach((a,l,c,u)=>{s==null&&(s=u)}),e.setSelection(Se.near(e.doc.resolve(s),n))}function Ng(e,t){return!t||!e?e:e.bind(t)}class Va{constructor(t,n,r){this.name=t,this.init=Ng(n.init,r),this.apply=Ng(n.apply,r)}}const TP=[new Va("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new Va("selection",{init(e,t){return e.selection||Se.atStart(t.doc)},apply(e){return e.selection}}),new Va("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new Va("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})];function Lg(e,t,n){for(let r in e){let i=e[r];i instanceof Function?i=i.bind(t):r=="handleDOMEvents"&&(i=Lg(i,t,{})),n[r]=i}return n}class gt{constructor(t){this.spec=t,this.props={},t.props&&Lg(t.props,this,this.props),this.key=t.key?t.key.key:Dg("plugin")}getState(t){return t[this.key]}}const zu=Object.create(null);function Dg(e){return e in zu?e+"$"+ ++zu[e]:(zu[e]=0,e+"$")}class yt{constructor(t="key"){this.key=Dg(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}const ys=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t};const Ig=function(e,t,n,r){return n&&($g(e,t,n,r,-1)||$g(e,t,n,r,1))},L8=/^(img|br|input|textarea|hr)$/i;function $g(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:Wa(e))){let o=e.parentNode;if(!o||o.nodeType!=1||I8(e)||L8.test(e.nodeName)||e.contentEditable=="false")return!1;t=ys(e)+(i<0?0:1),e=o}else if(e.nodeType==1){if(e=e.childNodes[t+(i<0?-1:0)],e.contentEditable=="false")return!1;t=i<0?Wa(e):0}else return!1}}function Wa(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function D8(e,t,n){for(let r=t==0,i=t==Wa(e);r||i;){if(e==n)return!0;let o=ys(e);if(e=e.parentNode,!e)return!1;r=r&&o==0,i=i&&o==Wa(e)}}function I8(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}const Bg=function(e){return e.focusNode&&Ig(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function Hg(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}const xr=typeof navigator!="undefined"?navigator:null,zg=typeof document!="undefined"?document:null,kr=xr&&xr.userAgent||"",Fu=/Edge\/(\d+)/.exec(kr),Fg=/MSIE \d/.exec(kr),Vu=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(kr),ro=!!(Fg||Vu||Fu),Wu=Fg?document.documentMode:Vu?+Vu[1]:Fu?+Fu[1]:0,Ua=!ro&&/gecko\/(\d+)/i.test(kr);Ua&&+(/Firefox\/(\d+)/.exec(kr)||[0,0])[1];const Uu=!ro&&/Chrome\/(\d+)/.exec(kr),io=!!Uu,$8=Uu?+Uu[1]:0,ui=!ro&&!!xr&&/Apple Computer/.test(xr.vendor),Ku=ui&&(/Mobile\/\w+/.test(kr)||!!xr&&xr.maxTouchPoints>2),mn=Ku||(xr?/Mac/.test(xr.platform):!1),vs=/Android \d/.test(kr),qu=!!zg&&"webkitFontSmoothing"in zg.documentElement.style,B8=qu?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;const Vg=function(e){e&&(this.nodeName=e)};Vg.prototype=Object.create(null);const PP=[new Vg];function H8(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let i=e.docView.nearestDesc(n.focusNode),o=i&&i.size==0,s=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let a=r.resolve(s),l,c;if(Bg(n)){for(l=a;i&&!i.node;)i=i.parent;let u=i.node;if(i&&u.isAtom&&be.isSelectable(u)&&i.parent&&!(u.isInline&&D8(n.focusNode,n.focusOffset,i.dom))){let f=i.posBefore;c=new be(s==f?a:r.resolve(f))}}else{let u=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(u<0)return null;l=r.resolve(u)}if(!c){let u=t=="pointer"||e.state.selection.head<a.pos&&!o?1:-1;c=Gg(e,l,a,u)}return c}function Wg(e){return e.editable?e.hasFocus():W8(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function Ju(e,t=!1){let n=e.state.selection;if(V8(e,n),!!Wg(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&io){let r=e.domSelectionRange(),i=e.domObserver.currentSelection;if(r.anchorNode&&i.anchorNode&&Ig(r.anchorNode,r.anchorOffset,i.anchorNode,i.anchorOffset)){e.input.mouseDown.delayedSelectionSync=!0,e.domObserver.setCurSelection();return}}if(e.domObserver.disconnectSelection(),e.cursorWrapper)F8(e);else{let{anchor:r,head:i}=n,o,s;Ug&&!(n instanceof ke)&&(n.$from.parent.inlineContent||(o=Kg(e,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(s=Kg(e,n.to))),e.docView.setSelection(r,i,e.root,t),Ug&&(o&&qg(o),s&&qg(s)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&z8(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}const Ug=ui||io&&$8<63;function Kg(e,t){let{node:n,offset:r}=e.docView.domFromPos(t,0),i=r<n.childNodes.length?n.childNodes[r]:null,o=r?n.childNodes[r-1]:null;if(ui&&i&&i.contentEditable=="false")return Gu(i);if((!i||i.contentEditable=="false")&&(!o||o.contentEditable=="false")){if(i)return Gu(i);if(o)return Gu(o)}}function Gu(e){return e.contentEditable="true",ui&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function qg(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function z8(e){let t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.input.hideSelectionGuard);let n=e.domSelectionRange(),r=n.anchorNode,i=n.anchorOffset;t.addEventListener("selectionchange",e.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=i)&&(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{(!Wg(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function F8(e){let t=e.domSelection(),n=document.createRange(),r=e.cursorWrapper.dom,i=r.nodeName=="IMG";i?n.setEnd(r.parentNode,ys(r)+1):n.setEnd(r,0),n.collapse(!1),t.removeAllRanges(),t.addRange(n),!i&&!e.state.selection.visible&&ro&&Wu<=11&&(r.disabled=!0,r.disabled=!1)}function V8(e,t){if(t instanceof be){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(Jg(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else Jg(e)}function Jg(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function Gg(e,t,n,r){return e.someProp("createSelectionBetween",i=>i(e,t,n))||ke.between(t,n,r)}function W8(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch(n){return!1}}function Yu(e,t){let{$anchor:n,$head:r}=e.selection,i=t>0?n.max(r):n.min(r),o=i.parent.inlineContent?i.depth?e.doc.resolve(t>0?i.after():i.before()):null:i;return o&&Se.findFrom(o,t)}function di(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function Yg(e,t,n){let r=e.state.selection;if(r instanceof ke){if(!r.empty||n.indexOf("s")>-1)return!1;if(e.endOfTextblock(t>0?"right":"left")){let i=Yu(e.state,t);return i&&i instanceof be?di(e,i):!1}else if(!(mn&&n.indexOf("m")>-1)){let i=r.$head,o=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter,s;if(!o||o.isText)return!1;let a=t<0?i.pos-o.nodeSize:i.pos;return o.isAtom||(s=e.docView.descAt(a))&&!s.contentDOM?be.isSelectable(o)?di(e,new be(t<0?e.state.doc.resolve(i.pos-o.nodeSize):i)):qu?di(e,new ke(e.state.doc.resolve(t<0?a:a+o.nodeSize))):!1:!1}}else{if(r instanceof be&&r.node.isInline)return di(e,new ke(t>0?r.$to:r.$from));{let i=Yu(e.state,t);return i?di(e,i):!1}}}function Ka(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function bs(e){let t=e.pmViewDesc;return t&&t.size==0&&(e.nextSibling||e.nodeName!="BR")}function Xu(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i,o,s=!1;for(Ua&&n.nodeType==1&&r<Ka(n)&&bs(n.childNodes[r])&&(s=!0);;)if(r>0){if(n.nodeType!=1)break;{let a=n.childNodes[r-1];if(bs(a))i=n,o=--r;else if(a.nodeType==3)n=a,r=n.nodeValue.length;else break}}else{if(Xg(n))break;{let a=n.previousSibling;for(;a&&bs(a);)i=n.parentNode,o=ys(a),a=a.previousSibling;if(a)n=a,r=Ka(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}s?Zu(e,n,r):i&&Zu(e,i,o)}function Qu(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i=Ka(n),o,s;for(;;)if(r<i){if(n.nodeType!=1)break;let a=n.childNodes[r];if(bs(a))o=n,s=++r;else break}else{if(Xg(n))break;{let a=n.nextSibling;for(;a&&bs(a);)o=a.parentNode,s=ys(a)+1,a=a.nextSibling;if(a)n=a,r=0,i=Ka(n);else{if(n=n.parentNode,n==e.dom)break;r=i=0}}}o&&Zu(e,o,s)}function Xg(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function Zu(e,t,n){let r=e.domSelection();if(Bg(r)){let o=document.createRange();o.setEnd(t,n),o.setStart(t,n),r.removeAllRanges(),r.addRange(o)}else r.extend&&r.extend(t,n);e.domObserver.setCurSelection();let{state:i}=e;setTimeout(()=>{e.state==i&&Ju(e)},50)}function Qg(e,t,n){let r=e.state.selection;if(r instanceof ke&&!r.empty||n.indexOf("s")>-1||mn&&n.indexOf("m")>-1)return!1;let{$from:i,$to:o}=r;if(!i.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let s=Yu(e.state,t);if(s&&s instanceof be)return di(e,s)}if(!i.parent.inlineContent){let s=t<0?i:o,a=r instanceof en?Se.near(s,t):Se.findFrom(s,t);return a?di(e,a):!1}return!1}function Zg(e,t){if(!(e.state.selection instanceof ke))return!0;let{$head:n,$anchor:r,empty:i}=e.state.selection;if(!n.sameParent(r))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let o=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(o&&!o.isText){let s=e.state.tr;return t<0?s.delete(n.pos-o.nodeSize,n.pos):s.delete(n.pos,n.pos+o.nodeSize),e.dispatch(s),!0}return!1}function e1(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function U8(e){if(!ui||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&t.nodeType==1&&n==0&&t.firstChild&&t.firstChild.contentEditable=="false"){let r=t.firstChild;e1(e,r,"true"),setTimeout(()=>e1(e,r,"false"),20)}return!1}function K8(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function q8(e,t){let n=t.keyCode,r=K8(t);return n==8||mn&&n==72&&r=="c"?Zg(e,-1)||Xu(e):n==46||mn&&n==68&&r=="c"?Zg(e,1)||Qu(e):n==13||n==27?!0:n==37||mn&&n==66&&r=="c"?Yg(e,-1,r)||Xu(e):n==39||mn&&n==70&&r=="c"?Yg(e,1,r)||Qu(e):n==38||mn&&n==80&&r=="c"?Qg(e,-1,r)||Xu(e):n==40||mn&&n==78&&r=="c"?U8(e)||Qg(e,1,r)||Qu(e):r==(mn?"m":"c")&&(n==66||n==73||n==89||n==90)}function t1(e,t){e.someProp("transformCopied",p=>{t=p(t,e)});let n=[],{content:r,openStart:i,openEnd:o}=t;for(;i>1&&o>1&&r.childCount==1&&r.firstChild.childCount==1;){i--,o--;let p=r.firstChild;n.push(p.type.name,p.attrs!=p.type.defaultAttrs?p.attrs:null),r=p.content}let s=e.someProp("clipboardSerializer")||ci.fromSchema(e.state.schema),a=c1(),l=a.createElement("div");l.appendChild(s.serializeFragment(r,{document:a}));let c=l.firstChild,u,f=0;for(;c&&c.nodeType==1&&(u=a1[c.nodeName.toLowerCase()]);){for(let p=u.length-1;p>=0;p--){let g=a.createElement(u[p]);for(;l.firstChild;)g.appendChild(l.firstChild);l.appendChild(g),f++}c=l.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${i} ${o}${f?` -${f}`:""} ${JSON.stringify(n)}`);let h=e.someProp("clipboardTextSerializer",p=>p(t,e))||t.content.textBetween(0,t.content.size,`
`);return{dom:l,text:h}}function n1(e,t,n,r,i){let o=i.parent.type.spec.code,s,a;if(!n&&!t)return null;let l=t&&(r||o||!n);if(l){if(e.someProp("transformPastedText",h=>{t=h(t,o||r,e)}),o)return t?new re(K.from(e.state.schema.text(t.replace(/\r\n?/g,`
`))),0,0):re.empty;let f=e.someProp("clipboardTextParser",h=>h(t,i,r,e));if(f)a=f;else{let h=i.marks(),{schema:p}=e.state,g=ci.fromSchema(p);s=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(v=>{let b=s.appendChild(document.createElement("p"));v&&b.appendChild(g.serializeNode(p.text(v,h)))})}}else e.someProp("transformPastedHTML",f=>{n=f(n,e)}),s=Y8(n),qu&&X8(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(a||(a=(e.someProp("clipboardParser")||e.someProp("domParser")||hs.fromSchema(e.state.schema)).parseSlice(s,{preserveWhitespace:!!(l||u),context:i,ruleFromNode(h){return h.nodeName=="BR"&&!h.nextSibling&&h.parentNode&&!J8.test(h.parentNode.nodeName)?{ignore:!0}:null}})),u)a=Q8(s1(a,+u[1],+u[2]),u[4]);else if(a=re.maxOpen(G8(a.content,i),!0),a.openStart||a.openEnd){let f=0,h=0;for(let p=a.content.firstChild;f<a.openStart&&!p.type.spec.isolating;f++,p=p.firstChild);for(let p=a.content.lastChild;h<a.openEnd&&!p.type.spec.isolating;h++,p=p.lastChild);a=s1(a,f,h)}return e.someProp("transformPasted",f=>{a=f(a,e)}),a}const J8=/^(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 G8(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let i=t.node(n).contentMatchAt(t.index(n)),o,s=[];if(e.forEach(a=>{if(!s)return;let l=i.findWrapping(a.type),c;if(!l)return s=null;if(c=s.length&&o.length&&i1(l,o,a,s[s.length-1],0))s[s.length-1]=c;else{s.length&&(s[s.length-1]=o1(s[s.length-1],o.length));let u=r1(a,l);s.push(u),i=i.matchType(u.type),o=l}}),s)return K.from(s)}return e}function r1(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,K.from(e));return e}function i1(e,t,n,r,i){if(i<e.length&&i<t.length&&e[i]==t[i]){let o=i1(e,t,n,r.lastChild,i+1);if(o)return r.copy(r.content.replaceChild(r.childCount-1,o));if(r.contentMatchAt(r.childCount).matchType(i==e.length-1?n.type:e[i+1]))return r.copy(r.content.append(K.from(r1(n,e,i+1))))}}function o1(e,t){if(t==0)return e;let n=e.content.replaceChild(e.childCount-1,o1(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(K.empty,!0);return e.copy(n.append(r))}function ed(e,t,n,r,i,o){let s=t<0?e.firstChild:e.lastChild,a=s.content;return i<r-1&&(a=ed(a,t,n,r,i+1,o)),i>=n&&(a=t<0?s.contentMatchAt(0).fillBefore(a,e.childCount>1||o<=i).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(K.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(a))}function s1(e,t,n){return t<e.openStart&&(e=new re(ed(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new re(ed(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}const a1={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let l1=null;function c1(){return l1||(l1=document.implementation.createHTMLDocument("title"))}function Y8(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=c1().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(e),i;if((i=r&&a1[r[1].toLowerCase()])&&(e=i.map(o=>"<"+o+">").join("")+e+i.map(o=>"</"+o+">").reverse().join("")),n.innerHTML=e,i)for(let o=0;o<i.length;o++)n=n.querySelector(i[o])||n;return n}function X8(e){let t=e.querySelectorAll(io?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<t.length;n++){let r=t[n];r.childNodes.length==1&&r.textContent=="\xA0"&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}function Q8(e,t){if(!e.size)return e;let n=e.content.firstChild.type.schema,r;try{r=JSON.parse(t)}catch(a){return e}let{content:i,openStart:o,openEnd:s}=e;for(let a=r.length-2;a>=0;a-=2){let l=n.nodes[r[a]];if(!l||l.hasRequiredAttrs())break;i=K.from(l.create(r[a+1],i)),o++,s++}return new re(i,o,s)}const On={},tn={};function Sr(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}tn.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!d1(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!(vs&&io&&n.keyCode==13)))if(n.keyCode!=229&&e.domObserver.forceFlush(),Ku&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();e.input.lastIOSEnter=r,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==r&&(e.someProp("handleKeyDown",i=>i(e,Hg(13,"Enter"))),e.input.lastIOSEnter=0)},200)}else e.someProp("handleKeyDown",r=>r(e,n))||q8(e,n)?n.preventDefault():Sr(e,"key")};tn.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)};tn.keypress=(e,t)=>{let n=t;if(d1(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||mn&&n.metaKey)return;if(e.someProp("handleKeyPress",i=>i(e,n))){n.preventDefault();return}let r=e.state.selection;if(!(r instanceof ke)||!r.$from.sameParent(r.$to)){let i=String.fromCharCode(n.charCode);!/[\r\n]/.test(i)&&!e.someProp("handleTextInput",o=>o(e,r.$from.pos,r.$to.pos,i))&&e.dispatch(e.state.tr.insertText(i).scrollIntoView()),n.preventDefault()}};function qa(e){return{left:e.clientX,top:e.clientY}}function Z8(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}function td(e,t,n,r,i){if(r==-1)return!1;let o=e.state.doc.resolve(r);for(let s=o.depth+1;s>0;s--)if(e.someProp(t,a=>s>o.depth?a(e,n,o.nodeAfter,o.before(s),i,!0):a(e,n,o.node(s),o.before(s),i,!1)))return!0;return!1}function oo(e,t,n){e.focused||e.focus();let r=e.state.tr.setSelection(t);n=="pointer"&&r.setMeta("pointer",!0),e.dispatch(r)}function eS(e,t){if(t==-1)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return r&&r.isAtom&&be.isSelectable(r)?(oo(e,new be(n),"pointer"),!0):!1}function tS(e,t){if(t==-1)return!1;let n=e.state.selection,r,i;n instanceof be&&(r=n.node);let o=e.state.doc.resolve(t);for(let s=o.depth+1;s>0;s--){let a=s>o.depth?o.nodeAfter:o.node(s);if(be.isSelectable(a)){r&&n.$from.depth>0&&s>=n.$from.depth&&o.before(n.$from.depth+1)==n.$from.pos?i=o.before(n.$from.depth):i=o.before(s);break}}return i!=null?(oo(e,be.create(e.state.doc,i),"pointer"),!0):!1}function nS(e,t,n,r,i){return td(e,"handleClickOn",t,n,r)||e.someProp("handleClick",o=>o(e,t,r))||(i?tS(e,n):eS(e,n))}function rS(e,t,n,r){return td(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",i=>i(e,t,r))}function iS(e,t,n,r){return td(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",i=>i(e,t,r))||oS(e,n,r)}function oS(e,t,n){if(n.button!=0)return!1;let r=e.state.doc;if(t==-1)return r.inlineContent?(oo(e,ke.create(r,0,r.content.size),"pointer"),!0):!1;let i=r.resolve(t);for(let o=i.depth+1;o>0;o--){let s=o>i.depth?i.nodeAfter:i.node(o),a=i.before(o);if(s.inlineContent)oo(e,ke.create(r,a+1,a+1+s.content.size),"pointer");else if(be.isSelectable(s))oo(e,be.create(r,a),"pointer");else continue;return!0}}function nd(e){return Ja(e)}const u1=mn?"metaKey":"ctrlKey";On.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=nd(e),i=Date.now(),o="singleClick";i-e.input.lastClick.time<500&&Z8(n,e.input.lastClick)&&!n[u1]&&(e.input.lastClick.type=="singleClick"?o="doubleClick":e.input.lastClick.type=="doubleClick"&&(o="tripleClick")),e.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:o};let s=e.posAtCoords(qa(n));!s||(o=="singleClick"?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new sS(e,s,n,!!r)):(o=="doubleClick"?rS:iS)(e,s.pos,s.inside,n)?n.preventDefault():Sr(e,"pointer"))};class sS{constructor(t,n,r,i){this.view=t,this.pos=n,this.event=r,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!r[u1],this.allowDefault=r.shiftKey;let o,s;if(n.inside>-1)o=t.state.doc.nodeAt(n.inside),s=n.inside;else{let u=t.state.doc.resolve(n.pos);o=u.parent,s=u.depth?u.before():0}const a=i?null:r.target,l=a?t.docView.nearestDesc(a,!0):null;this.target=l?l.dom:null;let{selection:c}=t.state;(r.button==0&&o.type.spec.draggable&&o.type.spec.selectable!==!1||c instanceof be&&c.from<=s&&c.to>s)&&(this.mightDrag={node:o,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Ua&&!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()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),Sr(t,"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(()=>Ju(this.view)),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(qa(t))),this.updateAllowDefault(t),this.allowDefault||!n?Sr(this.view,"pointer"):nS(this.view,n.pos,n.inside,t,this.selectNode)?t.preventDefault():t.button==0&&(this.flushed||ui&&this.mightDrag&&!this.mightDrag.node.isAtom||io&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(oo(this.view,Se.near(this.view.state.doc.resolve(n.pos)),"pointer"),t.preventDefault()):Sr(this.view,"pointer")}move(t){this.updateAllowDefault(t),Sr(this.view,"pointer"),t.buttons==0&&this.done()}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}}On.touchstart=e=>{e.input.lastTouch=Date.now(),nd(e),Sr(e,"pointer")};On.touchmove=e=>{e.input.lastTouch=Date.now(),Sr(e,"pointer")};On.contextmenu=e=>nd(e);function d1(e,t){return e.composing?!0:ui&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}const aS=vs?5e3:-1;tn.compositionstart=tn.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)))e.markCursor=e.state.storedMarks||n.marks(),Ja(e,!0),e.markCursor=null;else if(Ja(e),Ua&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=e.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){e.domSelection().collapse(s,s.nodeValue.length);break}else i=s,o=-1}}e.input.composing=!0}f1(e,aS)};tn.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,f1(e,20))};function f1(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>Ja(e),t))}function lS(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=cS());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function cS(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}function Ja(e,t=!1){if(!(vs&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),lS(e),t||e.docView&&e.docView.dirty){let n=H8(e);return n&&!n.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(n)):e.updateState(e.state),!0}return!1}}function uS(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),i=document.createRange();i.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}const so=ro&&Wu<15||Ku&&B8<604;On.copy=tn.cut=(e,t)=>{let n=t,r=e.state.selection,i=n.type=="cut";if(r.empty)return;let o=so?null:n.clipboardData,s=r.content(),{dom:a,text:l}=t1(e,s);o?(n.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",l)):uS(e,a),i&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function dS(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function fS(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus(),setTimeout(()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?rd(e,r.value,null,e.input.shiftKey,t):rd(e,r.textContent,r.innerHTML,e.input.shiftKey,t)},50)}function rd(e,t,n,r,i){let o=n1(e,t,n,r,e.state.selection.$from);if(e.someProp("handlePaste",l=>l(e,i,o||re.empty)))return!0;if(!o)return!1;let s=dS(o),a=s?e.state.tr.replaceSelectionWith(s,e.input.shiftKey):e.state.tr.replaceSelection(o);return e.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}tn.paste=(e,t)=>{let n=t;if(e.composing&&!vs)return;let r=so?null:n.clipboardData;r&&rd(e,r.getData("text/plain"),r.getData("text/html"),e.input.shiftKey,n)?n.preventDefault():fS(e,n)};class hS{constructor(t,n){this.slice=t,this.move=n}}const h1=mn?"altKey":"ctrlKey";On.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let i=e.state.selection,o=i.empty?null:e.posAtCoords(qa(n));if(!(o&&o.pos>=i.from&&o.pos<=(i instanceof be?i.to-1:i.to))){if(r&&r.mightDrag)e.dispatch(e.state.tr.setSelection(be.create(e.state.doc,r.mightDrag.pos)));else if(n.target&&n.target.nodeType==1){let c=e.docView.nearestDesc(n.target,!0);c&&c.node.type.spec.draggable&&c!=e.docView&&e.dispatch(e.state.tr.setSelection(be.create(e.state.doc,c.posBefore)))}}let s=e.state.selection.content(),{dom:a,text:l}=t1(e,s);n.dataTransfer.clearData(),n.dataTransfer.setData(so?"Text":"text/html",a.innerHTML),n.dataTransfer.effectAllowed="copyMove",so||n.dataTransfer.setData("text/plain",l),e.dragging=new hS(s,!n[h1])};On.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)};tn.dragover=tn.dragenter=(e,t)=>t.preventDefault();tn.drop=(e,t)=>{let n=t,r=e.dragging;if(e.dragging=null,!n.dataTransfer)return;let i=e.posAtCoords(qa(n));if(!i)return;let o=e.state.doc.resolve(i.pos),s=r&&r.slice;s?e.someProp("transformPasted",g=>{s=g(s,e)}):s=n1(e,n.dataTransfer.getData(so?"Text":"text/plain"),so?null:n.dataTransfer.getData("text/html"),!1,o);let a=!!(r&&!n[h1]);if(e.someProp("handleDrop",g=>g(e,n,s||re.empty,a))){n.preventDefault();return}if(!s)return;n.preventDefault();let l=s?Cg(e.state.doc,o.pos,s):o.pos;l==null&&(l=o.pos);let c=e.state.tr;a&&c.deleteSelection();let u=c.mapping.map(l),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 p=c.doc.resolve(u);if(f&&be.isSelectable(s.content.firstChild)&&p.nodeAfter&&p.nodeAfter.sameMarkup(s.content.firstChild))c.setSelection(new be(p));else{let g=c.mapping.map(l);c.mapping.maps[c.mapping.maps.length-1].forEach((v,b,w,k)=>g=k),c.setSelection(Gg(e,p,c.doc.resolve(g)))}e.focus(),e.dispatch(c.setMeta("uiEvent","drop"))};On.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&Ju(e)},20))};On.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)};On.beforeinput=(e,t)=>{if(io&&vs&&t.inputType=="deleteContentBackward"){e.domObserver.flushSoon();let{domChangeCount:r}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=r||(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",o=>o(e,Hg(8,"Backspace")))))return;let{$cursor:i}=e.state.selection;i&&i.pos>0&&e.dispatch(e.state.tr.delete(i.pos-1,i.pos).scrollIntoView())},50)}};for(let e in tn)On[e]=tn[e];function ws(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}class id{constructor(t,n){this.toDOM=t,this.spec=n||fi,this.side=this.spec.side||0}map(t,n,r,i){let{pos:o,deleted:s}=t.mapResult(n.from+i,this.side<0?-1:1);return s?null:new Kt(o-r,o-r,this)}valid(){return!0}eq(t){return this==t||t instanceof id&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&ws(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class Cr{constructor(t,n){this.attrs=t,this.spec=n||fi}map(t,n,r,i){let o=t.map(n.from+i,this.spec.inclusiveStart?-1:1)-r,s=t.map(n.to+i,this.spec.inclusiveEnd?1:-1)-r;return o>=s?null:new Kt(o,s,this)}valid(t,n){return n.from<n.to}eq(t){return this==t||t instanceof Cr&&ws(this.attrs,t.attrs)&&ws(this.spec,t.spec)}static is(t){return t.type instanceof Cr}destroy(){}}class od{constructor(t,n){this.attrs=t,this.spec=n||fi}map(t,n,r,i){let o=t.mapResult(n.from+i,1);if(o.deleted)return null;let s=t.mapResult(n.to+i,-1);return s.deleted||s.pos<=o.pos?null:new Kt(o.pos-r,s.pos-r,this)}valid(t,n){let{index:r,offset:i}=t.content.findIndex(n.from),o;return i==n.from&&!(o=t.child(r)).isText&&i+o.nodeSize==n.to}eq(t){return this==t||t instanceof od&&ws(this.attrs,t.attrs)&&ws(this.spec,t.spec)}destroy(){}}class Kt{constructor(t,n,r){this.from=t,this.to=n,this.type=r}copy(t,n){return new Kt(t,n,this.type)}eq(t,n=0){return this.type.eq(t.type)&&this.from+n==t.from&&this.to+n==t.to}map(t,n,r){return this.type.map(t,this,n,r)}static widget(t,n,r){return new Kt(t,t,new id(n,r))}static inline(t,n,r,i){return new Kt(t,n,new Cr(r,i))}static node(t,n,r,i){return new Kt(t,n,new od(r,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof Cr}}const ao=[],fi={};class Qe{constructor(t,n){this.local=t.length?t:ao,this.children=n.length?n:ao}static create(t,n){return n.length?Ga(n,t,0,fi):Bt}find(t,n,r){let i=[];return this.findInner(t==null?0:t,n==null?1e9:n,i,0,r),i}findInner(t,n,r,i,o){for(let s=0;s<this.local.length;s++){let a=this.local[s];a.from<=n&&a.to>=t&&(!o||o(a.spec))&&r.push(a.copy(a.from+i,a.to+i))}for(let s=0;s<this.children.length;s+=3)if(this.children[s]<n&&this.children[s+1]>t){let a=this.children[s]+1;this.children[s+2].findInner(t-a,n-a,r,i+a,o)}}map(t,n,r){return this==Bt||t.maps.length==0?this:this.mapInner(t,n,0,0,r||fi)}mapInner(t,n,r,i,o){let s;for(let a=0;a<this.local.length;a++){let l=this.local[a].map(t,r,i);l&&l.type.valid(n,l)?(s||(s=[])).push(l):o.onRemove&&o.onRemove(this.local[a].spec)}return this.children.length?pS(this.children,s||[],t,n,r,i,o):s?new Qe(s.sort(pi),ao):Bt}add(t,n){return n.length?this==Bt?Qe.create(t,n):this.addInner(t,n,0):this}addInner(t,n,r){let i,o=0;t.forEach((a,l)=>{let c=l+r,u;if(!!(u=m1(n,a,c))){for(i||(i=this.children.slice());o<i.length&&i[o]<l;)o+=3;i[o]==l?i[o+2]=i[o+2].addInner(a,u,c+1):i.splice(o,0,l,l+a.nodeSize,Ga(u,a,c+1,fi)),o+=3}});let s=p1(o?g1(n):n,-r);for(let a=0;a<s.length;a++)s[a].type.valid(t,s[a])||s.splice(a--,1);return new Qe(s.length?this.local.concat(s).sort(pi):this.local,i||this.children)}remove(t){return t.length==0||this==Bt?this:this.removeInner(t,0)}removeInner(t,n){let r=this.children,i=this.local;for(let o=0;o<r.length;o+=3){let s,a=r[o]+n,l=r[o+1]+n;for(let u=0,f;u<t.length;u++)(f=t[u])&&f.from>a&&f.to<l&&(t[u]=null,(s||(s=[])).push(f));if(!s)continue;r==this.children&&(r=this.children.slice());let c=r[o+2].removeInner(s,a+1);c!=Bt?r[o+2]=c:(r.splice(o,3),o-=3)}if(i.length){for(let o=0,s;o<t.length;o++)if(s=t[o])for(let a=0;a<i.length;a++)i[a].eq(s,n)&&(i==this.local&&(i=this.local.slice()),i.splice(a--,1))}return r==this.children&&i==this.local?this:i.length||r.length?new Qe(i,r):Bt}forChild(t,n){if(this==Bt)return this;if(n.isLeaf)return Qe.empty;let r,i;for(let a=0;a<this.children.length;a+=3)if(this.children[a]>=t){this.children[a]==t&&(r=this.children[a+2]);break}let o=t+1,s=o+n.content.size;for(let a=0;a<this.local.length;a++){let l=this.local[a];if(l.from<s&&l.to>o&&l.type instanceof Cr){let c=Math.max(o,l.from)-o,u=Math.min(s,l.to)-o;c<u&&(i||(i=[])).push(l.copy(c,u))}}if(i){let a=new Qe(i.sort(pi),ao);return r?new hi([a,r]):a}return r||Bt}eq(t){if(this==t)return!0;if(!(t instanceof Qe)||this.local.length!=t.local.length||this.children.length!=t.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(t.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=t.children[n]||this.children[n+1]!=t.children[n+1]||!this.children[n+2].eq(t.children[n+2]))return!1;return!0}locals(t){return sd(this.localsInner(t))}localsInner(t){if(this==Bt)return ao;if(t.inlineContent||!this.local.some(Cr.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof Cr||n.push(this.local[r]);return n}}Qe.empty=new Qe([],[]);Qe.removeOverlap=sd;const Bt=Qe.empty;class hi{constructor(t){this.members=t}map(t,n){const r=this.members.map(i=>i.map(t,n,fi));return hi.from(r)}forChild(t,n){if(n.isLeaf)return Qe.empty;let r=[];for(let i=0;i<this.members.length;i++){let o=this.members[i].forChild(t,n);o!=Bt&&(o instanceof hi?r=r.concat(o.members):r.push(o))}return hi.from(r)}eq(t){if(!(t instanceof hi)||t.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(t.members[n]))return!1;return!0}locals(t){let n,r=!0;for(let i=0;i<this.members.length;i++){let o=this.members[i].localsInner(t);if(!!o.length)if(!n)n=o;else{r&&(n=n.slice(),r=!1);for(let s=0;s<o.length;s++)n.push(o[s])}}return n?sd(r?n:n.sort(pi)):ao}static from(t){switch(t.length){case 0:return Bt;case 1:return t[0];default:return new hi(t.every(n=>n instanceof Qe)?t:t.reduce((n,r)=>n.concat(r instanceof Qe?r:r.members),[]))}}}function pS(e,t,n,r,i,o,s){let a=e.slice();for(let c=0,u=o;c<n.maps.length;c++){let f=0;n.maps[c].forEach((h,p,g,v)=>{let b=v-g-(p-h);for(let w=0;w<a.length;w+=3){let k=a[w+1];if(k<0||h>k+u-f)continue;let A=a[w]+u-f;p>=A?a[w+1]=h<=A?-2:-1:g>=i&&b&&(a[w]+=b,a[w+1]+=b)}f+=b}),u=n.maps[c].map(u,-1)}let l=!1;for(let c=0;c<a.length;c+=3)if(a[c+1]<0){if(a[c+1]==-2){l=!0,a[c+1]=-1;continue}let u=n.map(e[c]+o),f=u-i;if(f<0||f>=r.content.size){l=!0;continue}let h=n.map(e[c+1]+o,-1),p=h-i,{index:g,offset:v}=r.content.findIndex(f),b=r.maybeChild(g);if(b&&v==f&&v+b.nodeSize==p){let w=a[c+2].mapInner(n,b,u+1,e[c]+o+1,s);w!=Bt?(a[c]=f,a[c+1]=p,a[c+2]=w):(a[c+1]=-2,l=!0)}else l=!0}if(l){let c=mS(a,e,t,n,i,o,s),u=Ga(c,r,0,s);t=u.local;for(let f=0;f<a.length;f+=3)a[f+1]<0&&(a.splice(f,3),f-=3);for(let f=0,h=0;f<u.children.length;f+=3){let p=u.children[f];for(;h<a.length&&a[h]<p;)h+=3;a.splice(h,0,u.children[f],u.children[f+1],u.children[f+2])}}return new Qe(t.sort(pi),a)}function p1(e,t){if(!t||!e.length)return e;let n=[];for(let r=0;r<e.length;r++){let i=e[r];n.push(new Kt(i.from+t,i.to+t,i.type))}return n}function mS(e,t,n,r,i,o,s){function a(l,c){for(let u=0;u<l.local.length;u++){let f=l.local[u].map(r,i,c);f?n.push(f):s.onRemove&&s.onRemove(l.local[u].spec)}for(let u=0;u<l.children.length;u+=3)a(l.children[u+2],l.children[u]+c+1)}for(let l=0;l<e.length;l+=3)e[l+1]==-1&&a(e[l+2],t[l]+o+1);return n}function m1(e,t,n){if(t.isLeaf)return null;let r=n+t.nodeSize,i=null;for(let o=0,s;o<e.length;o++)(s=e[o])&&s.from>n&&s.to<r&&((i||(i=[])).push(s),e[o]=null);return i}function g1(e){let t=[];for(let n=0;n<e.length;n++)e[n]!=null&&t.push(e[n]);return t}function Ga(e,t,n,r){let i=[],o=!1;t.forEach((a,l)=>{let c=m1(e,a,l+n);if(c){o=!0;let u=Ga(c,a,n+l+1,r);u!=Bt&&i.push(l,l+a.nodeSize,u)}});let s=p1(o?g1(e):e,-n).sort(pi);for(let a=0;a<s.length;a++)s[a].type.valid(t,s[a])||(r.onRemove&&r.onRemove(s[a].spec),s.splice(a--,1));return s.length||i.length?new Qe(s,i):Bt}function pi(e,t){return e.from-t.from||e.to-t.to}function sd(e){let t=e;for(let n=0;n<t.length-1;n++){let r=t[n];if(r.from!=r.to)for(let i=n+1;i<t.length;i++){let o=t[i];if(o.from==r.from){o.to!=r.to&&(t==e&&(t=e.slice()),t[i]=o.copy(o.from,r.to),y1(t,i+1,o.copy(r.to,o.to)));continue}else{o.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,o.from),y1(t,i,r.copy(o.from,r.to)));break}}}return t}function y1(e,t,n){for(;t<e.length&&pi(n,e[t])>0;)t++;e.splice(t,0,n)}const RP=ro&&Wu<=11;let jP=new WeakMap;var _r={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Ya={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},v1=typeof navigator!="undefined"&&/Chrome\/(\d+)/.exec(navigator.userAgent);typeof navigator!="undefined"&&/Gecko\/\d+/.test(navigator.userAgent);var gS=typeof navigator!="undefined"&&/Mac/.test(navigator.platform),yS=typeof navigator!="undefined"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),vS=gS||v1&&+v1[1]<57;for(var Ot=0;Ot<10;Ot++)_r[48+Ot]=_r[96+Ot]=String(Ot);for(var Ot=1;Ot<=24;Ot++)_r[Ot+111]="F"+Ot;for(var Ot=65;Ot<=90;Ot++)_r[Ot]=String.fromCharCode(Ot+32),Ya[Ot]=String.fromCharCode(Ot);for(var ad in _r)Ya.hasOwnProperty(ad)||(Ya[ad]=_r[ad]);function bS(e){var t=vS&&(e.ctrlKey||e.altKey||e.metaKey)||yS&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",n=!t&&e.key||(e.shiftKey?Ya:_r)[e.keyCode]||e.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}const wS=typeof navigator!="undefined"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function xS(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n=="Space"&&(n=" ");let r,i,o,s;for(let a=0;a<t.length-1;a++){let l=t[a];if(/^(cmd|meta|m)$/i.test(l))s=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))i=!0;else if(/^s(hift)?$/i.test(l))o=!0;else if(/^mod$/i.test(l))wS?s=!0:i=!0;else throw new Error("Unrecognized modifier name: "+l)}return r&&(n="Alt-"+n),i&&(n="Ctrl-"+n),s&&(n="Meta-"+n),o&&(n="Shift-"+n),n}function kS(e){let t=Object.create(null);for(let n in e)t[xS(n)]=e[n];return t}function ld(e,t,n=!0){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),n&&t.shiftKey&&(e="Shift-"+e),e}function b1(e){let t=kS(e);return function(n,r){let i=bS(r),o,s=t[ld(i,r)];if(s&&s(n.state,n.dispatch,n))return!0;if(i.length==1&&i!=" "){if(r.shiftKey){let a=t[ld(i,r,!1)];if(a&&a(n.state,n.dispatch,n))return!0}if((r.shiftKey||r.altKey||r.metaKey||i.charCodeAt(0)>127)&&(o=_r[r.keyCode])&&o!=i){let a=t[ld(o,r)];if(a&&a(n.state,n.dispatch,n))return!0}}return!1}}const cd=(e,t)=>e.selection.empty?!1:(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function SS(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("backward",e):n.parentOffset>0)?null:n}const w1=(e,t,n)=>{let r=SS(e,n);if(!r)return!1;let i=k1(r);if(!i){let s=r.blockRange(),a=s&&Zi(s);return a==null?!1:(t&&t(e.tr.lift(s,a).scrollIntoView()),!0)}let o=i.nodeBefore;if(!o.type.spec.isolating&&T1(e,i,t))return!0;if(r.parent.content.size==0&&(lo(o,"end")||be.isSelectable(o))){let s=Du(e.doc,r.before(),r.after(),re.empty);if(s&&s.slice.size<s.to-s.from){if(t){let a=e.tr.step(s);a.setSelection(lo(o,"end")?Se.findFrom(a.doc.resolve(a.mapping.map(i.pos,-1)),-1):be.create(a.doc,i.pos-o.nodeSize)),t(a.scrollIntoView())}return!0}}return o.isAtom&&i.depth==r.depth-1?(t&&t(e.tr.delete(i.pos-o.nodeSize,i.pos).scrollIntoView()),!0):!1};function lo(e,t,n=!1){for(let r=e;r;r=t=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}const x1=(e,t,n)=>{let{$head:r,empty:i}=e.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;o=k1(r)}let s=o&&o.nodeBefore;return!s||!be.isSelectable(s)?!1:(t&&t(e.tr.setSelection(be.create(e.doc,o.pos-s.nodeSize)).scrollIntoView()),!0)};function k1(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function CS(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("forward",e):n.parentOffset<n.parent.content.size)?null:n}const S1=(e,t,n)=>{let r=CS(e,n);if(!r)return!1;let i=_1(r);if(!i)return!1;let o=i.nodeAfter;if(T1(e,i,t))return!0;if(r.parent.content.size==0&&(lo(o,"start")||be.isSelectable(o))){let s=Du(e.doc,r.before(),r.after(),re.empty);if(s&&s.slice.size<s.to-s.from){if(t){let a=e.tr.step(s);a.setSelection(lo(o,"start")?Se.findFrom(a.doc.resolve(a.mapping.map(i.pos)),1):be.create(a.doc,a.mapping.map(i.pos))),t(a.scrollIntoView())}return!0}}return o.isAtom&&i.depth==r.depth-1?(t&&t(e.tr.delete(i.pos,i.pos+o.nodeSize).scrollIntoView()),!0):!1},C1=(e,t,n)=>{let{$head:r,empty:i}=e.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size)return!1;o=_1(r)}let s=o&&o.nodeAfter;return!s||!be.isSelectable(s)?!1:(t&&t(e.tr.setSelection(be.create(e.doc,o.pos)).scrollIntoView()),!0)};function _1(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}const _S=(e,t)=>{let n=e.selection,r=n instanceof be,i;if(r){if(n.node.isTextblock||!wr(e.doc,n.from))return!1;i=n.from}else if(i=za(e.doc,n.from,-1),i==null)return!1;if(t){let o=e.tr.join(i);r&&o.setSelection(be.create(o.doc,i-e.doc.resolve(i).nodeBefore.nodeSize)),t(o.scrollIntoView())}return!0},MS=(e,t)=>{let n=e.selection,r;if(n instanceof be){if(n.node.isTextblock||!wr(e.doc,n.to))return!1;r=n.to}else if(r=za(e.doc,n.to,1),r==null)return!1;return t&&t(e.tr.join(r).scrollIntoView()),!0},AS=(e,t)=>{let{$from:n,$to:r}=e.selection,i=n.blockRange(r),o=i&&Zi(i);return o==null?!1:(t&&t(e.tr.lift(i,o).scrollIntoView()),!0)},M1=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(t&&t(e.tr.insertText(`
`).scrollIntoView()),!0)};function ud(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const A1=(e,t)=>{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),o=n.indexAfter(-1),s=ud(i.contentMatchAt(o));if(!s||!i.canReplaceWith(o,o,s))return!1;if(t){let a=n.after(),l=e.tr.replaceWith(a,a,s.createAndFill());l.setSelection(Se.near(l.doc.resolve(a),1)),t(l.scrollIntoView())}return!0},E1=(e,t)=>{let n=e.selection,{$from:r,$to:i}=n;if(n instanceof en||r.parent.inlineContent||i.parent.inlineContent)return!1;let o=ud(i.parent.contentMatchAt(i.indexAfter()));if(!o||!o.isTextblock)return!1;if(t){let s=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,a=e.tr.insert(s,o.createAndFill());a.setSelection(ke.create(a.doc,s+1)),t(a.scrollIntoView())}return!0},O1=(e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let o=n.before();if(tr(e.doc,o))return t&&t(e.tr.split(o).scrollIntoView()),!0}let r=n.blockRange(),i=r&&Zi(r);return i==null?!1:(t&&t(e.tr.lift(r,i).scrollIntoView()),!0)};function ES(e){return(t,n)=>{let{$from:r,$to:i}=t.selection;if(t.selection instanceof be&&t.selection.node.isBlock)return!r.parentOffset||!tr(t.doc,r.pos)?!1:(n&&n(t.tr.split(r.pos).scrollIntoView()),!0);if(!r.parent.isBlock)return!1;if(n){let o=i.parentOffset==i.parent.content.size,s=t.tr;(t.selection instanceof ke||t.selection instanceof en)&&s.deleteSelection();let a=r.depth==0?null:ud(r.node(-1).contentMatchAt(r.indexAfter(-1))),l=e&&e(i.parent,o),c=l?[l]:o&&a?[{type:a}]:void 0,u=tr(s.doc,s.mapping.map(r.pos),1,c);if(!c&&!u&&tr(s.doc,s.mapping.map(r.pos),1,a?[{type:a}]:void 0)&&(a&&(c=[{type:a}]),u=!0),u&&(s.split(s.mapping.map(r.pos),1,c),!o&&!r.parentOffset&&r.parent.type!=a)){let f=s.mapping.map(r.before()),h=s.doc.resolve(f);a&&r.node(-1).canReplaceWith(h.index(),h.index()+1,a)&&s.setNodeMarkup(s.mapping.map(r.before()),a)}n(s.scrollIntoView())}return!0}}const OS=ES(),TS=(e,t)=>{let{$from:n,to:r}=e.selection,i,o=n.sharedDepth(r);return o==0?!1:(i=n.before(o),t&&t(e.tr.setSelection(be.create(e.doc,i))),!0)},PS=(e,t)=>(t&&t(e.tr.setSelection(new en(e.doc))),!0);function RS(e,t,n){let r=t.nodeBefore,i=t.nodeAfter,o=t.index();return!r||!i||!r.type.compatibleContent(i.type)?!1:!r.content.size&&t.parent.canReplace(o-1,o)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(o,o+1)||!(i.isTextblock||wr(e.doc,t.pos))?!1:(n&&n(e.tr.clearIncompatible(t.pos,r.type,r.contentMatchAt(r.childCount)).join(t.pos).scrollIntoView()),!0)}function T1(e,t,n){let r=t.nodeBefore,i=t.nodeAfter,o,s;if(r.type.spec.isolating||i.type.spec.isolating)return!1;if(RS(e,t,n))return!0;let a=t.parent.canReplace(t.index(),t.index()+1);if(a&&(o=(s=r.contentMatchAt(r.childCount)).findWrapping(i.type))&&s.matchType(o[0]||i.type).validEnd){if(n){let f=t.pos+i.nodeSize,h=K.empty;for(let v=o.length-1;v>=0;v--)h=K.from(o[v].create(null,h));h=K.from(r.copy(h));let p=e.tr.step(new _t(t.pos-1,f,t.pos,f,new re(h,1,0),o.length,!0)),g=f+2*o.length;wr(p.doc,g)&&p.join(g),n(p.scrollIntoView())}return!0}let l=Se.findFrom(t,1),c=l&&l.$from.blockRange(l.$to),u=c&&Zi(c);if(u!=null&&u>=t.depth)return n&&n(e.tr.lift(c,u).scrollIntoView()),!0;if(a&&lo(i,"start",!0)&&lo(r,"end")){let f=r,h=[];for(;h.push(f),!f.isTextblock;)f=f.lastChild;let p=i,g=1;for(;!p.isTextblock;p=p.firstChild)g++;if(f.canReplace(f.childCount,f.childCount,p.content)){if(n){let v=K.empty;for(let w=h.length-1;w>=0;w--)v=K.from(h[w].copy(v));let b=e.tr.step(new _t(t.pos-h.length,t.pos+i.nodeSize,t.pos+g,t.pos+i.nodeSize-g,new re(v,h.length,0),0,!0));n(b.scrollIntoView())}return!0}}return!1}function P1(e){return function(t,n){let r=t.selection,i=e<0?r.$from:r.$to,o=i.depth;for(;i.node(o).isInline;){if(!o)return!1;o--}return i.node(o).isTextblock?(n&&n(t.tr.setSelection(ke.create(t.doc,e<0?i.start(o):i.end(o)))),!0):!1}}const R1=P1(-1),j1=P1(1);function jS(e,t=null){return function(n,r){let{$from:i,$to:o}=n.selection,s=i.blockRange(o),a=s&&Lu(s,e,t);return a?(r&&r(n.tr.wrap(s,a).scrollIntoView()),!0):!1}}function N1(e,t=null){return function(n,r){let i=!1;for(let o=0;o<n.selection.ranges.length&&!i;o++){let{$from:{pos:s},$to:{pos:a}}=n.selection.ranges[o];n.doc.nodesBetween(s,a,(l,c)=>{if(i)return!1;if(!(!l.isTextblock||l.hasMarkup(e,t)))if(l.type==e)i=!0;else{let u=n.doc.resolve(c),f=u.index();i=u.parent.canReplaceWith(f,f+1,e)}})}if(!i)return!1;if(r){let o=n.tr;for(let s=0;s<n.selection.ranges.length;s++){let{$from:{pos:a},$to:{pos:l}}=n.selection.ranges[s];o.setBlockType(a,l,e,t)}r(o.scrollIntoView())}return!0}}function dd(...e){return function(t,n,r){for(let i=0;i<e.length;i++)if(e[i](t,n,r))return!0;return!1}}let fd=dd(cd,w1,x1),L1=dd(cd,S1,C1);const Mr={Enter:dd(M1,E1,O1,OS),"Mod-Enter":A1,Backspace:fd,"Mod-Backspace":fd,"Shift-Backspace":fd,Delete:L1,"Mod-Delete":L1,"Mod-a":PS},NS={"Ctrl-h":Mr.Backspace,"Alt-Backspace":Mr["Mod-Backspace"],"Ctrl-d":Mr.Delete,"Ctrl-Alt-Backspace":Mr["Mod-Delete"],"Alt-Delete":Mr["Mod-Delete"],"Alt-d":Mr["Mod-Delete"],"Ctrl-a":R1,"Ctrl-e":j1};for(let e in Mr)NS[e]=Mr[e];typeof navigator!="undefined"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os!="undefined"&&os.platform&&os.platform()=="darwin";function LS(e,t=null){return function(n,r){let{$from:i,$to:o}=n.selection,s=i.blockRange(o),a=!1,l=s;if(!s)return!1;if(s.depth>=2&&i.node(s.depth-1).type.compatibleContent(e)&&s.startIndex==0){if(i.index(s.depth-1)==0)return!1;let u=n.doc.resolve(s.start-2);l=new La(u,u,s.depth),s.endIndex<s.parent.childCount&&(s=new La(i,n.doc.resolve(o.end(s.depth)),s.depth)),a=!0}let c=Lu(l,e,t,s);return c?(r&&r(DS(n.tr,s,c,a,e).scrollIntoView()),!0):!1}}function DS(e,t,n,r,i){let o=K.empty;for(let u=n.length-1;u>=0;u--)o=K.from(n[u].type.create(n[u].attrs,o));e.step(new _t(t.start-(r?2:0),t.end,t.start,t.end,new re(o,0,0),n.length,!0));let s=0;for(let u=0;u<n.length;u++)n[u].type==i&&(s=u+1);let a=n.length-s,l=t.start+n.length-(r?2:0),c=t.parent;for(let u=t.startIndex,f=t.endIndex,h=!0;u<f;u++,h=!1)!h&&tr(e.doc,l,a)&&(e.split(l,a),l+=2*a),l+=c.child(u).nodeSize;return e}function IS(e){return function(t,n){let{$from:r,$to:i}=t.selection,o=r.blockRange(i,s=>s.childCount>0&&s.firstChild.type==e);return o?n?r.node(o.depth-1).type==e?$S(t,n,e,o):BS(t,n,o):!0:!1}}function $S(e,t,n,r){let i=e.tr,o=r.end,s=r.$to.end(r.depth);o<s&&(i.step(new _t(o-1,s,o,s,new re(K.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new La(i.doc.resolve(r.$from.pos),i.doc.resolve(s),r.depth));const a=Zi(r);if(a==null)return!1;i.lift(r,a);let l=i.mapping.map(o,-1)-1;return wr(i.doc,l)&&i.join(l),t(i.scrollIntoView()),!0}function BS(e,t,n){let r=e.tr,i=n.parent;for(let p=n.end,g=n.endIndex-1,v=n.startIndex;g>v;g--)p-=i.child(g).nodeSize,r.delete(p-1,p+1);let o=r.doc.resolve(n.start),s=o.nodeAfter;if(r.mapping.map(n.end)!=n.start+o.nodeAfter.nodeSize)return!1;let a=n.startIndex==0,l=n.endIndex==i.childCount,c=o.node(-1),u=o.index(-1);if(!c.canReplace(u+(a?0:1),u+1,s.content.append(l?K.empty:K.from(i))))return!1;let f=o.pos,h=f+s.nodeSize;return r.step(new _t(f-(a?1:0),h+(l?1:0),f+1,h-1,new re((a?K.empty:K.from(i.copy(K.empty))).append(l?K.empty:K.from(i.copy(K.empty))),a?0:1,l?0:1),a?0:1)),t(r.scrollIntoView()),!0}function HS(e){return function(t,n){let{$from:r,$to:i}=t.selection,o=r.blockRange(i,c=>c.childCount>0&&c.firstChild.type==e);if(!o)return!1;let s=o.startIndex;if(s==0)return!1;let a=o.parent,l=a.child(s-1);if(l.type!=e)return!1;if(n){let c=l.lastChild&&l.lastChild.type==a.type,u=K.from(c?e.create():null),f=new re(K.from(e.create(null,K.from(a.type.create(null,u)))),c?3:1,0),h=o.start,p=o.end;n(t.tr.step(new _t(h-(c?3:1),p,h,p,f,1,!0)).scrollIntoView())}return!0}}function D1(e){const{state:t,transaction:n}=e;let{selection:r}=n,{doc:i}=n,{storedMarks:o}=n;return Me(J({},t),{apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),filterTransaction:t.filterTransaction,plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return o},get selection(){return r},get doc(){return i},get tr(){return r=n.selection,i=n.doc,o=n.storedMarks,n}})}class zS{constructor(t){this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:t,editor:n,state:r}=this,{view:i}=n,{tr:o}=r,s=this.buildProps(o);return Object.fromEntries(Object.entries(t).map(([a,l])=>[a,(...u)=>{const f=l(...u)(s);return!o.getMeta("preventDispatch")&&!this.hasCustomState&&i.dispatch(o),f}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(t,n=!0){const{rawCommands:r,editor:i,state:o}=this,{view:s}=i,a=[],l=!!t,c=t||o.tr,u=()=>(!l&&n&&!c.getMeta("preventDispatch")&&!this.hasCustomState&&s.dispatch(c),a.every(h=>h===!0)),f=Me(J({},Object.fromEntries(Object.entries(r).map(([h,p])=>[h,(...v)=>{const b=this.buildProps(c,n),w=p(...v)(b);return a.push(w),f}]))),{run:u});return f}createCan(t){const{rawCommands:n,state:r}=this,i=!1,o=t||r.tr,s=this.buildProps(o,i),a=Object.fromEntries(Object.entries(n).map(([l,c])=>[l,(...u)=>c(...u)(Me(J({},s),{dispatch:void 0}))]));return Me(J({},a),{chain:()=>this.createChain(o,i)})}buildProps(t,n=!0){const{rawCommands:r,editor:i,state:o}=this,{view:s}=i,a={tr:t,editor:i,view:s,state:D1({state:o,transaction:t}),dispatch:n?()=>{}:void 0,chain:()=>this.createChain(t,n),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(r).map(([l,c])=>[l,(...u)=>c(...u)(a)]))}};return a}}function ut(e,t,n){return e.config[t]===void 0&&e.parent?ut(e.parent,t,n):typeof e.config[t]=="function"?e.config[t].bind(Me(J({},n),{parent:e.parent?ut(e.parent,t,n):null})):e.config[t]}function FS(e){const t=e.filter(i=>i.type==="extension"),n=e.filter(i=>i.type==="node"),r=e.filter(i=>i.type==="mark");return{baseExtensions:t,nodeExtensions:n,markExtensions:r}}function Tt(e,t){if(typeof e=="string"){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}function Ue(...e){return e.filter(t=>!!t).reduce((t,n)=>{const r=J({},t);return Object.entries(n).forEach(([i,o])=>{if(!r[i]){r[i]=o;return}if(i==="class"){const a=o?o.split(" "):[],l=r[i]?r[i].split(" "):[],c=a.filter(u=>!l.includes(u));r[i]=[...l,...c].join(" ")}else i==="style"?r[i]=[r[i],o].join("; "):r[i]=o}),r},{})}function VS(e){return typeof e=="function"}function Ze(e,t=void 0,...n){return VS(e)?t?e.bind(t)(...n):e(...n):e}function WS(e){return Object.prototype.toString.call(e)==="[object RegExp]"}class xs{constructor(t){this.find=t.find,this.handler=t.handler}}class US{constructor(t){this.find=t.find,this.handler=t.handler}}function KS(e){return Object.prototype.toString.call(e).slice(8,-1)}function hd(e){return KS(e)!=="Object"?!1:e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}function Xa(e,t){const n=J({},e);return hd(e)&&hd(t)&&Object.keys(t).forEach(r=>{hd(t[r])?r in e?n[r]=Xa(e[r],t[r]):Object.assign(n,{[r]:t[r]}):Object.assign(n,{[r]:t[r]})}),n}class vt{constructor(t={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config=J(J({},this.config),t),this.name=this.config.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Ze(ut(this,"addOptions",{name:this.name}))),this.storage=Ze(ut(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new vt(t)}configure(t={}){const n=this.extend();return n.options=Xa(this.options,t),n.storage=Ze(ut(n,"addStorage",{name:n.name,options:n.options})),n}extend(t={}){const n=new vt(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=Ze(ut(n,"addOptions",{name:n.name})),n.storage=Ze(ut(n,"addStorage",{name:n.name,options:n.options})),n}}function qS(e,t,n){const{from:r,to:i}=t,{blockSeparator:o=`
`,textSerializers:s={}}=n||{};let a="",l=!0;return e.nodesBetween(r,i,(c,u,f,h)=>{var p;const g=s==null?void 0:s[c.type.name];g?(c.isBlock&&!l&&(a+=o,l=!0),f&&(a+=g({node:c,pos:u,parent:f,index:h,range:t}))):c.isText?(a+=(p=c==null?void 0:c.text)===null||p===void 0?void 0:p.slice(Math.max(r,u)-u,i-u),l=!1):c.isBlock&&!l&&(a+=o,l=!0)}),a}function JS(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,t])=>t.spec.toText).map(([t,n])=>[t,n.spec.toText]))}const NP=vt.create({name:"clipboardTextSerializer",addProseMirrorPlugins(){return[new gt({key:new yt("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:e}=this,{state:t,schema:n}=e,{doc:r,selection:i}=t,{ranges:o}=i,s=Math.min(...o.map(u=>u.$from.pos)),a=Math.max(...o.map(u=>u.$to.pos)),l=JS(n);return qS(r,{from:s,to:a},{textSerializers:l})}}})]}}),GS=()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{var n;e.isDestroyed||(t.dom.blur(),(n=window==null?void 0:window.getSelection())===null||n===void 0||n.removeAllRanges())}),!0),YS=(e=!1)=>({commands:t})=>t.setContent("",e),XS=()=>({state:e,tr:t,dispatch:n})=>{const{selection:r}=t,{ranges:i}=r;return n&&i.forEach(({$from:o,$to:s})=>{e.doc.nodesBetween(o.pos,s.pos,(a,l)=>{if(a.type.isText)return;const{doc:c,mapping:u}=t,f=c.resolve(u.map(l)),h=c.resolve(u.map(l+a.nodeSize)),p=f.blockRange(h);if(!p)return;const g=Zi(p);if(a.type.isTextblock){const{defaultType:v}=f.parent.contentMatchAt(f.index());t.setNodeMarkup(p.start,v)}(g||g===0)&&t.lift(p,g)})}),!0},QS=e=>t=>e(t),ZS=()=>({state:e,dispatch:t})=>E1(e,t),eC=(e,t)=>({editor:n,tr:r})=>{const{state:i}=n,o=i.doc.slice(e.from,e.to);r.deleteRange(e.from,e.to);const s=r.mapping.map(t);return r.insert(s,o.content),r.setSelection(new ke(r.doc.resolve(s-1))),!0},tC=()=>({tr:e,dispatch:t})=>{const{selection:n}=e,r=n.$anchor.node();if(r.content.size>0)return!1;const i=e.selection.$anchor;for(let o=i.depth;o>0;o-=1)if(i.node(o).type===r.type){if(t){const a=i.before(o),l=i.after(o);e.delete(a,l).scrollIntoView()}return!0}return!1},nC=e=>({tr:t,state:n,dispatch:r})=>{const i=Tt(e,n.schema),o=t.selection.$anchor;for(let s=o.depth;s>0;s-=1)if(o.node(s).type===i){if(r){const l=o.before(s),c=o.after(s);t.delete(l,c).scrollIntoView()}return!0}return!1},rC=e=>({tr:t,dispatch:n})=>{const{from:r,to:i}=e;return n&&t.delete(r,i),!0},iC=()=>({state:e,dispatch:t})=>cd(e,t),oC=()=>({commands:e})=>e.keyboardShortcut("Enter"),sC=()=>({state:e,dispatch:t})=>A1(e,t);function Qa(e,t,n={strict:!0}){const r=Object.keys(t);return r.length?r.every(i=>n.strict?t[i]===e[i]:WS(t[i])?t[i].test(e[i]):t[i]===e[i]):!0}function pd(e,t,n={}){return e.find(r=>r.type===t&&Qa(r.attrs,n))}function aC(e,t,n={}){return!!pd(e,t,n)}function md(e,t,n={}){if(!e||!t)return;let r=e.parent.childAfter(e.parentOffset);if(e.parentOffset===r.offset&&r.offset!==0&&(r=e.parent.childBefore(e.parentOffset)),!r.node)return;const i=pd([...r.node.marks],t,n);if(!i)return;let o=r.index,s=e.start()+r.offset,a=o+1,l=s+r.node.nodeSize;for(pd([...r.node.marks],t,n);o>0&&i.isInSet(e.parent.child(o-1).marks);)o-=1,s-=e.parent.child(o).nodeSize;for(;a<e.parent.childCount&&aC([...e.parent.child(a).marks],t,n);)l+=e.parent.child(a).nodeSize,a+=1;return{from:s,to:l}}function Ar(e,t){if(typeof e=="string"){if(!t.marks[e])throw Error(`There is no mark type named '${e}'. Maybe you forgot to add the extension?`);return t.marks[e]}return e}const lC=(e,t={})=>({tr:n,state:r,dispatch:i})=>{const o=Ar(e,r.schema),{doc:s,selection:a}=n,{$from:l,from:c,to:u}=a;if(i){const f=md(l,o,t);if(f&&f.from<=c&&f.to>=u){const h=ke.create(s,f.from,f.to);n.setSelection(h)}}return!0},cC=e=>t=>{const n=typeof e=="function"?e(t):e;for(let r=0;r<n.length;r+=1)if(n[r](t))return!0;return!1};function gd(e){return e instanceof ke}function nr(e=0,t=0,n=0){return Math.min(Math.max(e,t),n)}function uC(e,t=null){if(!t)return null;const n=Se.atStart(e),r=Se.atEnd(e);if(t==="start"||t===!0)return n;if(t==="end")return r;const i=n.from,o=r.to;return t==="all"?ke.create(e,nr(0,i,o),nr(e.content.size,i,o)):ke.create(e,nr(t,i,o),nr(t,i,o))}function yd(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}const dC=(e=null,t={})=>({editor:n,view:r,tr:i,dispatch:o})=>{t=J({scrollIntoView:!0},t);const s=()=>{yd()&&r.dom.focus(),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),(t==null?void 0:t.scrollIntoView)&&n.commands.scrollIntoView())})};if(r.hasFocus()&&e===null||e===!1)return!0;if(o&&e===null&&!gd(n.state.selection))return s(),!0;const a=uC(i.doc,e)||n.state.selection,l=n.state.selection.eq(a);return o&&(l||i.setSelection(a),l&&i.storedMarks&&i.setStoredMarks(i.storedMarks),s()),!0},fC=(e,t)=>n=>e.every((r,i)=>t(r,Me(J({},n),{index:i}))),hC=(e,t)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},e,t);function I1(e){const t=`<body>${e}</body>`;return new window.DOMParser().parseFromString(t,"text/html").body}function Za(e,t,n){if(n=J({slice:!0,parseOptions:{}},n),typeof e=="object"&&e!==null)try{return Array.isArray(e)&&e.length>0?K.fromArray(e.map(r=>t.nodeFromJSON(r))):t.nodeFromJSON(e)}catch(r){return console.warn("[tiptap warn]: Invalid content.","Passed value:",e,"Error:",r),Za("",t,n)}if(typeof e=="string"){const r=hs.fromSchema(t);return n.slice?r.parseSlice(I1(e),n.parseOptions).content:r.parse(I1(e),n.parseOptions)}return Za("",t,n)}function pC(e,t,n){const r=e.steps.length-1;if(r<t)return;const i=e.steps[r];if(!(i instanceof jt||i instanceof _t))return;const o=e.mapping.maps[r];let s=0;o.forEach((a,l,c,u)=>{s===0&&(s=u)}),e.setSelection(Se.near(e.doc.resolve(s),n))}const mC=e=>e.toString().startsWith("<"),gC=(e,t,n)=>({tr:r,dispatch:i,editor:o})=>{if(i){n=J({parseOptions:{},updateSelection:!0},n);const s=Za(t,o.schema,{parseOptions:J({preserveWhitespace:"full"},n.parseOptions)});if(s.toString()==="<>")return!0;let{from:a,to:l}=typeof e=="number"?{from:e,to:e}:{from:e.from,to:e.to},c=!0,u=!0;if((mC(s)?s:[s]).forEach(h=>{h.check(),c=c?h.isText&&h.marks.length===0:!1,u=u?h.isBlock:!1}),a===l&&u){const{parent:h}=r.doc.resolve(a);h.isTextblock&&!h.type.spec.code&&!h.childCount&&(a-=1,l+=1)}c?Array.isArray(t)?r.insertText(t.map(h=>h.text||"").join(""),a,l):typeof t=="object"&&!!t&&!!t.text?r.insertText(t.text,a,l):r.insertText(t,a,l):r.replaceWith(a,l,s),n.updateSelection&&pC(r,r.steps.length-1,-1)}return!0},yC=()=>({state:e,dispatch:t})=>_S(e,t),vC=()=>({state:e,dispatch:t})=>MS(e,t),bC=()=>({state:e,dispatch:t})=>w1(e,t),wC=()=>({state:e,dispatch:t})=>S1(e,t),xC=()=>({tr:e,state:t,dispatch:n})=>{try{const r=za(t.doc,t.selection.$from.pos,-1);return r==null?!1:(e.join(r,2),n&&n(e),!0)}catch(r){return!1}},kC=()=>({state:e,dispatch:t,tr:n})=>{try{const r=za(e.doc,e.selection.$from.pos,1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch(r){return!1}};function vd(){return typeof navigator!="undefined"?/Mac/.test(navigator.platform):!1}function SC(e){const t=e.split(/-(?!$)/);let n=t[t.length-1];n==="Space"&&(n=" ");let r,i,o,s;for(let a=0;a<t.length-1;a+=1){const l=t[a];if(/^(cmd|meta|m)$/i.test(l))s=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))i=!0;else if(/^s(hift)?$/i.test(l))o=!0;else if(/^mod$/i.test(l))yd()||vd()?s=!0:i=!0;else throw new Error(`Unrecognized modifier name: ${l}`)}return r&&(n=`Alt-${n}`),i&&(n=`Ctrl-${n}`),s&&(n=`Meta-${n}`),o&&(n=`Shift-${n}`),n}const CC=e=>({editor:t,view:n,tr:r,dispatch:i})=>{const o=SC(e).split(/-(?!$)/),s=o.find(c=>!["Alt","Ctrl","Meta","Shift"].includes(c)),a=new KeyboardEvent("keydown",{key:s==="Space"?" ":s,altKey:o.includes("Alt"),ctrlKey:o.includes("Ctrl"),metaKey:o.includes("Meta"),shiftKey:o.includes("Shift"),bubbles:!0,cancelable:!0}),l=t.captureTransaction(()=>{n.someProp("handleKeyDown",c=>c(n,a))});return l==null||l.steps.forEach(c=>{const u=c.map(r.mapping);u&&i&&r.maybeStep(u)}),!0};function bd(e,t,n={}){const{from:r,to:i,empty:o}=e.selection,s=t?Tt(t,e.schema):null,a=[];e.doc.nodesBetween(r,i,(f,h)=>{if(f.isText)return;const p=Math.max(r,h),g=Math.min(i,h+f.nodeSize);a.push({node:f,from:p,to:g})});const l=i-r,c=a.filter(f=>s?s.name===f.node.type.name:!0).filter(f=>Qa(f.node.attrs,n,{strict:!1}));return o?!!c.length:c.reduce((f,h)=>f+h.to-h.from,0)>=l}const _C=(e,t={})=>({state:n,dispatch:r})=>{const i=Tt(e,n.schema);return bd(n,i,t)?AS(n,r):!1},MC=()=>({state:e,dispatch:t})=>O1(e,t),AC=e=>({state:t,dispatch:n})=>{const r=Tt(e,t.schema);return IS(r)(t,n)},EC=()=>({state:e,dispatch:t})=>M1(e,t);function wd(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function $1(e,t){const n=typeof t=="string"?[t]:t;return Object.keys(e).reduce((r,i)=>(n.includes(i)||(r[i]=e[i]),r),{})}const OC=(e,t)=>({tr:n,state:r,dispatch:i})=>{let o=null,s=null;const a=wd(typeof e=="string"?e:e.name,r.schema);return a?(a==="node"&&(o=Tt(e,r.schema)),a==="mark"&&(s=Ar(e,r.schema)),i&&n.selection.ranges.forEach(l=>{r.doc.nodesBetween(l.$from.pos,l.$to.pos,(c,u)=>{o&&o===c.type&&n.setNodeMarkup(u,void 0,$1(c.attrs,t)),s&&c.marks.length&&c.marks.forEach(f=>{s===f.type&&n.addMark(u,u+c.nodeSize,s.create($1(f.attrs,t)))})})}),!0):!1},TC=()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),PC=()=>({tr:e,commands:t})=>t.setTextSelection({from:0,to:e.doc.content.size}),RC=()=>({state:e,dispatch:t})=>x1(e,t),jC=()=>({state:e,dispatch:t})=>C1(e,t),NC=()=>({state:e,dispatch:t})=>TS(e,t),LC=()=>({state:e,dispatch:t})=>j1(e,t),DC=()=>({state:e,dispatch:t})=>R1(e,t);function IC(e,t,n={}){return Za(e,t,{slice:!1,parseOptions:n})}const $C=(e,t=!1,n={})=>({tr:r,editor:i,dispatch:o})=>{const{doc:s}=r,a=IC(e,i.schema,n);return o&&r.replaceWith(0,s.content.size,a).setMeta("preventUpdate",!t),!0};function ks(e,t){const n=Ar(t,e.schema),{from:r,to:i,empty:o}=e.selection,s=[];o?(e.storedMarks&&s.push(...e.storedMarks),s.push(...e.selection.$head.marks())):e.doc.nodesBetween(r,i,l=>{s.push(...l.marks)});const a=s.find(l=>l.type.name===n.name);return a?J({},a.attrs):{}}function BC(e,t){const n=new Og(e);return t.forEach(r=>{r.steps.forEach(i=>{n.step(i)})}),n}function HC(e){for(let t=0;t<e.edgeCount;t+=1){const{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function zC(e,t,n){const r=[];return e.nodesBetween(t.from,t.to,(i,o)=>{n(i)&&r.push({node:i,pos:o})}),r}function B1(e,t){for(let n=e.depth;n>0;n-=1){const r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}}function xd(e){return t=>B1(t.$from,e)}function FC(e,t){const n=Tt(t,e.schema),{from:r,to:i}=e.selection,o=[];e.doc.nodesBetween(r,i,a=>{o.push(a)});const s=o.reverse().find(a=>a.type.name===n.name);return s?J({},s.attrs):{}}function VC(e,t){const n=wd(typeof t=="string"?t:t.name,e.schema);return n==="node"?FC(e,t):n==="mark"?ks(e,t):{}}function WC(e,t=JSON.stringify){const n={};return e.filter(r=>{const i=t(r);return Object.prototype.hasOwnProperty.call(n,i)?!1:n[i]=!0})}function UC(e){const t=WC(e);return t.length===1?t:t.filter((n,r)=>!t.filter((o,s)=>s!==r).some(o=>n.oldRange.from>=o.oldRange.from&&n.oldRange.to<=o.oldRange.to&&n.newRange.from>=o.newRange.from&&n.newRange.to<=o.newRange.to))}function KC(e){const{mapping:t,steps:n}=e,r=[];return t.maps.forEach((i,o)=>{const s=[];if(i.ranges.length)i.forEach((a,l)=>{s.push({from:a,to:l})});else{const{from:a,to:l}=n[o];if(a===void 0||l===void 0)return;s.push({from:a,to:l})}s.forEach(({from:a,to:l})=>{const c=t.slice(o).map(a,-1),u=t.slice(o).map(l),f=t.invert().map(c,-1),h=t.invert().map(u);r.push({oldRange:{from:f,to:h},newRange:{from:c,to:u}})})}),UC(r)}function kd(e,t,n){const r=[];return e===t?n.resolve(e).marks().forEach(i=>{const o=n.resolve(e-1),s=md(o,i.type);!s||r.push(J({mark:i},s))}):n.nodesBetween(e,t,(i,o)=>{r.push(...i.marks.map(s=>({from:o,to:o+i.nodeSize,mark:s})))}),r}function el(e,t,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{const i=e.find(o=>o.type===t&&o.name===r);return i?i.attribute.keepOnSplit:!1}))}function qC(e,t,n={}){const{empty:r,ranges:i}=e.selection,o=t?Ar(t,e.schema):null;if(r)return!!(e.storedMarks||e.selection.$from.marks()).filter(f=>o?o.name===f.type.name:!0).find(f=>Qa(f.attrs,n,{strict:!1}));let s=0;const a=[];if(i.forEach(({$from:f,$to:h})=>{const p=f.pos,g=h.pos;e.doc.nodesBetween(p,g,(v,b)=>{if(!v.isText&&!v.marks.length)return;const w=Math.max(p,b),k=Math.min(g,b+v.nodeSize);s+=k-w,a.push(...v.marks.map(d=>({mark:d,from:w,to:k})))})}),s===0)return!1;const l=a.filter(f=>o?o.name===f.mark.type.name:!0).filter(f=>Qa(f.mark.attrs,n,{strict:!1})).reduce((f,h)=>f+h.to-h.from,0),c=a.filter(f=>o?f.mark.type!==o&&f.mark.type.excludes(o):!0).reduce((f,h)=>f+h.to-h.from,0);return(l>0?l+c:l)>=s}function H1(e,t){const{nodeExtensions:n}=FS(t),r=n.find(s=>s.name===e);if(!r)return!1;const i={name:r.name,options:r.options,storage:r.storage},o=Ze(ut(r,"group",i));return typeof o!="string"?!1:o.split(" ").includes("list")}function JC(e){return e instanceof be}function z1(e,t,n){const r=0,i=e.state.doc.content.size,o=nr(t,r,i),s=nr(n,r,i),a=e.coordsAtPos(o),l=e.coordsAtPos(s,-1),c=Math.min(a.top,l.top),u=Math.max(a.bottom,l.bottom),f=Math.min(a.left,l.left),h=Math.max(a.right,l.right),p=h-f,g=u-c,w={top:c,bottom:u,left:f,right:h,width:p,height:g,x:f,y:c};return Me(J({},w),{toJSON:()=>w})}function GC(e,t,n){var r;const{selection:i}=t;let o=null;if(gd(i)&&(o=i.$cursor),o){const a=(r=e.storedMarks)!==null&&r!==void 0?r:o.marks();return!!n.isInSet(a)||!a.some(l=>l.type.excludes(n))}const{ranges:s}=i;return s.some(({$from:a,$to:l})=>{let c=a.depth===0?e.doc.inlineContent&&e.doc.type.allowsMarkType(n):!1;return e.doc.nodesBetween(a.pos,l.pos,(u,f,h)=>{if(c)return!1;if(u.isInline){const p=!h||h.type.allowsMarkType(n),g=!!n.isInSet(u.marks)||!u.marks.some(v=>v.type.excludes(n));c=p&&g}return!c}),c})}const YC=(e,t={})=>({tr:n,state:r,dispatch:i})=>{const{selection:o}=n,{empty:s,ranges:a}=o,l=Ar(e,r.schema);if(i)if(s){const c=ks(r,l);n.addStoredMark(l.create(J(J({},c),t)))}else a.forEach(c=>{const u=c.$from.pos,f=c.$to.pos;r.doc.nodesBetween(u,f,(h,p)=>{const g=Math.max(p,u),v=Math.min(p+h.nodeSize,f);h.marks.find(w=>w.type===l)?h.marks.forEach(w=>{l===w.type&&n.addMark(g,v,l.create(J(J({},w.attrs),t)))}):n.addMark(g,v,l.create(t))})});return GC(r,n,l)},XC=(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),QC=(e,t={})=>({state:n,dispatch:r,chain:i})=>{const o=Tt(e,n.schema);return o.isTextblock?i().command(({commands:s})=>N1(o,t)(n)?!0:s.clearNodes()).command(({state:s})=>N1(o,t)(s,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},ZC=e=>({tr:t,dispatch:n})=>{if(n){const{doc:r}=t,i=nr(e,0,r.content.size),o=be.create(r,i);t.setSelection(o)}return!0},e_=e=>({tr:t,dispatch:n})=>{if(n){const{doc:r}=t,{from:i,to:o}=typeof e=="number"?{from:e,to:e}:e,s=ke.atStart(r).from,a=ke.atEnd(r).to,l=nr(i,s,a),c=nr(o,s,a),u=ke.create(r,l,c);t.setSelection(u)}return!0},t_=e=>({state:t,dispatch:n})=>{const r=Tt(e,t.schema);return HS(r)(t,n)};function F1(e,t){const n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){const r=n.filter(i=>t==null?void 0:t.includes(i.type.name));e.tr.ensureMarks(r)}}const n_=({keepMarks:e=!0}={})=>({tr:t,state:n,dispatch:r,editor:i})=>{const{selection:o,doc:s}=t,{$from:a,$to:l}=o,c=i.extensionManager.attributes,u=el(c,a.node().type.name,a.node().attrs);if(o instanceof be&&o.node.isBlock)return!a.parentOffset||!tr(s,a.pos)?!1:(r&&(e&&F1(n,i.extensionManager.splittableMarks),t.split(a.pos).scrollIntoView()),!0);if(!a.parent.isBlock)return!1;if(r){const f=l.parentOffset===l.parent.content.size;o instanceof ke&&t.deleteSelection();const h=a.depth===0?void 0:HC(a.node(-1).contentMatchAt(a.indexAfter(-1)));let p=f&&h?[{type:h,attrs:u}]:void 0,g=tr(t.doc,t.mapping.map(a.pos),1,p);if(!p&&!g&&tr(t.doc,t.mapping.map(a.pos),1,h?[{type:h}]:void 0)&&(g=!0,p=h?[{type:h,attrs:u}]:void 0),g&&(t.split(t.mapping.map(a.pos),1,p),h&&!f&&!a.parentOffset&&a.parent.type!==h)){const v=t.mapping.map(a.before()),b=t.doc.resolve(v);a.node(-1).canReplaceWith(b.index(),b.index()+1,h)&&t.setNodeMarkup(t.mapping.map(a.before()),h)}e&&F1(n,i.extensionManager.splittableMarks),t.scrollIntoView()}return!0},r_=e=>({tr:t,state:n,dispatch:r,editor:i})=>{var o;const s=Tt(e,n.schema),{$from:a,$to:l}=n.selection,c=n.selection.node;if(c&&c.isBlock||a.depth<2||!a.sameParent(l))return!1;const u=a.node(-1);if(u.type!==s)return!1;const f=i.extensionManager.attributes;if(a.parent.content.size===0&&a.node(-1).childCount===a.indexAfter(-1)){if(a.depth===2||a.node(-3).type!==s||a.index(-2)!==a.node(-2).childCount-1)return!1;if(r){let b=K.empty;const w=a.index(-1)?1:a.index(-2)?2:3;for(let x=a.depth-w;x>=a.depth-3;x-=1)b=K.from(a.node(x).copy(b));const k=a.indexAfter(-1)<a.node(-2).childCount?1:a.indexAfter(-2)<a.node(-3).childCount?2:3,A=el(f,a.node().type.name,a.node().attrs),d=((o=s.contentMatch.defaultType)===null||o===void 0?void 0:o.createAndFill(A))||void 0;b=b.append(K.from(s.createAndFill(null,d)||void 0));const y=a.before(a.depth-(w-1));t.replace(y,a.after(-k),new re(b,4-w,0));let m=-1;t.doc.nodesBetween(y,t.doc.content.size,(x,S)=>{if(m>-1)return!1;x.isTextblock&&x.content.size===0&&(m=S+1)}),m>-1&&t.setSelection(ke.near(t.doc.resolve(m))),t.scrollIntoView()}return!0}const h=l.pos===a.end()?u.contentMatchAt(0).defaultType:null,p=el(f,u.type.name,u.attrs),g=el(f,a.node().type.name,a.node().attrs);t.delete(a.pos,l.pos);const v=h?[{type:s,attrs:p},{type:h,attrs:g}]:[{type:s,attrs:p}];if(!tr(t.doc,a.pos,2))return!1;if(r){const{selection:b,storedMarks:w}=n,{splittableMarks:k}=i.extensionManager,A=w||b.$to.parentOffset&&b.$from.marks();if(t.split(a.pos,2,v).scrollIntoView(),!A||!r)return!0;const d=A.filter(y=>k.includes(y.type.name));t.ensureMarks(d)}return!0},Sd=(e,t)=>{const n=xd(s=>s.type===t)(e.selection);if(!n)return!0;const r=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;const i=e.doc.nodeAt(r);return n.node.type===(i==null?void 0:i.type)&&wr(e.doc,n.pos)&&e.join(n.pos),!0},Cd=(e,t)=>{const n=xd(s=>s.type===t)(e.selection);if(!n)return!0;const r=e.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;const i=e.doc.nodeAt(r);return n.node.type===(i==null?void 0:i.type)&&wr(e.doc,r)&&e.join(r),!0},i_=(e,t,n,r={})=>({editor:i,tr:o,state:s,dispatch:a,chain:l,commands:c,can:u})=>{const{extensions:f,splittableMarks:h}=i.extensionManager,p=Tt(e,s.schema),g=Tt(t,s.schema),{selection:v,storedMarks:b}=s,{$from:w,$to:k}=v,A=w.blockRange(k),d=b||v.$to.parentOffset&&v.$from.marks();if(!A)return!1;const y=xd(m=>H1(m.type.name,f))(v);if(A.depth>=1&&y&&A.depth-y.depth<=1){if(y.node.type===p)return c.liftListItem(g);if(H1(y.node.type.name,f)&&p.validContent(y.node.content)&&a)return l().command(()=>(o.setNodeMarkup(y.pos,p),!0)).command(()=>Sd(o,p)).command(()=>Cd(o,p)).run()}return!n||!d||!a?l().command(()=>u().wrapInList(p,r)?!0:c.clearNodes()).wrapInList(p,r).command(()=>Sd(o,p)).command(()=>Cd(o,p)).run():l().command(()=>{const m=u().wrapInList(p,r),x=d.filter(S=>h.includes(S.type.name));return o.ensureMarks(x),m?!0:c.clearNodes()}).wrapInList(p,r).command(()=>Sd(o,p)).command(()=>Cd(o,p)).run()},o_=(e,t={},n={})=>({state:r,commands:i})=>{const{extendEmptyMarkRange:o=!1}=n,s=Ar(e,r.schema);return qC(r,s,t)?i.unsetMark(s,{extendEmptyMarkRange:o}):i.setMark(s,t)},s_=(e,t,n={})=>({state:r,commands:i})=>{const o=Tt(e,r.schema),s=Tt(t,r.schema);return bd(r,o,n)?i.setNode(s):i.setNode(o,n)},a_=(e,t={})=>({state:n,commands:r})=>{const i=Tt(e,n.schema);return bd(n,i,t)?r.lift(i):r.wrapIn(i,t)},l_=()=>({state:e,dispatch:t})=>{const n=e.plugins;for(let r=0;r<n.length;r+=1){const i=n[r];let o;if(i.spec.isInputRules&&(o=i.getState(e))){if(t){const s=e.tr,a=o.transform;for(let l=a.steps.length-1;l>=0;l-=1)s.step(a.steps[l].invert(a.docs[l]));if(o.text){const l=s.doc.resolve(o.from).marks();s.replaceWith(o.from,o.to,e.schema.text(o.text,l))}else s.delete(o.from,o.to)}return!0}}return!1},c_=()=>({tr:e,dispatch:t})=>{const{selection:n}=e,{empty:r,ranges:i}=n;return r||t&&i.forEach(o=>{e.removeMark(o.$from.pos,o.$to.pos)}),!0},u_=(e,t={})=>({tr:n,state:r,dispatch:i})=>{var o;const{extendEmptyMarkRange:s=!1}=t,{selection:a}=n,l=Ar(e,r.schema),{$from:c,empty:u,ranges:f}=a;if(!i)return!0;if(u&&s){let{from:h,to:p}=a;const g=(o=c.marks().find(b=>b.type===l))===null||o===void 0?void 0:o.attrs,v=md(c,l,g);v&&(h=v.from,p=v.to),n.removeMark(h,p,l)}else f.forEach(h=>{n.removeMark(h.$from.pos,h.$to.pos,l)});return n.removeStoredMark(l),!0},d_=(e,t={})=>({tr:n,state:r,dispatch:i})=>{let o=null,s=null;const a=wd(typeof e=="string"?e:e.name,r.schema);return a?(a==="node"&&(o=Tt(e,r.schema)),a==="mark"&&(s=Ar(e,r.schema)),i&&n.selection.ranges.forEach(l=>{const c=l.$from.pos,u=l.$to.pos;r.doc.nodesBetween(c,u,(f,h)=>{o&&o===f.type&&n.setNodeMarkup(h,void 0,J(J({},f.attrs),t)),s&&f.marks.length&&f.marks.forEach(p=>{if(s===p.type){const g=Math.max(h,c),v=Math.min(h+f.nodeSize,u);n.addMark(g,v,s.create(J(J({},p.attrs),t)))}})})}),!0):!1},f_=(e,t={})=>({state:n,dispatch:r})=>{const i=Tt(e,n.schema);return jS(i,t)(n,r)},h_=(e,t={})=>({state:n,dispatch:r})=>{const i=Tt(e,n.schema);return LS(i,t)(n,r)};var p_=Object.freeze({__proto__:null,blur:GS,clearContent:YS,clearNodes:XS,command:QS,createParagraphNear:ZS,cut:eC,deleteCurrentNode:tC,deleteNode:nC,deleteRange:rC,deleteSelection:iC,enter:oC,exitCode:sC,extendMarkRange:lC,first:cC,focus:dC,forEach:fC,insertContent:hC,insertContentAt:gC,joinUp:yC,joinDown:vC,joinBackward:bC,joinForward:wC,joinItemBackward:xC,joinItemForward:kC,keyboardShortcut:CC,lift:_C,liftEmptyBlock:MC,liftListItem:AC,newlineInCode:EC,resetAttributes:OC,scrollIntoView:TC,selectAll:PC,selectNodeBackward:RC,selectNodeForward:jC,selectParentNode:NC,selectTextblockEnd:LC,selectTextblockStart:DC,setContent:$C,setMark:YC,setMeta:XC,setNode:QC,setNodeSelection:ZC,setTextSelection:e_,sinkListItem:t_,splitBlock:n_,splitListItem:r_,toggleList:i_,toggleMark:o_,toggleNode:s_,toggleWrap:a_,undoInputRule:l_,unsetAllMarks:c_,unsetMark:u_,updateAttributes:d_,wrapIn:f_,wrapInList:h_});const LP=vt.create({name:"commands",addCommands(){return J({},p_)}}),DP=vt.create({name:"editable",addProseMirrorPlugins(){return[new gt({key:new yt("editable"),props:{editable:()=>this.editor.options.editable}})]}}),IP=vt.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:e}=this;return[new gt({key:new yt("focusEvents"),props:{handleDOMEvents:{focus:(t,n)=>{e.isFocused=!0;const r=e.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1},blur:(t,n)=>{e.isFocused=!1;const r=e.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1}}}})]}}),$P=vt.create({name:"keymap",addKeyboardShortcuts(){const e=()=>this.editor.commands.first(({commands:s})=>[()=>s.undoInputRule(),()=>s.command(({tr:a})=>{const{selection:l,doc:c}=a,{empty:u,$anchor:f}=l,{pos:h,parent:p}=f,g=f.parent.isTextblock?a.doc.resolve(h-1):f,v=g.parent.type.spec.isolating,b=f.pos-f.parentOffset,w=v&&g.parent.childCount===1?b===f.pos:Se.atStart(c).from===h;return!u||!w||!p.type.isTextblock||p.textContent.length?!1:s.clearNodes()}),()=>s.deleteSelection(),()=>s.joinBackward(),()=>s.selectNodeBackward()]),t=()=>this.editor.commands.first(({commands:s})=>[()=>s.deleteSelection(),()=>s.deleteCurrentNode(),()=>s.joinForward(),()=>s.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:s})=>[()=>s.newlineInCode(),()=>s.createParagraphNear(),()=>s.liftEmptyBlock(),()=>s.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},i=J({},r),o=Me(J({},r),{"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()});return yd()||vd()?o:i},addProseMirrorPlugins(){return[new gt({key:new yt("clearDocument"),appendTransaction:(e,t,n)=>{if(!(e.some(g=>g.docChanged)&&!t.doc.eq(n.doc)))return;const{empty:i,from:o,to:s}=t.selection,a=Se.atStart(t.doc).from,l=Se.atEnd(t.doc).to;if(i||!(o===a&&s===l)||!(n.doc.textBetween(0,n.doc.content.size," "," ").length===0))return;const f=n.tr,h=D1({state:n,transaction:f}),{commands:p}=new zS({editor:this.editor,state:h});if(p.clearNodes(),!!f.steps.length)return f}})]}}),BP=vt.create({name:"tabindex",addProseMirrorPlugins(){return[new gt({key:new yt("tabindex"),props:{attributes:this.editor.isEditable?{tabindex:"0"}:{}}})]}});function mi(e){return new xs({find:e.find,handler:({state:t,range:n,match:r})=>{const i=Ze(e.getAttributes,void 0,r);if(i===!1||i===null)return null;const{tr:o}=t,s=r[r.length-1],a=r[0];if(s){const l=a.search(/\S/),c=n.from+a.indexOf(s),u=c+s.length;if(kd(n.from,n.to,t.doc).filter(p=>p.mark.type.excluded.find(v=>v===e.type&&v!==p.mark.type)).filter(p=>p.to>c).length)return null;u<n.to&&o.delete(u,n.to),c>n.from&&o.delete(n.from+l,c);const h=n.from+l+s.length;o.addMark(n.from+l,h,e.type.create(i||{})),o.removeStoredMark(e.type)}}})}function V1(e){return new xs({find:e.find,handler:({state:t,range:n,match:r})=>{const i=Ze(e.getAttributes,void 0,r)||{},{tr:o}=t,s=n.from;let a=n.to;const l=e.type.create(i);if(r[1]){const c=r[0].lastIndexOf(r[1]);let u=s+c;u>a?u=a:a=u+r[1].length;const f=r[0][r[0].length-1];o.insertText(f,s+r[0].length-1),o.replaceWith(u,a,l)}else r[0]&&o.insert(s-1,e.type.create(i)).delete(o.mapping.map(s),o.mapping.map(a));o.scrollIntoView()}})}function _d(e){return new xs({find:e.find,handler:({state:t,range:n,match:r})=>{const i=t.doc.resolve(n.from),o=Ze(e.getAttributes,void 0,r)||{};if(!i.node(-1).canReplaceWith(i.index(-1),i.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,o)}})}function rt(e){return new xs({find:e.find,handler:({state:t,range:n,match:r})=>{let i=e.replace,o=n.from;const s=n.to;if(r[1]){const a=r[0].lastIndexOf(r[1]);i+=r[0].slice(a+r[1].length),o+=a;const l=o-s;l>0&&(i=r[0].slice(a-l,a)+i,o=s)}t.tr.insertText(i,o,s)}})}function Ss(e){return new xs({find:e.find,handler:({state:t,range:n,match:r,chain:i})=>{const o=Ze(e.getAttributes,void 0,r)||{},s=t.tr.delete(n.from,n.to),l=s.doc.resolve(n.from).blockRange(),c=l&&Lu(l,e.type,o);if(!c)return null;if(s.wrap(l,c),e.keepMarks&&e.editor){const{selection:f,storedMarks:h}=t,{splittableMarks:p}=e.editor.extensionManager,g=h||f.$to.parentOffset&&f.$from.marks();if(g){const v=g.filter(b=>p.includes(b.type.name));s.ensureMarks(v)}}if(e.keepAttributes){const f=e.type.name==="bulletList"||e.type.name==="orderedList"?"listItem":"taskList";i().updateAttributes(f,o).run()}const u=s.doc.resolve(n.from-1).nodeBefore;u&&u.type===e.type&&wr(s.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(r,u))&&s.join(n.from-1)}})}class gn{constructor(t={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config=J(J({},this.config),t),this.name=this.config.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Ze(ut(this,"addOptions",{name:this.name}))),this.storage=Ze(ut(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new gn(t)}configure(t={}){const n=this.extend();return n.options=Xa(this.options,t),n.storage=Ze(ut(n,"addStorage",{name:n.name,options:n.options})),n}extend(t={}){const n=new gn(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=Ze(ut(n,"addOptions",{name:n.name})),n.storage=Ze(ut(n,"addStorage",{name:n.name,options:n.options})),n}static handleExit({editor:t,mark:n}){const{tr:r}=t.state,i=t.state.selection.$from;if(i.pos===i.end()){const s=i.marks();if(!!!s.find(c=>(c==null?void 0:c.type.name)===n.name))return!1;const l=s.find(c=>(c==null?void 0:c.type.name)===n.name);return l&&r.removeStoredMark(l),r.insertText(" ",i.pos),t.view.dispatch(r),!0}return!1}}class et{constructor(t={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config=J(J({},this.config),t),this.name=this.config.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Ze(ut(this,"addOptions",{name:this.name}))),this.storage=Ze(ut(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new et(t)}configure(t={}){const n=this.extend();return n.options=Xa(this.options,t),n.storage=Ze(ut(n,"addStorage",{name:n.name,options:n.options})),n}extend(t={}){const n=new et(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=Ze(ut(n,"addOptions",{name:n.name})),n.storage=Ze(ut(n,"addStorage",{name:n.name,options:n.options})),n}}function gi(e){return new US({find:e.find,handler:({state:t,range:n,match:r})=>{const i=Ze(e.getAttributes,void 0,r);if(i===!1||i===null)return null;const{tr:o}=t,s=r[r.length-1],a=r[0];let l=n.to;if(s){const c=a.search(/\S/),u=n.from+a.indexOf(s),f=u+s.length;if(kd(n.from,n.to,t.doc).filter(p=>p.mark.type.excluded.find(v=>v===e.type&&v!==p.mark.type)).filter(p=>p.to>u).length)return null;f<n.to&&o.delete(f,n.to),u>n.from&&o.delete(n.from+c,u),l=n.from+c+s.length,o.addMark(n.from+c,l,e.type.create(i||{})),o.removeStoredMark(e.type)}}})}function m_(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}var qt="top",yn="bottom",vn="right",Jt="left",Md="auto",Cs=[qt,yn,vn,Jt],co="start",_s="end",g_="clippingParents",W1="viewport",Ms="popper",y_="reference",U1=Cs.reduce(function(e,t){return e.concat([t+"-"+co,t+"-"+_s])},[]),K1=[].concat(Cs,[Md]).reduce(function(e,t){return e.concat([t,t+"-"+co,t+"-"+_s])},[]),v_="beforeRead",b_="read",w_="afterRead",x_="beforeMain",k_="main",S_="afterMain",C_="beforeWrite",__="write",M_="afterWrite",A_=[v_,b_,w_,x_,k_,S_,C_,__,M_];function zn(e){return e?(e.nodeName||"").toLowerCase():null}function nn(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function yi(e){var t=nn(e).Element;return e instanceof t||e instanceof Element}function bn(e){var t=nn(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Ad(e){if(typeof ShadowRoot=="undefined")return!1;var t=nn(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function E_(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!bn(o)||!zn(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(s){var a=i[s];a===!1?o.removeAttribute(s):o.setAttribute(s,a===!0?"":a)}))})}function O_(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},s=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),a=s.reduce(function(l,c){return l[c]="",l},{});!bn(i)||!zn(i)||(Object.assign(i.style,a),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}var q1={name:"applyStyles",enabled:!0,phase:"write",fn:E_,effect:O_,requires:["computeStyles"]};function Fn(e){return e.split("-")[0]}var vi=Math.max,tl=Math.min,uo=Math.round;function Ed(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function J1(){return!/^((?!chrome|android).)*safari/i.test(Ed())}function fo(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&bn(e)&&(i=e.offsetWidth>0&&uo(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&uo(r.height)/e.offsetHeight||1);var s=yi(e)?nn(e):window,a=s.visualViewport,l=!J1()&&n,c=(r.left+(l&&a?a.offsetLeft:0))/i,u=(r.top+(l&&a?a.offsetTop:0))/o,f=r.width/i,h=r.height/o;return{width:f,height:h,top:u,right:c+f,bottom:u+h,left:c,x:c,y:u}}function Od(e){var t=fo(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function G1(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Ad(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function rr(e){return nn(e).getComputedStyle(e)}function T_(e){return["table","td","th"].indexOf(zn(e))>=0}function Er(e){return((yi(e)?e.ownerDocument:e.document)||window.document).documentElement}function nl(e){return zn(e)==="html"?e:e.assignedSlot||e.parentNode||(Ad(e)?e.host:null)||Er(e)}function Y1(e){return!bn(e)||rr(e).position==="fixed"?null:e.offsetParent}function P_(e){var t=/firefox/i.test(Ed()),n=/Trident/i.test(Ed());if(n&&bn(e)){var r=rr(e);if(r.position==="fixed")return null}var i=nl(e);for(Ad(i)&&(i=i.host);bn(i)&&["html","body"].indexOf(zn(i))<0;){var o=rr(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function As(e){for(var t=nn(e),n=Y1(e);n&&T_(n)&&rr(n).position==="static";)n=Y1(n);return n&&(zn(n)==="html"||zn(n)==="body"&&rr(n).position==="static")?t:n||P_(e)||t}function Td(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Es(e,t,n){return vi(e,tl(t,n))}function R_(e,t,n){var r=Es(e,t,n);return r>n?n:r}function X1(){return{top:0,right:0,bottom:0,left:0}}function Q1(e){return Object.assign({},X1(),e)}function Z1(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var j_=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,Q1(typeof t!="number"?t:Z1(t,Cs))};function N_(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,a=Fn(n.placement),l=Td(a),c=[Jt,vn].indexOf(a)>=0,u=c?"height":"width";if(!(!o||!s)){var f=j_(i.padding,n),h=Od(o),p=l==="y"?qt:Jt,g=l==="y"?yn:vn,v=n.rects.reference[u]+n.rects.reference[l]-s[l]-n.rects.popper[u],b=s[l]-n.rects.reference[l],w=As(o),k=w?l==="y"?w.clientHeight||0:w.clientWidth||0:0,A=v/2-b/2,d=f[p],y=k-h[u]-f[g],m=k/2-h[u]/2+A,x=Es(d,m,y),S=l;n.modifiersData[r]=(t={},t[S]=x,t.centerOffset=x-m,t)}}function L_(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||!G1(t.elements.popper,i)||(t.elements.arrow=i))}var D_={name:"arrow",enabled:!0,phase:"main",fn:N_,effect:L_,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ho(e){return e.split("-")[1]}var I_={top:"auto",right:"auto",bottom:"auto",left:"auto"};function $_(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:uo(n*i)/i||0,y:uo(r*i)/i||0}}function e0(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,s=e.offsets,a=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,f=e.isFixed,h=s.x,p=h===void 0?0:h,g=s.y,v=g===void 0?0:g,b=typeof u=="function"?u({x:p,y:v}):{x:p,y:v};p=b.x,v=b.y;var w=s.hasOwnProperty("x"),k=s.hasOwnProperty("y"),A=Jt,d=qt,y=window;if(c){var m=As(n),x="clientHeight",S="clientWidth";if(m===nn(n)&&(m=Er(n),rr(m).position!=="static"&&a==="absolute"&&(x="scrollHeight",S="scrollWidth")),m=m,i===qt||(i===Jt||i===vn)&&o===_s){d=yn;var _=f&&m===y&&y.visualViewport?y.visualViewport.height:m[x];v-=_-r.height,v*=l?1:-1}if(i===Jt||(i===qt||i===yn)&&o===_s){A=vn;var C=f&&m===y&&y.visualViewport?y.visualViewport.width:m[S];p-=C-r.width,p*=l?1:-1}}var E=Object.assign({position:a},c&&I_),T=u===!0?$_({x:p,y:v},nn(n)):{x:p,y:v};if(p=T.x,v=T.y,l){var R;return Object.assign({},E,(R={},R[d]=k?"0":"",R[A]=w?"0":"",R.transform=(y.devicePixelRatio||1)<=1?"translate("+p+"px, "+v+"px)":"translate3d("+p+"px, "+v+"px, 0)",R))}return Object.assign({},E,(t={},t[d]=k?v+"px":"",t[A]=w?p+"px":"",t.transform="",t))}function B_(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,s=o===void 0?!0:o,a=n.roundOffsets,l=a===void 0?!0:a,c={placement:Fn(t.placement),variation:ho(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,e0(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,e0(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var H_={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:B_,data:{}},rl={passive:!0};function z_(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,s=r.resize,a=s===void 0?!0:s,l=nn(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(u){u.addEventListener("scroll",n.update,rl)}),a&&l.addEventListener("resize",n.update,rl),function(){o&&c.forEach(function(u){u.removeEventListener("scroll",n.update,rl)}),a&&l.removeEventListener("resize",n.update,rl)}}var F_={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:z_,data:{}},V_={left:"right",right:"left",bottom:"top",top:"bottom"};function il(e){return e.replace(/left|right|bottom|top/g,function(t){return V_[t]})}var W_={start:"end",end:"start"};function t0(e){return e.replace(/start|end/g,function(t){return W_[t]})}function Pd(e){var t=nn(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Rd(e){return fo(Er(e)).left+Pd(e).scrollLeft}function U_(e,t){var n=nn(e),r=Er(e),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;var c=J1();(c||!c&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a+Rd(e),y:l}}function K_(e){var t,n=Er(e),r=Pd(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=vi(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=vi(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+Rd(e),l=-r.scrollTop;return rr(i||n).direction==="rtl"&&(a+=vi(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}function jd(e){var t=rr(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function n0(e){return["html","body","#document"].indexOf(zn(e))>=0?e.ownerDocument.body:bn(e)&&jd(e)?e:n0(nl(e))}function Os(e,t){var n;t===void 0&&(t=[]);var r=n0(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=nn(r),s=i?[o].concat(o.visualViewport||[],jd(r)?r:[]):r,a=t.concat(s);return i?a:a.concat(Os(nl(s)))}function Nd(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function q_(e,t){var n=fo(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function r0(e,t,n){return t===W1?Nd(U_(e,n)):yi(t)?q_(t,n):Nd(K_(Er(e)))}function J_(e){var t=Os(nl(e)),n=["absolute","fixed"].indexOf(rr(e).position)>=0,r=n&&bn(e)?As(e):e;return yi(r)?t.filter(function(i){return yi(i)&&G1(i,r)&&zn(i)!=="body"}):[]}function G_(e,t,n,r){var i=t==="clippingParents"?J_(e):[].concat(t),o=[].concat(i,[n]),s=o[0],a=o.reduce(function(l,c){var u=r0(e,c,r);return l.top=vi(u.top,l.top),l.right=tl(u.right,l.right),l.bottom=tl(u.bottom,l.bottom),l.left=vi(u.left,l.left),l},r0(e,s,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function i0(e){var t=e.reference,n=e.element,r=e.placement,i=r?Fn(r):null,o=r?ho(r):null,s=t.x+t.width/2-n.width/2,a=t.y+t.height/2-n.height/2,l;switch(i){case qt:l={x:s,y:t.y-n.height};break;case yn:l={x:s,y:t.y+t.height};break;case vn:l={x:t.x+t.width,y:a};break;case Jt:l={x:t.x-n.width,y:a};break;default:l={x:t.x,y:t.y}}var c=i?Td(i):null;if(c!=null){var u=c==="y"?"height":"width";switch(o){case co:l[c]=l[c]-(t[u]/2-n[u]/2);break;case _s:l[c]=l[c]+(t[u]/2-n[u]/2);break}}return l}function Ts(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,s=o===void 0?e.strategy:o,a=n.boundary,l=a===void 0?g_:a,c=n.rootBoundary,u=c===void 0?W1:c,f=n.elementContext,h=f===void 0?Ms:f,p=n.altBoundary,g=p===void 0?!1:p,v=n.padding,b=v===void 0?0:v,w=Q1(typeof b!="number"?b:Z1(b,Cs)),k=h===Ms?y_:Ms,A=e.rects.popper,d=e.elements[g?k:h],y=G_(yi(d)?d:d.contextElement||Er(e.elements.popper),l,u,s),m=fo(e.elements.reference),x=i0({reference:m,element:A,strategy:"absolute",placement:i}),S=Nd(Object.assign({},A,x)),_=h===Ms?S:m,C={top:y.top-_.top+w.top,bottom:_.bottom-y.bottom+w.bottom,left:y.left-_.left+w.left,right:_.right-y.right+w.right},E=e.modifiersData.offset;if(h===Ms&&E){var T=E[i];Object.keys(C).forEach(function(R){var N=[vn,yn].indexOf(R)>=0?1:-1,D=[qt,yn].indexOf(R)>=0?"y":"x";C[R]+=T[D]*N})}return C}function Y_(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?K1:l,u=ho(r),f=u?a?U1:U1.filter(function(g){return ho(g)===u}):Cs,h=f.filter(function(g){return c.indexOf(g)>=0});h.length===0&&(h=f);var p=h.reduce(function(g,v){return g[v]=Ts(e,{placement:v,boundary:i,rootBoundary:o,padding:s})[Fn(v)],g},{});return Object.keys(p).sort(function(g,v){return p[g]-p[v]})}function X_(e){if(Fn(e)===Md)return[];var t=il(e);return[t0(e),t,t0(t)]}function Q_(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,a=s===void 0?!0:s,l=n.fallbackPlacements,c=n.padding,u=n.boundary,f=n.rootBoundary,h=n.altBoundary,p=n.flipVariations,g=p===void 0?!0:p,v=n.allowedAutoPlacements,b=t.options.placement,w=Fn(b),k=w===b,A=l||(k||!g?[il(b)]:X_(b)),d=[b].concat(A).reduce(function(_e,I){return _e.concat(Fn(I)===Md?Y_(t,{placement:I,boundary:u,rootBoundary:f,padding:c,flipVariations:g,allowedAutoPlacements:v}):I)},[]),y=t.rects.reference,m=t.rects.popper,x=new Map,S=!0,_=d[0],C=0;C<d.length;C++){var E=d[C],T=Fn(E),R=ho(E)===co,N=[qt,yn].indexOf(T)>=0,D=N?"width":"height",M=Ts(t,{placement:E,boundary:u,rootBoundary:f,altBoundary:h,padding:c}),P=N?R?vn:Jt:R?yn:qt;y[D]>m[D]&&(P=il(P));var L=il(P),H=[];if(o&&H.push(M[T]<=0),a&&H.push(M[P]<=0,M[L]<=0),H.every(function(_e){return _e})){_=E,S=!1;break}x.set(E,H)}if(S)for(var te=g?3:1,q=function(I){var Y=d.find(function(V){var ee=x.get(V);if(ee)return ee.slice(0,I).every(function(Ae){return Ae})});if(Y)return _=Y,"break"},ae=te;ae>0;ae--){var ge=q(ae);if(ge==="break")break}t.placement!==_&&(t.modifiersData[r]._skip=!0,t.placement=_,t.reset=!0)}}var Z_={name:"flip",enabled:!0,phase:"main",fn:Q_,requiresIfExists:["offset"],data:{_skip:!1}};function o0(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function s0(e){return[qt,vn,yn,Jt].some(function(t){return e[t]>=0})}function eM(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,s=Ts(t,{elementContext:"reference"}),a=Ts(t,{altBoundary:!0}),l=o0(s,r),c=o0(a,i,o),u=s0(l),f=s0(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":f})}var tM={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:eM};function nM(e,t,n){var r=Fn(e),i=[Jt,qt].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,s=o[0],a=o[1];return s=s||0,a=(a||0)*i,[Jt,vn].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}function rM(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,s=K1.reduce(function(u,f){return u[f]=nM(f,t.rects,o),u},{}),a=s[t.placement],l=a.x,c=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=s}var iM={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:rM};function oM(e){var t=e.state,n=e.name;t.modifiersData[n]=i0({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var sM={name:"popperOffsets",enabled:!0,phase:"read",fn:oM,data:{}};function aM(e){return e==="x"?"y":"x"}function lM(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,a=s===void 0?!1:s,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,f=n.padding,h=n.tether,p=h===void 0?!0:h,g=n.tetherOffset,v=g===void 0?0:g,b=Ts(t,{boundary:l,rootBoundary:c,padding:f,altBoundary:u}),w=Fn(t.placement),k=ho(t.placement),A=!k,d=Td(w),y=aM(d),m=t.modifiersData.popperOffsets,x=t.rects.reference,S=t.rects.popper,_=typeof v=="function"?v(Object.assign({},t.rects,{placement:t.placement})):v,C=typeof _=="number"?{mainAxis:_,altAxis:_}:Object.assign({mainAxis:0,altAxis:0},_),E=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,T={x:0,y:0};if(!!m){if(o){var R,N=d==="y"?qt:Jt,D=d==="y"?yn:vn,M=d==="y"?"height":"width",P=m[d],L=P+b[N],H=P-b[D],te=p?-S[M]/2:0,q=k===co?x[M]:S[M],ae=k===co?-S[M]:-x[M],ge=t.elements.arrow,_e=p&&ge?Od(ge):{width:0,height:0},I=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:X1(),Y=I[N],V=I[D],ee=Es(0,x[M],_e[M]),Ae=A?x[M]/2-te-ee-Y-C.mainAxis:q-ee-Y-C.mainAxis,Ee=A?-x[M]/2+te+ee+V+C.mainAxis:ae+ee+V+C.mainAxis,we=t.elements.arrow&&As(t.elements.arrow),xe=we?d==="y"?we.clientTop||0:we.clientLeft||0:0,O=(R=E==null?void 0:E[d])!=null?R:0,j=P+Ae-O-xe,$=P+Ee-O,F=Es(p?tl(L,j):L,P,p?vi(H,$):H);m[d]=F,T[d]=F-P}if(a){var z,Q=d==="x"?qt:Jt,ne=d==="x"?yn:vn,W=m[y],G=y==="y"?"height":"width",U=W+b[Q],le=W-b[ne],oe=[qt,Jt].indexOf(w)!==-1,de=(z=E==null?void 0:E[y])!=null?z:0,ye=oe?U:W-x[G]-S[G]-de+C.altAxis,Oe=oe?W+x[G]+S[G]-de-C.altAxis:le,$e=p&&oe?R_(ye,W,Oe):Es(p?ye:U,W,p?Oe:le);m[y]=$e,T[y]=$e-W}t.modifiersData[r]=T}}var cM={name:"preventOverflow",enabled:!0,phase:"main",fn:lM,requiresIfExists:["offset"]};function uM(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function dM(e){return e===nn(e)||!bn(e)?Pd(e):uM(e)}function fM(e){var t=e.getBoundingClientRect(),n=uo(t.width)/e.offsetWidth||1,r=uo(t.height)/e.offsetHeight||1;return n!==1||r!==1}function hM(e,t,n){n===void 0&&(n=!1);var r=bn(t),i=bn(t)&&fM(t),o=Er(t),s=fo(e,i,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((zn(t)!=="body"||jd(o))&&(a=dM(t)),bn(t)?(l=fo(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=Rd(o))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function pM(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var s=[].concat(o.requires||[],o.requiresIfExists||[]);s.forEach(function(a){if(!n.has(a)){var l=t.get(a);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function mM(e){var t=pM(e);return A_.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function gM(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function yM(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var a0={placement:"bottom",modifiers:[],strategy:"absolute"};function l0(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function vM(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,o=i===void 0?a0:i;return function(a,l,c){c===void 0&&(c=o);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},a0,o),modifiersData:{},elements:{reference:a,popper:l},attributes:{},styles:{}},f=[],h=!1,p={state:u,setOptions:function(w){var k=typeof w=="function"?w(u.options):w;v(),u.options=Object.assign({},o,u.options,k),u.scrollParents={reference:yi(a)?Os(a):a.contextElement?Os(a.contextElement):[],popper:Os(l)};var A=mM(yM([].concat(r,u.options.modifiers)));return u.orderedModifiers=A.filter(function(d){return d.enabled}),g(),p.update()},forceUpdate:function(){if(!h){var w=u.elements,k=w.reference,A=w.popper;if(!!l0(k,A)){u.rects={reference:hM(k,As(A),u.options.strategy==="fixed"),popper:Od(A)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(C){return u.modifiersData[C.name]=Object.assign({},C.data)});for(var d=0;d<u.orderedModifiers.length;d++){if(u.reset===!0){u.reset=!1,d=-1;continue}var y=u.orderedModifiers[d],m=y.fn,x=y.options,S=x===void 0?{}:x,_=y.name;typeof m=="function"&&(u=m({state:u,options:S,name:_,instance:p})||u)}}}},update:gM(function(){return new Promise(function(b){p.forceUpdate(),b(u)})}),destroy:function(){v(),h=!0}};if(!l0(a,l))return p;p.setOptions(c).then(function(b){!h&&c.onFirstUpdate&&c.onFirstUpdate(b)});function g(){u.orderedModifiers.forEach(function(b){var w=b.name,k=b.options,A=k===void 0?{}:k,d=b.effect;if(typeof d=="function"){var y=d({state:u,name:w,instance:p,options:A}),m=function(){};f.push(y||m)}})}function v(){f.forEach(function(b){return b()}),f=[]}return p}}var bM=[F_,sM,H_,q1,iM,Z_,cM,D_,tM],wM=vM({defaultModifiers:bM}),xM="tippy-box",c0="tippy-content",kM="tippy-backdrop",u0="tippy-arrow",d0="tippy-svg-arrow",bi={passive:!0,capture:!0},f0=function(){return document.body};function Ld(e,t,n){if(Array.isArray(e)){var r=e[t];return r==null?Array.isArray(n)?n[t]:n:r}return e}function Dd(e,t){var n={}.toString.call(e);return n.indexOf("[object")===0&&n.indexOf(t+"]")>-1}function h0(e,t){return typeof e=="function"?e.apply(void 0,t):e}function p0(e,t){if(t===0)return e;var n;return function(r){clearTimeout(n),n=setTimeout(function(){e(r)},t)}}function SM(e){return e.split(/\s+/).filter(Boolean)}function po(e){return[].concat(e)}function m0(e,t){e.indexOf(t)===-1&&e.push(t)}function CM(e){return e.filter(function(t,n){return e.indexOf(t)===n})}function _M(e){return e.split("-")[0]}function ol(e){return[].slice.call(e)}function g0(e){return Object.keys(e).reduce(function(t,n){return e[n]!==void 0&&(t[n]=e[n]),t},{})}function Ps(){return document.createElement("div")}function sl(e){return["Element","Fragment"].some(function(t){return Dd(e,t)})}function MM(e){return Dd(e,"NodeList")}function AM(e){return Dd(e,"MouseEvent")}function EM(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function OM(e){return sl(e)?[e]:MM(e)?ol(e):Array.isArray(e)?e:ol(document.querySelectorAll(e))}function Id(e,t){e.forEach(function(n){n&&(n.style.transitionDuration=t+"ms")})}function y0(e,t){e.forEach(function(n){n&&n.setAttribute("data-state",t)})}function TM(e){var t,n=po(e),r=n[0];return r!=null&&(t=r.ownerDocument)!=null&&t.body?r.ownerDocument:document}function PM(e,t){var n=t.clientX,r=t.clientY;return e.every(function(i){var o=i.popperRect,s=i.popperState,a=i.props,l=a.interactiveBorder,c=_M(s.placement),u=s.modifiersData.offset;if(!u)return!0;var f=c==="bottom"?u.top.y:0,h=c==="top"?u.bottom.y:0,p=c==="right"?u.left.x:0,g=c==="left"?u.right.x:0,v=o.top-r+f>l,b=r-o.bottom-h>l,w=o.left-n+p>l,k=n-o.right-g>l;return v||b||w||k})}function $d(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(i){e[r](i,n)})}function v0(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=n.getRootNode==null||(r=n.getRootNode())==null?void 0:r.host}return!1}var Vn={isTouch:!1},b0=0;function RM(){Vn.isTouch||(Vn.isTouch=!0,window.performance&&document.addEventListener("mousemove",w0))}function w0(){var e=performance.now();e-b0<20&&(Vn.isTouch=!1,document.removeEventListener("mousemove",w0)),b0=e}function jM(){var e=document.activeElement;if(EM(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function NM(){document.addEventListener("touchstart",RM,bi),window.addEventListener("blur",jM)}var LM=typeof window!="undefined"&&typeof document!="undefined",DM=LM?!!window.msCrypto:!1,IM={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},$M={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},Tn=Object.assign({appendTo:f0,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},IM,$M),BM=Object.keys(Tn),HM=function(t){var n=Object.keys(t);n.forEach(function(r){Tn[r]=t[r]})};function x0(e){var t=e.plugins||[],n=t.reduce(function(r,i){var o=i.name,s=i.defaultValue;if(o){var a;r[o]=e[o]!==void 0?e[o]:(a=Tn[o])!=null?a:s}return r},{});return Object.assign({},e,n)}function zM(e,t){var n=t?Object.keys(x0(Object.assign({},Tn,{plugins:t}))):BM,r=n.reduce(function(i,o){var s=(e.getAttribute("data-tippy-"+o)||"").trim();if(!s)return i;if(o==="content")i[o]=s;else try{i[o]=JSON.parse(s)}catch(a){i[o]=s}return i},{});return r}function k0(e,t){var n=Object.assign({},t,{content:h0(t.content,[e])},t.ignoreAttributes?{}:zM(e,t.plugins));return n.aria=Object.assign({},Tn.aria,n.aria),n.aria={expanded:n.aria.expanded==="auto"?t.interactive:n.aria.expanded,content:n.aria.content==="auto"?t.interactive?null:"describedby":n.aria.content},n}var FM=function(){return"innerHTML"};function Bd(e,t){e[FM()]=t}function S0(e){var t=Ps();return e===!0?t.className=u0:(t.className=d0,sl(e)?t.appendChild(e):Bd(t,e)),t}function C0(e,t){sl(t.content)?(Bd(e,""),e.appendChild(t.content)):typeof t.content!="function"&&(t.allowHTML?Bd(e,t.content):e.textContent=t.content)}function Hd(e){var t=e.firstElementChild,n=ol(t.children);return{box:t,content:n.find(function(r){return r.classList.contains(c0)}),arrow:n.find(function(r){return r.classList.contains(u0)||r.classList.contains(d0)}),backdrop:n.find(function(r){return r.classList.contains(kM)})}}function _0(e){var t=Ps(),n=Ps();n.className=xM,n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=Ps();r.className=c0,r.setAttribute("data-state","hidden"),C0(r,e.props),t.appendChild(n),n.appendChild(r),i(e.props,e.props);function i(o,s){var a=Hd(t),l=a.box,c=a.content,u=a.arrow;s.theme?l.setAttribute("data-theme",s.theme):l.removeAttribute("data-theme"),typeof s.animation=="string"?l.setAttribute("data-animation",s.animation):l.removeAttribute("data-animation"),s.inertia?l.setAttribute("data-inertia",""):l.removeAttribute("data-inertia"),l.style.maxWidth=typeof s.maxWidth=="number"?s.maxWidth+"px":s.maxWidth,s.role?l.setAttribute("role",s.role):l.removeAttribute("role"),(o.content!==s.content||o.allowHTML!==s.allowHTML)&&C0(c,e.props),s.arrow?u?o.arrow!==s.arrow&&(l.removeChild(u),l.appendChild(S0(s.arrow))):l.appendChild(S0(s.arrow)):u&&l.removeChild(u)}return{popper:t,onUpdate:i}}_0.$$tippy=!0;var VM=1,al=[],zd=[];function WM(e,t){var n=k0(e,Object.assign({},Tn,x0(g0(t)))),r,i,o,s=!1,a=!1,l=!1,c=!1,u,f,h,p=[],g=p0(j,n.interactiveDebounce),v,b=VM++,w=null,k=CM(n.plugins),A={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},d={id:b,reference:e,popper:Ps(),popperInstance:w,props:n,state:A,plugins:k,clearDelayTimeouts:ye,setProps:Oe,setContent:$e,show:ze,hide:Ke,hideWithInteractivity:Yt,enable:oe,disable:de,unmount:or,destroy:Fs};if(!n.render)return d;var y=n.render(d),m=y.popper,x=y.onUpdate;m.setAttribute("data-tippy-root",""),m.id="tippy-"+d.id,d.popper=m,e._tippy=d,m._tippy=d;var S=k.map(function(B){return B.fn(d)}),_=e.hasAttribute("aria-expanded");return we(),te(),P(),L("onCreate",[d]),n.showOnCreate&&U(),m.addEventListener("mouseenter",function(){d.props.interactive&&d.state.isVisible&&d.clearDelayTimeouts()}),m.addEventListener("mouseleave",function(){d.props.interactive&&d.props.trigger.indexOf("mouseenter")>=0&&N().addEventListener("mousemove",g)}),d;function C(){var B=d.props.touch;return Array.isArray(B)?B:[B,0]}function E(){return C()[0]==="hold"}function T(){var B;return!!((B=d.props.render)!=null&&B.$$tippy)}function R(){return v||e}function N(){var B=R().parentNode;return B?TM(B):document}function D(){return Hd(m)}function M(B){return d.state.isMounted&&!d.state.isVisible||Vn.isTouch||u&&u.type==="focus"?0:Ld(d.props.delay,B?0:1,Tn.delay)}function P(B){B===void 0&&(B=!1),m.style.pointerEvents=d.props.interactive&&!B?"":"none",m.style.zIndex=""+d.props.zIndex}function L(B,ce,pe){if(pe===void 0&&(pe=!0),S.forEach(function(Re){Re[B]&&Re[B].apply(Re,ce)}),pe){var Pe;(Pe=d.props)[B].apply(Pe,ce)}}function H(){var B=d.props.aria;if(!!B.content){var ce="aria-"+B.content,pe=m.id,Pe=po(d.props.triggerTarget||e);Pe.forEach(function(Re){var Lt=Re.getAttribute(ce);if(d.state.isVisible)Re.setAttribute(ce,Lt?Lt+" "+pe:pe);else{var rn=Lt&&Lt.replace(pe,"").trim();rn?Re.setAttribute(ce,rn):Re.removeAttribute(ce)}})}}function te(){if(!(_||!d.props.aria.expanded)){var B=po(d.props.triggerTarget||e);B.forEach(function(ce){d.props.interactive?ce.setAttribute("aria-expanded",d.state.isVisible&&ce===R()?"true":"false"):ce.removeAttribute("aria-expanded")})}}function q(){N().removeEventListener("mousemove",g),al=al.filter(function(B){return B!==g})}function ae(B){if(!(Vn.isTouch&&(l||B.type==="mousedown"))){var ce=B.composedPath&&B.composedPath()[0]||B.target;if(!(d.props.interactive&&v0(m,ce))){if(po(d.props.triggerTarget||e).some(function(pe){return v0(pe,ce)})){if(Vn.isTouch||d.state.isVisible&&d.props.trigger.indexOf("click")>=0)return}else L("onClickOutside",[d,B]);d.props.hideOnClick===!0&&(d.clearDelayTimeouts(),d.hide(),a=!0,setTimeout(function(){a=!1}),d.state.isMounted||Y())}}}function ge(){l=!0}function _e(){l=!1}function I(){var B=N();B.addEventListener("mousedown",ae,!0),B.addEventListener("touchend",ae,bi),B.addEventListener("touchstart",_e,bi),B.addEventListener("touchmove",ge,bi)}function Y(){var B=N();B.removeEventListener("mousedown",ae,!0),B.removeEventListener("touchend",ae,bi),B.removeEventListener("touchstart",_e,bi),B.removeEventListener("touchmove",ge,bi)}function V(B,ce){Ae(B,function(){!d.state.isVisible&&m.parentNode&&m.parentNode.contains(m)&&ce()})}function ee(B,ce){Ae(B,ce)}function Ae(B,ce){var pe=D().box;function Pe(Re){Re.target===pe&&($d(pe,"remove",Pe),ce())}if(B===0)return ce();$d(pe,"remove",f),$d(pe,"add",Pe),f=Pe}function Ee(B,ce,pe){pe===void 0&&(pe=!1);var Pe=po(d.props.triggerTarget||e);Pe.forEach(function(Re){Re.addEventListener(B,ce,pe),p.push({node:Re,eventType:B,handler:ce,options:pe})})}function we(){E()&&(Ee("touchstart",O,{passive:!0}),Ee("touchend",$,{passive:!0})),SM(d.props.trigger).forEach(function(B){if(B!=="manual")switch(Ee(B,O),B){case"mouseenter":Ee("mouseleave",$);break;case"focus":Ee(DM?"focusout":"blur",F);break;case"focusin":Ee("focusout",F);break}})}function xe(){p.forEach(function(B){var ce=B.node,pe=B.eventType,Pe=B.handler,Re=B.options;ce.removeEventListener(pe,Pe,Re)}),p=[]}function O(B){var ce,pe=!1;if(!(!d.state.isEnabled||z(B)||a)){var Pe=((ce=u)==null?void 0:ce.type)==="focus";u=B,v=B.currentTarget,te(),!d.state.isVisible&&AM(B)&&al.forEach(function(Re){return Re(B)}),B.type==="click"&&(d.props.trigger.indexOf("mouseenter")<0||s)&&d.props.hideOnClick!==!1&&d.state.isVisible?pe=!0:U(B),B.type==="click"&&(s=!pe),pe&&!Pe&&le(B)}}function j(B){var ce=B.target,pe=R().contains(ce)||m.contains(ce);if(!(B.type==="mousemove"&&pe)){var Pe=G().concat(m).map(function(Re){var Lt,rn=Re._tippy,_i=(Lt=rn.popperInstance)==null?void 0:Lt.state;return _i?{popperRect:Re.getBoundingClientRect(),popperState:_i,props:n}:null}).filter(Boolean);PM(Pe,B)&&(q(),le(B))}}function $(B){var ce=z(B)||d.props.trigger.indexOf("click")>=0&&s;if(!ce){if(d.props.interactive){d.hideWithInteractivity(B);return}le(B)}}function F(B){d.props.trigger.indexOf("focusin")<0&&B.target!==R()||d.props.interactive&&B.relatedTarget&&m.contains(B.relatedTarget)||le(B)}function z(B){return Vn.isTouch?E()!==B.type.indexOf("touch")>=0:!1}function Q(){ne();var B=d.props,ce=B.popperOptions,pe=B.placement,Pe=B.offset,Re=B.getReferenceClientRect,Lt=B.moveTransition,rn=T()?Hd(m).arrow:null,_i=Re?{getBoundingClientRect:Re,contextElement:Re.contextElement||R()}:e,Rf={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(Vs){var Mi=Vs.state;if(T()){var Qy=D(),Kl=Qy.box;["placement","reference-hidden","escaped"].forEach(function(Ws){Ws==="placement"?Kl.setAttribute("data-placement",Mi.placement):Mi.attributes.popper["data-popper-"+Ws]?Kl.setAttribute("data-"+Ws,""):Kl.removeAttribute("data-"+Ws)}),Mi.attributes.popper={}}}},Dr=[{name:"offset",options:{offset:Pe}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!Lt}},Rf];T()&&rn&&Dr.push({name:"arrow",options:{element:rn,padding:3}}),Dr.push.apply(Dr,(ce==null?void 0:ce.modifiers)||[]),d.popperInstance=wM(_i,m,Object.assign({},ce,{placement:pe,onFirstUpdate:h,modifiers:Dr}))}function ne(){d.popperInstance&&(d.popperInstance.destroy(),d.popperInstance=null)}function W(){var B=d.props.appendTo,ce,pe=R();d.props.interactive&&B===f0||B==="parent"?ce=pe.parentNode:ce=h0(B,[pe]),ce.contains(m)||ce.appendChild(m),d.state.isMounted=!0,Q()}function G(){return ol(m.querySelectorAll("[data-tippy-root]"))}function U(B){d.clearDelayTimeouts(),B&&L("onTrigger",[d,B]),I();var ce=M(!0),pe=C(),Pe=pe[0],Re=pe[1];Vn.isTouch&&Pe==="hold"&&Re&&(ce=Re),ce?r=setTimeout(function(){d.show()},ce):d.show()}function le(B){if(d.clearDelayTimeouts(),L("onUntrigger",[d,B]),!d.state.isVisible){Y();return}if(!(d.props.trigger.indexOf("mouseenter")>=0&&d.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(B.type)>=0&&s)){var ce=M(!1);ce?i=setTimeout(function(){d.state.isVisible&&d.hide()},ce):o=requestAnimationFrame(function(){d.hide()})}}function oe(){d.state.isEnabled=!0}function de(){d.hide(),d.state.isEnabled=!1}function ye(){clearTimeout(r),clearTimeout(i),cancelAnimationFrame(o)}function Oe(B){if(!d.state.isDestroyed){L("onBeforeUpdate",[d,B]),xe();var ce=d.props,pe=k0(e,Object.assign({},ce,g0(B),{ignoreAttributes:!0}));d.props=pe,we(),ce.interactiveDebounce!==pe.interactiveDebounce&&(q(),g=p0(j,pe.interactiveDebounce)),ce.triggerTarget&&!pe.triggerTarget?po(ce.triggerTarget).forEach(function(Pe){Pe.removeAttribute("aria-expanded")}):pe.triggerTarget&&e.removeAttribute("aria-expanded"),te(),P(),x&&x(ce,pe),d.popperInstance&&(Q(),G().forEach(function(Pe){requestAnimationFrame(Pe._tippy.popperInstance.forceUpdate)})),L("onAfterUpdate",[d,B])}}function $e(B){d.setProps({content:B})}function ze(){var B=d.state.isVisible,ce=d.state.isDestroyed,pe=!d.state.isEnabled,Pe=Vn.isTouch&&!d.props.touch,Re=Ld(d.props.duration,0,Tn.duration);if(!(B||ce||pe||Pe)&&!R().hasAttribute("disabled")&&(L("onShow",[d],!1),d.props.onShow(d)!==!1)){if(d.state.isVisible=!0,T()&&(m.style.visibility="visible"),P(),I(),d.state.isMounted||(m.style.transition="none"),T()){var Lt=D(),rn=Lt.box,_i=Lt.content;Id([rn,_i],0)}h=function(){var Dr;if(!(!d.state.isVisible||c)){if(c=!0,m.offsetHeight,m.style.transition=d.props.moveTransition,T()&&d.props.animation){var Ul=D(),Vs=Ul.box,Mi=Ul.content;Id([Vs,Mi],Re),y0([Vs,Mi],"visible")}H(),te(),m0(zd,d),(Dr=d.popperInstance)==null||Dr.forceUpdate(),L("onMount",[d]),d.props.animation&&T()&&ee(Re,function(){d.state.isShown=!0,L("onShown",[d])})}},W()}}function Ke(){var B=!d.state.isVisible,ce=d.state.isDestroyed,pe=!d.state.isEnabled,Pe=Ld(d.props.duration,1,Tn.duration);if(!(B||ce||pe)&&(L("onHide",[d],!1),d.props.onHide(d)!==!1)){if(d.state.isVisible=!1,d.state.isShown=!1,c=!1,s=!1,T()&&(m.style.visibility="hidden"),q(),Y(),P(!0),T()){var Re=D(),Lt=Re.box,rn=Re.content;d.props.animation&&(Id([Lt,rn],Pe),y0([Lt,rn],"hidden"))}H(),te(),d.props.animation?T()&&V(Pe,d.unmount):d.unmount()}}function Yt(B){N().addEventListener("mousemove",g),m0(al,g),g(B)}function or(){d.state.isVisible&&d.hide(),!!d.state.isMounted&&(ne(),G().forEach(function(B){B._tippy.unmount()}),m.parentNode&&m.parentNode.removeChild(m),zd=zd.filter(function(B){return B!==d}),d.state.isMounted=!1,L("onHidden",[d]))}function Fs(){d.state.isDestroyed||(d.clearDelayTimeouts(),d.unmount(),xe(),delete e._tippy,d.state.isDestroyed=!0,L("onDestroy",[d]))}}function mo(e,t){t===void 0&&(t={});var n=Tn.plugins.concat(t.plugins||[]);NM();var r=Object.assign({},t,{plugins:n}),i=OM(e),o=i.reduce(function(s,a){var l=a&&WM(a,r);return l&&s.push(l),s},[]);return sl(e)?o[0]:o}mo.defaultProps=Tn;mo.setDefaultProps=HM;mo.currentInput=Vn;Object.assign({},q1,{effect:function(t){var n=t.state,r={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(n.elements.popper.style,r.popper),n.styles=r,n.elements.arrow&&Object.assign(n.elements.arrow.style,r.arrow)}});mo.setDefaultProps({render:_0});class UM{constructor({editor:t,element:n,view:r,tippyOptions:i={},updateDelay:o=250,shouldShow:s}){this.preventHide=!1,this.shouldShow=({view:a,state:l,from:c,to:u})=>{const{doc:f,selection:h}=l,{empty:p}=h,g=!f.textBetween(c,u).length&&gd(l.selection),v=this.element.contains(document.activeElement);return!(!(a.hasFocus()||v)||p||g||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:a})=>{var l;if(this.preventHide){this.preventHide=!1;return}(a==null?void 0:a.relatedTarget)&&((l=this.element.parentNode)===null||l===void 0?void 0:l.contains(a.relatedTarget))||this.hide()},this.tippyBlurHandler=a=>{this.blurHandler({event:a})},this.handleDebouncedUpdate=(a,l)=>{const c=!(l==null?void 0:l.selection.eq(a.state.selection)),u=!(l==null?void 0:l.doc.eq(a.state.doc));!c&&!u||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(a,c,u,l)},this.updateDelay))},this.updateHandler=(a,l,c,u)=>{var f,h,p;const{state:g,composing:v}=a,{selection:b}=g;if(v||!l&&!c)return;this.createTooltip();const{ranges:k}=b,A=Math.min(...k.map(m=>m.$from.pos)),d=Math.max(...k.map(m=>m.$to.pos));if(!((f=this.shouldShow)===null||f===void 0?void 0:f.call(this,{editor:this.editor,view:a,state:g,oldState:u,from:A,to:d}))){this.hide();return}(h=this.tippy)===null||h===void 0||h.setProps({getReferenceClientRect:((p=this.tippyOptions)===null||p===void 0?void 0:p.getReferenceClientRect)||(()=>{if(JC(g.selection)){let m=a.nodeDOM(A);const x=m.dataset.nodeViewWrapper?m:m.querySelector("[data-node-view-wrapper]");if(x&&(m=x.firstChild),m)return m.getBoundingClientRect()}return z1(a,A,d)})}),this.show()},this.editor=t,this.element=n,this.view=r,this.updateDelay=o,s&&(this.shouldShow=s),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=i,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:t}=this.editor.options,n=!!t.parentElement;this.tippy||!n||(this.tippy=mo(t,J({duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"top",hideOnClick:"toggle"},this.tippyOptions)),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(t,n){const{state:r}=t,i=r.selection.$from.pos!==r.selection.$to.pos;if(this.updateDelay>0&&i){this.handleDebouncedUpdate(t,n);return}const o=!(n==null?void 0:n.selection.eq(t.state.selection)),s=!(n==null?void 0:n.doc.eq(t.state.doc));this.updateHandler(t,o,s,n)}show(){var t;(t=this.tippy)===null||t===void 0||t.show()}hide(){var t;(t=this.tippy)===null||t===void 0||t.hide()}destroy(){var t,n;((t=this.tippy)===null||t===void 0?void 0:t.popper.firstChild)&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),(n=this.tippy)===null||n===void 0||n.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const M0=e=>new gt({key:typeof e.pluginKey=="string"?new yt(e.pluginKey):e.pluginKey,view:t=>new UM(J({view:t},e))});vt.create({name:"bubbleMenu",addOptions(){return{element:null,tippyOptions:{},pluginKey:"bubbleMenu",updateDelay:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[M0({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,updateDelay:this.options.updateDelay,shouldShow:this.options.shouldShow})]:[]}});class KM{constructor({editor:t,element:n,view:r,tippyOptions:i={},shouldShow:o}){this.preventHide=!1,this.shouldShow=({view:s,state:a})=>{const{selection:l}=a,{$anchor:c,empty:u}=l,f=c.depth===1,h=c.parent.isTextblock&&!c.parent.type.spec.code&&!c.parent.textContent;return!(!s.hasFocus()||!u||!f||!h||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:s})=>{var a;if(this.preventHide){this.preventHide=!1;return}(s==null?void 0:s.relatedTarget)&&((a=this.element.parentNode)===null||a===void 0?void 0:a.contains(s.relatedTarget))||this.hide()},this.tippyBlurHandler=s=>{this.blurHandler({event:s})},this.editor=t,this.element=n,this.view=r,o&&(this.shouldShow=o),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=i,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:t}=this.editor.options,n=!!t.parentElement;this.tippy||!n||(this.tippy=mo(t,J({duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"right",hideOnClick:"toggle"},this.tippyOptions)),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(t,n){var r,i,o;const{state:s}=t,{doc:a,selection:l}=s,{from:c,to:u}=l;if(n&&n.doc.eq(a)&&n.selection.eq(l))return;if(this.createTooltip(),!((r=this.shouldShow)===null||r===void 0?void 0:r.call(this,{editor:this.editor,view:t,state:s,oldState:n}))){this.hide();return}(i=this.tippy)===null||i===void 0||i.setProps({getReferenceClientRect:((o=this.tippyOptions)===null||o===void 0?void 0:o.getReferenceClientRect)||(()=>z1(t,c,u))}),this.show()}show(){var t;(t=this.tippy)===null||t===void 0||t.show()}hide(){var t;(t=this.tippy)===null||t===void 0||t.hide()}destroy(){var t,n;((t=this.tippy)===null||t===void 0?void 0:t.popper.firstChild)&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),(n=this.tippy)===null||n===void 0||n.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const A0=e=>new gt({key:typeof e.pluginKey=="string"?new yt(e.pluginKey):e.pluginKey,view:t=>new KM(J({view:t},e))});vt.create({name:"floatingMenu",addOptions(){return{element:null,tippyOptions:{},pluginKey:"floatingMenu",shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[A0({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow})]:[]}});const HP=je({name:"BubbleMenu",props:{pluginKey:{type:[String,Object],default:"bubbleMenu"},editor:{type:Object,required:!0},updateDelay:{type:Number,default:void 0},tippyOptions:{type:Object,default:()=>({})},shouldShow:{type:Function,default:null}},setup(e,{slots:t}){const n=se(null);return Je(()=>{const{updateDelay:r,editor:i,pluginKey:o,shouldShow:s,tippyOptions:a}=e;i.registerPlugin(M0({updateDelay:r,editor:i,element:n.value,pluginKey:o,shouldShow:s,tippyOptions:a}))}),Io(()=>{const{pluginKey:r,editor:i}=e;i.unregisterPlugin(r)}),()=>{var r;return He("div",{ref:n},(r=t.default)===null||r===void 0?void 0:r.call(t))}}});const zP=je({name:"EditorContent",props:{editor:{default:null,type:Object}},setup(e){const t=se(),n=$c();return xt(()=>{const r=e.editor;r&&r.options.element&&t.value&&bt(()=>{if(!t.value||!r.options.element.firstChild)return;const i=Rt(t.value);t.value.append(...r.options.element.childNodes),r.contentComponent=n.ctx._,r.setOptions({element:i}),r.createNodeViews()})}),Io(()=>{const r=e.editor;if(!r||(r.isDestroyed||r.view.setProps({nodeViews:{}}),r.contentComponent=null,!r.options.element.firstChild))return;const i=document.createElement("div");i.append(...r.options.element.childNodes),r.setOptions({element:i})}),{rootEl:t}},render(){const e=[];return this.editor&&this.editor.vueRenderers.forEach(t=>{const n=He(jc,{to:t.teleportElement,key:t.id},He(t.component,J({ref:t.id},t.props)));e.push(n)}),He("div",{ref:t=>{this.rootEl=t}},...e)}}),FP=je({name:"FloatingMenu",props:{pluginKey:{type:null,default:"floatingMenu"},editor:{type:Object,required:!0},tippyOptions:{type:Object,default:()=>({})},shouldShow:{type:Function,default:null}},setup(e,{slots:t}){const n=se(null);return Je(()=>{const{pluginKey:r,editor:i,tippyOptions:o,shouldShow:s}=e;i.registerPlugin(A0({pluginKey:r,editor:i,element:n.value,tippyOptions:o,shouldShow:s}))}),Io(()=>{const{pluginKey:r,editor:i}=e;i.unregisterPlugin(r)}),()=>{var r;return He("div",{ref:n},(r=t.default)===null||r===void 0?void 0:r.call(t))}}});je({name:"NodeViewContent",props:{as:{type:String,default:"div"}},render(){return He(this.as,{style:{whiteSpace:"pre-wrap"},"data-node-view-content":""})}});je({name:"NodeViewWrapper",props:{as:{type:String,default:"div"}},inject:["onDragStart","decorationClasses"],render(){var e,t;return He(this.as,{class:this.decorationClasses,style:{whiteSpace:"normal"},"data-node-view-wrapper":"",onDragstart:this.onDragStart},(t=(e=this.$slots).default)===null||t===void 0?void 0:t.call(e))}});const qM=/^\s*>\s$/,JM=et.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:e}){return["blockquote",Ue(this.options.HTMLAttributes,e),0]},addCommands(){return{setBlockquote:()=>({commands:e})=>e.wrapIn(this.name),toggleBlockquote:()=>({commands:e})=>e.toggleWrap(this.name),unsetBlockquote:()=>({commands:e})=>e.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[Ss({find:qM,type:this.type})]}}),GM=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))$/,YM=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))/g,XM=/(?:^|\s)((?:__)((?:[^__]+))(?:__))$/,QM=/(?:^|\s)((?:__)((?:[^__]+))(?:__))/g,ZM=gn.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:e=>e.style.fontWeight!=="normal"&&null},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return["strong",Ue(this.options.HTMLAttributes,e),0]},addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[mi({find:GM,type:this.type}),mi({find:XM,type:this.type})]},addPasteRules(){return[gi({find:YM,type:this.type}),gi({find:QM,type:this.type})]}}),eA=et.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",Ue(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),E0=gn.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:e=>e.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["span",Ue(this.options.HTMLAttributes,e),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:e,commands:t})=>{const n=ks(e,this.type);return Object.entries(n).some(([,i])=>!!i)?!0:t.unsetMark(this.name)}}}}),O0=/^\s*([-+*])\s$/,tA=et.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:e}){return["ul",Ue(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleBulletList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(eA.name,this.editor.getAttributes(E0.name)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=Ss({find:O0,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=Ss({find:O0,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(E0.name),editor:this.editor})),[e]}}),nA=/(?:^|\s)((?:`)((?:[^`]+))(?:`))$/,rA=/(?:^|\s)((?:`)((?:[^`]+))(?:`))/g,iA=gn.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:e}){return["code",Ue(this.options.HTMLAttributes,e),0]},addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[mi({find:nA,type:this.type})]},addPasteRules(){return[gi({find:rA,type:this.type})]}}),oA=/^```([a-z]+)?[\s\n]$/,sA=/^~~~([a-z]+)?[\s\n]$/,aA=et.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:null,parseHTML:e=>{var t;const{languageClassPrefix:n}=this.options,o=[...((t=e.firstElementChild)===null||t===void 0?void 0:t.classList)||[]].filter(s=>s.startsWith(n)).map(s=>s.replace(n,""))[0];return o||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:e,HTMLAttributes:t}){return["pre",Ue(this.options.HTMLAttributes,t),["code",{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},addCommands(){return{setCodeBlock:e=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:e=>({commands:t})=>t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:e,$anchor:t}=this.editor.state.selection,n=t.pos===1;return!e||t.parent.type.name!==this.name?!1:n||!t.parent.textContent.length?this.editor.commands.clearNodes():!1},Enter:({editor:e})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:t}=e,{selection:n}=t,{$from:r,empty:i}=n;if(!i||r.parent.type!==this.type)return!1;const o=r.parentOffset===r.parent.nodeSize-2,s=r.parent.textContent.endsWith(`
`);return!o||!s?!1:e.chain().command(({tr:a})=>(a.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;const{state:t}=e,{selection:n,doc:r}=t,{$from:i,empty:o}=n;if(!o||i.parent.type!==this.type||!(i.parentOffset===i.parent.nodeSize-2))return!1;const a=i.after();return a===void 0||r.nodeAt(a)?!1:e.commands.exitCode()}}},addInputRules(){return[_d({find:oA,type:this.type,getAttributes:e=>({language:e[1]})}),_d({find:sA,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new gt({key:new yt("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>{if(!t.clipboardData||this.editor.isActive(this.type.name))return!1;const n=t.clipboardData.getData("text/plain"),r=t.clipboardData.getData("vscode-editor-data"),i=r?JSON.parse(r):void 0,o=i==null?void 0:i.mode;if(!n||!o)return!1;const{tr:s}=e.state;return s.replaceSelectionWith(this.type.create({language:o})),s.setSelection(ke.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.insertText(n.replace(/\r\n?/g,`
`)),s.setMeta("paste",!0),e.dispatch(s),!0}}})]}}),lA=et.create({name:"doc",topNode:!0,content:"block+"});function cA(e={}){return new gt({view(t){return new uA(t,e)}})}class uA{constructor(t,n){var r;this.editorView=t,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=n.width)!==null&&r!==void 0?r:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(i=>{let o=s=>{this[i](s)};return t.dom.addEventListener(i,o),{name:i,handler:o}})}destroy(){this.handlers.forEach(({name:t,handler:n})=>this.editorView.dom.removeEventListener(t,n))}update(t,n){this.cursorPos!=null&&n.doc!=t.state.doc&&(this.cursorPos>t.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(t){t!=this.cursorPos&&(this.cursorPos=t,t==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let t=this.editorView.state.doc.resolve(this.cursorPos),n=!t.parent.inlineContent,r;if(n){let a=t.nodeBefore,l=t.nodeAfter;if(a||l){let c=this.editorView.nodeDOM(this.cursorPos-(a?a.nodeSize:0));if(c){let u=c.getBoundingClientRect(),f=a?u.bottom:u.top;a&&l&&(f=(f+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),r={left:u.left,right:u.right,top:f-this.width/2,bottom:f+this.width/2}}}}if(!r){let a=this.editorView.coordsAtPos(this.cursorPos);r={left:a.left-this.width/2,right:a.left+this.width/2,top:a.top,bottom:a.bottom}}let i=this.editorView.dom.offsetParent;this.element||(this.element=i.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let o,s;if(!i||i==document.body&&getComputedStyle(i).position=="static")o=-pageXOffset,s=-pageYOffset;else{let a=i.getBoundingClientRect();o=a.left-i.scrollLeft,s=a.top-i.scrollTop}this.element.style.left=r.left-o+"px",this.element.style.top=r.top-s+"px",this.element.style.width=r.right-r.left+"px",this.element.style.height=r.bottom-r.top+"px"}scheduleRemoval(t){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),t)}dragover(t){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:t.clientX,top:t.clientY}),r=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),i=r&&r.type.spec.disableDropCursor,o=typeof i=="function"?i(this.editorView,n,t):i;if(n&&!o){let s=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let a=Cg(this.editorView.state.doc,s,this.editorView.dragging.slice);a!=null&&(s=a)}this.setCursor(s),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(t){(t.target==this.editorView.dom||!this.editorView.dom.contains(t.relatedTarget))&&this.setCursor(null)}}const dA=vt.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[cA(this.options)]}});class it extends Se{constructor(t){super(t,t)}map(t,n){let r=t.resolve(n.map(this.head));return it.valid(r)?new it(r):Se.near(r)}content(){return re.empty}eq(t){return t instanceof it&&t.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new it(t.resolve(n.pos))}getBookmark(){return new Fd(this.anchor)}static valid(t){let n=t.parent;if(n.isTextblock||!fA(t)||!hA(t))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let i=n.contentMatchAt(t.index()).defaultType;return i&&i.isTextblock}static findGapCursorFrom(t,n,r=!1){e:for(;;){if(!r&&it.valid(t))return t;let i=t.pos,o=null;for(let s=t.depth;;s--){let a=t.node(s);if(n>0?t.indexAfter(s)<a.childCount:t.index(s)>0){o=a.child(n>0?t.indexAfter(s):t.index(s)-1);break}else if(s==0)return null;i+=n;let l=t.doc.resolve(i);if(it.valid(l))return l}for(;;){let s=n>0?o.firstChild:o.lastChild;if(!s){if(o.isAtom&&!o.isText&&!be.isSelectable(o)){t=t.doc.resolve(i+o.nodeSize*n),r=!1;continue e}break}o=s,i+=n;let a=t.doc.resolve(i);if(it.valid(a))return a}return null}}}it.prototype.visible=!1;it.findFrom=it.findGapCursorFrom;Se.jsonID("gapcursor",it);class Fd{constructor(t){this.pos=t}map(t){return new Fd(t.map(this.pos))}resolve(t){let n=t.resolve(this.pos);return it.valid(n)?new it(n):Se.near(n)}}function fA(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let i=r.child(n-1);;i=i.lastChild){if(i.childCount==0&&!i.inlineContent||i.isAtom||i.type.spec.isolating)return!0;if(i.inlineContent)return!1}}return!0}function hA(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let i=r.child(n);;i=i.firstChild){if(i.childCount==0&&!i.inlineContent||i.isAtom||i.type.spec.isolating)return!0;if(i.inlineContent)return!1}}return!0}function pA(){return new gt({props:{decorations:vA,createSelectionBetween(e,t,n){return t.pos==n.pos&&it.valid(n)?new it(n):null},handleClick:gA,handleKeyDown:mA,handleDOMEvents:{beforeinput:yA}}})}const mA=b1({ArrowLeft:ll("horiz",-1),ArrowRight:ll("horiz",1),ArrowUp:ll("vert",-1),ArrowDown:ll("vert",1)});function ll(e,t){const n=e=="vert"?t>0?"down":"up":t>0?"right":"left";return function(r,i,o){let s=r.selection,a=t>0?s.$to:s.$from,l=s.empty;if(s instanceof ke){if(!o.endOfTextblock(n)||a.depth==0)return!1;l=!1,a=r.doc.resolve(t>0?a.after():a.before())}let c=it.findGapCursorFrom(a,t,l);return c?(i&&i(r.tr.setSelection(new it(c))),!0):!1}}function gA(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!it.valid(r))return!1;let i=e.posAtCoords({left:n.clientX,top:n.clientY});return i&&i.inside>-1&&be.isSelectable(e.state.doc.nodeAt(i.inside))?!1:(e.dispatch(e.state.tr.setSelection(new it(r))),!0)}function yA(e,t){if(t.inputType!="insertCompositionText"||!(e.state.selection instanceof it))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let i=K.empty;for(let s=r.length-1;s>=0;s--)i=K.from(r[s].createAndFill(null,i));let o=e.state.tr.replace(n.pos,n.pos,new re(i,0,0));return o.setSelection(ke.near(o.doc.resolve(n.pos+1))),e.dispatch(o),!1}function vA(e){if(!(e.selection instanceof it))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",Qe.create(e.doc,[Kt.widget(e.selection.head,t,{key:"gapcursor"})])}const bA=vt.create({name:"gapCursor",addProseMirrorPlugins(){return[pA()]},extendNodeSchema(e){var t;const n={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:(t=Ze(ut(e,"allowGapCursor",n)))!==null&&t!==void 0?t:null}}}),wA=et.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:e}){return["br",Ue(this.options.HTMLAttributes,e)]},renderText(){return`
`},addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command(()=>{const{selection:i,storedMarks:o}=n;if(i.$from.parent.type.spec.isolating)return!1;const{keepMarks:s}=this.options,{splittableMarks:a}=r.extensionManager,l=o||i.$to.parentOffset&&i.$from.marks();return t().insertContent({type:this.name}).command(({tr:c,dispatch:u})=>{if(u&&l&&s){const f=l.filter(h=>a.includes(h.type.name));c.ensureMarks(f)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),xA=et.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(e=>({tag:`h${e}`,attrs:{level:e}}))},renderHTML({node:e,HTMLAttributes:t}){return[`h${this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0]}`,Ue(this.options.HTMLAttributes,t),0]},addCommands(){return{setHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.setNode(this.name,e):!1,toggleHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.toggleNode(this.name,"paragraph",e):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((e,t)=>Me(J({},e),{[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}),{})},addInputRules(){return this.options.levels.map(e=>_d({find:new RegExp(`^(#{1,${e}})\\s$`),type:this.type,getAttributes:{level:e}}))}});var cl=200,Pt=function(){};Pt.prototype.append=function(t){return t.length?(t=Pt.from(t),!this.length&&t||t.length<cl&&this.leafAppend(t)||this.length<cl&&t.leafPrepend(this)||this.appendInner(t)):this};Pt.prototype.prepend=function(t){return t.length?Pt.from(t).append(this):this};Pt.prototype.appendInner=function(t){return new kA(this,t)};Pt.prototype.slice=function(t,n){return t===void 0&&(t=0),n===void 0&&(n=this.length),t>=n?Pt.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,n))};Pt.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)};Pt.prototype.forEach=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(t,n,r,0):this.forEachInvertedInner(t,n,r,0)};Pt.prototype.map=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var i=[];return this.forEach(function(o,s){return i.push(t(o,s))},n,r),i};Pt.from=function(t){return t instanceof Pt?t:t&&t.length?new T0(t):Pt.empty};var T0=function(e){function t(r){e.call(this),this.values=r}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(i,o){return i==0&&o==this.length?this:new t(this.values.slice(i,o))},t.prototype.getInner=function(i){return this.values[i]},t.prototype.forEachInner=function(i,o,s,a){for(var l=o;l<s;l++)if(i(this.values[l],a+l)===!1)return!1},t.prototype.forEachInvertedInner=function(i,o,s,a){for(var l=o-1;l>=s;l--)if(i(this.values[l],a+l)===!1)return!1},t.prototype.leafAppend=function(i){if(this.length+i.length<=cl)return new t(this.values.concat(i.flatten()))},t.prototype.leafPrepend=function(i){if(this.length+i.length<=cl)return new t(i.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(Pt);Pt.empty=new T0([]);var kA=function(e){function t(n,r){e.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},t.prototype.forEachInner=function(r,i,o,s){var a=this.left.length;if(i<a&&this.left.forEachInner(r,i,Math.min(o,a),s)===!1||o>a&&this.right.forEachInner(r,Math.max(i-a,0),Math.min(this.length,o)-a,s+a)===!1)return!1},t.prototype.forEachInvertedInner=function(r,i,o,s){var a=this.left.length;if(i>a&&this.right.forEachInvertedInner(r,i-a,Math.max(o,a)-a,s+a)===!1||o<a&&this.left.forEachInvertedInner(r,Math.min(i,a),o,s)===!1)return!1},t.prototype.sliceInner=function(r,i){if(r==0&&i==this.length)return this;var o=this.left.length;return i<=o?this.left.slice(r,i):r>=o?this.right.slice(r-o,i-o):this.left.slice(r,o).append(this.right.slice(0,i-o))},t.prototype.leafAppend=function(r){var i=this.right.leafAppend(r);if(i)return new t(this.left,i)},t.prototype.leafPrepend=function(r){var i=this.left.leafPrepend(r);if(i)return new t(i,this.right)},t.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new t(this.left,new t(this.right,r)):new t(this,r)},t}(Pt),P0=Pt;const SA=500;class Pn{constructor(t,n){this.items=t,this.eventCount=n}popEvent(t,n){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;n&&(i=this.remapping(r,this.items.length),o=i.maps.length);let s=t.tr,a,l,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 Wn(f.map));let p=f.step.map(i.slice(o)),g;p&&s.maybeStep(p).doc&&(g=s.mapping.maps[s.mapping.maps.length-1],c.push(new Wn(g,void 0,void 0,c.length+u.length))),o--,g&&i.appendMap(g,o)}else s.maybeStep(f.step);if(f.selection)return a=i?f.selection.map(i.slice(o)):f.selection,l=new Pn(this.items.slice(0,r).append(u.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:s,selection:a}}addTransform(t,n,r,i){let o=[],s=this.eventCount,a=this.items,l=!i&&a.length?a.get(a.length-1):null;for(let u=0;u<t.steps.length;u++){let f=t.steps[u].invert(t.docs[u]),h=new Wn(t.mapping.maps[u],f,n),p;(p=l&&l.merge(h))&&(h=p,u?o.pop():a=a.slice(0,a.length-1)),o.push(h),n&&(s++,n=void 0),i||(l=h)}let c=s-r.depth;return c>_A&&(a=CA(a,c),s-=c),new Pn(a.append(o),s)}remapping(t,n){let r=new Xi;return this.items.forEach((i,o)=>{let s=i.mirrorOffset!=null&&o-i.mirrorOffset>=t?r.maps.length-i.mirrorOffset:void 0;r.appendMap(i.map,s)},t,n),r}addMaps(t){return this.eventCount==0?this:new Pn(this.items.append(t.map(n=>new Wn(n))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-n),o=t.mapping,s=t.steps.length,a=this.eventCount;this.items.forEach(h=>{h.selection&&a--},i);let l=n;this.items.forEach(h=>{let p=o.getMirror(--l);if(p==null)return;s=Math.min(s,p);let g=o.maps[p];if(h.step){let v=t.steps[p].invert(t.docs[p]),b=h.selection&&h.selection.map(o.slice(l+1,p));b&&a++,r.push(new Wn(g,v,b))}else r.push(new Wn(g))},i);let c=[];for(let h=n;h<s;h++)c.push(new Wn(o.maps[h]));let u=this.items.slice(0,i).append(c).append(r),f=new Pn(u,a);return f.emptyItemCount()>SA&&(f=f.compress(this.items.length-r.length)),f}emptyItemCount(){let t=0;return this.items.forEach(n=>{n.step||t++}),t}compress(t=this.items.length){let n=this.remapping(0,t),r=n.maps.length,i=[],o=0;return this.items.forEach((s,a)=>{if(a>=t)i.push(s),s.selection&&o++;else if(s.step){let l=s.step.map(n.slice(r)),c=l&&l.getMap();if(r--,c&&n.appendMap(c,r),l){let u=s.selection&&s.selection.map(n.slice(r));u&&o++;let f=new Wn(c.invert(),l,u),h,p=i.length-1;(h=i.length&&i[p].merge(f))?i[p]=h:i.push(f)}}else s.map&&r--},this.items.length,0),new Pn(P0.from(i.reverse()),o)}}Pn.empty=new Pn(P0.empty,0);function CA(e,t){let n;return e.forEach((r,i)=>{if(r.selection&&t--==0)return n=i,!1}),e.slice(n)}class Wn{constructor(t,n,r,i){this.map=t,this.step=n,this.selection=r,this.mirrorOffset=i}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new Wn(n.getMap().invert(),n,this.selection)}}}class Or{constructor(t,n,r,i){this.done=t,this.undone=n,this.prevRanges=r,this.prevTime=i}}const _A=20;function MA(e,t,n,r){let i=n.getMeta(Tr),o;if(i)return i.historyState;n.getMeta(EA)&&(e=new Or(e.done,e.undone,null,0));let s=n.getMeta("appendedTransaction");if(n.steps.length==0)return e;if(s&&s.getMeta(Tr))return s.getMeta(Tr).redo?new Or(e.done.addTransform(n,void 0,r,ul(t)),e.undone,R0(n.mapping.maps[n.steps.length-1]),e.prevTime):new Or(e.done,e.undone.addTransform(n,void 0,r,ul(t)),null,e.prevTime);if(n.getMeta("addToHistory")!==!1&&!(s&&s.getMeta("addToHistory")===!1)){let a=e.prevTime==0||!s&&(e.prevTime<(n.time||0)-r.newGroupDelay||!AA(n,e.prevRanges)),l=s?Vd(e.prevRanges,n.mapping):R0(n.mapping.maps[n.steps.length-1]);return new Or(e.done.addTransform(n,a?t.selection.getBookmark():void 0,r,ul(t)),Pn.empty,l,n.time)}else return(o=n.getMeta("rebased"))?new Or(e.done.rebased(n,o),e.undone.rebased(n,o),Vd(e.prevRanges,n.mapping),e.prevTime):new Or(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),Vd(e.prevRanges,n.mapping),e.prevTime)}function AA(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((r,i)=>{for(let o=0;o<t.length;o+=2)r<=t[o+1]&&i>=t[o]&&(n=!0)}),n}function R0(e){let t=[];return e.forEach((n,r,i,o)=>t.push(i,o)),t}function Vd(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let i=t.map(e[r],1),o=t.map(e[r+1],-1);i<=o&&n.push(i,o)}return n}function j0(e,t,n,r){let i=ul(t),o=Tr.get(t).spec.config,s=(r?e.undone:e.done).popEvent(t,i);if(!s)return;let a=s.selection.resolve(s.transform.doc),l=(r?e.done:e.undone).addTransform(s.transform,t.selection.getBookmark(),o,i),c=new Or(r?l:s.remaining,r?s.remaining:l,null,0);n(s.transform.setSelection(a).setMeta(Tr,{redo:r,historyState:c}).scrollIntoView())}let Wd=!1,N0=null;function ul(e){let t=e.plugins;if(N0!=t){Wd=!1,N0=t;for(let n=0;n<t.length;n++)if(t[n].spec.historyPreserveItems){Wd=!0;break}}return Wd}const Tr=new yt("history"),EA=new yt("closeHistory");function OA(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new gt({key:Tr,state:{init(){return new Or(Pn.empty,Pn.empty,null,0)},apply(t,n,r){return MA(n,r,t,e)}},config:e,props:{handleDOMEvents:{beforeinput(t,n){let r=n.inputType,i=r=="historyUndo"?L0:r=="historyRedo"?D0:null;return i?(n.preventDefault(),i(t.state,t.dispatch)):!1}}}})}const L0=(e,t)=>{let n=Tr.getState(e);return!n||n.done.eventCount==0?!1:(t&&j0(n,e,t,!1),!0)},D0=(e,t)=>{let n=Tr.getState(e);return!n||n.undone.eventCount==0?!1:(t&&j0(n,e,t,!0),!0)},TA=vt.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>L0(e,t),redo:()=>({state:e,dispatch:t})=>D0(e,t)}},addProseMirrorPlugins(){return[OA(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Mod-Z":()=>this.editor.commands.undo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-Y":()=>this.editor.commands.redo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Shift-Mod-Z":()=>this.editor.commands.redo(),"Mod-\u044F":()=>this.editor.commands.undo(),"Shift-Mod-\u044F":()=>this.editor.commands.redo()}}}),PA=et.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:e}){return["hr",Ue(this.options.HTMLAttributes,e)]},addCommands(){return{setHorizontalRule:()=>({chain:e,state:t})=>{const{$to:n}=t.selection,r=e();return n.parentOffset===0?r.insertContentAt(Math.max(n.pos-2,0),{type:this.name}):r.insertContent({type:this.name}),r.command(({tr:i,dispatch:o})=>{var s;if(o){const{$to:a}=i.selection,l=a.end();if(a.nodeAfter)a.nodeAfter.isTextblock?i.setSelection(ke.create(i.doc,a.pos+1)):a.nodeAfter.isBlock?i.setSelection(be.create(i.doc,a.pos)):i.setSelection(ke.create(i.doc,a.pos));else{const c=(s=a.parent.type.contentMatch.defaultType)===null||s===void 0?void 0:s.create();c&&(i.insert(l,c),i.setSelection(ke.create(i.doc,l+1)))}i.scrollIntoView()}return!0}).run()}}},addInputRules(){return[V1({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),RA=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))$/,jA=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))/g,NA=/(?:^|\s)((?:_)((?:[^_]+))(?:_))$/,LA=/(?:^|\s)((?:_)((?:[^_]+))(?:_))/g,DA=gn.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:e=>e.style.fontStyle!=="normal"&&null},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:e}){return["em",Ue(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[mi({find:RA,type:this.type}),mi({find:NA,type:this.type})]},addPasteRules(){return[gi({find:jA,type:this.type}),gi({find:LA,type:this.type})]}}),IA=et.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",Ue(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),$A=et.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",Ue(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),I0=gn.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:e=>e.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["span",Ue(this.options.HTMLAttributes,e),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:e,commands:t})=>{const n=ks(e,this.type);return Object.entries(n).some(([,i])=>!!i)?!0:t.unsetMark(this.name)}}}}),$0=/^(\d+)\.\s$/,BA=et.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:e=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:e}){const r=e,{start:t}=r,n=Ve(r,["start"]);return t===1?["ol",Ue(this.options.HTMLAttributes,n),0]:["ol",Ue(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes($A.name,this.editor.getAttributes(I0.name)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let e=Ss({find:$0,type:this.type,getAttributes:t=>({start:+t[1]}),joinPredicate:(t,n)=>n.childCount+n.attrs.start===+t[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(e=Ss({find:$0,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:t=>J({start:+t[1]},this.editor.getAttributes(I0.name)),joinPredicate:(t,n)=>n.childCount+n.attrs.start===+t[1],editor:this.editor})),[e]}}),HA=et.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:e}){return["p",Ue(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),zA=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))$/,FA=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))/g,VA=gn.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["s",Ue(this.options.HTMLAttributes,e),0]},addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){const e={};return vd()?e["Mod-Shift-s"]=()=>this.editor.commands.toggleStrike():e["Ctrl-Shift-s"]=()=>this.editor.commands.toggleStrike(),e},addInputRules(){return[mi({find:zA,type:this.type})]},addPasteRules(){return[gi({find:FA,type:this.type})]}}),WA=et.create({name:"text",group:"inline"}),VP=vt.create({name:"starterKit",addExtensions(){var e,t,n,r,i,o,s,a,l,c,u,f,h,p,g,v,b,w;const k=[];return this.options.blockquote!==!1&&k.push(JM.configure((e=this.options)===null||e===void 0?void 0:e.blockquote)),this.options.bold!==!1&&k.push(ZM.configure((t=this.options)===null||t===void 0?void 0:t.bold)),this.options.bulletList!==!1&&k.push(tA.configure((n=this.options)===null||n===void 0?void 0:n.bulletList)),this.options.code!==!1&&k.push(iA.configure((r=this.options)===null||r===void 0?void 0:r.code)),this.options.codeBlock!==!1&&k.push(aA.configure((i=this.options)===null||i===void 0?void 0:i.codeBlock)),this.options.document!==!1&&k.push(lA.configure((o=this.options)===null||o===void 0?void 0:o.document)),this.options.dropcursor!==!1&&k.push(dA.configure((s=this.options)===null||s===void 0?void 0:s.dropcursor)),this.options.gapcursor!==!1&&k.push(bA.configure((a=this.options)===null||a===void 0?void 0:a.gapcursor)),this.options.hardBreak!==!1&&k.push(wA.configure((l=this.options)===null||l===void 0?void 0:l.hardBreak)),this.options.heading!==!1&&k.push(xA.configure((c=this.options)===null||c===void 0?void 0:c.heading)),this.options.history!==!1&&k.push(TA.configure((u=this.options)===null||u===void 0?void 0:u.history)),this.options.horizontalRule!==!1&&k.push(PA.configure((f=this.options)===null||f===void 0?void 0:f.horizontalRule)),this.options.italic!==!1&&k.push(DA.configure((h=this.options)===null||h===void 0?void 0:h.italic)),this.options.listItem!==!1&&k.push(IA.configure((p=this.options)===null||p===void 0?void 0:p.listItem)),this.options.orderedList!==!1&&k.push(BA.configure((g=this.options)===null||g===void 0?void 0:g.orderedList)),this.options.paragraph!==!1&&k.push(HA.configure((v=this.options)===null||v===void 0?void 0:v.paragraph)),this.options.strike!==!1&&k.push(VA.configure((b=this.options)===null||b===void 0?void 0:b.strike)),this.options.text!==!1&&k.push(WA.configure((w=this.options)===null||w===void 0?void 0:w.text)),k}}),WP=vt.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something \u2026",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new gt({key:new yt("placeholder"),props:{decorations:({doc:e,selection:t})=>{const n=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=t,i=[];if(!n)return null;const o=e.type.createAndFill(),s=(o==null?void 0:o.sameMarkup(e))&&o.content.findDiffStart(e.content)===null;return e.descendants((a,l)=>{const c=r>=l&&r<=l+a.nodeSize,u=!a.isLeaf&&!a.childCount;if((c||!this.options.showOnlyCurrent)&&u){const f=[this.options.emptyNodeClass];s&&f.push(this.options.emptyEditorClass);const h=Kt.node(l,l+a.nodeSize,{class:f.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:a,pos:l,hasAnchor:c}):this.options.placeholder});i.push(h)}return this.options.includeChildren}),Qe.create(e,i)}}})]}}),UP=vt.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:"left"}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:e=>e.style.textAlign||this.options.defaultAlignment,renderHTML:e=>e.textAlign===this.options.defaultAlignment?{}:{style:`text-align: ${e.textAlign}`}}}}]},addCommands(){return{setTextAlign:e=>({commands:t})=>this.options.alignments.includes(e)?this.options.types.every(n=>t.updateAttributes(n,{textAlign:e})):!1,unsetTextAlign:()=>({commands:e})=>this.options.types.every(t=>e.resetAttributes(t,"textAlign"))}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}});var Ud,Kd;if(typeof WeakMap!="undefined"){let e=new WeakMap;Ud=t=>e.get(t),Kd=(t,n)=>(e.set(t,n),n)}else{const e=[],t=10;let n=0;Ud=r=>{for(let i=0;i<e.length;i+=2)if(e[i]==r)return e[i+1]},Kd=(r,i)=>(n==t&&(n=0),e[n++]=r,e[n++]=i)}var ot=class{constructor(e,t,n,r){this.width=e,this.height=t,this.map=n,this.problems=r}findCell(e){for(let t=0;t<this.map.length;t++){const n=this.map[t];if(n!=e)continue;const r=t%this.width,i=t/this.width|0;let o=r+1,s=i+1;for(let a=1;o<this.width&&this.map[t+a]==n;a++)o++;for(let a=1;s<this.height&&this.map[t+this.width*a]==n;a++)s++;return{left:r,top:i,right:o,bottom:s}}throw new RangeError(`No cell with offset ${e} found`)}colCount(e){for(let t=0;t<this.map.length;t++)if(this.map[t]==e)return t%this.width;throw new RangeError(`No cell with offset ${e} found`)}nextCell(e,t,n){const{left:r,right:i,top:o,bottom:s}=this.findCell(e);return t=="horiz"?(n<0?r==0:i==this.width)?null:this.map[o*this.width+(n<0?r-1:i)]:(n<0?o==0:s==this.height)?null:this.map[r+this.width*(n<0?o-1:s)]}rectBetween(e,t){const{left:n,right:r,top:i,bottom:o}=this.findCell(e),{left:s,right:a,top:l,bottom:c}=this.findCell(t);return{left:Math.min(n,s),top:Math.min(i,l),right:Math.max(r,a),bottom:Math.max(o,c)}}cellsInRect(e){const t=[],n={};for(let r=e.top;r<e.bottom;r++)for(let i=e.left;i<e.right;i++){const o=r*this.width+i,s=this.map[o];n[s]||(n[s]=!0,!(i==e.left&&i&&this.map[o-1]==s||r==e.top&&r&&this.map[o-this.width]==s)&&t.push(s))}return t}positionAt(e,t,n){for(let r=0,i=0;;r++){const o=i+n.child(r).nodeSize;if(r==e){let s=t+e*this.width;const a=(e+1)*this.width;for(;s<a&&this.map[s]<i;)s++;return s==a?o-1:this.map[s]}i=o}}static get(e){return Ud(e)||Kd(e,UA(e))}};function UA(e){if(e.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+e.type.name);const t=KA(e),n=e.childCount,r=[];let i=0,o=null;const s=[];for(let c=0,u=t*n;c<u;c++)r[c]=0;for(let c=0,u=0;c<n;c++){const f=e.child(c);u++;for(let g=0;;g++){for(;i<r.length&&r[i]!=0;)i++;if(g==f.childCount)break;const v=f.child(g),{colspan:b,rowspan:w,colwidth:k}=v.attrs;for(let A=0;A<w;A++){if(A+c>=n){(o||(o=[])).push({type:"overlong_rowspan",pos:u,n:w-A});break}const d=i+A*t;for(let y=0;y<b;y++){r[d+y]==0?r[d+y]=u:(o||(o=[])).push({type:"collision",row:c,pos:u,n:b-y});const m=k&&k[y];if(m){const x=(d+y)%t*2,S=s[x];S==null||S!=m&&s[x+1]==1?(s[x]=m,s[x+1]=1):S==m&&s[x+1]++}}}i+=b,u+=v.nodeSize}const h=(c+1)*t;let p=0;for(;i<h;)r[i++]==0&&p++;p&&(o||(o=[])).push({type:"missing",row:c,n:p}),u++}const a=new ot(t,n,r,o);let l=!1;for(let c=0;!l&&c<s.length;c+=2)s[c]!=null&&s[c+1]<n&&(l=!0);return l&&qA(a,s,e),a}function KA(e){let t=-1,n=!1;for(let r=0;r<e.childCount;r++){const i=e.child(r);let o=0;if(n)for(let s=0;s<r;s++){const a=e.child(s);for(let l=0;l<a.childCount;l++){const c=a.child(l);s+c.attrs.rowspan>r&&(o+=c.attrs.colspan)}}for(let s=0;s<i.childCount;s++){const a=i.child(s);o+=a.attrs.colspan,a.attrs.rowspan>1&&(n=!0)}t==-1?t=o:t!=o&&(t=Math.max(t,o))}return t}function qA(e,t,n){e.problems||(e.problems=[]);const r={};for(let i=0;i<e.map.length;i++){const o=e.map[i];if(r[o])continue;r[o]=!0;const s=n.nodeAt(o);if(!s)throw new RangeError(`No cell with offset ${o} found`);let a=null;const l=s.attrs;for(let c=0;c<l.colspan;c++){const u=(i+c)%e.width,f=t[u*2];f!=null&&(!l.colwidth||l.colwidth[c]!=f)&&((a||(a=JA(l)))[c]=f)}a&&e.problems.unshift({type:"colwidth mismatch",pos:o,colwidth:a})}}function JA(e){if(e.colwidth)return e.colwidth.slice();const t=[];for(let n=0;n<e.colspan;n++)t.push(0);return t}function Nt(e){let t=e.cached.tableNodeTypes;if(!t){t=e.cached.tableNodeTypes={};for(const n in e.nodes){const r=e.nodes[n],i=r.spec.tableRole;i&&(t[i]=r)}}return t}var Pr=new yt("selectingCells");function go(e){for(let t=e.depth-1;t>0;t--)if(e.node(t).type.spec.tableRole=="row")return e.node(0).resolve(e.before(t+1));return null}function GA(e){for(let t=e.depth;t>0;t--){const n=e.node(t).type.spec.tableRole;if(n==="cell"||n==="header_cell")return e.node(t)}return null}function Rn(e){const t=e.selection.$head;for(let n=t.depth;n>0;n--)if(t.node(n).type.spec.tableRole=="row")return!0;return!1}function dl(e){const t=e.selection;if("$anchorCell"in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;if("node"in t&&t.node&&t.node.type.spec.tableRole=="cell")return t.$anchor;const n=go(t.$head)||YA(t.$head);if(n)return n;throw new RangeError(`No cell found around position ${t.head}`)}function YA(e){for(let t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){const r=t.type.spec.tableRole;if(r=="cell"||r=="header_cell")return e.doc.resolve(n)}for(let t=e.nodeBefore,n=e.pos;t;t=t.lastChild,n--){const r=t.type.spec.tableRole;if(r=="cell"||r=="header_cell")return e.doc.resolve(n-t.nodeSize)}}function qd(e){return e.parent.type.spec.tableRole=="row"&&!!e.nodeAfter}function XA(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function Jd(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function B0(e,t,n){const r=e.node(-1),i=ot.get(r),o=e.start(-1),s=i.nextCell(e.pos-o,t,n);return s==null?null:e.node(0).resolve(o+s)}function wi(e,t,n=1){const r=Me(J({},e),{colspan:e.colspan-n});return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(t,n),r.colwidth.some(i=>i>0)||(r.colwidth=null)),r}function H0(e,t,n=1){const r=Me(J({},e),{colspan:e.colspan+n});if(r.colwidth){r.colwidth=r.colwidth.slice();for(let i=0;i<n;i++)r.colwidth.splice(t,0,0)}return r}function QA(e,t,n){const r=Nt(t.type.schema).header_cell;for(let i=0;i<e.height;i++)if(t.nodeAt(e.map[n+i*e.width]).type!=r)return!1;return!0}var De=class extends Se{constructor(e,t=e){const n=e.node(-1),r=ot.get(n),i=e.start(-1),o=r.rectBetween(e.pos-i,t.pos-i),s=e.node(0),a=r.cellsInRect(o).filter(c=>c!=t.pos-i);a.unshift(t.pos-i);const l=a.map(c=>{const u=n.nodeAt(c);if(!u)throw RangeError(`No cell with offset ${c} found`);const f=i+c+1;return new Tg(s.resolve(f),s.resolve(f+u.content.size))});super(l[0].$from,l[0].$to,l);this.$anchorCell=e,this.$headCell=t}map(e,t){const n=e.resolve(t.map(this.$anchorCell.pos)),r=e.resolve(t.map(this.$headCell.pos));if(qd(n)&&qd(r)&&Jd(n,r)){const i=this.$anchorCell.node(-1)!=n.node(-1);return i&&this.isRowSelection()?De.rowSelection(n,r):i&&this.isColSelection()?De.colSelection(n,r):new De(n,r)}return ke.between(n,r)}content(){const e=this.$anchorCell.node(-1),t=ot.get(e),n=this.$anchorCell.start(-1),r=t.rectBetween(this.$anchorCell.pos-n,this.$headCell.pos-n),i={},o=[];for(let a=r.top;a<r.bottom;a++){const l=[];for(let c=a*t.width+r.left,u=r.left;u<r.right;u++,c++){const f=t.map[c];if(i[f])continue;i[f]=!0;const h=t.findCell(f);let p=e.nodeAt(f);if(!p)throw RangeError(`No cell with offset ${f} found`);const g=r.left-h.left,v=h.right-r.right;if(g>0||v>0){let b=p.attrs;if(g>0&&(b=wi(b,0,g)),v>0&&(b=wi(b,b.colspan-v,v)),h.left<r.left){if(p=p.type.createAndFill(b),!p)throw RangeError(`Could not create cell with attrs ${JSON.stringify(b)}`)}else p=p.type.create(b,p.content)}if(h.top<r.top||h.bottom>r.bottom){const b=Me(J({},p.attrs),{rowspan:Math.min(h.bottom,r.bottom)-Math.max(h.top,r.top)});h.top<r.top?p=p.type.createAndFill(b):p=p.type.create(b,p.content)}l.push(p)}o.push(e.child(a).copy(K.from(l)))}const s=this.isColSelection()&&this.isRowSelection()?e:o;return new re(K.from(s),1,1)}replace(e,t=re.empty){const n=e.steps.length,r=this.ranges;for(let o=0;o<r.length;o++){const{$from:s,$to:a}=r[o],l=e.mapping.slice(n);e.replace(l.map(s.pos),l.map(a.pos),o?re.empty:t)}const i=Se.findFrom(e.doc.resolve(e.mapping.slice(n).map(this.to)),-1);i&&e.setSelection(i)}replaceWith(e,t){this.replace(e,new re(K.from(t),0,0))}forEachCell(e){const t=this.$anchorCell.node(-1),n=ot.get(t),r=this.$anchorCell.start(-1),i=n.cellsInRect(n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r));for(let o=0;o<i.length;o++)e(t.nodeAt(i[o]),r+i[o])}isColSelection(){const e=this.$anchorCell.index(-1),t=this.$headCell.index(-1);if(Math.min(e,t)>0)return!1;const n=e+this.$anchorCell.nodeAfter.attrs.rowspan,r=t+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(n,r)==this.$headCell.node(-1).childCount}static colSelection(e,t=e){const n=e.node(-1),r=ot.get(n),i=e.start(-1),o=r.findCell(e.pos-i),s=r.findCell(t.pos-i),a=e.node(0);return o.top<=s.top?(o.top>0&&(e=a.resolve(i+r.map[o.left])),s.bottom<r.height&&(t=a.resolve(i+r.map[r.width*(r.height-1)+s.right-1]))):(s.top>0&&(t=a.resolve(i+r.map[s.left])),o.bottom<r.height&&(e=a.resolve(i+r.map[r.width*(r.height-1)+o.right-1]))),new De(e,t)}isRowSelection(){const e=this.$anchorCell.node(-1),t=ot.get(e),n=this.$anchorCell.start(-1),r=t.colCount(this.$anchorCell.pos-n),i=t.colCount(this.$headCell.pos-n);if(Math.min(r,i)>0)return!1;const o=r+this.$anchorCell.nodeAfter.attrs.colspan,s=i+this.$headCell.nodeAfter.attrs.colspan;return Math.max(o,s)==t.width}eq(e){return e instanceof De&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,t=e){const n=e.node(-1),r=ot.get(n),i=e.start(-1),o=r.findCell(e.pos-i),s=r.findCell(t.pos-i),a=e.node(0);return o.left<=s.left?(o.left>0&&(e=a.resolve(i+r.map[o.top*r.width])),s.right<r.width&&(t=a.resolve(i+r.map[r.width*(s.top+1)-1]))):(s.left>0&&(t=a.resolve(i+r.map[s.top*r.width])),o.right<r.width&&(e=a.resolve(i+r.map[r.width*(o.top+1)-1]))),new De(e,t)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(e,t){return new De(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,n=t){return new De(e.resolve(t),e.resolve(n))}getBookmark(){return new z0(this.$anchorCell.pos,this.$headCell.pos)}};De.prototype.visible=!1;Se.jsonID("cell",De);var z0=class{constructor(e,t){this.anchor=e,this.head=t}map(e){return new z0(e.map(this.anchor),e.map(this.head))}resolve(e){const t=e.resolve(this.anchor),n=e.resolve(this.head);return t.parent.type.spec.tableRole=="row"&&n.parent.type.spec.tableRole=="row"&&t.index()<t.parent.childCount&&n.index()<n.parent.childCount&&Jd(t,n)?new De(t,n):Se.near(n,1)}};function ZA(e){if(!(e.selection instanceof De))return null;const t=[];return e.selection.forEachCell((n,r)=>{t.push(Kt.node(r,r+n.nodeSize,{class:"selectedCell"}))}),Qe.create(e.doc,t)}function eE({$from:e,$to:t}){if(e.pos==t.pos||e.pos<e.pos-6)return!1;let n=e.pos,r=t.pos,i=e.depth;for(;i>=0&&!(e.after(i+1)<e.end(i));i--,n++);for(let o=t.depth;o>=0&&!(t.before(o+1)>t.start(o));o--,r--);return n==r&&/row|table/.test(e.node(i).type.spec.tableRole)}function tE({$from:e,$to:t}){let n,r;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"){n=o;break}}for(let i=t.depth;i>0;i--){const o=t.node(i);if(o.type.spec.tableRole==="cell"||o.type.spec.tableRole==="header_cell"){r=o;break}}return n!==r&&t.parentOffset===0}function nE(e,t,n){const r=(t||e).selection,i=(t||e).doc;let o,s;if(r instanceof be&&(s=r.node.type.spec.tableRole)){if(s=="cell"||s=="header_cell")o=De.create(i,r.from);else if(s=="row"){const a=i.resolve(r.from+1);o=De.rowSelection(a,a)}else if(!n){const a=ot.get(r.node),l=r.from+1,c=l+a.map[a.width*a.height-1];o=De.create(i,l+1,c)}}else r instanceof ke&&eE(r)?o=ke.create(i,r.from):r instanceof ke&&tE(r)&&(o=ke.create(i,r.$from.start(),r.$from.end()));return o&&(t||(t=e.tr)).setSelection(o),t}var rE=new yt("fix-tables");function F0(e,t,n,r){const i=e.childCount,o=t.childCount;e:for(let s=0,a=0;s<o;s++){const l=t.child(s);for(let c=a,u=Math.min(i,s+3);c<u;c++)if(e.child(c)==l){a=c+1,n+=l.nodeSize;continue e}r(l,n),a<i&&e.child(a).sameMarkup(l)?F0(e.child(a),l,n+1,r):l.nodesBetween(0,l.content.size,r,n+1),n+=l.nodeSize}}function V0(e,t){let n;const r=(i,o)=>{i.type.spec.tableRole=="table"&&(n=iE(e,i,o,n))};return t?t.doc!=e.doc&&F0(t.doc,e.doc,0,r):e.doc.descendants(r),n}function iE(e,t,n,r){const i=ot.get(t);if(!i.problems)return r;r||(r=e.tr);const o=[];for(let l=0;l<i.height;l++)o.push(0);for(let l=0;l<i.problems.length;l++){const c=i.problems[l];if(c.type=="collision"){const u=t.nodeAt(c.pos);if(!u)continue;const f=u.attrs;for(let h=0;h<f.rowspan;h++)o[c.row+h]+=c.n;r.setNodeMarkup(r.mapping.map(n+1+c.pos),null,wi(f,f.colspan-c.n,c.n))}else if(c.type=="missing")o[c.row]+=c.n;else if(c.type=="overlong_rowspan"){const u=t.nodeAt(c.pos);if(!u)continue;r.setNodeMarkup(r.mapping.map(n+1+c.pos),null,Me(J({},u.attrs),{rowspan:u.attrs.rowspan-c.n}))}else if(c.type=="colwidth mismatch"){const u=t.nodeAt(c.pos);if(!u)continue;r.setNodeMarkup(r.mapping.map(n+1+c.pos),null,Me(J({},u.attrs),{colwidth:c.colwidth}))}}let s,a;for(let l=0;l<o.length;l++)o[l]&&(s==null&&(s=l),a=l);for(let l=0,c=n+1;l<i.height;l++){const u=t.child(l),f=c+u.nodeSize,h=o[l];if(h>0){let p="cell";u.firstChild&&(p=u.firstChild.type.spec.tableRole);const g=[];for(let b=0;b<h;b++){const w=Nt(e.schema)[p].createAndFill();w&&g.push(w)}const v=(l==0||s==l-1)&&a==l?c+1:f-1;r.insert(r.mapping.map(v),g)}c=f}return r.setMeta(rE,{fixTables:!0})}function oE(e){if(!e.size)return null;let{content:t,openStart:n,openEnd:r}=e;for(;t.childCount==1&&(n>0&&r>0||t.child(0).type.spec.tableRole=="table");)n--,r--,t=t.child(0).content;const i=t.child(0),o=i.type.spec.tableRole,s=i.type.schema,a=[];if(o=="row")for(let l=0;l<t.childCount;l++){let c=t.child(l).content;const u=l?0:Math.max(0,n-1),f=l<t.childCount-1?0:Math.max(0,r-1);(u||f)&&(c=Gd(Nt(s).row,new re(c,u,f)).content),a.push(c)}else if(o=="cell"||o=="header_cell")a.push(n||r?Gd(Nt(s).row,new re(t,n,r)).content:t);else return null;return sE(s,a)}function sE(e,t){const n=[];for(let i=0;i<t.length;i++){const o=t[i];for(let s=o.childCount-1;s>=0;s--){const{rowspan:a,colspan:l}=o.child(s).attrs;for(let c=i;c<i+a;c++)n[c]=(n[c]||0)+l}}let r=0;for(let i=0;i<n.length;i++)r=Math.max(r,n[i]);for(let i=0;i<n.length;i++)if(i>=t.length&&t.push(K.empty),n[i]<r){const o=Nt(e).cell.createAndFill(),s=[];for(let a=n[i];a<r;a++)s.push(o);t[i]=t[i].append(K.from(s))}return{height:t.length,width:r,rows:t}}function Gd(e,t){const n=e.createAndFill();return new Og(n).replace(0,n.content.size,t).doc}function aE({width:e,height:t,rows:n},r,i){if(e!=r){const o=[],s=[];for(let a=0;a<n.length;a++){const l=n[a],c=[];for(let u=o[a]||0,f=0;u<r;f++){let h=l.child(f%l.childCount);u+h.attrs.colspan>r&&(h=h.type.createChecked(wi(h.attrs,h.attrs.colspan,u+h.attrs.colspan-r),h.content)),c.push(h),u+=h.attrs.colspan;for(let p=1;p<h.attrs.rowspan;p++)o[a+p]=(o[a+p]||0)+h.attrs.colspan}s.push(K.from(c))}n=s,e=r}if(t!=i){const o=[];for(let s=0,a=0;s<i;s++,a++){const l=[],c=n[a%t];for(let u=0;u<c.childCount;u++){let f=c.child(u);s+f.attrs.rowspan>i&&(f=f.type.create(Me(J({},f.attrs),{rowspan:Math.max(1,i-f.attrs.rowspan)}),f.content)),l.push(f)}o.push(K.from(l))}n=o,t=i}return{width:e,height:t,rows:n}}function lE(e,t,n,r,i,o,s){const a=e.doc.type.schema,l=Nt(a);let c,u;if(i>t.width)for(let f=0,h=0;f<t.height;f++){const p=n.child(f);h+=p.nodeSize;const g=[];let v;p.lastChild==null||p.lastChild.type==l.cell?v=c||(c=l.cell.createAndFill()):v=u||(u=l.header_cell.createAndFill());for(let b=t.width;b<i;b++)g.push(v);e.insert(e.mapping.slice(s).map(h-1+r),g)}if(o>t.height){const f=[];for(let g=0,v=(t.height-1)*t.width;g<Math.max(t.width,i);g++){const b=g>=t.width?!1:n.nodeAt(t.map[v+g]).type==l.header_cell;f.push(b?u||(u=l.header_cell.createAndFill()):c||(c=l.cell.createAndFill()))}const h=l.row.create(null,K.from(f)),p=[];for(let g=t.height;g<o;g++)p.push(h);e.insert(e.mapping.slice(s).map(r+n.nodeSize-2),p)}return!!(c||u)}function W0(e,t,n,r,i,o,s,a){if(s==0||s==t.height)return!1;let l=!1;for(let c=i;c<o;c++){const u=s*t.width+c,f=t.map[u];if(t.map[u-t.width]==f){l=!0;const h=n.nodeAt(f),{top:p,left:g}=t.findCell(f);e.setNodeMarkup(e.mapping.slice(a).map(f+r),null,Me(J({},h.attrs),{rowspan:s-p})),e.insert(e.mapping.slice(a).map(t.positionAt(s,g,n)),h.type.createAndFill(Me(J({},h.attrs),{rowspan:p+h.attrs.rowspan-s}))),c+=h.attrs.colspan-1}}return l}function U0(e,t,n,r,i,o,s,a){if(s==0||s==t.width)return!1;let l=!1;for(let c=i;c<o;c++){const u=c*t.width+s,f=t.map[u];if(t.map[u-1]==f){l=!0;const h=n.nodeAt(f),p=t.colCount(f),g=e.mapping.slice(a).map(f+r);e.setNodeMarkup(g,null,wi(h.attrs,s-p,h.attrs.colspan-(s-p))),e.insert(g+h.nodeSize,h.type.createAndFill(wi(h.attrs,0,s-p))),c+=h.attrs.rowspan-1}}return l}function K0(e,t,n,r,i){let o=n?e.doc.nodeAt(n-1):e.doc;if(!o)throw new Error("No table found");let s=ot.get(o);const{top:a,left:l}=r,c=l+i.width,u=a+i.height,f=e.tr;let h=0;function p(){if(o=n?f.doc.nodeAt(n-1):f.doc,!o)throw new Error("No table found");s=ot.get(o),h=f.mapping.maps.length}lE(f,s,o,n,c,u,h)&&p(),W0(f,s,o,n,l,c,a,h)&&p(),W0(f,s,o,n,l,c,u,h)&&p(),U0(f,s,o,n,a,u,l,h)&&p(),U0(f,s,o,n,a,u,c,h)&&p();for(let g=a;g<u;g++){const v=s.positionAt(g,l,o),b=s.positionAt(g,c,o);f.replace(f.mapping.slice(h).map(v+n),f.mapping.slice(h).map(b+n),new re(i.rows[g-a],0,0))}p(),f.setSelection(new De(f.doc.resolve(n+s.positionAt(a,l,o)),f.doc.resolve(n+s.positionAt(u-1,c-1,o)))),t(f)}var cE=b1({ArrowLeft:hl("horiz",-1),ArrowRight:hl("horiz",1),ArrowUp:hl("vert",-1),ArrowDown:hl("vert",1),"Shift-ArrowLeft":pl("horiz",-1),"Shift-ArrowRight":pl("horiz",1),"Shift-ArrowUp":pl("vert",-1),"Shift-ArrowDown":pl("vert",1),Backspace:ml,"Mod-Backspace":ml,Delete:ml,"Mod-Delete":ml});function fl(e,t,n){return n.eq(e.selection)?!1:(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function hl(e,t){return(n,r,i)=>{if(!i)return!1;const o=n.selection;if(o instanceof De)return fl(n,r,Se.near(o.$headCell,t));if(e!="horiz"&&!o.empty)return!1;const s=q0(i,e,t);if(s==null)return!1;if(e=="horiz")return fl(n,r,Se.near(n.doc.resolve(o.head+t),t));{const a=n.doc.resolve(s),l=B0(a,e,t);let c;return l?c=Se.near(l,1):t<0?c=Se.near(n.doc.resolve(a.before(-1)),-1):c=Se.near(n.doc.resolve(a.after(-1)),1),fl(n,r,c)}}}function pl(e,t){return(n,r,i)=>{if(!i)return!1;const o=n.selection;let s;if(o instanceof De)s=o;else{const l=q0(i,e,t);if(l==null)return!1;s=new De(n.doc.resolve(l))}const a=B0(s.$headCell,e,t);return a?fl(n,r,new De(s.$anchorCell,a)):!1}}function ml(e,t){const n=e.selection;if(!(n instanceof De))return!1;if(t){const r=e.tr,i=Nt(e.schema).cell.createAndFill().content;n.forEachCell((o,s)=>{o.content.eq(i)||r.replace(r.mapping.map(s+1),r.mapping.map(s+o.nodeSize-1),new re(i,0,0))}),r.docChanged&&t(r)}return!0}function uE(e,t){const n=e.state.doc,r=go(n.resolve(t));return r?(e.dispatch(e.state.tr.setSelection(new De(r))),!0):!1}function dE(e,t,n){if(!Rn(e.state))return!1;let r=oE(n);const i=e.state.selection;if(i instanceof De){r||(r={width:1,height:1,rows:[K.from(Gd(Nt(e.state.schema).cell,n))]});const o=i.$anchorCell.node(-1),s=i.$anchorCell.start(-1),a=ot.get(o).rectBetween(i.$anchorCell.pos-s,i.$headCell.pos-s);return r=aE(r,a.right-a.left,a.bottom-a.top),K0(e.state,e.dispatch,s,a,r),!0}else if(r){const o=dl(e.state),s=o.start(-1);return K0(e.state,e.dispatch,s,ot.get(o.node(-1)).findCell(o.pos-s),r),!0}else return!1}function fE(e,t){var n;if(t.ctrlKey||t.metaKey)return;const r=J0(e,t.target);let i;if(t.shiftKey&&e.state.selection instanceof De)o(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&r&&(i=go(e.state.selection.$anchor))!=null&&((n=Yd(e,t))==null?void 0:n.pos)!=i.pos)o(i,t),t.preventDefault();else if(!r)return;function o(l,c){let u=Yd(e,c);const f=Pr.getState(e.state)==null;if(!u||!Jd(l,u))if(f)u=l;else return;const h=new De(l,u);if(f||!e.state.selection.eq(h)){const p=e.state.tr.setSelection(h);f&&p.setMeta(Pr,l.pos),e.dispatch(p)}}function s(){e.root.removeEventListener("mouseup",s),e.root.removeEventListener("dragstart",s),e.root.removeEventListener("mousemove",a),Pr.getState(e.state)!=null&&e.dispatch(e.state.tr.setMeta(Pr,-1))}function a(l){const c=l,u=Pr.getState(e.state);let f;if(u!=null)f=e.state.doc.resolve(u);else if(J0(e,c.target)!=r&&(f=Yd(e,t),!f))return s();f&&o(f,c)}e.root.addEventListener("mouseup",s),e.root.addEventListener("dragstart",s),e.root.addEventListener("mousemove",a)}function q0(e,t,n){if(!(e.state.selection instanceof ke))return null;const{$head:r}=e.state.selection;for(let i=r.depth-1;i>=0;i--){const o=r.node(i);if((n<0?r.index(i):r.indexAfter(i))!=(n<0?0:o.childCount))return null;if(o.type.spec.tableRole=="cell"||o.type.spec.tableRole=="header_cell"){const a=r.before(i),l=t=="vert"?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(l)?a:null}}return null}function J0(e,t){for(;t&&t!=e.dom;t=t.parentNode)if(t.nodeName=="TD"||t.nodeName=="TH")return t;return null}function Yd(e,t){const n=e.posAtCoords({left:t.clientX,top:t.clientY});return n&&n?go(e.state.doc.resolve(n.pos)):null}var hE=class{constructor(e,t){this.node=e,this.cellMinWidth=t,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")),Xd(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!=this.node.type?!1:(this.node=e,Xd(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){return e.type=="attributes"&&(e.target==this.table||this.colgroup.contains(e.target))}};function Xd(e,t,n,r,i,o){var s;let a=0,l=!0,c=t.firstChild;const u=e.firstChild;if(!!u){for(let f=0,h=0;f<u.childCount;f++){const{colspan:p,colwidth:g}=u.child(f).attrs;for(let v=0;v<p;v++,h++){const b=i==h?o:g&&g[v],w=b?b+"px":"";a+=b||r,b||(l=!1),c?(c.style.width!=w&&(c.style.width=w),c=c.nextSibling):t.appendChild(document.createElement("col")).style.width=w}}for(;c;){const f=c.nextSibling;(s=c.parentNode)==null||s.removeChild(c),c=f}l?(n.style.width=a+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=a+"px")}}var wn=new yt("tableColumnResizing");function pE({handleWidth:e=5,cellMinWidth:t=25,View:n=hE,lastColumnResizable:r=!0}={}){const i=new gt({key:wn,state:{init(o,s){return i.spec.props.nodeViews[Nt(s.schema).table.name]=(a,l)=>new n(a,t,l),new gl(-1,!1)},apply(o,s){return s.apply(o)}},props:{attributes:o=>{const s=wn.getState(o);return s&&s.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(o,s)=>{mE(o,s,e,t,r)},mouseleave:o=>{gE(o)},mousedown:(o,s)=>{yE(o,s,t)}},decorations:o=>{const s=wn.getState(o);if(s&&s.activeHandle>-1)return SE(o,s.activeHandle)},nodeViews:{}}});return i}var gl=class{constructor(e,t){this.activeHandle=e,this.dragging=t}apply(e){const t=this,n=e.getMeta(wn);if(n&&n.setHandle!=null)return new gl(n.setHandle,!1);if(n&&n.setDragging!==void 0)return new gl(t.activeHandle,n.setDragging);if(t.activeHandle>-1&&e.docChanged){let r=e.mapping.map(t.activeHandle,-1);return qd(e.doc.resolve(r))||(r=-1),new gl(r,t.dragging)}return t}};function mE(e,t,n,r,i){const o=wn.getState(e.state);if(!!o&&!o.dragging){const s=bE(t.target);let a=-1;if(s){const{left:l,right:c}=s.getBoundingClientRect();t.clientX-l<=n?a=G0(e,t,"left"):c-t.clientX<=n&&(a=G0(e,t,"right"))}if(a!=o.activeHandle){if(!i&&a!==-1){const l=e.state.doc.resolve(a),c=l.node(-1),u=ot.get(c),f=l.start(-1);if(u.colCount(l.pos-f)+l.nodeAfter.attrs.colspan-1==u.width-1)return}X0(e,a)}}}function gE(e){const t=wn.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&X0(e,-1)}function yE(e,t,n){const r=wn.getState(e.state);if(!r||r.activeHandle==-1||r.dragging)return!1;const i=e.state.doc.nodeAt(r.activeHandle),o=vE(e,r.activeHandle,i.attrs);e.dispatch(e.state.tr.setMeta(wn,{setDragging:{startX:t.clientX,startWidth:o}}));function s(l){window.removeEventListener("mouseup",s),window.removeEventListener("mousemove",a);const c=wn.getState(e.state);(c==null?void 0:c.dragging)&&(wE(e,c.activeHandle,Y0(c.dragging,l,n)),e.dispatch(e.state.tr.setMeta(wn,{setDragging:null})))}function a(l){if(!l.which)return s(l);const c=wn.getState(e.state);if(!!c&&c.dragging){const u=Y0(c.dragging,l,n);xE(e,c.activeHandle,u,n)}}return window.addEventListener("mouseup",s),window.addEventListener("mousemove",a),t.preventDefault(),!0}function vE(e,t,{colspan:n,colwidth:r}){const i=r&&r[r.length-1];if(i)return i;const o=e.domAtPos(t);let a=o.node.childNodes[o.offset].offsetWidth,l=n;if(r)for(let c=0;c<n;c++)r[c]&&(a-=r[c],l--);return a/l}function bE(e){for(;e&&e.nodeName!="TD"&&e.nodeName!="TH";)e=e.classList&&e.classList.contains("ProseMirror")?null:e.parentNode;return e}function G0(e,t,n){const r=e.posAtCoords({left:t.clientX,top:t.clientY});if(!r)return-1;const{pos:i}=r,o=go(e.state.doc.resolve(i));if(!o)return-1;if(n=="right")return o.pos;const s=ot.get(o.node(-1)),a=o.start(-1),l=s.map.indexOf(o.pos-a);return l%s.width==0?-1:a+s.map[l-1]}function Y0(e,t,n){const r=t.clientX-e.startX;return Math.max(n,e.startWidth+r)}function X0(e,t){e.dispatch(e.state.tr.setMeta(wn,{setHandle:t}))}function wE(e,t,n){const r=e.state.doc.resolve(t),i=r.node(-1),o=ot.get(i),s=r.start(-1),a=o.colCount(r.pos-s)+r.nodeAfter.attrs.colspan-1,l=e.state.tr;for(let c=0;c<o.height;c++){const u=c*o.width+a;if(c&&o.map[u]==o.map[u-o.width])continue;const f=o.map[u],h=i.nodeAt(f).attrs,p=h.colspan==1?0:a-o.colCount(f);if(h.colwidth&&h.colwidth[p]==n)continue;const g=h.colwidth?h.colwidth.slice():kE(h.colspan);g[p]=n,l.setNodeMarkup(s+f,null,Me(J({},h),{colwidth:g}))}l.docChanged&&e.dispatch(l)}function xE(e,t,n,r){const i=e.state.doc.resolve(t),o=i.node(-1),s=i.start(-1),a=ot.get(o).colCount(i.pos-s)+i.nodeAfter.attrs.colspan-1;let l=e.domAtPos(i.start(-1)).node;for(;l&&l.nodeName!="TABLE";)l=l.parentNode;!l||Xd(o,l.firstChild,l,r,a,n)}function kE(e){return Array(e).fill(0)}function SE(e,t){const n=[],r=e.doc.resolve(t),i=r.node(-1);if(!i)return Qe.empty;const o=ot.get(i),s=r.start(-1),a=o.colCount(r.pos-s)+r.nodeAfter.attrs.colspan;for(let l=0;l<o.height;l++){const c=a+l*o.width-1;if((a==o.width||o.map[c]!=o.map[c+1])&&(l==0||o.map[c-1]!=o.map[c-1-o.width])){const u=o.map[c],f=s+u+i.nodeAt(u).nodeSize-1,h=document.createElement("div");h.className="column-resize-handle",n.push(Kt.widget(f,h))}}return Qe.create(e.doc,n)}function Un(e){const t=e.selection,n=dl(e),r=n.node(-1),i=n.start(-1),o=ot.get(r),s=t instanceof De?o.rectBetween(t.$anchorCell.pos-i,t.$headCell.pos-i):o.findCell(n.pos-i);return Me(J({},s),{tableStart:i,map:o,table:r})}function Q0(e,{map:t,tableStart:n,table:r},i){let o=i>0?-1:0;QA(t,r,i+o)&&(o=i==0||i==t.width?null:0);for(let s=0;s<t.height;s++){const a=s*t.width+i;if(i>0&&i<t.width&&t.map[a-1]==t.map[a]){const l=t.map[a],c=r.nodeAt(l);e.setNodeMarkup(e.mapping.map(n+l),null,H0(c.attrs,i-t.colCount(l))),s+=c.attrs.rowspan-1}else{const l=o==null?Nt(r.type.schema).cell:r.nodeAt(t.map[a+o]).type,c=t.positionAt(s,i,r);e.insert(e.mapping.map(n+c),l.createAndFill())}}return e}function CE(e,t){if(!Rn(e))return!1;if(t){const n=Un(e);t(Q0(e.tr,n,n.left))}return!0}function _E(e,t){if(!Rn(e))return!1;if(t){const n=Un(e);t(Q0(e.tr,n,n.right))}return!0}function ME(e,{map:t,table:n,tableStart:r},i){const o=e.mapping.maps.length;for(let s=0;s<t.height;){const a=s*t.width+i,l=t.map[a],c=n.nodeAt(l),u=c.attrs;if(i>0&&t.map[a-1]==l||i<t.width-1&&t.map[a+1]==l)e.setNodeMarkup(e.mapping.slice(o).map(r+l),null,wi(u,i-t.colCount(l)));else{const f=e.mapping.slice(o).map(r+l);e.delete(f,f+c.nodeSize)}s+=u.rowspan}}function AE(e,t){if(!Rn(e))return!1;if(t){const n=Un(e),r=e.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let i=n.right-1;ME(r,n,i),i!=n.left;i--){const o=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!o)throw RangeError("No table found");n.table=o,n.map=ot.get(o)}t(r)}return!0}function EE(e,t,n){var r;const i=Nt(t.type.schema).header_cell;for(let o=0;o<e.width;o++)if(((r=t.nodeAt(e.map[o+n*e.width]))==null?void 0:r.type)!=i)return!1;return!0}function Z0(e,{map:t,tableStart:n,table:r},i){var o;let s=n;for(let c=0;c<i;c++)s+=r.child(c).nodeSize;const a=[];let l=i>0?-1:0;EE(t,r,i+l)&&(l=i==0||i==t.height?null:0);for(let c=0,u=t.width*i;c<t.width;c++,u++)if(i>0&&i<t.height&&t.map[u]==t.map[u-t.width]){const f=t.map[u],h=r.nodeAt(f).attrs;e.setNodeMarkup(n+f,null,Me(J({},h),{rowspan:h.rowspan+1})),c+=h.colspan-1}else{const f=l==null?Nt(r.type.schema).cell:(o=r.nodeAt(t.map[u+l*t.width]))==null?void 0:o.type,h=f==null?void 0:f.createAndFill();h&&a.push(h)}return e.insert(s,Nt(r.type.schema).row.create(null,a)),e}function OE(e,t){if(!Rn(e))return!1;if(t){const n=Un(e);t(Z0(e.tr,n,n.top))}return!0}function TE(e,t){if(!Rn(e))return!1;if(t){const n=Un(e);t(Z0(e.tr,n,n.bottom))}return!0}function PE(e,{map:t,table:n,tableStart:r},i){let o=0;for(let l=0;l<i;l++)o+=n.child(l).nodeSize;const s=o+n.child(i).nodeSize,a=e.mapping.maps.length;e.delete(o+r,s+r);for(let l=0,c=i*t.width;l<t.width;l++,c++){const u=t.map[c];if(i>0&&u==t.map[c-t.width]){const f=n.nodeAt(u).attrs;e.setNodeMarkup(e.mapping.slice(a).map(u+r),null,Me(J({},f),{rowspan:f.rowspan-1})),l+=f.colspan-1}else if(i<t.width&&u==t.map[c+t.width]){const f=n.nodeAt(u),h=f.attrs,p=f.type.create(Me(J({},h),{rowspan:f.attrs.rowspan-1}),f.content),g=t.positionAt(i+1,l,n);e.insert(e.mapping.slice(a).map(r+g),p),l+=h.colspan-1}}}function RE(e,t){if(!Rn(e))return!1;if(t){const n=Un(e),r=e.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let i=n.bottom-1;PE(r,n,i),i!=n.top;i--){const o=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!o)throw RangeError("No table found");n.table=o,n.map=ot.get(n.table)}t(r)}return!0}function ey(e){const t=e.content;return t.childCount==1&&t.child(0).isTextblock&&t.child(0).childCount==0}function jE({width:e,height:t,map:n},r){let i=r.top*e+r.left,o=i,s=(r.bottom-1)*e+r.left,a=i+(r.right-r.left-1);for(let l=r.top;l<r.bottom;l++){if(r.left>0&&n[o]==n[o-1]||r.right<e&&n[a]==n[a+1])return!0;o+=e,a+=e}for(let l=r.left;l<r.right;l++){if(r.top>0&&n[i]==n[i-e]||r.bottom<t&&n[s]==n[s+e])return!0;i++,s++}return!1}function ty(e,t){const n=e.selection;if(!(n instanceof De)||n.$anchorCell.pos==n.$headCell.pos)return!1;const r=Un(e),{map:i}=r;if(jE(i,r))return!1;if(t){const o=e.tr,s={};let a=K.empty,l,c;for(let u=r.top;u<r.bottom;u++)for(let f=r.left;f<r.right;f++){const h=i.map[u*i.width+f],p=r.table.nodeAt(h);if(!(s[h]||!p))if(s[h]=!0,l==null)l=h,c=p;else{ey(p)||(a=a.append(p.content));const g=o.mapping.map(h+r.tableStart);o.delete(g,g+p.nodeSize)}}if(l==null||c==null)return!0;if(o.setNodeMarkup(l+r.tableStart,null,Me(J({},H0(c.attrs,c.attrs.colspan,r.right-r.left-c.attrs.colspan)),{rowspan:r.bottom-r.top})),a.size){const u=l+1+c.content.size,f=ey(c)?l+1:u;o.replaceWith(f+r.tableStart,u+r.tableStart,a)}o.setSelection(new De(o.doc.resolve(l+r.tableStart))),t(o)}return!0}function ny(e,t){const n=Nt(e.schema);return NE(({node:r})=>n[r.type.spec.tableRole])(e,t)}function NE(e){return(t,n)=>{var r;const i=t.selection;let o,s;if(i instanceof De){if(i.$anchorCell.pos!=i.$headCell.pos)return!1;o=i.$anchorCell.nodeAfter,s=i.$anchorCell.pos}else{if(o=GA(i.$from),!o)return!1;s=(r=go(i.$from))==null?void 0:r.pos}if(o==null||s==null||o.attrs.colspan==1&&o.attrs.rowspan==1)return!1;if(n){let a=o.attrs;const l=[],c=a.colwidth;a.rowspan>1&&(a=Me(J({},a),{rowspan:1})),a.colspan>1&&(a=Me(J({},a),{colspan:1}));const u=Un(t),f=t.tr;for(let p=0;p<u.right-u.left;p++)l.push(c?Me(J({},a),{colwidth:c&&c[p]?[c[p]]:null}):a);let h;for(let p=u.top;p<u.bottom;p++){let g=u.map.positionAt(p,u.left,u.table);p==u.top&&(g+=o.nodeSize);for(let v=u.left,b=0;v<u.right;v++,b++)v==u.left&&p==u.top||f.insert(h=f.mapping.map(g+u.tableStart,1),e({node:o,row:p,col:v}).createAndFill(l[b]))}f.setNodeMarkup(s,e({node:o,row:u.top,col:u.left}),l[0]),i instanceof De&&f.setSelection(new De(f.doc.resolve(i.$anchorCell.pos),h?f.doc.resolve(h):void 0)),n(f)}return!0}}function LE(e,t){return function(n,r){if(!Rn(n))return!1;const i=dl(n);if(i.nodeAfter.attrs[e]===t)return!1;if(r){const o=n.tr;n.selection instanceof De?n.selection.forEachCell((s,a)=>{s.attrs[e]!==t&&o.setNodeMarkup(a,null,Me(J({},s.attrs),{[e]:t}))}):o.setNodeMarkup(i.pos,null,Me(J({},i.nodeAfter.attrs),{[e]:t})),r(o)}return!0}}function DE(e){return function(t,n){if(!Rn(t))return!1;if(n){const r=Nt(t.schema),i=Un(t),o=t.tr,s=i.map.cellsInRect(e=="column"?{left:i.left,top:0,right:i.right,bottom:i.map.height}:e=="row"?{left:0,top:i.top,right:i.map.width,bottom:i.bottom}:i),a=s.map(l=>i.table.nodeAt(l));for(let l=0;l<s.length;l++)a[l].type==r.header_cell&&o.setNodeMarkup(i.tableStart+s[l],r.cell,a[l].attrs);if(o.steps.length==0)for(let l=0;l<s.length;l++)o.setNodeMarkup(i.tableStart+s[l],r.header_cell,a[l].attrs);n(o)}return!0}}function ry(e,t,n){const r=t.map.cellsInRect({left:0,top:0,right:e=="row"?t.map.width:1,bottom:e=="column"?t.map.height:1});for(let i=0;i<r.length;i++){const o=t.table.nodeAt(r[i]);if(o&&o.type!==n.header_cell)return!1}return!0}function Rs(e,t){return t=t||{useDeprecatedLogic:!1},t.useDeprecatedLogic?DE(e):function(n,r){if(!Rn(n))return!1;if(r){const i=Nt(n.schema),o=Un(n),s=n.tr,a=ry("row",o,i),l=ry("column",o,i),u=(e==="column"?a:e==="row"?l:!1)?1:0,f=e=="column"?{left:0,top:u,right:1,bottom:o.map.height}:e=="row"?{left:u,top:0,right:o.map.width,bottom:1}:o,h=e=="column"?l?i.cell:i.header_cell:e=="row"?a?i.cell:i.header_cell:i.cell;o.map.cellsInRect(f).forEach(p=>{const g=p+o.tableStart,v=s.doc.nodeAt(g);v&&s.setNodeMarkup(g,h,v.attrs)}),r(s)}return!0}}Rs("row",{useDeprecatedLogic:!0});Rs("column",{useDeprecatedLogic:!0});var IE=Rs("cell",{useDeprecatedLogic:!0});function $E(e,t){if(t<0){const n=e.nodeBefore;if(n)return e.pos-n.nodeSize;for(let r=e.index(-1)-1,i=e.before();r>=0;r--){const o=e.node(-1).child(r),s=o.lastChild;if(s)return i-1-s.nodeSize;i-=o.nodeSize}}else{if(e.index()<e.parent.childCount-1)return e.pos+e.nodeAfter.nodeSize;const n=e.node(-1);for(let r=e.indexAfter(-1),i=e.after();r<n.childCount;r++){const o=n.child(r);if(o.childCount)return i+1;i+=o.nodeSize}}return null}function iy(e){return function(t,n){if(!Rn(t))return!1;const r=$E(dl(t),e);if(r==null)return!1;if(n){const i=t.doc.resolve(r);n(t.tr.setSelection(ke.between(i,XA(i))).scrollIntoView())}return!0}}function BE(e,t){const n=e.selection.$anchor;for(let r=n.depth;r>0;r--)if(n.node(r).type.spec.tableRole=="table")return t&&t(e.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}function HE({allowTableNodeSelection:e=!1}={}){return new gt({key:Pr,state:{init(){return null},apply(t,n){const r=t.getMeta(Pr);if(r!=null)return r==-1?null:r;if(n==null||!t.docChanged)return n;const{deleted:i,pos:o}=t.mapping.mapResult(n);return i?null:o}},props:{decorations:ZA,handleDOMEvents:{mousedown:fE},createSelectionBetween(t){return Pr.getState(t.state)!=null?t.state.selection:null},handleTripleClick:uE,handleKeyDown:cE,handlePaste:dE},appendTransaction(t,n,r){return nE(r,V0(r,n),e)}})}function oy(e,t,n,r,i,o){let s=0,a=!0,l=t.firstChild;const c=e.firstChild;for(let u=0,f=0;u<c.childCount;u+=1){const{colspan:h,colwidth:p}=c.child(u).attrs;for(let g=0;g<h;g+=1,f+=1){const v=i===f?o:p&&p[g],b=v?`${v}px`:"";s+=v||r,v||(a=!1),l?(l.style.width!==b&&(l.style.width=b),l=l.nextSibling):t.appendChild(document.createElement("col")).style.width=b}}for(;l;){const u=l.nextSibling;l.parentNode.removeChild(l),l=u}a?(n.style.width=`${s}px`,n.style.minWidth=""):(n.style.width="",n.style.minWidth=`${s}px`)}class zE{constructor(t,n){this.node=t,this.cellMinWidth=n,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")),oy(t,this.colgroup,this.table,n),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(t){return t.type!==this.node.type?!1:(this.node=t,oy(t,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(t){return t.type==="attributes"&&(t.target===this.table||this.colgroup.contains(t.target))}}function sy(e,t){return t?e.createChecked(null,t):e.createAndFill()}function FE(e){if(e.cached.tableNodeTypes)return e.cached.tableNodeTypes;const t={};return Object.keys(e.nodes).forEach(n=>{const r=e.nodes[n];r.spec.tableRole&&(t[r.spec.tableRole]=r)}),e.cached.tableNodeTypes=t,t}function VE(e,t,n,r,i){const o=FE(e),s=[],a=[];for(let c=0;c<n;c+=1){const u=sy(o.cell,i);if(u&&a.push(u),r){const f=sy(o.header_cell,i);f&&s.push(f)}}const l=[];for(let c=0;c<t;c+=1)l.push(o.row.createChecked(null,r&&c===0?s:a));return o.table.createChecked(null,l)}function WE(e){return e instanceof De}const yl=({editor:e})=>{const{selection:t}=e.state;if(!WE(t))return!1;let n=0;const r=B1(t.ranges[0].$from,o=>o.type.name==="table");return r==null||r.node.descendants(o=>{if(o.type.name==="table")return!1;["tableCell","tableHeader"].includes(o.type.name)&&(n+=1)}),n===t.ranges.length?(e.commands.deleteTable(),!0):!1},KP=et.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,handleWidth:5,cellMinWidth:25,View:zE,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML(){return[{tag:"table"}]},renderHTML({HTMLAttributes:e}){return["table",Ue(this.options.HTMLAttributes,e),["tbody",0]]},addCommands(){return{insertTable:({rows:e=3,cols:t=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:i,editor:o})=>{const s=VE(o.schema,e,t,n);if(i){const a=r.selection.anchor+1;r.replaceSelectionWith(s).scrollIntoView().setSelection(ke.near(r.doc.resolve(a)))}return!0},addColumnBefore:()=>({state:e,dispatch:t})=>CE(e,t),addColumnAfter:()=>({state:e,dispatch:t})=>_E(e,t),deleteColumn:()=>({state:e,dispatch:t})=>AE(e,t),addRowBefore:()=>({state:e,dispatch:t})=>OE(e,t),addRowAfter:()=>({state:e,dispatch:t})=>TE(e,t),deleteRow:()=>({state:e,dispatch:t})=>RE(e,t),deleteTable:()=>({state:e,dispatch:t})=>BE(e,t),mergeCells:()=>({state:e,dispatch:t})=>ty(e,t),splitCell:()=>({state:e,dispatch:t})=>ny(e,t),toggleHeaderColumn:()=>({state:e,dispatch:t})=>Rs("column")(e,t),toggleHeaderRow:()=>({state:e,dispatch:t})=>Rs("row")(e,t),toggleHeaderCell:()=>({state:e,dispatch:t})=>IE(e,t),mergeOrSplit:()=>({state:e,dispatch:t})=>ty(e,t)?!0:ny(e,t),setCellAttribute:(e,t)=>({state:n,dispatch:r})=>LE(e,t)(n,r),goToNextCell:()=>({state:e,dispatch:t})=>iy(1)(e,t),goToPreviousCell:()=>({state:e,dispatch:t})=>iy(-1)(e,t),fixTables:()=>({state:e,dispatch:t})=>(t&&V0(e),!0),setCellSelection:e=>({tr:t,dispatch:n})=>{if(n){const r=De.create(t.doc,e.anchorCell,e.headCell);t.setSelection(r)}return!0}}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.goToNextCell()?!0:this.editor.can().addRowAfter()?this.editor.chain().addRowAfter().goToNextCell().run():!1,"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:yl,"Mod-Backspace":yl,Delete:yl,"Mod-Delete":yl}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[pE({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],HE({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(e){const t={name:e.name,options:e.options,storage:e.storage};return{tableRole:Ze(ut(e,"tableRole",t))}}}),qP=et.create({name:"tableCell",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{const t=e.getAttribute("colwidth");return t?[parseInt(t,10)]:null}}}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td"}]},renderHTML({HTMLAttributes:e}){return["td",Ue(this.options.HTMLAttributes,e),0]}}),JP=et.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{const t=e.getAttribute("colwidth");return t?[parseInt(t,10)]:null}}}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th"}]},renderHTML({HTMLAttributes:e}){return["th",Ue(this.options.HTMLAttributes,e),0]}}),GP=et.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:e}){return["tr",Ue(this.options.HTMLAttributes,e),0]}});var ay=e=>new Promise(t=>{let n=new FileReader;n.onloadend=()=>{t(n.result)},n.readAsDataURL(e)});const UE=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/;var YP=et.create({name:"image",addOptions(){return{inline:!1,HTMLAttributes:{}}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null}}},parseHTML(){return[{tag:"img[src]"}]},renderHTML({HTMLAttributes:e}){return["img",Ue(this.options.HTMLAttributes,e)]},addCommands(){return{setImage:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e})}},addInputRules(){return[V1({find:UE,type:this.type,getAttributes:e=>{const[,,t,n,r]=e;return{src:n,alt:t,title:r}}})]},addProseMirrorPlugins(){return[KE()]}});const KE=()=>new gt({props:{handlePaste(e,t,n){var o;const r=Array.from(((o=t.clipboardData)==null?void 0:o.items)||[]),{schema:i}=e.state;return r.forEach(s=>{const a=s.getAsFile();!a||s.type.indexOf("image")===0&&(t.preventDefault(),ay(a).then(l=>{const c=i.nodes.image.create({src:l}),u=e.state.tr.replaceSelectionWith(c);e.dispatch(u)}))}),!1},handleDOMEvents:{drop:(e,t)=>{var s,a;if(!(t.dataTransfer&&t.dataTransfer.files&&t.dataTransfer.files.length))return!1;const r=Array.from((a=(s=t.dataTransfer)==null?void 0:s.files)!=null?a:[]).filter(l=>/image/i.test(l.type));if(r.length===0)return!1;t.preventDefault();const{schema:i}=e.state,o=e.posAtCoords({left:t.clientX,top:t.clientY});return o?(r.forEach(l=>Ir(void 0,null,function*(){ay(l).then(c=>{const u=i.nodes.image.create({src:c}),f=e.state.tr.insert(o.pos,u);e.dispatch(f)})})),!0):!1}}}}),XP=et.create({name:"video",group:"block",selectable:!0,draggable:!0,atom:!0,addAttributes(){return{src:{default:null}}},parseHTML(){return[{tag:"video"}]},renderHTML({HTMLAttributes:e}){return["video",Ue(e)]},addNodeView(){return({editor:e,node:t})=>{const n=document.createElement("div");n.className="relative aspect-w-16 aspect-h-9"+(e.isEditable?" cursor-pointer":"");const r=document.createElement("video");if(e.isEditable&&(r.className="pointer-events-none"),r.src=t.attrs.src,!e.isEditable)r.setAttribute("controls","");else{let i=document.createElement("div");i.className="absolute top-0 right-0 text-xs m-2 bg-gray-800 text-white px-2 py-1 rounded-md",i.innerHTML="Video",n.append(i)}return n.append(r),{dom:n}}}}),qE="aaa1rp3barth4b0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0faromeo7ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4vianca6w0s2x0a2z0ure5ba0by2idu3namex3narepublic11d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re2s2c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y0eats7k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0cast4mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking0channel11l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dabur3d1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t0isalat7u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0at2delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d0network8tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntdoor4ier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0ardian6cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5gtv3iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0eles2s3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1nder2le4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster5ia3d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4de2k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0cys3drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7serati6ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic3tual5v1w1x1y1z2na0b1goya4me2tura4vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rthwesternmutual14on4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9dnavy5lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3ssagens7y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cher3ks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0a1b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp2w2ell3ia1ksha5oes2p0ping5uji3w0time7i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ffany5ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0channel7ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5m\xF6gensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lkswagen7vo3te1ing3o2yage5u0elos6wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4finity6ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",JE="\u03B5\u03BB1\u03C52\u0431\u04331\u0435\u043B3\u0434\u0435\u0442\u04384\u0435\u044E2\u043A\u0430\u0442\u043E\u043B\u0438\u043A6\u043E\u043C3\u043C\u043A\u04342\u043E\u043D1\u0441\u043A\u0432\u04306\u043E\u043D\u043B\u0430\u0439\u043D5\u0440\u04333\u0440\u0443\u04412\u04442\u0441\u0430\u0439\u04423\u0440\u04313\u0443\u043A\u04403\u049B\u0430\u04373\u0570\u0561\u05753\u05D9\u05E9\u05E8\u05D0\u05DC5\u05E7\u05D5\u05DD3\u0627\u0628\u0648\u0638\u0628\u064A5\u062A\u0635\u0627\u0644\u0627\u062A6\u0631\u0627\u0645\u0643\u06485\u0644\u0627\u0631\u062F\u06464\u0628\u062D\u0631\u064A\u06465\u062C\u0632\u0627\u0626\u06315\u0633\u0639\u0648\u062F\u064A\u06296\u0639\u0644\u064A\u0627\u06465\u0645\u063A\u0631\u06285\u0645\u0627\u0631\u0627\u062A5\u06CC\u0631\u0627\u06465\u0628\u0627\u0631\u062A2\u0632\u0627\u06314\u064A\u062A\u06433\u06BE\u0627\u0631\u062A5\u062A\u0648\u0646\u06334\u0633\u0648\u062F\u0627\u06463\u0631\u064A\u06295\u0634\u0628\u0643\u06294\u0639\u0631\u0627\u06422\u06282\u0645\u0627\u06464\u0641\u0644\u0633\u0637\u064A\u06466\u0642\u0637\u06313\u0643\u0627\u062B\u0648\u0644\u064A\u06436\u0648\u06453\u0645\u0635\u06312\u0644\u064A\u0633\u064A\u06275\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u06277\u0642\u06394\u0647\u0645\u0631\u0627\u06475\u067E\u0627\u06A9\u0633\u062A\u0627\u06467\u0680\u0627\u0631\u062A4\u0915\u0949\u092E3\u0928\u0947\u091F3\u092D\u093E\u0930\u09240\u092E\u094D3\u094B\u09245\u0938\u0902\u0917\u0920\u09285\u09AC\u09BE\u0982\u09B2\u09BE5\u09AD\u09BE\u09B0\u09A42\u09F0\u09A44\u0A2D\u0A3E\u0A30\u0A244\u0AAD\u0ABE\u0AB0\u0AA44\u0B2D\u0B3E\u0B30\u0B244\u0B87\u0BA8\u0BCD\u0BA4\u0BBF\u0BAF\u0BBE6\u0BB2\u0B99\u0BCD\u0B95\u0BC86\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD11\u0C2D\u0C3E\u0C30\u0C24\u0C4D5\u0CAD\u0CBE\u0CB0\u0CA44\u0D2D\u0D3E\u0D30\u0D24\u0D025\u0DBD\u0D82\u0D9A\u0DCF4\u0E04\u0E2D\u0E213\u0E44\u0E17\u0E223\u0EA5\u0EB2\u0EA73\u10D2\u10D42\u307F\u3093\u306A3\u30A2\u30DE\u30BE\u30F34\u30AF\u30E9\u30A6\u30C94\u30B0\u30FC\u30B0\u30EB4\u30B3\u30E02\u30B9\u30C8\u30A23\u30BB\u30FC\u30EB3\u30D5\u30A1\u30C3\u30B7\u30E7\u30F36\u30DD\u30A4\u30F3\u30C84\u4E16\u754C2\u4E2D\u4FE11\u56FD1\u570B1\u6587\u7F513\u4E9A\u9A6C\u900A3\u4F01\u4E1A2\u4F5B\u5C712\u4FE1\u606F2\u5065\u5EB72\u516B\u53662\u516C\u53F81\u76CA2\u53F0\u6E7E1\u70632\u5546\u57CE1\u5E971\u68072\u5609\u91CC0\u5927\u9152\u5E975\u5728\u7EBF2\u5927\u62FF2\u5929\u4E3B\u65593\u5A31\u4E502\u5BB6\u96FB2\u5E7F\u4E1C2\u5FAE\u535A2\u6148\u55842\u6211\u7231\u4F603\u624B\u673A2\u62DB\u80582\u653F\u52A11\u5E9C2\u65B0\u52A0\u57612\u95FB2\u65F6\u5C1A2\u66F8\u7C4D2\u673A\u67842\u6DE1\u9A6C\u95213\u6E38\u620F2\u6FB3\u95802\u70B9\u770B2\u79FB\u52A82\u7EC4\u7EC7\u673A\u67844\u7F51\u57401\u5E971\u7AD91\u7EDC2\u8054\u901A2\u8C37\u6B4C2\u8D2D\u72692\u901A\u8CA92\u96C6\u56E22\u96FB\u8A0A\u76C8\u79D14\u98DE\u5229\u6D663\u98DF\u54C12\u9910\u53852\u9999\u683C\u91CC\u62C93\u6E2F2\uB2F7\uB1371\uCEF42\uC0BC\uC1312\uD55C\uAD6D2",yo=(e,t)=>{for(const n in t)e[n]=t[n];return e},Qd="numeric",Zd="ascii",ef="alpha",vl="asciinumeric",bl="alphanumeric",tf="domain",ly="emoji",GE="scheme",YE="slashscheme",cy="whitespace";function XE(e,t){return e in t||(t[e]=[]),t[e]}function xi(e,t,n){t[Qd]&&(t[vl]=!0,t[bl]=!0),t[Zd]&&(t[vl]=!0,t[ef]=!0),t[vl]&&(t[bl]=!0),t[ef]&&(t[bl]=!0),t[bl]&&(t[tf]=!0),t[ly]&&(t[tf]=!0);for(const r in t){const i=XE(r,n);i.indexOf(e)<0&&i.push(e)}}function QE(e,t){const n={};for(const r in t)t[r].indexOf(e)>=0&&(n[r]=!0);return n}function Gt(e){e===void 0&&(e=null),this.j={},this.jr=[],this.jd=null,this.t=e}Gt.groups={};Gt.prototype={accepts(){return!!this.t},go(e){const t=this,n=t.j[e];if(n)return n;for(let r=0;r<t.jr.length;r++){const i=t.jr[r][0],o=t.jr[r][1];if(o&&i.test(e))return o}return t.jd},has(e,t){return t===void 0&&(t=!1),t?e in this.j:!!this.go(e)},ta(e,t,n,r){for(let i=0;i<e.length;i++)this.tt(e[i],t,n,r)},tr(e,t,n,r){r=r||Gt.groups;let i;return t&&t.j?i=t:(i=new Gt(t),n&&r&&xi(t,n,r)),this.jr.push([e,i]),i},ts(e,t,n,r){let i=this;const o=e.length;if(!o)return i;for(let s=0;s<o-1;s++)i=i.tt(e[s]);return i.tt(e[o-1],t,n,r)},tt(e,t,n,r){r=r||Gt.groups;const i=this;if(t&&t.j)return i.j[e]=t,t;const o=t;let s,a=i.go(e);if(a?(s=new Gt,yo(s.j,a.j),s.jr.push.apply(s.jr,a.jr),s.jd=a.jd,s.t=a.t):s=new Gt,o){if(r)if(s.t&&typeof s.t=="string"){const l=yo(QE(s.t,r),n);xi(o,l,r)}else n&&xi(o,n,r);s.t=o}return i.j[e]=s,s}};const me=(e,t,n,r,i)=>e.ta(t,n,r,i),xn=(e,t,n,r,i)=>e.tr(t,n,r,i),uy=(e,t,n,r,i)=>e.ts(t,n,r,i),Z=(e,t,n,r,i)=>e.tt(t,n,r,i),ir="WORD",nf="UWORD",js="LOCALHOST",rf="TLD",of="UTLD",wl="SCHEME",vo="SLASH_SCHEME",sf="NUM",dy="WS",af="NL",bo="OPENBRACE",Ns="OPENBRACKET",Ls="OPENANGLEBRACKET",Ds="OPENPAREN",ki="CLOSEBRACE",wo="CLOSEBRACKET",xo="CLOSEANGLEBRACKET",Si="CLOSEPAREN",xl="AMPERSAND",kl="APOSTROPHE",Sl="ASTERISK",Rr="AT",Cl="BACKSLASH",_l="BACKTICK",Ml="CARET",jr="COLON",lf="COMMA",Al="DOLLAR",Kn="DOT",El="EQUALS",cf="EXCLAMATION",qn="HYPHEN",Ol="PERCENT",Tl="PIPE",Pl="PLUS",Rl="POUND",jl="QUERY",uf="QUOTE",df="SEMI",Jn="SLASH",Is="TILDE",Nl="UNDERSCORE",fy="EMOJI",Ll="SYM";var hy=Object.freeze({__proto__:null,WORD:ir,UWORD:nf,LOCALHOST:js,TLD:rf,UTLD:of,SCHEME:wl,SLASH_SCHEME:vo,NUM:sf,WS:dy,NL:af,OPENBRACE:bo,OPENBRACKET:Ns,OPENANGLEBRACKET:Ls,OPENPAREN:Ds,CLOSEBRACE:ki,CLOSEBRACKET:wo,CLOSEANGLEBRACKET:xo,CLOSEPAREN:Si,AMPERSAND:xl,APOSTROPHE:kl,ASTERISK:Sl,AT:Rr,BACKSLASH:Cl,BACKTICK:_l,CARET:Ml,COLON:jr,COMMA:lf,DOLLAR:Al,DOT:Kn,EQUALS:El,EXCLAMATION:cf,HYPHEN:qn,PERCENT:Ol,PIPE:Tl,PLUS:Pl,POUND:Rl,QUERY:jl,QUOTE:uf,SEMI:df,SLASH:Jn,TILDE:Is,UNDERSCORE:Nl,EMOJI:fy,SYM:Ll});const ko=/[a-z]/,ff=/\p{L}/u,hf=/\p{Emoji}/u,pf=/\d/,py=/\s/,my=`
`,ZE="\uFE0F",e4="\u200D";let Dl=null,Il=null;function t4(e){e===void 0&&(e=[]);const t={};Gt.groups=t;const n=new Gt;Dl==null&&(Dl=gy(qE)),Il==null&&(Il=gy(JE)),Z(n,"'",kl),Z(n,"{",bo),Z(n,"[",Ns),Z(n,"<",Ls),Z(n,"(",Ds),Z(n,"}",ki),Z(n,"]",wo),Z(n,">",xo),Z(n,")",Si),Z(n,"&",xl),Z(n,"*",Sl),Z(n,"@",Rr),Z(n,"`",_l),Z(n,"^",Ml),Z(n,":",jr),Z(n,",",lf),Z(n,"$",Al),Z(n,".",Kn),Z(n,"=",El),Z(n,"!",cf),Z(n,"-",qn),Z(n,"%",Ol),Z(n,"|",Tl),Z(n,"+",Pl),Z(n,"#",Rl),Z(n,"?",jl),Z(n,'"',uf),Z(n,"/",Jn),Z(n,";",df),Z(n,"~",Is),Z(n,"_",Nl),Z(n,"\\",Cl);const r=xn(n,pf,sf,{[Qd]:!0});xn(r,pf,r);const i=xn(n,ko,ir,{[Zd]:!0});xn(i,ko,i);const o=xn(n,ff,nf,{[ef]:!0});xn(o,ko),xn(o,ff,o);const s=xn(n,py,dy,{[cy]:!0});Z(n,my,af,{[cy]:!0}),Z(s,my),xn(s,py,s);const a=xn(n,hf,fy,{[ly]:!0});xn(a,hf,a),Z(a,ZE,a);const l=Z(a,e4);xn(l,hf,a);const c=[[ko,i]],u=[[ko,null],[ff,o]];for(let f=0;f<Dl.length;f++)Nr(n,Dl[f],rf,ir,c);for(let f=0;f<Il.length;f++)Nr(n,Il[f],of,nf,u);xi(rf,{tld:!0,ascii:!0},t),xi(of,{utld:!0,alpha:!0},t),Nr(n,"file",wl,ir,c),Nr(n,"mailto",wl,ir,c),Nr(n,"http",vo,ir,c),Nr(n,"https",vo,ir,c),Nr(n,"ftp",vo,ir,c),Nr(n,"ftps",vo,ir,c),xi(wl,{scheme:!0,ascii:!0},t),xi(vo,{slashscheme:!0,ascii:!0},t),e=e.sort((f,h)=>f[0]>h[0]?1:-1);for(let f=0;f<e.length;f++){const h=e[f][0],g=e[f][1]?{[GE]:!0}:{[YE]:!0};h.indexOf("-")>=0?g[tf]=!0:ko.test(h)?pf.test(h)?g[vl]=!0:g[Zd]=!0:g[Qd]=!0,uy(n,h,h,g)}return uy(n,"localhost",js,{ascii:!0}),n.jd=new Gt(Ll),{start:n,tokens:yo({groups:t},hy)}}function n4(e,t){const n=r4(t.replace(/[A-Z]/g,a=>a.toLowerCase())),r=n.length,i=[];let o=0,s=0;for(;s<r;){let a=e,l=null,c=0,u=null,f=-1,h=-1;for(;s<r&&(l=a.go(n[s]));)a=l,a.accepts()?(f=0,h=0,u=a):f>=0&&(f+=n[s].length,h++),c+=n[s].length,o+=n[s].length,s++;o-=f,s-=h,c-=f,i.push({t:u.t,v:t.slice(o-c,o),s:o-c,e:o})}return i}function r4(e){const t=[],n=e.length;let r=0;for(;r<n;){let i=e.charCodeAt(r),o,s=i<55296||i>56319||r+1===n||(o=e.charCodeAt(r+1))<56320||o>57343?e[r]:e.slice(r,r+2);t.push(s),r+=s.length}return t}function Nr(e,t,n,r,i){let o;const s=t.length;for(let a=0;a<s-1;a++){const l=t[a];e.j[l]?o=e.j[l]:(o=new Gt(r),o.jr=i.slice(),e.j[l]=o),e=o}return o=new Gt(n),o.jr=i.slice(),e.j[t[s-1]]=o,o}function gy(e){const t=[],n=[];let r=0,i="0123456789";for(;r<e.length;){let o=0;for(;i.indexOf(e[r+o])>=0;)o++;if(o>0){t.push(n.join(""));for(let s=parseInt(e.substring(r,r+o),10);s>0;s--)n.pop();r+=o}else n.push(e[r]),r++}return t}const $s={defaultProtocol:"http",events:null,format:yy,formatHref:yy,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function mf(e,t){t===void 0&&(t=null);let n=yo({},$s);e&&(n=yo(n,e instanceof mf?e.o:e));const r=n.ignoreTags,i=[];for(let o=0;o<r.length;o++)i.push(r[o].toUpperCase());this.o=n,t&&(this.defaultRender=t),this.ignoreTags=i}mf.prototype={o:$s,ignoreTags:[],defaultRender(e){return e},check(e){return this.get("validate",e.toString(),e)},get(e,t,n){const r=t!=null;let i=this.o[e];return i&&(typeof i=="object"?(i=n.t in i?i[n.t]:$s[e],typeof i=="function"&&r&&(i=i(t,n))):typeof i=="function"&&r&&(i=i(t,n.t,n)),i)},getObj(e,t,n){let r=this.o[e];return typeof r=="function"&&t!=null&&(r=r(t,n.t,n)),r},render(e){const t=e.render(this);return(this.get("render",null,e)||this.defaultRender)(t,e.t,e)}};function yy(e){return e}function vy(e,t){this.t="token",this.v=e,this.tk=t}vy.prototype={isLink:!1,toString(){return this.v},toHref(e){return this.toString()},toFormattedString(e){const t=this.toString(),n=e.get("truncate",t,this),r=e.get("format",t,this);return n&&r.length>n?r.substring(0,n)+"\u2026":r},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e){return e===void 0&&(e=$s.defaultProtocol),{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){const t=this,n=this.toHref(e.get("defaultProtocol")),r=e.get("formatHref",n,this),i=e.get("tagName",n,t),o=this.toFormattedString(e),s={},a=e.get("className",n,t),l=e.get("target",n,t),c=e.get("rel",n,t),u=e.getObj("attributes",n,t),f=e.getObj("events",n,t);return s.href=r,a&&(s.class=a),l&&(s.target=l),c&&(s.rel=c),u&&yo(s,u),{tagName:i,attributes:s,content:o,eventListeners:f}}};function $l(e,t){class n extends vy{constructor(i,o){super(i,o);this.t=e}}for(const r in t)n.prototype[r]=t[r];return n.t=e,n}const by=$l("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),wy=$l("text"),i4=$l("nl"),Ci=$l("url",{isLink:!0,toHref(e){return e===void 0&&(e=$s.defaultProtocol),this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){const e=this.tk;return e.length>=2&&e[0].t!==js&&e[1].t===jr}}),Mt=e=>new Gt(e);function o4(e){let{groups:t}=e;const n=t.domain.concat([xl,Sl,Rr,Cl,_l,Ml,Al,El,qn,sf,Ol,Tl,Pl,Rl,Jn,Ll,Is,Nl]),r=[kl,xo,ki,wo,Si,jr,lf,Kn,cf,Ls,bo,Ns,Ds,jl,uf,df],i=[xl,kl,Sl,Cl,_l,Ml,ki,Al,El,qn,bo,Ol,Tl,Pl,Rl,jl,Jn,Ll,Is,Nl],o=Mt(),s=Z(o,Is);me(s,i,s),me(s,t.domain,s);const a=Mt(),l=Mt(),c=Mt();me(o,t.domain,a),me(o,t.scheme,l),me(o,t.slashscheme,c),me(a,i,s),me(a,t.domain,a);const u=Z(a,Rr);Z(s,Rr,u),Z(l,Rr,u),Z(c,Rr,u);const f=Z(s,Kn);me(f,i,s),me(f,t.domain,s);const h=Mt();me(u,t.domain,h),me(h,t.domain,h);const p=Z(h,Kn);me(p,t.domain,h);const g=Mt(by);me(p,t.tld,g),me(p,t.utld,g),Z(u,js,g);const v=Z(h,qn);me(v,t.domain,h),me(g,t.domain,h),Z(g,Kn,p),Z(g,qn,v);const b=Z(g,jr);me(b,t.numeric,by);const w=Z(a,qn),k=Z(a,Kn);me(w,t.domain,a),me(k,i,s),me(k,t.domain,a);const A=Mt(Ci);me(k,t.tld,A),me(k,t.utld,A),me(A,t.domain,a),me(A,i,s),Z(A,Kn,k),Z(A,qn,w),Z(A,Rr,u);const d=Z(A,jr),y=Mt(Ci);me(d,t.numeric,y);const m=Mt(Ci),x=Mt();me(m,n,m),me(m,r,x),me(x,n,m),me(x,r,x),Z(A,Jn,m),Z(y,Jn,m);const S=Z(l,jr),_=Z(c,jr),C=Z(_,Jn),E=Z(C,Jn);me(l,t.domain,a),Z(l,Kn,k),Z(l,qn,w),me(c,t.domain,a),Z(c,Kn,k),Z(c,qn,w),me(S,t.domain,m),Z(S,Jn,m),me(E,t.domain,m),me(E,n,m),Z(E,Jn,m);const T=Z(m,bo),R=Z(m,Ns),N=Z(m,Ls),D=Z(m,Ds);Z(x,bo,T),Z(x,Ns,R),Z(x,Ls,N),Z(x,Ds,D),Z(T,ki,m),Z(R,wo,m),Z(N,xo,m),Z(D,Si,m),Z(T,ki,m);const M=Mt(Ci),P=Mt(Ci),L=Mt(Ci),H=Mt(Ci);me(T,n,M),me(R,n,P),me(N,n,L),me(D,n,H);const te=Mt(),q=Mt(),ae=Mt(),ge=Mt();return me(T,r),me(R,r),me(N,r),me(D,r),me(M,n,M),me(P,n,P),me(L,n,L),me(H,n,H),me(M,r,M),me(P,r,P),me(L,r,L),me(H,r,H),me(te,n,te),me(q,n,P),me(ae,n,L),me(ge,n,H),me(te,r,te),me(q,r,q),me(ae,r,ae),me(ge,r,ge),Z(P,wo,m),Z(L,xo,m),Z(H,Si,m),Z(M,ki,m),Z(q,wo,m),Z(ae,xo,m),Z(ge,Si,m),Z(te,Si,m),Z(o,js,A),Z(o,af,i4),{start:o,tokens:hy}}function s4(e,t,n){let r=n.length,i=0,o=[],s=[];for(;i<r;){let a=e,l=null,c=null,u=0,f=null,h=-1;for(;i<r&&!(l=a.go(n[i].t));)s.push(n[i++]);for(;i<r&&(c=l||a.go(n[i].t));)l=null,a=c,a.accepts()?(h=0,f=a):h>=0&&h++,i++,u++;if(h<0)i-=u,i<r&&(s.push(n[i]),i++);else{s.length>0&&(o.push(gf(wy,t,s)),s=[]),i-=h,u-=h;const p=f.t,g=n.slice(i-u,i);o.push(gf(p,t,g))}}return s.length>0&&o.push(gf(wy,t,s)),o}function gf(e,t,n){const r=n[0].s,i=n[n.length-1].e,o=t.slice(r,i);return new e(o,n)}const a4=typeof console!="undefined"&&console&&console.warn||(()=>{}),l4="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",tt={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function c4(){Gt.groups={},tt.scanner=null,tt.parser=null,tt.tokenQueue=[],tt.pluginQueue=[],tt.customSchemes=[],tt.initialized=!1}function xy(e,t){if(t===void 0&&(t=!1),tt.initialized&&a4(`linkifyjs: already initialized - will not register custom scheme "${e}" ${l4}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))throw new Error(`linkifyjs: incorrect scheme format.
1. Must only contain digits, lowercase ASCII letters or "-"
2. Cannot start or end with "-"
3. "-" cannot repeat`);tt.customSchemes.push([e,t])}function u4(){tt.scanner=t4(tt.customSchemes);for(let e=0;e<tt.tokenQueue.length;e++)tt.tokenQueue[e][1]({scanner:tt.scanner});tt.parser=o4(tt.scanner.tokens);for(let e=0;e<tt.pluginQueue.length;e++)tt.pluginQueue[e][1]({scanner:tt.scanner,parser:tt.parser});tt.initialized=!0}function d4(e){return tt.initialized||u4(),s4(tt.parser.start,e,n4(tt.scanner.start,e))}function yf(e,t,n){if(t===void 0&&(t=null),n===void 0&&(n=null),t&&typeof t=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${t}; must be a string`);n=t,t=null}const r=new mf(n),i=d4(e),o=[];for(let s=0;s<i.length;s++){const a=i[s];a.isLink&&(!t||a.t===t)&&o.push(a.toFormattedObject(r))}return o}function f4(e){return new gt({key:new yt("autolink"),appendTransaction:(t,n,r)=>{const i=t.some(c=>c.docChanged)&&!n.doc.eq(r.doc),o=t.some(c=>c.getMeta("preventAutolink"));if(!i||o)return;const{tr:s}=r,a=BC(n.doc,[...t]);if(KC(a).forEach(({newRange:c})=>{const u=zC(r.doc,c,p=>p.isTextblock);let f,h;if(u.length>1?(f=u[0],h=r.doc.textBetween(f.pos,f.pos+f.node.nodeSize,void 0," ")):u.length&&r.doc.textBetween(c.from,c.to," "," ").endsWith(" ")&&(f=u[0],h=r.doc.textBetween(f.pos,c.to,void 0," ")),f&&h){const p=h.split(" ").filter(b=>b!=="");if(p.length<=0)return!1;const g=p[p.length-1],v=f.pos+h.lastIndexOf(g);if(!g)return!1;yf(g).filter(b=>b.isLink).map(b=>Me(J({},b),{from:v+b.start+1,to:v+b.end+1})).filter(b=>r.schema.marks.code?!r.doc.rangeHasMark(b.from,b.to,r.schema.marks.code):!0).filter(b=>e.validate?e.validate(b.value):!0).forEach(b=>{kd(b.from,b.to,r.doc).some(w=>w.mark.type===e.type)||s.addMark(b.from,b.to,e.type.create({href:b.href}))})}}),!!s.steps.length)return s}})}function h4(e){return new gt({key:new yt("handleClickLink"),props:{handleClick:(t,n,r)=>{var i,o;if(r.button!==0||r.target.nodeName!=="A")return!1;const a=VC(t.state,e.type.name),l=r.target,c=(i=l==null?void 0:l.href)!==null&&i!==void 0?i:a.href,u=(o=l==null?void 0:l.target)!==null&&o!==void 0?o:a.target;return l&&c?(t.editable&&window.open(c,u),!0):!1}}})}function p4(e){return new gt({key:new yt("handlePasteLink"),props:{handlePaste:(t,n,r)=>{var i,o;const{state:s}=t,{selection:a}=s;if(s.doc.resolve(a.from).parent.type.spec.code)return!1;let l="";r.content.forEach(k=>{l+=k.textContent});let c=!1;if(r.content.descendants(k=>{k.marks.some(A=>A.type.name===e.type.name)&&(c=!0)}),c)return;const u=yf(l).find(k=>k.isLink&&k.value===l);if(!a.empty&&e.linkOnPaste){const k=(u==null?void 0:u.href)||null;if(k)return e.editor.commands.setMark(e.type,{href:k}),!0}const f=((i=r.content.firstChild)===null||i===void 0?void 0:i.type.name)==="text",h=(o=r.content.firstChild)===null||o===void 0?void 0:o.marks.some(k=>k.type.name===e.type.name);if(f&&h||!e.linkOnPaste)return!1;if(u&&a.empty)return e.editor.commands.insertContent(`<a href="${u.href}">${u.href}</a>`),!0;const{tr:p}=s;let g=!1;a.empty||(g=!0,p.delete(a.from,a.to));let v=a.from,b=[];r.content.forEach(k=>{b=yf(k.textContent),p.insert(v-1,k),b.length>0&&(g=!1,b.forEach(A=>{const d=v+A.start,y=v+A.end;p.doc.rangeHasMark(d,y,e.type)||p.addMark(d,y,e.type.create({href:A.href}))})),v+=k.nodeSize});const w=b.length>0;return p.docChanged&&!g&&w?(e.editor.view.dispatch(p),!0):!1}}})}const QP=gn.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate(){this.options.protocols.forEach(e=>{if(typeof e=="string"){xy(e);return}xy(e.scheme,e.optionalSlashes)})},onDestroy(){c4()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:void 0}},addAttributes(){return{href:{default:null},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:'a[href]:not([href *= "javascript:" i])'}]},renderHTML({HTMLAttributes:e}){return["a",Ue(this.options.HTMLAttributes,e),0]},addCommands(){return{setLink:e=>({chain:t})=>t().setMark(this.name,e).setMeta("preventAutolink",!0).run(),toggleLink:e=>({chain:t})=>t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addProseMirrorPlugins(){const e=[];return this.options.autolink&&e.push(f4({type:this.type,validate:this.options.validate})),this.options.openOnClick&&e.push(h4({type:this.type})),e.push(p4({editor:this.editor,type:this.type,linkOnPaste:this.options.linkOnPaste})),e}}),m4=e=>rt({find:/--$/,replace:e!=null?e:"\u2014"}),g4=e=>rt({find:/\.\.\.$/,replace:e!=null?e:"\u2026"}),y4=e=>rt({find:/(?:^|[\s{[(<'"\u2018\u201C])(")$/,replace:e!=null?e:"\u201C"}),v4=e=>rt({find:/"$/,replace:e!=null?e:"\u201D"}),b4=e=>rt({find:/(?:^|[\s{[(<'"\u2018\u201C])(')$/,replace:e!=null?e:"\u2018"}),w4=e=>rt({find:/'$/,replace:e!=null?e:"\u2019"}),x4=e=>rt({find:/<-$/,replace:e!=null?e:"\u2190"}),k4=e=>rt({find:/->$/,replace:e!=null?e:"\u2192"}),S4=e=>rt({find:/\(c\)$/,replace:e!=null?e:"\xA9"}),C4=e=>rt({find:/\(tm\)$/,replace:e!=null?e:"\u2122"}),_4=e=>rt({find:/\(sm\)$/,replace:e!=null?e:"\u2120"}),M4=e=>rt({find:/\(r\)$/,replace:e!=null?e:"\xAE"}),A4=e=>rt({find:/(?:^|\s)(1\/2)$/,replace:e!=null?e:"\xBD"}),E4=e=>rt({find:/\+\/-$/,replace:e!=null?e:"\xB1"}),O4=e=>rt({find:/!=$/,replace:e!=null?e:"\u2260"}),T4=e=>rt({find:/<<$/,replace:e!=null?e:"\xAB"}),P4=e=>rt({find:/>>$/,replace:e!=null?e:"\xBB"}),R4=e=>rt({find:/\d+\s?([*x])\s?\d+$/,replace:e!=null?e:"\xD7"}),j4=e=>rt({find:/\^2$/,replace:e!=null?e:"\xB2"}),N4=e=>rt({find:/\^3$/,replace:e!=null?e:"\xB3"}),L4=e=>rt({find:/(?:^|\s)(1\/4)$/,replace:e!=null?e:"\xBC"}),D4=e=>rt({find:/(?:^|\s)(3\/4)$/,replace:e!=null?e:"\xBE"}),ZP=vt.create({name:"typography",addInputRules(){const e=[];return this.options.emDash!==!1&&e.push(m4(this.options.emDash)),this.options.ellipsis!==!1&&e.push(g4(this.options.ellipsis)),this.options.openDoubleQuote!==!1&&e.push(y4(this.options.openDoubleQuote)),this.options.closeDoubleQuote!==!1&&e.push(v4(this.options.closeDoubleQuote)),this.options.openSingleQuote!==!1&&e.push(b4(this.options.openSingleQuote)),this.options.closeSingleQuote!==!1&&e.push(w4(this.options.closeSingleQuote)),this.options.leftArrow!==!1&&e.push(x4(this.options.leftArrow)),this.options.rightArrow!==!1&&e.push(k4(this.options.rightArrow)),this.options.copyright!==!1&&e.push(S4(this.options.copyright)),this.options.trademark!==!1&&e.push(C4(this.options.trademark)),this.options.servicemark!==!1&&e.push(_4(this.options.servicemark)),this.options.registeredTrademark!==!1&&e.push(M4(this.options.registeredTrademark)),this.options.oneHalf!==!1&&e.push(A4(this.options.oneHalf)),this.options.plusMinus!==!1&&e.push(E4(this.options.plusMinus)),this.options.notEqual!==!1&&e.push(O4(this.options.notEqual)),this.options.laquo!==!1&&e.push(T4(this.options.laquo)),this.options.raquo!==!1&&e.push(P4(this.options.raquo)),this.options.multiplication!==!1&&e.push(R4(this.options.multiplication)),this.options.superscriptTwo!==!1&&e.push(j4(this.options.superscriptTwo)),this.options.superscriptThree!==!1&&e.push(N4(this.options.superscriptThree)),this.options.oneQuarter!==!1&&e.push(L4(this.options.oneQuarter)),this.options.threeQuarters!==!1&&e.push(D4(this.options.threeQuarters)),e}}),eR=gn.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:e=>e.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["span",Ue(this.options.HTMLAttributes,e),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:e,commands:t})=>{const n=ks(e,this.type);return Object.entries(n).some(([,i])=>!!i)?!0:t.unsetMark(this.name)}}}}),I4=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))$/,$4=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))/g,tR=gn.create({name:"highlight",addOptions(){return{multicolor:!1,HTMLAttributes:{}}},addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:e=>e.getAttribute("data-color")||e.style.backgroundColor,renderHTML:e=>e.color?{"data-color":e.color,style:`background-color: ${e.color}; color: inherit`}:{}}}:{}},parseHTML(){return[{tag:"mark"}]},renderHTML({HTMLAttributes:e}){return["mark",Ue(this.options.HTMLAttributes,e),0]},addCommands(){return{setHighlight:e=>({commands:t})=>t.setMark(this.name,e),toggleHighlight:e=>({commands:t})=>t.toggleMark(this.name,e),unsetHighlight:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[mi({find:I4,type:this.type})]},addPasteRules(){return[gi({find:$4,type:this.type})]}}),nR=vt.create({name:"color",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:e=>{var t;return(t=e.style.color)===null||t===void 0?void 0:t.replace(/['"]+/g,"")},renderHTML:e=>e.color?{style:`color: ${e.color}`}:{}}}}]},addCommands(){return{setColor:e=>({chain:t})=>t().setMark("textStyle",{color:e}).run(),unsetColor:()=>({chain:e})=>e().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()}}});function B4(e){var t;const{char:n,allowSpaces:r,allowedPrefixes:i,startOfLine:o,$position:s}=e,a=m_(n),l=new RegExp(`\\s${a}$`),c=o?"^":"",u=r?new RegExp(`${c}${a}.*?(?=\\s${a}|$)`,"gm"):new RegExp(`${c}(?:^)?${a}[^\\s${a}]*`,"gm"),f=((t=s.nodeBefore)===null||t===void 0?void 0:t.isText)&&s.nodeBefore.text;if(!f)return null;const h=s.pos-f.length,p=Array.from(f.matchAll(u)).pop();if(!p||p.input===void 0||p.index===void 0)return null;const g=p.input.slice(Math.max(0,p.index-1),p.index),v=new RegExp(`^[${i==null?void 0:i.join("")}\0]?$`).test(g);if(i!==null&&!v)return null;const b=h+p.index;let w=b+p[0].length;return r&&l.test(f.slice(w-1,w+1))&&(p[0]+=" ",w+=1),b<s.pos&&w>=s.pos?{range:{from:b,to:w},query:p[0].slice(n.length),text:p[0]}:null}const H4=new yt("suggestion");function z4({pluginKey:e=H4,editor:t,char:n="@",allowSpaces:r=!1,allowedPrefixes:i=[" "],startOfLine:o=!1,decorationTag:s="span",decorationClass:a="suggestion",command:l=()=>null,items:c=()=>[],render:u=()=>({}),allow:f=()=>!0}){let h;const p=u==null?void 0:u(),g=new gt({key:e,view(){return{update:(v,b)=>Ir(this,null,function*(){var w,k,A,d,y,m,x;const S=(w=this.key)===null||w===void 0?void 0:w.getState(b),_=(k=this.key)===null||k===void 0?void 0:k.getState(v.state),C=S.active&&_.active&&S.range.from!==_.range.from,E=!S.active&&_.active,T=S.active&&!_.active,R=!E&&!T&&S.query!==_.query,N=E||C,D=R&&!C,M=T||C;if(!N&&!D&&!M)return;const P=M&&!N?S:_,L=v.dom.querySelector(`[data-decoration-id="${P.decorationId}"]`);h={editor:t,range:P.range,query:P.query,text:P.text,items:[],command:H=>{l({editor:t,range:P.range,props:H})},decorationNode:L,clientRect:L?()=>{var H;const{decorationId:te}=(H=this.key)===null||H===void 0?void 0:H.getState(t.state),q=v.dom.querySelector(`[data-decoration-id="${te}"]`);return(q==null?void 0:q.getBoundingClientRect())||null}:null},N&&((A=p==null?void 0:p.onBeforeStart)===null||A===void 0||A.call(p,h)),D&&((d=p==null?void 0:p.onBeforeUpdate)===null||d===void 0||d.call(p,h)),(D||N)&&(h.items=yield c({editor:t,query:P.query})),M&&((y=p==null?void 0:p.onExit)===null||y===void 0||y.call(p,h)),D&&((m=p==null?void 0:p.onUpdate)===null||m===void 0||m.call(p,h)),N&&((x=p==null?void 0:p.onStart)===null||x===void 0||x.call(p,h))}),destroy:()=>{var v;!h||(v=p==null?void 0:p.onExit)===null||v===void 0||v.call(p,h)}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(v,b,w,k){const{isEditable:A}=t,{composing:d}=t.view,{selection:y}=v,{empty:m,from:x}=y,S=J({},b);if(S.composing=d,A&&(m||t.view.composing)){(x<b.range.from||x>b.range.to)&&!d&&!b.composing&&(S.active=!1);const _=B4({char:n,allowSpaces:r,allowedPrefixes:i,startOfLine:o,$position:y.$from}),C=`id_${Math.floor(Math.random()*4294967295)}`;_&&f({editor:t,state:k,range:_.range})?(S.active=!0,S.decorationId=b.decorationId?b.decorationId:C,S.range=_.range,S.query=_.query,S.text=_.text):S.active=!1}else S.active=!1;return S.active||(S.decorationId=null,S.range={from:0,to:0},S.query=null,S.text=null),S}},props:{handleKeyDown(v,b){var w;const{active:k,range:A}=g.getState(v.state);return k&&((w=p==null?void 0:p.onKeyDown)===null||w===void 0?void 0:w.call(p,{view:v,event:b,range:A}))||!1},decorations(v){const{active:b,range:w,decorationId:k}=g.getState(v);return b?Qe.create(v.doc,[Kt.inline(w.from,w.to,{nodeName:s,class:a,"data-decoration-id":k})]):null}}});return g}const F4=new yt("mention"),rR=et.create({name:"mention",addOptions(){return{HTMLAttributes:{},renderLabel({options:e,node:t}){var n;return`${e.suggestion.char}${(n=t.attrs.label)!==null&&n!==void 0?n:t.attrs.id}`},suggestion:{char:"@",pluginKey:F4,command:({editor:e,range:t,props:n})=>{var r,i;const o=e.view.state.selection.$to.nodeAfter;((r=o==null?void 0:o.text)===null||r===void 0?void 0:r.startsWith(" "))&&(t.to+=1),e.chain().focus().insertContentAt(t,[{type:this.name,attrs:n},{type:"text",text:" "}]).run(),(i=window.getSelection())===null||i===void 0||i.collapseToEnd()},allow:({state:e,range:t})=>{const n=e.doc.resolve(t.from),r=e.schema.nodes[this.name];return!!n.parent.type.contentMatch.matchType(r)}}}},group:"inline",inline:!0,selectable:!1,atom:!0,addAttributes(){return{id:{default:null,parseHTML:e=>e.getAttribute("data-id"),renderHTML:e=>e.id?{"data-id":e.id}:{}},label:{default:null,parseHTML:e=>e.getAttribute("data-label"),renderHTML:e=>e.label?{"data-label":e.label}:{}}}},parseHTML(){return[{tag:`span[data-type="${this.name}"]`}]},renderHTML({node:e,HTMLAttributes:t}){return["span",Ue({"data-type":this.name},this.options.HTMLAttributes,t),this.options.renderLabel({options:this.options,node:e})]},renderText({node:e}){return this.options.renderLabel({options:this.options,node:e})},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.command(({tr:e,state:t})=>{let n=!1;const{selection:r}=t,{empty:i,anchor:o}=r;return i?(t.doc.nodesBetween(o-1,o,(s,a)=>{if(s.type.name===this.name)return n=!0,e.insertText(this.options.suggestion.char||"",a,a+s.nodeSize),!1}),n):!1})}},addProseMirrorPlugins(){return[z4(J({editor:this.editor},this.options.suggestion))]}});const V4={},W4={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},U4=ie("path",{fill:"none",d:"M0 0H24V24H0z"},null,-1),K4=ie("path",{d:"M13 20h-2v-7H4v7H2V4h2v7h7V4h2v16zm8-12v12h-2v-9.796l-2 .536V8.67L19.5 8H21z",fill:"currentColor"},null,-1),q4=[U4,K4];function J4(e,t){return ue(),ve("svg",W4,q4)}var G4=Ie(V4,[["render",J4]]);const Y4={},X4={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},Q4=ie("path",{fill:"none",d:"M0 0H24V24H0z"},null,-1),Z4=ie("path",{d:"M4 4v7h7V4h2v16h-2v-7H4v7H2V4h2zm14.5 4c2.071 0 3.75 1.679 3.75 3.75 0 .857-.288 1.648-.772 2.28l-.148.18L18.034 18H22v2h-7v-1.556l4.82-5.546c.268-.307.43-.709.43-1.148 0-.966-.784-1.75-1.75-1.75-.918 0-1.671.707-1.744 1.606l-.006.144h-2C14.75 9.679 16.429 8 18.5 8z",fill:"currentColor"},null,-1),eO=[Q4,Z4];function tO(e,t){return ue(),ve("svg",X4,eO)}var nO=Ie(Y4,[["render",tO]]);const rO={},iO={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},oO=ie("path",{fill:"none",d:"M0 0H24V24H0z"},null,-1),sO=ie("path",{d:"M22 8l-.002 2-2.505 2.883c1.59.435 2.757 1.89 2.757 3.617 0 2.071-1.679 3.75-3.75 3.75-1.826 0-3.347-1.305-3.682-3.033l1.964-.382c.156.806.866 1.415 1.718 1.415.966 0 1.75-.784 1.75-1.75s-.784-1.75-1.75-1.75c-.286 0-.556.069-.794.19l-1.307-1.547L19.35 10H15V8h7zM4 4v7h7V4h2v16h-2v-7H4v7H2V4h2z",fill:"currentColor"},null,-1),aO=[oO,sO];function lO(e,t){return ue(),ve("svg",iO,aO)}var cO=Ie(rO,[["render",lO]]);const uO={},dO={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},fO=ie("path",{fill:"none",d:"M0 0H24V24H0z"},null,-1),hO=ie("path",{d:"M13 20h-2v-7H4v7H2V4h2v7h7V4h2v16zm9-12v8h1.5v2H22v2h-2v-2h-5.5v-1.34l5-8.66H22zm-2 3.133L17.19 16H20v-4.867z",fill:"currentColor"},null,-1),pO=[fO,hO];function mO(e,t){return ue(),ve("svg",dO,pO)}var gO=Ie(uO,[["render",mO]]);const yO={},vO={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},bO=ie("path",{fill:"none",d:"M0 0H24V24H0z"},null,-1),wO=ie("path",{d:"M22 8v2h-4.323l-.464 2.636c.33-.089.678-.136 1.037-.136 2.21 0 4 1.79 4 4s-1.79 4-4 4c-1.827 0-3.367-1.224-3.846-2.897l1.923-.551c.24.836 1.01 1.448 1.923 1.448 1.105 0 2-.895 2-2s-.895-2-2-2c-.63 0-1.193.292-1.56.748l-1.81-.904L16 8h6zM4 4v7h7V4h2v16h-2v-7H4v7H2V4h2z",fill:"currentColor"},null,-1),xO=[bO,wO];function kO(e,t){return ue(),ve("svg",vO,xO)}var SO=Ie(yO,[["render",kO]]);const CO={},_O={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},MO=ie("path",{fill:"none",d:"M0 0H24V24H0z"},null,-1),AO=ie("path",{d:"M21.097 8l-2.598 4.5c2.21 0 4.001 1.79 4.001 4s-1.79 4-4 4-4-1.79-4-4c0-.736.199-1.426.546-2.019L18.788 8h2.309zM4 4v7h7V4h2v16h-2v-7H4v7H2V4h2zm14.5 10.5c-1.105 0-2 .895-2 2s.895 2 2 2 2-.895 2-2-.895-2-2-2z",fill:"currentColor"},null,-1),EO=[MO,AO];function OO(e,t){return ue(),ve("svg",_O,EO)}var TO=Ie(CO,[["render",OO]]);const PO={},RO={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},jO=ie("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),NO=ie("path",{d:"M13 6v15h-2V6H5V4h14v2z",fill:"currentColor"},null,-1),LO=[jO,NO];function DO(e,t){return ue(),ve("svg",RO,LO)}var IO=Ie(PO,[["render",DO]]);const $O={},BO={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},HO=ie("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),zO=ie("path",{d:"M8 11h4.5a2.5 2.5 0 1 0 0-5H8v5zm10 4.5a4.5 4.5 0 0 1-4.5 4.5H6V4h6.5a4.5 4.5 0 0 1 3.256 7.606A4.498 4.498 0 0 1 18 15.5zM8 13v5h5.5a2.5 2.5 0 1 0 0-5H8z",fill:"currentColor"},null,-1),FO=[HO,zO];function VO(e,t){return ue(),ve("svg",BO,FO)}var WO=Ie($O,[["render",VO]]);const UO={},KO={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},qO=ie("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),JO=ie("path",{d:"M15 20H7v-2h2.927l2.116-12H9V4h8v2h-2.927l-2.116 12H15z",fill:"currentColor"},null,-1),GO=[qO,JO];function YO(e,t){return ue(),ve("svg",KO,GO)}var XO=Ie(UO,[["render",YO]]);const QO={},ZO={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},eT=ie("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),tT=ie("path",{d:"M8 3v9a4 4 0 1 0 8 0V3h2v9a6 6 0 1 1-12 0V3h2zM4 20h16v2H4v-2z",fill:"currentColor"},null,-1),nT=[eT,tT];function rT(e,t){return ue(),ve("svg",ZO,nT)}var iT=Ie(QO,[["render",rT]]);const oT={},sT={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},aT=ie("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),lT=ie("path",{d:"M3 4h18v2H3V4zm2 15h14v2H5v-2zm-2-5h18v2H3v-2zm2-5h14v2H5V9z",fill:"currentColor"},null,-1),cT=[aT,lT];function uT(e,t){return ue(),ve("svg",sT,cT)}var dT=Ie(oT,[["render",uT]]);const fT={},hT={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},pT=ie("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),mT=ie("path",{d:"M3 4h18v2H3V4zm0 15h14v2H3v-2zm0-5h18v2H3v-2zm0-5h14v2H3V9z",fill:"currentColor"},null,-1),gT=[pT,mT];function yT(e,t){return ue(),ve("svg",hT,gT)}var vT=Ie(fT,[["render",yT]]);const bT={},wT={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},xT=ie("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),kT=ie("path",{d:"M3 4h18v2H3V4zm4 15h14v2H7v-2zm-4-5h18v2H3v-2zm4-5h14v2H7V9z",fill:"currentColor"},null,-1),ST=[xT,kT];function CT(e,t){return ue(),ve("svg",wT,ST)}var _T=Ie(bT,[["render",CT]]);const MT={},AT={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},ET=ie("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),OT=ie("path",{d:"M15.246 14H8.754l-1.6 4H5l6-15h2l6 15h-2.154l-1.6-4zm-.8-2L12 5.885 9.554 12h4.892zM3 20h18v2H3v-2z",fill:"currentColor"},null,-1),TT=[ET,OT];function PT(e,t){return ue(),ve("svg",AT,TT)}var RT=Ie(MT,[["render",PT]]);const jT={},NT={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},LT=ie("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),DT=ie("path",{d:"M8 4h13v2H8V4zM5 3v3h1v1H3V6h1V4H3V3h2zM3 14v-2.5h2V11H3v-1h3v2.5H4v.5h2v1H3zm2 5.5H3v-1h2V18H3v-1h3v4H3v-1h2v-.5zM8 11h13v2H8v-2zm0 7h13v2H8v-2z",fill:"currentColor"},null,-1),IT=[LT,DT];function $T(e,t){return ue(),ve("svg",NT,IT)}var BT=Ie(jT,[["render",$T]]);const HT={},zT={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},FT=ie("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),VT=ie("path",{d:"M8 4h13v2H8V4zM4.5 6.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm0 7a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm0 6.9a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zM8 11h13v2H8v-2zm0 7h13v2H8v-2z",fill:"currentColor"},null,-1),WT=[FT,VT];function UT(e,t){return ue(),ve("svg",zT,WT)}var KT=Ie(HT,[["render",UT]]);const qT={},JT={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},GT=ie("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),YT=ie("path",{d:"M19.417 6.679C20.447 7.773 21 9 21 10.989c0 3.5-2.457 6.637-6.03 8.188l-.893-1.378c3.335-1.804 3.987-4.145 4.247-5.621-.537.278-1.24.375-1.929.311-1.804-.167-3.226-1.648-3.226-3.489a3.5 3.5 0 0 1 3.5-3.5c1.073 0 2.099.49 2.748 1.179zm-10 0C10.447 7.773 11 9 11 10.989c0 3.5-2.457 6.637-6.03 8.188l-.893-1.378c3.335-1.804 3.987-4.145 4.247-5.621-.537.278-1.24.375-1.929.311C4.591 12.322 3.17 10.841 3.17 9a3.5 3.5 0 0 1 3.5-3.5c1.073 0 2.099.49 2.748 1.179z",fill:"currentColor"},null,-1),XT=[GT,YT];function QT(e,t){return ue(),ve("svg",JT,XT)}var ZT=Ie(qT,[["render",QT]]);const e5={},t5={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},n5=ie("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),r5=ie("path",{d:"M16.95 8.464l1.414-1.414 4.95 4.95-4.95 4.95-1.414-1.414L20.485 12 16.95 8.464zm-9.9 0L3.515 12l3.535 3.536-1.414 1.414L.686 12l4.95-4.95L7.05 8.464z",fill:"currentColor"},null,-1),i5=[n5,r5];function o5(e,t){return ue(),ve("svg",t5,i5)}var s5=Ie(e5,[["render",o5]]);const a5={},l5={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},c5=ie("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),u5=ie("path",{d:"M18.364 15.536L16.95 14.12l1.414-1.414a5 5 0 1 0-7.071-7.071L9.879 7.05 8.464 5.636 9.88 4.222a7 7 0 0 1 9.9 9.9l-1.415 1.414zm-2.828 2.828l-1.415 1.414a7 7 0 0 1-9.9-9.9l1.415-1.414L7.05 9.88l-1.414 1.414a5 5 0 1 0 7.071 7.071l1.414-1.414 1.415 1.414zm-.708-10.607l1.415 1.415-7.071 7.07-1.415-1.414 7.071-7.07z",fill:"currentColor"},null,-1),d5=[c5,u5];function f5(e,t){return ue(),ve("svg",l5,d5)}var h5=Ie(a5,[["render",f5]]);const p5={},m5={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},g5=ie("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),y5=ie("path",{d:"M21 15v3h3v2h-3v3h-2v-3h-3v-2h3v-3h2zm.008-12c.548 0 .992.445.992.993V13h-2V5H4v13.999L14 9l3 3v2.829l-3-3L6.827 19H14v2H2.992A.993.993 0 0 1 2 20.007V3.993A1 1 0 0 1 2.992 3h18.016zM8 7a2 2 0 1 1 0 4 2 2 0 0 1 0-4z",fill:"currentColor"},null,-1),v5=[g5,y5];function b5(e,t){return ue(),ve("svg",m5,v5)}var w5=Ie(p5,[["render",b5]]);const x5={},k5={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},S5=ie("path",{fill:"none",d:"M0 0H24V24H0z"},null,-1),C5=ie("path",{d:"M16 4c.552 0 1 .448 1 1v4.2l5.213-3.65c.226-.158.538-.103.697.124.058.084.09.184.09.286v12.08c0 .276-.224.5-.5.5-.103 0-.203-.032-.287-.09L17 14.8V19c0 .552-.448 1-1 1H2c-.552 0-1-.448-1-1V5c0-.552.448-1 1-1h14zm-1 2H3v12h12V6zM8 8h2v3h3v2H9.999L10 16H8l-.001-3H5v-2h3V8zm13 .841l-4 2.8v.718l4 2.8V8.84z",fill:"currentColor"},null,-1),_5=[S5,C5];function M5(e,t){return ue(),ve("svg",k5,_5)}var A5=Ie(x5,[["render",M5]]);const E5={},O5={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},T5=ie("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),P5=ie("path",{d:"M5.828 7l2.536 2.536L6.95 10.95 2 6l4.95-4.95 1.414 1.414L5.828 5H13a8 8 0 1 1 0 16H4v-2h9a6 6 0 1 0 0-12H5.828z",fill:"currentColor"},null,-1),R5=[T5,P5];function j5(e,t){return ue(),ve("svg",O5,R5)}var N5=Ie(E5,[["render",j5]]);const L5={},D5={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},I5=ie("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),$5=ie("path",{d:"M18.172 7H11a6 6 0 1 0 0 12h9v2h-9a8 8 0 1 1 0-16h7.172l-2.536-2.536L17.05 1.05 22 6l-4.95 4.95-1.414-1.414L18.172 7z",fill:"currentColor"},null,-1),B5=[I5,$5];function H5(e,t){return ue(),ve("svg",D5,B5)}var z5=Ie(L5,[["render",H5]]);const F5={},V5={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},W5=ie("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),U5=ie("path",{d:"M2 11h2v2H2v-2zm4 0h12v2H6v-2zm14 0h2v2h-2v-2z",fill:"currentColor"},null,-1),K5=[W5,U5];function q5(e,t){return ue(),ve("svg",V5,K5)}var J5=Ie(F5,[["render",q5]]);const G5={},Y5={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},X5=ie("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),Q5=ie("path",{d:"M13 10v4h6v-4h-6zm-2 0H5v4h6v-4zm2 9h6v-3h-6v3zm-2 0v-3H5v3h6zm2-14v3h6V5h-6zm-2 0H5v3h6V5zM4 3h16a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1z",fill:"currentColor"},null,-1),Z5=[X5,Q5];function e6(e,t){return ue(),ve("svg",Y5,Z5)}var t6=Ie(G5,[["render",e6]]),iR={Paragraph:{label:"Paragraph",icon:IO,action:e=>e.chain().focus().setParagraph().run(),isActive:e=>e.isActive("paragraph")},"Heading 1":{label:"Heading 1",text:"H1",icon:G4,action:e=>e.chain().focus().toggleHeading({level:1}).run(),isActive:e=>e.isActive("heading",{level:1})},"Heading 2":{label:"Heading 2",text:"H2",icon:nO,action:e=>e.chain().focus().toggleHeading({level:2}).run(),isActive:e=>e.isActive("heading",{level:2})},"Heading 3":{label:"Heading 3",text:"H3",icon:cO,action:e=>e.chain().focus().toggleHeading({level:3}).run(),isActive:e=>e.isActive("heading",{level:3})},"Heading 4":{label:"Heading 4",text:"H4",icon:gO,action:e=>e.chain().focus().toggleHeading({level:4}).run(),isActive:e=>e.isActive("heading",{level:4})},"Heading 5":{label:"Heading 5",text:"H5",icon:SO,action:e=>e.chain().focus().toggleHeading({level:5}).run(),isActive:e=>e.isActive("heading",{level:5})},"Heading 6":{label:"Heading 6",text:"H6",icon:TO,action:e=>e.chain().focus().toggleHeading({level:6}).run(),isActive:e=>e.isActive("heading",{level:6})},Bold:{label:"Bold",icon:WO,action:e=>e.chain().focus().toggleBold().run(),isActive:e=>e.isActive("bold")},Italic:{label:"Italic",icon:XO,action:e=>e.chain().focus().toggleItalic().run(),isActive:e=>e.isActive("italic")},Underline:{label:"Underline",icon:iT,action:e=>e.chain().focus().toggleUnderline().run(),isActive:e=>e.isActive("underline")},"Bullet List":{label:"Bullet List",icon:KT,action:e=>e.chain().focus().toggleBulletList().run(),isActive:e=>e.isActive("bulletList")},"Numbered List":{label:"Numbered List",icon:BT,action:e=>e.chain().focus().toggleOrderedList().run(),isActive:e=>e.isActive("orderedList")},"Align Center":{label:"Align Center",icon:dT,action:e=>e.chain().focus().setTextAlign("center").run(),isActive:e=>e.isActive({textAlign:"center"})},"Align Left":{label:"Align Left",icon:vT,action:e=>e.chain().focus().setTextAlign("left").run(),isActive:e=>e.isActive({textAlign:"left"})},"Align Right":{label:"Align Right",icon:_T,action:e=>e.chain().focus().setTextAlign("right").run(),isActive:e=>e.isActive({textAlign:"right"})},FontColor:{label:"Font Color",icon:RT,isActive:e=>e.isActive("textStyle")||e.isActive("highlight"),component:aa(()=>import("./FontColor.0920821f.js"))},Blockquote:{label:"Blockquote",icon:ZT,action:e=>e.chain().focus().toggleBlockquote().run(),isActive:e=>e.isActive("blockquote")},Code:{label:"Code",icon:s5,action:e=>e.chain().focus().toggleCodeBlock().run(),isActive:e=>e.isActive("codeBlock")},"Horizontal Rule":{label:"Horizontal Rule",icon:J5,action:e=>e.chain().focus().setHorizontalRule().run(),isActive:e=>!1},Link:{label:"Link",icon:h5,isActive:e=>e.isActive("link"),component:aa(()=>import("./InsertLink.f10788b0.js"))},Image:{label:"Image",icon:w5,isActive:e=>!1,component:aa(()=>import("./InsertImage.45a66060.js"))},Video:{label:"Video",icon:A5,isActive:e=>!1,component:aa(()=>import("./InsertVideo.a8f5bc73.js"))},Undo:{label:"Undo",icon:N5,action:e=>e.chain().focus().undo().run(),isActive:e=>!1},Redo:{label:"Redo",icon:z5,action:e=>e.chain().focus().redo().run(),isActive:e=>!1},InsertTable:{label:"Insert Table",icon:t6,action:e=>e.chain().focus().insertTable({rows:3,cols:3,withHeaderRow:!0}).run(),isActive:e=>!1},AddColumnBefore:{label:"Add Column Before",action:e=>e.chain().focus().addColumnBefore().run(),isActive:e=>!1,isDisabled:e=>!e.can().addColumnBefore()},AddColumnAfter:{label:"Add Column After",action:e=>e.chain().focus().addColumnAfter().run(),isActive:e=>!1,isDisabled:e=>!e.can().addColumnAfter()},DeleteColumn:{label:"Delete Column",action:e=>e.chain().focus().deleteColumn().run(),isActive:e=>!1,isDisabled:e=>!e.can().deleteColumn()},AddRowBefore:{label:"Add Row Before",action:e=>e.chain().focus().addRowBefore().run(),isActive:e=>!1,isDisabled:e=>!e.can().addRowBefore()},AddRowAfter:{label:"Add Row After",action:e=>e.chain().focus().addRowAfter().run(),isActive:e=>!1,isDisabled:e=>!e.can().addRowAfter()},DeleteRow:{label:"Delete Row",action:e=>e.chain().focus().deleteRow().run(),isActive:e=>!1,isDisabled:e=>!e.can().deleteRow()},DeleteTable:{label:"Delete Table",action:e=>e.chain().focus().deleteTable().run(),isActive:e=>!1,isDisabled:e=>!e.can().deleteTable()},MergeCells:{label:"Merge Cells",action:e=>e.chain().focus().mergeCells().run(),isActive:e=>!1,isDisabled:e=>!e.can().mergeCells()},SplitCell:{label:"Split Cell",action:e=>e.chain().focus().splitCell().run(),isActive:e=>!1,isDisabled:e=>!e.can().splitCell()},ToggleHeaderColumn:{label:"Toggle Header Column",action:e=>e.chain().focus().toggleHeaderColumn().run(),isActive:e=>!1,isDisabled:e=>!e.can().toggleHeaderColumn()},ToggleHeaderRow:{label:"Toggle Header Row",action:e=>e.chain().focus().toggleHeaderRow().run(),isActive:e=>!1,isDisabled:e=>!e.can().toggleHeaderRow()},ToggleHeaderCell:{label:"Toggle Header Cell",action:e=>e.chain().focus().toggleHeaderCell().run(),isActive:e=>!1,isDisabled:e=>!e.can().toggleHeaderCell()},Separator:{type:"separator"}};var ky={exports:{}};(function(e){(function(){function t(d){var y={omitExtraWLInCodeBlocks:{defaultValue:!1,describe:"Omit the default extra whiteline added to code blocks",type:"boolean"},noHeaderId:{defaultValue:!1,describe:"Turn on/off generated header id",type:"boolean"},prefixHeaderId:{defaultValue:!1,describe:"Add a prefix to the generated header ids. Passing a string will prefix that string to the header id. Setting to true will add a generic 'section-' prefix",type:"string"},rawPrefixHeaderId:{defaultValue:!1,describe:'Setting this option to true will prevent showdown from modifying the prefix. This might result in malformed IDs (if, for instance, the " char is used in the prefix)',type:"boolean"},ghCompatibleHeaderId:{defaultValue:!1,describe:"Generate header ids compatible with github style (spaces are replaced with dashes, a bunch of non alphanumeric chars are removed)",type:"boolean"},rawHeaderId:{defaultValue:!1,describe:`Remove only spaces, ' and " from generated header ids (including prefixes), replacing them with dashes (-). WARNING: This might result in malformed ids`,type:"boolean"},headerLevelStart:{defaultValue:!1,describe:"The header blocks level start",type:"integer"},parseImgDimensions:{defaultValue:!1,describe:"Turn on/off image dimension parsing",type:"boolean"},simplifiedAutoLink:{defaultValue:!1,describe:"Turn on/off GFM autolink style",type:"boolean"},excludeTrailingPunctuationFromURLs:{defaultValue:!1,describe:"Excludes trailing punctuation from links generated with autoLinking",type:"boolean"},literalMidWordUnderscores:{defaultValue:!1,describe:"Parse midword underscores as literal underscores",type:"boolean"},literalMidWordAsterisks:{defaultValue:!1,describe:"Parse midword asterisks as literal asterisks",type:"boolean"},strikethrough:{defaultValue:!1,describe:"Turn on/off strikethrough support",type:"boolean"},tables:{defaultValue:!1,describe:"Turn on/off tables support",type:"boolean"},tablesHeaderId:{defaultValue:!1,describe:"Add an id to table headers",type:"boolean"},ghCodeBlocks:{defaultValue:!0,describe:"Turn on/off GFM fenced code blocks support",type:"boolean"},tasklists:{defaultValue:!1,describe:"Turn on/off GFM tasklist support",type:"boolean"},smoothLivePreview:{defaultValue:!1,describe:"Prevents weird effects in live previews due to incomplete input",type:"boolean"},smartIndentationFix:{defaultValue:!1,describe:"Tries to smartly fix indentation in es6 strings",type:"boolean"},disableForced4SpacesIndentedSublists:{defaultValue:!1,describe:"Disables the requirement of indenting nested sublists by 4 spaces",type:"boolean"},simpleLineBreaks:{defaultValue:!1,describe:"Parses simple line breaks as <br> (GFM Style)",type:"boolean"},requireSpaceBeforeHeadingText:{defaultValue:!1,describe:"Makes adding a space between `#` and the header text mandatory (GFM Style)",type:"boolean"},ghMentions:{defaultValue:!1,describe:"Enables github @mentions",type:"boolean"},ghMentionsLink:{defaultValue:"https://github.com/{u}",describe:"Changes the link generated by @mentions. Only applies if ghMentions option is enabled.",type:"string"},encodeEmails:{defaultValue:!0,describe:"Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities",type:"boolean"},openLinksInNewWindow:{defaultValue:!1,describe:"Open all links in new windows",type:"boolean"},backslashEscapesHTMLTags:{defaultValue:!1,describe:"Support for HTML Tag escaping. ex: <div>foo</div>",type:"boolean"},emoji:{defaultValue:!1,describe:"Enable emoji support. Ex: `this is a :smile: emoji`",type:"boolean"},underline:{defaultValue:!1,describe:"Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `<em>` and `<strong>`",type:"boolean"},ellipsis:{defaultValue:!0,describe:"Replaces three dots with the ellipsis unicode character",type:"boolean"},completeHTMLDocument:{defaultValue:!1,describe:"Outputs a complete html document, including `<html>`, `<head>` and `<body>` tags",type:"boolean"},metadata:{defaultValue:!1,describe:"Enable support for document metadata (defined at the top of the document between `\xAB\xAB\xAB` and `\xBB\xBB\xBB` or between `---` and `---`).",type:"boolean"},splitAdjacentBlockquotes:{defaultValue:!1,describe:"Split adjacent blockquote blocks",type:"boolean"}};if(d===!1)return JSON.parse(JSON.stringify(y));var m={};for(var x in y)y.hasOwnProperty(x)&&(m[x]=y[x].defaultValue);return m}function n(){var d=t(!0),y={};for(var m in d)d.hasOwnProperty(m)&&(y[m]=!0);return y}var r={},i={},o={},s=t(!0),a="vanilla",l={github:{omitExtraWLInCodeBlocks:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,disableForced4SpacesIndentedSublists:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghCompatibleHeaderId:!0,ghMentions:!0,backslashEscapesHTMLTags:!0,emoji:!0,splitAdjacentBlockquotes:!0},original:{noHeaderId:!0,ghCodeBlocks:!1},ghost:{omitExtraWLInCodeBlocks:!0,parseImgDimensions:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,smoothLivePreview:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghMentions:!1,encodeEmails:!0},vanilla:t(!0),allOn:n()};r.helper={},r.extensions={},r.setOption=function(d,y){return s[d]=y,this},r.getOption=function(d){return s[d]},r.getOptions=function(){return s},r.resetOptions=function(){s=t(!0)},r.setFlavor=function(d){if(!l.hasOwnProperty(d))throw Error(d+" flavor was not found");r.resetOptions();var y=l[d];a=d;for(var m in y)y.hasOwnProperty(m)&&(s[m]=y[m])},r.getFlavor=function(){return a},r.getFlavorOptions=function(d){if(l.hasOwnProperty(d))return l[d]},r.getDefaultOptions=function(d){return t(d)},r.subParser=function(d,y){if(r.helper.isString(d))if(typeof y!="undefined")i[d]=y;else{if(i.hasOwnProperty(d))return i[d];throw Error("SubParser named "+d+" not registered!")}},r.extension=function(d,y){if(!r.helper.isString(d))throw Error("Extension 'name' must be a string");if(d=r.helper.stdExtName(d),r.helper.isUndefined(y)){if(!o.hasOwnProperty(d))throw Error("Extension named "+d+" is not registered!");return o[d]}else{typeof y=="function"&&(y=y()),r.helper.isArray(y)||(y=[y]);var m=c(y,d);if(m.valid)o[d]=y;else throw Error(m.error)}},r.getAllExtensions=function(){return o},r.removeExtension=function(d){delete o[d]},r.resetExtensions=function(){o={}};function c(d,y){var m=y?"Error in "+y+" extension->":"Error in unnamed extension",x={valid:!0,error:""};r.helper.isArray(d)||(d=[d]);for(var S=0;S<d.length;++S){var _=m+" sub-extension "+S+": ",C=d[S];if(typeof C!="object")return x.valid=!1,x.error=_+"must be an object, but "+typeof C+" given",x;if(!r.helper.isString(C.type))return x.valid=!1,x.error=_+'property "type" must be a string, but '+typeof C.type+" given",x;var E=C.type=C.type.toLowerCase();if(E==="language"&&(E=C.type="lang"),E==="html"&&(E=C.type="output"),E!=="lang"&&E!=="output"&&E!=="listener")return x.valid=!1,x.error=_+"type "+E+' is not recognized. Valid values: "lang/language", "output/html" or "listener"',x;if(E==="listener"){if(r.helper.isUndefined(C.listeners))return x.valid=!1,x.error=_+'. Extensions of type "listener" must have a property called "listeners"',x}else if(r.helper.isUndefined(C.filter)&&r.helper.isUndefined(C.regex))return x.valid=!1,x.error=_+E+' extensions must define either a "regex" property or a "filter" method',x;if(C.listeners){if(typeof C.listeners!="object")return x.valid=!1,x.error=_+'"listeners" property must be an object but '+typeof C.listeners+" given",x;for(var T in C.listeners)if(C.listeners.hasOwnProperty(T)&&typeof C.listeners[T]!="function")return x.valid=!1,x.error=_+'"listeners" property must be an hash of [event name]: [callback]. listeners.'+T+" must be a function but "+typeof C.listeners[T]+" given",x}if(C.filter){if(typeof C.filter!="function")return x.valid=!1,x.error=_+'"filter" must be a function, but '+typeof C.filter+" given",x}else if(C.regex){if(r.helper.isString(C.regex)&&(C.regex=new RegExp(C.regex,"g")),!(C.regex instanceof RegExp))return x.valid=!1,x.error=_+'"regex" property must either be a string or a RegExp object, but '+typeof C.regex+" given",x;if(r.helper.isUndefined(C.replace))return x.valid=!1,x.error=_+'"regex" extensions must implement a replace string or function',x}}return x}r.validateExtension=function(d){var y=c(d,null);return y.valid?!0:(console.warn(y.error),!1)},r.hasOwnProperty("helper")||(r.helper={}),r.helper.isString=function(d){return typeof d=="string"||d instanceof String},r.helper.isFunction=function(d){var y={};return d&&y.toString.call(d)==="[object Function]"},r.helper.isArray=function(d){return Array.isArray(d)},r.helper.isUndefined=function(d){return typeof d=="undefined"},r.helper.forEach=function(d,y){if(r.helper.isUndefined(d))throw new Error("obj param is required");if(r.helper.isUndefined(y))throw new Error("callback param is required");if(!r.helper.isFunction(y))throw new Error("callback param must be a function/closure");if(typeof d.forEach=="function")d.forEach(y);else if(r.helper.isArray(d))for(var m=0;m<d.length;m++)y(d[m],m,d);else if(typeof d=="object")for(var x in d)d.hasOwnProperty(x)&&y(d[x],x,d);else throw new Error("obj does not seem to be an array or an iterable object")},r.helper.stdExtName=function(d){return d.replace(/[_?*+\/\\.^-]/g,"").replace(/\s/g,"").toLowerCase()};function u(d,y){var m=y.charCodeAt(0);return"\xA8E"+m+"E"}r.helper.escapeCharactersCallback=u,r.helper.escapeCharacters=function(d,y,m){var x="(["+y.replace(/([\[\]\\])/g,"\\$1")+"])";m&&(x="\\\\"+x);var S=new RegExp(x,"g");return d=d.replace(S,u),d},r.helper.unescapeHTMLEntities=function(d){return d.replace(/&quot;/g,'"').replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&")};var f=function(d,y,m,x){var S=x||"",_=S.indexOf("g")>-1,C=new RegExp(y+"|"+m,"g"+S.replace(/g/g,"")),E=new RegExp(y,S.replace(/g/g,"")),T=[],R,N,D,M,P;do for(R=0;D=C.exec(d);)if(E.test(D[0]))R++||(N=C.lastIndex,M=N-D[0].length);else if(R&&!--R){P=D.index+D[0].length;var L={left:{start:M,end:N},match:{start:N,end:D.index},right:{start:D.index,end:P},wholeMatch:{start:M,end:P}};if(T.push(L),!_)return T}while(R&&(C.lastIndex=N));return T};r.helper.matchRecursiveRegExp=function(d,y,m,x){for(var S=f(d,y,m,x),_=[],C=0;C<S.length;++C)_.push([d.slice(S[C].wholeMatch.start,S[C].wholeMatch.end),d.slice(S[C].match.start,S[C].match.end),d.slice(S[C].left.start,S[C].left.end),d.slice(S[C].right.start,S[C].right.end)]);return _},r.helper.replaceRecursiveRegExp=function(d,y,m,x,S){if(!r.helper.isFunction(y)){var _=y;y=function(){return _}}var C=f(d,m,x,S),E=d,T=C.length;if(T>0){var R=[];C[0].wholeMatch.start!==0&&R.push(d.slice(0,C[0].wholeMatch.start));for(var N=0;N<T;++N)R.push(y(d.slice(C[N].wholeMatch.start,C[N].wholeMatch.end),d.slice(C[N].match.start,C[N].match.end),d.slice(C[N].left.start,C[N].left.end),d.slice(C[N].right.start,C[N].right.end))),N<T-1&&R.push(d.slice(C[N].wholeMatch.end,C[N+1].wholeMatch.start));C[T-1].wholeMatch.end<d.length&&R.push(d.slice(C[T-1].wholeMatch.end)),E=R.join("")}return E},r.helper.regexIndexOf=function(d,y,m){if(!r.helper.isString(d))throw"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";if(!(y instanceof RegExp))throw"InvalidArgumentError: second parameter of showdown.helper.regexIndexOf function must be an instance of RegExp";var x=d.substring(m||0).search(y);return x>=0?x+(m||0):x},r.helper.splitAtIndex=function(d,y){if(!r.helper.isString(d))throw"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";return[d.substring(0,y),d.substring(y)]},r.helper.encodeEmailAddress=function(d){var y=[function(m){return"&#"+m.charCodeAt(0)+";"},function(m){return"&#x"+m.charCodeAt(0).toString(16)+";"},function(m){return m}];return d=d.replace(/./g,function(m){if(m==="@")m=y[Math.floor(Math.random()*2)](m);else{var x=Math.random();m=x>.9?y[2](m):x>.45?y[1](m):y[0](m)}return m}),d},r.helper.padEnd=function(y,m,x){return m=m>>0,x=String(x||" "),y.length>m?String(y):(m=m-y.length,m>x.length&&(x+=x.repeat(m/x.length)),String(y)+x.slice(0,m))},typeof console=="undefined"&&(console={warn:function(d){alert(d)},log:function(d){alert(d)},error:function(d){throw d}}),r.helper.regexes={asteriskDashAndColon:/([*_:~])/g},r.helper.emojis={"+1":"\u{1F44D}","-1":"\u{1F44E}","100":"\u{1F4AF}","1234":"\u{1F522}","1st_place_medal":"\u{1F947}","2nd_place_medal":"\u{1F948}","3rd_place_medal":"\u{1F949}","8ball":"\u{1F3B1}",a:"\u{1F170}\uFE0F",ab:"\u{1F18E}",abc:"\u{1F524}",abcd:"\u{1F521}",accept:"\u{1F251}",aerial_tramway:"\u{1F6A1}",airplane:"\u2708\uFE0F",alarm_clock:"\u23F0",alembic:"\u2697\uFE0F",alien:"\u{1F47D}",ambulance:"\u{1F691}",amphora:"\u{1F3FA}",anchor:"\u2693\uFE0F",angel:"\u{1F47C}",anger:"\u{1F4A2}",angry:"\u{1F620}",anguished:"\u{1F627}",ant:"\u{1F41C}",apple:"\u{1F34E}",aquarius:"\u2652\uFE0F",aries:"\u2648\uFE0F",arrow_backward:"\u25C0\uFE0F",arrow_double_down:"\u23EC",arrow_double_up:"\u23EB",arrow_down:"\u2B07\uFE0F",arrow_down_small:"\u{1F53D}",arrow_forward:"\u25B6\uFE0F",arrow_heading_down:"\u2935\uFE0F",arrow_heading_up:"\u2934\uFE0F",arrow_left:"\u2B05\uFE0F",arrow_lower_left:"\u2199\uFE0F",arrow_lower_right:"\u2198\uFE0F",arrow_right:"\u27A1\uFE0F",arrow_right_hook:"\u21AA\uFE0F",arrow_up:"\u2B06\uFE0F",arrow_up_down:"\u2195\uFE0F",arrow_up_small:"\u{1F53C}",arrow_upper_left:"\u2196\uFE0F",arrow_upper_right:"\u2197\uFE0F",arrows_clockwise:"\u{1F503}",arrows_counterclockwise:"\u{1F504}",art:"\u{1F3A8}",articulated_lorry:"\u{1F69B}",artificial_satellite:"\u{1F6F0}",astonished:"\u{1F632}",athletic_shoe:"\u{1F45F}",atm:"\u{1F3E7}",atom_symbol:"\u269B\uFE0F",avocado:"\u{1F951}",b:"\u{1F171}\uFE0F",baby:"\u{1F476}",baby_bottle:"\u{1F37C}",baby_chick:"\u{1F424}",baby_symbol:"\u{1F6BC}",back:"\u{1F519}",bacon:"\u{1F953}",badminton:"\u{1F3F8}",baggage_claim:"\u{1F6C4}",baguette_bread:"\u{1F956}",balance_scale:"\u2696\uFE0F",balloon:"\u{1F388}",ballot_box:"\u{1F5F3}",ballot_box_with_check:"\u2611\uFE0F",bamboo:"\u{1F38D}",banana:"\u{1F34C}",bangbang:"\u203C\uFE0F",bank:"\u{1F3E6}",bar_chart:"\u{1F4CA}",barber:"\u{1F488}",baseball:"\u26BE\uFE0F",basketball:"\u{1F3C0}",basketball_man:"\u26F9\uFE0F",basketball_woman:"\u26F9\uFE0F&zwj;\u2640\uFE0F",bat:"\u{1F987}",bath:"\u{1F6C0}",bathtub:"\u{1F6C1}",battery:"\u{1F50B}",beach_umbrella:"\u{1F3D6}",bear:"\u{1F43B}",bed:"\u{1F6CF}",bee:"\u{1F41D}",beer:"\u{1F37A}",beers:"\u{1F37B}",beetle:"\u{1F41E}",beginner:"\u{1F530}",bell:"\u{1F514}",bellhop_bell:"\u{1F6CE}",bento:"\u{1F371}",biking_man:"\u{1F6B4}",bike:"\u{1F6B2}",biking_woman:"\u{1F6B4}&zwj;\u2640\uFE0F",bikini:"\u{1F459}",biohazard:"\u2623\uFE0F",bird:"\u{1F426}",birthday:"\u{1F382}",black_circle:"\u26AB\uFE0F",black_flag:"\u{1F3F4}",black_heart:"\u{1F5A4}",black_joker:"\u{1F0CF}",black_large_square:"\u2B1B\uFE0F",black_medium_small_square:"\u25FE\uFE0F",black_medium_square:"\u25FC\uFE0F",black_nib:"\u2712\uFE0F",black_small_square:"\u25AA\uFE0F",black_square_button:"\u{1F532}",blonde_man:"\u{1F471}",blonde_woman:"\u{1F471}&zwj;\u2640\uFE0F",blossom:"\u{1F33C}",blowfish:"\u{1F421}",blue_book:"\u{1F4D8}",blue_car:"\u{1F699}",blue_heart:"\u{1F499}",blush:"\u{1F60A}",boar:"\u{1F417}",boat:"\u26F5\uFE0F",bomb:"\u{1F4A3}",book:"\u{1F4D6}",bookmark:"\u{1F516}",bookmark_tabs:"\u{1F4D1}",books:"\u{1F4DA}",boom:"\u{1F4A5}",boot:"\u{1F462}",bouquet:"\u{1F490}",bowing_man:"\u{1F647}",bow_and_arrow:"\u{1F3F9}",bowing_woman:"\u{1F647}&zwj;\u2640\uFE0F",bowling:"\u{1F3B3}",boxing_glove:"\u{1F94A}",boy:"\u{1F466}",bread:"\u{1F35E}",bride_with_veil:"\u{1F470}",bridge_at_night:"\u{1F309}",briefcase:"\u{1F4BC}",broken_heart:"\u{1F494}",bug:"\u{1F41B}",building_construction:"\u{1F3D7}",bulb:"\u{1F4A1}",bullettrain_front:"\u{1F685}",bullettrain_side:"\u{1F684}",burrito:"\u{1F32F}",bus:"\u{1F68C}",business_suit_levitating:"\u{1F574}",busstop:"\u{1F68F}",bust_in_silhouette:"\u{1F464}",busts_in_silhouette:"\u{1F465}",butterfly:"\u{1F98B}",cactus:"\u{1F335}",cake:"\u{1F370}",calendar:"\u{1F4C6}",call_me_hand:"\u{1F919}",calling:"\u{1F4F2}",camel:"\u{1F42B}",camera:"\u{1F4F7}",camera_flash:"\u{1F4F8}",camping:"\u{1F3D5}",cancer:"\u264B\uFE0F",candle:"\u{1F56F}",candy:"\u{1F36C}",canoe:"\u{1F6F6}",capital_abcd:"\u{1F520}",capricorn:"\u2651\uFE0F",car:"\u{1F697}",card_file_box:"\u{1F5C3}",card_index:"\u{1F4C7}",card_index_dividers:"\u{1F5C2}",carousel_horse:"\u{1F3A0}",carrot:"\u{1F955}",cat:"\u{1F431}",cat2:"\u{1F408}",cd:"\u{1F4BF}",chains:"\u26D3",champagne:"\u{1F37E}",chart:"\u{1F4B9}",chart_with_downwards_trend:"\u{1F4C9}",chart_with_upwards_trend:"\u{1F4C8}",checkered_flag:"\u{1F3C1}",cheese:"\u{1F9C0}",cherries:"\u{1F352}",cherry_blossom:"\u{1F338}",chestnut:"\u{1F330}",chicken:"\u{1F414}",children_crossing:"\u{1F6B8}",chipmunk:"\u{1F43F}",chocolate_bar:"\u{1F36B}",christmas_tree:"\u{1F384}",church:"\u26EA\uFE0F",cinema:"\u{1F3A6}",circus_tent:"\u{1F3AA}",city_sunrise:"\u{1F307}",city_sunset:"\u{1F306}",cityscape:"\u{1F3D9}",cl:"\u{1F191}",clamp:"\u{1F5DC}",clap:"\u{1F44F}",clapper:"\u{1F3AC}",classical_building:"\u{1F3DB}",clinking_glasses:"\u{1F942}",clipboard:"\u{1F4CB}",clock1:"\u{1F550}",clock10:"\u{1F559}",clock1030:"\u{1F565}",clock11:"\u{1F55A}",clock1130:"\u{1F566}",clock12:"\u{1F55B}",clock1230:"\u{1F567}",clock130:"\u{1F55C}",clock2:"\u{1F551}",clock230:"\u{1F55D}",clock3:"\u{1F552}",clock330:"\u{1F55E}",clock4:"\u{1F553}",clock430:"\u{1F55F}",clock5:"\u{1F554}",clock530:"\u{1F560}",clock6:"\u{1F555}",clock630:"\u{1F561}",clock7:"\u{1F556}",clock730:"\u{1F562}",clock8:"\u{1F557}",clock830:"\u{1F563}",clock9:"\u{1F558}",clock930:"\u{1F564}",closed_book:"\u{1F4D5}",closed_lock_with_key:"\u{1F510}",closed_umbrella:"\u{1F302}",cloud:"\u2601\uFE0F",cloud_with_lightning:"\u{1F329}",cloud_with_lightning_and_rain:"\u26C8",cloud_with_rain:"\u{1F327}",cloud_with_snow:"\u{1F328}",clown_face:"\u{1F921}",clubs:"\u2663\uFE0F",cocktail:"\u{1F378}",coffee:"\u2615\uFE0F",coffin:"\u26B0\uFE0F",cold_sweat:"\u{1F630}",comet:"\u2604\uFE0F",computer:"\u{1F4BB}",computer_mouse:"\u{1F5B1}",confetti_ball:"\u{1F38A}",confounded:"\u{1F616}",confused:"\u{1F615}",congratulations:"\u3297\uFE0F",construction:"\u{1F6A7}",construction_worker_man:"\u{1F477}",construction_worker_woman:"\u{1F477}&zwj;\u2640\uFE0F",control_knobs:"\u{1F39B}",convenience_store:"\u{1F3EA}",cookie:"\u{1F36A}",cool:"\u{1F192}",policeman:"\u{1F46E}",copyright:"\xA9\uFE0F",corn:"\u{1F33D}",couch_and_lamp:"\u{1F6CB}",couple:"\u{1F46B}",couple_with_heart_woman_man:"\u{1F491}",couple_with_heart_man_man:"\u{1F468}&zwj;\u2764\uFE0F&zwj;\u{1F468}",couple_with_heart_woman_woman:"\u{1F469}&zwj;\u2764\uFE0F&zwj;\u{1F469}",couplekiss_man_man:"\u{1F468}&zwj;\u2764\uFE0F&zwj;\u{1F48B}&zwj;\u{1F468}",couplekiss_man_woman:"\u{1F48F}",couplekiss_woman_woman:"\u{1F469}&zwj;\u2764\uFE0F&zwj;\u{1F48B}&zwj;\u{1F469}",cow:"\u{1F42E}",cow2:"\u{1F404}",cowboy_hat_face:"\u{1F920}",crab:"\u{1F980}",crayon:"\u{1F58D}",credit_card:"\u{1F4B3}",crescent_moon:"\u{1F319}",cricket:"\u{1F3CF}",crocodile:"\u{1F40A}",croissant:"\u{1F950}",crossed_fingers:"\u{1F91E}",crossed_flags:"\u{1F38C}",crossed_swords:"\u2694\uFE0F",crown:"\u{1F451}",cry:"\u{1F622}",crying_cat_face:"\u{1F63F}",crystal_ball:"\u{1F52E}",cucumber:"\u{1F952}",cupid:"\u{1F498}",curly_loop:"\u27B0",currency_exchange:"\u{1F4B1}",curry:"\u{1F35B}",custard:"\u{1F36E}",customs:"\u{1F6C3}",cyclone:"\u{1F300}",dagger:"\u{1F5E1}",dancer:"\u{1F483}",dancing_women:"\u{1F46F}",dancing_men:"\u{1F46F}&zwj;\u2642\uFE0F",dango:"\u{1F361}",dark_sunglasses:"\u{1F576}",dart:"\u{1F3AF}",dash:"\u{1F4A8}",date:"\u{1F4C5}",deciduous_tree:"\u{1F333}",deer:"\u{1F98C}",department_store:"\u{1F3EC}",derelict_house:"\u{1F3DA}",desert:"\u{1F3DC}",desert_island:"\u{1F3DD}",desktop_computer:"\u{1F5A5}",male_detective:"\u{1F575}\uFE0F",diamond_shape_with_a_dot_inside:"\u{1F4A0}",diamonds:"\u2666\uFE0F",disappointed:"\u{1F61E}",disappointed_relieved:"\u{1F625}",dizzy:"\u{1F4AB}",dizzy_face:"\u{1F635}",do_not_litter:"\u{1F6AF}",dog:"\u{1F436}",dog2:"\u{1F415}",dollar:"\u{1F4B5}",dolls:"\u{1F38E}",dolphin:"\u{1F42C}",door:"\u{1F6AA}",doughnut:"\u{1F369}",dove:"\u{1F54A}",dragon:"\u{1F409}",dragon_face:"\u{1F432}",dress:"\u{1F457}",dromedary_camel:"\u{1F42A}",drooling_face:"\u{1F924}",droplet:"\u{1F4A7}",drum:"\u{1F941}",duck:"\u{1F986}",dvd:"\u{1F4C0}","e-mail":"\u{1F4E7}",eagle:"\u{1F985}",ear:"\u{1F442}",ear_of_rice:"\u{1F33E}",earth_africa:"\u{1F30D}",earth_americas:"\u{1F30E}",earth_asia:"\u{1F30F}",egg:"\u{1F95A}",eggplant:"\u{1F346}",eight_pointed_black_star:"\u2734\uFE0F",eight_spoked_asterisk:"\u2733\uFE0F",electric_plug:"\u{1F50C}",elephant:"\u{1F418}",email:"\u2709\uFE0F",end:"\u{1F51A}",envelope_with_arrow:"\u{1F4E9}",euro:"\u{1F4B6}",european_castle:"\u{1F3F0}",european_post_office:"\u{1F3E4}",evergreen_tree:"\u{1F332}",exclamation:"\u2757\uFE0F",expressionless:"\u{1F611}",eye:"\u{1F441}",eye_speech_bubble:"\u{1F441}&zwj;\u{1F5E8}",eyeglasses:"\u{1F453}",eyes:"\u{1F440}",face_with_head_bandage:"\u{1F915}",face_with_thermometer:"\u{1F912}",fist_oncoming:"\u{1F44A}",factory:"\u{1F3ED}",fallen_leaf:"\u{1F342}",family_man_woman_boy:"\u{1F46A}",family_man_boy:"\u{1F468}&zwj;\u{1F466}",family_man_boy_boy:"\u{1F468}&zwj;\u{1F466}&zwj;\u{1F466}",family_man_girl:"\u{1F468}&zwj;\u{1F467}",family_man_girl_boy:"\u{1F468}&zwj;\u{1F467}&zwj;\u{1F466}",family_man_girl_girl:"\u{1F468}&zwj;\u{1F467}&zwj;\u{1F467}",family_man_man_boy:"\u{1F468}&zwj;\u{1F468}&zwj;\u{1F466}",family_man_man_boy_boy:"\u{1F468}&zwj;\u{1F468}&zwj;\u{1F466}&zwj;\u{1F466}",family_man_man_girl:"\u{1F468}&zwj;\u{1F468}&zwj;\u{1F467}",family_man_man_girl_boy:"\u{1F468}&zwj;\u{1F468}&zwj;\u{1F467}&zwj;\u{1F466}",family_man_man_girl_girl:"\u{1F468}&zwj;\u{1F468}&zwj;\u{1F467}&zwj;\u{1F467}",family_man_woman_boy_boy:"\u{1F468}&zwj;\u{1F469}&zwj;\u{1F466}&zwj;\u{1F466}",family_man_woman_girl:"\u{1F468}&zwj;\u{1F469}&zwj;\u{1F467}",family_man_woman_girl_boy:"\u{1F468}&zwj;\u{1F469}&zwj;\u{1F467}&zwj;\u{1F466}",family_man_woman_girl_girl:"\u{1F468}&zwj;\u{1F469}&zwj;\u{1F467}&zwj;\u{1F467}",family_woman_boy:"\u{1F469}&zwj;\u{1F466}",family_woman_boy_boy:"\u{1F469}&zwj;\u{1F466}&zwj;\u{1F466}",family_woman_girl:"\u{1F469}&zwj;\u{1F467}",family_woman_girl_boy:"\u{1F469}&zwj;\u{1F467}&zwj;\u{1F466}",family_woman_girl_girl:"\u{1F469}&zwj;\u{1F467}&zwj;\u{1F467}",family_woman_woman_boy:"\u{1F469}&zwj;\u{1F469}&zwj;\u{1F466}",family_woman_woman_boy_boy:"\u{1F469}&zwj;\u{1F469}&zwj;\u{1F466}&zwj;\u{1F466}",family_woman_woman_girl:"\u{1F469}&zwj;\u{1F469}&zwj;\u{1F467}",family_woman_woman_girl_boy:"\u{1F469}&zwj;\u{1F469}&zwj;\u{1F467}&zwj;\u{1F466}",family_woman_woman_girl_girl:"\u{1F469}&zwj;\u{1F469}&zwj;\u{1F467}&zwj;\u{1F467}",fast_forward:"\u23E9",fax:"\u{1F4E0}",fearful:"\u{1F628}",feet:"\u{1F43E}",female_detective:"\u{1F575}\uFE0F&zwj;\u2640\uFE0F",ferris_wheel:"\u{1F3A1}",ferry:"\u26F4",field_hockey:"\u{1F3D1}",file_cabinet:"\u{1F5C4}",file_folder:"\u{1F4C1}",film_projector:"\u{1F4FD}",film_strip:"\u{1F39E}",fire:"\u{1F525}",fire_engine:"\u{1F692}",fireworks:"\u{1F386}",first_quarter_moon:"\u{1F313}",first_quarter_moon_with_face:"\u{1F31B}",fish:"\u{1F41F}",fish_cake:"\u{1F365}",fishing_pole_and_fish:"\u{1F3A3}",fist_raised:"\u270A",fist_left:"\u{1F91B}",fist_right:"\u{1F91C}",flags:"\u{1F38F}",flashlight:"\u{1F526}",fleur_de_lis:"\u269C\uFE0F",flight_arrival:"\u{1F6EC}",flight_departure:"\u{1F6EB}",floppy_disk:"\u{1F4BE}",flower_playing_cards:"\u{1F3B4}",flushed:"\u{1F633}",fog:"\u{1F32B}",foggy:"\u{1F301}",football:"\u{1F3C8}",footprints:"\u{1F463}",fork_and_knife:"\u{1F374}",fountain:"\u26F2\uFE0F",fountain_pen:"\u{1F58B}",four_leaf_clover:"\u{1F340}",fox_face:"\u{1F98A}",framed_picture:"\u{1F5BC}",free:"\u{1F193}",fried_egg:"\u{1F373}",fried_shrimp:"\u{1F364}",fries:"\u{1F35F}",frog:"\u{1F438}",frowning:"\u{1F626}",frowning_face:"\u2639\uFE0F",frowning_man:"\u{1F64D}&zwj;\u2642\uFE0F",frowning_woman:"\u{1F64D}",middle_finger:"\u{1F595}",fuelpump:"\u26FD\uFE0F",full_moon:"\u{1F315}",full_moon_with_face:"\u{1F31D}",funeral_urn:"\u26B1\uFE0F",game_die:"\u{1F3B2}",gear:"\u2699\uFE0F",gem:"\u{1F48E}",gemini:"\u264A\uFE0F",ghost:"\u{1F47B}",gift:"\u{1F381}",gift_heart:"\u{1F49D}",girl:"\u{1F467}",globe_with_meridians:"\u{1F310}",goal_net:"\u{1F945}",goat:"\u{1F410}",golf:"\u26F3\uFE0F",golfing_man:"\u{1F3CC}\uFE0F",golfing_woman:"\u{1F3CC}\uFE0F&zwj;\u2640\uFE0F",gorilla:"\u{1F98D}",grapes:"\u{1F347}",green_apple:"\u{1F34F}",green_book:"\u{1F4D7}",green_heart:"\u{1F49A}",green_salad:"\u{1F957}",grey_exclamation:"\u2755",grey_question:"\u2754",grimacing:"\u{1F62C}",grin:"\u{1F601}",grinning:"\u{1F600}",guardsman:"\u{1F482}",guardswoman:"\u{1F482}&zwj;\u2640\uFE0F",guitar:"\u{1F3B8}",gun:"\u{1F52B}",haircut_woman:"\u{1F487}",haircut_man:"\u{1F487}&zwj;\u2642\uFE0F",hamburger:"\u{1F354}",hammer:"\u{1F528}",hammer_and_pick:"\u2692",hammer_and_wrench:"\u{1F6E0}",hamster:"\u{1F439}",hand:"\u270B",handbag:"\u{1F45C}",handshake:"\u{1F91D}",hankey:"\u{1F4A9}",hatched_chick:"\u{1F425}",hatching_chick:"\u{1F423}",headphones:"\u{1F3A7}",hear_no_evil:"\u{1F649}",heart:"\u2764\uFE0F",heart_decoration:"\u{1F49F}",heart_eyes:"\u{1F60D}",heart_eyes_cat:"\u{1F63B}",heartbeat:"\u{1F493}",heartpulse:"\u{1F497}",hearts:"\u2665\uFE0F",heavy_check_mark:"\u2714\uFE0F",heavy_division_sign:"\u2797",heavy_dollar_sign:"\u{1F4B2}",heavy_heart_exclamation:"\u2763\uFE0F",heavy_minus_sign:"\u2796",heavy_multiplication_x:"\u2716\uFE0F",heavy_plus_sign:"\u2795",helicopter:"\u{1F681}",herb:"\u{1F33F}",hibiscus:"\u{1F33A}",high_brightness:"\u{1F506}",high_heel:"\u{1F460}",hocho:"\u{1F52A}",hole:"\u{1F573}",honey_pot:"\u{1F36F}",horse:"\u{1F434}",horse_racing:"\u{1F3C7}",hospital:"\u{1F3E5}",hot_pepper:"\u{1F336}",hotdog:"\u{1F32D}",hotel:"\u{1F3E8}",hotsprings:"\u2668\uFE0F",hourglass:"\u231B\uFE0F",hourglass_flowing_sand:"\u23F3",house:"\u{1F3E0}",house_with_garden:"\u{1F3E1}",houses:"\u{1F3D8}",hugs:"\u{1F917}",hushed:"\u{1F62F}",ice_cream:"\u{1F368}",ice_hockey:"\u{1F3D2}",ice_skate:"\u26F8",icecream:"\u{1F366}",id:"\u{1F194}",ideograph_advantage:"\u{1F250}",imp:"\u{1F47F}",inbox_tray:"\u{1F4E5}",incoming_envelope:"\u{1F4E8}",tipping_hand_woman:"\u{1F481}",information_source:"\u2139\uFE0F",innocent:"\u{1F607}",interrobang:"\u2049\uFE0F",iphone:"\u{1F4F1}",izakaya_lantern:"\u{1F3EE}",jack_o_lantern:"\u{1F383}",japan:"\u{1F5FE}",japanese_castle:"\u{1F3EF}",japanese_goblin:"\u{1F47A}",japanese_ogre:"\u{1F479}",jeans:"\u{1F456}",joy:"\u{1F602}",joy_cat:"\u{1F639}",joystick:"\u{1F579}",kaaba:"\u{1F54B}",key:"\u{1F511}",keyboard:"\u2328\uFE0F",keycap_ten:"\u{1F51F}",kick_scooter:"\u{1F6F4}",kimono:"\u{1F458}",kiss:"\u{1F48B}",kissing:"\u{1F617}",kissing_cat:"\u{1F63D}",kissing_closed_eyes:"\u{1F61A}",kissing_heart:"\u{1F618}",kissing_smiling_eyes:"\u{1F619}",kiwi_fruit:"\u{1F95D}",koala:"\u{1F428}",koko:"\u{1F201}",label:"\u{1F3F7}",large_blue_circle:"\u{1F535}",large_blue_diamond:"\u{1F537}",large_orange_diamond:"\u{1F536}",last_quarter_moon:"\u{1F317}",last_quarter_moon_with_face:"\u{1F31C}",latin_cross:"\u271D\uFE0F",laughing:"\u{1F606}",leaves:"\u{1F343}",ledger:"\u{1F4D2}",left_luggage:"\u{1F6C5}",left_right_arrow:"\u2194\uFE0F",leftwards_arrow_with_hook:"\u21A9\uFE0F",lemon:"\u{1F34B}",leo:"\u264C\uFE0F",leopard:"\u{1F406}",level_slider:"\u{1F39A}",libra:"\u264E\uFE0F",light_rail:"\u{1F688}",link:"\u{1F517}",lion:"\u{1F981}",lips:"\u{1F444}",lipstick:"\u{1F484}",lizard:"\u{1F98E}",lock:"\u{1F512}",lock_with_ink_pen:"\u{1F50F}",lollipop:"\u{1F36D}",loop:"\u27BF",loud_sound:"\u{1F50A}",loudspeaker:"\u{1F4E2}",love_hotel:"\u{1F3E9}",love_letter:"\u{1F48C}",low_brightness:"\u{1F505}",lying_face:"\u{1F925}",m:"\u24C2\uFE0F",mag:"\u{1F50D}",mag_right:"\u{1F50E}",mahjong:"\u{1F004}\uFE0F",mailbox:"\u{1F4EB}",mailbox_closed:"\u{1F4EA}",mailbox_with_mail:"\u{1F4EC}",mailbox_with_no_mail:"\u{1F4ED}",man:"\u{1F468}",man_artist:"\u{1F468}&zwj;\u{1F3A8}",man_astronaut:"\u{1F468}&zwj;\u{1F680}",man_cartwheeling:"\u{1F938}&zwj;\u2642\uFE0F",man_cook:"\u{1F468}&zwj;\u{1F373}",man_dancing:"\u{1F57A}",man_facepalming:"\u{1F926}&zwj;\u2642\uFE0F",man_factory_worker:"\u{1F468}&zwj;\u{1F3ED}",man_farmer:"\u{1F468}&zwj;\u{1F33E}",man_firefighter:"\u{1F468}&zwj;\u{1F692}",man_health_worker:"\u{1F468}&zwj;\u2695\uFE0F",man_in_tuxedo:"\u{1F935}",man_judge:"\u{1F468}&zwj;\u2696\uFE0F",man_juggling:"\u{1F939}&zwj;\u2642\uFE0F",man_mechanic:"\u{1F468}&zwj;\u{1F527}",man_office_worker:"\u{1F468}&zwj;\u{1F4BC}",man_pilot:"\u{1F468}&zwj;\u2708\uFE0F",man_playing_handball:"\u{1F93E}&zwj;\u2642\uFE0F",man_playing_water_polo:"\u{1F93D}&zwj;\u2642\uFE0F",man_scientist:"\u{1F468}&zwj;\u{1F52C}",man_shrugging:"\u{1F937}&zwj;\u2642\uFE0F",man_singer:"\u{1F468}&zwj;\u{1F3A4}",man_student:"\u{1F468}&zwj;\u{1F393}",man_teacher:"\u{1F468}&zwj;\u{1F3EB}",man_technologist:"\u{1F468}&zwj;\u{1F4BB}",man_with_gua_pi_mao:"\u{1F472}",man_with_turban:"\u{1F473}",tangerine:"\u{1F34A}",mans_shoe:"\u{1F45E}",mantelpiece_clock:"\u{1F570}",maple_leaf:"\u{1F341}",martial_arts_uniform:"\u{1F94B}",mask:"\u{1F637}",massage_woman:"\u{1F486}",massage_man:"\u{1F486}&zwj;\u2642\uFE0F",meat_on_bone:"\u{1F356}",medal_military:"\u{1F396}",medal_sports:"\u{1F3C5}",mega:"\u{1F4E3}",melon:"\u{1F348}",memo:"\u{1F4DD}",men_wrestling:"\u{1F93C}&zwj;\u2642\uFE0F",menorah:"\u{1F54E}",mens:"\u{1F6B9}",metal:"\u{1F918}",metro:"\u{1F687}",microphone:"\u{1F3A4}",microscope:"\u{1F52C}",milk_glass:"\u{1F95B}",milky_way:"\u{1F30C}",minibus:"\u{1F690}",minidisc:"\u{1F4BD}",mobile_phone_off:"\u{1F4F4}",money_mouth_face:"\u{1F911}",money_with_wings:"\u{1F4B8}",moneybag:"\u{1F4B0}",monkey:"\u{1F412}",monkey_face:"\u{1F435}",monorail:"\u{1F69D}",moon:"\u{1F314}",mortar_board:"\u{1F393}",mosque:"\u{1F54C}",motor_boat:"\u{1F6E5}",motor_scooter:"\u{1F6F5}",motorcycle:"\u{1F3CD}",motorway:"\u{1F6E3}",mount_fuji:"\u{1F5FB}",mountain:"\u26F0",mountain_biking_man:"\u{1F6B5}",mountain_biking_woman:"\u{1F6B5}&zwj;\u2640\uFE0F",mountain_cableway:"\u{1F6A0}",mountain_railway:"\u{1F69E}",mountain_snow:"\u{1F3D4}",mouse:"\u{1F42D}",mouse2:"\u{1F401}",movie_camera:"\u{1F3A5}",moyai:"\u{1F5FF}",mrs_claus:"\u{1F936}",muscle:"\u{1F4AA}",mushroom:"\u{1F344}",musical_keyboard:"\u{1F3B9}",musical_note:"\u{1F3B5}",musical_score:"\u{1F3BC}",mute:"\u{1F507}",nail_care:"\u{1F485}",name_badge:"\u{1F4DB}",national_park:"\u{1F3DE}",nauseated_face:"\u{1F922}",necktie:"\u{1F454}",negative_squared_cross_mark:"\u274E",nerd_face:"\u{1F913}",neutral_face:"\u{1F610}",new:"\u{1F195}",new_moon:"\u{1F311}",new_moon_with_face:"\u{1F31A}",newspaper:"\u{1F4F0}",newspaper_roll:"\u{1F5DE}",next_track_button:"\u23ED",ng:"\u{1F196}",no_good_man:"\u{1F645}&zwj;\u2642\uFE0F",no_good_woman:"\u{1F645}",night_with_stars:"\u{1F303}",no_bell:"\u{1F515}",no_bicycles:"\u{1F6B3}",no_entry:"\u26D4\uFE0F",no_entry_sign:"\u{1F6AB}",no_mobile_phones:"\u{1F4F5}",no_mouth:"\u{1F636}",no_pedestrians:"\u{1F6B7}",no_smoking:"\u{1F6AD}","non-potable_water":"\u{1F6B1}",nose:"\u{1F443}",notebook:"\u{1F4D3}",notebook_with_decorative_cover:"\u{1F4D4}",notes:"\u{1F3B6}",nut_and_bolt:"\u{1F529}",o:"\u2B55\uFE0F",o2:"\u{1F17E}\uFE0F",ocean:"\u{1F30A}",octopus:"\u{1F419}",oden:"\u{1F362}",office:"\u{1F3E2}",oil_drum:"\u{1F6E2}",ok:"\u{1F197}",ok_hand:"\u{1F44C}",ok_man:"\u{1F646}&zwj;\u2642\uFE0F",ok_woman:"\u{1F646}",old_key:"\u{1F5DD}",older_man:"\u{1F474}",older_woman:"\u{1F475}",om:"\u{1F549}",on:"\u{1F51B}",oncoming_automobile:"\u{1F698}",oncoming_bus:"\u{1F68D}",oncoming_police_car:"\u{1F694}",oncoming_taxi:"\u{1F696}",open_file_folder:"\u{1F4C2}",open_hands:"\u{1F450}",open_mouth:"\u{1F62E}",open_umbrella:"\u2602\uFE0F",ophiuchus:"\u26CE",orange_book:"\u{1F4D9}",orthodox_cross:"\u2626\uFE0F",outbox_tray:"\u{1F4E4}",owl:"\u{1F989}",ox:"\u{1F402}",package:"\u{1F4E6}",page_facing_up:"\u{1F4C4}",page_with_curl:"\u{1F4C3}",pager:"\u{1F4DF}",paintbrush:"\u{1F58C}",palm_tree:"\u{1F334}",pancakes:"\u{1F95E}",panda_face:"\u{1F43C}",paperclip:"\u{1F4CE}",paperclips:"\u{1F587}",parasol_on_ground:"\u26F1",parking:"\u{1F17F}\uFE0F",part_alternation_mark:"\u303D\uFE0F",partly_sunny:"\u26C5\uFE0F",passenger_ship:"\u{1F6F3}",passport_control:"\u{1F6C2}",pause_button:"\u23F8",peace_symbol:"\u262E\uFE0F",peach:"\u{1F351}",peanuts:"\u{1F95C}",pear:"\u{1F350}",pen:"\u{1F58A}",pencil2:"\u270F\uFE0F",penguin:"\u{1F427}",pensive:"\u{1F614}",performing_arts:"\u{1F3AD}",persevere:"\u{1F623}",person_fencing:"\u{1F93A}",pouting_woman:"\u{1F64E}",phone:"\u260E\uFE0F",pick:"\u26CF",pig:"\u{1F437}",pig2:"\u{1F416}",pig_nose:"\u{1F43D}",pill:"\u{1F48A}",pineapple:"\u{1F34D}",ping_pong:"\u{1F3D3}",pisces:"\u2653\uFE0F",pizza:"\u{1F355}",place_of_worship:"\u{1F6D0}",plate_with_cutlery:"\u{1F37D}",play_or_pause_button:"\u23EF",point_down:"\u{1F447}",point_left:"\u{1F448}",point_right:"\u{1F449}",point_up:"\u261D\uFE0F",point_up_2:"\u{1F446}",police_car:"\u{1F693}",policewoman:"\u{1F46E}&zwj;\u2640\uFE0F",poodle:"\u{1F429}",popcorn:"\u{1F37F}",post_office:"\u{1F3E3}",postal_horn:"\u{1F4EF}",postbox:"\u{1F4EE}",potable_water:"\u{1F6B0}",potato:"\u{1F954}",pouch:"\u{1F45D}",poultry_leg:"\u{1F357}",pound:"\u{1F4B7}",rage:"\u{1F621}",pouting_cat:"\u{1F63E}",pouting_man:"\u{1F64E}&zwj;\u2642\uFE0F",pray:"\u{1F64F}",prayer_beads:"\u{1F4FF}",pregnant_woman:"\u{1F930}",previous_track_button:"\u23EE",prince:"\u{1F934}",princess:"\u{1F478}",printer:"\u{1F5A8}",purple_heart:"\u{1F49C}",purse:"\u{1F45B}",pushpin:"\u{1F4CC}",put_litter_in_its_place:"\u{1F6AE}",question:"\u2753",rabbit:"\u{1F430}",rabbit2:"\u{1F407}",racehorse:"\u{1F40E}",racing_car:"\u{1F3CE}",radio:"\u{1F4FB}",radio_button:"\u{1F518}",radioactive:"\u2622\uFE0F",railway_car:"\u{1F683}",railway_track:"\u{1F6E4}",rainbow:"\u{1F308}",rainbow_flag:"\u{1F3F3}\uFE0F&zwj;\u{1F308}",raised_back_of_hand:"\u{1F91A}",raised_hand_with_fingers_splayed:"\u{1F590}",raised_hands:"\u{1F64C}",raising_hand_woman:"\u{1F64B}",raising_hand_man:"\u{1F64B}&zwj;\u2642\uFE0F",ram:"\u{1F40F}",ramen:"\u{1F35C}",rat:"\u{1F400}",record_button:"\u23FA",recycle:"\u267B\uFE0F",red_circle:"\u{1F534}",registered:"\xAE\uFE0F",relaxed:"\u263A\uFE0F",relieved:"\u{1F60C}",reminder_ribbon:"\u{1F397}",repeat:"\u{1F501}",repeat_one:"\u{1F502}",rescue_worker_helmet:"\u26D1",restroom:"\u{1F6BB}",revolving_hearts:"\u{1F49E}",rewind:"\u23EA",rhinoceros:"\u{1F98F}",ribbon:"\u{1F380}",rice:"\u{1F35A}",rice_ball:"\u{1F359}",rice_cracker:"\u{1F358}",rice_scene:"\u{1F391}",right_anger_bubble:"\u{1F5EF}",ring:"\u{1F48D}",robot:"\u{1F916}",rocket:"\u{1F680}",rofl:"\u{1F923}",roll_eyes:"\u{1F644}",roller_coaster:"\u{1F3A2}",rooster:"\u{1F413}",rose:"\u{1F339}",rosette:"\u{1F3F5}",rotating_light:"\u{1F6A8}",round_pushpin:"\u{1F4CD}",rowing_man:"\u{1F6A3}",rowing_woman:"\u{1F6A3}&zwj;\u2640\uFE0F",rugby_football:"\u{1F3C9}",running_man:"\u{1F3C3}",running_shirt_with_sash:"\u{1F3BD}",running_woman:"\u{1F3C3}&zwj;\u2640\uFE0F",sa:"\u{1F202}\uFE0F",sagittarius:"\u2650\uFE0F",sake:"\u{1F376}",sandal:"\u{1F461}",santa:"\u{1F385}",satellite:"\u{1F4E1}",saxophone:"\u{1F3B7}",school:"\u{1F3EB}",school_satchel:"\u{1F392}",scissors:"\u2702\uFE0F",scorpion:"\u{1F982}",scorpius:"\u264F\uFE0F",scream:"\u{1F631}",scream_cat:"\u{1F640}",scroll:"\u{1F4DC}",seat:"\u{1F4BA}",secret:"\u3299\uFE0F",see_no_evil:"\u{1F648}",seedling:"\u{1F331}",selfie:"\u{1F933}",shallow_pan_of_food:"\u{1F958}",shamrock:"\u2618\uFE0F",shark:"\u{1F988}",shaved_ice:"\u{1F367}",sheep:"\u{1F411}",shell:"\u{1F41A}",shield:"\u{1F6E1}",shinto_shrine:"\u26E9",ship:"\u{1F6A2}",shirt:"\u{1F455}",shopping:"\u{1F6CD}",shopping_cart:"\u{1F6D2}",shower:"\u{1F6BF}",shrimp:"\u{1F990}",signal_strength:"\u{1F4F6}",six_pointed_star:"\u{1F52F}",ski:"\u{1F3BF}",skier:"\u26F7",skull:"\u{1F480}",skull_and_crossbones:"\u2620\uFE0F",sleeping:"\u{1F634}",sleeping_bed:"\u{1F6CC}",sleepy:"\u{1F62A}",slightly_frowning_face:"\u{1F641}",slightly_smiling_face:"\u{1F642}",slot_machine:"\u{1F3B0}",small_airplane:"\u{1F6E9}",small_blue_diamond:"\u{1F539}",small_orange_diamond:"\u{1F538}",small_red_triangle:"\u{1F53A}",small_red_triangle_down:"\u{1F53B}",smile:"\u{1F604}",smile_cat:"\u{1F638}",smiley:"\u{1F603}",smiley_cat:"\u{1F63A}",smiling_imp:"\u{1F608}",smirk:"\u{1F60F}",smirk_cat:"\u{1F63C}",smoking:"\u{1F6AC}",snail:"\u{1F40C}",snake:"\u{1F40D}",sneezing_face:"\u{1F927}",snowboarder:"\u{1F3C2}",snowflake:"\u2744\uFE0F",snowman:"\u26C4\uFE0F",snowman_with_snow:"\u2603\uFE0F",sob:"\u{1F62D}",soccer:"\u26BD\uFE0F",soon:"\u{1F51C}",sos:"\u{1F198}",sound:"\u{1F509}",space_invader:"\u{1F47E}",spades:"\u2660\uFE0F",spaghetti:"\u{1F35D}",sparkle:"\u2747\uFE0F",sparkler:"\u{1F387}",sparkles:"\u2728",sparkling_heart:"\u{1F496}",speak_no_evil:"\u{1F64A}",speaker:"\u{1F508}",speaking_head:"\u{1F5E3}",speech_balloon:"\u{1F4AC}",speedboat:"\u{1F6A4}",spider:"\u{1F577}",spider_web:"\u{1F578}",spiral_calendar:"\u{1F5D3}",spiral_notepad:"\u{1F5D2}",spoon:"\u{1F944}",squid:"\u{1F991}",stadium:"\u{1F3DF}",star:"\u2B50\uFE0F",star2:"\u{1F31F}",star_and_crescent:"\u262A\uFE0F",star_of_david:"\u2721\uFE0F",stars:"\u{1F320}",station:"\u{1F689}",statue_of_liberty:"\u{1F5FD}",steam_locomotive:"\u{1F682}",stew:"\u{1F372}",stop_button:"\u23F9",stop_sign:"\u{1F6D1}",stopwatch:"\u23F1",straight_ruler:"\u{1F4CF}",strawberry:"\u{1F353}",stuck_out_tongue:"\u{1F61B}",stuck_out_tongue_closed_eyes:"\u{1F61D}",stuck_out_tongue_winking_eye:"\u{1F61C}",studio_microphone:"\u{1F399}",stuffed_flatbread:"\u{1F959}",sun_behind_large_cloud:"\u{1F325}",sun_behind_rain_cloud:"\u{1F326}",sun_behind_small_cloud:"\u{1F324}",sun_with_face:"\u{1F31E}",sunflower:"\u{1F33B}",sunglasses:"\u{1F60E}",sunny:"\u2600\uFE0F",sunrise:"\u{1F305}",sunrise_over_mountains:"\u{1F304}",surfing_man:"\u{1F3C4}",surfing_woman:"\u{1F3C4}&zwj;\u2640\uFE0F",sushi:"\u{1F363}",suspension_railway:"\u{1F69F}",sweat:"\u{1F613}",sweat_drops:"\u{1F4A6}",sweat_smile:"\u{1F605}",sweet_potato:"\u{1F360}",swimming_man:"\u{1F3CA}",swimming_woman:"\u{1F3CA}&zwj;\u2640\uFE0F",symbols:"\u{1F523}",synagogue:"\u{1F54D}",syringe:"\u{1F489}",taco:"\u{1F32E}",tada:"\u{1F389}",tanabata_tree:"\u{1F38B}",taurus:"\u2649\uFE0F",taxi:"\u{1F695}",tea:"\u{1F375}",telephone_receiver:"\u{1F4DE}",telescope:"\u{1F52D}",tennis:"\u{1F3BE}",tent:"\u26FA\uFE0F",thermometer:"\u{1F321}",thinking:"\u{1F914}",thought_balloon:"\u{1F4AD}",ticket:"\u{1F3AB}",tickets:"\u{1F39F}",tiger:"\u{1F42F}",tiger2:"\u{1F405}",timer_clock:"\u23F2",tipping_hand_man:"\u{1F481}&zwj;\u2642\uFE0F",tired_face:"\u{1F62B}",tm:"\u2122\uFE0F",toilet:"\u{1F6BD}",tokyo_tower:"\u{1F5FC}",tomato:"\u{1F345}",tongue:"\u{1F445}",top:"\u{1F51D}",tophat:"\u{1F3A9}",tornado:"\u{1F32A}",trackball:"\u{1F5B2}",tractor:"\u{1F69C}",traffic_light:"\u{1F6A5}",train:"\u{1F68B}",train2:"\u{1F686}",tram:"\u{1F68A}",triangular_flag_on_post:"\u{1F6A9}",triangular_ruler:"\u{1F4D0}",trident:"\u{1F531}",triumph:"\u{1F624}",trolleybus:"\u{1F68E}",trophy:"\u{1F3C6}",tropical_drink:"\u{1F379}",tropical_fish:"\u{1F420}",truck:"\u{1F69A}",trumpet:"\u{1F3BA}",tulip:"\u{1F337}",tumbler_glass:"\u{1F943}",turkey:"\u{1F983}",turtle:"\u{1F422}",tv:"\u{1F4FA}",twisted_rightwards_arrows:"\u{1F500}",two_hearts:"\u{1F495}",two_men_holding_hands:"\u{1F46C}",two_women_holding_hands:"\u{1F46D}",u5272:"\u{1F239}",u5408:"\u{1F234}",u55b6:"\u{1F23A}",u6307:"\u{1F22F}\uFE0F",u6708:"\u{1F237}\uFE0F",u6709:"\u{1F236}",u6e80:"\u{1F235}",u7121:"\u{1F21A}\uFE0F",u7533:"\u{1F238}",u7981:"\u{1F232}",u7a7a:"\u{1F233}",umbrella:"\u2614\uFE0F",unamused:"\u{1F612}",underage:"\u{1F51E}",unicorn:"\u{1F984}",unlock:"\u{1F513}",up:"\u{1F199}",upside_down_face:"\u{1F643}",v:"\u270C\uFE0F",vertical_traffic_light:"\u{1F6A6}",vhs:"\u{1F4FC}",vibration_mode:"\u{1F4F3}",video_camera:"\u{1F4F9}",video_game:"\u{1F3AE}",violin:"\u{1F3BB}",virgo:"\u264D\uFE0F",volcano:"\u{1F30B}",volleyball:"\u{1F3D0}",vs:"\u{1F19A}",vulcan_salute:"\u{1F596}",walking_man:"\u{1F6B6}",walking_woman:"\u{1F6B6}&zwj;\u2640\uFE0F",waning_crescent_moon:"\u{1F318}",waning_gibbous_moon:"\u{1F316}",warning:"\u26A0\uFE0F",wastebasket:"\u{1F5D1}",watch:"\u231A\uFE0F",water_buffalo:"\u{1F403}",watermelon:"\u{1F349}",wave:"\u{1F44B}",wavy_dash:"\u3030\uFE0F",waxing_crescent_moon:"\u{1F312}",wc:"\u{1F6BE}",weary:"\u{1F629}",wedding:"\u{1F492}",weight_lifting_man:"\u{1F3CB}\uFE0F",weight_lifting_woman:"\u{1F3CB}\uFE0F&zwj;\u2640\uFE0F",whale:"\u{1F433}",whale2:"\u{1F40B}",wheel_of_dharma:"\u2638\uFE0F",wheelchair:"\u267F\uFE0F",white_check_mark:"\u2705",white_circle:"\u26AA\uFE0F",white_flag:"\u{1F3F3}\uFE0F",white_flower:"\u{1F4AE}",white_large_square:"\u2B1C\uFE0F",white_medium_small_square:"\u25FD\uFE0F",white_medium_square:"\u25FB\uFE0F",white_small_square:"\u25AB\uFE0F",white_square_button:"\u{1F533}",wilted_flower:"\u{1F940}",wind_chime:"\u{1F390}",wind_face:"\u{1F32C}",wine_glass:"\u{1F377}",wink:"\u{1F609}",wolf:"\u{1F43A}",woman:"\u{1F469}",woman_artist:"\u{1F469}&zwj;\u{1F3A8}",woman_astronaut:"\u{1F469}&zwj;\u{1F680}",woman_cartwheeling:"\u{1F938}&zwj;\u2640\uFE0F",woman_cook:"\u{1F469}&zwj;\u{1F373}",woman_facepalming:"\u{1F926}&zwj;\u2640\uFE0F",woman_factory_worker:"\u{1F469}&zwj;\u{1F3ED}",woman_farmer:"\u{1F469}&zwj;\u{1F33E}",woman_firefighter:"\u{1F469}&zwj;\u{1F692}",woman_health_worker:"\u{1F469}&zwj;\u2695\uFE0F",woman_judge:"\u{1F469}&zwj;\u2696\uFE0F",woman_juggling:"\u{1F939}&zwj;\u2640\uFE0F",woman_mechanic:"\u{1F469}&zwj;\u{1F527}",woman_office_worker:"\u{1F469}&zwj;\u{1F4BC}",woman_pilot:"\u{1F469}&zwj;\u2708\uFE0F",woman_playing_handball:"\u{1F93E}&zwj;\u2640\uFE0F",woman_playing_water_polo:"\u{1F93D}&zwj;\u2640\uFE0F",woman_scientist:"\u{1F469}&zwj;\u{1F52C}",woman_shrugging:"\u{1F937}&zwj;\u2640\uFE0F",woman_singer:"\u{1F469}&zwj;\u{1F3A4}",woman_student:"\u{1F469}&zwj;\u{1F393}",woman_teacher:"\u{1F469}&zwj;\u{1F3EB}",woman_technologist:"\u{1F469}&zwj;\u{1F4BB}",woman_with_turban:"\u{1F473}&zwj;\u2640\uFE0F",womans_clothes:"\u{1F45A}",womans_hat:"\u{1F452}",women_wrestling:"\u{1F93C}&zwj;\u2640\uFE0F",womens:"\u{1F6BA}",world_map:"\u{1F5FA}",worried:"\u{1F61F}",wrench:"\u{1F527}",writing_hand:"\u270D\uFE0F",x:"\u274C",yellow_heart:"\u{1F49B}",yen:"\u{1F4B4}",yin_yang:"\u262F\uFE0F",yum:"\u{1F60B}",zap:"\u26A1\uFE0F",zipper_mouth_face:"\u{1F910}",zzz:"\u{1F4A4}",octocat:'<img alt=":octocat:" height="20" width="20" align="absmiddle" src="https://assets-cdn.github.com/images/icons/emoji/octocat.png">',showdown:`<span style="font-family: 'Anonymous Pro', monospace; text-decoration: underline; text-decoration-style: dashed; text-decoration-color: #3e8b8a;text-underline-position: under;">S</span>`},r.Converter=function(d){var y={},m=[],x=[],S={},_=a,C={parsed:{},raw:"",format:""};E();function E(){d=d||{};for(var M in s)s.hasOwnProperty(M)&&(y[M]=s[M]);if(typeof d=="object")for(var P in d)d.hasOwnProperty(P)&&(y[P]=d[P]);else throw Error("Converter expects the passed parameter to be an object, but "+typeof d+" was passed instead.");y.extensions&&r.helper.forEach(y.extensions,T)}function T(M,P){if(P=P||null,r.helper.isString(M))if(M=r.helper.stdExtName(M),P=M,r.extensions[M]){console.warn("DEPRECATION WARNING: "+M+" is an old extension that uses a deprecated loading method.Please inform the developer that the extension should be updated!"),R(r.extensions[M],M);return}else if(!r.helper.isUndefined(o[M]))M=o[M];else throw Error('Extension "'+M+'" could not be loaded. It was either not found or is not a valid extension.');typeof M=="function"&&(M=M()),r.helper.isArray(M)||(M=[M]);var L=c(M,P);if(!L.valid)throw Error(L.error);for(var H=0;H<M.length;++H){switch(M[H].type){case"lang":m.push(M[H]);break;case"output":x.push(M[H]);break}if(M[H].hasOwnProperty("listeners"))for(var te in M[H].listeners)M[H].listeners.hasOwnProperty(te)&&N(te,M[H].listeners[te])}}function R(M,P){typeof M=="function"&&(M=M(new r.Converter)),r.helper.isArray(M)||(M=[M]);var L=c(M,P);if(!L.valid)throw Error(L.error);for(var H=0;H<M.length;++H)switch(M[H].type){case"lang":m.push(M[H]);break;case"output":x.push(M[H]);break;default:throw Error("Extension loader error: Type unrecognized!!!")}}function N(M,P){if(!r.helper.isString(M))throw Error("Invalid argument in converter.listen() method: name must be a string, but "+typeof M+" given");if(typeof P!="function")throw Error("Invalid argument in converter.listen() method: callback must be a function, but "+typeof P+" given");S.hasOwnProperty(M)||(S[M]=[]),S[M].push(P)}function D(M){var P=M.match(/^\s*/)[0].length,L=new RegExp("^\\s{0,"+P+"}","gm");return M.replace(L,"")}this._dispatch=function(P,L,H,te){if(S.hasOwnProperty(P))for(var q=0;q<S[P].length;++q){var ae=S[P][q](P,L,this,H,te);ae&&typeof ae!="undefined"&&(L=ae)}return L},this.listen=function(M,P){return N(M,P),this},this.makeHtml=function(M){if(!M)return M;var P={gHtmlBlocks:[],gHtmlMdBlocks:[],gHtmlSpans:[],gUrls:{},gTitles:{},gDimensions:{},gListLevel:0,hashLinkCounts:{},langExtensions:m,outputModifiers:x,converter:this,ghCodeBlocks:[],metadata:{parsed:{},raw:"",format:""}};return M=M.replace(/¨/g,"\xA8T"),M=M.replace(/\$/g,"\xA8D"),M=M.replace(/\r\n/g,`
`),M=M.replace(/\r/g,`
`),M=M.replace(/\u00A0/g,"&nbsp;"),y.smartIndentationFix&&(M=D(M)),M=`
`+M+`
`,M=r.subParser("detab")(M,y,P),M=M.replace(/^[ \t]+$/mg,""),r.helper.forEach(m,function(L){M=r.subParser("runExtension")(L,M,y,P)}),M=r.subParser("metadata")(M,y,P),M=r.subParser("hashPreCodeTags")(M,y,P),M=r.subParser("githubCodeBlocks")(M,y,P),M=r.subParser("hashHTMLBlocks")(M,y,P),M=r.subParser("hashCodeTags")(M,y,P),M=r.subParser("stripLinkDefinitions")(M,y,P),M=r.subParser("blockGamut")(M,y,P),M=r.subParser("unhashHTMLSpans")(M,y,P),M=r.subParser("unescapeSpecialChars")(M,y,P),M=M.replace(/¨D/g,"$$"),M=M.replace(/¨T/g,"\xA8"),M=r.subParser("completeHTMLDocument")(M,y,P),r.helper.forEach(x,function(L){M=r.subParser("runExtension")(L,M,y,P)}),C=P.metadata,M},this.makeMarkdown=this.makeMd=function(M,P){if(M=M.replace(/\r\n/g,`
`),M=M.replace(/\r/g,`
`),M=M.replace(/>[ \t]+</,">\xA8NBSP;<"),!P)if(window&&window.document)P=window.document;else throw new Error("HTMLParser is undefined. If in a webworker or nodejs environment, you need to provide a WHATWG DOM and HTML such as JSDOM");var L=P.createElement("div");L.innerHTML=M;var H={preList:_e(L)};ge(L);for(var te=L.childNodes,q="",ae=0;ae<te.length;ae++)q+=r.subParser("makeMarkdown.node")(te[ae],H);function ge(I){for(var Y=0;Y<I.childNodes.length;++Y){var V=I.childNodes[Y];V.nodeType===3?!/\S/.test(V.nodeValue)&&!/^[ ]+$/.test(V.nodeValue)?(I.removeChild(V),--Y):(V.nodeValue=V.nodeValue.split(`
`).join(" "),V.nodeValue=V.nodeValue.replace(/(\s)+/g,"$1")):V.nodeType===1&&ge(V)}}function _e(I){for(var Y=I.querySelectorAll("pre"),V=[],ee=0;ee<Y.length;++ee)if(Y[ee].childElementCount===1&&Y[ee].firstChild.tagName.toLowerCase()==="code"){var Ae=Y[ee].firstChild.innerHTML.trim(),Ee=Y[ee].firstChild.getAttribute("data-language")||"";if(Ee==="")for(var we=Y[ee].firstChild.className.split(" "),xe=0;xe<we.length;++xe){var O=we[xe].match(/^language-(.+)$/);if(O!==null){Ee=O[1];break}}Ae=r.helper.unescapeHTMLEntities(Ae),V.push(Ae),Y[ee].outerHTML='<precode language="'+Ee+'" precodenum="'+ee.toString()+'"></precode>'}else V.push(Y[ee].innerHTML),Y[ee].innerHTML="",Y[ee].setAttribute("prenum",ee.toString());return V}return q},this.setOption=function(M,P){y[M]=P},this.getOption=function(M){return y[M]},this.getOptions=function(){return y},this.addExtension=function(M,P){P=P||null,T(M,P)},this.useExtension=function(M){T(M)},this.setFlavor=function(M){if(!l.hasOwnProperty(M))throw Error(M+" flavor was not found");var P=l[M];_=M;for(var L in P)P.hasOwnProperty(L)&&(y[L]=P[L])},this.getFlavor=function(){return _},this.removeExtension=function(M){r.helper.isArray(M)||(M=[M]);for(var P=0;P<M.length;++P){for(var L=M[P],H=0;H<m.length;++H)m[H]===L&&m.splice(H,1);for(var te=0;te<x.length;++te)x[te]===L&&x.splice(te,1)}},this.getAllExtensions=function(){return{language:m,output:x}},this.getMetadata=function(M){return M?C.raw:C.parsed},this.getMetadataFormat=function(){return C.format},this._setMetadataPair=function(M,P){C.parsed[M]=P},this._setMetadataFormat=function(M){C.format=M},this._setMetadataRaw=function(M){C.raw=M}},r.subParser("anchors",function(d,y,m){d=m.converter._dispatch("anchors.before",d,y,m);var x=function(S,_,C,E,T,R,N){if(r.helper.isUndefined(N)&&(N=""),C=C.toLowerCase(),S.search(/\(<?\s*>? ?(['"].*['"])?\)$/m)>-1)E="";else if(!E)if(C||(C=_.toLowerCase().replace(/ ?\n/g," ")),E="#"+C,!r.helper.isUndefined(m.gUrls[C]))E=m.gUrls[C],r.helper.isUndefined(m.gTitles[C])||(N=m.gTitles[C]);else return S;E=E.replace(r.helper.regexes.asteriskDashAndColon,r.helper.escapeCharactersCallback);var D='<a href="'+E+'"';return N!==""&&N!==null&&(N=N.replace(/"/g,"&quot;"),N=N.replace(r.helper.regexes.asteriskDashAndColon,r.helper.escapeCharactersCallback),D+=' title="'+N+'"'),y.openLinksInNewWindow&&!/^#/.test(E)&&(D+=' rel="noopener noreferrer" target="\xA8E95Eblank"'),D+=">"+_+"</a>",D};return d=d.replace(/\[((?:\[[^\]]*]|[^\[\]])*)] ?(?:\n *)?\[(.*?)]()()()()/g,x),d=d.replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<([^>]*)>(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,x),d=d.replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,x),d=d.replace(/\[([^\[\]]+)]()()()()()/g,x),y.ghMentions&&(d=d.replace(/(^|\s)(\\)?(@([a-z\d]+(?:[a-z\d.-]+?[a-z\d]+)*))/gmi,function(S,_,C,E,T){if(C==="\\")return _+E;if(!r.helper.isString(y.ghMentionsLink))throw new Error("ghMentionsLink option must be a string");var R=y.ghMentionsLink.replace(/\{u}/g,T),N="";return y.openLinksInNewWindow&&(N=' rel="noopener noreferrer" target="\xA8E95Eblank"'),_+'<a href="'+R+'"'+N+">"+E+"</a>"})),d=m.converter._dispatch("anchors.after",d,y,m),d});var h=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+?\.[^'">\s]+?)()(\1)?(?=\s|$)(?!["<>])/gi,p=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+?)([.!?,()\[\]])?(\1)?(?=\s|$)(?!["<>])/gi,g=/()<(((https?|ftp|dict):\/\/|www\.)[^'">\s]+)()>()/gi,v=/(^|\s)(?:mailto:)?([A-Za-z0-9!#$%&'*+-/=?^_`{|}~.]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)(?=$|\s)/gmi,b=/<()(?:mailto:)?([-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,w=function(d){return function(y,m,x,S,_,C,E){x=x.replace(r.helper.regexes.asteriskDashAndColon,r.helper.escapeCharactersCallback);var T=x,R="",N="",D=m||"",M=E||"";return/^www\./i.test(x)&&(x=x.replace(/^www\./i,"http://www.")),d.excludeTrailingPunctuationFromURLs&&C&&(R=C),d.openLinksInNewWindow&&(N=' rel="noopener noreferrer" target="\xA8E95Eblank"'),D+'<a href="'+x+'"'+N+">"+T+"</a>"+R+M}},k=function(d,y){return function(m,x,S){var _="mailto:";return x=x||"",S=r.subParser("unescapeSpecialChars")(S,d,y),d.encodeEmails?(_=r.helper.encodeEmailAddress(_+S),S=r.helper.encodeEmailAddress(S)):_=_+S,x+'<a href="'+_+'">'+S+"</a>"}};r.subParser("autoLinks",function(d,y,m){return d=m.converter._dispatch("autoLinks.before",d,y,m),d=d.replace(g,w(y)),d=d.replace(b,k(y,m)),d=m.converter._dispatch("autoLinks.after",d,y,m),d}),r.subParser("simplifiedAutoLinks",function(d,y,m){return y.simplifiedAutoLink&&(d=m.converter._dispatch("simplifiedAutoLinks.before",d,y,m),y.excludeTrailingPunctuationFromURLs?d=d.replace(p,w(y)):d=d.replace(h,w(y)),d=d.replace(v,k(y,m)),d=m.converter._dispatch("simplifiedAutoLinks.after",d,y,m)),d}),r.subParser("blockGamut",function(d,y,m){return d=m.converter._dispatch("blockGamut.before",d,y,m),d=r.subParser("blockQuotes")(d,y,m),d=r.subParser("headers")(d,y,m),d=r.subParser("horizontalRule")(d,y,m),d=r.subParser("lists")(d,y,m),d=r.subParser("codeBlocks")(d,y,m),d=r.subParser("tables")(d,y,m),d=r.subParser("hashHTMLBlocks")(d,y,m),d=r.subParser("paragraphs")(d,y,m),d=m.converter._dispatch("blockGamut.after",d,y,m),d}),r.subParser("blockQuotes",function(d,y,m){d=m.converter._dispatch("blockQuotes.before",d,y,m),d=d+`
`;var x=/(^ {0,3}>[ \t]?.+\n(.+\n)*\n*)+/gm;return y.splitAdjacentBlockquotes&&(x=/^ {0,3}>[\s\S]*?(?:\n\n)/gm),d=d.replace(x,function(S){return S=S.replace(/^[ \t]*>[ \t]?/gm,""),S=S.replace(/¨0/g,""),S=S.replace(/^[ \t]+$/gm,""),S=r.subParser("githubCodeBlocks")(S,y,m),S=r.subParser("blockGamut")(S,y,m),S=S.replace(/(^|\n)/g,"$1 "),S=S.replace(/(\s*<pre>[^\r]+?<\/pre>)/gm,function(_,C){var E=C;return E=E.replace(/^ /mg,"\xA80"),E=E.replace(/¨0/g,""),E}),r.subParser("hashBlock")(`<blockquote>
`+S+`
</blockquote>`,y,m)}),d=m.converter._dispatch("blockQuotes.after",d,y,m),d}),r.subParser("codeBlocks",function(d,y,m){d=m.converter._dispatch("codeBlocks.before",d,y,m),d+="\xA80";var x=/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=¨0))/g;return d=d.replace(x,function(S,_,C){var E=_,T=C,R=`
`;return E=r.subParser("outdent")(E,y,m),E=r.subParser("encodeCode")(E,y,m),E=r.subParser("detab")(E,y,m),E=E.replace(/^\n+/g,""),E=E.replace(/\n+$/g,""),y.omitExtraWLInCodeBlocks&&(R=""),E="<pre><code>"+E+R+"</code></pre>",r.subParser("hashBlock")(E,y,m)+T}),d=d.replace(/¨0/,""),d=m.converter._dispatch("codeBlocks.after",d,y,m),d}),r.subParser("codeSpans",function(d,y,m){return d=m.converter._dispatch("codeSpans.before",d,y,m),typeof d=="undefined"&&(d=""),d=d.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,function(x,S,_,C){var E=C;return E=E.replace(/^([ \t]*)/g,""),E=E.replace(/[ \t]*$/g,""),E=r.subParser("encodeCode")(E,y,m),E=S+"<code>"+E+"</code>",E=r.subParser("hashHTMLSpans")(E,y,m),E}),d=m.converter._dispatch("codeSpans.after",d,y,m),d}),r.subParser("completeHTMLDocument",function(d,y,m){if(!y.completeHTMLDocument)return d;d=m.converter._dispatch("completeHTMLDocument.before",d,y,m);var x="html",S=`<!DOCTYPE HTML>
`,_="",C=`<meta charset="utf-8">
`,E="",T="";typeof m.metadata.parsed.doctype!="undefined"&&(S="<!DOCTYPE "+m.metadata.parsed.doctype+`>
`,x=m.metadata.parsed.doctype.toString().toLowerCase(),(x==="html"||x==="html5")&&(C='<meta charset="utf-8">'));for(var R in m.metadata.parsed)if(m.metadata.parsed.hasOwnProperty(R))switch(R.toLowerCase()){case"doctype":break;case"title":_="<title>"+m.metadata.parsed.title+`</title>
`;break;case"charset":x==="html"||x==="html5"?C='<meta charset="'+m.metadata.parsed.charset+`">
`:C='<meta name="charset" content="'+m.metadata.parsed.charset+`">
`;break;case"language":case"lang":E=' lang="'+m.metadata.parsed[R]+'"',T+='<meta name="'+R+'" content="'+m.metadata.parsed[R]+`">
`;break;default:T+='<meta name="'+R+'" content="'+m.metadata.parsed[R]+`">
`}return d=S+"<html"+E+`>
<head>
`+_+C+T+`</head>
<body>
`+d.trim()+`
</body>
</html>`,d=m.converter._dispatch("completeHTMLDocument.after",d,y,m),d}),r.subParser("detab",function(d,y,m){return d=m.converter._dispatch("detab.before",d,y,m),d=d.replace(/\t(?=\t)/g," "),d=d.replace(/\t/g,"\xA8A\xA8B"),d=d.replace(/¨B(.+?)¨A/g,function(x,S){for(var _=S,C=4-_.length%4,E=0;E<C;E++)_+=" ";return _}),d=d.replace(/¨A/g," "),d=d.replace(/¨B/g,""),d=m.converter._dispatch("detab.after",d,y,m),d}),r.subParser("ellipsis",function(d,y,m){return y.ellipsis&&(d=m.converter._dispatch("ellipsis.before",d,y,m),d=d.replace(/\.\.\./g,"\u2026"),d=m.converter._dispatch("ellipsis.after",d,y,m)),d}),r.subParser("emoji",function(d,y,m){if(!y.emoji)return d;d=m.converter._dispatch("emoji.before",d,y,m);var x=/:([\S]+?):/g;return d=d.replace(x,function(S,_){return r.helper.emojis.hasOwnProperty(_)?r.helper.emojis[_]:S}),d=m.converter._dispatch("emoji.after",d,y,m),d}),r.subParser("encodeAmpsAndAngles",function(d,y,m){return d=m.converter._dispatch("encodeAmpsAndAngles.before",d,y,m),d=d.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g,"&amp;"),d=d.replace(/<(?![a-z\/?$!])/gi,"&lt;"),d=d.replace(/</g,"&lt;"),d=d.replace(/>/g,"&gt;"),d=m.converter._dispatch("encodeAmpsAndAngles.after",d,y,m),d}),r.subParser("encodeBackslashEscapes",function(d,y,m){return d=m.converter._dispatch("encodeBackslashEscapes.before",d,y,m),d=d.replace(/\\(\\)/g,r.helper.escapeCharactersCallback),d=d.replace(/\\([`*_{}\[\]()>#+.!~=|:-])/g,r.helper.escapeCharactersCallback),d=m.converter._dispatch("encodeBackslashEscapes.after",d,y,m),d}),r.subParser("encodeCode",function(d,y,m){return d=m.converter._dispatch("encodeCode.before",d,y,m),d=d.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/([*_{}\[\]\\=~-])/g,r.helper.escapeCharactersCallback),d=m.converter._dispatch("encodeCode.after",d,y,m),d}),r.subParser("escapeSpecialCharsWithinTagAttributes",function(d,y,m){d=m.converter._dispatch("escapeSpecialCharsWithinTagAttributes.before",d,y,m);var x=/<\/?[a-z\d_:-]+(?:[\s]+[\s\S]+?)?>/gi,S=/<!(--(?:(?:[^>-]|-[^>])(?:[^-]|-[^-])*)--)>/gi;return d=d.replace(x,function(_){return _.replace(/(.)<\/?code>(?=.)/g,"$1`").replace(/([\\`*_~=|])/g,r.helper.escapeCharactersCallback)}),d=d.replace(S,function(_){return _.replace(/([\\`*_~=|])/g,r.helper.escapeCharactersCallback)}),d=m.converter._dispatch("escapeSpecialCharsWithinTagAttributes.after",d,y,m),d}),r.subParser("githubCodeBlocks",function(d,y,m){return y.ghCodeBlocks?(d=m.converter._dispatch("githubCodeBlocks.before",d,y,m),d+="\xA80",d=d.replace(/(?:^|\n)(?: {0,3})(```+|~~~+)(?: *)([^\s`~]*)\n([\s\S]*?)\n(?: {0,3})\1/g,function(x,S,_,C){var E=y.omitExtraWLInCodeBlocks?"":`
`;return C=r.subParser("encodeCode")(C,y,m),C=r.subParser("detab")(C,y,m),C=C.replace(/^\n+/g,""),C=C.replace(/\n+$/g,""),C="<pre><code"+(_?' class="'+_+" language-"+_+'"':"")+">"+C+E+"</code></pre>",C=r.subParser("hashBlock")(C,y,m),`
\xA8G`+(m.ghCodeBlocks.push({text:x,codeblock:C})-1)+`G
`}),d=d.replace(/¨0/,""),m.converter._dispatch("githubCodeBlocks.after",d,y,m)):d}),r.subParser("hashBlock",function(d,y,m){return d=m.converter._dispatch("hashBlock.before",d,y,m),d=d.replace(/(^\n+|\n+$)/g,""),d=`
\xA8K`+(m.gHtmlBlocks.push(d)-1)+`K
`,d=m.converter._dispatch("hashBlock.after",d,y,m),d}),r.subParser("hashCodeTags",function(d,y,m){d=m.converter._dispatch("hashCodeTags.before",d,y,m);var x=function(S,_,C,E){var T=C+r.subParser("encodeCode")(_,y,m)+E;return"\xA8C"+(m.gHtmlSpans.push(T)-1)+"C"};return d=r.helper.replaceRecursiveRegExp(d,x,"<code\\b[^>]*>","</code>","gim"),d=m.converter._dispatch("hashCodeTags.after",d,y,m),d}),r.subParser("hashElement",function(d,y,m){return function(x,S){var _=S;return _=_.replace(/\n\n/g,`
`),_=_.replace(/^\n/,""),_=_.replace(/\n+$/g,""),_=`
\xA8K`+(m.gHtmlBlocks.push(_)-1)+`K
`,_}}),r.subParser("hashHTMLBlocks",function(d,y,m){d=m.converter._dispatch("hashHTMLBlocks.before",d,y,m);var x=["pre","div","h1","h2","h3","h4","h5","h6","blockquote","table","dl","ol","ul","script","noscript","form","fieldset","iframe","math","style","section","header","footer","nav","article","aside","address","audio","canvas","figure","hgroup","output","video","p"],S=function(M,P,L,H){var te=M;return L.search(/\bmarkdown\b/)!==-1&&(te=L+m.converter.makeHtml(P)+H),`
\xA8K`+(m.gHtmlBlocks.push(te)-1)+`K
`};y.backslashEscapesHTMLTags&&(d=d.replace(/\\<(\/?[^>]+?)>/g,function(M,P){return"&lt;"+P+"&gt;"}));for(var _=0;_<x.length;++_)for(var C,E=new RegExp("^ {0,3}(<"+x[_]+"\\b[^>]*>)","im"),T="<"+x[_]+"\\b[^>]*>",R="</"+x[_]+">";(C=r.helper.regexIndexOf(d,E))!==-1;){var N=r.helper.splitAtIndex(d,C),D=r.helper.replaceRecursiveRegExp(N[1],S,T,R,"im");if(D===N[1])break;d=N[0].concat(D)}return d=d.replace(/(\n {0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,r.subParser("hashElement")(d,y,m)),d=r.helper.replaceRecursiveRegExp(d,function(M){return`
\xA8K`+(m.gHtmlBlocks.push(M)-1)+`K
`},"^ {0,3}<!--","-->","gm"),d=d.replace(/(?:\n\n)( {0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,r.subParser("hashElement")(d,y,m)),d=m.converter._dispatch("hashHTMLBlocks.after",d,y,m),d}),r.subParser("hashHTMLSpans",function(d,y,m){d=m.converter._dispatch("hashHTMLSpans.before",d,y,m);function x(S){return"\xA8C"+(m.gHtmlSpans.push(S)-1)+"C"}return d=d.replace(/<[^>]+?\/>/gi,function(S){return x(S)}),d=d.replace(/<([^>]+?)>[\s\S]*?<\/\1>/g,function(S){return x(S)}),d=d.replace(/<([^>]+?)\s[^>]+?>[\s\S]*?<\/\1>/g,function(S){return x(S)}),d=d.replace(/<[^>]+?>/gi,function(S){return x(S)}),d=m.converter._dispatch("hashHTMLSpans.after",d,y,m),d}),r.subParser("unhashHTMLSpans",function(d,y,m){d=m.converter._dispatch("unhashHTMLSpans.before",d,y,m);for(var x=0;x<m.gHtmlSpans.length;++x){for(var S=m.gHtmlSpans[x],_=0;/¨C(\d+)C/.test(S);){var C=RegExp.$1;if(S=S.replace("\xA8C"+C+"C",m.gHtmlSpans[C]),_===10){console.error("maximum nesting of 10 spans reached!!!");break}++_}d=d.replace("\xA8C"+x+"C",S)}return d=m.converter._dispatch("unhashHTMLSpans.after",d,y,m),d}),r.subParser("hashPreCodeTags",function(d,y,m){d=m.converter._dispatch("hashPreCodeTags.before",d,y,m);var x=function(S,_,C,E){var T=C+r.subParser("encodeCode")(_,y,m)+E;return`
\xA8G`+(m.ghCodeBlocks.push({text:S,codeblock:T})-1)+`G
`};return d=r.helper.replaceRecursiveRegExp(d,x,"^ {0,3}<pre\\b[^>]*>\\s*<code\\b[^>]*>","^ {0,3}</code>\\s*</pre>","gim"),d=m.converter._dispatch("hashPreCodeTags.after",d,y,m),d}),r.subParser("headers",function(d,y,m){d=m.converter._dispatch("headers.before",d,y,m);var x=isNaN(parseInt(y.headerLevelStart))?1:parseInt(y.headerLevelStart),S=y.smoothLivePreview?/^(.+)[ \t]*\n={2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n=+[ \t]*\n+/gm,_=y.smoothLivePreview?/^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n-+[ \t]*\n+/gm;d=d.replace(S,function(T,R){var N=r.subParser("spanGamut")(R,y,m),D=y.noHeaderId?"":' id="'+E(R)+'"',M=x,P="<h"+M+D+">"+N+"</h"+M+">";return r.subParser("hashBlock")(P,y,m)}),d=d.replace(_,function(T,R){var N=r.subParser("spanGamut")(R,y,m),D=y.noHeaderId?"":' id="'+E(R)+'"',M=x+1,P="<h"+M+D+">"+N+"</h"+M+">";return r.subParser("hashBlock")(P,y,m)});var C=y.requireSpaceBeforeHeadingText?/^(#{1,6})[ \t]+(.+?)[ \t]*#*\n+/gm:/^(#{1,6})[ \t]*(.+?)[ \t]*#*\n+/gm;d=d.replace(C,function(T,R,N){var D=N;y.customizedHeaderId&&(D=N.replace(/\s?\{([^{]+?)}\s*$/,""));var M=r.subParser("spanGamut")(D,y,m),P=y.noHeaderId?"":' id="'+E(N)+'"',L=x-1+R.length,H="<h"+L+P+">"+M+"</h"+L+">";return r.subParser("hashBlock")(H,y,m)});function E(T){var R,N;if(y.customizedHeaderId){var D=T.match(/\{([^{]+?)}\s*$/);D&&D[1]&&(T=D[1])}return R=T,r.helper.isString(y.prefixHeaderId)?N=y.prefixHeaderId:y.prefixHeaderId===!0?N="section-":N="",y.rawPrefixHeaderId||(R=N+R),y.ghCompatibleHeaderId?R=R.replace(/ /g,"-").replace(/&amp;/g,"").replace(/¨T/g,"").replace(/¨D/g,"").replace(/[&+$,\/:;=?@"#{}|^¨~\[\]`\\*)(%.!'<>]/g,"").toLowerCase():y.rawHeaderId?R=R.replace(/ /g,"-").replace(/&amp;/g,"&").replace(/¨T/g,"\xA8").replace(/¨D/g,"$").replace(/["']/g,"-").toLowerCase():R=R.replace(/[^\w]/g,"").toLowerCase(),y.rawPrefixHeaderId&&(R=N+R),m.hashLinkCounts[R]?R=R+"-"+m.hashLinkCounts[R]++:m.hashLinkCounts[R]=1,R}return d=m.converter._dispatch("headers.after",d,y,m),d}),r.subParser("horizontalRule",function(d,y,m){d=m.converter._dispatch("horizontalRule.before",d,y,m);var x=r.subParser("hashBlock")("<hr />",y,m);return d=d.replace(/^ {0,2}( ?-){3,}[ \t]*$/gm,x),d=d.replace(/^ {0,2}( ?\*){3,}[ \t]*$/gm,x),d=d.replace(/^ {0,2}( ?_){3,}[ \t]*$/gm,x),d=m.converter._dispatch("horizontalRule.after",d,y,m),d}),r.subParser("images",function(d,y,m){d=m.converter._dispatch("images.before",d,y,m);var x=/!\[([^\]]*?)][ \t]*()\([ \t]?<?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,S=/!\[([^\]]*?)][ \t]*()\([ \t]?<([^>]*)>(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(?:(["'])([^"]*?)\6))?[ \t]?\)/g,_=/!\[([^\]]*?)][ \t]*()\([ \t]?<?(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,C=/!\[([^\]]*?)] ?(?:\n *)?\[([\s\S]*?)]()()()()()/g,E=/!\[([^\[\]]+)]()()()()()/g;function T(N,D,M,P,L,H,te,q){return P=P.replace(/\s/g,""),R(N,D,M,P,L,H,te,q)}function R(N,D,M,P,L,H,te,q){var ae=m.gUrls,ge=m.gTitles,_e=m.gDimensions;if(M=M.toLowerCase(),q||(q=""),N.search(/\(<?\s*>? ?(['"].*['"])?\)$/m)>-1)P="";else if(P===""||P===null)if((M===""||M===null)&&(M=D.toLowerCase().replace(/ ?\n/g," ")),P="#"+M,!r.helper.isUndefined(ae[M]))P=ae[M],r.helper.isUndefined(ge[M])||(q=ge[M]),r.helper.isUndefined(_e[M])||(L=_e[M].width,H=_e[M].height);else return N;D=D.replace(/"/g,"&quot;").replace(r.helper.regexes.asteriskDashAndColon,r.helper.escapeCharactersCallback),P=P.replace(r.helper.regexes.asteriskDashAndColon,r.helper.escapeCharactersCallback);var I='<img src="'+P+'" alt="'+D+'"';return q&&r.helper.isString(q)&&(q=q.replace(/"/g,"&quot;").replace(r.helper.regexes.asteriskDashAndColon,r.helper.escapeCharactersCallback),I+=' title="'+q+'"'),L&&H&&(L=L==="*"?"auto":L,H=H==="*"?"auto":H,I+=' width="'+L+'"',I+=' height="'+H+'"'),I+=" />",I}return d=d.replace(C,R),d=d.replace(_,T),d=d.replace(S,R),d=d.replace(x,R),d=d.replace(E,R),d=m.converter._dispatch("images.after",d,y,m),d}),r.subParser("italicsAndBold",function(d,y,m){d=m.converter._dispatch("italicsAndBold.before",d,y,m);function x(S,_,C){return _+S+C}return y.literalMidWordUnderscores?(d=d.replace(/\b___(\S[\s\S]*?)___\b/g,function(S,_){return x(_,"<strong><em>","</em></strong>")}),d=d.replace(/\b__(\S[\s\S]*?)__\b/g,function(S,_){return x(_,"<strong>","</strong>")}),d=d.replace(/\b_(\S[\s\S]*?)_\b/g,function(S,_){return x(_,"<em>","</em>")})):(d=d.replace(/___(\S[\s\S]*?)___/g,function(S,_){return/\S$/.test(_)?x(_,"<strong><em>","</em></strong>"):S}),d=d.replace(/__(\S[\s\S]*?)__/g,function(S,_){return/\S$/.test(_)?x(_,"<strong>","</strong>"):S}),d=d.replace(/_([^\s_][\s\S]*?)_/g,function(S,_){return/\S$/.test(_)?x(_,"<em>","</em>"):S})),y.literalMidWordAsterisks?(d=d.replace(/([^*]|^)\B\*\*\*(\S[\s\S]*?)\*\*\*\B(?!\*)/g,function(S,_,C){return x(C,_+"<strong><em>","</em></strong>")}),d=d.replace(/([^*]|^)\B\*\*(\S[\s\S]*?)\*\*\B(?!\*)/g,function(S,_,C){return x(C,_+"<strong>","</strong>")}),d=d.replace(/([^*]|^)\B\*(\S[\s\S]*?)\*\B(?!\*)/g,function(S,_,C){return x(C,_+"<em>","</em>")})):(d=d.replace(/\*\*\*(\S[\s\S]*?)\*\*\*/g,function(S,_){return/\S$/.test(_)?x(_,"<strong><em>","</em></strong>"):S}),d=d.replace(/\*\*(\S[\s\S]*?)\*\*/g,function(S,_){return/\S$/.test(_)?x(_,"<strong>","</strong>"):S}),d=d.replace(/\*([^\s*][\s\S]*?)\*/g,function(S,_){return/\S$/.test(_)?x(_,"<em>","</em>"):S})),d=m.converter._dispatch("italicsAndBold.after",d,y,m),d}),r.subParser("lists",function(d,y,m){function x(C,E){m.gListLevel++,C=C.replace(/\n{2,}$/,`
`),C+="\xA80";var T=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0| {0,3}([*+-]|\d+[.])[ \t]+))/gm,R=/\n[ \t]*\n(?!¨0)/.test(C);return y.disableForced4SpacesIndentedSublists&&(T=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0|\2([*+-]|\d+[.])[ \t]+))/gm),C=C.replace(T,function(N,D,M,P,L,H,te){te=te&&te.trim()!=="";var q=r.subParser("outdent")(L,y,m),ae="";return H&&y.tasklists&&(ae=' class="task-list-item" style="list-style-type: none;"',q=q.replace(/^[ \t]*\[(x|X| )?]/m,function(){var ge='<input type="checkbox" disabled style="margin: 0px 0.35em 0.25em -1.6em; vertical-align: middle;"';return te&&(ge+=" checked"),ge+=">",ge})),q=q.replace(/^([-*+]|\d\.)[ \t]+[\S\n ]*/g,function(ge){return"\xA8A"+ge}),D||q.search(/\n{2,}/)>-1?(q=r.subParser("githubCodeBlocks")(q,y,m),q=r.subParser("blockGamut")(q,y,m)):(q=r.subParser("lists")(q,y,m),q=q.replace(/\n$/,""),q=r.subParser("hashHTMLBlocks")(q,y,m),q=q.replace(/\n\n+/g,`
`),R?q=r.subParser("paragraphs")(q,y,m):q=r.subParser("spanGamut")(q,y,m)),q=q.replace("\xA8A",""),q="<li"+ae+">"+q+`</li>
`,q}),C=C.replace(/¨0/g,""),m.gListLevel--,E&&(C=C.replace(/\s+$/,"")),C}function S(C,E){if(E==="ol"){var T=C.match(/^ *(\d+)\./);if(T&&T[1]!=="1")return' start="'+T[1]+'"'}return""}function _(C,E,T){var R=y.disableForced4SpacesIndentedSublists?/^ ?\d+\.[ \t]/gm:/^ {0,3}\d+\.[ \t]/gm,N=y.disableForced4SpacesIndentedSublists?/^ ?[*+-][ \t]/gm:/^ {0,3}[*+-][ \t]/gm,D=E==="ul"?R:N,M="";if(C.search(D)!==-1)(function L(H){var te=H.search(D),q=S(C,E);te!==-1?(M+=`
<`+E+q+`>
`+x(H.slice(0,te),!!T)+"</"+E+`>
`,E=E==="ul"?"ol":"ul",D=E==="ul"?R:N,L(H.slice(te))):M+=`
<`+E+q+`>
`+x(H,!!T)+"</"+E+`>
`})(C);else{var P=S(C,E);M=`
<`+E+P+`>
`+x(C,!!T)+"</"+E+`>
`}return M}return d=m.converter._dispatch("lists.before",d,y,m),d+="\xA80",m.gListLevel?d=d.replace(/^(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,function(C,E,T){var R=T.search(/[*+-]/g)>-1?"ul":"ol";return _(E,R,!0)}):d=d.replace(/(\n\n|^\n?)(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,function(C,E,T,R){var N=R.search(/[*+-]/g)>-1?"ul":"ol";return _(T,N,!1)}),d=d.replace(/¨0/,""),d=m.converter._dispatch("lists.after",d,y,m),d}),r.subParser("metadata",function(d,y,m){if(!y.metadata)return d;d=m.converter._dispatch("metadata.before",d,y,m);function x(S){m.metadata.raw=S,S=S.replace(/&/g,"&amp;").replace(/"/g,"&quot;"),S=S.replace(/\n {4}/g," "),S.replace(/^([\S ]+): +([\s\S]+?)$/gm,function(_,C,E){return m.metadata.parsed[C]=E,""})}return d=d.replace(/^\s*«««+(\S*?)\n([\s\S]+?)\n»»»+\n/,function(S,_,C){return x(C),"\xA8M"}),d=d.replace(/^\s*---+(\S*?)\n([\s\S]+?)\n---+\n/,function(S,_,C){return _&&(m.metadata.format=_),x(C),"\xA8M"}),d=d.replace(/¨M/g,""),d=m.converter._dispatch("metadata.after",d,y,m),d}),r.subParser("outdent",function(d,y,m){return d=m.converter._dispatch("outdent.before",d,y,m),d=d.replace(/^(\t|[ ]{1,4})/gm,"\xA80"),d=d.replace(/¨0/g,""),d=m.converter._dispatch("outdent.after",d,y,m),d}),r.subParser("paragraphs",function(d,y,m){d=m.converter._dispatch("paragraphs.before",d,y,m),d=d.replace(/^\n+/g,""),d=d.replace(/\n+$/g,"");for(var x=d.split(/\n{2,}/g),S=[],_=x.length,C=0;C<_;C++){var E=x[C];E.search(/¨(K|G)(\d+)\1/g)>=0?S.push(E):E.search(/\S/)>=0&&(E=r.subParser("spanGamut")(E,y,m),E=E.replace(/^([ \t]*)/g,"<p>"),E+="</p>",S.push(E))}for(_=S.length,C=0;C<_;C++){for(var T="",R=S[C],N=!1;/¨(K|G)(\d+)\1/.test(R);){var D=RegExp.$1,M=RegExp.$2;D==="K"?T=m.gHtmlBlocks[M]:N?T=r.subParser("encodeCode")(m.ghCodeBlocks[M].text,y,m):T=m.ghCodeBlocks[M].codeblock,T=T.replace(/\$/g,"$$$$"),R=R.replace(/(\n\n)?¨(K|G)\d+\2(\n\n)?/,T),/^<pre\b[^>]*>\s*<code\b[^>]*>/.test(R)&&(N=!0)}S[C]=R}return d=S.join(`
`),d=d.replace(/^\n+/g,""),d=d.replace(/\n+$/g,""),m.converter._dispatch("paragraphs.after",d,y,m)}),r.subParser("runExtension",function(d,y,m,x){if(d.filter)y=d.filter(y,x.converter,m);else if(d.regex){var S=d.regex;S instanceof RegExp||(S=new RegExp(S,"g")),y=y.replace(S,d.replace)}return y}),r.subParser("spanGamut",function(d,y,m){return d=m.converter._dispatch("spanGamut.before",d,y,m),d=r.subParser("codeSpans")(d,y,m),d=r.subParser("escapeSpecialCharsWithinTagAttributes")(d,y,m),d=r.subParser("encodeBackslashEscapes")(d,y,m),d=r.subParser("images")(d,y,m),d=r.subParser("anchors")(d,y,m),d=r.subParser("autoLinks")(d,y,m),d=r.subParser("simplifiedAutoLinks")(d,y,m),d=r.subParser("emoji")(d,y,m),d=r.subParser("underline")(d,y,m),d=r.subParser("italicsAndBold")(d,y,m),d=r.subParser("strikethrough")(d,y,m),d=r.subParser("ellipsis")(d,y,m),d=r.subParser("hashHTMLSpans")(d,y,m),d=r.subParser("encodeAmpsAndAngles")(d,y,m),y.simpleLineBreaks?/\n\n¨K/.test(d)||(d=d.replace(/\n+/g,`<br />
`)):d=d.replace(/ +\n/g,`<br />
`),d=m.converter._dispatch("spanGamut.after",d,y,m),d}),r.subParser("strikethrough",function(d,y,m){function x(S){return y.simplifiedAutoLink&&(S=r.subParser("simplifiedAutoLinks")(S,y,m)),"<del>"+S+"</del>"}return y.strikethrough&&(d=m.converter._dispatch("strikethrough.before",d,y,m),d=d.replace(/(?:~){2}([\s\S]+?)(?:~){2}/g,function(S,_){return x(_)}),d=m.converter._dispatch("strikethrough.after",d,y,m)),d}),r.subParser("stripLinkDefinitions",function(d,y,m){var x=/^ {0,3}\[([^\]]+)]:[ \t]*\n?[ \t]*<?([^>\s]+)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n+|(?=¨0))/gm,S=/^ {0,3}\[([^\]]+)]:[ \t]*\n?[ \t]*<?(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n\n|(?=¨0)|(?=\n\[))/gm;d+="\xA80";var _=function(C,E,T,R,N,D,M){return E=E.toLowerCase(),d.toLowerCase().split(E).length-1<2?C:(T.match(/^data:.+?\/.+?;base64,/)?m.gUrls[E]=T.replace(/\s/g,""):m.gUrls[E]=r.subParser("encodeAmpsAndAngles")(T,y,m),D?D+M:(M&&(m.gTitles[E]=M.replace(/"|'/g,"&quot;")),y.parseImgDimensions&&R&&N&&(m.gDimensions[E]={width:R,height:N}),""))};return d=d.replace(S,_),d=d.replace(x,_),d=d.replace(/¨0/,""),d}),r.subParser("tables",function(d,y,m){if(!y.tables)return d;var x=/^ {0,3}\|?.+\|.+\n {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|¨0)/gm,S=/^ {0,3}\|.+\|[ \t]*\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|¨0)/gm;function _(N){return/^:[ \t]*--*$/.test(N)?' style="text-align:left;"':/^--*[ \t]*:[ \t]*$/.test(N)?' style="text-align:right;"':/^:[ \t]*--*[ \t]*:$/.test(N)?' style="text-align:center;"':""}function C(N,D){var M="";return N=N.trim(),(y.tablesHeaderId||y.tableHeaderId)&&(M=' id="'+N.replace(/ /g,"_").toLowerCase()+'"'),N=r.subParser("spanGamut")(N,y,m),"<th"+M+D+">"+N+`</th>
`}function E(N,D){var M=r.subParser("spanGamut")(N,y,m);return"<td"+D+">"+M+`</td>
`}function T(N,D){for(var M=`<table>
<thead>
<tr>
`,P=N.length,L=0;L<P;++L)M+=N[L];for(M+=`</tr>
</thead>
<tbody>
`,L=0;L<D.length;++L){M+=`<tr>
`;for(var H=0;H<P;++H)M+=D[L][H];M+=`</tr>
`}return M+=`</tbody>
</table>
`,M}function R(N){var D,M=N.split(`
`);for(D=0;D<M.length;++D)/^ {0,3}\|/.test(M[D])&&(M[D]=M[D].replace(/^ {0,3}\|/,"")),/\|[ \t]*$/.test(M[D])&&(M[D]=M[D].replace(/\|[ \t]*$/,"")),M[D]=r.subParser("codeSpans")(M[D],y,m);var P=M[0].split("|").map(function(I){return I.trim()}),L=M[1].split("|").map(function(I){return I.trim()}),H=[],te=[],q=[],ae=[];for(M.shift(),M.shift(),D=0;D<M.length;++D)M[D].trim()!==""&&H.push(M[D].split("|").map(function(I){return I.trim()}));if(P.length<L.length)return N;for(D=0;D<L.length;++D)q.push(_(L[D]));for(D=0;D<P.length;++D)r.helper.isUndefined(q[D])&&(q[D]=""),te.push(C(P[D],q[D]));for(D=0;D<H.length;++D){for(var ge=[],_e=0;_e<te.length;++_e)r.helper.isUndefined(H[D][_e]),ge.push(E(H[D][_e],q[_e]));ae.push(ge)}return T(te,ae)}return d=m.converter._dispatch("tables.before",d,y,m),d=d.replace(/\\(\|)/g,r.helper.escapeCharactersCallback),d=d.replace(x,R),d=d.replace(S,R),d=m.converter._dispatch("tables.after",d,y,m),d}),r.subParser("underline",function(d,y,m){return y.underline&&(d=m.converter._dispatch("underline.before",d,y,m),y.literalMidWordUnderscores?(d=d.replace(/\b___(\S[\s\S]*?)___\b/g,function(x,S){return"<u>"+S+"</u>"}),d=d.replace(/\b__(\S[\s\S]*?)__\b/g,function(x,S){return"<u>"+S+"</u>"})):(d=d.replace(/___(\S[\s\S]*?)___/g,function(x,S){return/\S$/.test(S)?"<u>"+S+"</u>":x}),d=d.replace(/__(\S[\s\S]*?)__/g,function(x,S){return/\S$/.test(S)?"<u>"+S+"</u>":x})),d=d.replace(/(_)/g,r.helper.escapeCharactersCallback),d=m.converter._dispatch("underline.after",d,y,m)),d}),r.subParser("unescapeSpecialChars",function(d,y,m){return d=m.converter._dispatch("unescapeSpecialChars.before",d,y,m),d=d.replace(/¨E(\d+)E/g,function(x,S){var _=parseInt(S);return String.fromCharCode(_)}),d=m.converter._dispatch("unescapeSpecialChars.after",d,y,m),d}),r.subParser("makeMarkdown.blockquote",function(d,y){var m="";if(d.hasChildNodes())for(var x=d.childNodes,S=x.length,_=0;_<S;++_){var C=r.subParser("makeMarkdown.node")(x[_],y);C!==""&&(m+=C)}return m=m.trim(),m="> "+m.split(`
`).join(`
> `),m}),r.subParser("makeMarkdown.codeBlock",function(d,y){var m=d.getAttribute("language"),x=d.getAttribute("precodenum");return"```"+m+`
`+y.preList[x]+"\n```"}),r.subParser("makeMarkdown.codeSpan",function(d){return"`"+d.innerHTML+"`"}),r.subParser("makeMarkdown.emphasis",function(d,y){var m="";if(d.hasChildNodes()){m+="*";for(var x=d.childNodes,S=x.length,_=0;_<S;++_)m+=r.subParser("makeMarkdown.node")(x[_],y);m+="*"}return m}),r.subParser("makeMarkdown.header",function(d,y,m){var x=new Array(m+1).join("#"),S="";if(d.hasChildNodes()){S=x+" ";for(var _=d.childNodes,C=_.length,E=0;E<C;++E)S+=r.subParser("makeMarkdown.node")(_[E],y)}return S}),r.subParser("makeMarkdown.hr",function(){return"---"}),r.subParser("makeMarkdown.image",function(d){var y="";return d.hasAttribute("src")&&(y+="!["+d.getAttribute("alt")+"](",y+="<"+d.getAttribute("src")+">",d.hasAttribute("width")&&d.hasAttribute("height")&&(y+=" ="+d.getAttribute("width")+"x"+d.getAttribute("height")),d.hasAttribute("title")&&(y+=' "'+d.getAttribute("title")+'"'),y+=")"),y}),r.subParser("makeMarkdown.links",function(d,y){var m="";if(d.hasChildNodes()&&d.hasAttribute("href")){var x=d.childNodes,S=x.length;m="[";for(var _=0;_<S;++_)m+=r.subParser("makeMarkdown.node")(x[_],y);m+="](",m+="<"+d.getAttribute("href")+">",d.hasAttribute("title")&&(m+=' "'+d.getAttribute("title")+'"'),m+=")"}return m}),r.subParser("makeMarkdown.list",function(d,y,m){var x="";if(!d.hasChildNodes())return"";for(var S=d.childNodes,_=S.length,C=d.getAttribute("start")||1,E=0;E<_;++E)if(!(typeof S[E].tagName=="undefined"||S[E].tagName.toLowerCase()!=="li")){var T="";m==="ol"?T=C.toString()+". ":T="- ",x+=T+r.subParser("makeMarkdown.listItem")(S[E],y),++C}return x+=`
<!-- -->
`,x.trim()}),r.subParser("makeMarkdown.listItem",function(d,y){for(var m="",x=d.childNodes,S=x.length,_=0;_<S;++_)m+=r.subParser("makeMarkdown.node")(x[_],y);return/\n$/.test(m)?m=m.split(`
`).join(`
`).replace(/^ {4}$/gm,"").replace(/\n\n+/g,`
`):m+=`
`,m}),r.subParser("makeMarkdown.node",function(d,y,m){m=m||!1;var x="";if(d.nodeType===3)return r.subParser("makeMarkdown.txt")(d,y);if(d.nodeType===8)return"<!--"+d.data+`-->
`;if(d.nodeType!==1)return"";var S=d.tagName.toLowerCase();switch(S){case"h1":m||(x=r.subParser("makeMarkdown.header")(d,y,1)+`
`);break;case"h2":m||(x=r.subParser("makeMarkdown.header")(d,y,2)+`
`);break;case"h3":m||(x=r.subParser("makeMarkdown.header")(d,y,3)+`
`);break;case"h4":m||(x=r.subParser("makeMarkdown.header")(d,y,4)+`
`);break;case"h5":m||(x=r.subParser("makeMarkdown.header")(d,y,5)+`
`);break;case"h6":m||(x=r.subParser("makeMarkdown.header")(d,y,6)+`
`);break;case"p":m||(x=r.subParser("makeMarkdown.paragraph")(d,y)+`
`);break;case"blockquote":m||(x=r.subParser("makeMarkdown.blockquote")(d,y)+`
`);break;case"hr":m||(x=r.subParser("makeMarkdown.hr")(d,y)+`
`);break;case"ol":m||(x=r.subParser("makeMarkdown.list")(d,y,"ol")+`
`);break;case"ul":m||(x=r.subParser("makeMarkdown.list")(d,y,"ul")+`
`);break;case"precode":m||(x=r.subParser("makeMarkdown.codeBlock")(d,y)+`
`);break;case"pre":m||(x=r.subParser("makeMarkdown.pre")(d,y)+`
`);break;case"table":m||(x=r.subParser("makeMarkdown.table")(d,y)+`
`);break;case"code":x=r.subParser("makeMarkdown.codeSpan")(d,y);break;case"em":case"i":x=r.subParser("makeMarkdown.emphasis")(d,y);break;case"strong":case"b":x=r.subParser("makeMarkdown.strong")(d,y);break;case"del":x=r.subParser("makeMarkdown.strikethrough")(d,y);break;case"a":x=r.subParser("makeMarkdown.links")(d,y);break;case"img":x=r.subParser("makeMarkdown.image")(d,y);break;default:x=d.outerHTML+`
`}return x}),r.subParser("makeMarkdown.paragraph",function(d,y){var m="";if(d.hasChildNodes())for(var x=d.childNodes,S=x.length,_=0;_<S;++_)m+=r.subParser("makeMarkdown.node")(x[_],y);return m=m.trim(),m}),r.subParser("makeMarkdown.pre",function(d,y){var m=d.getAttribute("prenum");return"<pre>"+y.preList[m]+"</pre>"}),r.subParser("makeMarkdown.strikethrough",function(d,y){var m="";if(d.hasChildNodes()){m+="~~";for(var x=d.childNodes,S=x.length,_=0;_<S;++_)m+=r.subParser("makeMarkdown.node")(x[_],y);m+="~~"}return m}),r.subParser("makeMarkdown.strong",function(d,y){var m="";if(d.hasChildNodes()){m+="**";for(var x=d.childNodes,S=x.length,_=0;_<S;++_)m+=r.subParser("makeMarkdown.node")(x[_],y);m+="**"}return m}),r.subParser("makeMarkdown.table",function(d,y){var m="",x=[[],[]],S=d.querySelectorAll("thead>tr>th"),_=d.querySelectorAll("tbody>tr"),C,E;for(C=0;C<S.length;++C){var T=r.subParser("makeMarkdown.tableCell")(S[C],y),R="---";if(S[C].hasAttribute("style")){var N=S[C].getAttribute("style").toLowerCase().replace(/\s/g,"");switch(N){case"text-align:left;":R=":---";break;case"text-align:right;":R="---:";break;case"text-align:center;":R=":---:";break}}x[0][C]=T.trim(),x[1][C]=R}for(C=0;C<_.length;++C){var D=x.push([])-1,M=_[C].getElementsByTagName("td");for(E=0;E<S.length;++E){var P=" ";typeof M[E]!="undefined"&&(P=r.subParser("makeMarkdown.tableCell")(M[E],y)),x[D].push(P)}}var L=3;for(C=0;C<x.length;++C)for(E=0;E<x[C].length;++E){var H=x[C][E].length;H>L&&(L=H)}for(C=0;C<x.length;++C){for(E=0;E<x[C].length;++E)C===1?x[C][E].slice(-1)===":"?x[C][E]=r.helper.padEnd(x[C][E].slice(-1),L-1,"-")+":":x[C][E]=r.helper.padEnd(x[C][E],L,"-"):x[C][E]=r.helper.padEnd(x[C][E],L);m+="| "+x[C].join(" | ")+` |
`}return m.trim()}),r.subParser("makeMarkdown.tableCell",function(d,y){var m="";if(!d.hasChildNodes())return"";for(var x=d.childNodes,S=x.length,_=0;_<S;++_)m+=r.subParser("makeMarkdown.node")(x[_],y,!0);return m.trim()}),r.subParser("makeMarkdown.txt",function(d){var y=d.nodeValue;return y=y.replace(/ +/g," "),y=y.replace(/¨NBSP;/g," "),y=r.helper.unescapeHTMLEntities(y),y=y.replace(/([*_~|`])/g,"\\$1"),y=y.replace(/^(\s*)>/g,"\\$1>"),y=y.replace(/^#/gm,"\\#"),y=y.replace(/^(\s*)([-=]{3,})(\s*)$/,"$1\\$2$3"),y=y.replace(/^( {0,3}\d+)\./gm,"$1\\."),y=y.replace(/^( {0,3})([+-])/gm,"$1\\$2"),y=y.replace(/]([\s]*)\(/g,"\\]$1\\("),y=y.replace(/^ {0,3}\[([\S \t]*?)]:/gm,"\\[$1]:"),y});var A=this;e.exports?e.exports=r:A.showdown=r}).call(qm)})(ky);var oR=ky.exports;se([]);const n6={name:"Tooltip",components:{Popover:K3},props:{hoverDelay:{default:.5},placement:{default:"top"},text:{type:String,default:null}}},r6={key:0,class:"rounded bg-gray-900 px-2 py-1 text-xs text-white shadow-xl"},i6={class:"py-px"};function o6(e,t,n,r,i,o){const s=_n("Popover");return ue(),An(s,{trigger:"hover",hoverDelay:n.hoverDelay,placement:n.placement},{target:ln(()=>[St(e.$slots,"default")]),body:ln(()=>[St(e.$slots,"body",{},()=>[n.text?(ue(),ve("div",r6,[ie("div",i6,on(n.text),1)])):kt("",!0)])]),_:3},8,["hoverDelay","placement"])}var sR=Ie(n6,[["render",o6]]);let s6=document.querySelector('link[rel="icon"]');s6.href;function Sy(e){let t=Object.assign({},e);if(!t.url)throw new Error("[request] options.url is required");t.transformRequest&&(t=t.transformRequest(e)),t.responseType||(t.responseType="json"),t.method||(t.method="GET");let n=t.url,r;if(t.params)if(t.method==="GET"){let i=new URLSearchParams;for(let o in t.params)i.append(o,t.params[o]);n=t.url+"?"+i.toString()}else r=JSON.stringify(t.params);return fetch(n,{method:t.method||"GET",headers:t.headers,body:r}).then(i=>{if(t.transformResponse)return t.transformResponse(i,t);if(i.status>=200&&i.status<300)return t.responseType==="json"?i.json():i;{let o=new Error(i.statusText);throw o.response=i,o}})}function vf(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function a6(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=vf(n);return(i,o)=>r.then(s=>o(s.transaction(t,i).objectStore(t)))}let bf;function Cy(){return bf||(bf=a6("keyval-store","keyval")),bf}function l6(e,t=Cy()){return t("readonly",n=>vf(n.get(e)))}function c6(e,t,n=Cy()){return n("readwrite",r=>(r.put(t,e),vf(r.transaction)))}function wf(e,t){return typeof indexedDB=="undefined"?Promise.resolve(null):e?c6(e,JSON.stringify(t)):Promise.resolve()}function xf(e){return typeof indexedDB=="undefined"?Promise.resolve(null):l6(e).then(t=>t&&JSON.parse(t))}let _y={};function aR(e,t){_y[e]=t}function u6(e){return _y[e]||null}let Bl={};function kn(e,t){let n=null;if(e.cache){n=So(e.cache);let f=Bl[n];if(f)return f.auto&&f.reload(),f}typeof e=="string"&&(e={url:e,auto:!0});let r=e.debounce?Xm(o,e.debounce):o,i=sn({method:e.method,url:e.url,data:e.initialData||null,previousData:null,loading:!1,fetched:!1,error:null,promise:null,auto:e.auto,params:null,fetch:r,reload:r,submit:r,reset:a,update:s,setData:c});function o(p){return Ir(this,arguments,function*(f,h={}){let g=e.resourceFetcher||u6("resourceFetcher")||Sy;f instanceof Event&&(f=null),f=f||i.params,e.makeParams&&(f=e.makeParams.call(t,f)),i.params=f,i.previousData=i.data?JSON.parse(JSON.stringify(i.data)):null,i.loading=!0,i.error=null,e.onFetch&&e.onFetch.call(t,i.params);let v=[e.beforeSubmit,h.beforeSubmit];for(let d of v)d&&d.call(t,i.params);let b=h.validate||e.validate,w=[e.onError,h.onError],k=[e.onSuccess,h.onSuccess],A=[e.onData,h.onData];if(b){let d;try{if(d=yield b.call(t,i.params),d&&typeof d=="string")throw new Error(d)}catch(y){l(y,w);return}}try{i.promise=g(Me(J({},e),{params:f||e.params}));let d=yield i.promise;wf(n,d),i.data=u(d),i.fetched=!0;for(let y of k)y&&y.call(t,d);for(let y of A)y&&y.call(t,d)}catch(d){l(d,w)}return i.loading=!1,i.data})}function s({method:f,url:h,params:p,auto:g}){f&&f!==e.method&&(i.method=f),h&&h!==e.url&&(i.url=h),p&&p!==e.params&&(i.params=p),g!==void 0&&g!==i.auto&&(i.auto=g)}function a(){i.data=e.initialData||null,i.previousData=null,i.loading=!1,i.fetched=!1,i.error=null,i.params=null,i.auto=e.auto}function l(f,h){i.loading=!1,i.previousData&&(i.data=i.previousData),i.error=f;for(let p of h)p&&p.call(t,f);throw f}function c(f){typeof f=="function"&&(f=f.call(t,i.data)),i.data=u(f)}function u(f){if(e.transform){let h=e.transform.call(t,f);if(h!=null)return h}return f}return n&&!Bl[n]&&(Bl[n]=i,xf(n).then(f=>{var h;(i.loading||!i.fetched)&&f&&(c(f),(h=e.onData)==null||h.call(t,f))})),e.auto&&i.fetch(),i}function So(e){return e?(typeof e=="string"&&(e=[e]),JSON.stringify(e)):null}function d6(e){return e=So(e),Bl[e]||null}function My(e,t,n){f6(e,t),e.on("list_update",r=>{r.doctype==t&&n(r.name)})}let Ay={};function f6(e,t){Ay[t]||(e.emit("doctype_subscribe",t),Ay[t]=!0)}let kf=sn({}),Co={};function h6(e,t){var h,p,g,v,b;if(!e.doctype)throw new Error("List resource requires doctype");let n=So(e.cache);if(n){let w=kf[n];if(w)return w.auto&&w.reload(),w}let r=sn({doctype:e.doctype,fields:e.fields,filters:e.filters,orderBy:e.orderBy,start:e.start||0,pageLength:e.pageLength||20,groupBy:e.groupBy,parent:e.parent,debug:e.debug||0,originalData:null,dataMap:{},data:null,previous:c,hasPreviousPage:!1,next:u,hasNextPage:!0,auto:e.auto,list:kn({url:e.url||"frappe.client.get_list",makeParams(){return{doctype:r.doctype,fields:r.fields,filters:r.filters,order_by:r.orderBy,start:r.start,limit:r.pageLength,limit_start:r.start,limit_page_length:r.pageLength,group_by:r.groupBy,parent:r.parent,debug:r.debug}},onSuccess(w){var A;r.hasPreviousPage=!!r.start,w.length<r.pageLength&&(r.hasNextPage=!1);let k;!r.start||r.start==0?k=w:r.start>0&&(k=r.originalData.concat(w)),wf(n,k),l(k),(A=e.onSuccess)==null||A.call(t,r.data)},onError:e.onError},t),fetchOne:kn({url:"frappe.client.get_list",makeParams(w){return{doctype:r.doctype,fields:r.fields||"*",filters:{name:w}}},onSuccess(w){var k,A;if(w.length>0&&r.originalData){let d=w[0];Bs(r.doctype,d)}(A=(k=e.fetchOne)==null?void 0:k.onSuccess)==null||A.call(t,r.data)},onError:(h=e.fetchOne)==null?void 0:h.onError},t),insert:kn({url:"frappe.client.insert",makeParams(w){return{doc:J({doctype:r.doctype},w)}},onSuccess(w){var k,A;r.list.fetch(),(A=(k=e.insert)==null?void 0:k.onSuccess)==null||A.call(t,w)},onError:(p=e.insert)==null?void 0:p.onError},t),setValue:kn({url:"frappe.client.set_value",makeParams(w){let d=w,{name:k}=d,A=Ve(d,["name"]);return{doctype:r.doctype,name:k,fieldname:A}},onSuccess(w){var k,A;Bs(r.doctype,w),(A=(k=e.setValue)==null?void 0:k.onSuccess)==null||A.call(t,w)},onError:(g=e.setValue)==null?void 0:g.onError},t),delete:kn({url:"frappe.client.delete",makeParams(w){return{doctype:r.doctype,name:w}},onSuccess(w){var k,A;r.list.fetch(),(A=(k=e.delete)==null?void 0:k.onSuccess)==null||A.call(t,w)},onError:(v=e.delete)==null?void 0:v.onError},t),runDocMethod:kn({url:"run_doc_method",makeParams(d){var y=d,{method:w,name:k}=y,A=Ve(y,["method","name"]);return{dt:r.doctype,dn:k,method:w,args:JSON.stringify(A)}},onSuccess(w){var k,A;if(w.docs)for(let d of w.docs)Bs(d.doctype,d);(A=(k=e.runDocMethod)==null?void 0:k.onSuccess)==null||A.call(t,w)},onError:(b=e.runDocMethod)==null?void 0:b.onError},t),update:i,fetch:a,reload:s,setData:l,transform:o,getRow:f});function i(w){Object.assign(r,w)}function o(w){if(e.transform){let k=e.transform.call(t,w);if(k!=null)return k}return w}function s(){let w=r.start,k=r.pageLength;return r.start>0&&(r.start=0,r.pageLength=r.originalData.length),r.list.fetch().finally(()=>{r.start=w,r.pageLength=k})}function a(){s()}function l(w){if(r.originalData=w,typeof w=="function"&&(w=w.call(t,r.data)),r.data=o(w),Array.isArray(r.data)){r.dataMap={};for(let k of r.data){if(!k.name)continue;let A=k.name.toString();r.dataMap[A]=k}}}function c(){r.start=r.start-r.pageLength,r.list.fetch()}function u(){r.start=r.start+r.pageLength,r.list.fetch()}function f(w){let k=w.toString();return r.dataMap[k]}return e.realtime&&(t==null?void 0:t.$socket)&&My(t.$socket,r.doctype,w=>{var k;((k=r.originalData)==null?void 0:k.find(A=>A.name===w))&&r.fetchOne.submit(w)}),n&&(kf[n]=r,xf(n).then(w=>{(r.list.loading||!r.list.fetched)&&w&&l(w)})),e.auto&&r.list.fetch(),Co[r.doctype]=Co[r.doctype]||[],Co[r.doctype].push(r),r}function p6(e){return e=So(e),kf[e]||null}function Bs(e,t){if(!t.name)return;let n=Co[e]||[];for(let r of n)if(r.originalData){for(let i of r.originalData)if(i.name&&i.name==t.name){delete i._previousData;let o=JSON.stringify(i);for(let s in i)s in t&&(i[s]=t[s]);i._previousData=o}r.data=r.transform(r.originalData)}}function m6(e,t){let n=Co[e]||[];for(let r of n)r.originalData&&(r.originalData=r.originalData.filter(i=>i.name.toString()!==t.toString()),r.data=r.transform(r.originalData))}function g6(e,t){let n=Co[e]||[];for(let r of n)if(r.originalData){for(let i of r.originalData)if(i.name&&i.name==t.name){let o=JSON.parse(i._previousData);for(let s in i)i[s]=o[s];delete i._previousData}r.data=r.transform(r.originalData)}}let Sf=sn({});function y6(e,t){var u;if(!(e.doctype&&e.name))return;let n=So([e.doctype,e.name]),r=Sf[n];if(r)return r.auto&&r.reload(),r;let i={url:"frappe.client.set_value",makeParams(h){return{doctype:s.doctype,name:s.name,fieldname:h}},beforeSubmit(h){s.previousDoc=JSON.stringify(s.doc),Object.assign(s.doc,h.fieldname||{}),Bs(s.doctype,s.doc)},onSuccess(h){var p,g;s.doc=c(h),(g=(p=e.setValue)==null?void 0:p.onSuccess)==null||g.call(t,h)},onError(h){var p,g;s.doc=JSON.parse(s.previousDoc),(g=(p=e.setValue)==null?void 0:p.onError)==null||g.call(t,h),g6(s.doctype,s.doc)}};const o=e.auto!==void 0;let s=sn({doctype:e.doctype,name:e.name,doc:null,auto:o?e.auto:!0,get:kn({url:"frappe.client.get",makeParams(){return{doctype:s.doctype,name:s.name}},onSuccess(h){var p;wf(n,h),s.doc=c(h),(p=e.onSuccess)==null||p.call(t,s.doc)},onError:e.onError},t),setValue:kn(i,t),setValueDebounced:kn(Me(J({},i),{debounce:e.debounce||500}),t),delete:kn({url:"frappe.client.delete",makeParams(){return{doctype:s.doctype,name:s.name}},onSuccess(){var h,p;s.doc=null,(p=(h=e.delete)==null?void 0:h.onSuccess)==null||p.call(t),m6(s.doctype,s.name)},onError:(u=e.delete)==null?void 0:u.onError},t),reload:a,setDoc:l});for(let h in e.whitelistedMethods){let p=e.whitelistedMethods[h];typeof p=="string"&&(p={method:p});let f=p,{method:g,onSuccess:v}=f,b=Ve(f,["method","onSuccess"]);s[h]=kn(J({url:"run_doc_method",makeParams(w){return{dt:s.doctype,dn:s.name,method:g,args:w}},onSuccess(w){if(w.docs){for(let k of w.docs)if(k.doctype===s.doctype&&k.name.toString()===s.name.toString()){s.doc=c(k),Bs(s.doctype,s.doc);break}}v==null||v.call(t,w.message)}},b),t)}function a(){return s.get.fetch()}function l(h){typeof h=="function"&&(h=h.call(t,s.doc)),s.doc=c(h)}function c(h){if(e.transform){let p=e.transform.call(t,h);if(typeof p=="object")return p}return h}return e.realtime&&t.$socket&&My(t.$socket,s.doctype,h=>{h==s.name&&s.get.fetch()}),Sf[n]=s,xf(n).then(h=>{(s.get.loading||!s.get.fetched)&&h&&(s.doc=c(h))}),s.auto&&s.get.fetch(),s}function v6(e,t){let n=So([e,t]);return Sf[n]||null}let b6=e=>({created(){if(this.$options.resources){this._resources=sn({});for(let t in this.$options.resources){let n=this.$options.resources[t];if(typeof n=="function")Ht(()=>{try{return n.call(this)}catch(r){return console.warn(`Failed to get resource options
`,r),null}},(r,i)=>{!r||!(!i||JSON.stringify(r)!==JSON.stringify(i))||(this._resources[t]=Ey(r,this))},{immediate:!0});else{let r=Ey(n,this);this._resources[t]=r}}}},methods:{$getResource(t){return d6(t)},$getDocumentResource(t,n){return v6(t,n)},$getDoc(t,n){let r=this.$getDocumentResource(t,n);return r?r.doc:null},$getListResource(t){return p6(t)},$refetchResource(t){let n=this.$getResource(t);n&&n.fetch()}},computed:{$resources(){return this._resources}}});function Ey(e,t){return e.type==="document"?y6(e,t):e.type==="list"?h6(e,t):kn(e,t)}var lR={install(e,t){let n=b6();e.mixin(n)}};function cR(e){return Sy(Me(J({},e),{transformRequest:(t={})=>{if(!t.url)throw new Error("[frappeRequest] options.url is required");let n=Object.assign({Accept:"application/json","Content-Type":"application/json; charset=utf-8","X-Frappe-Site-Name":window.location.hostname},t.headers||{});return window.csrf_token&&window.csrf_token!=="{{ csrf_token }}"&&(n["X-Frappe-CSRF-Token"]=window.csrf_token),!t.url.startsWith("/")&&!t.url.startsWith("http")&&(t.url="/api/method/"+t.url),Me(J({},t),{method:t.method||"POST",headers:n})},transformResponse:(t,n)=>Ir(this,null,function*(){let r=n.url;if(t.ok){const i=yield t.json();if(i.docs||r==="login")return i;if(i.exc)try{console.groupCollapsed(r),console.log(n);let o=JSON.parse(i.exc);for(let s of o)console.log(s);console.groupEnd()}catch(o){console.warn("Error printing debug messages",o)}return i.message}else{let i=yield t.text(),o,s;try{o=JSON.parse(i)}catch(c){}let a=[[n.url,o.exc_type,o._error_message].filter(Boolean).join(" ")];if(o.exc){s=o.exc;try{s=JSON.parse(s)[0],console.log(s)}catch(c){}}let l=new Error(a.join(`
`));throw l.exc_type=o.exc_type,l.exc=s,l.response=t,l.status=i.status,l.messages=o._server_messages?JSON.parse(o._server_messages):[],l.messages=l.messages.concat(o.message),l.messages=l.messages.map(c=>{try{return JSON.parse(c).message}catch(u){return c}}),l.messages=l.messages.filter(Boolean),l.messages.length||(l.messages=o._error_message?[o._error_message]:["Internal Server Error"]),n.onError&&n.onError(l),l}})}))}const Gn=Object.create(null);Gn.open="0";Gn.close="1";Gn.ping="2";Gn.pong="3";Gn.message="4";Gn.upgrade="5";Gn.noop="6";const Hl=Object.create(null);Object.keys(Gn).forEach(e=>{Hl[Gn[e]]=e});const w6={type:"error",data:"parser error"},x6=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",k6=typeof ArrayBuffer=="function",S6=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Oy=({type:e,data:t},n,r)=>x6&&t instanceof Blob?n?r(t):Ty(t,r):k6&&(t instanceof ArrayBuffer||S6(t))?n?r(t):Ty(new Blob([t]),r):r(Gn[e]+(t||"")),Ty=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)},Py="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Hs=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<Py.length;e++)Hs[Py.charCodeAt(e)]=e;const C6=e=>{let t=e.length*.75,n=e.length,r,i=0,o,s,a,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const c=new ArrayBuffer(t),u=new Uint8Array(c);for(r=0;r<n;r+=4)o=Hs[e.charCodeAt(r)],s=Hs[e.charCodeAt(r+1)],a=Hs[e.charCodeAt(r+2)],l=Hs[e.charCodeAt(r+3)],u[i++]=o<<2|s>>4,u[i++]=(s&15)<<4|a>>2,u[i++]=(a&3)<<6|l&63;return c},_6=typeof ArrayBuffer=="function",Ry=(e,t)=>{if(typeof e!="string")return{type:"message",data:jy(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:M6(e.substring(1),t)}:Hl[n]?e.length>1?{type:Hl[n],data:e.substring(1)}:{type:Hl[n]}:w6},M6=(e,t)=>{if(_6){const n=C6(e);return jy(n,t)}else return{base64:!0,data:e}},jy=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},Ny=String.fromCharCode(30),A6=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,s)=>{Oy(o,!1,a=>{r[s]=a,++i===n&&t(r.join(Ny))})})},E6=(e,t)=>{const n=e.split(Ny),r=[];for(let i=0;i<n.length;i++){const o=Ry(n[i],t);if(r.push(o),o.type==="error")break}return r},Ly=4;function dt(e){if(e)return O6(e)}function O6(e){for(var t in dt.prototype)e[t]=dt.prototype[t];return e}dt.prototype.on=dt.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};dt.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};dt.prototype.off=dt.prototype.removeListener=dt.prototype.removeAllListeners=dt.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks["$"+e],this};dt.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this};dt.prototype.emitReserved=dt.prototype.emit;dt.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};dt.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Sn=(()=>typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")())();function Dy(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const T6=Sn.setTimeout,P6=Sn.clearTimeout;function zl(e,t){t.useNativeTimers?(e.setTimeoutFn=T6.bind(Sn),e.clearTimeoutFn=P6.bind(Sn)):(e.setTimeoutFn=Sn.setTimeout.bind(Sn),e.clearTimeoutFn=Sn.clearTimeout.bind(Sn))}const R6=1.33;function j6(e){return typeof e=="string"?N6(e):Math.ceil((e.byteLength||e.size)*R6)}function N6(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}class L6 extends Error{constructor(t,n,r){super(t);this.description=n,this.context=r,this.type="TransportError"}}class Iy extends dt{constructor(t){super();this.writable=!1,zl(this,t),this.opts=t,this.query=t.query,this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new L6(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=Ry(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}}const $y="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),Cf=64,D6={};let By=0,Fl=0,Hy;function zy(e){let t="";do t=$y[e%Cf]+t,e=Math.floor(e/Cf);while(e>0);return t}function Fy(){const e=zy(+new Date);return e!==Hy?(By=0,Hy=e):e+"."+zy(By++)}for(;Fl<Cf;Fl++)D6[$y[Fl]]=Fl;function Vy(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function I6(e){let t={},n=e.split("&");for(let r=0,i=n.length;r<i;r++){let o=n[r].split("=");t[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return t}let Wy=!1;try{Wy=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const $6=Wy;function Uy(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||$6))return new XMLHttpRequest}catch(n){}if(!t)try{return new Sn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}function B6(){}const H6=function(){return new Uy({xdomain:!1}).responseType!=null}();class z6 extends Iy{constructor(t){super(t);if(this.polling=!1,typeof location!="undefined"){const r=location.protocol==="https:";let i=location.port;i||(i=r?"443":"80"),this.xd=typeof location!="undefined"&&t.hostname!==location.hostname||i!==t.port,this.xs=t.secure!==r}const n=t&&t.forceBase64;this.supportsBinary=H6&&!n}get name(){return"polling"}doOpen(){this.poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};E6(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,A6(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.query||{};const n=this.opts.secure?"https":"http";let r="";this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=Fy()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.opts.port&&(n==="https"&&Number(this.opts.port)!==443||n==="http"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port);const i=Vy(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new Yn(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Yn extends dt{constructor(t,n){super();zl(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.async=n.async!==!1,this.data=n.data!==void 0?n.data:null,this.create()}create(){const t=Dy(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const n=this.xhr=new Uy(t);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let r in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&n.setRequestHeader(r,this.opts.extraHeaders[r])}}catch(r){}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(r){}try{n.setRequestHeader("Accept","*/*")}catch(r){}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(r){this.setTimeoutFn(()=>{this.onError(r)},0);return}typeof document!="undefined"&&(this.index=Yn.requestsCount++,Yn.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr=="undefined"||this.xhr===null)){if(this.xhr.onreadystatechange=B6,t)try{this.xhr.abort()}catch(n){}typeof document!="undefined"&&delete Yn.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}Yn.requestsCount=0;Yn.requests={};if(typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",Ky);else if(typeof addEventListener=="function"){const e="onpagehide"in Sn?"pagehide":"unload";addEventListener(e,Ky,!1)}}function Ky(){for(let e in Yn.requests)Yn.requests.hasOwnProperty(e)&&Yn.requests[e].abort()}const qy=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),Vl=Sn.WebSocket||Sn.MozWebSocket,Jy=!0,F6="arraybuffer",Gy=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class V6 extends Iy{constructor(t){super(t);this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=Gy?{}:Dy(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=Jy&&!Gy?n?new Vl(t,n):new Vl(t):new Vl(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||F6,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;Oy(r,this.supportsBinary,o=>{const s={};try{Jy&&this.ws.send(o)}catch(a){}i&&qy(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws!="undefined"&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const n=this.opts.secure?"wss":"ws";let r="";this.opts.port&&(n==="wss"&&Number(this.opts.port)!==443||n==="ws"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=Fy()),this.supportsBinary||(t.b64=1);const i=Vy(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}check(){return!!Vl}}const W6={websocket:V6,polling:z6},U6=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,K6=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function _f(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=U6.exec(e||""),o={},s=14;for(;s--;)o[K6[s]]=i[s]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=q6(o,o.path),o.queryKey=J6(o,o.query),o}function q6(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function J6(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}class Lr extends dt{constructor(t,n={}){super();this.writeBuffer=[],t&&typeof t=="object"&&(n=t,t=null),t?(t=_f(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=_f(n.host).host),zl(this,n),this.secure=n.secure!=null?n.secure:typeof location!="undefined"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location!="undefined"?location.hostname:"localhost"),this.port=n.port||(typeof location!="undefined"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=I6(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=Ly,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts.transportOptions[t],this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new W6[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Lr.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch(n){this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;Lr.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",f=>{if(!r)if(f.type==="pong"&&f.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Lr.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(u(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const h=new Error("probe error");h.transport=n.name,this.emitReserved("upgradeError",h)}}))};function o(){r||(r=!0,u(),n.close(),n=null)}const s=f=>{const h=new Error("probe error: "+f);h.transport=n.name,o(),this.emitReserved("upgradeError",h)};function a(){s("transport closed")}function l(){s("socket closed")}function c(f){n&&f.name!==n.name&&o()}const u=()=>{n.removeListener("open",i),n.removeListener("error",s),n.removeListener("close",a),this.off("close",l),this.off("upgrading",c)};n.once("open",i),n.once("error",s),n.once("close",a),this.once("close",l),this.once("upgrading",c),n.open()}onOpen(){if(this.readyState="open",Lr.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let t=0;const n=this.upgrades.length;for(;t<n;t++)this.probe(this.upgrades[t])}}onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this.resetPingTimeout(),this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const n=new Error("server error");n.code=t.data,this.onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.upgrades=this.filterUpgrades(t.upgrades),this.pingInterval=t.pingInterval,this.pingTimeout=t.pingTimeout,this.maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const i=this.writeBuffer[r].data;if(i&&(n+=j6(i)),r>0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){Lr.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;r<i;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}Lr.protocol=Ly;function G6(e,t="",n){let r=e;n=n||typeof location!="undefined"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n!="undefined"?e=n.protocol+"//"+e:e="https://"+e),r=_f(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const o=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+o+":"+r.port+t,r.href=r.protocol+"://"+o+(n&&n.port===r.port?"":":"+r.port),r}const Y6=typeof ArrayBuffer=="function",X6=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Yy=Object.prototype.toString,Q6=typeof Blob=="function"||typeof Blob!="undefined"&&Yy.call(Blob)==="[object BlobConstructor]",Z6=typeof File=="function"||typeof File!="undefined"&&Yy.call(File)==="[object FileConstructor]";function Mf(e){return Y6&&(e instanceof ArrayBuffer||X6(e))||Q6&&e instanceof Blob||Z6&&e instanceof File}function Wl(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Wl(e[n]))return!0;return!1}if(Mf(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Wl(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Wl(e[n]))return!0;return!1}function eP(e){const t=[],n=e.data,r=e;return r.data=Af(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Af(e,t){if(!e)return e;if(Mf(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=Af(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=Af(e[r],t));return n}return e}function tP(e,t){return e.data=Ef(e.data,t),delete e.attachments,e}function Ef(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Ef(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Ef(e[n],t));return e}const nP=5;var Le;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(Le||(Le={}));class rP{constructor(t){this.replacer=t}encode(t){return(t.type===Le.EVENT||t.type===Le.ACK)&&Wl(t)?this.encodeAsBinary({type:t.type===Le.EVENT?Le.BINARY_EVENT:Le.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===Le.BINARY_EVENT||t.type===Le.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=eP(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}class Of extends dt{constructor(t){super();this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===Le.BINARY_EVENT;r||n.type===Le.BINARY_ACK?(n.type=r?Le.EVENT:Le.ACK,this.reconstructor=new iP(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Mf(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(Le[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===Le.BINARY_EVENT||r.type===Le.BINARY_ACK){const o=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const s=t.substring(o,n);if(s!=Number(s)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(s)}if(t.charAt(n+1)==="/"){const o=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(o,n)}else r.nsp="/";const i=t.charAt(n+1);if(i!==""&&Number(i)==i){const o=n+1;for(;++n;){const s=t.charAt(n);if(s==null||Number(s)!=s){--n;break}if(n===t.length)break}r.id=Number(t.substring(o,n+1))}if(t.charAt(++n)){const o=this.tryParse(t.substr(n));if(Of.isPayloadValid(r.type,o))r.data=o;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case Le.CONNECT:return typeof n=="object";case Le.DISCONNECT:return n===void 0;case Le.CONNECT_ERROR:return typeof n=="string"||typeof n=="object";case Le.EVENT:case Le.BINARY_EVENT:return Array.isArray(n)&&n.length>0;case Le.ACK:case Le.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class iP{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=tP(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}var oP=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",protocol:nP,get PacketType(){return Le},Encoder:rP,Decoder:Of});function jn(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const sP=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Xy extends dt{constructor(t,n,r){super();this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[jn(t,"open",this.onopen.bind(this)),jn(t,"packet",this.onpacket.bind(this)),jn(t,"error",this.onerror.bind(this)),jn(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(sP.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const r={type:Le.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const s=this.ids++,a=n.pop();this._registerAckCallback(s,a),r.id=s}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,n){var r;const i=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(i===void 0){this.acks[t]=n;return}const o=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let s=0;s<this.sendBuffer.length;s++)this.sendBuffer[s].id===t&&this.sendBuffer.splice(s,1);n.call(this,new Error("operation has timed out"))},i);this.acks[t]=(...s)=>{this.io.clearTimeoutFn(o),n.apply(this,[null,...s])}}emitWithAck(t,...n){const r=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((i,o)=>{n.push((s,a)=>r?s?o(s):i(a):i(s)),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...o)=>r!==this._queue[0]?void 0:(i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...o)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Le.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Le.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Le.EVENT:case Le.BINARY_EVENT:this.onevent(t);break;case Le.ACK:case Le.BINARY_ACK:this.onack(t);break;case Le.DISCONNECT:this.ondisconnect();break;case Le.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:Le.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Le.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function _o(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}_o.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};_o.prototype.reset=function(){this.attempts=0};_o.prototype.setMin=function(e){this.ms=e};_o.prototype.setMax=function(e){this.max=e};_o.prototype.setJitter=function(e){this.jitter=e};class Tf extends dt{constructor(t,n){var r;super();this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,zl(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new _o({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||oP;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Lr(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=jn(n,"open",function(){r.onopen(),t&&t()}),o=jn(n,"error",s=>{r.cleanup(),r._readyState="closed",this.emitReserved("error",s),t?t(s):r.maybeReconnectOnOpen()});if(this._timeout!==!1){const s=this._timeout;s===0&&i();const a=this.setTimeoutFn(()=>{i(),n.close(),n.emit("error",new Error("timeout"))},s);this.opts.autoUnref&&a.unref(),this.subs.push(function(){clearTimeout(a)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(jn(t,"ping",this.onping.bind(this)),jn(t,"data",this.ondata.bind(this)),jn(t,"error",this.onerror.bind(this)),jn(t,"close",this.onclose.bind(this)),jn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){qy(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new Xy(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(function(){clearTimeout(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const zs={};function Pf(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=G6(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,s=zs[i]&&o in zs[i].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||s;let l;return a?l=new Tf(r,t):(zs[i]||(zs[i]=new Tf(r,t)),l=zs[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(Pf,{Manager:Tf,Socket:Xy,io:Pf,connect:Pf});export{Mo as A,ft as B,MP as C,EP as D,cP as E,lt as F,ay as G,on as H,AP as I,kt as J,OP as K,K3 as P,sR as T,Ie as _,X as a,fP as b,kn as c,dP as d,ve as e,We as f,_n as g,uP as h,lR as i,tk as j,cR as k,se as l,ie as m,je as n,ue as o,lP as p,Ho as q,sn as r,aR as s,An as t,Rt as u,St as v,ln as w,Ai as x,Gr as y,Yh as z};