| 1 |
var ER=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var n4=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var kt=(e,t,n)=>(n4(e,t,"read from private field"),n?n.call(e):t.get(e)),Os=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Lo=(e,t,n,o)=>(n4(e,t,"write to private field"),o?o.call(e,n):t.set(e,n),n);var yBe=ER((fr,pr)=>{const xR="modulepreload",TR=function(e){return"/"+e},o4={},Zd=function(t,n,o){if(!n||n.length===0)return t();const r=document.getElementsByTagName("link");return Promise.all(n.map(s=>{if(s=TR(s),s in o4)return;o4[s]=!0;const i=s.endsWith(".css"),l=i?'[rel="stylesheet"]':"";if(!!o)for(let c=r.length-1;c>=0;c--){const d=r[c];if(d.href===s&&(!i||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${s}"]${l}`))return;const u=document.createElement("link");if(u.rel=i?"stylesheet":xR,i||(u.as="script",u.crossOrigin=""),u.href=s,document.head.appendChild(u),i)return new Promise((c,d)=>{u.addEventListener("load",c),u.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>t()).catch(s=>{const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=s,window.dispatchEvent(i),!i.defaultPrevented)throw s})};/** |
| 2 |
* @vue/shared v3.4.23 |
| 3 |
* (c) 2018-present Yuxi (Evan) You and Vue contributors |
| 4 |
* @license MIT |
| 5 |
**//*! #__NO_SIDE_EFFECTS__ */function yr(e,t){const n=new Set(e.split(","));return t?o=>n.has(o.toLowerCase()):o=>n.has(o)}const Wt={},mc=[],yt=()=>{},Bm=()=>!1,_u=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),X2=e=>e.startsWith("onUpdate:"),zt=Object.assign,Q2=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},MR=Object.prototype.hasOwnProperty,vt=(e,t)=>MR.call(e,t),Te=Array.isArray,gc=e=>vd(e)==="[object Map]",bu=e=>vd(e)==="[object Set]",ig=e=>vd(e)==="[object Date]",OR=e=>vd(e)==="[object RegExp]",et=e=>typeof e=="function",tt=e=>typeof e=="string",Vr=e=>typeof e=="symbol",pt=e=>e!==null&&typeof e=="object",e3=e=>(pt(e)||et(e))&&et(e.then)&&et(e.catch),x$=Object.prototype.toString,vd=e=>x$.call(e),zm=e=>vd(e).slice(8,-1),lg=e=>vd(e)==="[object Object]",t3=e=>tt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Nl=yr(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),IR=yr("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),f0=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},AR=/-(\w)/g,yn=f0(e=>e.replace(AR,(t,n)=>n?n.toUpperCase():"")),NR=/\B([A-Z])/g,zo=f0(e=>e.replace(NR,"-$1").toLowerCase()),Gl=f0(e=>e.charAt(0).toUpperCase()+e.slice(1)),vc=f0(e=>e?`on${Gl(e)}`:""),hs=(e,t)=>!Object.is(e,t),yc=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},T$=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},ag=e=>{const t=parseFloat(e);return isNaN(t)?e:t},ug=e=>{const t=tt(e)?Number(e):NaN;return isNaN(t)?e:t};let r4;const M$=()=>r4||(r4=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),PR="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error",LR=yr(PR);function Ye(e){if(Te(e)){const t={};for(let n=0;n<e.length;n++){const o=e[n],r=tt(o)?O$(o):Ye(o);if(r)for(const s in r)t[s]=r[s]}return t}else if(tt(e)||pt(e))return e}const RR=/;(?![^(]*\))/g,DR=/:([^]+)/,VR=/\/\*[^]*?\*\//g;function O$(e){const t={};return e.replace(VR,"").split(RR).forEach(n=>{if(n){const o=n.split(DR);o.length>1&&(t[o[0].trim()]=o[1].trim())}}),t}function D(e){let t="";if(tt(e))t=e;else if(Te(e))for(let n=0;n<e.length;n++){const o=D(e[n]);o&&(t+=o+" ")}else if(pt(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function n3(e){if(!e)return null;let{class:t,style:n}=e;return t&&!tt(t)&&(e.class=D(t)),n&&(e.style=Ye(n)),e}const FR="html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot",BR="svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view",zR="annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics",jR="area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr",HR=yr(FR),UR=yr(BR),WR=yr(zR),KR=yr(jR),qR="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",GR=yr(qR);function I$(e){return!!e||e===""}function YR(e,t){if(e.length!==t.length)return!1;let n=!0;for(let o=0;n&&o<e.length;o++)n=Bl(e[o],t[o]);return n}function Bl(e,t){if(e===t)return!0;let n=ig(e),o=ig(t);if(n||o)return n&&o?e.getTime()===t.getTime():!1;if(n=Vr(e),o=Vr(t),n||o)return e===t;if(n=Te(e),o=Te(t),n||o)return n&&o?YR(e,t):!1;if(n=pt(e),o=pt(t),n||o){if(!n||!o)return!1;const r=Object.keys(e).length,s=Object.keys(t).length;if(r!==s)return!1;for(const i in e){const l=e.hasOwnProperty(i),a=t.hasOwnProperty(i);if(l&&!a||!l&&a||!Bl(e[i],t[i]))return!1}}return String(e)===String(t)}function p0(e,t){return e.findIndex(n=>Bl(n,t))}const O=e=>tt(e)?e:e==null?"":Te(e)||pt(e)&&(e.toString===x$||!et(e.toString))?JSON.stringify(e,A$,2):String(e),A$=(e,t)=>t&&t.__v_isRef?A$(e,t.value):gc(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[o,r],s)=>(n[Vv(o,s)+" =>"]=r,n),{})}:bu(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Vv(n))}:Vr(t)?Vv(t):pt(t)&&!Te(t)&&!lg(t)?String(t):t,Vv=(e,t="")=>{var n;return Vr(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** |
| 6 |
* @vue/reactivity v3.4.23 |
| 7 |
* (c) 2018-present Yuxi (Evan) You and Vue contributors |
| 8 |
* @license MIT |
| 9 |
**/let ir;class o3{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=ir,!t&&ir&&(this.index=(ir.scopes||(ir.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=ir;try{return ir=this,t()}finally{ir=n}}}on(){ir=this}off(){ir=this.parent}stop(t){if(this._active){let n,o;for(n=0,o=this.effects.length;n<o;n++)this.effects[n].stop();for(n=0,o=this.cleanups.length;n<o;n++)this.cleanups[n]();if(this.scopes)for(n=0,o=this.scopes.length;n<o;n++)this.scopes[n].stop(!0);if(!this.detached&&this.parent&&!t){const r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0,this._active=!1}}}function N$(e){return new o3(e)}function P$(e,t=ir){t&&t.active&&t.effects.push(e)}function r3(){return ir}function s3(e){ir&&ir.cleanups.push(e)}let ja;class Rc{constructor(t,n,o,r){this.fn=t,this.trigger=n,this.scheduler=o,this.active=!0,this.deps=[],this._dirtyLevel=4,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,P$(this,r)}get dirty(){if(this._dirtyLevel===2||this._dirtyLevel===3){this._dirtyLevel=1,Yl();for(let t=0;t<this._depsLength;t++){const n=this.deps[t];if(n.computed&&(ZR(n.computed),this._dirtyLevel>=4))break}this._dirtyLevel===1&&(this._dirtyLevel=0),Zl()}return this._dirtyLevel>=4}set dirty(t){this._dirtyLevel=t?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=Pl,n=ja;try{return Pl=!0,ja=this,this._runnings++,s4(this),this.fn()}finally{i4(this),this._runnings--,ja=n,Pl=t}}stop(){var t;this.active&&(s4(this),i4(this),(t=this.onStop)==null||t.call(this),this.active=!1)}}function ZR(e){return e.value}function s4(e){e._trackId++,e._depsLength=0}function i4(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t<e.deps.length;t++)L$(e.deps[t],e);e.deps.length=e._depsLength}}function L$(e,t){const n=e.get(t);n!==void 0&&t._trackId!==n&&(e.delete(t),e.size===0&&e.cleanup())}function JR(e,t){e.effect instanceof Rc&&(e=e.effect.fn);const n=new Rc(e,yt,()=>{n.dirty&&n.run()});t&&(zt(n,t),t.scope&&P$(n,t.scope)),(!t||!t.lazy)&&n.run();const o=n.run.bind(n);return o.effect=n,o}function XR(e){e.effect.stop()}let Pl=!0,h_=0;const R$=[];function Yl(){R$.push(Pl),Pl=!1}function Zl(){const e=R$.pop();Pl=e===void 0?!0:e}function i3(){h_++}function l3(){for(h_--;!h_&&m_.length;)m_.shift()()}function D$(e,t,n){if(t.get(e)!==e._trackId){t.set(e,e._trackId);const o=e.deps[e._depsLength];o!==t?(o&&L$(o,e),e.deps[e._depsLength++]=t):e._depsLength++}}const m_=[];function V$(e,t,n){i3();for(const o of e.keys()){let r;o._dirtyLevel<t&&(r??(r=e.get(o)===o._trackId))&&(o._shouldSchedule||(o._shouldSchedule=o._dirtyLevel===0),o._dirtyLevel=t),o._shouldSchedule&&(r??(r=e.get(o)===o._trackId))&&(o.trigger(),(!o._runnings||o.allowRecurse)&&o._dirtyLevel!==2&&(o._shouldSchedule=!1,o.scheduler&&m_.push(o.scheduler)))}l3()}const F$=(e,t)=>{const n=new Map;return n.cleanup=e,n.computed=t,n},cg=new WeakMap,Ha=Symbol(""),g_=Symbol("");function Yo(e,t,n){if(Pl&&ja){let o=cg.get(e);o||cg.set(e,o=new Map);let r=o.get(n);r||o.set(n,r=F$(()=>o.delete(n))),D$(ja,r)}}function xi(e,t,n,o,r,s){const i=cg.get(e);if(!i)return;let l=[];if(t==="clear")l=[...i.values()];else if(n==="length"&&Te(e)){const a=Number(o);i.forEach((u,c)=>{(c==="length"||!Vr(c)&&c>=a)&&l.push(u)})}else switch(n!==void 0&&l.push(i.get(n)),t){case"add":Te(e)?t3(n)&&l.push(i.get("length")):(l.push(i.get(Ha)),gc(e)&&l.push(i.get(g_)));break;case"delete":Te(e)||(l.push(i.get(Ha)),gc(e)&&l.push(i.get(g_)));break;case"set":gc(e)&&l.push(i.get(Ha));break}i3();for(const a of l)a&&V$(a,4);l3()}function QR(e,t){var n;return(n=cg.get(e))==null?void 0:n.get(t)}const eD=yr("__proto__,__v_isRef,__isVue"),B$=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Vr)),l4=tD();function tD(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const o=Ot(this);for(let s=0,i=this.length;s<i;s++)Yo(o,"get",s+"");const r=o[t](...n);return r===-1||r===!1?o[t](...n.map(Ot)):r}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...n){Yl(),i3();const o=Ot(this)[t].apply(this,n);return l3(),Zl(),o}}),e}function nD(e){Vr(e)||(e=String(e));const t=Ot(this);return Yo(t,"has",e),t.hasOwnProperty(e)}class z${constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,o){const r=this._isReadonly,s=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return s;if(n==="__v_raw")return o===(r?s?q$:K$:s?W$:U$).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(o)?t:void 0;const i=Te(t);if(!r){if(i&&vt(l4,n))return Reflect.get(l4,n,o);if(n==="hasOwnProperty")return nD}const l=Reflect.get(t,n,o);return(Vr(n)?B$.has(n):eD(n))||(r||Yo(t,"get",n),s)?l:on(l)?i&&t3(n)?l:l.value:pt(l)?r?wu(l):Bn(l):l}}class j$ extends z${constructor(t=!1){super(!1,t)}set(t,n,o,r){let s=t[n];if(!this._isShallow){const a=Dc(s);if(!pp(o)&&!Dc(o)&&(s=Ot(s),o=Ot(o)),!Te(t)&&on(s)&&!on(o))return a?!1:(s.value=o,!0)}const i=Te(t)&&t3(n)?Number(n)<t.length:vt(t,n),l=Reflect.set(t,n,o,r);return t===Ot(r)&&(i?hs(o,s)&&xi(t,"set",n,o):xi(t,"add",n,o)),l}deleteProperty(t,n){const o=vt(t,n);t[n];const r=Reflect.deleteProperty(t,n);return r&&o&&xi(t,"delete",n,void 0),r}has(t,n){const o=Reflect.has(t,n);return(!Vr(n)||!B$.has(n))&&Yo(t,"has",n),o}ownKeys(t){return Yo(t,"iterate",Te(t)?"length":Ha),Reflect.ownKeys(t)}}class H$ extends z${constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const oD=new j$,rD=new H$,sD=new j$(!0),iD=new H$(!0),a3=e=>e,h0=e=>Reflect.getPrototypeOf(e);function Gh(e,t,n=!1,o=!1){e=e.__v_raw;const r=Ot(e),s=Ot(t);n||(hs(t,s)&&Yo(r,"get",t),Yo(r,"get",s));const{has:i}=h0(r),l=o?a3:n?d3:hp;if(i.call(r,t))return l(e.get(t));if(i.call(r,s))return l(e.get(s));e!==r&&e.get(t)}function Yh(e,t=!1){const n=this.__v_raw,o=Ot(n),r=Ot(e);return t||(hs(e,r)&&Yo(o,"has",e),Yo(o,"has",r)),e===r?n.has(e):n.has(e)||n.has(r)}function Zh(e,t=!1){return e=e.__v_raw,!t&&Yo(Ot(e),"iterate",Ha),Reflect.get(e,"size",e)}function a4(e){e=Ot(e);const t=Ot(this);return h0(t).has.call(t,e)||(t.add(e),xi(t,"add",e,e)),this}function u4(e,t){t=Ot(t);const n=Ot(this),{has:o,get:r}=h0(n);let s=o.call(n,e);s||(e=Ot(e),s=o.call(n,e));const i=r.call(n,e);return n.set(e,t),s?hs(t,i)&&xi(n,"set",e,t):xi(n,"add",e,t),this}function c4(e){const t=Ot(this),{has:n,get:o}=h0(t);let r=n.call(t,e);r||(e=Ot(e),r=n.call(t,e)),o&&o.call(t,e);const s=t.delete(e);return r&&xi(t,"delete",e,void 0),s}function d4(){const e=Ot(this),t=e.size!==0,n=e.clear();return t&&xi(e,"clear",void 0,void 0),n}function Jh(e,t){return function(o,r){const s=this,i=s.__v_raw,l=Ot(i),a=t?a3:e?d3:hp;return!e&&Yo(l,"iterate",Ha),i.forEach((u,c)=>o.call(r,a(u),a(c),s))}}function Xh(e,t,n){return function(...o){const r=this.__v_raw,s=Ot(r),i=gc(s),l=e==="entries"||e===Symbol.iterator&&i,a=e==="keys"&&i,u=r[e](...o),c=n?a3:t?d3:hp;return!t&&Yo(s,"iterate",a?g_:Ha),{next(){const{value:d,done:f}=u.next();return f?{value:d,done:f}:{value:l?[c(d[0]),c(d[1])]:c(d),done:f}},[Symbol.iterator](){return this}}}}function Ki(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function lD(){const e={get(s){return Gh(this,s)},get size(){return Zh(this)},has:Yh,add:a4,set:u4,delete:c4,clear:d4,forEach:Jh(!1,!1)},t={get(s){return Gh(this,s,!1,!0)},get size(){return Zh(this)},has:Yh,add:a4,set:u4,delete:c4,clear:d4,forEach:Jh(!1,!0)},n={get(s){return Gh(this,s,!0)},get size(){return Zh(this,!0)},has(s){return Yh.call(this,s,!0)},add:Ki("add"),set:Ki("set"),delete:Ki("delete"),clear:Ki("clear"),forEach:Jh(!0,!1)},o={get(s){return Gh(this,s,!0,!0)},get size(){return Zh(this,!0)},has(s){return Yh.call(this,s,!0)},add:Ki("add"),set:Ki("set"),delete:Ki("delete"),clear:Ki("clear"),forEach:Jh(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(s=>{e[s]=Xh(s,!1,!1),n[s]=Xh(s,!0,!1),t[s]=Xh(s,!1,!0),o[s]=Xh(s,!0,!0)}),[e,n,t,o]}const[aD,uD,cD,dD]=lD();function m0(e,t){const n=t?e?dD:cD:e?uD:aD;return(o,r,s)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?o:Reflect.get(vt(n,r)&&r in o?n:o,r,s)}const fD={get:m0(!1,!1)},pD={get:m0(!1,!0)},hD={get:m0(!0,!1)},mD={get:m0(!0,!0)},U$=new WeakMap,W$=new WeakMap,K$=new WeakMap,q$=new WeakMap;function gD(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function vD(e){return e.__v_skip||!Object.isExtensible(e)?0:gD(zm(e))}function Bn(e){return Dc(e)?e:g0(e,!1,oD,fD,U$)}function u3(e){return g0(e,!1,sD,pD,W$)}function wu(e){return g0(e,!0,rD,hD,K$)}function yD(e){return g0(e,!0,iD,mD,q$)}function g0(e,t,n,o,r){if(!pt(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const s=r.get(e);if(s)return s;const i=vD(e);if(i===0)return e;const l=new Proxy(e,i===2?o:n);return r.set(e,l),l}function _c(e){return Dc(e)?_c(e.__v_raw):!!(e&&e.__v_isReactive)}function Dc(e){return!!(e&&e.__v_isReadonly)}function pp(e){return!!(e&&e.__v_isShallow)}function c3(e){return e?!!e.__v_raw:!1}function Ot(e){const t=e&&e.__v_raw;return t?Ot(t):e}function Ai(e){return Object.isExtensible(e)&&T$(e,"__v_skip",!0),e}const hp=e=>pt(e)?Bn(e):e,d3=e=>pt(e)?wu(e):e;class G${constructor(t,n,o,r){this.getter=t,this._setter=n,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new Rc(()=>t(this._value),()=>bc(this,this.effect._dirtyLevel===2?2:3)),this.effect.computed=this,this.effect.active=this._cacheable=!r,this.__v_isReadonly=o}get value(){const t=Ot(this);return(!t._cacheable||t.effect.dirty)&&hs(t._value,t._value=t.effect.run())&&bc(t,4),f3(t),t.effect._dirtyLevel>=2&&bc(t,2),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function Y$(e,t,n=!1){let o,r;const s=et(e);return s?(o=e,r=yt):(o=e.get,r=e.set),new G$(o,r,s||!r,n)}function f3(e){var t;Pl&&ja&&(e=Ot(e),D$(ja,(t=e.dep)!=null?t:e.dep=F$(()=>e.dep=void 0,e instanceof G$?e:void 0)))}function bc(e,t=4,n){e=Ot(e);const o=e.dep;o&&V$(o,t)}function on(e){return!!(e&&e.__v_isRef===!0)}function q(e){return Z$(e,!1)}function An(e){return Z$(e,!0)}function Z$(e,t){return on(e)?e:new _D(e,t)}class _D{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:Ot(t),this._value=n?t:hp(t)}get value(){return f3(this),this._value}set value(t){const n=this.__v_isShallow||pp(t)||Dc(t);t=n?t:Ot(t),hs(t,this._rawValue)&&(this._rawValue=t,this._value=n?t:hp(t),bc(this,4))}}function bD(e){bc(e,4)}function g(e){return on(e)?e.value:e}function wD(e){return et(e)?e():g(e)}const CD={get:(e,t,n)=>g(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const r=e[t];return on(r)&&!on(n)?(r.value=n,!0):Reflect.set(e,t,n,o)}};function p3(e){return _c(e)?e:new Proxy(e,CD)}class kD{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:n,set:o}=t(()=>f3(this),()=>bc(this));this._get=n,this._set=o}get value(){return this._get()}set value(t){this._set(t)}}function J$(e){return new kD(e)}function oi(e){const t=Te(e)?new Array(e.length):{};for(const n in e)t[n]=X$(e,n);return t}class SD{constructor(t,n,o){this._object=t,this._key=n,this._defaultValue=o,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return QR(Ot(this._object),this._key)}}class $D{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function pn(e,t,n){return on(e)?e:et(e)?new $D(e):pt(e)&&arguments.length>1?X$(e,t,n):q(e)}function X$(e,t,n){const o=e[t];return on(o)?o:new SD(e,t,n)}const ED={GET:"get",HAS:"has",ITERATE:"iterate"},xD={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"};/** |
| 10 |
* @vue/runtime-core v3.4.23 |
| 11 |
* (c) 2018-present Yuxi (Evan) You and Vue contributors |
| 12 |
* @license MIT |
| 13 |
**/function TD(e,t){}const MD={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",WATCH_GETTER:2,2:"WATCH_GETTER",WATCH_CALLBACK:3,3:"WATCH_CALLBACK",WATCH_CLEANUP:4,4:"WATCH_CLEANUP",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER"},OD={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core ."};function Ti(e,t,n,o){try{return o?e(...o):e()}catch(r){Cu(r,t,n)}}function hr(e,t,n,o){if(et(e)){const r=Ti(e,t,n,o);return r&&e3(r)&&r.catch(s=>{Cu(s,t,n)}),r}if(Te(e)){const r=[];for(let s=0;s<e.length;s++)r.push(hr(e[s],t,n,o));return r}}function Cu(e,t,n,o=!0){const r=t?t.vnode:null;if(t){let s=t.parent;const i=t.proxy,l=`https://vuejs.org/error-reference/#runtime-${n}`;for(;s;){const u=s.ec;if(u){for(let c=0;c<u.length;c++)if(u[c](e,i,l)===!1)return}s=s.parent}const a=t.appContext.config.errorHandler;if(a){Yl(),Ti(a,null,10,[e,i,l]),Zl();return}}ID(e,n,r,o)}function ID(e,t,n,o=!0){console.error(e)}let mp=!1,v_=!1;const ho=[];let js=0;const wc=[];let hl=null,Ta=0;const Q$=Promise.resolve();let h3=null;function ot(e){const t=h3||Q$;return e?t.then(this?e.bind(this):e):t}function AD(e){let t=js+1,n=ho.length;for(;t<n;){const o=t+n>>>1,r=ho[o],s=gp(r);s<e||s===e&&r.pre?t=o+1:n=o}return t}function v0(e){(!ho.length||!ho.includes(e,mp&&e.allowRecurse?js+1:js))&&(e.id==null?ho.push(e):ho.splice(AD(e.id),0,e),eE())}function eE(){!mp&&!v_&&(v_=!0,h3=Q$.then(tE))}function ND(e){const t=ho.indexOf(e);t>js&&ho.splice(t,1)}function dg(e){Te(e)?wc.push(...e):(!hl||!hl.includes(e,e.allowRecurse?Ta+1:Ta))&&wc.push(e),eE()}function f4(e,t,n=mp?js+1:0){for(;n<ho.length;n++){const o=ho[n];if(o&&o.pre){if(e&&o.id!==e.uid)continue;ho.splice(n,1),n--,o()}}}function fg(e){if(wc.length){const t=[...new Set(wc)].sort((n,o)=>gp(n)-gp(o));if(wc.length=0,hl){hl.push(...t);return}for(hl=t,Ta=0;Ta<hl.length;Ta++)hl[Ta]();hl=null,Ta=0}}const gp=e=>e.id==null?1/0:e.id,PD=(e,t)=>{const n=gp(e)-gp(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function tE(e){v_=!1,mp=!0,ho.sort(PD);const t=yt;try{for(js=0;js<ho.length;js++){const n=ho[js];n&&n.active!==!1&&Ti(n,null,14)}}finally{js=0,ho.length=0,fg(),mp=!1,h3=null,(ho.length||wc.length)&&tE()}}let Uu,Qh=[];function nE(e,t){var n,o;Uu=e,Uu?(Uu.enabled=!0,Qh.forEach(({event:r,args:s})=>Uu.emit(r,...s)),Qh=[]):typeof window<"u"&&window.HTMLElement&&!((o=(n=window.navigator)==null?void 0:n.userAgent)!=null&&o.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(s=>{nE(s,t)}),setTimeout(()=>{Uu||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Qh=[])},3e3)):Qh=[]}function LD(e,t,...n){if(e.isUnmounted)return;const o=e.vnode.props||Wt;let r=n;const s=t.startsWith("update:"),i=s&&t.slice(7);if(i&&i in o){const c=`${i==="modelValue"?"model":i}Modifiers`,{number:d,trim:f}=o[c]||Wt;f&&(r=n.map(p=>tt(p)?p.trim():p)),d&&(r=n.map(ag))}let l,a=o[l=vc(t)]||o[l=vc(yn(t))];!a&&s&&(a=o[l=vc(zo(t))]),a&&hr(a,e,6,r);const u=o[l+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,hr(u,e,6,r)}}function oE(e,t,n=!1){const o=t.emitsCache,r=o.get(e);if(r!==void 0)return r;const s=e.emits;let i={},l=!1;if(!et(e)){const a=u=>{const c=oE(u,t,!0);c&&(l=!0,zt(i,c))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!s&&!l?(pt(e)&&o.set(e,null),null):(Te(s)?s.forEach(a=>i[a]=null):zt(i,s),pt(e)&&o.set(e,i),i)}function y0(e,t){return!e||!_u(t)?!1:(t=t.slice(2).replace(/Once$/,""),vt(e,t[0].toLowerCase()+t.slice(1))||vt(e,zo(t))||vt(e,t))}let Dn=null,_0=null;function vp(e){const t=Dn;return Dn=e,_0=e&&e.type.__scopeId||null,t}function rE(e){_0=e}function sE(){_0=null}const RD=e=>S;function S(e,t=Dn,n){if(!t||e._n)return e;const o=(...r)=>{o._d&&E_(-1);const s=vp(t);let i;try{i=e(...r)}finally{vp(s),o._d&&E_(1)}return i};return o._n=!0,o._c=!0,o._d=!0,o}function jm(e){const{type:t,vnode:n,proxy:o,withProxy:r,props:s,propsOptions:[i],slots:l,attrs:a,emit:u,render:c,renderCache:d,data:f,setupState:p,ctx:h,inheritAttrs:m}=e;let y,v;const k=vp(e);try{if(n.shapeFlag&4){const $=r||o,x=$;y=ur(c.call(x,$,d,s,p,f,h)),v=a}else{const $=t;y=ur($.length>1?$(s,{attrs:a,slots:l,emit:u}):$(s,null)),v=t.props?a:VD(a)}}catch($){Df.length=0,Cu($,e,1),y=w(Yn)}let b=y;if(v&&m!==!1){const $=Object.keys(v),{shapeFlag:x}=b;$.length&&x&7&&(i&&$.some(X2)&&(v=FD(v,i)),b=gs(b,v))}return n.dirs&&(b=gs(b),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&(b.transition=n.transition),y=b,vp(k),y}function DD(e,t=!0){let n;for(let o=0;o<e.length;o++){const r=e[o];if(yo(r)){if(r.type!==Yn||r.children==="v-if"){if(n)return;n=r}}else return}return n}const VD=e=>{let t;for(const n in e)(n==="class"||n==="style"||_u(n))&&((t||(t={}))[n]=e[n]);return t},FD=(e,t)=>{const n={};for(const o in e)(!X2(o)||!(o.slice(9)in t))&&(n[o]=e[o]);return n};function BD(e,t,n){const{props:o,children:r,component:s}=e,{props:i,children:l,patchFlag:a}=t,u=s.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&a>=0){if(a&1024)return!0;if(a&16)return o?p4(o,i,u):!!i;if(a&8){const c=t.dynamicProps;for(let d=0;d<c.length;d++){const f=c[d];if(i[f]!==o[f]&&!y0(u,f))return!0}}}else return(r||l)&&(!l||!l.$stable)?!0:o===i?!1:o?i?p4(o,i,u):!0:!!i;return!1}function p4(e,t,n){const o=Object.keys(t);if(o.length!==Object.keys(e).length)return!0;for(let r=0;r<o.length;r++){const s=o[r];if(t[s]!==e[s]&&!y0(n,s))return!0}return!1}function m3({vnode:e,parent:t},n){for(;t;){const o=t.subTree;if(o.suspense&&o.suspense.activeBranch===e&&(o.el=e.el),o===e)(e=t.vnode).el=n,t=t.parent;else break}}const g3="components",zD="directives";function ee(e,t){return v3(g3,e,!0,t)||e}const iE=Symbol.for("v-ndc");function Pt(e){return tt(e)?v3(g3,e,!1)||e:e||iE}function Rt(e){return v3(zD,e)}function v3(e,t,n=!0,o=!1){const r=Dn||Hn;if(r){const s=r.type;if(e===g3){const l=I_(s,!1);if(l&&(l===t||l===yn(t)||l===Gl(yn(t))))return s}const i=h4(r[e]||s[e],t)||h4(r.appContext[e],t);return!i&&o?s:i}}function h4(e,t){return e&&(e[t]||e[yn(t)]||e[Gl(yn(t))])}const lE=e=>e.__isSuspense;let y_=0;const jD={name:"Suspense",__isSuspense:!0,process(e,t,n,o,r,s,i,l,a,u){if(e==null)UD(t,n,o,r,s,i,l,a,u);else{if(s&&s.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}WD(e,t,n,o,r,i,l,a,u)}},hydrate:KD,create:y3,normalize:qD},HD=jD;function yp(e,t){const n=e.props&&e.props[t];et(n)&&n()}function UD(e,t,n,o,r,s,i,l,a){const{p:u,o:{createElement:c}}=a,d=c("div"),f=e.suspense=y3(e,r,o,t,d,n,s,i,l,a);u(null,f.pendingBranch=e.ssContent,d,null,o,f,s,i),f.deps>0?(yp(e,"onPending"),yp(e,"onFallback"),u(null,e.ssFallback,t,n,o,null,s,i),Cc(f,e.ssFallback)):f.resolve(!1,!0)}function WD(e,t,n,o,r,s,i,l,{p:a,um:u,o:{createElement:c}}){const d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;const f=t.ssContent,p=t.ssFallback,{activeBranch:h,pendingBranch:m,isInFallback:y,isHydrating:v}=d;if(m)d.pendingBranch=f,is(f,m)?(a(m,f,d.hiddenContainer,null,r,d,s,i,l),d.deps<=0?d.resolve():y&&(v||(a(h,p,n,o,r,null,s,i,l),Cc(d,p)))):(d.pendingId=y_++,v?(d.isHydrating=!1,d.activeBranch=m):u(m,r,d),d.deps=0,d.effects.length=0,d.hiddenContainer=c("div"),y?(a(null,f,d.hiddenContainer,null,r,d,s,i,l),d.deps<=0?d.resolve():(a(h,p,n,o,r,null,s,i,l),Cc(d,p))):h&&is(f,h)?(a(h,f,n,o,r,d,s,i,l),d.resolve(!0)):(a(null,f,d.hiddenContainer,null,r,d,s,i,l),d.deps<=0&&d.resolve()));else if(h&&is(f,h))a(h,f,n,o,r,d,s,i,l),Cc(d,f);else if(yp(t,"onPending"),d.pendingBranch=f,f.shapeFlag&512?d.pendingId=f.component.suspenseId:d.pendingId=y_++,a(null,f,d.hiddenContainer,null,r,d,s,i,l),d.deps<=0)d.resolve();else{const{timeout:k,pendingId:b}=d;k>0?setTimeout(()=>{d.pendingId===b&&d.fallback(p)},k):k===0&&d.fallback(p)}}function y3(e,t,n,o,r,s,i,l,a,u,c=!1){const{p:d,m:f,um:p,n:h,o:{parentNode:m,remove:y}}=u;let v;const k=GD(e);k&&t!=null&&t.pendingBranch&&(v=t.pendingId,t.deps++);const b=e.props?ug(e.props.timeout):void 0,$=s,x={vnode:e,parent:t,parentComponent:n,namespace:i,container:o,hiddenContainer:r,deps:0,pendingId:y_++,timeout:typeof b=="number"?b:-1,activeBranch:null,pendingBranch:null,isInFallback:!c,isHydrating:c,isUnmounted:!1,effects:[],resolve(E=!1,M=!1){const{vnode:N,activeBranch:P,pendingBranch:I,pendingId:V,effects:F,parentComponent:Y,container:Z}=x;let K=!1;x.isHydrating?x.isHydrating=!1:E||(K=P&&I.transition&&I.transition.mode==="out-in",K&&(P.transition.afterLeave=()=>{V===x.pendingId&&(f(I,Z,s===$?h(P):s,0),dg(F))}),P&&(m(P.el)!==x.hiddenContainer&&(s=h(P)),p(P,Y,x,!0)),K||f(I,Z,s,0)),Cc(x,I),x.pendingBranch=null,x.isInFallback=!1;let U=x.parent,B=!1;for(;U;){if(U.pendingBranch){U.effects.push(...F),B=!0;break}U=U.parent}!B&&!K&&dg(F),x.effects=[],k&&t&&t.pendingBranch&&v===t.pendingId&&(t.deps--,t.deps===0&&!M&&t.resolve()),yp(N,"onResolve")},fallback(E){if(!x.pendingBranch)return;const{vnode:M,activeBranch:N,parentComponent:P,container:I,namespace:V}=x;yp(M,"onFallback");const F=h(N),Y=()=>{x.isInFallback&&(d(null,E,I,F,P,null,V,l,a),Cc(x,E))},Z=E.transition&&E.transition.mode==="out-in";Z&&(N.transition.afterLeave=Y),x.isInFallback=!0,p(N,P,null,!0),Z||Y()},move(E,M,N){x.activeBranch&&f(x.activeBranch,E,M,N),x.container=E},next(){return x.activeBranch&&h(x.activeBranch)},registerDep(E,M){const N=!!x.pendingBranch;N&&x.deps++;const P=E.vnode.el;E.asyncDep.catch(I=>{Cu(I,E,0)}).then(I=>{if(E.isUnmounted||x.isUnmounted||x.pendingId!==E.suspenseId)return;E.asyncResolved=!0;const{vnode:V}=E;M_(E,I,!1),P&&(V.el=P);const F=!P&&E.subTree.el;M(E,V,m(P||E.subTree.el),P?null:h(E.subTree),x,i,a),F&&y(F),m3(E,V.el),N&&--x.deps===0&&x.resolve()})},unmount(E,M){x.isUnmounted=!0,x.activeBranch&&p(x.activeBranch,n,E,M),x.pendingBranch&&p(x.pendingBranch,n,E,M)}};return x}function KD(e,t,n,o,r,s,i,l,a){const u=t.suspense=y3(t,o,n,e.parentNode,document.createElement("div"),null,r,s,i,l,!0),c=a(e,u.pendingBranch=t.ssContent,n,u,s,i);return u.deps===0&&u.resolve(!1,!0),c}function qD(e){const{shapeFlag:t,children:n}=e,o=t&32;e.ssContent=m4(o?n.default:n),e.ssFallback=o?m4(n.fallback):w(Yn)}function m4(e){let t;if(et(e)){const n=ru&&e._c;n&&(e._d=!1,C()),e=e(),n&&(e._d=!0,t=jo,zE())}return Te(e)&&(e=DD(e)),e=ur(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function aE(e,t){t&&t.pendingBranch?Te(e)?t.effects.push(...e):t.effects.push(e):dg(e)}function Cc(e,t){e.activeBranch=t;const{vnode:n,parentComponent:o}=e;let r=t.el;for(;!r&&t.component;)t=t.component.subTree,r=t.el;n.el=r,o&&o.subTree===n&&(o.vnode.el=r,m3(o,r))}function GD(e){var t;return((t=e.props)==null?void 0:t.suspensible)!=null&&e.props.suspensible!==!1}const uE=Symbol.for("v-scx"),cE=()=>je(uE);function as(e,t){return Zp(e,null,t)}function dE(e,t){return Zp(e,null,{flush:"post"})}function fE(e,t){return Zp(e,null,{flush:"sync"})}const em={};function Me(e,t,n){return Zp(e,t,n)}function Zp(e,t,{immediate:n,deep:o,flush:r,once:s,onTrack:i,onTrigger:l}=Wt){if(t&&s){const E=t;t=(...M)=>{E(...M),x()}}const a=Hn,u=E=>o===!0?E:Ia(E,o===!1?1:void 0);let c,d=!1,f=!1;if(on(e)?(c=()=>e.value,d=pp(e)):_c(e)?(c=()=>u(e),d=!0):Te(e)?(f=!0,d=e.some(E=>_c(E)||pp(E)),c=()=>e.map(E=>{if(on(E))return E.value;if(_c(E))return u(E);if(et(E))return Ti(E,a,2)})):et(e)?t?c=()=>Ti(e,a,2):c=()=>(p&&p(),hr(e,a,3,[h])):c=yt,t&&o){const E=c;c=()=>Ia(E())}let p,h=E=>{p=b.onStop=()=>{Ti(E,a,4),p=b.onStop=void 0}},m;if(Xp)if(h=yt,t?n&&hr(t,a,3,[c(),f?[]:void 0,h]):c(),r==="sync"){const E=cE();m=E.__watcherHandles||(E.__watcherHandles=[])}else return yt;let y=f?new Array(e.length).fill(em):em;const v=()=>{if(!(!b.active||!b.dirty))if(t){const E=b.run();(o||d||(f?E.some((M,N)=>hs(M,y[N])):hs(E,y)))&&(p&&p(),hr(t,a,3,[E,y===em?void 0:f&&y[0]===em?[]:y,h]),y=E)}else b.run()};v.allowRecurse=!!t;let k;r==="sync"?k=v:r==="post"?k=()=>no(v,a&&a.suspense):(v.pre=!0,a&&(v.id=a.uid),k=()=>v0(v));const b=new Rc(c,yt,k),$=r3(),x=()=>{b.stop(),$&&Q2($.effects,b)};return t?n?v():y=b.run():r==="post"?no(b.run.bind(b),a&&a.suspense):b.run(),m&&m.push(x),x}function YD(e,t,n){const o=this.proxy,r=tt(e)?e.includes(".")?pE(o,e):()=>o[e]:e.bind(o,o);let s;et(t)?s=t:(s=t.handler,n=t);const i=su(this),l=Zp(r,s.bind(o),n);return i(),l}function pE(e,t){const n=t.split(".");return()=>{let o=e;for(let r=0;r<n.length&&o;r++)o=o[n[r]];return o}}function Ia(e,t,n=0,o){if(!pt(e)||e.__v_skip)return e;if(t&&t>0){if(n>=t)return e;n++}if(o=o||new Set,o.has(e))return e;if(o.add(e),on(e))Ia(e.value,t,n,o);else if(Te(e))for(let r=0;r<e.length;r++)Ia(e[r],t,n,o);else if(bu(e)||gc(e))e.forEach(r=>{Ia(r,t,n,o)});else if(lg(e))for(const r in e)Ia(e[r],t,n,o);return e}function Fe(e,t){if(Dn===null)return e;const n=k0(Dn)||Dn.proxy,o=e.dirs||(e.dirs=[]);for(let r=0;r<t.length;r++){let[s,i,l,a=Wt]=t[r];s&&(et(s)&&(s={mounted:s,updated:s}),s.deep&&Ia(i),o.push({dir:s,instance:n,value:i,oldValue:void 0,arg:l,modifiers:a}))}return e}function Bs(e,t,n,o){const r=e.dirs,s=t&&t.dirs;for(let i=0;i<r.length;i++){const l=r[i];s&&(l.oldValue=s[i].value);let a=l.dir[o];a&&(Yl(),hr(a,n,8,[e.el,l,e,t]),Zl())}}const ml=Symbol("_leaveCb"),tm=Symbol("_enterCb");function _3(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Ct(()=>{e.isMounted=!0}),xn(()=>{e.isUnmounting=!0}),e}const kr=[Function,Array],b3={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:kr,onEnter:kr,onAfterEnter:kr,onEnterCancelled:kr,onBeforeLeave:kr,onLeave:kr,onAfterLeave:kr,onLeaveCancelled:kr,onBeforeAppear:kr,onAppear:kr,onAfterAppear:kr,onAppearCancelled:kr},ZD={name:"BaseTransition",props:b3,setup(e,{slots:t}){const n=at(),o=_3();return()=>{const r=t.default&&b0(t.default(),!0);if(!r||!r.length)return;let s=r[0];if(r.length>1){for(const f of r)if(f.type!==Yn){s=f;break}}const i=Ot(e),{mode:l}=i;if(o.isLeaving)return Fv(s);const a=g4(s);if(!a)return Fv(s);const u=Vc(a,i,o,n);ou(a,u);const c=n.subTree,d=c&&g4(c);if(d&&d.type!==Yn&&!is(a,d)){const f=Vc(d,i,o,n);if(ou(d,f),l==="out-in")return o.isLeaving=!0,f.afterLeave=()=>{o.isLeaving=!1,n.update.active!==!1&&(n.effect.dirty=!0,n.update())},Fv(s);l==="in-out"&&a.type!==Yn&&(f.delayLeave=(p,h,m)=>{const y=mE(o,d);y[String(d.key)]=d,p[ml]=()=>{h(),p[ml]=void 0,delete u.delayedLeave},u.delayedLeave=m})}return s}}},hE=ZD;function mE(e,t){const{leavingVNodes:n}=e;let o=n.get(t.type);return o||(o=Object.create(null),n.set(t.type,o)),o}function Vc(e,t,n,o){const{appear:r,mode:s,persisted:i=!1,onBeforeEnter:l,onEnter:a,onAfterEnter:u,onEnterCancelled:c,onBeforeLeave:d,onLeave:f,onAfterLeave:p,onLeaveCancelled:h,onBeforeAppear:m,onAppear:y,onAfterAppear:v,onAppearCancelled:k}=t,b=String(e.key),$=mE(n,e),x=(N,P)=>{N&&hr(N,o,9,P)},E=(N,P)=>{const I=P[1];x(N,P),Te(N)?N.every(V=>V.length<=1)&&I():N.length<=1&&I()},M={mode:s,persisted:i,beforeEnter(N){let P=l;if(!n.isMounted)if(r)P=m||l;else return;N[ml]&&N[ml](!0);const I=$[b];I&&is(e,I)&&I.el[ml]&&I.el[ml](),x(P,[N])},enter(N){let P=a,I=u,V=c;if(!n.isMounted)if(r)P=y||a,I=v||u,V=k||c;else return;let F=!1;const Y=N[tm]=Z=>{F||(F=!0,Z?x(V,[N]):x(I,[N]),M.delayedLeave&&M.delayedLeave(),N[tm]=void 0)};P?E(P,[N,Y]):Y()},leave(N,P){const I=String(e.key);if(N[tm]&&N[tm](!0),n.isUnmounting)return P();x(d,[N]);let V=!1;const F=N[ml]=Y=>{V||(V=!0,P(),Y?x(h,[N]):x(p,[N]),N[ml]=void 0,$[I]===e&&delete $[I])};$[I]=e,f?E(f,[N,F]):F()},clone(N){return Vc(N,t,n,o)}};return M}function Fv(e){if(Jp(e))return e=gs(e),e.children=null,e}function g4(e){return Jp(e)?e.children?e.children[0]:void 0:e}function ou(e,t){e.shapeFlag&6&&e.component?ou(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 b0(e,t=!1,n){let o=[],r=0;for(let s=0;s<e.length;s++){let i=e[s];const l=n==null?i.key:String(n)+String(i.key!=null?i.key:s);i.type===de?(i.patchFlag&128&&r++,o=o.concat(b0(i.children,t,l))):(t||i.type!==Yn)&&o.push(l!=null?gs(i,{key:l}):i)}if(r>1)for(let s=0;s<o.length;s++)o[s].patchFlag=-2;return o}/*! #__NO_SIDE_EFFECTS__ */function Q(e,t){return et(e)?(()=>zt({name:e.name},t,{setup:e}))():e}const Ua=e=>!!e.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function JD(e){et(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:o,delay:r=200,timeout:s,suspensible:i=!0,onError:l}=e;let a=null,u,c=0;const d=()=>(c++,a=null,f()),f=()=>{let p;return a||(p=a=t().catch(h=>{if(h=h instanceof Error?h:new Error(String(h)),l)return new Promise((m,y)=>{l(h,()=>m(d()),()=>y(h),c+1)});throw h}).then(h=>p!==a&&a?a:(h&&(h.__esModule||h[Symbol.toStringTag]==="Module")&&(h=h.default),u=h,h)))};return Q({name:"AsyncComponentWrapper",__asyncLoader:f,get __asyncResolved(){return u},setup(){const p=Hn;if(u)return()=>Bv(u,p);const h=k=>{a=null,Cu(k,p,13,!o)};if(i&&p.suspense||Xp)return f().then(k=>()=>Bv(k,p)).catch(k=>(h(k),()=>o?w(o,{error:k}):null));const m=q(!1),y=q(),v=q(!!r);return r&&setTimeout(()=>{v.value=!1},r),s!=null&&setTimeout(()=>{if(!m.value&&!y.value){const k=new Error(`Async component timed out after ${s}ms.`);h(k),y.value=k}},s),f().then(()=>{m.value=!0,p.parent&&Jp(p.parent.vnode)&&(p.parent.effect.dirty=!0,v0(p.parent.update))}).catch(k=>{h(k),y.value=k}),()=>{if(m.value&&u)return Bv(u,p);if(y.value&&o)return w(o,{error:y.value});if(n&&!v.value)return w(n)}}})}function Bv(e,t){const{ref:n,props:o,children:r,ce:s}=t.vnode,i=w(e,o,r);return i.ref=n,i.ce=s,delete t.vnode.ce,i}const Jp=e=>e.type.__isKeepAlive,XD={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=at(),o=n.ctx;if(!o.renderer)return()=>{const k=t.default&&t.default();return k&&k.length===1?k[0]:k};const r=new Map,s=new Set;let i=null;const l=n.suspense,{renderer:{p:a,m:u,um:c,o:{createElement:d}}}=o,f=d("div");o.activate=(k,b,$,x,E)=>{const M=k.component;u(k,b,$,0,l),a(M.vnode,k,b,$,M,l,x,k.slotScopeIds,E),no(()=>{M.isDeactivated=!1,M.a&&yc(M.a);const N=k.props&&k.props.onVnodeMounted;N&&Fo(N,M.parent,k)},l)},o.deactivate=k=>{const b=k.component;u(k,f,null,1,l),no(()=>{b.da&&yc(b.da);const $=k.props&&k.props.onVnodeUnmounted;$&&Fo($,b.parent,k),b.isDeactivated=!0},l)};function p(k){zv(k),c(k,n,l,!0)}function h(k){r.forEach((b,$)=>{const x=I_(b.type);x&&(!k||!k(x))&&m($)})}function m(k){const b=r.get(k);!i||!is(b,i)?p(b):i&&zv(i),r.delete(k),s.delete(k)}Me(()=>[e.include,e.exclude],([k,b])=>{k&&h($=>Jd(k,$)),b&&h($=>!Jd(b,$))},{flush:"post",deep:!0});let y=null;const v=()=>{y!=null&&r.set(y,jv(n.subTree))};return Ct(v),Fi(v),xn(()=>{r.forEach(k=>{const{subTree:b,suspense:$}=n,x=jv(b);if(k.type===x.type&&k.key===x.key){zv(x);const E=x.component.da;E&&no(E,$);return}p(k)})}),()=>{if(y=null,!t.default)return i=null;const k=t.default(),b=k[0];if(k.length>1)return i=null,k;if(!yo(b)||!(b.shapeFlag&4)&&!(b.shapeFlag&128))return i=null,b;let $=jv(b);const x=$.type,E=I_(Ua($)?$.type.__asyncResolved||{}:x),{include:M,exclude:N,max:P}=e;if(M&&(!E||!Jd(M,E))||N&&E&&Jd(N,E))return i=$,b;const I=$.key==null?x:$.key,V=r.get(I);return $.el&&($=gs($),b.shapeFlag&128&&(b.ssContent=$)),y=I,V?($.el=V.el,$.component=V.component,$.transition&&ou($,$.transition),$.shapeFlag|=512,s.delete(I),s.add(I)):(s.add(I),P&&s.size>parseInt(P,10)&&m(s.values().next().value)),$.shapeFlag|=256,i=$,lE(b.type)?b:$}}},QD=XD;function Jd(e,t){return Te(e)?e.some(n=>Jd(n,t)):tt(e)?e.split(",").includes(t):OR(e)?e.test(t):!1}function gE(e,t){vE(e,"a",t)}function w3(e,t){vE(e,"da",t)}function vE(e,t,n=Hn){const o=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(w0(t,o,n),n){let r=n.parent;for(;r&&r.parent;)Jp(r.parent.vnode)&&eV(o,t,n,r),r=r.parent}}function eV(e,t,n,o){const r=w0(t,e,o,!0);ri(()=>{Q2(o[t],r)},n)}function zv(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function jv(e){return e.shapeFlag&128?e.ssContent:e}function w0(e,t,n=Hn,o=!1){if(n){const r=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...i)=>{if(n.isUnmounted)return;Yl();const l=su(n),a=hr(t,n,e,i);return l(),Zl(),a});return o?r.unshift(s):r.push(s),s}}const Vi=e=>(t,n=Hn)=>(!Xp||e==="sp")&&w0(e,(...o)=>t(...o),n),yd=Vi("bm"),Ct=Vi("m"),yE=Vi("bu"),Fi=Vi("u"),xn=Vi("bum"),ri=Vi("um"),_E=Vi("sp"),bE=Vi("rtg"),wE=Vi("rtc");function CE(e,t=Hn){w0("ec",e,t)}function nt(e,t,n,o){let r;const s=n&&n[o];if(Te(e)||tt(e)){r=new Array(e.length);for(let i=0,l=e.length;i<l;i++)r[i]=t(e[i],i,void 0,s&&s[i])}else if(typeof e=="number"){r=new Array(e);for(let i=0;i<e;i++)r[i]=t(i+1,i,void 0,s&&s[i])}else if(pt(e))if(e[Symbol.iterator])r=Array.from(e,(i,l)=>t(i,l,void 0,s&&s[l]));else{const i=Object.keys(e);r=new Array(i.length);for(let l=0,a=i.length;l<a;l++){const u=i[l];r[l]=t(e[u],u,l,s&&s[l])}}else r=[];return n&&(n[o]=r),r}function ms(e,t){for(let n=0;n<t.length;n++){const o=t[n];if(Te(o))for(let r=0;r<o.length;r++)e[o[r].name]=o[r].fn;else o&&(e[o.name]=o.key?(...r)=>{const s=o.fn(...r);return s&&(s.key=o.key),s}:o.fn)}return e}function he(e,t,n={},o,r){if(Dn.isCE||Dn.parent&&Ua(Dn.parent)&&Dn.parent.isCE)return t!=="default"&&(n.name=t),w("slot",n,o&&o());let s=e[t];s&&s._c&&(s._d=!1),C();const i=s&&kE(s(n)),l=H(de,{key:n.key||i&&i.key||`_${t}`},i||(o?o():[]),i&&e._===1?64:-2);return!r&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),s&&s._c&&(s._d=!0),l}function kE(e){return e.some(t=>yo(t)?!(t.type===Yn||t.type===de&&!kE(t.children)):!0)?e:null}function SE(e,t){const n={};for(const o in e)n[t&&/[A-Z]/.test(o)?`on:${o}`:vc(o)]=e[o];return n}const __=e=>e?WE(e)?k0(e)||e.proxy:__(e.parent):null,Lf=zt(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=>__(e.parent),$root:e=>__(e.root),$emit:e=>e.emit,$options:e=>C3(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,v0(e.update)}),$nextTick:e=>e.n||(e.n=ot.bind(e.proxy)),$watch:e=>YD.bind(e)}),Hv=(e,t)=>e!==Wt&&!e.__isScriptSetup&&vt(e,t),b_={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:o,data:r,props:s,accessCache:i,type:l,appContext:a}=e;let u;if(t[0]!=="$"){const p=i[t];if(p!==void 0)switch(p){case 1:return o[t];case 2:return r[t];case 4:return n[t];case 3:return s[t]}else{if(Hv(o,t))return i[t]=1,o[t];if(r!==Wt&&vt(r,t))return i[t]=2,r[t];if((u=e.propsOptions[0])&&vt(u,t))return i[t]=3,s[t];if(n!==Wt&&vt(n,t))return i[t]=4,n[t];w_&&(i[t]=0)}}const c=Lf[t];let d,f;if(c)return t==="$attrs"&&Yo(e.attrs,"get",""),c(e);if((d=l.__cssModules)&&(d=d[t]))return d;if(n!==Wt&&vt(n,t))return i[t]=4,n[t];if(f=a.config.globalProperties,vt(f,t))return f[t]},set({_:e},t,n){const{data:o,setupState:r,ctx:s}=e;return Hv(r,t)?(r[t]=n,!0):o!==Wt&&vt(o,t)?(o[t]=n,!0):vt(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(s[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:r,propsOptions:s}},i){let l;return!!n[i]||e!==Wt&&vt(e,i)||Hv(t,i)||(l=s[0])&&vt(l,i)||vt(o,i)||vt(Lf,i)||vt(r.config.globalProperties,i)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:vt(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},tV=zt({},b_,{get(e,t){if(t!==Symbol.unscopables)return b_.get(e,t,e)},has(e,t){return t[0]!=="_"&&!LR(t)}});function nV(){return null}function oV(){return null}function rV(e){}function sV(e){}function iV(){return null}function lV(){}function aV(e,t){return null}function Kr(){return $E().slots}function _d(){return $E().attrs}function $E(){const e=at();return e.setupContext||(e.setupContext=YE(e))}function _p(e){return Te(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function uV(e,t){const n=_p(e);for(const o in t){if(o.startsWith("__skip"))continue;let r=n[o];r?Te(r)||et(r)?r=n[o]={type:r,default:t[o]}:r.default=t[o]:r===null&&(r=n[o]={default:t[o]}),r&&t[`__skip_${o}`]&&(r.skipFactory=!0)}return n}function cV(e,t){return!e||!t?e||t:Te(e)&&Te(t)?e.concat(t):zt({},_p(e),_p(t))}function dV(e,t){const n={};for(const o in e)t.includes(o)||Object.defineProperty(n,o,{enumerable:!0,get:()=>e[o]});return n}function fV(e){const t=at();let n=e();return T_(),e3(n)&&(n=n.catch(o=>{throw su(t),o})),[n,()=>su(t)]}let w_=!0;function pV(e){const t=C3(e),n=e.proxy,o=e.ctx;w_=!1,t.beforeCreate&&v4(t.beforeCreate,e,"bc");const{data:r,computed:s,methods:i,watch:l,provide:a,inject:u,created:c,beforeMount:d,mounted:f,beforeUpdate:p,updated:h,activated:m,deactivated:y,beforeDestroy:v,beforeUnmount:k,destroyed:b,unmounted:$,render:x,renderTracked:E,renderTriggered:M,errorCaptured:N,serverPrefetch:P,expose:I,inheritAttrs:V,components:F,directives:Y,filters:Z}=t;if(u&&hV(u,o,null),i)for(const B in i){const W=i[B];et(W)&&(o[B]=W.bind(n))}if(r){const B=r.call(n,n);pt(B)&&(e.data=Bn(B))}if(w_=!0,s)for(const B in s){const W=s[B],L=et(W)?W.bind(n,n):et(W.get)?W.get.bind(n,n):yt,A=!et(W)&&et(W.set)?W.set.bind(n):yt,X=R({get:L,set:A});Object.defineProperty(o,B,{enumerable:!0,configurable:!0,get:()=>X.value,set:re=>X.value=re})}if(l)for(const B in l)EE(l[B],o,n,B);if(a){const B=et(a)?a.call(n):a;Reflect.ownKeys(B).forEach(W=>{wt(W,B[W])})}c&&v4(c,e,"c");function U(B,W){Te(W)?W.forEach(L=>B(L.bind(n))):W&&B(W.bind(n))}if(U(yd,d),U(Ct,f),U(yE,p),U(Fi,h),U(gE,m),U(w3,y),U(CE,N),U(wE,E),U(bE,M),U(xn,k),U(ri,$),U(_E,P),Te(I))if(I.length){const B=e.exposed||(e.exposed={});I.forEach(W=>{Object.defineProperty(B,W,{get:()=>n[W],set:L=>n[W]=L})})}else e.exposed||(e.exposed={});x&&e.render===yt&&(e.render=x),V!=null&&(e.inheritAttrs=V),F&&(e.components=F),Y&&(e.directives=Y)}function hV(e,t,n=yt){Te(e)&&(e=C_(e));for(const o in e){const r=e[o];let s;pt(r)?"default"in r?s=je(r.from||o,r.default,!0):s=je(r.from||o):s=je(r),on(s)?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>s.value,set:i=>s.value=i}):t[o]=s}}function v4(e,t,n){hr(Te(e)?e.map(o=>o.bind(t.proxy)):e.bind(t.proxy),t,n)}function EE(e,t,n,o){const r=o.includes(".")?pE(n,o):()=>n[o];if(tt(e)){const s=t[e];et(s)&&Me(r,s)}else if(et(e))Me(r,e.bind(n));else if(pt(e))if(Te(e))e.forEach(s=>EE(s,t,n,o));else{const s=et(e.handler)?e.handler.bind(n):t[e.handler];et(s)&&Me(r,s,e)}}function C3(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:r,optionsCache:s,config:{optionMergeStrategies:i}}=e.appContext,l=s.get(t);let a;return l?a=l:!r.length&&!n&&!o?a=t:(a={},r.length&&r.forEach(u=>pg(a,u,i,!0)),pg(a,t,i)),pt(t)&&s.set(t,a),a}function pg(e,t,n,o=!1){const{mixins:r,extends:s}=t;s&&pg(e,s,n,!0),r&&r.forEach(i=>pg(e,i,n,!0));for(const i in t)if(!(o&&i==="expose")){const l=mV[i]||n&&n[i];e[i]=l?l(e[i],t[i]):t[i]}return e}const mV={data:y4,props:_4,emits:_4,methods:Xd,computed:Xd,beforeCreate:ko,created:ko,beforeMount:ko,mounted:ko,beforeUpdate:ko,updated:ko,beforeDestroy:ko,beforeUnmount:ko,destroyed:ko,unmounted:ko,activated:ko,deactivated:ko,errorCaptured:ko,serverPrefetch:ko,components:Xd,directives:Xd,watch:vV,provide:y4,inject:gV};function y4(e,t){return t?e?function(){return zt(et(e)?e.call(this,this):e,et(t)?t.call(this,this):t)}:t:e}function gV(e,t){return Xd(C_(e),C_(t))}function C_(e){if(Te(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function ko(e,t){return e?[...new Set([].concat(e,t))]:t}function Xd(e,t){return e?zt(Object.create(null),e,t):t}function _4(e,t){return e?Te(e)&&Te(t)?[...new Set([...e,...t])]:zt(Object.create(null),_p(e),_p(t??{})):t}function vV(e,t){if(!e)return t;if(!t)return e;const n=zt(Object.create(null),e);for(const o in t)n[o]=ko(e[o],t[o]);return n}function xE(){return{app:null,config:{isNativeTag:Bm,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 yV=0;function _V(e,t){return function(o,r=null){et(o)||(o=zt({},o)),r!=null&&!pt(r)&&(r=null);const s=xE(),i=new WeakSet;let l=!1;const a=s.app={_uid:yV++,_component:o,_props:r,_container:null,_context:s,_instance:null,version:JE,get config(){return s.config},set config(u){},use(u,...c){return i.has(u)||(u&&et(u.install)?(i.add(u),u.install(a,...c)):et(u)&&(i.add(u),u(a,...c))),a},mixin(u){return s.mixins.includes(u)||s.mixins.push(u),a},component(u,c){return c?(s.components[u]=c,a):s.components[u]},directive(u,c){return c?(s.directives[u]=c,a):s.directives[u]},mount(u,c,d){if(!l){const f=w(o,r);return f.appContext=s,d===!0?d="svg":d===!1&&(d=void 0),c&&t?t(f,u):e(f,u,d),l=!0,a._container=u,u.__vue_app__=a,k0(f.component)||f.component.proxy}},unmount(){l&&(e(null,a._container),delete a._container.__vue_app__)},provide(u,c){return s.provides[u]=c,a},runWithContext(u){const c=kc;kc=a;try{return u()}finally{kc=c}}};return a}}let kc=null;function wt(e,t){if(Hn){let n=Hn.provides;const o=Hn.parent&&Hn.parent.provides;o===n&&(n=Hn.provides=Object.create(o)),n[e]=t}}function je(e,t,n=!1){const o=Hn||Dn;if(o||kc){const r=o?o.parent==null?o.vnode.appContext&&o.vnode.appContext.provides:o.parent.provides:kc._context.provides;if(r&&e in r)return r[e];if(arguments.length>1)return n&&et(t)?t.call(o&&o.proxy):t}}function bV(){return!!(Hn||Dn||kc)}const TE=Object.create(null),k_=()=>Object.create(TE),ME=e=>Object.getPrototypeOf(e)===TE;function wV(e,t,n,o=!1){const r={},s=k_();e.propsDefaults=Object.create(null),OE(e,t,r,s);for(const i in e.propsOptions[0])i in r||(r[i]=void 0);n?e.props=o?r:u3(r):e.type.props?e.props=r:e.props=s,e.attrs=s}function CV(e,t,n,o){const{props:r,attrs:s,vnode:{patchFlag:i}}=e,l=Ot(r),[a]=e.propsOptions;let u=!1;if((o||i>0)&&!(i&16)){if(i&8){const c=e.vnode.dynamicProps;for(let d=0;d<c.length;d++){let f=c[d];if(y0(e.emitsOptions,f))continue;const p=t[f];if(a)if(vt(s,f))p!==s[f]&&(s[f]=p,u=!0);else{const h=yn(f);r[h]=S_(a,l,h,p,e,!1)}else p!==s[f]&&(s[f]=p,u=!0)}}}else{OE(e,t,r,s)&&(u=!0);let c;for(const d in l)(!t||!vt(t,d)&&((c=zo(d))===d||!vt(t,c)))&&(a?n&&(n[d]!==void 0||n[c]!==void 0)&&(r[d]=S_(a,l,d,void 0,e,!0)):delete r[d]);if(s!==l)for(const d in s)(!t||!vt(t,d))&&(delete s[d],u=!0)}u&&xi(e.attrs,"set","")}function OE(e,t,n,o){const[r,s]=e.propsOptions;let i=!1,l;if(t)for(let a in t){if(Nl(a))continue;const u=t[a];let c;r&&vt(r,c=yn(a))?!s||!s.includes(c)?n[c]=u:(l||(l={}))[c]=u:y0(e.emitsOptions,a)||(!(a in o)||u!==o[a])&&(o[a]=u,i=!0)}if(s){const a=Ot(n),u=l||Wt;for(let c=0;c<s.length;c++){const d=s[c];n[d]=S_(r,a,d,u[d],e,!vt(u,d))}}return i}function S_(e,t,n,o,r,s){const i=e[n];if(i!=null){const l=vt(i,"default");if(l&&o===void 0){const a=i.default;if(i.type!==Function&&!i.skipFactory&&et(a)){const{propsDefaults:u}=r;if(n in u)o=u[n];else{const c=su(r);o=u[n]=a.call(null,t),c()}}else o=a}i[0]&&(s&&!l?o=!1:i[1]&&(o===""||o===zo(n))&&(o=!0))}return o}function IE(e,t,n=!1){const o=t.propsCache,r=o.get(e);if(r)return r;const s=e.props,i={},l=[];let a=!1;if(!et(e)){const c=d=>{a=!0;const[f,p]=IE(d,t,!0);zt(i,f),p&&l.push(...p)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!s&&!a)return pt(e)&&o.set(e,mc),mc;if(Te(s))for(let c=0;c<s.length;c++){const d=yn(s[c]);b4(d)&&(i[d]=Wt)}else if(s)for(const c in s){const d=yn(c);if(b4(d)){const f=s[c],p=i[d]=Te(f)||et(f)?{type:f}:zt({},f);if(p){const h=k4(Boolean,p.type),m=k4(String,p.type);p[0]=h>-1,p[1]=m<0||h<m,(h>-1||vt(p,"default"))&&l.push(d)}}}const u=[i,l];return pt(e)&&o.set(e,u),u}function b4(e){return e[0]!=="$"&&!Nl(e)}function w4(e){return e===null?"null":typeof e=="function"?e.name||"":typeof e=="object"&&e.constructor&&e.constructor.name||""}function C4(e,t){return w4(e)===w4(t)}function k4(e,t){return Te(t)?t.findIndex(n=>C4(n,e)):et(t)&&C4(t,e)?0:-1}const AE=e=>e[0]==="_"||e==="$stable",k3=e=>Te(e)?e.map(ur):[ur(e)],kV=(e,t,n)=>{if(t._n)return t;const o=S((...r)=>k3(t(...r)),n);return o._c=!1,o},NE=(e,t,n)=>{const o=e._ctx;for(const r in e){if(AE(r))continue;const s=e[r];if(et(s))t[r]=kV(r,s,o);else if(s!=null){const i=k3(s);t[r]=()=>i}}},PE=(e,t)=>{const n=k3(t);e.slots.default=()=>n},SV=(e,t)=>{if(e.vnode.shapeFlag&32){const n=t._;n?(e.slots=Ot(t),T$(e.slots,"_",n)):NE(t,e.slots=k_())}else e.slots=k_(),t&&PE(e,t)},$V=(e,t,n)=>{const{vnode:o,slots:r}=e;let s=!0,i=Wt;if(o.shapeFlag&32){const l=t._;l?n&&l===1?s=!1:(zt(r,t),!n&&l===1&&delete r._):(s=!t.$stable,NE(t,r)),i=t}else t&&(PE(e,t),i={default:1});if(s)for(const l in r)!AE(l)&&i[l]==null&&delete r[l]};function hg(e,t,n,o,r=!1){if(Te(e)){e.forEach((f,p)=>hg(f,t&&(Te(t)?t[p]:t),n,o,r));return}if(Ua(o)&&!r)return;const s=o.shapeFlag&4?k0(o.component)||o.component.proxy:o.el,i=r?null:s,{i:l,r:a}=e,u=t&&t.r,c=l.refs===Wt?l.refs={}:l.refs,d=l.setupState;if(u!=null&&u!==a&&(tt(u)?(c[u]=null,vt(d,u)&&(d[u]=null)):on(u)&&(u.value=null)),et(a))Ti(a,l,12,[i,c]);else{const f=tt(a),p=on(a);if(f||p){const h=()=>{if(e.f){const m=f?vt(d,a)?d[a]:c[a]:a.value;r?Te(m)&&Q2(m,s):Te(m)?m.includes(s)||m.push(s):f?(c[a]=[s],vt(d,a)&&(d[a]=c[a])):(a.value=[s],e.k&&(c[e.k]=a.value))}else f?(c[a]=i,vt(d,a)&&(d[a]=i)):p&&(a.value=i,e.k&&(c[e.k]=i))};i?(h.id=-1,no(h,n)):h()}}}let qi=!1;const EV=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",xV=e=>e.namespaceURI.includes("MathML"),nm=e=>{if(EV(e))return"svg";if(xV(e))return"mathml"},om=e=>e.nodeType===8;function TV(e){const{mt:t,p:n,o:{patchProp:o,createText:r,nextSibling:s,parentNode:i,remove:l,insert:a,createComment:u}}=e,c=(b,$)=>{if(!$.hasChildNodes()){n(null,b,$),fg(),$._vnode=b;return}qi=!1,d($.firstChild,b,null,null,null),fg(),$._vnode=b,qi&&console.error("Hydration completed but contains mismatches.")},d=(b,$,x,E,M,N=!1)=>{N=N||!!$.dynamicChildren;const P=om(b)&&b.data==="[",I=()=>m(b,$,x,E,M,P),{type:V,ref:F,shapeFlag:Y,patchFlag:Z}=$;let K=b.nodeType;$.el=b,Z===-2&&(N=!1,$.dynamicChildren=null);let U=null;switch(V){case Ni:K!==3?$.children===""?(a($.el=r(""),i(b),b),U=b):U=I():(b.data!==$.children&&(qi=!0,b.data=$.children),U=s(b));break;case Yn:k(b)?(U=s(b),v($.el=b.content.firstChild,b,x)):K!==8||P?U=I():U=s(b);break;case Wa:if(P&&(b=s(b),K=b.nodeType),K===1||K===3){U=b;const B=!$.children.length;for(let W=0;W<$.staticCount;W++)B&&($.children+=U.nodeType===1?U.outerHTML:U.data),W===$.staticCount-1&&($.anchor=U),U=s(U);return P?s(U):U}else I();break;case de:P?U=h(b,$,x,E,M,N):U=I();break;default:if(Y&1)(K!==1||$.type.toLowerCase()!==b.tagName.toLowerCase())&&!k(b)?U=I():U=f(b,$,x,E,M,N);else if(Y&6){$.slotScopeIds=M;const B=i(b);if(P?U=y(b):om(b)&&b.data==="teleport start"?U=y(b,b.data,"teleport end"):U=s(b),t($,B,null,x,E,nm(B),N),Ua($)){let W;P?(W=w(de),W.anchor=U?U.previousSibling:B.lastChild):W=b.nodeType===3?ne(""):w("div"),W.el=b,$.component.subTree=W}}else Y&64?K!==8?U=I():U=$.type.hydrate(b,$,x,E,M,N,e,p):Y&128&&(U=$.type.hydrate(b,$,x,E,nm(i(b)),M,N,e,d))}return F!=null&&hg(F,null,E,$),U},f=(b,$,x,E,M,N)=>{N=N||!!$.dynamicChildren;const{type:P,props:I,patchFlag:V,shapeFlag:F,dirs:Y,transition:Z}=$,K=P==="input"||P==="option";if(K||V!==-1){Y&&Bs($,null,x,"created");let U=!1;if(k(b)){U=VE(E,Z)&&x&&x.vnode.props&&x.vnode.props.appear;const W=b.content.firstChild;U&&Z.beforeEnter(W),v(W,b,x),$.el=b=W}if(F&16&&!(I&&(I.innerHTML||I.textContent))){let W=p(b.firstChild,$,b,x,E,M,N);for(;W;){qi=!0;const L=W;W=W.nextSibling,l(L)}}else F&8&&b.textContent!==$.children&&(qi=!0,b.textContent=$.children);if(I)if(K||!N||V&48)for(const W in I)(K&&(W.endsWith("value")||W==="indeterminate")||_u(W)&&!Nl(W)||W[0]===".")&&o(b,W,null,I[W],void 0,void 0,x);else I.onClick&&o(b,"onClick",null,I.onClick,void 0,void 0,x);let B;(B=I&&I.onVnodeBeforeMount)&&Fo(B,x,$),Y&&Bs($,null,x,"beforeMount"),((B=I&&I.onVnodeMounted)||Y||U)&&aE(()=>{B&&Fo(B,x,$),U&&Z.enter(b),Y&&Bs($,null,x,"mounted")},E)}return b.nextSibling},p=(b,$,x,E,M,N,P)=>{P=P||!!$.dynamicChildren;const I=$.children,V=I.length;for(let F=0;F<V;F++){const Y=P?I[F]:I[F]=ur(I[F]);if(b)b=d(b,Y,E,M,N,P);else{if(Y.type===Ni&&!Y.children)continue;qi=!0,n(null,Y,x,null,E,M,nm(x),N)}}return b},h=(b,$,x,E,M,N)=>{const{slotScopeIds:P}=$;P&&(M=M?M.concat(P):P);const I=i(b),V=p(s(b),$,I,x,E,M,N);return V&&om(V)&&V.data==="]"?s($.anchor=V):(qi=!0,a($.anchor=u("]"),I,V),V)},m=(b,$,x,E,M,N)=>{if(qi=!0,$.el=null,N){const V=y(b);for(;;){const F=s(b);if(F&&F!==V)l(F);else break}}const P=s(b),I=i(b);return l(b),n(null,$,I,P,x,E,nm(I),M),P},y=(b,$="[",x="]")=>{let E=0;for(;b;)if(b=s(b),b&&om(b)&&(b.data===$&&E++,b.data===x)){if(E===0)return s(b);E--}return b},v=(b,$,x)=>{const E=$.parentNode;E&&E.replaceChild(b,$);let M=x;for(;M;)M.vnode.el===$&&(M.vnode.el=M.subTree.el=b),M=M.parent},k=b=>b.nodeType===1&&b.tagName.toLowerCase()==="template";return[c,d]}const no=aE;function LE(e){return DE(e)}function RE(e){return DE(e,TV)}function DE(e,t){const n=M$();n.__VUE__=!0;const{insert:o,remove:r,patchProp:s,createElement:i,createText:l,createComment:a,setText:u,setElementText:c,parentNode:d,nextSibling:f,setScopeId:p=yt,insertStaticContent:h}=e,m=(G,J,ue,_e=null,ye=null,Ne=null,Le=void 0,Ee=null,Pe=!!J.dynamicChildren)=>{if(G===J)return;G&&!is(G,J)&&(_e=te(G),re(G,ye,Ne,!0),G=null),J.patchFlag===-2&&(Pe=!1,J.dynamicChildren=null);const{type:me,ref:Ue,shapeFlag:Xe}=J;switch(me){case Ni:y(G,J,ue,_e);break;case Yn:v(G,J,ue,_e);break;case Wa:G==null&&k(J,ue,_e,Le);break;case de:F(G,J,ue,_e,ye,Ne,Le,Ee,Pe);break;default:Xe&1?x(G,J,ue,_e,ye,Ne,Le,Ee,Pe):Xe&6?Y(G,J,ue,_e,ye,Ne,Le,Ee,Pe):(Xe&64||Xe&128)&&me.process(G,J,ue,_e,ye,Ne,Le,Ee,Pe,le)}Ue!=null&&ye&&hg(Ue,G&&G.ref,Ne,J||G,!J)},y=(G,J,ue,_e)=>{if(G==null)o(J.el=l(J.children),ue,_e);else{const ye=J.el=G.el;J.children!==G.children&&u(ye,J.children)}},v=(G,J,ue,_e)=>{G==null?o(J.el=a(J.children||""),ue,_e):J.el=G.el},k=(G,J,ue,_e)=>{[G.el,G.anchor]=h(G.children,J,ue,_e,G.el,G.anchor)},b=({el:G,anchor:J},ue,_e)=>{let ye;for(;G&&G!==J;)ye=f(G),o(G,ue,_e),G=ye;o(J,ue,_e)},$=({el:G,anchor:J})=>{let ue;for(;G&&G!==J;)ue=f(G),r(G),G=ue;r(J)},x=(G,J,ue,_e,ye,Ne,Le,Ee,Pe)=>{J.type==="svg"?Le="svg":J.type==="math"&&(Le="mathml"),G==null?E(J,ue,_e,ye,Ne,Le,Ee,Pe):P(G,J,ye,Ne,Le,Ee,Pe)},E=(G,J,ue,_e,ye,Ne,Le,Ee)=>{let Pe,me;const{props:Ue,shapeFlag:Xe,transition:ce,dirs:oe}=G;if(Pe=G.el=i(G.type,Ne,Ue&&Ue.is,Ue),Xe&8?c(Pe,G.children):Xe&16&&N(G.children,Pe,null,_e,ye,Uv(G,Ne),Le,Ee),oe&&Bs(G,null,_e,"created"),M(Pe,G,G.scopeId,Le,_e),Ue){for(const ze in Ue)ze!=="value"&&!Nl(ze)&&s(Pe,ze,null,Ue[ze],Ne,G.children,_e,ye,xe);"value"in Ue&&s(Pe,"value",null,Ue.value,Ne),(me=Ue.onVnodeBeforeMount)&&Fo(me,_e,G)}oe&&Bs(G,null,_e,"beforeMount");const pe=VE(ye,ce);pe&&ce.beforeEnter(Pe),o(Pe,J,ue),((me=Ue&&Ue.onVnodeMounted)||pe||oe)&&no(()=>{me&&Fo(me,_e,G),pe&&ce.enter(Pe),oe&&Bs(G,null,_e,"mounted")},ye)},M=(G,J,ue,_e,ye)=>{if(ue&&p(G,ue),_e)for(let Ne=0;Ne<_e.length;Ne++)p(G,_e[Ne]);if(ye){let Ne=ye.subTree;if(J===Ne){const Le=ye.vnode;M(G,Le,Le.scopeId,Le.slotScopeIds,ye.parent)}}},N=(G,J,ue,_e,ye,Ne,Le,Ee,Pe=0)=>{for(let me=Pe;me<G.length;me++){const Ue=G[me]=Ee?gl(G[me]):ur(G[me]);m(null,Ue,J,ue,_e,ye,Ne,Le,Ee)}},P=(G,J,ue,_e,ye,Ne,Le)=>{const Ee=J.el=G.el;let{patchFlag:Pe,dynamicChildren:me,dirs:Ue}=J;Pe|=G.patchFlag&16;const Xe=G.props||Wt,ce=J.props||Wt;let oe;if(ue&&da(ue,!1),(oe=ce.onVnodeBeforeUpdate)&&Fo(oe,ue,J,G),Ue&&Bs(J,G,ue,"beforeUpdate"),ue&&da(ue,!0),me?I(G.dynamicChildren,me,Ee,ue,_e,Uv(J,ye),Ne):Le||W(G,J,Ee,null,ue,_e,Uv(J,ye),Ne,!1),Pe>0){if(Pe&16)V(Ee,J,Xe,ce,ue,_e,ye);else if(Pe&2&&Xe.class!==ce.class&&s(Ee,"class",null,ce.class,ye),Pe&4&&s(Ee,"style",Xe.style,ce.style,ye),Pe&8){const pe=J.dynamicProps;for(let ze=0;ze<pe.length;ze++){const Qe=pe[ze],$e=Xe[Qe],ie=ce[Qe];(ie!==$e||Qe==="value")&&s(Ee,Qe,$e,ie,ye,G.children,ue,_e,xe)}}Pe&1&&G.children!==J.children&&c(Ee,J.children)}else!Le&&me==null&&V(Ee,J,Xe,ce,ue,_e,ye);((oe=ce.onVnodeUpdated)||Ue)&&no(()=>{oe&&Fo(oe,ue,J,G),Ue&&Bs(J,G,ue,"updated")},_e)},I=(G,J,ue,_e,ye,Ne,Le)=>{for(let Ee=0;Ee<J.length;Ee++){const Pe=G[Ee],me=J[Ee],Ue=Pe.el&&(Pe.type===de||!is(Pe,me)||Pe.shapeFlag&70)?d(Pe.el):ue;m(Pe,me,Ue,null,_e,ye,Ne,Le,!0)}},V=(G,J,ue,_e,ye,Ne,Le)=>{if(ue!==_e){if(ue!==Wt)for(const Ee in ue)!Nl(Ee)&&!(Ee in _e)&&s(G,Ee,ue[Ee],null,Le,J.children,ye,Ne,xe);for(const Ee in _e){if(Nl(Ee))continue;const Pe=_e[Ee],me=ue[Ee];Pe!==me&&Ee!=="value"&&s(G,Ee,me,Pe,Le,J.children,ye,Ne,xe)}"value"in _e&&s(G,"value",ue.value,_e.value,Le)}},F=(G,J,ue,_e,ye,Ne,Le,Ee,Pe)=>{const me=J.el=G?G.el:l(""),Ue=J.anchor=G?G.anchor:l("");let{patchFlag:Xe,dynamicChildren:ce,slotScopeIds:oe}=J;oe&&(Ee=Ee?Ee.concat(oe):oe),G==null?(o(me,ue,_e),o(Ue,ue,_e),N(J.children||[],ue,Ue,ye,Ne,Le,Ee,Pe)):Xe>0&&Xe&64&&ce&&G.dynamicChildren?(I(G.dynamicChildren,ce,ue,ye,Ne,Le,Ee),(J.key!=null||ye&&J===ye.subTree)&&S3(G,J,!0)):W(G,J,ue,Ue,ye,Ne,Le,Ee,Pe)},Y=(G,J,ue,_e,ye,Ne,Le,Ee,Pe)=>{J.slotScopeIds=Ee,G==null?J.shapeFlag&512?ye.ctx.activate(J,ue,_e,Le,Pe):Z(J,ue,_e,ye,Ne,Le,Pe):K(G,J,Pe)},Z=(G,J,ue,_e,ye,Ne,Le)=>{const Ee=G.component=UE(G,_e,ye);if(Jp(G)&&(Ee.ctx.renderer=le),KE(Ee),Ee.asyncDep){if(ye&&ye.registerDep(Ee,U),!G.el){const Pe=Ee.subTree=w(Yn);v(null,Pe,J,ue)}}else U(Ee,G,J,ue,ye,Ne,Le)},K=(G,J,ue)=>{const _e=J.component=G.component;if(BD(G,J,ue))if(_e.asyncDep&&!_e.asyncResolved){B(_e,J,ue);return}else _e.next=J,ND(_e.update),_e.effect.dirty=!0,_e.update();else J.el=G.el,_e.vnode=J},U=(G,J,ue,_e,ye,Ne,Le)=>{const Ee=()=>{if(G.isMounted){let{next:Ue,bu:Xe,u:ce,parent:oe,vnode:pe}=G;{const we=FE(G);if(we){Ue&&(Ue.el=pe.el,B(G,Ue,Le)),we.asyncDep.then(()=>{G.isUnmounted||Ee()});return}}let ze=Ue,Qe;da(G,!1),Ue?(Ue.el=pe.el,B(G,Ue,Le)):Ue=pe,Xe&&yc(Xe),(Qe=Ue.props&&Ue.props.onVnodeBeforeUpdate)&&Fo(Qe,oe,Ue,pe),da(G,!0);const $e=jm(G),ie=G.subTree;G.subTree=$e,m(ie,$e,d(ie.el),te(ie),G,ye,Ne),Ue.el=$e.el,ze===null&&m3(G,$e.el),ce&&no(ce,ye),(Qe=Ue.props&&Ue.props.onVnodeUpdated)&&no(()=>Fo(Qe,oe,Ue,pe),ye)}else{let Ue;const{el:Xe,props:ce}=J,{bm:oe,m:pe,parent:ze}=G,Qe=Ua(J);if(da(G,!1),oe&&yc(oe),!Qe&&(Ue=ce&&ce.onVnodeBeforeMount)&&Fo(Ue,ze,J),da(G,!0),Xe&&Ge){const $e=()=>{G.subTree=jm(G),Ge(Xe,G.subTree,G,ye,null)};Qe?J.type.__asyncLoader().then(()=>!G.isUnmounted&&$e()):$e()}else{const $e=G.subTree=jm(G);m(null,$e,ue,_e,G,ye,Ne),J.el=$e.el}if(pe&&no(pe,ye),!Qe&&(Ue=ce&&ce.onVnodeMounted)){const $e=J;no(()=>Fo(Ue,ze,$e),ye)}(J.shapeFlag&256||ze&&Ua(ze.vnode)&&ze.vnode.shapeFlag&256)&&G.a&&no(G.a,ye),G.isMounted=!0,J=ue=_e=null}},Pe=G.effect=new Rc(Ee,yt,()=>v0(me),G.scope),me=G.update=()=>{Pe.dirty&&Pe.run()};me.id=G.uid,da(G,!0),me()},B=(G,J,ue)=>{J.component=G;const _e=G.vnode.props;G.vnode=J,G.next=null,CV(G,J.props,_e,ue),$V(G,J.children,ue),Yl(),f4(G),Zl()},W=(G,J,ue,_e,ye,Ne,Le,Ee,Pe=!1)=>{const me=G&&G.children,Ue=G?G.shapeFlag:0,Xe=J.children,{patchFlag:ce,shapeFlag:oe}=J;if(ce>0){if(ce&128){A(me,Xe,ue,_e,ye,Ne,Le,Ee,Pe);return}else if(ce&256){L(me,Xe,ue,_e,ye,Ne,Le,Ee,Pe);return}}oe&8?(Ue&16&&xe(me,ye,Ne),Xe!==me&&c(ue,Xe)):Ue&16?oe&16?A(me,Xe,ue,_e,ye,Ne,Le,Ee,Pe):xe(me,ye,Ne,!0):(Ue&8&&c(ue,""),oe&16&&N(Xe,ue,_e,ye,Ne,Le,Ee,Pe))},L=(G,J,ue,_e,ye,Ne,Le,Ee,Pe)=>{G=G||mc,J=J||mc;const me=G.length,Ue=J.length,Xe=Math.min(me,Ue);let ce;for(ce=0;ce<Xe;ce++){const oe=J[ce]=Pe?gl(J[ce]):ur(J[ce]);m(G[ce],oe,ue,null,ye,Ne,Le,Ee,Pe)}me>Ue?xe(G,ye,Ne,!0,!1,Xe):N(J,ue,_e,ye,Ne,Le,Ee,Pe,Xe)},A=(G,J,ue,_e,ye,Ne,Le,Ee,Pe)=>{let me=0;const Ue=J.length;let Xe=G.length-1,ce=Ue-1;for(;me<=Xe&&me<=ce;){const oe=G[me],pe=J[me]=Pe?gl(J[me]):ur(J[me]);if(is(oe,pe))m(oe,pe,ue,null,ye,Ne,Le,Ee,Pe);else break;me++}for(;me<=Xe&&me<=ce;){const oe=G[Xe],pe=J[ce]=Pe?gl(J[ce]):ur(J[ce]);if(is(oe,pe))m(oe,pe,ue,null,ye,Ne,Le,Ee,Pe);else break;Xe--,ce--}if(me>Xe){if(me<=ce){const oe=ce+1,pe=oe<Ue?J[oe].el:_e;for(;me<=ce;)m(null,J[me]=Pe?gl(J[me]):ur(J[me]),ue,pe,ye,Ne,Le,Ee,Pe),me++}}else if(me>ce)for(;me<=Xe;)re(G[me],ye,Ne,!0),me++;else{const oe=me,pe=me,ze=new Map;for(me=pe;me<=ce;me++){const st=J[me]=Pe?gl(J[me]):ur(J[me]);st.key!=null&&ze.set(st.key,me)}let Qe,$e=0;const ie=ce-pe+1;let we=!1,ae=0;const Se=new Array(ie);for(me=0;me<ie;me++)Se[me]=0;for(me=oe;me<=Xe;me++){const st=G[me];if($e>=ie){re(st,ye,Ne,!0);continue}let se;if(st.key!=null)se=ze.get(st.key);else for(Qe=pe;Qe<=ce;Qe++)if(Se[Qe-pe]===0&&is(st,J[Qe])){se=Qe;break}se===void 0?re(st,ye,Ne,!0):(Se[se-pe]=me+1,se>=ae?ae=se:we=!0,m(st,J[se],ue,null,ye,Ne,Le,Ee,Pe),$e++)}const Ve=we?MV(Se):mc;for(Qe=Ve.length-1,me=ie-1;me>=0;me--){const st=pe+me,se=J[st],De=st+1<Ue?J[st+1].el:_e;Se[me]===0?m(null,se,ue,De,ye,Ne,Le,Ee,Pe):we&&(Qe<0||me!==Ve[Qe]?X(se,ue,De,2):Qe--)}}},X=(G,J,ue,_e,ye=null)=>{const{el:Ne,type:Le,transition:Ee,children:Pe,shapeFlag:me}=G;if(me&6){X(G.component.subTree,J,ue,_e);return}if(me&128){G.suspense.move(J,ue,_e);return}if(me&64){Le.move(G,J,ue,le);return}if(Le===de){o(Ne,J,ue);for(let Xe=0;Xe<Pe.length;Xe++)X(Pe[Xe],J,ue,_e);o(G.anchor,J,ue);return}if(Le===Wa){b(G,J,ue);return}if(_e!==2&&me&1&&Ee)if(_e===0)Ee.beforeEnter(Ne),o(Ne,J,ue),no(()=>Ee.enter(Ne),ye);else{const{leave:Xe,delayLeave:ce,afterLeave:oe}=Ee,pe=()=>o(Ne,J,ue),ze=()=>{Xe(Ne,()=>{pe(),oe&&oe()})};ce?ce(Ne,pe,ze):ze()}else o(Ne,J,ue)},re=(G,J,ue,_e=!1,ye=!1)=>{const{type:Ne,props:Le,ref:Ee,children:Pe,dynamicChildren:me,shapeFlag:Ue,patchFlag:Xe,dirs:ce}=G;if(Ee!=null&&hg(Ee,null,ue,G,!0),Ue&256){J.ctx.deactivate(G);return}const oe=Ue&1&&ce,pe=!Ua(G);let ze;if(pe&&(ze=Le&&Le.onVnodeBeforeUnmount)&&Fo(ze,J,G),Ue&6)Oe(G.component,ue,_e);else{if(Ue&128){G.suspense.unmount(ue,_e);return}oe&&Bs(G,null,J,"beforeUnmount"),Ue&64?G.type.remove(G,J,ue,ye,le,_e):me&&(Ne!==de||Xe>0&&Xe&64)?xe(me,J,ue,!1,!0):(Ne===de&&Xe&384||!ye&&Ue&16)&&xe(Pe,J,ue),_e&&j(G)}(pe&&(ze=Le&&Le.onVnodeUnmounted)||oe)&&no(()=>{ze&&Fo(ze,J,G),oe&&Bs(G,null,J,"unmounted")},ue)},j=G=>{const{type:J,el:ue,anchor:_e,transition:ye}=G;if(J===de){ge(ue,_e);return}if(J===Wa){$(G);return}const Ne=()=>{r(ue),ye&&!ye.persisted&&ye.afterLeave&&ye.afterLeave()};if(G.shapeFlag&1&&ye&&!ye.persisted){const{leave:Le,delayLeave:Ee}=ye,Pe=()=>Le(ue,Ne);Ee?Ee(G.el,Ne,Pe):Pe()}else Ne()},ge=(G,J)=>{let ue;for(;G!==J;)ue=f(G),r(G),G=ue;r(J)},Oe=(G,J,ue)=>{const{bum:_e,scope:ye,update:Ne,subTree:Le,um:Ee}=G;_e&&yc(_e),ye.stop(),Ne&&(Ne.active=!1,re(Le,G,J,ue)),Ee&&no(Ee,J),no(()=>{G.isUnmounted=!0},J),J&&J.pendingBranch&&!J.isUnmounted&&G.asyncDep&&!G.asyncResolved&&G.suspenseId===J.pendingId&&(J.deps--,J.deps===0&&J.resolve())},xe=(G,J,ue,_e=!1,ye=!1,Ne=0)=>{for(let Le=Ne;Le<G.length;Le++)re(G[Le],J,ue,_e,ye)},te=G=>G.shapeFlag&6?te(G.component.subTree):G.shapeFlag&128?G.suspense.next():f(G.anchor||G.el);let fe=!1;const ve=(G,J,ue)=>{G==null?J._vnode&&re(J._vnode,null,null,!0):m(J._vnode||null,G,J,null,null,null,ue),fe||(fe=!0,f4(),fg(),fe=!1),J._vnode=G},le={p:m,um:re,m:X,r:j,mt:Z,mc:N,pc:W,pbc:I,n:te,o:e};let Ae,Ge;return t&&([Ae,Ge]=t(le)),{render:ve,hydrate:Ae,createApp:_V(ve,Ae)}}function Uv({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function da({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function VE(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function S3(e,t,n=!1){const o=e.children,r=t.children;if(Te(o)&&Te(r))for(let s=0;s<o.length;s++){const i=o[s];let l=r[s];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=r[s]=gl(r[s]),l.el=i.el),n||S3(i,l)),l.type===Ni&&(l.el=i.el)}}function MV(e){const t=e.slice(),n=[0];let o,r,s,i,l;const a=e.length;for(o=0;o<a;o++){const u=e[o];if(u!==0){if(r=n[n.length-1],e[r]<u){t[o]=r,n.push(o);continue}for(s=0,i=n.length-1;s<i;)l=s+i>>1,e[n[l]]<u?s=l+1:i=l;u<e[n[s]]&&(s>0&&(t[o]=n[s-1]),n[s]=o)}}for(s=n.length,i=n[s-1];s-- >0;)n[s]=i,i=t[i];return n}function FE(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:FE(t)}const OV=e=>e.__isTeleport,Rf=e=>e&&(e.disabled||e.disabled===""),S4=e=>typeof SVGElement<"u"&&e instanceof SVGElement,$4=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,$_=(e,t)=>{const n=e&&e.to;return tt(n)?t?t(n):null:n},IV={name:"Teleport",__isTeleport:!0,process(e,t,n,o,r,s,i,l,a,u){const{mc:c,pc:d,pbc:f,o:{insert:p,querySelector:h,createText:m,createComment:y}}=u,v=Rf(t.props);let{shapeFlag:k,children:b,dynamicChildren:$}=t;if(e==null){const x=t.el=m(""),E=t.anchor=m("");p(x,n,o),p(E,n,o);const M=t.target=$_(t.props,h),N=t.targetAnchor=m("");M&&(p(N,M),i==="svg"||S4(M)?i="svg":(i==="mathml"||$4(M))&&(i="mathml"));const P=(I,V)=>{k&16&&c(b,I,V,r,s,i,l,a)};v?P(n,E):M&&P(M,N)}else{t.el=e.el;const x=t.anchor=e.anchor,E=t.target=e.target,M=t.targetAnchor=e.targetAnchor,N=Rf(e.props),P=N?n:E,I=N?x:M;if(i==="svg"||S4(E)?i="svg":(i==="mathml"||$4(E))&&(i="mathml"),$?(f(e.dynamicChildren,$,P,r,s,i,l),S3(e,t,!0)):a||d(e,t,P,I,r,s,i,l,!1),v)N?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):rm(t,n,x,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const V=t.target=$_(t.props,h);V&&rm(t,V,null,u,0)}else N&&rm(t,E,M,u,1)}BE(t)},remove(e,t,n,o,{um:r,o:{remove:s}},i){const{shapeFlag:l,children:a,anchor:u,targetAnchor:c,target:d,props:f}=e;if(d&&s(c),i&&s(u),l&16){const p=i||!Rf(f);for(let h=0;h<a.length;h++){const m=a[h];r(m,t,n,p,!!m.dynamicChildren)}}},move:rm,hydrate:AV};function rm(e,t,n,{o:{insert:o},m:r},s=2){s===0&&o(e.targetAnchor,t,n);const{el:i,anchor:l,shapeFlag:a,children:u,props:c}=e,d=s===2;if(d&&o(i,t,n),(!d||Rf(c))&&a&16)for(let f=0;f<u.length;f++)r(u[f],t,n,2);d&&o(l,t,n)}function AV(e,t,n,o,r,s,{o:{nextSibling:i,parentNode:l,querySelector:a}},u){const c=t.target=$_(t.props,a);if(c){const d=c._lpa||c.firstChild;if(t.shapeFlag&16)if(Rf(t.props))t.anchor=u(i(e),t,l(e),n,o,r,s),t.targetAnchor=d;else{t.anchor=i(e);let f=d;for(;f;)if(f=i(f),f&&f.nodeType===8&&f.data==="teleport anchor"){t.targetAnchor=f,c._lpa=t.targetAnchor&&i(t.targetAnchor);break}u(d,t,c,n,o,r,s)}BE(t)}return t.anchor&&i(t.anchor)}const qr=IV;function BE(e){const t=e.ctx;if(t&&t.ut){let n=e.children[0].el;for(;n&&n!==e.targetAnchor;)n.nodeType===1&&n.setAttribute("data-v-owner",t.uid),n=n.nextSibling;t.ut()}}const de=Symbol.for("v-fgt"),Ni=Symbol.for("v-txt"),Yn=Symbol.for("v-cmt"),Wa=Symbol.for("v-stc"),Df=[];let jo=null;function C(e=!1){Df.push(jo=e?null:[])}function zE(){Df.pop(),jo=Df[Df.length-1]||null}let ru=1;function E_(e){ru+=e}function jE(e){return e.dynamicChildren=ru>0?jo||mc:null,zE(),ru>0&&jo&&jo.push(e),e}function T(e,t,n,o,r,s){return jE(_(e,t,n,o,r,s,!0))}function H(e,t,n,o,r){return jE(w(e,t,n,o,r,!0))}function yo(e){return e?e.__v_isVNode===!0:!1}function is(e,t){return e.type===t.type&&e.key===t.key}function NV(e){}const HE=({key:e})=>e??null,Hm=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?tt(e)||on(e)||et(e)?{i:Dn,r:e,k:t,f:!!n}:e:null);function _(e,t=null,n=null,o=0,r=null,s=e===de?0:1,i=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&HE(t),ref:t&&Hm(t),scopeId:_0,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:s,patchFlag:o,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:Dn};return l?(E3(a,n),s&128&&e.normalize(a)):n&&(a.shapeFlag|=tt(n)?8:16),ru>0&&!i&&jo&&(a.patchFlag>0||s&6)&&a.patchFlag!==32&&jo.push(a),a}const w=PV;function PV(e,t=null,n=null,o=0,r=null,s=!1){if((!e||e===iE)&&(e=Yn),yo(e)){const l=gs(e,t,!0);return n&&E3(l,n),ru>0&&!s&&jo&&(l.shapeFlag&6?jo[jo.indexOf(e)]=l:jo.push(l)),l.patchFlag|=-2,l}if(BV(e)&&(e=e.__vccOpts),t){t=$3(t);let{class:l,style:a}=t;l&&!tt(l)&&(t.class=D(l)),pt(a)&&(c3(a)&&!Te(a)&&(a=zt({},a)),t.style=Ye(a))}const i=tt(e)?1:lE(e)?128:OV(e)?64:pt(e)?4:et(e)?2:0;return _(e,t,n,o,r,i,s,!0)}function $3(e){return e?c3(e)||ME(e)?zt({},e):e:null}function gs(e,t,n=!1){const{props:o,ref:r,patchFlag:s,children:i}=e,l=t?un(o||{},t):o;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&HE(l),ref:t&&t.ref?n&&r?Te(r)?r.concat(Hm(t)):[r,Hm(t)]:Hm(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:i,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==de?s===-1?16:s|16:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&gs(e.ssContent),ssFallback:e.ssFallback&&gs(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function ne(e=" ",t=0){return w(Ni,null,e,t)}function C0(e,t){const n=w(Wa,null,e);return n.staticCount=t,n}function z(e="",t=!1){return t?(C(),H(Yn,null,e)):w(Yn,null,e)}function ur(e){return e==null||typeof e=="boolean"?w(Yn):Te(e)?w(de,null,e.slice()):typeof e=="object"?gl(e):w(Ni,null,String(e))}function gl(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:gs(e)}function E3(e,t){let n=0;const{shapeFlag:o}=e;if(t==null)t=null;else if(Te(t))n=16;else if(typeof t=="object")if(o&65){const r=t.default;r&&(r._c&&(r._d=!1),E3(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!ME(t)?t._ctx=Dn:r===3&&Dn&&(Dn.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else et(t)?(t={default:t,_ctx:Dn},n=32):(t=String(t),o&64?(n=16,t=[ne(t)]):n=8);e.children=t,e.shapeFlag|=n}function un(...e){const t={};for(let n=0;n<e.length;n++){const o=e[n];for(const r in o)if(r==="class")t.class!==o.class&&(t.class=D([t.class,o.class]));else if(r==="style")t.style=Ye([t.style,o.style]);else if(_u(r)){const s=t[r],i=o[r];i&&s!==i&&!(Te(s)&&s.includes(i))&&(t[r]=s?[].concat(s,i):i)}else r!==""&&(t[r]=o[r])}return t}function Fo(e,t,n,o=null){hr(e,t,7,[n,o])}const LV=xE();let RV=0;function UE(e,t,n){const o=e.type,r=(t?t.appContext:e.appContext)||LV,s={uid:RV++,vnode:e,type:o,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,scope:new o3(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(r.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:IE(o,r),emitsOptions:oE(o,r),emit:null,emitted:null,propsDefaults:Wt,inheritAttrs:o.inheritAttrs,ctx:Wt,data:Wt,props:Wt,attrs:Wt,slots:Wt,refs:Wt,setupState:Wt,setupContext:null,attrsProxy:null,slotsProxy: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 s.ctx={_:s},s.root=t?t.root:s,s.emit=LD.bind(null,s),e.ce&&e.ce(s),s}let Hn=null;const at=()=>Hn||Dn;let mg,x_;{const e=M$(),t=(n,o)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(o),s=>{r.length>1?r.forEach(i=>i(s)):r[0](s)}};mg=t("__VUE_INSTANCE_SETTERS__",n=>Hn=n),x_=t("__VUE_SSR_SETTERS__",n=>Xp=n)}const su=e=>{const t=Hn;return mg(e),e.scope.on(),()=>{e.scope.off(),mg(t)}},T_=()=>{Hn&&Hn.scope.off(),mg(null)};function WE(e){return e.vnode.shapeFlag&4}let Xp=!1;function KE(e,t=!1){t&&x_(t);const{props:n,children:o}=e.vnode,r=WE(e);wV(e,n,r,t),SV(e,o);const s=r?DV(e,t):void 0;return t&&x_(!1),s}function DV(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,b_);const{setup:o}=n;if(o){const r=e.setupContext=o.length>1?YE(e):null,s=su(e);Yl();const i=Ti(o,e,0,[e.props,r]);if(Zl(),s(),e3(i)){if(i.then(T_,T_),t)return i.then(l=>{M_(e,l,t)}).catch(l=>{Cu(l,e,0)});e.asyncDep=i}else M_(e,i,t)}else GE(e,t)}function M_(e,t,n){et(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:pt(t)&&(e.setupState=p3(t)),GE(e,n)}let gg,O_;function qE(e){gg=e,O_=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,tV))}}const VV=()=>!gg;function GE(e,t,n){const o=e.type;if(!e.render){if(!t&&gg&&!o.render){const r=o.template||C3(e).template;if(r){const{isCustomElement:s,compilerOptions:i}=e.appContext.config,{delimiters:l,compilerOptions:a}=o,u=zt(zt({isCustomElement:s,delimiters:l},i),a);o.render=gg(r,u)}}e.render=o.render||yt,O_&&O_(e)}{const r=su(e);Yl();try{pV(e)}finally{Zl(),r()}}}const FV={get(e,t){return Yo(e,"get",""),e[t]}};function YE(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,FV),slots:e.slots,emit:e.emit,expose:t}}function k0(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(p3(Ai(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Lf)return Lf[n](e)},has(t,n){return n in t||n in Lf}}))}function I_(e,t=!0){return et(e)?e.displayName||e.name:e.name||t&&e.__name}function BV(e){return et(e)&&"__vccOpts"in e}const R=(e,t)=>Y$(e,t,Xp);function zV(e,t,n=Wt){const o=at(),r=yn(t),s=zo(t),i=J$((a,u)=>{let c;return fE(()=>{const d=e[t];hs(c,d)&&(c=d,u())}),{get(){return a(),n.get?n.get(c):c},set(d){const f=o.vnode.props;!(f&&(t in f||r in f||s in f)&&(`onUpdate:${t}`in f||`onUpdate:${r}`in f||`onUpdate:${s}`in f))&&hs(d,c)&&(c=d,u()),o.emit(`update:${t}`,n.set?n.set(d):d)}}}),l=t==="modelValue"?"modelModifiers":`${t}Modifiers`;return i[Symbol.iterator]=()=>{let a=0;return{next(){return a<2?{value:a++?e[l]||{}:i,done:!1}:{done:!0}}}},i}function lt(e,t,n){const o=arguments.length;return o===2?pt(t)&&!Te(t)?yo(t)?w(e,null,[t]):w(e,t):w(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):o===3&&yo(n)&&(n=[n]),w(e,t,n))}function jV(){}function HV(e,t,n,o){const r=n[o];if(r&&ZE(r,e))return r;const s=t();return s.memo=e.slice(),n[o]=s}function ZE(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let o=0;o<n.length;o++)if(hs(n[o],t[o]))return!1;return ru>0&&jo&&jo.push(e),!0}const JE="3.4.23",XE=yt,UV=OD,WV=Uu,KV=nE,qV={createComponentInstance:UE,setupComponent:KE,renderComponentRoot:jm,setCurrentRenderingInstance:vp,isVNode:yo,normalizeVNode:ur},GV=qV,YV=null,ZV=null,JV=null;/** |
| 14 |
* @vue/runtime-dom v3.4.23 |
| 15 |
* (c) 2018-present Yuxi (Evan) You and Vue contributors |
| 16 |
* @license MIT |
| 17 |
**/const XV="http://www.w3.org/2000/svg",QV="http://www.w3.org/1998/Math/MathML",vl=typeof document<"u"?document:null,E4=vl&&vl.createElement("template"),eF={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const r=t==="svg"?vl.createElementNS(XV,e):t==="mathml"?vl.createElementNS(QV,e):vl.createElement(e,n?{is:n}:void 0);return e==="select"&&o&&o.multiple!=null&&r.setAttribute("multiple",o.multiple),r},createText:e=>vl.createTextNode(e),createComment:e=>vl.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>vl.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,o,r,s){const i=n?n.previousSibling:t.lastChild;if(r&&(r===s||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===s||!(r=r.nextSibling)););else{E4.innerHTML=o==="svg"?`<svg>${e}</svg>`:o==="mathml"?`<math>${e}</math>`:e;const l=E4.content;if(o==="svg"||o==="mathml"){const a=l.firstChild;for(;a.firstChild;)l.appendChild(a.firstChild);l.removeChild(a)}t.insertBefore(l,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Gi="transition",zd="animation",Fc=Symbol("_vtc"),_r=(e,{slots:t})=>lt(hE,e7(e),t);_r.displayName="Transition";const QE={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},tF=_r.props=zt({},b3,QE),fa=(e,t=[])=>{Te(e)?e.forEach(n=>n(...t)):e&&e(...t)},x4=e=>e?Te(e)?e.some(t=>t.length>1):e.length>1:!1;function e7(e){const t={};for(const F in e)F in QE||(t[F]=e[F]);if(e.css===!1)return t;const{name:n="v",type:o,duration:r,enterFromClass:s=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:a=s,appearActiveClass:u=i,appearToClass:c=l,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:p=`${n}-leave-to`}=e,h=nF(r),m=h&&h[0],y=h&&h[1],{onBeforeEnter:v,onEnter:k,onEnterCancelled:b,onLeave:$,onLeaveCancelled:x,onBeforeAppear:E=v,onAppear:M=k,onAppearCancelled:N=b}=t,P=(F,Y,Z)=>{el(F,Y?c:l),el(F,Y?u:i),Z&&Z()},I=(F,Y)=>{F._isLeaving=!1,el(F,d),el(F,p),el(F,f),Y&&Y()},V=F=>(Y,Z)=>{const K=F?M:k,U=()=>P(Y,F,Z);fa(K,[Y,U]),T4(()=>{el(Y,F?a:s),pi(Y,F?c:l),x4(K)||M4(Y,o,m,U)})};return zt(t,{onBeforeEnter(F){fa(v,[F]),pi(F,s),pi(F,i)},onBeforeAppear(F){fa(E,[F]),pi(F,a),pi(F,u)},onEnter:V(!1),onAppear:V(!0),onLeave(F,Y){F._isLeaving=!0;const Z=()=>I(F,Y);pi(F,d),n7(),pi(F,f),T4(()=>{F._isLeaving&&(el(F,d),pi(F,p),x4($)||M4(F,o,y,Z))}),fa($,[F,Z])},onEnterCancelled(F){P(F,!1),fa(b,[F])},onAppearCancelled(F){P(F,!0),fa(N,[F])},onLeaveCancelled(F){I(F),fa(x,[F])}})}function nF(e){if(e==null)return null;if(pt(e))return[Wv(e.enter),Wv(e.leave)];{const t=Wv(e);return[t,t]}}function Wv(e){return ug(e)}function pi(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Fc]||(e[Fc]=new Set)).add(t)}function el(e,t){t.split(/\s+/).forEach(o=>o&&e.classList.remove(o));const n=e[Fc];n&&(n.delete(t),n.size||(e[Fc]=void 0))}function T4(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let oF=0;function M4(e,t,n,o){const r=e._endId=++oF,s=()=>{r===e._endId&&o()};if(n)return setTimeout(s,n);const{type:i,timeout:l,propCount:a}=t7(e,t);if(!i)return o();const u=i+"end";let c=0;const d=()=>{e.removeEventListener(u,f),s()},f=p=>{p.target===e&&++c>=a&&d()};setTimeout(()=>{c<a&&d()},l+1),e.addEventListener(u,f)}function t7(e,t){const n=window.getComputedStyle(e),o=h=>(n[h]||"").split(", "),r=o(`${Gi}Delay`),s=o(`${Gi}Duration`),i=O4(r,s),l=o(`${zd}Delay`),a=o(`${zd}Duration`),u=O4(l,a);let c=null,d=0,f=0;t===Gi?i>0&&(c=Gi,d=i,f=s.length):t===zd?u>0&&(c=zd,d=u,f=a.length):(d=Math.max(i,u),c=d>0?i>u?Gi:zd:null,f=c?c===Gi?s.length:a.length:0);const p=c===Gi&&/\b(transform|all)(,|$)/.test(o(`${Gi}Property`).toString());return{type:c,timeout:d,propCount:f,hasTransform:p}}function O4(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,o)=>I4(n)+I4(e[o])))}function I4(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function n7(){return document.body.offsetHeight}function rF(e,t,n){const o=e[Fc];o&&(t=(t?[t,...o]:[...o]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const vg=Symbol("_vod"),o7=Symbol("_vsh"),en={beforeMount(e,{value:t},{transition:n}){e[vg]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):jd(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:o}){!t!=!n&&(o?t?(o.beforeEnter(e),jd(e,!0),o.enter(e)):o.leave(e,()=>{jd(e,!1)}):jd(e,t))},beforeUnmount(e,{value:t}){jd(e,t)}};function jd(e,t){e.style.display=t?e[vg]:"none",e[o7]=!t}function sF(){en.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}const r7=Symbol("");function iF(e){const t=at();if(!t)return;const n=t.ut=(r=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(s=>N_(s,r))},o=()=>{const r=e(t.proxy);A_(t.subTree,r),n(r)};Ct(()=>{dE(o);const r=new MutationObserver(o);r.observe(t.subTree.el.parentNode,{childList:!0}),ri(()=>r.disconnect())})}function A_(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{A_(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)N_(e.el,t);else if(e.type===de)e.children.forEach(n=>A_(n,t));else if(e.type===Wa){let{el:n,anchor:o}=e;for(;n&&(N_(n,t),n!==o);)n=n.nextSibling}}function N_(e,t){if(e.nodeType===1){const n=e.style;let o="";for(const r in t)n.setProperty(`--${r}`,t[r]),o+=`--${r}: ${t[r]};`;n[r7]=o}}const lF=/(^|;)\s*display\s*:/;function aF(e,t,n){const o=e.style,r=tt(n);let s=!1;if(n&&!r){if(t)if(tt(t))for(const i of t.split(";")){const l=i.slice(0,i.indexOf(":")).trim();n[l]==null&&Um(o,l,"")}else for(const i in t)n[i]==null&&Um(o,i,"");for(const i in n)i==="display"&&(s=!0),Um(o,i,n[i])}else if(r){if(t!==n){const i=o[r7];i&&(n+=";"+i),o.cssText=n,s=lF.test(n)}}else t&&e.removeAttribute("style");vg in e&&(e[vg]=s?o.display:"",e[o7]&&(o.display="none"))}const A4=/\s*!important$/;function Um(e,t,n){if(Te(n))n.forEach(o=>Um(e,t,o));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=uF(e,t);A4.test(n)?e.setProperty(zo(o),n.replace(A4,""),"important"):e[o]=n}}const N4=["Webkit","Moz","ms"],Kv={};function uF(e,t){const n=Kv[t];if(n)return n;let o=yn(t);if(o!=="filter"&&o in e)return Kv[t]=o;o=Gl(o);for(let r=0;r<N4.length;r++){const s=N4[r]+o;if(s in e)return Kv[t]=s}return t}const P4="http://www.w3.org/1999/xlink";function cF(e,t,n,o,r){if(o&&t.startsWith("xlink:"))n==null?e.removeAttributeNS(P4,t.slice(6,t.length)):e.setAttributeNS(P4,t,n);else{const s=GR(t);n==null||s&&!I$(n)?e.removeAttribute(t):e.setAttribute(t,s?"":n)}}function dF(e,t,n,o,r,s,i){if(t==="innerHTML"||t==="textContent"){o&&i(o,r,s),e[t]=n??"";return}const l=e.tagName;if(t==="value"&&l!=="PROGRESS"&&!l.includes("-")){const u=l==="OPTION"?e.getAttribute("value")||"":e.value,c=n??"";(u!==c||!("_value"in e))&&(e.value=c),n==null&&e.removeAttribute(t),e._value=n;return}let a=!1;if(n===""||n==null){const u=typeof e[t];u==="boolean"?n=I$(n):n==null&&u==="string"?(n="",a=!0):u==="number"&&(n=0,a=!0)}try{e[t]=n}catch{}a&&e.removeAttribute(t)}function wi(e,t,n,o){e.addEventListener(t,n,o)}function fF(e,t,n,o){e.removeEventListener(t,n,o)}const L4=Symbol("_vei");function pF(e,t,n,o,r=null){const s=e[L4]||(e[L4]={}),i=s[t];if(o&&i)i.value=o;else{const[l,a]=hF(t);if(o){const u=s[t]=vF(o,r);wi(e,l,u,a)}else i&&(fF(e,l,i,a),s[t]=void 0)}}const R4=/(?:Once|Passive|Capture)$/;function hF(e){let t;if(R4.test(e)){t={};let o;for(;o=e.match(R4);)e=e.slice(0,e.length-o[0].length),t[o[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):zo(e.slice(2)),t]}let qv=0;const mF=Promise.resolve(),gF=()=>qv||(mF.then(()=>qv=0),qv=Date.now());function vF(e,t){const n=o=>{if(!o._vts)o._vts=Date.now();else if(o._vts<=n.attached)return;hr(yF(o,n.value),t,5,[o])};return n.value=e,n.attached=gF(),n}function yF(e,t){if(Te(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(o=>r=>!r._stopped&&o&&o(r))}else return t}const D4=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,_F=(e,t,n,o,r,s,i,l,a)=>{const u=r==="svg";t==="class"?rF(e,o,u):t==="style"?aF(e,n,o):_u(t)?X2(t)||pF(e,t,n,o,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):bF(e,t,o,u))?dF(e,t,o,s,i,l,a):(t==="true-value"?e._trueValue=o:t==="false-value"&&(e._falseValue=o),cF(e,t,o,u))};function bF(e,t,n,o){if(o)return!!(t==="innerHTML"||t==="textContent"||t in e&&D4(t)&&et(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return D4(t)&&tt(n)?!1:t in e}/*! #__NO_SIDE_EFFECTS__ */function s7(e,t){const n=Q(e);class o extends S0{constructor(s){super(n,s,t)}}return o.def=n,o}/*! #__NO_SIDE_EFFECTS__ */const wF=e=>s7(e,g7),CF=typeof HTMLElement<"u"?HTMLElement:class{};class S0 extends CF{constructor(t,n={},o){super(),this._def=t,this._props=n,this._instance=null,this._connected=!1,this._resolved=!1,this._numberProps=null,this._ob=null,this.shadowRoot&&o?o(this._createVNode(),this.shadowRoot):(this.attachShadow({mode:"open"}),this._def.__asyncLoader||this._resolveProps(this._def))}connectedCallback(){this._connected=!0,this._instance||(this._resolved?this._update():this._resolveDef())}disconnectedCallback(){this._connected=!1,this._ob&&(this._ob.disconnect(),this._ob=null),ot(()=>{this._connected||(Pi(null,this.shadowRoot),this._instance=null)})}_resolveDef(){this._resolved=!0;for(let o=0;o<this.attributes.length;o++)this._setAttr(this.attributes[o].name);this._ob=new MutationObserver(o=>{for(const r of o)this._setAttr(r.attributeName)}),this._ob.observe(this,{attributes:!0});const t=(o,r=!1)=>{const{props:s,styles:i}=o;let l;if(s&&!Te(s))for(const a in s){const u=s[a];(u===Number||u&&u.type===Number)&&(a in this._props&&(this._props[a]=ug(this._props[a])),(l||(l=Object.create(null)))[yn(a)]=!0)}this._numberProps=l,r&&this._resolveProps(o),this._applyStyles(i),this._update()},n=this._def.__asyncLoader;n?n().then(o=>t(o,!0)):t(this._def)}_resolveProps(t){const{props:n}=t,o=Te(n)?n:Object.keys(n||{});for(const r of Object.keys(this))r[0]!=="_"&&o.includes(r)&&this._setProp(r,this[r],!0,!1);for(const r of o.map(yn))Object.defineProperty(this,r,{get(){return this._getProp(r)},set(s){this._setProp(r,s)}})}_setAttr(t){let n=this.hasAttribute(t)?this.getAttribute(t):void 0;const o=yn(t);this._numberProps&&this._numberProps[o]&&(n=ug(n)),this._setProp(o,n,!1)}_getProp(t){return this._props[t]}_setProp(t,n,o=!0,r=!0){n!==this._props[t]&&(this._props[t]=n,r&&this._instance&&this._update(),o&&(n===!0?this.setAttribute(zo(t),""):typeof n=="string"||typeof n=="number"?this.setAttribute(zo(t),n+""):n||this.removeAttribute(zo(t))))}_update(){Pi(this._createVNode(),this.shadowRoot)}_createVNode(){const t=w(this._def,zt({},this._props));return this._instance||(t.ce=n=>{this._instance=n,n.isCE=!0;const o=(s,i)=>{this.dispatchEvent(new CustomEvent(s,{detail:i}))};n.emit=(s,...i)=>{o(s,i),zo(s)!==s&&o(zo(s),i)};let r=this;for(;r=r&&(r.parentNode||r.host);)if(r instanceof S0){n.parent=r._instance,n.provides=r._instance.provides;break}}),t}_applyStyles(t){t&&t.forEach(n=>{const o=document.createElement("style");o.textContent=n,this.shadowRoot.appendChild(o)})}}function kF(e="$style"){{const t=at();if(!t)return Wt;const n=t.type.__cssModules;if(!n)return Wt;const o=n[e];return o||Wt}}const i7=new WeakMap,l7=new WeakMap,yg=Symbol("_moveCb"),V4=Symbol("_enterCb"),a7={name:"TransitionGroup",props:zt({},tF,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=at(),o=_3();let r,s;return Fi(()=>{if(!r.length)return;const i=e.moveClass||`${e.name||"v"}-move`;if(!TF(r[0].el,n.vnode.el,i))return;r.forEach($F),r.forEach(EF);const l=r.filter(xF);n7(),l.forEach(a=>{const u=a.el,c=u.style;pi(u,i),c.transform=c.webkitTransform=c.transitionDuration="";const d=u[yg]=f=>{f&&f.target!==u||(!f||/transform$/.test(f.propertyName))&&(u.removeEventListener("transitionend",d),u[yg]=null,el(u,i))};u.addEventListener("transitionend",d)})}),()=>{const i=Ot(e),l=e7(i);let a=i.tag||de;if(r=[],s)for(let u=0;u<s.length;u++){const c=s[u];c.el&&c.el instanceof Element&&(r.push(c),ou(c,Vc(c,l,o,n)),i7.set(c,c.el.getBoundingClientRect()))}s=t.default?b0(t.default()):[];for(let u=0;u<s.length;u++){const c=s[u];c.key!=null&&ou(c,Vc(c,l,o,n))}return w(a,null,s)}}},SF=e=>delete e.mode;a7.props;const $0=a7;function $F(e){const t=e.el;t[yg]&&t[yg](),t[V4]&&t[V4]()}function EF(e){l7.set(e,e.el.getBoundingClientRect())}function xF(e){const t=i7.get(e),n=l7.get(e),o=t.left-n.left,r=t.top-n.top;if(o||r){const s=e.el.style;return s.transform=s.webkitTransform=`translate(${o}px,${r}px)`,s.transitionDuration="0s",e}}function TF(e,t,n){const o=e.cloneNode(),r=e[Fc];r&&r.forEach(l=>{l.split(/\s+/).forEach(a=>a&&o.classList.remove(a))}),n.split(/\s+/).forEach(l=>l&&o.classList.add(l)),o.style.display="none";const s=t.nodeType===1?t:t.parentNode;s.appendChild(o);const{hasTransform:i}=t7(o);return s.removeChild(o),i}const zl=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Te(t)?n=>yc(t,n):t};function MF(e){e.target.composing=!0}function F4(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Pr=Symbol("_assign"),Bc={created(e,{modifiers:{lazy:t,trim:n,number:o}},r){e[Pr]=zl(r);const s=o||r.props&&r.props.type==="number";wi(e,t?"change":"input",i=>{if(i.target.composing)return;let l=e.value;n&&(l=l.trim()),s&&(l=ag(l)),e[Pr](l)}),n&&wi(e,"change",()=>{e.value=e.value.trim()}),t||(wi(e,"compositionstart",MF),wi(e,"compositionend",F4),wi(e,"change",F4))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:o,number:r}},s){if(e[Pr]=zl(s),e.composing)return;const i=(r||e.type==="number")&&!/^0\d/.test(e.value)?ag(e.value):e.value,l=t??"";i!==l&&(document.activeElement===e&&e.type!=="range"&&(n||o&&e.value.trim()===l)||(e.value=l))}},iu={deep:!0,created(e,t,n){e[Pr]=zl(n),wi(e,"change",()=>{const o=e._modelValue,r=zc(e),s=e.checked,i=e[Pr];if(Te(o)){const l=p0(o,r),a=l!==-1;if(s&&!a)i(o.concat(r));else if(!s&&a){const u=[...o];u.splice(l,1),i(u)}}else if(bu(o)){const l=new Set(o);s?l.add(r):l.delete(r),i(l)}else i(c7(e,s))})},mounted:B4,beforeUpdate(e,t,n){e[Pr]=zl(n),B4(e,t,n)}};function B4(e,{value:t,oldValue:n},o){e._modelValue=t,Te(t)?e.checked=p0(t,o.props.value)>-1:bu(t)?e.checked=t.has(o.props.value):t!==n&&(e.checked=Bl(t,c7(e,!0)))}const Qp={created(e,{value:t},n){e.checked=Bl(t,n.props.value),e[Pr]=zl(n),wi(e,"change",()=>{e[Pr](zc(e))})},beforeUpdate(e,{value:t,oldValue:n},o){e[Pr]=zl(o),t!==n&&(e.checked=Bl(t,o.props.value))}},u7={deep:!0,created(e,{value:t,modifiers:{number:n}},o){const r=bu(t);wi(e,"change",()=>{const s=Array.prototype.filter.call(e.options,i=>i.selected).map(i=>n?ag(zc(i)):zc(i));e[Pr](e.multiple?r?new Set(s):s:s[0]),e._assigning=!0,ot(()=>{e._assigning=!1})}),e[Pr]=zl(o)},mounted(e,{value:t,modifiers:{number:n}}){z4(e,t)},beforeUpdate(e,t,n){e[Pr]=zl(n)},updated(e,{value:t,modifiers:{number:n}}){e._assigning||z4(e,t)}};function z4(e,t,n){const o=e.multiple,r=Te(t);if(!(o&&!r&&!bu(t))){for(let s=0,i=e.options.length;s<i;s++){const l=e.options[s],a=zc(l);if(o)if(r){const u=typeof a;u==="string"||u==="number"?l.selected=t.some(c=>String(c)===String(a)):l.selected=p0(t,a)>-1}else l.selected=t.has(a);else if(Bl(zc(l),t)){e.selectedIndex!==s&&(e.selectedIndex=s);return}}!o&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function zc(e){return"_value"in e?e._value:e.value}function c7(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const d7={created(e,t,n){sm(e,t,n,null,"created")},mounted(e,t,n){sm(e,t,n,null,"mounted")},beforeUpdate(e,t,n,o){sm(e,t,n,o,"beforeUpdate")},updated(e,t,n,o){sm(e,t,n,o,"updated")}};function f7(e,t){switch(e){case"SELECT":return u7;case"TEXTAREA":return Bc;default:switch(t){case"checkbox":return iu;case"radio":return Qp;default:return Bc}}}function sm(e,t,n,o,r){const i=f7(e.tagName,n.props&&n.props.type)[r];i&&i(e,t,n,o)}function OF(){Bc.getSSRProps=({value:e})=>({value:e}),Qp.getSSRProps=({value:e},t)=>{if(t.props&&Bl(t.props.value,e))return{checked:!0}},iu.getSSRProps=({value:e},t)=>{if(Te(e)){if(t.props&&p0(e,t.props.value)>-1)return{checked:!0}}else if(bu(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},d7.getSSRProps=(e,t)=>{if(typeof t.type!="string")return;const n=f7(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)}}const IF=["ctrl","shift","alt","meta"],AF={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)=>IF.some(n=>e[`${n}Key`]&&!t.includes(n))},Ze=(e,t)=>{const n=e._withMods||(e._withMods={}),o=t.join(".");return n[o]||(n[o]=(r,...s)=>{for(let i=0;i<t.length;i++){const l=AF[t[i]];if(l&&l(r,t))return}return e(r,...s)})},NF={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Mt=(e,t)=>{const n=e._withKeys||(e._withKeys={}),o=t.join(".");return n[o]||(n[o]=r=>{if(!("key"in r))return;const s=zo(r.key);if(t.some(i=>i===s||NF[i]===s))return e(r)})},p7=zt({patchProp:_F},eF);let Vf,j4=!1;function h7(){return Vf||(Vf=LE(p7))}function m7(){return Vf=j4?Vf:RE(p7),j4=!0,Vf}const Pi=(...e)=>{h7().render(...e)},g7=(...e)=>{m7().hydrate(...e)},x3=(...e)=>{const t=h7().createApp(...e),{mount:n}=t;return t.mount=o=>{const r=y7(o);if(!r)return;const s=t._component;!et(s)&&!s.render&&!s.template&&(s.template=r.innerHTML),r.innerHTML="";const i=n(r,!1,v7(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),i},t},PF=(...e)=>{const t=m7().createApp(...e),{mount:n}=t;return t.mount=o=>{const r=y7(o);if(r)return n(r,!0,v7(r))},t};function v7(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function y7(e){return tt(e)?document.querySelector(e):e}let H4=!1;const LF=()=>{H4||(H4=!0,OF(),sF())},RF=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:hE,BaseTransitionPropsValidators:b3,Comment:Yn,DeprecationTypes:JV,EffectScope:o3,ErrorCodes:MD,ErrorTypeStrings:UV,Fragment:de,KeepAlive:QD,ReactiveEffect:Rc,Static:Wa,Suspense:HD,Teleport:qr,Text:Ni,TrackOpTypes:ED,Transition:_r,TransitionGroup:$0,TriggerOpTypes:xD,VueElement:S0,assertNumber:TD,callWithAsyncErrorHandling:hr,callWithErrorHandling:Ti,camelize:yn,capitalize:Gl,cloneVNode:gs,compatUtils:ZV,computed:R,createApp:x3,createBlock:H,createCommentVNode:z,createElementBlock:T,createElementVNode:_,createHydrationRenderer:RE,createPropsRestProxy:dV,createRenderer:LE,createSSRApp:PF,createSlots:ms,createStaticVNode:C0,createTextVNode:ne,createVNode:w,customRef:J$,defineAsyncComponent:JD,defineComponent:Q,defineCustomElement:s7,defineEmits:oV,defineExpose:rV,defineModel:lV,defineOptions:sV,defineProps:nV,defineSSRCustomElement:wF,defineSlots:iV,devtools:WV,effect:JR,effectScope:N$,getCurrentInstance:at,getCurrentScope:r3,getTransitionRawChildren:b0,guardReactiveProps:$3,h:lt,handleError:Cu,hasInjectionContext:bV,hydrate:g7,initCustomFormatter:jV,initDirectivesForSSR:LF,inject:je,isMemoSame:ZE,isProxy:c3,isReactive:_c,isReadonly:Dc,isRef:on,isRuntimeOnly:VV,isShallow:pp,isVNode:yo,markRaw:Ai,mergeDefaults:uV,mergeModels:cV,mergeProps:un,nextTick:ot,normalizeClass:D,normalizeProps:n3,normalizeStyle:Ye,onActivated:gE,onBeforeMount:yd,onBeforeUnmount:xn,onBeforeUpdate:yE,onDeactivated:w3,onErrorCaptured:CE,onMounted:Ct,onRenderTracked:wE,onRenderTriggered:bE,onScopeDispose:s3,onServerPrefetch:_E,onUnmounted:ri,onUpdated:Fi,openBlock:C,popScopeId:sE,provide:wt,proxyRefs:p3,pushScopeId:rE,queuePostFlushCb:dg,reactive:Bn,readonly:wu,ref:q,registerRuntimeCompiler:qE,render:Pi,renderList:nt,renderSlot:he,resolveComponent:ee,resolveDirective:Rt,resolveDynamicComponent:Pt,resolveFilter:YV,resolveTransitionHooks:Vc,setBlockTracking:E_,setDevtoolsHook:KV,setTransitionHooks:ou,shallowReactive:u3,shallowReadonly:yD,shallowRef:An,ssrContextKey:uE,ssrUtils:GV,stop:XR,toDisplayString:O,toHandlerKey:vc,toHandlers:SE,toRaw:Ot,toRef:pn,toRefs:oi,toValue:wD,transformVNodeArgs:NV,triggerRef:bD,unref:g,useAttrs:_d,useCssModule:kF,useCssVars:iF,useModel:zV,useSSRContext:cE,useSlots:Kr,useTransitionState:_3,vModelCheckbox:iu,vModelDynamic:d7,vModelRadio:Qp,vModelSelect:u7,vModelText:Bc,vShow:en,version:JE,warn:XE,watch:Me,watchEffect:as,watchPostEffect:dE,watchSyncEffect:fE,withAsyncContext:fV,withCtx:S,withDefaults:aV,withDirectives:Fe,withKeys:Mt,withMemo:HV,withModifiers:Ze,withScopeId:RD},Symbol.toStringTag,{value:"Module"}));/** |
| 18 |
* @vue/compiler-core v3.4.23 |
| 19 |
* (c) 2018-present Yuxi (Evan) You and Vue contributors |
| 20 |
* @license MIT |
| 21 |
**/const bp=Symbol(""),Ff=Symbol(""),T3=Symbol(""),_g=Symbol(""),_7=Symbol(""),lu=Symbol(""),b7=Symbol(""),w7=Symbol(""),M3=Symbol(""),O3=Symbol(""),eh=Symbol(""),I3=Symbol(""),C7=Symbol(""),A3=Symbol(""),N3=Symbol(""),P3=Symbol(""),L3=Symbol(""),R3=Symbol(""),D3=Symbol(""),k7=Symbol(""),S7=Symbol(""),E0=Symbol(""),bg=Symbol(""),V3=Symbol(""),F3=Symbol(""),wp=Symbol(""),th=Symbol(""),B3=Symbol(""),P_=Symbol(""),DF=Symbol(""),L_=Symbol(""),wg=Symbol(""),VF=Symbol(""),FF=Symbol(""),z3=Symbol(""),BF=Symbol(""),zF=Symbol(""),j3=Symbol(""),$7=Symbol(""),jc={[bp]:"Fragment",[Ff]:"Teleport",[T3]:"Suspense",[_g]:"KeepAlive",[_7]:"BaseTransition",[lu]:"openBlock",[b7]:"createBlock",[w7]:"createElementBlock",[M3]:"createVNode",[O3]:"createElementVNode",[eh]:"createCommentVNode",[I3]:"createTextVNode",[C7]:"createStaticVNode",[A3]:"resolveComponent",[N3]:"resolveDynamicComponent",[P3]:"resolveDirective",[L3]:"resolveFilter",[R3]:"withDirectives",[D3]:"renderList",[k7]:"renderSlot",[S7]:"createSlots",[E0]:"toDisplayString",[bg]:"mergeProps",[V3]:"normalizeClass",[F3]:"normalizeStyle",[wp]:"normalizeProps",[th]:"guardReactiveProps",[B3]:"toHandlers",[P_]:"camelize",[DF]:"capitalize",[L_]:"toHandlerKey",[wg]:"setBlockTracking",[VF]:"pushScopeId",[FF]:"popScopeId",[z3]:"withCtx",[BF]:"unref",[zF]:"isRef",[j3]:"withMemo",[$7]:"isMemoSame"};function jF(e){Object.getOwnPropertySymbols(e).forEach(t=>{jc[t]=e[t]})}const br={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function HF(e,t=""){return{type:0,source:t,children:e,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:0,temps:0,codegenNode:void 0,loc:br}}function Cp(e,t,n,o,r,s,i,l=!1,a=!1,u=!1,c=br){return e&&(l?(e.helper(lu),e.helper(Wc(e.inSSR,u))):e.helper(Uc(e.inSSR,u)),i&&e.helper(R3)),{type:13,tag:t,props:n,children:o,patchFlag:r,dynamicProps:s,directives:i,isBlock:l,disableTracking:a,isComponent:u,loc:c}}function nh(e,t=br){return{type:17,loc:t,elements:e}}function Ir(e,t=br){return{type:15,loc:t,properties:e}}function $n(e,t){return{type:16,loc:br,key:tt(e)?St(e,!0):e,value:t}}function St(e,t=!1,n=br,o=0){return{type:4,loc:n,content:e,isStatic:t,constType:t?3:o}}function us(e,t=br){return{type:8,loc:t,children:e}}function jn(e,t=[],n=br){return{type:14,loc:n,callee:e,arguments:t}}function Hc(e,t=void 0,n=!1,o=!1,r=br){return{type:18,params:e,returns:t,newline:n,isSlot:o,loc:r}}function R_(e,t,n,o=!0){return{type:19,test:e,consequent:t,alternate:n,newline:o,loc:br}}function UF(e,t,n=!1){return{type:20,index:e,value:t,isVNode:n,loc:br}}function WF(e){return{type:21,body:e,loc:br}}function Uc(e,t){return e||t?M3:O3}function Wc(e,t){return e||t?b7:w7}function H3(e,{helper:t,removeHelper:n,inSSR:o}){e.isBlock||(e.isBlock=!0,n(Uc(o,e.isComponent)),t(lu),t(Wc(o,e.isComponent)))}const U4=new Uint8Array([123,123]),W4=new Uint8Array([125,125]);function K4(e){return e>=97&&e<=122||e>=65&&e<=90}function lr(e){return e===32||e===10||e===9||e===12||e===13}function Yi(e){return e===47||e===62||lr(e)}function Cg(e){const t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}const uo={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97])};class KF{constructor(t,n){this.stack=t,this.cbs=n,this.state=1,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=1,this.inRCDATA=!1,this.inXML=!1,this.inVPre=!1,this.newlines=[],this.mode=0,this.delimiterOpen=U4,this.delimiterClose=W4,this.delimiterIndex=-1,this.currentSequence=void 0,this.sequenceIndex=0}get inSFCRoot(){return this.mode===2&&this.stack.length===0}reset(){this.state=1,this.mode=0,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=1,this.inRCDATA=!1,this.currentSequence=void 0,this.newlines.length=0,this.delimiterOpen=U4,this.delimiterClose=W4}getPos(t){let n=1,o=t+1;for(let r=this.newlines.length-1;r>=0;r--){const s=this.newlines[r];if(t>s){n=r+2,o=t-s;break}}return{column:o,line:n,offset:t}}peek(){return this.buffer.charCodeAt(this.index+1)}stateText(t){t===60?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=5,this.sectionStart=this.index):!this.inVPre&&t===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(t))}stateInterpolationOpen(t){if(t===this.delimiterOpen[this.delimiterIndex])if(this.delimiterIndex===this.delimiterOpen.length-1){const n=this.index+1-this.delimiterOpen.length;n>this.sectionStart&&this.cbs.ontext(this.sectionStart,n),this.state=3,this.sectionStart=n}else this.delimiterIndex++;else this.inRCDATA?(this.state=32,this.stateInRCDATA(t)):(this.state=1,this.stateText(t))}stateInterpolation(t){t===this.delimiterClose[0]&&(this.state=4,this.delimiterIndex=0,this.stateInterpolationClose(t))}stateInterpolationClose(t){t===this.delimiterClose[this.delimiterIndex]?this.delimiterIndex===this.delimiterClose.length-1?(this.cbs.oninterpolation(this.sectionStart,this.index+1),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):this.delimiterIndex++:(this.state=3,this.stateInterpolation(t))}stateSpecialStartSequence(t){const n=this.sequenceIndex===this.currentSequence.length;if(!(n?Yi(t):(t|32)===this.currentSequence[this.sequenceIndex]))this.inRCDATA=!1;else if(!n){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=6,this.stateInTagName(t)}stateInRCDATA(t){if(this.sequenceIndex===this.currentSequence.length){if(t===62||lr(t)){const n=this.index-this.currentSequence.length;if(this.sectionStart<n){const o=this.index;this.index=n,this.cbs.ontext(this.sectionStart,n),this.index=o}this.sectionStart=n+2,this.stateInClosingTagName(t),this.inRCDATA=!1;return}this.sequenceIndex=0}(t|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:this.sequenceIndex===0?this.currentSequence===uo.TitleEnd||this.currentSequence===uo.TextareaEnd&&!this.inSFCRoot?t===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(t)):this.fastForwardTo(60)&&(this.sequenceIndex=1):this.sequenceIndex=+(t===60)}stateCDATASequence(t){t===uo.Cdata[this.sequenceIndex]?++this.sequenceIndex===uo.Cdata.length&&(this.state=28,this.currentSequence=uo.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=23,this.stateInDeclaration(t))}fastForwardTo(t){for(;++this.index<this.buffer.length;){const n=this.buffer.charCodeAt(this.index);if(n===10&&this.newlines.push(this.index),n===t)return!0}return this.index=this.buffer.length-1,!1}stateInCommentLike(t){t===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===uo.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index-2):this.cbs.oncomment(this.sectionStart,this.index-2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=1):this.sequenceIndex===0?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):t!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}startSpecial(t,n){this.enterRCDATA(t,n),this.state=31}enterRCDATA(t,n){this.inRCDATA=!0,this.currentSequence=t,this.sequenceIndex=n}stateBeforeTagName(t){t===33?(this.state=22,this.sectionStart=this.index+1):t===63?(this.state=24,this.sectionStart=this.index+1):K4(t)?(this.sectionStart=this.index,this.mode===0?this.state=6:this.inSFCRoot?this.state=34:this.inXML?this.state=6:t===116?this.state=30:this.state=t===115?29:6):t===47?this.state=8:(this.state=1,this.stateText(t))}stateInTagName(t){Yi(t)&&this.handleTagName(t)}stateInSFCRootTagName(t){if(Yi(t)){const n=this.buffer.slice(this.sectionStart,this.index);n!=="template"&&this.enterRCDATA(Cg("</"+n),0),this.handleTagName(t)}}handleTagName(t){this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(t)}stateBeforeClosingTagName(t){lr(t)||(t===62?(this.state=1,this.sectionStart=this.index+1):(this.state=K4(t)?9:27,this.sectionStart=this.index))}stateInClosingTagName(t){(t===62||lr(t))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=10,this.stateAfterClosingTagName(t))}stateAfterClosingTagName(t){t===62&&(this.state=1,this.sectionStart=this.index+1)}stateBeforeAttrName(t){t===62?(this.cbs.onopentagend(this.index),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):t===47?this.state=7:t===60&&this.peek()===47?(this.cbs.onopentagend(this.index),this.state=5,this.sectionStart=this.index):lr(t)||this.handleAttrStart(t)}handleAttrStart(t){t===118&&this.peek()===45?(this.state=13,this.sectionStart=this.index):t===46||t===58||t===64||t===35?(this.cbs.ondirname(this.index,this.index+1),this.state=14,this.sectionStart=this.index+1):(this.state=12,this.sectionStart=this.index)}stateInSelfClosingTag(t){t===62?(this.cbs.onselfclosingtag(this.index),this.state=1,this.sectionStart=this.index+1,this.inRCDATA=!1):lr(t)||(this.state=11,this.stateBeforeAttrName(t))}stateInAttrName(t){(t===61||Yi(t))&&(this.cbs.onattribname(this.sectionStart,this.index),this.handleAttrNameEnd(t))}stateInDirName(t){t===61||Yi(t)?(this.cbs.ondirname(this.sectionStart,this.index),this.handleAttrNameEnd(t)):t===58?(this.cbs.ondirname(this.sectionStart,this.index),this.state=14,this.sectionStart=this.index+1):t===46&&(this.cbs.ondirname(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDirArg(t){t===61||Yi(t)?(this.cbs.ondirarg(this.sectionStart,this.index),this.handleAttrNameEnd(t)):t===91?this.state=15:t===46&&(this.cbs.ondirarg(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDynamicDirArg(t){t===93?this.state=14:(t===61||Yi(t))&&(this.cbs.ondirarg(this.sectionStart,this.index+1),this.handleAttrNameEnd(t))}stateInDirModifier(t){t===61||Yi(t)?(this.cbs.ondirmodifier(this.sectionStart,this.index),this.handleAttrNameEnd(t)):t===46&&(this.cbs.ondirmodifier(this.sectionStart,this.index),this.sectionStart=this.index+1)}handleAttrNameEnd(t){this.sectionStart=this.index,this.state=17,this.cbs.onattribnameend(this.index),this.stateAfterAttrName(t)}stateAfterAttrName(t){t===61?this.state=18:t===47||t===62?(this.cbs.onattribend(0,this.sectionStart),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(t)):lr(t)||(this.cbs.onattribend(0,this.sectionStart),this.handleAttrStart(t))}stateBeforeAttrValue(t){t===34?(this.state=19,this.sectionStart=this.index+1):t===39?(this.state=20,this.sectionStart=this.index+1):lr(t)||(this.sectionStart=this.index,this.state=21,this.stateInAttrValueNoQuotes(t))}handleInAttrValue(t,n){(t===n||this.fastForwardTo(n))&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(n===34?3:2,this.index+1),this.state=11)}stateInAttrValueDoubleQuotes(t){this.handleInAttrValue(t,34)}stateInAttrValueSingleQuotes(t){this.handleInAttrValue(t,39)}stateInAttrValueNoQuotes(t){lr(t)||t===62?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(1,this.index),this.state=11,this.stateBeforeAttrName(t)):(t===39||t===60||t===61||t===96)&&this.cbs.onerr(18,this.index)}stateBeforeDeclaration(t){t===91?(this.state=26,this.sequenceIndex=0):this.state=t===45?25:23}stateInDeclaration(t){(t===62||this.fastForwardTo(62))&&(this.state=1,this.sectionStart=this.index+1)}stateInProcessingInstruction(t){(t===62||this.fastForwardTo(62))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeComment(t){t===45?(this.state=28,this.currentSequence=uo.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=23}stateInSpecialComment(t){(t===62||this.fastForwardTo(62))&&(this.cbs.oncomment(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeSpecialS(t){t===uo.ScriptEnd[3]?this.startSpecial(uo.ScriptEnd,4):t===uo.StyleEnd[3]?this.startSpecial(uo.StyleEnd,4):(this.state=6,this.stateInTagName(t))}stateBeforeSpecialT(t){t===uo.TitleEnd[3]?this.startSpecial(uo.TitleEnd,4):t===uo.TextareaEnd[3]?this.startSpecial(uo.TextareaEnd,4):(this.state=6,this.stateInTagName(t))}startEntity(){}stateInEntity(){}parse(t){for(this.buffer=t;this.index<this.buffer.length;){const n=this.buffer.charCodeAt(this.index);switch(n===10&&this.newlines.push(this.index),this.state){case 1:{this.stateText(n);break}case 2:{this.stateInterpolationOpen(n);break}case 3:{this.stateInterpolation(n);break}case 4:{this.stateInterpolationClose(n);break}case 31:{this.stateSpecialStartSequence(n);break}case 32:{this.stateInRCDATA(n);break}case 26:{this.stateCDATASequence(n);break}case 19:{this.stateInAttrValueDoubleQuotes(n);break}case 12:{this.stateInAttrName(n);break}case 13:{this.stateInDirName(n);break}case 14:{this.stateInDirArg(n);break}case 15:{this.stateInDynamicDirArg(n);break}case 16:{this.stateInDirModifier(n);break}case 28:{this.stateInCommentLike(n);break}case 27:{this.stateInSpecialComment(n);break}case 11:{this.stateBeforeAttrName(n);break}case 6:{this.stateInTagName(n);break}case 34:{this.stateInSFCRootTagName(n);break}case 9:{this.stateInClosingTagName(n);break}case 5:{this.stateBeforeTagName(n);break}case 17:{this.stateAfterAttrName(n);break}case 20:{this.stateInAttrValueSingleQuotes(n);break}case 18:{this.stateBeforeAttrValue(n);break}case 8:{this.stateBeforeClosingTagName(n);break}case 10:{this.stateAfterClosingTagName(n);break}case 29:{this.stateBeforeSpecialS(n);break}case 30:{this.stateBeforeSpecialT(n);break}case 21:{this.stateInAttrValueNoQuotes(n);break}case 7:{this.stateInSelfClosingTag(n);break}case 23:{this.stateInDeclaration(n);break}case 22:{this.stateBeforeDeclaration(n);break}case 25:{this.stateBeforeComment(n);break}case 24:{this.stateInProcessingInstruction(n);break}case 33:{this.stateInEntity();break}}this.index++}this.cleanup(),this.finish()}cleanup(){this.sectionStart!==this.index&&(this.state===1||this.state===32&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===19||this.state===20||this.state===21)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}finish(){this.handleTrailingData(),this.cbs.onend()}handleTrailingData(){const t=this.buffer.length;this.sectionStart>=t||(this.state===28?this.currentSequence===uo.CdataEnd?this.cbs.oncdata(this.sectionStart,t):this.cbs.oncomment(this.sectionStart,t):this.state===6||this.state===11||this.state===18||this.state===17||this.state===12||this.state===13||this.state===14||this.state===15||this.state===16||this.state===20||this.state===19||this.state===21||this.state===9||this.cbs.ontext(this.sectionStart,t))}emitCodePoint(t,n){}}function q4(e,{compatConfig:t}){const n=t&&t[e];return e==="MODE"?n||3:n}function Ka(e,t){const n=q4("MODE",t),o=q4(e,t);return n===3?o===!0:o!==!1}function kp(e,t,n,...o){return Ka(e,t)}function U3(e){throw e}function E7(e){}function vn(e,t,n,o){const r=`https://vuejs.org/error-reference/#compiler-${e}`,s=new SyntaxError(String(r));return s.code=e,s.loc=t,s}const Ho=e=>e.type===4&&e.isStatic;function x7(e){switch(e){case"Teleport":case"teleport":return Ff;case"Suspense":case"suspense":return T3;case"KeepAlive":case"keep-alive":return _g;case"BaseTransition":case"base-transition":return _7}}const qF=/^\d|[^\$\w]/,W3=e=>!qF.test(e),GF=/[A-Za-z_$\xA0-\uFFFF]/,YF=/[\.\?\w$\xA0-\uFFFF]/,ZF=/\s+[.[]\s*|\s*[.[]\s+/g,JF=e=>{e=e.trim().replace(ZF,i=>i.trim());let t=0,n=[],o=0,r=0,s=null;for(let i=0;i<e.length;i++){const l=e.charAt(i);switch(t){case 0:if(l==="[")n.push(t),t=1,o++;else if(l==="(")n.push(t),t=2,r++;else if(!(i===0?GF:YF).test(l))return!1;break;case 1:l==="'"||l==='"'||l==="`"?(n.push(t),t=3,s=l):l==="["?o++:l==="]"&&(--o||(t=n.pop()));break;case 2:if(l==="'"||l==='"'||l==="`")n.push(t),t=3,s=l;else if(l==="(")r++;else if(l===")"){if(i===e.length-1)return!1;--r||(t=n.pop())}break;case 3:l===s&&(t=n.pop(),s=null);break}}return!o&&!r},T7=JF;function ns(e,t,n=!1){for(let o=0;o<e.props.length;o++){const r=e.props[o];if(r.type===7&&(n||r.exp)&&(tt(t)?r.name===t:t.test(r.name)))return r}}function x0(e,t,n=!1,o=!1){for(let r=0;r<e.props.length;r++){const s=e.props[r];if(s.type===6){if(n)continue;if(s.name===t&&(s.value||o))return s}else if(s.name==="bind"&&(s.exp||o)&&Aa(s.arg,t))return s}}function Aa(e,t){return!!(e&&Ho(e)&&e.content===t)}function XF(e){return e.props.some(t=>t.type===7&&t.name==="bind"&&(!t.arg||t.arg.type!==4||!t.arg.isStatic))}function Gv(e){return e.type===5||e.type===2}function QF(e){return e.type===7&&e.name==="slot"}function kg(e){return e.type===1&&e.tagType===3}function Sg(e){return e.type===1&&e.tagType===2}const eB=new Set([wp,th]);function M7(e,t=[]){if(e&&!tt(e)&&e.type===14){const n=e.callee;if(!tt(n)&&eB.has(n))return M7(e.arguments[0],t.concat(e))}return[e,t]}function $g(e,t,n){let o,r=e.type===13?e.props:e.arguments[2],s=[],i;if(r&&!tt(r)&&r.type===14){const l=M7(r);r=l[0],s=l[1],i=s[s.length-1]}if(r==null||tt(r))o=Ir([t]);else if(r.type===14){const l=r.arguments[0];!tt(l)&&l.type===15?G4(t,l)||l.properties.unshift(t):r.callee===B3?o=jn(n.helper(bg),[Ir([t]),r]):r.arguments.unshift(Ir([t])),!o&&(o=r)}else r.type===15?(G4(t,r)||r.properties.unshift(t),o=r):(o=jn(n.helper(bg),[Ir([t]),r]),i&&i.callee===th&&(i=s[s.length-2]));e.type===13?i?i.arguments[0]=o:e.props=o:i?i.arguments[0]=o:e.arguments[2]=o}function G4(e,t){let n=!1;if(e.key.type===4){const o=e.key.content;n=t.properties.some(r=>r.key.type===4&&r.key.content===o)}return n}function Sp(e,t){return`_${t}_${e.replace(/[^\w]/g,(n,o)=>n==="-"?"_":e.charCodeAt(o).toString())}`}function tB(e){return e.type===14&&e.callee===j3?e.arguments[1].returns:e}const nB=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,O7={parseMode:"base",ns:0,delimiters:["{{","}}"],getNamespace:()=>0,isVoidTag:Bm,isPreTag:Bm,isCustomElement:Bm,onError:U3,onWarn:E7,comments:!1,prefixIdentifiers:!1};let Gt=O7,$p=null,Mi="",po=null,Ft=null,Do="",hi=-1,_a=-1,Eg=0,yl=!1,D_=null;const Cn=[],Sn=new KF(Cn,{onerr:ui,ontext(e,t){im(eo(e,t),e,t)},ontextentity(e,t,n){im(e,t,n)},oninterpolation(e,t){if(yl)return im(eo(e,t),e,t);let n=e+Sn.delimiterOpen.length,o=t-Sn.delimiterClose.length;for(;lr(Mi.charCodeAt(n));)n++;for(;lr(Mi.charCodeAt(o-1));)o--;let r=eo(n,o);r.includes("&")&&(r=Gt.decodeEntities(r,!1)),V_({type:5,content:Km(r,!1,zn(n,o)),loc:zn(e,t)})},onopentagname(e,t){const n=eo(e,t);po={type:1,tag:n,ns:Gt.getNamespace(n,Cn[0],Gt.ns),tagType:0,props:[],children:[],loc:zn(e-1,t),codegenNode:void 0}},onopentagend(e){Z4(e)},onclosetag(e,t){const n=eo(e,t);if(!Gt.isVoidTag(n)){let o=!1;for(let r=0;r<Cn.length;r++)if(Cn[r].tag.toLowerCase()===n.toLowerCase()){o=!0,r>0&&ui(24,Cn[0].loc.start.offset);for(let i=0;i<=r;i++){const l=Cn.shift();Wm(l,t,i<r)}break}o||ui(23,I7(e,60))}},onselfclosingtag(e){var t;const n=po.tag;po.isSelfClosing=!0,Z4(e),((t=Cn[0])==null?void 0:t.tag)===n&&Wm(Cn.shift(),e)},onattribname(e,t){Ft={type:6,name:eo(e,t),nameLoc:zn(e,t),value:void 0,loc:zn(e)}},ondirname(e,t){const n=eo(e,t),o=n==="."||n===":"?"bind":n==="@"?"on":n==="#"?"slot":n.slice(2);if(!yl&&o===""&&ui(26,e),yl||o==="")Ft={type:6,name:n,nameLoc:zn(e,t),value:void 0,loc:zn(e)};else if(Ft={type:7,name:o,rawName:n,exp:void 0,arg:void 0,modifiers:n==="."?["prop"]:[],loc:zn(e)},o==="pre"){yl=Sn.inVPre=!0,D_=po;const r=po.props;for(let s=0;s<r.length;s++)r[s].type===7&&(r[s]=fB(r[s]))}},ondirarg(e,t){if(e===t)return;const n=eo(e,t);if(yl)Ft.name+=n,Na(Ft.nameLoc,t);else{const o=n[0]!=="[";Ft.arg=Km(o?n:n.slice(1,-1),o,zn(e,t),o?3:0)}},ondirmodifier(e,t){const n=eo(e,t);if(yl)Ft.name+="."+n,Na(Ft.nameLoc,t);else if(Ft.name==="slot"){const o=Ft.arg;o&&(o.content+="."+n,Na(o.loc,t))}else Ft.modifiers.push(n)},onattribdata(e,t){Do+=eo(e,t),hi<0&&(hi=e),_a=t},onattribentity(e,t,n){Do+=e,hi<0&&(hi=t),_a=n},onattribnameend(e){const t=Ft.loc.start.offset,n=eo(t,e);Ft.type===7&&(Ft.rawName=n),po.props.some(o=>(o.type===7?o.rawName:o.name)===n)&&ui(2,t)},onattribend(e,t){if(po&&Ft){if(Na(Ft.loc,t),e!==0)if(Do.includes("&")&&(Do=Gt.decodeEntities(Do,!0)),Ft.type===6)Ft.name==="class"&&(Do=N7(Do).trim()),e===1&&!Do&&ui(13,t),Ft.value={type:2,content:Do,loc:e===1?zn(hi,_a):zn(hi-1,_a+1)},Sn.inSFCRoot&&po.tag==="template"&&Ft.name==="lang"&&Do&&Do!=="html"&&Sn.enterRCDATA(Cg("</template"),0);else{let n=0;Ft.exp=Km(Do,!1,zn(hi,_a),0,n),Ft.name==="for"&&(Ft.forParseResult=rB(Ft.exp));let o=-1;Ft.name==="bind"&&(o=Ft.modifiers.indexOf("sync"))>-1&&kp("COMPILER_V_BIND_SYNC",Gt,Ft.loc,Ft.rawName)&&(Ft.name="model",Ft.modifiers.splice(o,1))}(Ft.type!==7||Ft.name!=="pre")&&po.props.push(Ft)}Do="",hi=_a=-1},oncomment(e,t){Gt.comments&&V_({type:3,content:eo(e,t),loc:zn(e-4,t+3)})},onend(){const e=Mi.length;for(let t=0;t<Cn.length;t++)Wm(Cn[t],e-1),ui(24,Cn[t].loc.start.offset)},oncdata(e,t){Cn[0].ns!==0?im(eo(e,t),e,t):ui(1,e-9)},onprocessinginstruction(e){(Cn[0]?Cn[0].ns:Gt.ns)===0&&ui(21,e-1)}}),Y4=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,oB=/^\(|\)$/g;function rB(e){const t=e.loc,n=e.content,o=n.match(nB);if(!o)return;const[,r,s]=o,i=(d,f,p=!1)=>{const h=t.start.offset+f,m=h+d.length;return Km(d,!1,zn(h,m),0,p?1:0)},l={source:i(s.trim(),n.indexOf(s,r.length)),value:void 0,key:void 0,index:void 0,finalized:!1};let a=r.trim().replace(oB,"").trim();const u=r.indexOf(a),c=a.match(Y4);if(c){a=a.replace(Y4,"").trim();const d=c[1].trim();let f;if(d&&(f=n.indexOf(d,u+a.length),l.key=i(d,f,!0)),c[2]){const p=c[2].trim();p&&(l.index=i(p,n.indexOf(p,l.key?f+d.length:u+a.length),!0))}}return a&&(l.value=i(a,u,!0)),l}function eo(e,t){return Mi.slice(e,t)}function Z4(e){Sn.inSFCRoot&&(po.innerLoc=zn(e+1,e+1)),V_(po);const{tag:t,ns:n}=po;n===0&&Gt.isPreTag(t)&&Eg++,Gt.isVoidTag(t)?Wm(po,e):(Cn.unshift(po),(n===1||n===2)&&(Sn.inXML=!0)),po=null}function im(e,t,n){var o;{const i=(o=Cn[0])==null?void 0:o.tag;i!=="script"&&i!=="style"&&e.includes("&")&&(e=Gt.decodeEntities(e,!1))}const r=Cn[0]||$p,s=r.children[r.children.length-1];(s==null?void 0:s.type)===2?(s.content+=e,Na(s.loc,n)):r.children.push({type:2,content:e,loc:zn(t,n)})}function Wm(e,t,n=!1){n?Na(e.loc,I7(t,60)):Na(e.loc,sB(t,62)+1),Sn.inSFCRoot&&(e.children.length?e.innerLoc.end=zt({},e.children[e.children.length-1].loc.end):e.innerLoc.end=zt({},e.innerLoc.start),e.innerLoc.source=eo(e.innerLoc.start.offset,e.innerLoc.end.offset));const{tag:o,ns:r}=e;yl||(o==="slot"?e.tagType=2:J4(e)?e.tagType=3:lB(e)&&(e.tagType=1)),Sn.inRCDATA||(e.children=A7(e.children,e.tag)),r===0&&Gt.isPreTag(o)&&Eg--,D_===e&&(yl=Sn.inVPre=!1,D_=null),Sn.inXML&&(Cn[0]?Cn[0].ns:Gt.ns)===0&&(Sn.inXML=!1);{const s=e.props;if(!Sn.inSFCRoot&&Ka("COMPILER_NATIVE_TEMPLATE",Gt)&&e.tag==="template"&&!J4(e)){const l=Cn[0]||$p,a=l.children.indexOf(e);l.children.splice(a,1,...e.children)}const i=s.find(l=>l.type===6&&l.name==="inline-template");i&&kp("COMPILER_INLINE_TEMPLATE",Gt,i.loc)&&e.children.length&&(i.value={type:2,content:eo(e.children[0].loc.start.offset,e.children[e.children.length-1].loc.end.offset),loc:i.loc})}}function sB(e,t){let n=e;for(;Mi.charCodeAt(n)!==t&&n<Mi.length-1;)n++;return n}function I7(e,t){let n=e;for(;Mi.charCodeAt(n)!==t&&n>=0;)n--;return n}const iB=new Set(["if","else","else-if","for","slot"]);function J4({tag:e,props:t}){if(e==="template"){for(let n=0;n<t.length;n++)if(t[n].type===7&&iB.has(t[n].name))return!0}return!1}function lB({tag:e,props:t}){var n;if(Gt.isCustomElement(e))return!1;if(e==="component"||aB(e.charCodeAt(0))||x7(e)||(n=Gt.isBuiltInComponent)!=null&&n.call(Gt,e)||Gt.isNativeTag&&!Gt.isNativeTag(e))return!0;for(let o=0;o<t.length;o++){const r=t[o];if(r.type===6){if(r.name==="is"&&r.value){if(r.value.content.startsWith("vue:"))return!0;if(kp("COMPILER_IS_ON_ELEMENT",Gt,r.loc))return!0}}else if(r.name==="bind"&&Aa(r.arg,"is")&&kp("COMPILER_IS_ON_ELEMENT",Gt,r.loc))return!0}return!1}function aB(e){return e>64&&e<91}const uB=/\r\n/g;function A7(e,t){var n,o;const r=Gt.whitespace!=="preserve";let s=!1;for(let i=0;i<e.length;i++){const l=e[i];if(l.type===2)if(Eg)l.content=l.content.replace(uB,` |
| 22 |
`);else if(cB(l.content)){const a=(n=e[i-1])==null?void 0:n.type,u=(o=e[i+1])==null?void 0:o.type;!a||!u||r&&(a===3&&(u===3||u===1)||a===1&&(u===3||u===1&&dB(l.content)))?(s=!0,e[i]=null):l.content=" "}else r&&(l.content=N7(l.content))}if(Eg&&t&&Gt.isPreTag(t)){const i=e[0];i&&i.type===2&&(i.content=i.content.replace(/^\r?\n/,""))}return s?e.filter(Boolean):e}function cB(e){for(let t=0;t<e.length;t++)if(!lr(e.charCodeAt(t)))return!1;return!0}function dB(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n===10||n===13)return!0}return!1}function N7(e){let t="",n=!1;for(let o=0;o<e.length;o++)lr(e.charCodeAt(o))?n||(t+=" ",n=!0):(t+=e[o],n=!1);return t}function V_(e){(Cn[0]||$p).children.push(e)}function zn(e,t){return{start:Sn.getPos(e),end:t==null?t:Sn.getPos(t),source:t==null?t:eo(e,t)}}function Na(e,t){e.end=Sn.getPos(t),e.source=eo(e.start.offset,t)}function fB(e){const t={type:6,name:e.rawName,nameLoc:zn(e.loc.start.offset,e.loc.start.offset+e.rawName.length),value:void 0,loc:e.loc};if(e.exp){const n=e.exp.loc;n.end.offset<e.loc.end.offset&&(n.start.offset--,n.start.column--,n.end.offset++,n.end.column++),t.value={type:2,content:e.exp.content,loc:n}}return t}function Km(e,t=!1,n,o=0,r=0){return St(e,t,n,o)}function ui(e,t,n){Gt.onError(vn(e,zn(t,t)))}function pB(){Sn.reset(),po=null,Ft=null,Do="",hi=-1,_a=-1,Cn.length=0}function hB(e,t){if(pB(),Mi=e,Gt=zt({},O7),t){let r;for(r in t)t[r]!=null&&(Gt[r]=t[r])}Sn.mode=Gt.parseMode==="html"?1:Gt.parseMode==="sfc"?2:0,Sn.inXML=Gt.ns===1||Gt.ns===2;const n=t==null?void 0:t.delimiters;n&&(Sn.delimiterOpen=Cg(n[0]),Sn.delimiterClose=Cg(n[1]));const o=$p=HF([],e);return Sn.parse(Mi),o.loc=zn(0,e.length),o.children=A7(o.children),$p=null,o}function mB(e,t){qm(e,t,P7(e,e.children[0]))}function P7(e,t){const{children:n}=e;return n.length===1&&t.type===1&&!Sg(t)}function qm(e,t,n=!1){const{children:o}=e,r=o.length;let s=0;for(let i=0;i<o.length;i++){const l=o[i];if(l.type===1&&l.tagType===0){const a=n?0:Ar(l,t);if(a>0){if(a>=2){l.codegenNode.patchFlag="-1",l.codegenNode=t.hoist(l.codegenNode),s++;continue}}else{const u=l.codegenNode;if(u.type===13){const c=V7(u);if((!c||c===512||c===1)&&R7(l,t)>=2){const d=D7(l);d&&(u.props=t.hoist(d))}u.dynamicProps&&(u.dynamicProps=t.hoist(u.dynamicProps))}}}if(l.type===1){const a=l.tagType===1;a&&t.scopes.vSlot++,qm(l,t),a&&t.scopes.vSlot--}else if(l.type===11)qm(l,t,l.children.length===1);else if(l.type===9)for(let a=0;a<l.branches.length;a++)qm(l.branches[a],t,l.branches[a].children.length===1)}if(s&&t.transformHoist&&t.transformHoist(o,t,e),s&&s===r&&e.type===1&&e.tagType===0&&e.codegenNode&&e.codegenNode.type===13&&Te(e.codegenNode.children)){const i=t.hoist(nh(e.codegenNode.children));t.hmr&&(i.content=`[...${i.content}]`),e.codegenNode.children=i}}function Ar(e,t){const{constantCache:n}=t;switch(e.type){case 1:if(e.tagType!==0)return 0;const o=n.get(e);if(o!==void 0)return o;const r=e.codegenNode;if(r.type!==13||r.isBlock&&e.tag!=="svg"&&e.tag!=="foreignObject")return 0;if(V7(r))return n.set(e,0),0;{let l=3;const a=R7(e,t);if(a===0)return n.set(e,0),0;a<l&&(l=a);for(let u=0;u<e.children.length;u++){const c=Ar(e.children[u],t);if(c===0)return n.set(e,0),0;c<l&&(l=c)}if(l>1)for(let u=0;u<e.props.length;u++){const c=e.props[u];if(c.type===7&&c.name==="bind"&&c.exp){const d=Ar(c.exp,t);if(d===0)return n.set(e,0),0;d<l&&(l=d)}}if(r.isBlock){for(let u=0;u<e.props.length;u++)if(e.props[u].type===7)return n.set(e,0),0;t.removeHelper(lu),t.removeHelper(Wc(t.inSSR,r.isComponent)),r.isBlock=!1,t.helper(Uc(t.inSSR,r.isComponent))}return n.set(e,l),l}case 2:case 3:return 3;case 9:case 11:case 10:return 0;case 5:case 12:return Ar(e.content,t);case 4:return e.constType;case 8:let i=3;for(let l=0;l<e.children.length;l++){const a=e.children[l];if(tt(a)||Vr(a))continue;const u=Ar(a,t);if(u===0)return 0;u<i&&(i=u)}return i;default:return 0}}const gB=new Set([V3,F3,wp,th]);function L7(e,t){if(e.type===14&&!tt(e.callee)&&gB.has(e.callee)){const n=e.arguments[0];if(n.type===4)return Ar(n,t);if(n.type===14)return L7(n,t)}return 0}function R7(e,t){let n=3;const o=D7(e);if(o&&o.type===15){const{properties:r}=o;for(let s=0;s<r.length;s++){const{key:i,value:l}=r[s],a=Ar(i,t);if(a===0)return a;a<n&&(n=a);let u;if(l.type===4?u=Ar(l,t):l.type===14?u=L7(l,t):u=0,u===0)return u;u<n&&(n=u)}}return n}function D7(e){const t=e.codegenNode;if(t.type===13)return t.props}function V7(e){const t=e.patchFlag;return t?parseInt(t,10):void 0}function vB(e,{filename:t="",prefixIdentifiers:n=!1,hoistStatic:o=!1,hmr:r=!1,cacheHandlers:s=!1,nodeTransforms:i=[],directiveTransforms:l={},transformHoist:a=null,isBuiltInComponent:u=yt,isCustomElement:c=yt,expressionPlugins:d=[],scopeId:f=null,slotted:p=!0,ssr:h=!1,inSSR:m=!1,ssrCssVars:y="",bindingMetadata:v=Wt,inline:k=!1,isTS:b=!1,onError:$=U3,onWarn:x=E7,compatConfig:E}){const M=t.replace(/\?.*$/,"").match(/([^/\\]+)\.\w+$/),N={filename:t,selfName:M&&Gl(yn(M[1])),prefixIdentifiers:n,hoistStatic:o,hmr:r,cacheHandlers:s,nodeTransforms:i,directiveTransforms:l,transformHoist:a,isBuiltInComponent:u,isCustomElement:c,expressionPlugins:d,scopeId:f,slotted:p,ssr:h,inSSR:m,ssrCssVars:y,bindingMetadata:v,inline:k,isTS:b,onError:$,onWarn:x,compatConfig:E,root:e,helpers:new Map,components:new Set,directives:new Set,hoists:[],imports:[],constantCache:new WeakMap,temps:0,cached:0,identifiers:Object.create(null),scopes:{vFor:0,vSlot:0,vPre:0,vOnce:0},parent:null,currentNode:e,childIndex:0,inVOnce:!1,helper(P){const I=N.helpers.get(P)||0;return N.helpers.set(P,I+1),P},removeHelper(P){const I=N.helpers.get(P);if(I){const V=I-1;V?N.helpers.set(P,V):N.helpers.delete(P)}},helperString(P){return`_${jc[N.helper(P)]}`},replaceNode(P){N.parent.children[N.childIndex]=N.currentNode=P},removeNode(P){const I=N.parent.children,V=P?I.indexOf(P):N.currentNode?N.childIndex:-1;!P||P===N.currentNode?(N.currentNode=null,N.onNodeRemoved()):N.childIndex>V&&(N.childIndex--,N.onNodeRemoved()),N.parent.children.splice(V,1)},onNodeRemoved:yt,addIdentifiers(P){},removeIdentifiers(P){},hoist(P){tt(P)&&(P=St(P)),N.hoists.push(P);const I=St(`_hoisted_${N.hoists.length}`,!1,P.loc,2);return I.hoisted=P,I},cache(P,I=!1){return UF(N.cached++,P,I)}};return N.filters=new Set,N}function yB(e,t){const n=vB(e,t);T0(e,n),t.hoistStatic&&mB(e,n),t.ssr||_B(e,n),e.helpers=new Set([...n.helpers.keys()]),e.components=[...n.components],e.directives=[...n.directives],e.imports=n.imports,e.hoists=n.hoists,e.temps=n.temps,e.cached=n.cached,e.transformed=!0,e.filters=[...n.filters]}function _B(e,t){const{helper:n}=t,{children:o}=e;if(o.length===1){const r=o[0];if(P7(e,r)&&r.codegenNode){const s=r.codegenNode;s.type===13&&H3(s,t),e.codegenNode=s}else e.codegenNode=r}else if(o.length>1){let r=64;e.codegenNode=Cp(t,n(bp),void 0,e.children,r+"",void 0,void 0,!0,void 0,!1)}}function bB(e,t){let n=0;const o=()=>{n--};for(;n<e.children.length;n++){const r=e.children[n];tt(r)||(t.parent=e,t.childIndex=n,t.onNodeRemoved=o,T0(r,t))}}function T0(e,t){t.currentNode=e;const{nodeTransforms:n}=t,o=[];for(let s=0;s<n.length;s++){const i=n[s](e,t);if(i&&(Te(i)?o.push(...i):o.push(i)),t.currentNode)e=t.currentNode;else return}switch(e.type){case 3:t.ssr||t.helper(eh);break;case 5:t.ssr||t.helper(E0);break;case 9:for(let s=0;s<e.branches.length;s++)T0(e.branches[s],t);break;case 10:case 11:case 1:case 0:bB(e,t);break}t.currentNode=e;let r=o.length;for(;r--;)o[r]()}function F7(e,t){const n=tt(e)?o=>o===e:o=>e.test(o);return(o,r)=>{if(o.type===1){const{props:s}=o;if(o.tagType===3&&s.some(QF))return;const i=[];for(let l=0;l<s.length;l++){const a=s[l];if(a.type===7&&n(a.name)){s.splice(l,1),l--;const u=t(o,a,r);u&&i.push(u)}}return i}}}const M0="/*#__PURE__*/",B7=e=>`${jc[e]}: _${jc[e]}`;function wB(e,{mode:t="function",prefixIdentifiers:n=t==="module",sourceMap:o=!1,filename:r="template.vue.html",scopeId:s=null,optimizeImports:i=!1,runtimeGlobalName:l="Vue",runtimeModuleName:a="vue",ssrRuntimeModuleName:u="vue/server-renderer",ssr:c=!1,isTS:d=!1,inSSR:f=!1}){const p={mode:t,prefixIdentifiers:n,sourceMap:o,filename:r,scopeId:s,optimizeImports:i,runtimeGlobalName:l,runtimeModuleName:a,ssrRuntimeModuleName:u,ssr:c,isTS:d,inSSR:f,source:e.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper(m){return`_${jc[m]}`},push(m,y=-2,v){p.code+=m},indent(){h(++p.indentLevel)},deindent(m=!1){m?--p.indentLevel:h(--p.indentLevel)},newline(){h(p.indentLevel)}};function h(m){p.push(` |
| 23 |
`+" ".repeat(m),0)}return p}function CB(e,t={}){const n=wB(e,t);t.onContextCreated&&t.onContextCreated(n);const{mode:o,push:r,prefixIdentifiers:s,indent:i,deindent:l,newline:a,scopeId:u,ssr:c}=n,d=Array.from(e.helpers),f=d.length>0,p=!s&&o!=="module";kB(e,n);const m=c?"ssrRender":"render",v=(c?["_ctx","_push","_parent","_attrs"]:["_ctx","_cache"]).join(", ");if(r(`function ${m}(${v}) {`),i(),p&&(r("with (_ctx) {"),i(),f&&(r(`const { ${d.map(B7).join(", ")} } = _Vue |
| 24 |
`,-1),a())),e.components.length&&(Yv(e.components,"component",n),(e.directives.length||e.temps>0)&&a()),e.directives.length&&(Yv(e.directives,"directive",n),e.temps>0&&a()),e.filters&&e.filters.length&&(a(),Yv(e.filters,"filter",n),a()),e.temps>0){r("let ");for(let k=0;k<e.temps;k++)r(`${k>0?", ":""}_temp${k}`)}return(e.components.length||e.directives.length||e.temps)&&(r(` |
| 25 |
`,0),a()),c||r("return "),e.codegenNode?go(e.codegenNode,n):r("null"),p&&(l(),r("}")),l(),r("}"),{ast:e,code:n.code,preamble:"",map:n.map?n.map.toJSON():void 0}}function kB(e,t){const{ssr:n,prefixIdentifiers:o,push:r,newline:s,runtimeModuleName:i,runtimeGlobalName:l,ssrRuntimeModuleName:a}=t,u=l,c=Array.from(e.helpers);if(c.length>0&&(r(`const _Vue = ${u} |
| 26 |
`,-1),e.hoists.length)){const d=[M3,O3,eh,I3,C7].filter(f=>c.includes(f)).map(B7).join(", ");r(`const { ${d} } = _Vue |
| 27 |
`,-1)}SB(e.hoists,t),s(),r("return ")}function Yv(e,t,{helper:n,push:o,newline:r,isTS:s}){const i=n(t==="filter"?L3:t==="component"?A3:P3);for(let l=0;l<e.length;l++){let a=e[l];const u=a.endsWith("__self");u&&(a=a.slice(0,-6)),o(`const ${Sp(a,t)} = ${i}(${JSON.stringify(a)}${u?", true":""})${s?"!":""}`),l<e.length-1&&r()}}function SB(e,t){if(!e.length)return;t.pure=!0;const{push:n,newline:o,helper:r,scopeId:s,mode:i}=t;o();for(let l=0;l<e.length;l++){const a=e[l];a&&(n(`const _hoisted_${l+1} = `),go(a,t),o())}t.pure=!1}function K3(e,t){const n=e.length>3||!1;t.push("["),n&&t.indent(),oh(e,t,n),n&&t.deindent(),t.push("]")}function oh(e,t,n=!1,o=!0){const{push:r,newline:s}=t;for(let i=0;i<e.length;i++){const l=e[i];tt(l)?r(l,-3):Te(l)?K3(l,t):go(l,t),i<e.length-1&&(n?(o&&r(","),s()):o&&r(", "))}}function go(e,t){if(tt(e)){t.push(e,-3);return}if(Vr(e)){t.push(t.helper(e));return}switch(e.type){case 1:case 9:case 11:go(e.codegenNode,t);break;case 2:$B(e,t);break;case 4:z7(e,t);break;case 5:EB(e,t);break;case 12:go(e.codegenNode,t);break;case 8:j7(e,t);break;case 3:TB(e,t);break;case 13:MB(e,t);break;case 14:IB(e,t);break;case 15:AB(e,t);break;case 17:NB(e,t);break;case 18:PB(e,t);break;case 19:LB(e,t);break;case 20:RB(e,t);break;case 21:oh(e.body,t,!0,!1);break}}function $B(e,t){t.push(JSON.stringify(e.content),-3,e)}function z7(e,t){const{content:n,isStatic:o}=e;t.push(o?JSON.stringify(n):n,-3,e)}function EB(e,t){const{push:n,helper:o,pure:r}=t;r&&n(M0),n(`${o(E0)}(`),go(e.content,t),n(")")}function j7(e,t){for(let n=0;n<e.children.length;n++){const o=e.children[n];tt(o)?t.push(o,-3):go(o,t)}}function xB(e,t){const{push:n}=t;if(e.type===8)n("["),j7(e,t),n("]");else if(e.isStatic){const o=W3(e.content)?e.content:JSON.stringify(e.content);n(o,-2,e)}else n(`[${e.content}]`,-3,e)}function TB(e,t){const{push:n,helper:o,pure:r}=t;r&&n(M0),n(`${o(eh)}(${JSON.stringify(e.content)})`,-3,e)}function MB(e,t){const{push:n,helper:o,pure:r}=t,{tag:s,props:i,children:l,patchFlag:a,dynamicProps:u,directives:c,isBlock:d,disableTracking:f,isComponent:p}=e;c&&n(o(R3)+"("),d&&n(`(${o(lu)}(${f?"true":""}), `),r&&n(M0);const h=d?Wc(t.inSSR,p):Uc(t.inSSR,p);n(o(h)+"(",-2,e),oh(OB([s,i,l,a,u]),t),n(")"),d&&n(")"),c&&(n(", "),go(c,t),n(")"))}function OB(e){let t=e.length;for(;t--&&e[t]==null;);return e.slice(0,t+1).map(n=>n||"null")}function IB(e,t){const{push:n,helper:o,pure:r}=t,s=tt(e.callee)?e.callee:o(e.callee);r&&n(M0),n(s+"(",-2,e),oh(e.arguments,t),n(")")}function AB(e,t){const{push:n,indent:o,deindent:r,newline:s}=t,{properties:i}=e;if(!i.length){n("{}",-2,e);return}const l=i.length>1||!1;n(l?"{":"{ "),l&&o();for(let a=0;a<i.length;a++){const{key:u,value:c}=i[a];xB(u,t),n(": "),go(c,t),a<i.length-1&&(n(","),s())}l&&r(),n(l?"}":" }")}function NB(e,t){K3(e.elements,t)}function PB(e,t){const{push:n,indent:o,deindent:r}=t,{params:s,returns:i,body:l,newline:a,isSlot:u}=e;u&&n(`_${jc[z3]}(`),n("(",-2,e),Te(s)?oh(s,t):s&&go(s,t),n(") => "),(a||l)&&(n("{"),o()),i?(a&&n("return "),Te(i)?K3(i,t):go(i,t)):l&&go(l,t),(a||l)&&(r(),n("}")),u&&(e.isNonScopedSlot&&n(", undefined, true"),n(")"))}function LB(e,t){const{test:n,consequent:o,alternate:r,newline:s}=e,{push:i,indent:l,deindent:a,newline:u}=t;if(n.type===4){const d=!W3(n.content);d&&i("("),z7(n,t),d&&i(")")}else i("("),go(n,t),i(")");s&&l(),t.indentLevel++,s||i(" "),i("? "),go(o,t),t.indentLevel--,s&&u(),s||i(" "),i(": ");const c=r.type===19;c||t.indentLevel++,go(r,t),c||t.indentLevel--,s&&a(!0)}function RB(e,t){const{push:n,helper:o,indent:r,deindent:s,newline:i}=t;n(`_cache[${e.index}] || (`),e.isVNode&&(r(),n(`${o(wg)}(-1),`),i()),n(`_cache[${e.index}] = `),go(e.value,t),e.isVNode&&(n(","),i(),n(`${o(wg)}(1),`),i(),n(`_cache[${e.index}]`),s()),n(")")}new RegExp("\\b"+"arguments,await,break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,let,new,return,super,switch,throw,try,var,void,while,with,yield".split(",").join("\\b|\\b")+"\\b");const DB=F7(/^(if|else|else-if)$/,(e,t,n)=>VB(e,t,n,(o,r,s)=>{const i=n.parent.children;let l=i.indexOf(o),a=0;for(;l-->=0;){const u=i[l];u&&u.type===9&&(a+=u.branches.length)}return()=>{if(s)o.codegenNode=Q4(r,a,n);else{const u=FB(o.codegenNode);u.alternate=Q4(r,a+o.branches.length-1,n)}}}));function VB(e,t,n,o){if(t.name!=="else"&&(!t.exp||!t.exp.content.trim())){const r=t.exp?t.exp.loc:e.loc;n.onError(vn(28,t.loc)),t.exp=St("true",!1,r)}if(t.name==="if"){const r=X4(e,t),s={type:9,loc:e.loc,branches:[r]};if(n.replaceNode(s),o)return o(s,r,!0)}else{const r=n.parent.children;let s=r.indexOf(e);for(;s-->=-1;){const i=r[s];if(i&&i.type===3){n.removeNode(i);continue}if(i&&i.type===2&&!i.content.trim().length){n.removeNode(i);continue}if(i&&i.type===9){t.name==="else-if"&&i.branches[i.branches.length-1].condition===void 0&&n.onError(vn(30,e.loc)),n.removeNode();const l=X4(e,t);i.branches.push(l);const a=o&&o(i,l,!1);T0(l,n),a&&a(),n.currentNode=null}else n.onError(vn(30,e.loc));break}}}function X4(e,t){const n=e.tagType===3;return{type:10,loc:e.loc,condition:t.name==="else"?void 0:t.exp,children:n&&!ns(e,"for")?e.children:[e],userKey:x0(e,"key"),isTemplateIf:n}}function Q4(e,t,n){return e.condition?R_(e.condition,e6(e,t,n),jn(n.helper(eh),['""',"true"])):e6(e,t,n)}function e6(e,t,n){const{helper:o}=n,r=$n("key",St(`${t}`,!1,br,2)),{children:s}=e,i=s[0];if(s.length!==1||i.type!==1)if(s.length===1&&i.type===11){const a=i.codegenNode;return $g(a,r,n),a}else{let a=64;return Cp(n,o(bp),Ir([r]),s,a+"",void 0,void 0,!0,!1,!1,e.loc)}else{const a=i.codegenNode,u=tB(a);return u.type===13&&H3(u,n),$g(u,r,n),a}}function FB(e){for(;;)if(e.type===19)if(e.alternate.type===19)e=e.alternate;else return e;else e.type===20&&(e=e.value)}const BB=F7("for",(e,t,n)=>{const{helper:o,removeHelper:r}=n;return zB(e,t,n,s=>{const i=jn(o(D3),[s.source]),l=kg(e),a=ns(e,"memo"),u=x0(e,"key"),c=u&&(u.type===6?St(u.value.content,!0):u.exp),d=u?$n("key",c):null,f=s.source.type===4&&s.source.constType>0,p=f?64:u?128:256;return s.codegenNode=Cp(n,o(bp),void 0,i,p+"",void 0,void 0,!0,!f,!1,e.loc),()=>{let h;const{children:m}=s,y=m.length!==1||m[0].type!==1,v=Sg(e)?e:l&&e.children.length===1&&Sg(e.children[0])?e.children[0]:null;if(v?(h=v.codegenNode,l&&d&&$g(h,d,n)):y?h=Cp(n,o(bp),d?Ir([d]):void 0,e.children,"64",void 0,void 0,!0,void 0,!1):(h=m[0].codegenNode,l&&d&&$g(h,d,n),h.isBlock!==!f&&(h.isBlock?(r(lu),r(Wc(n.inSSR,h.isComponent))):r(Uc(n.inSSR,h.isComponent))),h.isBlock=!f,h.isBlock?(o(lu),o(Wc(n.inSSR,h.isComponent))):o(Uc(n.inSSR,h.isComponent))),a){const k=Hc(F_(s.parseResult,[St("_cached")]));k.body=WF([us(["const _memo = (",a.exp,")"]),us(["if (_cached",...c?[" && _cached.key === ",c]:[],` && ${n.helperString($7)}(_cached, _memo)) return _cached`]),us(["const _item = ",h]),St("_item.memo = _memo"),St("return _item")]),i.arguments.push(k,St("_cache"),St(String(n.cached++)))}else i.arguments.push(Hc(F_(s.parseResult),h,!0))}})});function zB(e,t,n,o){if(!t.exp){n.onError(vn(31,t.loc));return}const r=t.forParseResult;if(!r){n.onError(vn(32,t.loc));return}H7(r);const{addIdentifiers:s,removeIdentifiers:i,scopes:l}=n,{source:a,value:u,key:c,index:d}=r,f={type:11,loc:t.loc,source:a,valueAlias:u,keyAlias:c,objectIndexAlias:d,parseResult:r,children:kg(e)?e.children:[e]};n.replaceNode(f),l.vFor++;const p=o&&o(f);return()=>{l.vFor--,p&&p()}}function H7(e,t){e.finalized||(e.finalized=!0)}function F_({value:e,key:t,index:n},o=[]){return jB([e,t,n,...o])}function jB(e){let t=e.length;for(;t--&&!e[t];);return e.slice(0,t+1).map((n,o)=>n||St("_".repeat(o+1),!1))}const t6=St("undefined",!1),HB=(e,t)=>{if(e.type===1&&(e.tagType===1||e.tagType===3)){const n=ns(e,"slot");if(n)return n.exp,t.scopes.vSlot++,()=>{t.scopes.vSlot--}}},UB=(e,t,n,o)=>Hc(e,n,!1,!0,n.length?n[0].loc:o);function WB(e,t,n=UB){t.helper(z3);const{children:o,loc:r}=e,s=[],i=[];let l=t.scopes.vSlot>0||t.scopes.vFor>0;const a=ns(e,"slot",!0);if(a){const{arg:y,exp:v}=a;y&&!Ho(y)&&(l=!0),s.push($n(y||St("default",!0),n(v,void 0,o,r)))}let u=!1,c=!1;const d=[],f=new Set;let p=0;for(let y=0;y<o.length;y++){const v=o[y];let k;if(!kg(v)||!(k=ns(v,"slot",!0))){v.type!==3&&d.push(v);continue}if(a){t.onError(vn(37,k.loc));break}u=!0;const{children:b,loc:$}=v,{arg:x=St("default",!0),exp:E,loc:M}=k;let N;Ho(x)?N=x?x.content:"default":l=!0;const P=ns(v,"for"),I=n(E,P,b,$);let V,F;if(V=ns(v,"if"))l=!0,i.push(R_(V.exp,lm(x,I,p++),t6));else if(F=ns(v,/^else(-if)?$/,!0)){let Y=y,Z;for(;Y--&&(Z=o[Y],Z.type===3););if(Z&&kg(Z)&&ns(Z,"if")){o.splice(y,1),y--;let K=i[i.length-1];for(;K.alternate.type===19;)K=K.alternate;K.alternate=F.exp?R_(F.exp,lm(x,I,p++),t6):lm(x,I,p++)}else t.onError(vn(30,F.loc))}else if(P){l=!0;const Y=P.forParseResult;Y?(H7(Y),i.push(jn(t.helper(D3),[Y.source,Hc(F_(Y),lm(x,I),!0)]))):t.onError(vn(32,P.loc))}else{if(N){if(f.has(N)){t.onError(vn(38,M));continue}f.add(N),N==="default"&&(c=!0)}s.push($n(x,I))}}if(!a){const y=(v,k)=>{const b=n(v,void 0,k,r);return t.compatConfig&&(b.isNonScopedSlot=!0),$n("default",b)};u?d.length&&d.some(v=>U7(v))&&(c?t.onError(vn(39,d[0].loc)):s.push(y(void 0,d))):s.push(y(void 0,o))}const h=l?2:Gm(e.children)?3:1;let m=Ir(s.concat($n("_",St(h+"",!1))),r);return i.length&&(m=jn(t.helper(S7),[m,nh(i)])),{slots:m,hasDynamicSlots:l}}function lm(e,t,n){const o=[$n("name",e),$n("fn",t)];return n!=null&&o.push($n("key",St(String(n),!0))),Ir(o)}function Gm(e){for(let t=0;t<e.length;t++){const n=e[t];switch(n.type){case 1:if(n.tagType===2||Gm(n.children))return!0;break;case 9:if(Gm(n.branches))return!0;break;case 10:case 11:if(Gm(n.children))return!0;break}}return!1}function U7(e){return e.type!==2&&e.type!==12?!0:e.type===2?!!e.content.trim():U7(e.content)}const W7=new WeakMap,KB=(e,t)=>function(){if(e=t.currentNode,!(e.type===1&&(e.tagType===0||e.tagType===1)))return;const{tag:o,props:r}=e,s=e.tagType===1;let i=s?qB(e,t):`"${o}"`;const l=pt(i)&&i.callee===N3;let a,u,c,d=0,f,p,h,m=l||i===Ff||i===T3||!s&&(o==="svg"||o==="foreignObject");if(r.length>0){const y=K7(e,t,void 0,s,l);a=y.props,d=y.patchFlag,p=y.dynamicPropNames;const v=y.directives;h=v&&v.length?nh(v.map(k=>YB(k,t))):void 0,y.shouldUseBlock&&(m=!0)}if(e.children.length>0)if(i===_g&&(m=!0,d|=1024),s&&i!==Ff&&i!==_g){const{slots:v,hasDynamicSlots:k}=WB(e,t);u=v,k&&(d|=1024)}else if(e.children.length===1&&i!==Ff){const v=e.children[0],k=v.type,b=k===5||k===8;b&&Ar(v,t)===0&&(d|=1),b||k===2?u=v:u=e.children}else u=e.children;d!==0&&(c=String(d),p&&p.length&&(f=ZB(p))),e.codegenNode=Cp(t,i,a,u,c,f,h,!!m,!1,s,e.loc)};function qB(e,t,n=!1){let{tag:o}=e;const r=B_(o),s=x0(e,"is",!1,!0);if(s)if(r||Ka("COMPILER_IS_ON_ELEMENT",t)){let l;if(s.type===6?l=s.value&&St(s.value.content,!0):(l=s.exp,l||(l=St("is",!1,s.loc))),l)return jn(t.helper(N3),[l])}else s.type===6&&s.value.content.startsWith("vue:")&&(o=s.value.content.slice(4));const i=x7(o)||t.isBuiltInComponent(o);return i?(n||t.helper(i),i):(t.helper(A3),t.components.add(o),Sp(o,"component"))}function K7(e,t,n=e.props,o,r,s=!1){const{tag:i,loc:l,children:a}=e;let u=[];const c=[],d=[],f=a.length>0;let p=!1,h=0,m=!1,y=!1,v=!1,k=!1,b=!1,$=!1;const x=[],E=P=>{u.length&&(c.push(Ir(n6(u),l)),u=[]),P&&c.push(P)},M=({key:P,value:I})=>{if(Ho(P)){const V=P.content,F=_u(V);if(F&&(!o||r)&&V.toLowerCase()!=="onclick"&&V!=="onUpdate:modelValue"&&!Nl(V)&&(k=!0),F&&Nl(V)&&($=!0),F&&I.type===14&&(I=I.arguments[0]),I.type===20||(I.type===4||I.type===8)&&Ar(I,t)>0)return;V==="ref"?m=!0:V==="class"?y=!0:V==="style"?v=!0:V!=="key"&&!x.includes(V)&&x.push(V),o&&(V==="class"||V==="style")&&!x.includes(V)&&x.push(V)}else b=!0};for(let P=0;P<n.length;P++){const I=n[P];if(I.type===6){const{loc:V,name:F,nameLoc:Y,value:Z}=I;let K=!0;if(F==="ref"&&(m=!0,t.scopes.vFor>0&&u.push($n(St("ref_for",!0),St("true")))),F==="is"&&(B_(i)||Z&&Z.content.startsWith("vue:")||Ka("COMPILER_IS_ON_ELEMENT",t)))continue;u.push($n(St(F,!0,Y),St(Z?Z.content:"",K,Z?Z.loc:V)))}else{const{name:V,arg:F,exp:Y,loc:Z,modifiers:K}=I,U=V==="bind",B=V==="on";if(V==="slot"){o||t.onError(vn(40,Z));continue}if(V==="once"||V==="memo"||V==="is"||U&&Aa(F,"is")&&(B_(i)||Ka("COMPILER_IS_ON_ELEMENT",t))||B&&s)continue;if((U&&Aa(F,"key")||B&&f&&Aa(F,"vue:before-update"))&&(p=!0),U&&Aa(F,"ref")&&t.scopes.vFor>0&&u.push($n(St("ref_for",!0),St("true"))),!F&&(U||B)){if(b=!0,Y)if(U){if(E(),Ka("COMPILER_V_BIND_OBJECT_ORDER",t)){c.unshift(Y);continue}c.push(Y)}else E({type:14,loc:Z,callee:t.helper(B3),arguments:o?[Y]:[Y,"true"]});else t.onError(vn(U?34:35,Z));continue}U&&K.includes("prop")&&(h|=32);const W=t.directiveTransforms[V];if(W){const{props:L,needRuntime:A}=W(I,e,t);!s&&L.forEach(M),B&&F&&!Ho(F)?E(Ir(L,l)):u.push(...L),A&&(d.push(I),Vr(A)&&W7.set(I,A))}else IR(V)||(d.push(I),f&&(p=!0))}}let N;if(c.length?(E(),c.length>1?N=jn(t.helper(bg),c,l):N=c[0]):u.length&&(N=Ir(n6(u),l)),b?h|=16:(y&&!o&&(h|=2),v&&!o&&(h|=4),x.length&&(h|=8),k&&(h|=32)),!p&&(h===0||h===32)&&(m||$||d.length>0)&&(h|=512),!t.inSSR&&N)switch(N.type){case 15:let P=-1,I=-1,V=!1;for(let Z=0;Z<N.properties.length;Z++){const K=N.properties[Z].key;Ho(K)?K.content==="class"?P=Z:K.content==="style"&&(I=Z):K.isHandlerKey||(V=!0)}const F=N.properties[P],Y=N.properties[I];V?N=jn(t.helper(wp),[N]):(F&&!Ho(F.value)&&(F.value=jn(t.helper(V3),[F.value])),Y&&(v||Y.value.type===4&&Y.value.content.trim()[0]==="["||Y.value.type===17)&&(Y.value=jn(t.helper(F3),[Y.value])));break;case 14:break;default:N=jn(t.helper(wp),[jn(t.helper(th),[N])]);break}return{props:N,directives:d,patchFlag:h,dynamicPropNames:x,shouldUseBlock:p}}function n6(e){const t=new Map,n=[];for(let o=0;o<e.length;o++){const r=e[o];if(r.key.type===8||!r.key.isStatic){n.push(r);continue}const s=r.key.content,i=t.get(s);i?(s==="style"||s==="class"||_u(s))&&GB(i,r):(t.set(s,r),n.push(r))}return n}function GB(e,t){e.value.type===17?e.value.elements.push(t.value):e.value=nh([e.value,t.value],e.loc)}function YB(e,t){const n=[],o=W7.get(e);o?n.push(t.helperString(o)):(t.helper(P3),t.directives.add(e.name),n.push(Sp(e.name,"directive")));const{loc:r}=e;if(e.exp&&n.push(e.exp),e.arg&&(e.exp||n.push("void 0"),n.push(e.arg)),Object.keys(e.modifiers).length){e.arg||(e.exp||n.push("void 0"),n.push("void 0"));const s=St("true",!1,r);n.push(Ir(e.modifiers.map(i=>$n(i,s)),r))}return nh(n,e.loc)}function ZB(e){let t="[";for(let n=0,o=e.length;n<o;n++)t+=JSON.stringify(e[n]),n<o-1&&(t+=", ");return t+"]"}function B_(e){return e==="component"||e==="Component"}const JB=(e,t)=>{if(Sg(e)){const{children:n,loc:o}=e,{slotName:r,slotProps:s}=XB(e,t),i=[t.prefixIdentifiers?"_ctx.$slots":"$slots",r,"{}","undefined","true"];let l=2;s&&(i[2]=s,l=3),n.length&&(i[3]=Hc([],n,!1,!1,o),l=4),t.scopeId&&!t.slotted&&(l=5),i.splice(l),e.codegenNode=jn(t.helper(k7),i,o)}};function XB(e,t){let n='"default"',o;const r=[];for(let s=0;s<e.props.length;s++){const i=e.props[s];if(i.type===6)i.value&&(i.name==="name"?n=JSON.stringify(i.value.content):(i.name=yn(i.name),r.push(i)));else if(i.name==="bind"&&Aa(i.arg,"name")){if(i.exp)n=i.exp;else if(i.arg&&i.arg.type===4){const l=yn(i.arg.content);n=i.exp=St(l,!1,i.arg.loc)}}else i.name==="bind"&&i.arg&&Ho(i.arg)&&(i.arg.content=yn(i.arg.content)),r.push(i)}if(r.length>0){const{props:s,directives:i}=K7(e,t,r,!1,!1);o=s,i.length&&t.onError(vn(36,i[0].loc))}return{slotName:n,slotProps:o}}const QB=/^\s*([\w$_]+|(async\s*)?\([^)]*?\))\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/,q7=(e,t,n,o)=>{const{loc:r,modifiers:s,arg:i}=e;!e.exp&&!s.length&&n.onError(vn(35,r));let l;if(i.type===4)if(i.isStatic){let d=i.content;d.startsWith("vue:")&&(d=`vnode-${d.slice(4)}`);const f=t.tagType!==0||d.startsWith("vnode")||!/[A-Z]/.test(d)?vc(yn(d)):`on:${d}`;l=St(f,!0,i.loc)}else l=us([`${n.helperString(L_)}(`,i,")"]);else l=i,l.children.unshift(`${n.helperString(L_)}(`),l.children.push(")");let a=e.exp;a&&!a.content.trim()&&(a=void 0);let u=n.cacheHandlers&&!a&&!n.inVOnce;if(a){const d=T7(a.content),f=!(d||QB.test(a.content)),p=a.content.includes(";");(f||u&&d)&&(a=us([`${f?"$event":"(...args)"} => ${p?"{":"("}`,a,p?"}":")"]))}let c={props:[$n(l,a||St("() => {}",!1,r))]};return o&&(c=o(c)),u&&(c.props[0].value=n.cache(c.props[0].value)),c.props.forEach(d=>d.key.isHandlerKey=!0),c},ez=(e,t,n)=>{const{modifiers:o,loc:r}=e,s=e.arg;let{exp:i}=e;if(i&&i.type===4&&!i.content.trim()&&(i=void 0),!i){if(s.type!==4||!s.isStatic)return n.onError(vn(52,s.loc)),{props:[$n(s,St("",!0,r))]};const l=yn(s.content);i=e.exp=St(l,!1,s.loc)}return s.type!==4?(s.children.unshift("("),s.children.push(') || ""')):s.isStatic||(s.content=`${s.content} || ""`),o.includes("camel")&&(s.type===4?s.isStatic?s.content=yn(s.content):s.content=`${n.helperString(P_)}(${s.content})`:(s.children.unshift(`${n.helperString(P_)}(`),s.children.push(")"))),n.inSSR||(o.includes("prop")&&o6(s,"."),o.includes("attr")&&o6(s,"^")),{props:[$n(s,i)]}},o6=(e,t)=>{e.type===4?e.isStatic?e.content=t+e.content:e.content=`\`${t}\${${e.content}}\``:(e.children.unshift(`'${t}' + (`),e.children.push(")"))},tz=(e,t)=>{if(e.type===0||e.type===1||e.type===11||e.type===10)return()=>{const n=e.children;let o,r=!1;for(let s=0;s<n.length;s++){const i=n[s];if(Gv(i)){r=!0;for(let l=s+1;l<n.length;l++){const a=n[l];if(Gv(a))o||(o=n[s]=us([i],i.loc)),o.children.push(" + ",a),n.splice(l,1),l--;else{o=void 0;break}}}}if(!(!r||n.length===1&&(e.type===0||e.type===1&&e.tagType===0&&!e.props.find(s=>s.type===7&&!t.directiveTransforms[s.name])&&e.tag!=="template")))for(let s=0;s<n.length;s++){const i=n[s];if(Gv(i)||i.type===8){const l=[];(i.type!==2||i.content!==" ")&&l.push(i),!t.ssr&&Ar(i,t)===0&&l.push("1"),n[s]={type:12,content:i,loc:i.loc,codegenNode:jn(t.helper(I3),l)}}}}},r6=new WeakSet,nz=(e,t)=>{if(e.type===1&&ns(e,"once",!0))return r6.has(e)||t.inVOnce||t.inSSR?void 0:(r6.add(e),t.inVOnce=!0,t.helper(wg),()=>{t.inVOnce=!1;const n=t.currentNode;n.codegenNode&&(n.codegenNode=t.cache(n.codegenNode,!0))})},G7=(e,t,n)=>{const{exp:o,arg:r}=e;if(!o)return n.onError(vn(41,e.loc)),am();const s=o.loc.source,i=o.type===4?o.content:s,l=n.bindingMetadata[s];if(l==="props"||l==="props-aliased")return n.onError(vn(44,o.loc)),am();const a=!1;if(!i.trim()||!T7(i)&&!a)return n.onError(vn(42,o.loc)),am();const u=r||St("modelValue",!0),c=r?Ho(r)?`onUpdate:${yn(r.content)}`:us(['"onUpdate:" + ',r]):"onUpdate:modelValue";let d;const f=n.isTS?"($event: any)":"$event";d=us([`${f} => ((`,o,") = $event)"]);const p=[$n(u,e.exp),$n(c,d)];if(e.modifiers.length&&t.tagType===1){const h=e.modifiers.map(y=>(W3(y)?y:JSON.stringify(y))+": true").join(", "),m=r?Ho(r)?`${r.content}Modifiers`:us([r,' + "Modifiers"']):"modelModifiers";p.push($n(m,St(`{ ${h} }`,!1,e.loc,2)))}return am(p)};function am(e=[]){return{props:e}}const oz=/[\w).+\-_$\]]/,rz=(e,t)=>{Ka("COMPILER_FILTERS",t)&&(e.type===5&&xg(e.content,t),e.type===1&&e.props.forEach(n=>{n.type===7&&n.name!=="for"&&n.exp&&xg(n.exp,t)}))};function xg(e,t){if(e.type===4)s6(e,t);else for(let n=0;n<e.children.length;n++){const o=e.children[n];typeof o=="object"&&(o.type===4?s6(o,t):o.type===8?xg(e,t):o.type===5&&xg(o.content,t))}}function s6(e,t){const n=e.content;let o=!1,r=!1,s=!1,i=!1,l=0,a=0,u=0,c=0,d,f,p,h,m=[];for(p=0;p<n.length;p++)if(f=d,d=n.charCodeAt(p),o)d===39&&f!==92&&(o=!1);else if(r)d===34&&f!==92&&(r=!1);else if(s)d===96&&f!==92&&(s=!1);else if(i)d===47&&f!==92&&(i=!1);else if(d===124&&n.charCodeAt(p+1)!==124&&n.charCodeAt(p-1)!==124&&!l&&!a&&!u)h===void 0?(c=p+1,h=n.slice(0,p).trim()):y();else{switch(d){case 34:r=!0;break;case 39:o=!0;break;case 96:s=!0;break;case 40:u++;break;case 41:u--;break;case 91:a++;break;case 93:a--;break;case 123:l++;break;case 125:l--;break}if(d===47){let v=p-1,k;for(;v>=0&&(k=n.charAt(v),k===" ");v--);(!k||!oz.test(k))&&(i=!0)}}h===void 0?h=n.slice(0,p).trim():c!==0&&y();function y(){m.push(n.slice(c,p).trim()),c=p+1}if(m.length){for(p=0;p<m.length;p++)h=sz(h,m[p],t);e.content=h}}function sz(e,t,n){n.helper(L3);const o=t.indexOf("(");if(o<0)return n.filters.add(t),`${Sp(t,"filter")}(${e})`;{const r=t.slice(0,o),s=t.slice(o+1);return n.filters.add(r),`${Sp(r,"filter")}(${e}${s!==")"?","+s:s}`}}const i6=new WeakSet,iz=(e,t)=>{if(e.type===1){const n=ns(e,"memo");return!n||i6.has(e)?void 0:(i6.add(e),()=>{const o=e.codegenNode||t.currentNode.codegenNode;o&&o.type===13&&(e.tagType!==1&&H3(o,t),e.codegenNode=jn(t.helper(j3),[n.exp,Hc(void 0,o),"_cache",String(t.cached++)]))})}};function lz(e){return[[nz,DB,iz,BB,rz,JB,KB,HB,tz],{on:q7,bind:ez,model:G7}]}function az(e,t={}){const n=t.onError||U3,o=t.mode==="module";t.prefixIdentifiers===!0?n(vn(47)):o&&n(vn(48));const r=!1;t.cacheHandlers&&n(vn(49)),t.scopeId&&!o&&n(vn(50));const s=zt({},t,{prefixIdentifiers:r}),i=tt(e)?hB(e,s):e,[l,a]=lz();return yB(i,zt({},s,{nodeTransforms:[...l,...t.nodeTransforms||[]],directiveTransforms:zt({},a,t.directiveTransforms||{})})),CB(i,s)}const uz=()=>({props:[]});/** |
| 28 |
* @vue/compiler-dom v3.4.23 |
| 29 |
* (c) 2018-present Yuxi (Evan) You and Vue contributors |
| 30 |
* @license MIT |
| 31 |
**/const Y7=Symbol(""),Z7=Symbol(""),J7=Symbol(""),X7=Symbol(""),z_=Symbol(""),Q7=Symbol(""),ex=Symbol(""),tx=Symbol(""),nx=Symbol(""),ox=Symbol("");jF({[Y7]:"vModelRadio",[Z7]:"vModelCheckbox",[J7]:"vModelText",[X7]:"vModelSelect",[z_]:"vModelDynamic",[Q7]:"withModifiers",[ex]:"withKeys",[tx]:"vShow",[nx]:"Transition",[ox]:"TransitionGroup"});let Au;function cz(e,t=!1){return Au||(Au=document.createElement("div")),t?(Au.innerHTML=`<div foo="${e.replace(/"/g,""")}">`,Au.children[0].getAttribute("foo")):(Au.innerHTML=e,Au.textContent)}const dz={parseMode:"html",isVoidTag:KR,isNativeTag:e=>HR(e)||UR(e)||WR(e),isPreTag:e=>e==="pre",decodeEntities:cz,isBuiltInComponent:e=>{if(e==="Transition"||e==="transition")return nx;if(e==="TransitionGroup"||e==="transition-group")return ox},getNamespace(e,t,n){let o=t?t.ns:n;if(t&&o===2)if(t.tag==="annotation-xml"){if(e==="svg")return 1;t.props.some(r=>r.type===6&&r.name==="encoding"&&r.value!=null&&(r.value.content==="text/html"||r.value.content==="application/xhtml+xml"))&&(o=0)}else/^m(?:[ions]|text)$/.test(t.tag)&&e!=="mglyph"&&e!=="malignmark"&&(o=0);else t&&o===1&&(t.tag==="foreignObject"||t.tag==="desc"||t.tag==="title")&&(o=0);if(o===0){if(e==="svg")return 1;if(e==="math")return 2}return o}},fz=e=>{e.type===1&&e.props.forEach((t,n)=>{t.type===6&&t.name==="style"&&t.value&&(e.props[n]={type:7,name:"bind",arg:St("style",!0,t.loc),exp:pz(t.value.content,t.loc),modifiers:[],loc:t.loc})})},pz=(e,t)=>{const n=O$(e);return St(JSON.stringify(n),!1,t,3)};function Ll(e,t){return vn(e,t)}const hz=(e,t,n)=>{const{exp:o,loc:r}=e;return o||n.onError(Ll(53,r)),t.children.length&&(n.onError(Ll(54,r)),t.children.length=0),{props:[$n(St("innerHTML",!0,r),o||St("",!0))]}},mz=(e,t,n)=>{const{exp:o,loc:r}=e;return o||n.onError(Ll(55,r)),t.children.length&&(n.onError(Ll(56,r)),t.children.length=0),{props:[$n(St("textContent",!0),o?Ar(o,n)>0?o:jn(n.helperString(E0),[o],r):St("",!0))]}},gz=(e,t,n)=>{const o=G7(e,t,n);if(!o.props.length||t.tagType===1)return o;e.arg&&n.onError(Ll(58,e.arg.loc));const{tag:r}=t,s=n.isCustomElement(r);if(r==="input"||r==="textarea"||r==="select"||s){let i=J7,l=!1;if(r==="input"||s){const a=x0(t,"type");if(a){if(a.type===7)i=z_;else if(a.value)switch(a.value.content){case"radio":i=Y7;break;case"checkbox":i=Z7;break;case"file":l=!0,n.onError(Ll(59,e.loc));break}}else XF(t)&&(i=z_)}else r==="select"&&(i=X7);l||(o.needRuntime=n.helper(i))}else n.onError(Ll(57,e.loc));return o.props=o.props.filter(i=>!(i.key.type===4&&i.key.content==="modelValue")),o},vz=yr("passive,once,capture"),yz=yr("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),_z=yr("left,right"),rx=yr("onkeyup,onkeydown,onkeypress",!0),bz=(e,t,n,o)=>{const r=[],s=[],i=[];for(let l=0;l<t.length;l++){const a=t[l];a==="native"&&kp("COMPILER_V_ON_NATIVE",n)||vz(a)?i.push(a):_z(a)?Ho(e)?rx(e.content)?r.push(a):s.push(a):(r.push(a),s.push(a)):yz(a)?s.push(a):r.push(a)}return{keyModifiers:r,nonKeyModifiers:s,eventOptionModifiers:i}},l6=(e,t)=>Ho(e)&&e.content.toLowerCase()==="onclick"?St(t,!0):e.type!==4?us(["(",e,`) === "onClick" ? "${t}" : (`,e,")"]):e,wz=(e,t,n)=>q7(e,t,n,o=>{const{modifiers:r}=e;if(!r.length)return o;let{key:s,value:i}=o.props[0];const{keyModifiers:l,nonKeyModifiers:a,eventOptionModifiers:u}=bz(s,r,n,e.loc);if(a.includes("right")&&(s=l6(s,"onContextmenu")),a.includes("middle")&&(s=l6(s,"onMouseup")),a.length&&(i=jn(n.helper(Q7),[i,JSON.stringify(a)])),l.length&&(!Ho(s)||rx(s.content))&&(i=jn(n.helper(ex),[i,JSON.stringify(l)])),u.length){const c=u.map(Gl).join("");s=Ho(s)?St(`${s.content}${c}`,!0):us(["(",s,`) + "${c}"`])}return{props:[$n(s,i)]}}),Cz=(e,t,n)=>{const{exp:o,loc:r}=e;return o||n.onError(Ll(61,r)),{props:[],needRuntime:n.helper(tx)}},kz=(e,t)=>{e.type===1&&e.tagType===0&&(e.tag==="script"||e.tag==="style")&&t.removeNode()},Sz=[fz],$z={cloak:uz,html:hz,text:mz,model:gz,on:wz,show:Cz};function Ez(e,t={}){return az(e,zt({},dz,t,{nodeTransforms:[kz,...Sz,...t.nodeTransforms||[]],directiveTransforms:zt({},$z,t.directiveTransforms||{}),transformHoist:null}))}/** |
| 32 |
* vue v3.4.23 |
| 33 |
* (c) 2018-present Yuxi (Evan) You and Vue contributors |
| 34 |
* @license MIT |
| 35 |
**/const a6=new WeakMap;function xz(e){let t=a6.get(e??Wt);return t||(t=Object.create(null),a6.set(e??Wt,t)),t}function Tz(e,t){if(!tt(e))if(e.nodeType)e=e.innerHTML;else return yt;const n=e,o=xz(t),r=o[n];if(r)return r;if(e[0]==="#"){const a=document.querySelector(e);e=a?a.innerHTML:""}const s=zt({hoistStatic:!0,onError:void 0,onWarn:yt},t);!s.isCustomElement&&typeof customElements<"u"&&(s.isCustomElement=a=>!!customElements.get(a));const{code:i}=Ez(e,s),l=new Function("Vue",i)(RF);return l._rc=!0,o[n]=l}qE(Tz);/*! |
| 36 |
* vue-router v4.3.2 |
| 37 |
* (c) 2024 Eduardo San Martin Morote |
| 38 |
* @license MIT |
| 39 |
*/const Wu=typeof document<"u";function Mz(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const Qt=Object.assign;function Zv(e,t){const n={};for(const o in t){const r=t[o];n[o]=vs(r)?r.map(e):e(r)}return n}const Bf=()=>{},vs=Array.isArray,sx=/#/g,Oz=/&/g,Iz=/\//g,Az=/=/g,Nz=/\?/g,ix=/\+/g,Pz=/%5B/g,Lz=/%5D/g,lx=/%5E/g,Rz=/%60/g,ax=/%7B/g,Dz=/%7C/g,ux=/%7D/g,Vz=/%20/g;function q3(e){return encodeURI(""+e).replace(Dz,"|").replace(Pz,"[").replace(Lz,"]")}function Fz(e){return q3(e).replace(ax,"{").replace(ux,"}").replace(lx,"^")}function j_(e){return q3(e).replace(ix,"%2B").replace(Vz,"+").replace(sx,"%23").replace(Oz,"%26").replace(Rz,"`").replace(ax,"{").replace(ux,"}").replace(lx,"^")}function Bz(e){return j_(e).replace(Az,"%3D")}function zz(e){return q3(e).replace(sx,"%23").replace(Nz,"%3F")}function jz(e){return e==null?"":zz(e).replace(Iz,"%2F")}function Ep(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const Hz=/\/$/,Uz=e=>e.replace(Hz,"");function Jv(e,t,n="/"){let o,r={},s="",i="";const l=t.indexOf("#");let a=t.indexOf("?");return l<a&&l>=0&&(a=-1),a>-1&&(o=t.slice(0,a),s=t.slice(a+1,l>-1?l:t.length),r=e(s)),l>-1&&(o=o||t.slice(0,l),i=t.slice(l,t.length)),o=Gz(o??t,n),{fullPath:o+(s&&"?")+s+i,path:o,query:r,hash:Ep(i)}}function Wz(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function u6(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Kz(e,t,n){const o=t.matched.length-1,r=n.matched.length-1;return o>-1&&o===r&&Kc(t.matched[o],n.matched[r])&&cx(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Kc(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function cx(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!qz(e[n],t[n]))return!1;return!0}function qz(e,t){return vs(e)?c6(e,t):vs(t)?c6(t,e):e===t}function c6(e,t){return vs(t)?e.length===t.length&&e.every((n,o)=>n===t[o]):e.length===1&&e[0]===t}function Gz(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),o=e.split("/"),r=o[o.length-1];(r===".."||r===".")&&o.push("");let s=n.length-1,i,l;for(i=0;i<o.length;i++)if(l=o[i],l!==".")if(l==="..")s>1&&s--;else break;return n.slice(0,s).join("/")+"/"+o.slice(i).join("/")}var xp;(function(e){e.pop="pop",e.push="push"})(xp||(xp={}));var zf;(function(e){e.back="back",e.forward="forward",e.unknown=""})(zf||(zf={}));function Yz(e){if(!e)if(Wu){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Uz(e)}const Zz=/^[^#]+#/;function Jz(e,t){return e.replace(Zz,"#")+t}function Xz(e,t){const n=document.documentElement.getBoundingClientRect(),o=e.getBoundingClientRect();return{behavior:t.behavior,left:o.left-n.left-(t.left||0),top:o.top-n.top-(t.top||0)}}const O0=()=>({left:window.scrollX,top:window.scrollY});function Qz(e){let t;if("el"in e){const n=e.el,o=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?o?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=Xz(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function d6(e,t){return(history.state?history.state.position-t:-1)+e}const H_=new Map;function ej(e,t){H_.set(e,t)}function tj(e){const t=H_.get(e);return H_.delete(e),t}let nj=()=>location.protocol+"//"+location.host;function dx(e,t){const{pathname:n,search:o,hash:r}=t,s=e.indexOf("#");if(s>-1){let l=r.includes(e.slice(s))?e.slice(s).length:1,a=r.slice(l);return a[0]!=="/"&&(a="/"+a),u6(a,"")}return u6(n,e)+o+r}function oj(e,t,n,o){let r=[],s=[],i=null;const l=({state:f})=>{const p=dx(e,location),h=n.value,m=t.value;let y=0;if(f){if(n.value=p,t.value=f,i&&i===h){i=null;return}y=m?f.position-m.position:0}else o(p);r.forEach(v=>{v(n.value,h,{delta:y,type:xp.pop,direction:y?y>0?zf.forward:zf.back:zf.unknown})})};function a(){i=n.value}function u(f){r.push(f);const p=()=>{const h=r.indexOf(f);h>-1&&r.splice(h,1)};return s.push(p),p}function c(){const{history:f}=window;f.state&&f.replaceState(Qt({},f.state,{scroll:O0()}),"")}function d(){for(const f of s)f();s=[],window.removeEventListener("popstate",l),window.removeEventListener("beforeunload",c)}return window.addEventListener("popstate",l),window.addEventListener("beforeunload",c,{passive:!0}),{pauseListeners:a,listen:u,destroy:d}}function f6(e,t,n,o=!1,r=!1){return{back:e,current:t,forward:n,replaced:o,position:window.history.length,scroll:r?O0():null}}function rj(e){const{history:t,location:n}=window,o={value:dx(e,n)},r={value:t.state};r.value||s(o.value,{back:null,current:o.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function s(a,u,c){const d=e.indexOf("#"),f=d>-1?(n.host&&document.querySelector("base")?e:e.slice(d))+a:nj()+e+a;try{t[c?"replaceState":"pushState"](u,"",f),r.value=u}catch(p){console.error(p),n[c?"replace":"assign"](f)}}function i(a,u){const c=Qt({},t.state,f6(r.value.back,a,r.value.forward,!0),u,{position:r.value.position});s(a,c,!0),o.value=a}function l(a,u){const c=Qt({},r.value,t.state,{forward:a,scroll:O0()});s(c.current,c,!0);const d=Qt({},f6(o.value,a,null),{position:c.position+1},u);s(a,d,!1),o.value=a}return{location:o,state:r,push:l,replace:i}}function fx(e){e=Yz(e);const t=rj(e),n=oj(e,t.state,t.location,t.replace);function o(s,i=!0){i||n.pauseListeners(),history.go(s)}const r=Qt({location:"",base:e,go:o,createHref:Jz.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}function sj(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),fx(e)}function ij(e){return typeof e=="string"||e&&typeof e=="object"}function px(e){return typeof e=="string"||typeof e=="symbol"}const Zi={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},hx=Symbol("");var p6;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(p6||(p6={}));function qc(e,t){return Qt(new Error,{type:e,[hx]:!0},t)}function ci(e,t){return e instanceof Error&&hx in e&&(t==null||!!(e.type&t))}const h6="[^/]+?",lj={sensitive:!1,strict:!1,start:!0,end:!0},aj=/[.+*?^${}()[\]/\\]/g;function uj(e,t){const n=Qt({},lj,t),o=[];let r=n.start?"^":"";const s=[];for(const u of e){const c=u.length?[]:[90];n.strict&&!u.length&&(r+="/");for(let d=0;d<u.length;d++){const f=u[d];let p=40+(n.sensitive?.25:0);if(f.type===0)d||(r+="/"),r+=f.value.replace(aj,"\\$&"),p+=40;else if(f.type===1){const{value:h,repeatable:m,optional:y,regexp:v}=f;s.push({name:h,repeatable:m,optional:y});const k=v||h6;if(k!==h6){p+=10;try{new RegExp(`(${k})`)}catch($){throw new Error(`Invalid custom RegExp for param "${h}" (${k}): `+$.message)}}let b=m?`((?:${k})(?:/(?:${k}))*)`:`(${k})`;d||(b=y&&u.length<2?`(?:/${b})`:"/"+b),y&&(b+="?"),r+=b,p+=20,y&&(p+=-8),m&&(p+=-20),k===".*"&&(p+=-50)}c.push(p)}o.push(c)}if(n.strict&&n.end){const u=o.length-1;o[u][o[u].length-1]+=.7000000000000001}n.strict||(r+="/?"),n.end?r+="$":n.strict&&(r+="(?:/|$)");const i=new RegExp(r,n.sensitive?"":"i");function l(u){const c=u.match(i),d={};if(!c)return null;for(let f=1;f<c.length;f++){const p=c[f]||"",h=s[f-1];d[h.name]=p&&h.repeatable?p.split("/"):p}return d}function a(u){let c="",d=!1;for(const f of e){(!d||!c.endsWith("/"))&&(c+="/"),d=!1;for(const p of f)if(p.type===0)c+=p.value;else if(p.type===1){const{value:h,repeatable:m,optional:y}=p,v=h in u?u[h]:"";if(vs(v)&&!m)throw new Error(`Provided param "${h}" is an array but it is not repeatable (* or + modifiers)`);const k=vs(v)?v.join("/"):v;if(!k)if(y)f.length<2&&(c.endsWith("/")?c=c.slice(0,-1):d=!0);else throw new Error(`Missing required param "${h}"`);c+=k}}return c||"/"}return{re:i,score:o,keys:s,parse:l,stringify:a}}function cj(e,t){let n=0;for(;n<e.length&&n<t.length;){const o=t[n]-e[n];if(o)return o;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 dj(e,t){let n=0;const o=e.score,r=t.score;for(;n<o.length&&n<r.length;){const s=cj(o[n],r[n]);if(s)return s;n++}if(Math.abs(r.length-o.length)===1){if(m6(o))return 1;if(m6(r))return-1}return r.length-o.length}function m6(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const fj={type:0,value:""},pj=/[a-zA-Z0-9_]/;function hj(e){if(!e)return[[]];if(e==="/")return[[fj]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(p){throw new Error(`ERR (${n})/"${u}": ${p}`)}let n=0,o=n;const r=[];let s;function i(){s&&r.push(s),s=[]}let l=0,a,u="",c="";function d(){u&&(n===0?s.push({type:0,value:u}):n===1||n===2||n===3?(s.length>1&&(a==="*"||a==="+")&&t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`),s.push({type:1,value:u,regexp:c,repeatable:a==="*"||a==="+",optional:a==="*"||a==="?"})):t("Invalid state to consume buffer"),u="")}function f(){u+=a}for(;l<e.length;){if(a=e[l++],a==="\\"&&n!==2){o=n,n=4;continue}switch(n){case 0:a==="/"?(u&&d(),i()):a===":"?(d(),n=1):f();break;case 4:f(),n=o;break;case 1:a==="("?n=2:pj.test(a)?f():(d(),n=0,a!=="*"&&a!=="?"&&a!=="+"&&l--);break;case 2:a===")"?c[c.length-1]=="\\"?c=c.slice(0,-1)+a:n=3:c+=a;break;case 3:d(),n=0,a!=="*"&&a!=="?"&&a!=="+"&&l--,c="";break;default:t("Unknown state");break}}return n===2&&t(`Unfinished custom RegExp for param "${u}"`),d(),i(),r}function mj(e,t,n){const o=uj(hj(e.path),n),r=Qt(o,{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function gj(e,t){const n=[],o=new Map;t=y6({strict:!1,end:!0,sensitive:!1},t);function r(c){return o.get(c)}function s(c,d,f){const p=!f,h=vj(c);h.aliasOf=f&&f.record;const m=y6(t,c),y=[h];if("alias"in c){const b=typeof c.alias=="string"?[c.alias]:c.alias;for(const $ of b)y.push(Qt({},h,{components:f?f.record.components:h.components,path:$,aliasOf:f?f.record:h}))}let v,k;for(const b of y){const{path:$}=b;if(d&&$[0]!=="/"){const x=d.record.path,E=x[x.length-1]==="/"?"":"/";b.path=d.record.path+($&&E+$)}if(v=mj(b,d,m),f?f.alias.push(v):(k=k||v,k!==v&&k.alias.push(v),p&&c.name&&!v6(v)&&i(c.name)),h.children){const x=h.children;for(let E=0;E<x.length;E++)s(x[E],v,f&&f.children[E])}f=f||v,(v.record.components&&Object.keys(v.record.components).length||v.record.name||v.record.redirect)&&a(v)}return k?()=>{i(k)}:Bf}function i(c){if(px(c)){const d=o.get(c);d&&(o.delete(c),n.splice(n.indexOf(d),1),d.children.forEach(i),d.alias.forEach(i))}else{const d=n.indexOf(c);d>-1&&(n.splice(d,1),c.record.name&&o.delete(c.record.name),c.children.forEach(i),c.alias.forEach(i))}}function l(){return n}function a(c){let d=0;for(;d<n.length&&dj(c,n[d])>=0&&(c.record.path!==n[d].record.path||!mx(c,n[d]));)d++;n.splice(d,0,c),c.record.name&&!v6(c)&&o.set(c.record.name,c)}function u(c,d){let f,p={},h,m;if("name"in c&&c.name){if(f=o.get(c.name),!f)throw qc(1,{location:c});m=f.record.name,p=Qt(g6(d.params,f.keys.filter(k=>!k.optional).concat(f.parent?f.parent.keys.filter(k=>k.optional):[]).map(k=>k.name)),c.params&&g6(c.params,f.keys.map(k=>k.name))),h=f.stringify(p)}else if(c.path!=null)h=c.path,f=n.find(k=>k.re.test(h)),f&&(p=f.parse(h),m=f.record.name);else{if(f=d.name?o.get(d.name):n.find(k=>k.re.test(d.path)),!f)throw qc(1,{location:c,currentLocation:d});m=f.record.name,p=Qt({},d.params,c.params),h=f.stringify(p)}const y=[];let v=f;for(;v;)y.unshift(v.record),v=v.parent;return{name:m,path:h,params:p,matched:y,meta:_j(y)}}return e.forEach(c=>s(c)),{addRoute:s,resolve:u,removeRoute:i,getRoutes:l,getRecordMatcher:r}}function g6(e,t){const n={};for(const o of t)o in e&&(n[o]=e[o]);return n}function vj(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:yj(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function yj(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const o in e.components)t[o]=typeof n=="object"?n[o]:n;return t}function v6(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function _j(e){return e.reduce((t,n)=>Qt(t,n.meta),{})}function y6(e,t){const n={};for(const o in e)n[o]=o in t?t[o]:e[o];return n}function mx(e,t){return t.children.some(n=>n===e||mx(e,n))}function bj(e){const t={};if(e===""||e==="?")return t;const o=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;r<o.length;++r){const s=o[r].replace(ix," "),i=s.indexOf("="),l=Ep(i<0?s:s.slice(0,i)),a=i<0?null:Ep(s.slice(i+1));if(l in t){let u=t[l];vs(u)||(u=t[l]=[u]),u.push(a)}else t[l]=a}return t}function _6(e){let t="";for(let n in e){const o=e[n];if(n=Bz(n),o==null){o!==void 0&&(t+=(t.length?"&":"")+n);continue}(vs(o)?o.map(s=>s&&j_(s)):[o&&j_(o)]).forEach(s=>{s!==void 0&&(t+=(t.length?"&":"")+n,s!=null&&(t+="="+s))})}return t}function wj(e){const t={};for(const n in e){const o=e[n];o!==void 0&&(t[n]=vs(o)?o.map(r=>r==null?null:""+r):o==null?o:""+o)}return t}const Cj=Symbol(""),b6=Symbol(""),G3=Symbol(""),gx=Symbol(""),U_=Symbol("");function Hd(){let e=[];function t(o){return e.push(o),()=>{const r=e.indexOf(o);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function _l(e,t,n,o,r,s=i=>i()){const i=o&&(o.enterCallbacks[r]=o.enterCallbacks[r]||[]);return()=>new Promise((l,a)=>{const u=f=>{f===!1?a(qc(4,{from:n,to:t})):f instanceof Error?a(f):ij(f)?a(qc(2,{from:t,to:f})):(i&&o.enterCallbacks[r]===i&&typeof f=="function"&&i.push(f),l())},c=s(()=>e.call(o&&o.instances[r],t,n,u));let d=Promise.resolve(c);e.length<3&&(d=d.then(u)),d.catch(f=>a(f))})}function Xv(e,t,n,o,r=s=>s()){const s=[];for(const i of e)for(const l in i.components){let a=i.components[l];if(!(t!=="beforeRouteEnter"&&!i.instances[l]))if(kj(a)){const c=(a.__vccOpts||a)[t];c&&s.push(_l(c,n,o,i,l,r))}else{let u=a();s.push(()=>u.then(c=>{if(!c)return Promise.reject(new Error(`Couldn't resolve component "${l}" at "${i.path}"`));const d=Mz(c)?c.default:c;i.components[l]=d;const p=(d.__vccOpts||d)[t];return p&&_l(p,n,o,i,l,r)()}))}}return s}function kj(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function w6(e){const t=je(G3),n=je(gx),o=R(()=>{const a=g(e.to);return t.resolve(a)}),r=R(()=>{const{matched:a}=o.value,{length:u}=a,c=a[u-1],d=n.matched;if(!c||!d.length)return-1;const f=d.findIndex(Kc.bind(null,c));if(f>-1)return f;const p=C6(a[u-2]);return u>1&&C6(c)===p&&d[d.length-1].path!==p?d.findIndex(Kc.bind(null,a[u-2])):f}),s=R(()=>r.value>-1&&xj(n.params,o.value.params)),i=R(()=>r.value>-1&&r.value===n.matched.length-1&&cx(n.params,o.value.params));function l(a={}){return Ej(a)?t[g(e.replace)?"replace":"push"](g(e.to)).catch(Bf):Promise.resolve()}return{route:o,href:R(()=>o.value.href),isActive:s,isExactActive:i,navigate:l}}const Sj=Q({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:w6,setup(e,{slots:t}){const n=Bn(w6(e)),{options:o}=je(G3),r=R(()=>({[k6(e.activeClass,o.linkActiveClass,"router-link-active")]:n.isActive,[k6(e.exactActiveClass,o.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const s=t.default&&t.default(n);return e.custom?s:lt("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},s)}}}),$j=Sj;function Ej(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 xj(e,t){for(const n in t){const o=t[n],r=e[n];if(typeof o=="string"){if(o!==r)return!1}else if(!vs(r)||r.length!==o.length||o.some((s,i)=>s!==r[i]))return!1}return!0}function C6(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const k6=(e,t,n)=>e??t??n,Tj=Q({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const o=je(U_),r=R(()=>e.route||o.value),s=je(b6,0),i=R(()=>{let u=g(s);const{matched:c}=r.value;let d;for(;(d=c[u])&&!d.components;)u++;return u}),l=R(()=>r.value.matched[i.value]);wt(b6,R(()=>i.value+1)),wt(Cj,l),wt(U_,r);const a=q();return Me(()=>[a.value,l.value,e.name],([u,c,d],[f,p,h])=>{c&&(c.instances[d]=u,p&&p!==c&&u&&u===f&&(c.leaveGuards.size||(c.leaveGuards=p.leaveGuards),c.updateGuards.size||(c.updateGuards=p.updateGuards))),u&&c&&(!p||!Kc(c,p)||!f)&&(c.enterCallbacks[d]||[]).forEach(m=>m(u))},{flush:"post"}),()=>{const u=r.value,c=e.name,d=l.value,f=d&&d.components[c];if(!f)return S6(n.default,{Component:f,route:u});const p=d.props[c],h=p?p===!0?u.params:typeof p=="function"?p(u):p:null,y=lt(f,Qt({},h,t,{onVnodeUnmounted:v=>{v.component.isUnmounted&&(d.instances[c]=null)},ref:a}));return S6(n.default,{Component:y,route:u})||y}}});function S6(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const Mj=Tj;function $6(e){const t=gj(e.routes,e),n=e.parseQuery||bj,o=e.stringifyQuery||_6,r=e.history,s=Hd(),i=Hd(),l=Hd(),a=An(Zi);let u=Zi;Wu&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const c=Zv.bind(null,te=>""+te),d=Zv.bind(null,jz),f=Zv.bind(null,Ep);function p(te,fe){let ve,le;return px(te)?(ve=t.getRecordMatcher(te),le=fe):le=te,t.addRoute(le,ve)}function h(te){const fe=t.getRecordMatcher(te);fe&&t.removeRoute(fe)}function m(){return t.getRoutes().map(te=>te.record)}function y(te){return!!t.getRecordMatcher(te)}function v(te,fe){if(fe=Qt({},fe||a.value),typeof te=="string"){const J=Jv(n,te,fe.path),ue=t.resolve({path:J.path},fe),_e=r.createHref(J.fullPath);return Qt(J,ue,{params:f(ue.params),hash:Ep(J.hash),redirectedFrom:void 0,href:_e})}let ve;if(te.path!=null)ve=Qt({},te,{path:Jv(n,te.path,fe.path).path});else{const J=Qt({},te.params);for(const ue in J)J[ue]==null&&delete J[ue];ve=Qt({},te,{params:d(J)}),fe.params=d(fe.params)}const le=t.resolve(ve,fe),Ae=te.hash||"";le.params=c(f(le.params));const Ge=Wz(o,Qt({},te,{hash:Fz(Ae),path:le.path})),G=r.createHref(Ge);return Qt({fullPath:Ge,hash:Ae,query:o===_6?wj(te.query):te.query||{}},le,{redirectedFrom:void 0,href:G})}function k(te){return typeof te=="string"?Jv(n,te,a.value.path):Qt({},te)}function b(te,fe){if(u!==te)return qc(8,{from:fe,to:te})}function $(te){return M(te)}function x(te){return $(Qt(k(te),{replace:!0}))}function E(te){const fe=te.matched[te.matched.length-1];if(fe&&fe.redirect){const{redirect:ve}=fe;let le=typeof ve=="function"?ve(te):ve;return typeof le=="string"&&(le=le.includes("?")||le.includes("#")?le=k(le):{path:le},le.params={}),Qt({query:te.query,hash:te.hash,params:le.path!=null?{}:te.params},le)}}function M(te,fe){const ve=u=v(te),le=a.value,Ae=te.state,Ge=te.force,G=te.replace===!0,J=E(ve);if(J)return M(Qt(k(J),{state:typeof J=="object"?Qt({},Ae,J.state):Ae,force:Ge,replace:G}),fe||ve);const ue=ve;ue.redirectedFrom=fe;let _e;return!Ge&&Kz(o,le,ve)&&(_e=qc(16,{to:ue,from:le}),X(le,le,!0,!1)),(_e?Promise.resolve(_e):I(ue,le)).catch(ye=>ci(ye)?ci(ye,2)?ye:A(ye):W(ye,ue,le)).then(ye=>{if(ye){if(ci(ye,2))return M(Qt({replace:G},k(ye.to),{state:typeof ye.to=="object"?Qt({},Ae,ye.to.state):Ae,force:Ge}),fe||ue)}else ye=F(ue,le,!0,G,Ae);return V(ue,le,ye),ye})}function N(te,fe){const ve=b(te,fe);return ve?Promise.reject(ve):Promise.resolve()}function P(te){const fe=ge.values().next().value;return fe&&typeof fe.runWithContext=="function"?fe.runWithContext(te):te()}function I(te,fe){let ve;const[le,Ae,Ge]=Oj(te,fe);ve=Xv(le.reverse(),"beforeRouteLeave",te,fe);for(const J of le)J.leaveGuards.forEach(ue=>{ve.push(_l(ue,te,fe))});const G=N.bind(null,te,fe);return ve.push(G),xe(ve).then(()=>{ve=[];for(const J of s.list())ve.push(_l(J,te,fe));return ve.push(G),xe(ve)}).then(()=>{ve=Xv(Ae,"beforeRouteUpdate",te,fe);for(const J of Ae)J.updateGuards.forEach(ue=>{ve.push(_l(ue,te,fe))});return ve.push(G),xe(ve)}).then(()=>{ve=[];for(const J of Ge)if(J.beforeEnter)if(vs(J.beforeEnter))for(const ue of J.beforeEnter)ve.push(_l(ue,te,fe));else ve.push(_l(J.beforeEnter,te,fe));return ve.push(G),xe(ve)}).then(()=>(te.matched.forEach(J=>J.enterCallbacks={}),ve=Xv(Ge,"beforeRouteEnter",te,fe,P),ve.push(G),xe(ve))).then(()=>{ve=[];for(const J of i.list())ve.push(_l(J,te,fe));return ve.push(G),xe(ve)}).catch(J=>ci(J,8)?J:Promise.reject(J))}function V(te,fe,ve){l.list().forEach(le=>P(()=>le(te,fe,ve)))}function F(te,fe,ve,le,Ae){const Ge=b(te,fe);if(Ge)return Ge;const G=fe===Zi,J=Wu?history.state:{};ve&&(le||G?r.replace(te.fullPath,Qt({scroll:G&&J&&J.scroll},Ae)):r.push(te.fullPath,Ae)),a.value=te,X(te,fe,ve,G),A()}let Y;function Z(){Y||(Y=r.listen((te,fe,ve)=>{if(!Oe.listening)return;const le=v(te),Ae=E(le);if(Ae){M(Qt(Ae,{replace:!0}),le).catch(Bf);return}u=le;const Ge=a.value;Wu&&ej(d6(Ge.fullPath,ve.delta),O0()),I(le,Ge).catch(G=>ci(G,12)?G:ci(G,2)?(M(G.to,le).then(J=>{ci(J,20)&&!ve.delta&&ve.type===xp.pop&&r.go(-1,!1)}).catch(Bf),Promise.reject()):(ve.delta&&r.go(-ve.delta,!1),W(G,le,Ge))).then(G=>{G=G||F(le,Ge,!1),G&&(ve.delta&&!ci(G,8)?r.go(-ve.delta,!1):ve.type===xp.pop&&ci(G,20)&&r.go(-1,!1)),V(le,Ge,G)}).catch(Bf)}))}let K=Hd(),U=Hd(),B;function W(te,fe,ve){A(te);const le=U.list();return le.length?le.forEach(Ae=>Ae(te,fe,ve)):console.error(te),Promise.reject(te)}function L(){return B&&a.value!==Zi?Promise.resolve():new Promise((te,fe)=>{K.add([te,fe])})}function A(te){return B||(B=!te,Z(),K.list().forEach(([fe,ve])=>te?ve(te):fe()),K.reset()),te}function X(te,fe,ve,le){const{scrollBehavior:Ae}=e;if(!Wu||!Ae)return Promise.resolve();const Ge=!ve&&tj(d6(te.fullPath,0))||(le||!ve)&&history.state&&history.state.scroll||null;return ot().then(()=>Ae(te,fe,Ge)).then(G=>G&&Qz(G)).catch(G=>W(G,te,fe))}const re=te=>r.go(te);let j;const ge=new Set,Oe={currentRoute:a,listening:!0,addRoute:p,removeRoute:h,hasRoute:y,getRoutes:m,resolve:v,options:e,push:$,replace:x,go:re,back:()=>re(-1),forward:()=>re(1),beforeEach:s.add,beforeResolve:i.add,afterEach:l.add,onError:U.add,isReady:L,install(te){const fe=this;te.component("RouterLink",$j),te.component("RouterView",Mj),te.config.globalProperties.$router=fe,Object.defineProperty(te.config.globalProperties,"$route",{enumerable:!0,get:()=>g(a)}),Wu&&!j&&a.value===Zi&&(j=!0,$(r.location).catch(Ae=>{}));const ve={};for(const Ae in Zi)Object.defineProperty(ve,Ae,{get:()=>a.value[Ae],enumerable:!0});te.provide(G3,fe),te.provide(gx,u3(ve)),te.provide(U_,a);const le=te.unmount;ge.add(te),te.unmount=function(){ge.delete(te),ge.size<1&&(u=Zi,Y&&Y(),Y=null,a.value=Zi,j=!1,B=!1),le()}}};function xe(te){return te.reduce((fe,ve)=>fe.then(()=>P(ve)),Promise.resolve())}return Oe}function Oj(e,t){const n=[],o=[],r=[],s=Math.max(t.matched.length,e.matched.length);for(let i=0;i<s;i++){const l=t.matched[i];l&&(e.matched.find(u=>Kc(u,l))?o.push(l):n.push(l));const a=e.matched[i];a&&(t.matched.find(u=>Kc(u,a))||r.push(a))}return[n,o,r]}const Ij='a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])',Aj=e=>getComputedStyle(e).position==="fixed"?!1:e.offsetParent!==null,E6=e=>Array.from(e.querySelectorAll(Ij)).filter(t=>Nj(t)&&Aj(t)),Nj=e=>{if(e.tabIndex>0||e.tabIndex===0&&e.getAttribute("tabIndex")!==null)return!0;if(e.disabled)return!1;switch(e.nodeName){case"A":return!!e.href&&e.rel!=="ignore";case"INPUT":return!(e.type==="hidden"||e.type==="file");case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}},Rn=(e,t,{checkForDefaultPrevented:n=!0}={})=>r=>{const s=e==null?void 0:e(r);if(n===!1||!s)return t==null?void 0:t(r)},x6=e=>t=>t.pointerType==="mouse"?e(t):void 0;var Pj=Object.defineProperty,Lj=Object.defineProperties,Rj=Object.getOwnPropertyDescriptors,T6=Object.getOwnPropertySymbols,Dj=Object.prototype.hasOwnProperty,Vj=Object.prototype.propertyIsEnumerable,M6=(e,t,n)=>t in e?Pj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Fj=(e,t)=>{for(var n in t||(t={}))Dj.call(t,n)&&M6(e,n,t[n]);if(T6)for(var n of T6(t))Vj.call(t,n)&&M6(e,n,t[n]);return e},Bj=(e,t)=>Lj(e,Rj(t));function O6(e,t){var n;const o=An();return as(()=>{o.value=e()},Bj(Fj({},t),{flush:(n=t==null?void 0:t.flush)!=null?n:"sync"})),wu(o)}var I6;const Tt=typeof window<"u",zj=e=>typeof e<"u",jj=e=>typeof e=="function",Hj=e=>typeof e=="string",Gc=()=>{},Uj=Tt&&((I6=window==null?void 0:window.navigator)==null?void 0:I6.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Yc(e){return typeof e=="function"?e():g(e)}function vx(e,t){function n(...o){return new Promise((r,s)=>{Promise.resolve(e(()=>t.apply(this,o),{fn:t,thisArg:this,args:o})).then(r).catch(s)})}return n}function Wj(e,t={}){let n,o,r=Gc;const s=l=>{clearTimeout(l),r(),r=Gc};return l=>{const a=Yc(e),u=Yc(t.maxWait);return n&&s(n),a<=0||u!==void 0&&u<=0?(o&&(s(o),o=null),Promise.resolve(l())):new Promise((c,d)=>{r=t.rejectOnCancel?d:c,u&&!o&&(o=setTimeout(()=>{n&&s(n),o=null,c(l())},u)),n=setTimeout(()=>{o&&s(o),o=null,c(l())},a)})}}function Kj(e,t=!0,n=!0,o=!1){let r=0,s,i=!0,l=Gc,a;const u=()=>{s&&(clearTimeout(s),s=void 0,l(),l=Gc)};return d=>{const f=Yc(e),p=Date.now()-r,h=()=>a=d();return u(),f<=0?(r=Date.now(),h()):(p>f&&(n||!i)?(r=Date.now(),h()):t&&(a=new Promise((m,y)=>{l=o?y:m,s=setTimeout(()=>{r=Date.now(),i=!0,m(h()),u()},Math.max(0,f-p))})),!n&&!s&&(s=setTimeout(()=>i=!0,f)),i=!1,a)}}function qj(e){return e}function rh(e){return r3()?(s3(e),!0):!1}function Gj(e,t=200,n={}){return vx(Wj(t,n),e)}function Yj(e,t=200,n={}){const o=q(e.value),r=Gj(()=>{o.value=e.value},t,n);return Me(e,()=>r()),o}function Zj(e,t=200,n=!1,o=!0,r=!1){return vx(Kj(t,n,o,r),e)}function Jj(e,t=!0){at()?Ct(e):t?e():ot(e)}function W_(e,t,n={}){const{immediate:o=!0}=n,r=q(!1);let s=null;function i(){s&&(clearTimeout(s),s=null)}function l(){r.value=!1,i()}function a(...u){i(),r.value=!0,s=setTimeout(()=>{r.value=!1,s=null,e(...u)},Yc(t))}return o&&(r.value=!0,Tt&&a()),rh(l),{isPending:wu(r),start:a,stop:l}}function Si(e){var t;const n=Yc(e);return(t=n==null?void 0:n.$el)!=null?t:n}const sh=Tt?window:void 0,Xj=Tt?window.document:void 0;function Vn(...e){let t,n,o,r;if(Hj(e[0])||Array.isArray(e[0])?([n,o,r]=e,t=sh):[t,n,o,r]=e,!t)return Gc;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const s=[],i=()=>{s.forEach(c=>c()),s.length=0},l=(c,d,f,p)=>(c.addEventListener(d,f,p),()=>c.removeEventListener(d,f,p)),a=Me(()=>[Si(t),Yc(r)],([c,d])=>{i(),c&&s.push(...n.flatMap(f=>o.map(p=>l(c,f,p,d))))},{immediate:!0,flush:"post"}),u=()=>{a(),i()};return rh(u),u}let A6=!1;function yx(e,t,n={}){const{window:o=sh,ignore:r=[],capture:s=!0,detectIframe:i=!1}=n;if(!o)return;Uj&&!A6&&(A6=!0,Array.from(o.document.body.children).forEach(f=>f.addEventListener("click",Gc)));let l=!0;const a=f=>r.some(p=>{if(typeof p=="string")return Array.from(o.document.querySelectorAll(p)).some(h=>h===f.target||f.composedPath().includes(h));{const h=Si(p);return h&&(f.target===h||f.composedPath().includes(h))}}),c=[Vn(o,"click",f=>{const p=Si(e);if(!(!p||p===f.target||f.composedPath().includes(p))){if(f.detail===0&&(l=!a(f)),!l){l=!0;return}t(f)}},{passive:!0,capture:s}),Vn(o,"pointerdown",f=>{const p=Si(e);p&&(l=!f.composedPath().includes(p)&&!a(f))},{passive:!0}),i&&Vn(o,"blur",f=>{var p;const h=Si(e);((p=o.document.activeElement)==null?void 0:p.tagName)==="IFRAME"&&!(h!=null&&h.contains(o.document.activeElement))&&t(f)})].filter(Boolean);return()=>c.forEach(f=>f())}function _x(e,t=!1){const n=q(),o=()=>n.value=!!e();return o(),Jj(o,t),n}function Qj(e){return JSON.parse(JSON.stringify(e))}const N6=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},P6="__vueuse_ssr_handlers__";N6[P6]=N6[P6]||{};function eH({document:e=Xj}={}){if(!e)return q("visible");const t=q(e.visibilityState);return Vn(e,"visibilitychange",()=>{t.value=e.visibilityState}),t}var L6=Object.getOwnPropertySymbols,tH=Object.prototype.hasOwnProperty,nH=Object.prototype.propertyIsEnumerable,oH=(e,t)=>{var n={};for(var o in e)tH.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&L6)for(var o of L6(e))t.indexOf(o)<0&&nH.call(e,o)&&(n[o]=e[o]);return n};function Bo(e,t,n={}){const o=n,{window:r=sh}=o,s=oH(o,["window"]);let i;const l=_x(()=>r&&"ResizeObserver"in r),a=()=>{i&&(i.disconnect(),i=void 0)},u=Me(()=>Si(e),d=>{a(),l.value&&r&&d&&(i=new ResizeObserver(t),i.observe(d,s))},{immediate:!0,flush:"post"}),c=()=>{a(),u()};return rh(c),{isSupported:l,stop:c}}var R6=Object.getOwnPropertySymbols,rH=Object.prototype.hasOwnProperty,sH=Object.prototype.propertyIsEnumerable,iH=(e,t)=>{var n={};for(var o in e)rH.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&R6)for(var o of R6(e))t.indexOf(o)<0&&sH.call(e,o)&&(n[o]=e[o]);return n};function lH(e,t,n={}){const o=n,{window:r=sh}=o,s=iH(o,["window"]);let i;const l=_x(()=>r&&"MutationObserver"in r),a=()=>{i&&(i.disconnect(),i=void 0)},u=Me(()=>Si(e),d=>{a(),l.value&&r&&d&&(i=new MutationObserver(t),i.observe(d,s))},{immediate:!0}),c=()=>{a(),u()};return rh(c),{isSupported:l,stop:c}}var D6;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(D6||(D6={}));var aH=Object.defineProperty,V6=Object.getOwnPropertySymbols,uH=Object.prototype.hasOwnProperty,cH=Object.prototype.propertyIsEnumerable,F6=(e,t,n)=>t in e?aH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,dH=(e,t)=>{for(var n in t||(t={}))uH.call(t,n)&&F6(e,n,t[n]);if(V6)for(var n of V6(t))cH.call(t,n)&&F6(e,n,t[n]);return e};const fH={easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]};dH({linear:qj},fH);function pH(e,t,n,o={}){var r,s,i;const{clone:l=!1,passive:a=!1,eventName:u,deep:c=!1,defaultValue:d}=o,f=at(),p=n||(f==null?void 0:f.emit)||((r=f==null?void 0:f.$emit)==null?void 0:r.bind(f))||((i=(s=f==null?void 0:f.proxy)==null?void 0:s.$emit)==null?void 0:i.bind(f==null?void 0:f.proxy));let h=u;t||(t="modelValue"),h=u||h||`update:${t.toString()}`;const m=v=>l?jj(l)?l(v):Qj(v):v,y=()=>zj(e[t])?m(e[t]):d;if(a){const v=y(),k=q(v);return Me(()=>e[t],b=>k.value=m(b)),Me(k,b=>{(b!==e[t]||c)&&p(h,b)},{deep:c}),k}else return R({get(){return y()},set(v){p(h,v)}})}function hH({window:e=sh}={}){if(!e)return q(!1);const t=q(e.document.hasFocus());return Vn(e,"blur",()=>{t.value=!1}),Vn(e,"focus",()=>{t.value=!0}),t}const mH=()=>Tt&&/firefox/i.test(window.navigator.userAgent),gH=(e,t)=>{if(!Tt||!e||!t)return!1;const n=e.getBoundingClientRect();let o;return t instanceof Element?o=t.getBoundingClientRect():o={top:0,right:window.innerWidth,bottom:window.innerHeight,left:0},n.top<o.bottom&&n.bottom>o.top&&n.right>o.left&&n.left<o.right},Y3=e=>{let t,n;return e.type==="touchend"?(n=e.changedTouches[0].clientY,t=e.changedTouches[0].clientX):e.type.startsWith("touch")?(n=e.touches[0].clientY,t=e.touches[0].clientX):(n=e.clientY,t=e.clientX),{clientX:t,clientY:n}};var vH=typeof global=="object"&&global&&global.Object===Object&&global;const bx=vH;var yH=typeof self=="object"&&self&&self.Object===Object&&self,_H=bx||yH||Function("return this")();const ws=_H;var bH=ws.Symbol;const Fr=bH;var wx=Object.prototype,wH=wx.hasOwnProperty,CH=wx.toString,Ud=Fr?Fr.toStringTag:void 0;function kH(e){var t=wH.call(e,Ud),n=e[Ud];try{e[Ud]=void 0;var o=!0}catch{}var r=CH.call(e);return o&&(t?e[Ud]=n:delete e[Ud]),r}var SH=Object.prototype,$H=SH.toString;function EH(e){return $H.call(e)}var xH="[object Null]",TH="[object Undefined]",B6=Fr?Fr.toStringTag:void 0;function ku(e){return e==null?e===void 0?TH:xH:B6&&B6 in Object(e)?kH(e):EH(e)}function Ys(e){return e!=null&&typeof e=="object"}var MH="[object Symbol]";function I0(e){return typeof e=="symbol"||Ys(e)&&ku(e)==MH}function Cx(e,t){for(var n=-1,o=e==null?0:e.length,r=Array(o);++n<o;)r[n]=t(e[n],n,e);return r}var OH=Array.isArray;const Mo=OH;var IH=1/0,z6=Fr?Fr.prototype:void 0,j6=z6?z6.toString:void 0;function kx(e){if(typeof e=="string")return e;if(Mo(e))return Cx(e,kx)+"";if(I0(e))return j6?j6.call(e):"";var t=e+"";return t=="0"&&1/e==-IH?"-0":t}var AH=/\s/;function NH(e){for(var t=e.length;t--&&AH.test(e.charAt(t)););return t}var PH=/^\s+/;function LH(e){return e&&e.slice(0,NH(e)+1).replace(PH,"")}function Oo(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var H6=0/0,RH=/^[-+]0x[0-9a-f]+$/i,DH=/^0b[01]+$/i,VH=/^0o[0-7]+$/i,FH=parseInt;function K_(e){if(typeof e=="number")return e;if(I0(e))return H6;if(Oo(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Oo(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=LH(e);var n=DH.test(e);return n||VH.test(e)?FH(e.slice(2),n?2:8):RH.test(e)?H6:+e}var U6=1/0,BH=17976931348623157e292;function zH(e){if(!e)return e===0?e:0;if(e=K_(e),e===U6||e===-U6){var t=e<0?-1:1;return t*BH}return e===e?e:0}function jH(e){var t=zH(e),n=t%1;return t===t?n?t-n:t:0}function Z3(e){return e}var HH="[object AsyncFunction]",UH="[object Function]",WH="[object GeneratorFunction]",KH="[object Proxy]";function J3(e){if(!Oo(e))return!1;var t=ku(e);return t==UH||t==WH||t==HH||t==KH}var qH=ws["__core-js_shared__"];const Qv=qH;var W6=function(){var e=/[^.]+$/.exec(Qv&&Qv.keys&&Qv.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function GH(e){return!!W6&&W6 in e}var YH=Function.prototype,ZH=YH.toString;function Su(e){if(e!=null){try{return ZH.call(e)}catch{}try{return e+""}catch{}}return""}var JH=/[\\^$.*+?()[\]{}|]/g,XH=/^\[object .+?Constructor\]$/,QH=Function.prototype,eU=Object.prototype,tU=QH.toString,nU=eU.hasOwnProperty,oU=RegExp("^"+tU.call(nU).replace(JH,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function rU(e){if(!Oo(e)||GH(e))return!1;var t=J3(e)?oU:XH;return t.test(Su(e))}function sU(e,t){return e==null?void 0:e[t]}function $u(e,t){var n=sU(e,t);return rU(n)?n:void 0}var iU=$u(ws,"WeakMap");const q_=iU;var K6=Object.create,lU=function(){function e(){}return function(t){if(!Oo(t))return{};if(K6)return K6(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const aU=lU;function uU(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Sx(e,t){var n=-1,o=e.length;for(t||(t=Array(o));++n<o;)t[n]=e[n];return t}var cU=800,dU=16,fU=Date.now;function pU(e){var t=0,n=0;return function(){var o=fU(),r=dU-(o-n);if(n=o,r>0){if(++t>=cU)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function hU(e){return function(){return e}}var mU=function(){try{var e=$u(Object,"defineProperty");return e({},"",{}),e}catch{}}();const Tg=mU;var gU=Tg?function(e,t){return Tg(e,"toString",{configurable:!0,enumerable:!1,value:hU(t),writable:!0})}:Z3;const vU=gU;var yU=pU(vU);const $x=yU;function _U(e,t){for(var n=-1,o=e==null?0:e.length;++n<o&&t(e[n],n,e)!==!1;);return e}function bU(e,t,n,o){for(var r=e.length,s=n+(o?1:-1);o?s--:++s<r;)if(t(e[s],s,e))return s;return-1}var wU=9007199254740991,CU=/^(?:0|[1-9]\d*)$/;function A0(e,t){var n=typeof e;return t=t??wU,!!t&&(n=="number"||n!="symbol"&&CU.test(e))&&e>-1&&e%1==0&&e<t}function X3(e,t,n){t=="__proto__"&&Tg?Tg(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ih(e,t){return e===t||e!==e&&t!==t}var kU=Object.prototype,SU=kU.hasOwnProperty;function Q3(e,t,n){var o=e[t];(!(SU.call(e,t)&&ih(o,n))||n===void 0&&!(t in e))&&X3(e,t,n)}function lh(e,t,n,o){var r=!n;n||(n={});for(var s=-1,i=t.length;++s<i;){var l=t[s],a=o?o(n[l],e[l],l,n,e):void 0;a===void 0&&(a=e[l]),r?X3(n,l,a):Q3(n,l,a)}return n}var q6=Math.max;function Ex(e,t,n){return t=q6(t===void 0?e.length-1:t,0),function(){for(var o=arguments,r=-1,s=q6(o.length-t,0),i=Array(s);++r<s;)i[r]=o[t+r];r=-1;for(var l=Array(t+1);++r<t;)l[r]=o[r];return l[t]=n(i),uU(e,this,l)}}function $U(e,t){return $x(Ex(e,t,Z3),e+"")}var EU=9007199254740991;function ew(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=EU}function bd(e){return e!=null&&ew(e.length)&&!J3(e)}function xU(e,t,n){if(!Oo(n))return!1;var o=typeof t;return(o=="number"?bd(n)&&A0(t,n.length):o=="string"&&t in n)?ih(n[t],e):!1}function TU(e){return $U(function(t,n){var o=-1,r=n.length,s=r>1?n[r-1]:void 0,i=r>2?n[2]:void 0;for(s=e.length>3&&typeof s=="function"?(r--,s):void 0,i&&xU(n[0],n[1],i)&&(s=r<3?void 0:s,r=1),t=Object(t);++o<r;){var l=n[o];l&&e(t,l,o,s)}return t})}var MU=Object.prototype;function tw(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||MU;return e===n}function OU(e,t){for(var n=-1,o=Array(e);++n<e;)o[n]=t(n);return o}var IU="[object Arguments]";function G6(e){return Ys(e)&&ku(e)==IU}var xx=Object.prototype,AU=xx.hasOwnProperty,NU=xx.propertyIsEnumerable,PU=G6(function(){return arguments}())?G6:function(e){return Ys(e)&&AU.call(e,"callee")&&!NU.call(e,"callee")};const Tp=PU;function LU(){return!1}var Tx=typeof fr=="object"&&fr&&!fr.nodeType&&fr,Y6=Tx&&typeof pr=="object"&&pr&&!pr.nodeType&&pr,RU=Y6&&Y6.exports===Tx,Z6=RU?ws.Buffer:void 0,DU=Z6?Z6.isBuffer:void 0,VU=DU||LU;const Mp=VU;var FU="[object Arguments]",BU="[object Array]",zU="[object Boolean]",jU="[object Date]",HU="[object Error]",UU="[object Function]",WU="[object Map]",KU="[object Number]",qU="[object Object]",GU="[object RegExp]",YU="[object Set]",ZU="[object String]",JU="[object WeakMap]",XU="[object ArrayBuffer]",QU="[object DataView]",eW="[object Float32Array]",tW="[object Float64Array]",nW="[object Int8Array]",oW="[object Int16Array]",rW="[object Int32Array]",sW="[object Uint8Array]",iW="[object Uint8ClampedArray]",lW="[object Uint16Array]",aW="[object Uint32Array]",cn={};cn[eW]=cn[tW]=cn[nW]=cn[oW]=cn[rW]=cn[sW]=cn[iW]=cn[lW]=cn[aW]=!0;cn[FU]=cn[BU]=cn[XU]=cn[zU]=cn[QU]=cn[jU]=cn[HU]=cn[UU]=cn[WU]=cn[KU]=cn[qU]=cn[GU]=cn[YU]=cn[ZU]=cn[JU]=!1;function uW(e){return Ys(e)&&ew(e.length)&&!!cn[ku(e)]}function nw(e){return function(t){return e(t)}}var Mx=typeof fr=="object"&&fr&&!fr.nodeType&&fr,jf=Mx&&typeof pr=="object"&&pr&&!pr.nodeType&&pr,cW=jf&&jf.exports===Mx,ey=cW&&bx.process,dW=function(){try{var e=jf&&jf.require&&jf.require("util").types;return e||ey&&ey.binding&&ey.binding("util")}catch{}}();const Zc=dW;var J6=Zc&&Zc.isTypedArray,fW=J6?nw(J6):uW;const ow=fW;var pW=Object.prototype,hW=pW.hasOwnProperty;function Ox(e,t){var n=Mo(e),o=!n&&Tp(e),r=!n&&!o&&Mp(e),s=!n&&!o&&!r&&ow(e),i=n||o||r||s,l=i?OU(e.length,String):[],a=l.length;for(var u in e)(t||hW.call(e,u))&&!(i&&(u=="length"||r&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||A0(u,a)))&&l.push(u);return l}function Ix(e,t){return function(n){return e(t(n))}}var mW=Ix(Object.keys,Object);const gW=mW;var vW=Object.prototype,yW=vW.hasOwnProperty;function _W(e){if(!tw(e))return gW(e);var t=[];for(var n in Object(e))yW.call(e,n)&&n!="constructor"&&t.push(n);return t}function ah(e){return bd(e)?Ox(e):_W(e)}function bW(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var wW=Object.prototype,CW=wW.hasOwnProperty;function kW(e){if(!Oo(e))return bW(e);var t=tw(e),n=[];for(var o in e)o=="constructor"&&(t||!CW.call(e,o))||n.push(o);return n}function uh(e){return bd(e)?Ox(e,!0):kW(e)}var SW=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,$W=/^\w*$/;function rw(e,t){if(Mo(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||I0(e)?!0:$W.test(e)||!SW.test(e)||t!=null&&e in Object(t)}var EW=$u(Object,"create");const Op=EW;function xW(){this.__data__=Op?Op(null):{},this.size=0}function TW(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var MW="__lodash_hash_undefined__",OW=Object.prototype,IW=OW.hasOwnProperty;function AW(e){var t=this.__data__;if(Op){var n=t[e];return n===MW?void 0:n}return IW.call(t,e)?t[e]:void 0}var NW=Object.prototype,PW=NW.hasOwnProperty;function LW(e){var t=this.__data__;return Op?t[e]!==void 0:PW.call(t,e)}var RW="__lodash_hash_undefined__";function DW(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Op&&t===void 0?RW:t,this}function au(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}au.prototype.clear=xW;au.prototype.delete=TW;au.prototype.get=AW;au.prototype.has=LW;au.prototype.set=DW;function VW(){this.__data__=[],this.size=0}function N0(e,t){for(var n=e.length;n--;)if(ih(e[n][0],t))return n;return-1}var FW=Array.prototype,BW=FW.splice;function zW(e){var t=this.__data__,n=N0(t,e);if(n<0)return!1;var o=t.length-1;return n==o?t.pop():BW.call(t,n,1),--this.size,!0}function jW(e){var t=this.__data__,n=N0(t,e);return n<0?void 0:t[n][1]}function HW(e){return N0(this.__data__,e)>-1}function UW(e,t){var n=this.__data__,o=N0(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}function Bi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}Bi.prototype.clear=VW;Bi.prototype.delete=zW;Bi.prototype.get=jW;Bi.prototype.has=HW;Bi.prototype.set=UW;var WW=$u(ws,"Map");const Ip=WW;function KW(){this.size=0,this.__data__={hash:new au,map:new(Ip||Bi),string:new au}}function qW(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function P0(e,t){var n=e.__data__;return qW(t)?n[typeof t=="string"?"string":"hash"]:n.map}function GW(e){var t=P0(this,e).delete(e);return this.size-=t?1:0,t}function YW(e){return P0(this,e).get(e)}function ZW(e){return P0(this,e).has(e)}function JW(e,t){var n=P0(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}function zi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}zi.prototype.clear=KW;zi.prototype.delete=GW;zi.prototype.get=YW;zi.prototype.has=ZW;zi.prototype.set=JW;var XW="Expected a function";function sw(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(XW);var n=function(){var o=arguments,r=t?t.apply(this,o):o[0],s=n.cache;if(s.has(r))return s.get(r);var i=e.apply(this,o);return n.cache=s.set(r,i)||s,i};return n.cache=new(sw.Cache||zi),n}sw.Cache=zi;var QW=500;function eK(e){var t=sw(e,function(o){return n.size===QW&&n.clear(),o}),n=t.cache;return t}var tK=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,nK=/\\(\\)?/g,oK=eK(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(tK,function(n,o,r,s){t.push(r?s.replace(nK,"$1"):o||n)}),t});const rK=oK;function sK(e){return e==null?"":kx(e)}function L0(e,t){return Mo(e)?e:rw(e,t)?[e]:rK(sK(e))}var iK=1/0;function ch(e){if(typeof e=="string"||I0(e))return e;var t=e+"";return t=="0"&&1/e==-iK?"-0":t}function iw(e,t){t=L0(t,e);for(var n=0,o=t.length;e!=null&&n<o;)e=e[ch(t[n++])];return n&&n==o?e:void 0}function Mr(e,t,n){var o=e==null?void 0:iw(e,t);return o===void 0?n:o}function lw(e,t){for(var n=-1,o=t.length,r=e.length;++n<o;)e[r+n]=t[n];return e}var X6=Fr?Fr.isConcatSpreadable:void 0;function lK(e){return Mo(e)||Tp(e)||!!(X6&&e&&e[X6])}function aw(e,t,n,o,r){var s=-1,i=e.length;for(n||(n=lK),r||(r=[]);++s<i;){var l=e[s];t>0&&n(l)?t>1?aw(l,t-1,n,o,r):lw(r,l):o||(r[r.length]=l)}return r}function Ax(e){var t=e==null?0:e.length;return t?aw(e,1):[]}function aK(e){return $x(Ex(e,void 0,Ax),e+"")}var uK=Ix(Object.getPrototypeOf,Object);const uw=uK;var cK="[object Object]",dK=Function.prototype,fK=Object.prototype,Nx=dK.toString,pK=fK.hasOwnProperty,hK=Nx.call(Object);function mK(e){if(!Ys(e)||ku(e)!=cK)return!1;var t=uw(e);if(t===null)return!0;var n=pK.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Nx.call(n)==hK}function Mg(){if(!arguments.length)return[];var e=arguments[0];return Mo(e)?e:[e]}function gK(){this.__data__=new Bi,this.size=0}function vK(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function yK(e){return this.__data__.get(e)}function _K(e){return this.__data__.has(e)}var bK=200;function wK(e,t){var n=this.__data__;if(n instanceof Bi){var o=n.__data__;if(!Ip||o.length<bK-1)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new zi(o)}return n.set(e,t),this.size=n.size,this}function cs(e){var t=this.__data__=new Bi(e);this.size=t.size}cs.prototype.clear=gK;cs.prototype.delete=vK;cs.prototype.get=yK;cs.prototype.has=_K;cs.prototype.set=wK;function CK(e,t){return e&&lh(t,ah(t),e)}function kK(e,t){return e&&lh(t,uh(t),e)}var Px=typeof fr=="object"&&fr&&!fr.nodeType&&fr,Q6=Px&&typeof pr=="object"&&pr&&!pr.nodeType&&pr,SK=Q6&&Q6.exports===Px,e5=SK?ws.Buffer:void 0,t5=e5?e5.allocUnsafe:void 0;function Lx(e,t){if(t)return e.slice();var n=e.length,o=t5?t5(n):new e.constructor(n);return e.copy(o),o}function $K(e,t){for(var n=-1,o=e==null?0:e.length,r=0,s=[];++n<o;){var i=e[n];t(i,n,e)&&(s[r++]=i)}return s}function Rx(){return[]}var EK=Object.prototype,xK=EK.propertyIsEnumerable,n5=Object.getOwnPropertySymbols,TK=n5?function(e){return e==null?[]:(e=Object(e),$K(n5(e),function(t){return xK.call(e,t)}))}:Rx;const cw=TK;function MK(e,t){return lh(e,cw(e),t)}var OK=Object.getOwnPropertySymbols,IK=OK?function(e){for(var t=[];e;)lw(t,cw(e)),e=uw(e);return t}:Rx;const Dx=IK;function AK(e,t){return lh(e,Dx(e),t)}function Vx(e,t,n){var o=t(e);return Mo(e)?o:lw(o,n(e))}function G_(e){return Vx(e,ah,cw)}function NK(e){return Vx(e,uh,Dx)}var PK=$u(ws,"DataView");const Y_=PK;var LK=$u(ws,"Promise");const Z_=LK;var RK=$u(ws,"Set");const J_=RK;var o5="[object Map]",DK="[object Object]",r5="[object Promise]",s5="[object Set]",i5="[object WeakMap]",l5="[object DataView]",VK=Su(Y_),FK=Su(Ip),BK=Su(Z_),zK=Su(J_),jK=Su(q_),ba=ku;(Y_&&ba(new Y_(new ArrayBuffer(1)))!=l5||Ip&&ba(new Ip)!=o5||Z_&&ba(Z_.resolve())!=r5||J_&&ba(new J_)!=s5||q_&&ba(new q_)!=i5)&&(ba=function(e){var t=ku(e),n=t==DK?e.constructor:void 0,o=n?Su(n):"";if(o)switch(o){case VK:return l5;case FK:return o5;case BK:return r5;case zK:return s5;case jK:return i5}return t});const Ap=ba;var HK=Object.prototype,UK=HK.hasOwnProperty;function WK(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&UK.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var KK=ws.Uint8Array;const Og=KK;function dw(e){var t=new e.constructor(e.byteLength);return new Og(t).set(new Og(e)),t}function qK(e,t){var n=t?dw(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var GK=/\w*$/;function YK(e){var t=new e.constructor(e.source,GK.exec(e));return t.lastIndex=e.lastIndex,t}var a5=Fr?Fr.prototype:void 0,u5=a5?a5.valueOf:void 0;function ZK(e){return u5?Object(u5.call(e)):{}}function Fx(e,t){var n=t?dw(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var JK="[object Boolean]",XK="[object Date]",QK="[object Map]",eq="[object Number]",tq="[object RegExp]",nq="[object Set]",oq="[object String]",rq="[object Symbol]",sq="[object ArrayBuffer]",iq="[object DataView]",lq="[object Float32Array]",aq="[object Float64Array]",uq="[object Int8Array]",cq="[object Int16Array]",dq="[object Int32Array]",fq="[object Uint8Array]",pq="[object Uint8ClampedArray]",hq="[object Uint16Array]",mq="[object Uint32Array]";function gq(e,t,n){var o=e.constructor;switch(t){case sq:return dw(e);case JK:case XK:return new o(+e);case iq:return qK(e,n);case lq:case aq:case uq:case cq:case dq:case fq:case pq:case hq:case mq:return Fx(e,n);case QK:return new o;case eq:case oq:return new o(e);case tq:return YK(e);case nq:return new o;case rq:return ZK(e)}}function Bx(e){return typeof e.constructor=="function"&&!tw(e)?aU(uw(e)):{}}var vq="[object Map]";function yq(e){return Ys(e)&&Ap(e)==vq}var c5=Zc&&Zc.isMap,_q=c5?nw(c5):yq;const bq=_q;var wq="[object Set]";function Cq(e){return Ys(e)&&Ap(e)==wq}var d5=Zc&&Zc.isSet,kq=d5?nw(d5):Cq;const Sq=kq;var $q=1,Eq=2,xq=4,zx="[object Arguments]",Tq="[object Array]",Mq="[object Boolean]",Oq="[object Date]",Iq="[object Error]",jx="[object Function]",Aq="[object GeneratorFunction]",Nq="[object Map]",Pq="[object Number]",Hx="[object Object]",Lq="[object RegExp]",Rq="[object Set]",Dq="[object String]",Vq="[object Symbol]",Fq="[object WeakMap]",Bq="[object ArrayBuffer]",zq="[object DataView]",jq="[object Float32Array]",Hq="[object Float64Array]",Uq="[object Int8Array]",Wq="[object Int16Array]",Kq="[object Int32Array]",qq="[object Uint8Array]",Gq="[object Uint8ClampedArray]",Yq="[object Uint16Array]",Zq="[object Uint32Array]",ln={};ln[zx]=ln[Tq]=ln[Bq]=ln[zq]=ln[Mq]=ln[Oq]=ln[jq]=ln[Hq]=ln[Uq]=ln[Wq]=ln[Kq]=ln[Nq]=ln[Pq]=ln[Hx]=ln[Lq]=ln[Rq]=ln[Dq]=ln[Vq]=ln[qq]=ln[Gq]=ln[Yq]=ln[Zq]=!0;ln[Iq]=ln[jx]=ln[Fq]=!1;function Hf(e,t,n,o,r,s){var i,l=t&$q,a=t&Eq,u=t&xq;if(n&&(i=r?n(e,o,r,s):n(e)),i!==void 0)return i;if(!Oo(e))return e;var c=Mo(e);if(c){if(i=WK(e),!l)return Sx(e,i)}else{var d=Ap(e),f=d==jx||d==Aq;if(Mp(e))return Lx(e,l);if(d==Hx||d==zx||f&&!r){if(i=a||f?{}:Bx(e),!l)return a?AK(e,kK(i,e)):MK(e,CK(i,e))}else{if(!ln[d])return r?e:{};i=gq(e,d,l)}}s||(s=new cs);var p=s.get(e);if(p)return p;s.set(e,i),Sq(e)?e.forEach(function(y){i.add(Hf(y,t,n,y,e,s))}):bq(e)&&e.forEach(function(y,v){i.set(v,Hf(y,t,n,v,e,s))});var h=u?a?NK:G_:a?uh:ah,m=c?void 0:h(e);return _U(m||e,function(y,v){m&&(v=y,y=e[v]),Q3(i,v,Hf(y,t,n,v,e,s))}),i}var Jq=4;function f5(e){return Hf(e,Jq)}var Xq=1,Qq=4;function p5(e){return Hf(e,Xq|Qq)}var eG="__lodash_hash_undefined__";function tG(e){return this.__data__.set(e,eG),this}function nG(e){return this.__data__.has(e)}function Ig(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new zi;++t<n;)this.add(e[t])}Ig.prototype.add=Ig.prototype.push=tG;Ig.prototype.has=nG;function oG(e,t){for(var n=-1,o=e==null?0:e.length;++n<o;)if(t(e[n],n,e))return!0;return!1}function rG(e,t){return e.has(t)}var sG=1,iG=2;function Ux(e,t,n,o,r,s){var i=n&sG,l=e.length,a=t.length;if(l!=a&&!(i&&a>l))return!1;var u=s.get(e),c=s.get(t);if(u&&c)return u==t&&c==e;var d=-1,f=!0,p=n&iG?new Ig:void 0;for(s.set(e,t),s.set(t,e);++d<l;){var h=e[d],m=t[d];if(o)var y=i?o(m,h,d,t,e,s):o(h,m,d,e,t,s);if(y!==void 0){if(y)continue;f=!1;break}if(p){if(!oG(t,function(v,k){if(!rG(p,k)&&(h===v||r(h,v,n,o,s)))return p.push(k)})){f=!1;break}}else if(!(h===m||r(h,m,n,o,s))){f=!1;break}}return s.delete(e),s.delete(t),f}function lG(e){var t=-1,n=Array(e.size);return e.forEach(function(o,r){n[++t]=[r,o]}),n}function aG(e){var t=-1,n=Array(e.size);return e.forEach(function(o){n[++t]=o}),n}var uG=1,cG=2,dG="[object Boolean]",fG="[object Date]",pG="[object Error]",hG="[object Map]",mG="[object Number]",gG="[object RegExp]",vG="[object Set]",yG="[object String]",_G="[object Symbol]",bG="[object ArrayBuffer]",wG="[object DataView]",h5=Fr?Fr.prototype:void 0,ty=h5?h5.valueOf:void 0;function CG(e,t,n,o,r,s,i){switch(n){case wG:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case bG:return!(e.byteLength!=t.byteLength||!s(new Og(e),new Og(t)));case dG:case fG:case mG:return ih(+e,+t);case pG:return e.name==t.name&&e.message==t.message;case gG:case yG:return e==t+"";case hG:var l=lG;case vG:var a=o&uG;if(l||(l=aG),e.size!=t.size&&!a)return!1;var u=i.get(e);if(u)return u==t;o|=cG,i.set(e,t);var c=Ux(l(e),l(t),o,r,s,i);return i.delete(e),c;case _G:if(ty)return ty.call(e)==ty.call(t)}return!1}var kG=1,SG=Object.prototype,$G=SG.hasOwnProperty;function EG(e,t,n,o,r,s){var i=n&kG,l=G_(e),a=l.length,u=G_(t),c=u.length;if(a!=c&&!i)return!1;for(var d=a;d--;){var f=l[d];if(!(i?f in t:$G.call(t,f)))return!1}var p=s.get(e),h=s.get(t);if(p&&h)return p==t&&h==e;var m=!0;s.set(e,t),s.set(t,e);for(var y=i;++d<a;){f=l[d];var v=e[f],k=t[f];if(o)var b=i?o(k,v,f,t,e,s):o(v,k,f,e,t,s);if(!(b===void 0?v===k||r(v,k,n,o,s):b)){m=!1;break}y||(y=f=="constructor")}if(m&&!y){var $=e.constructor,x=t.constructor;$!=x&&"constructor"in e&&"constructor"in t&&!(typeof $=="function"&&$ instanceof $&&typeof x=="function"&&x instanceof x)&&(m=!1)}return s.delete(e),s.delete(t),m}var xG=1,m5="[object Arguments]",g5="[object Array]",um="[object Object]",TG=Object.prototype,v5=TG.hasOwnProperty;function MG(e,t,n,o,r,s){var i=Mo(e),l=Mo(t),a=i?g5:Ap(e),u=l?g5:Ap(t);a=a==m5?um:a,u=u==m5?um:u;var c=a==um,d=u==um,f=a==u;if(f&&Mp(e)){if(!Mp(t))return!1;i=!0,c=!1}if(f&&!c)return s||(s=new cs),i||ow(e)?Ux(e,t,n,o,r,s):CG(e,t,a,n,o,r,s);if(!(n&xG)){var p=c&&v5.call(e,"__wrapped__"),h=d&&v5.call(t,"__wrapped__");if(p||h){var m=p?e.value():e,y=h?t.value():t;return s||(s=new cs),r(m,y,n,o,s)}}return f?(s||(s=new cs),EG(e,t,n,o,r,s)):!1}function R0(e,t,n,o,r){return e===t?!0:e==null||t==null||!Ys(e)&&!Ys(t)?e!==e&&t!==t:MG(e,t,n,o,R0,r)}var OG=1,IG=2;function AG(e,t,n,o){var r=n.length,s=r,i=!o;if(e==null)return!s;for(e=Object(e);r--;){var l=n[r];if(i&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++r<s;){l=n[r];var a=l[0],u=e[a],c=l[1];if(i&&l[2]){if(u===void 0&&!(a in e))return!1}else{var d=new cs;if(o)var f=o(u,c,a,e,t,d);if(!(f===void 0?R0(c,u,OG|IG,o,d):f))return!1}}return!0}function Wx(e){return e===e&&!Oo(e)}function NG(e){for(var t=ah(e),n=t.length;n--;){var o=t[n],r=e[o];t[n]=[o,r,Wx(r)]}return t}function Kx(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function PG(e){var t=NG(e);return t.length==1&&t[0][2]?Kx(t[0][0],t[0][1]):function(n){return n===e||AG(n,e,t)}}function LG(e,t){return e!=null&&t in Object(e)}function RG(e,t,n){t=L0(t,e);for(var o=-1,r=t.length,s=!1;++o<r;){var i=ch(t[o]);if(!(s=e!=null&&n(e,i)))break;e=e[i]}return s||++o!=r?s:(r=e==null?0:e.length,!!r&&ew(r)&&A0(i,r)&&(Mo(e)||Tp(e)))}function qx(e,t){return e!=null&&RG(e,t,LG)}var DG=1,VG=2;function FG(e,t){return rw(e)&&Wx(t)?Kx(ch(e),t):function(n){var o=Mr(n,e);return o===void 0&&o===t?qx(n,e):R0(t,o,DG|VG)}}function BG(e){return function(t){return t==null?void 0:t[e]}}function zG(e){return function(t){return iw(t,e)}}function jG(e){return rw(e)?BG(ch(e)):zG(e)}function Gx(e){return typeof e=="function"?e:e==null?Z3:typeof e=="object"?Mo(e)?FG(e[0],e[1]):PG(e):jG(e)}function HG(e){return function(t,n,o){for(var r=-1,s=Object(t),i=o(t),l=i.length;l--;){var a=i[e?l:++r];if(n(s[a],a,s)===!1)break}return t}}var UG=HG();const Yx=UG;function WG(e,t){return e&&Yx(e,t,ah)}function KG(e,t){return function(n,o){if(n==null)return n;if(!bd(n))return e(n,o);for(var r=n.length,s=t?r:-1,i=Object(n);(t?s--:++s<r)&&o(i[s],s,i)!==!1;);return n}}var qG=KG(WG);const GG=qG;var YG=function(){return ws.Date.now()};const ny=YG;var ZG="Expected a function",JG=Math.max,XG=Math.min;function jl(e,t,n){var o,r,s,i,l,a,u=0,c=!1,d=!1,f=!0;if(typeof e!="function")throw new TypeError(ZG);t=K_(t)||0,Oo(n)&&(c=!!n.leading,d="maxWait"in n,s=d?JG(K_(n.maxWait)||0,t):s,f="trailing"in n?!!n.trailing:f);function p(E){var M=o,N=r;return o=r=void 0,u=E,i=e.apply(N,M),i}function h(E){return u=E,l=setTimeout(v,t),c?p(E):i}function m(E){var M=E-a,N=E-u,P=t-M;return d?XG(P,s-N):P}function y(E){var M=E-a,N=E-u;return a===void 0||M>=t||M<0||d&&N>=s}function v(){var E=ny();if(y(E))return k(E);l=setTimeout(v,m(E))}function k(E){return l=void 0,f&&o?p(E):(o=r=void 0,i)}function b(){l!==void 0&&clearTimeout(l),u=0,o=a=r=l=void 0}function $(){return l===void 0?i:k(ny())}function x(){var E=ny(),M=y(E);if(o=arguments,r=this,a=E,M){if(l===void 0)return h(a);if(d)return clearTimeout(l),l=setTimeout(v,t),p(a)}return l===void 0&&(l=setTimeout(v,t)),i}return x.cancel=b,x.flush=$,x}function X_(e,t,n){(n!==void 0&&!ih(e[t],n)||n===void 0&&!(t in e))&&X3(e,t,n)}function QG(e){return Ys(e)&&bd(e)}function Q_(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function eY(e){return lh(e,uh(e))}function tY(e,t,n,o,r,s,i){var l=Q_(e,n),a=Q_(t,n),u=i.get(a);if(u){X_(e,n,u);return}var c=s?s(l,a,n+"",e,t,i):void 0,d=c===void 0;if(d){var f=Mo(a),p=!f&&Mp(a),h=!f&&!p&&ow(a);c=a,f||p||h?Mo(l)?c=l:QG(l)?c=Sx(l):p?(d=!1,c=Lx(a,!0)):h?(d=!1,c=Fx(a,!0)):c=[]:mK(a)||Tp(a)?(c=l,Tp(l)?c=eY(l):(!Oo(l)||J3(l))&&(c=Bx(a))):d=!1}d&&(i.set(a,c),r(c,a,o,s,i),i.delete(a)),X_(e,n,c)}function Zx(e,t,n,o,r){e!==t&&Yx(t,function(s,i){if(r||(r=new cs),Oo(s))tY(e,t,i,n,Zx,o,r);else{var l=o?o(Q_(e,i),s,i+"",e,t,r):void 0;l===void 0&&(l=s),X_(e,i,l)}},uh)}var nY=Math.max,oY=Math.min;function rY(e,t,n){var o=e==null?0:e.length;if(!o)return-1;var r=o-1;return n!==void 0&&(r=jH(n),r=n<0?nY(o+r,0):oY(r,o-1)),bU(e,Gx(t),r,!0)}function sY(e,t){var n=-1,o=bd(e)?Array(e.length):[];return GG(e,function(r,s,i){o[++n]=t(r,s,i)}),o}function iY(e,t){var n=Mo(e)?Cx:sY;return n(e,Gx(t))}function lY(e,t){return aw(iY(e,t),1)}function Ag(e){for(var t=-1,n=e==null?0:e.length,o={};++t<n;){var r=e[t];o[r[0]]=r[1]}return o}function Hl(e,t){return R0(e,t)}function To(e){return e==null}function Jx(e){return e===void 0}var aY=TU(function(e,t,n){Zx(e,t,n)});const uY=aY;function Xx(e,t,n,o){if(!Oo(e))return e;t=L0(t,e);for(var r=-1,s=t.length,i=s-1,l=e;l!=null&&++r<s;){var a=ch(t[r]),u=n;if(a==="__proto__"||a==="constructor"||a==="prototype")return e;if(r!=i){var c=l[a];u=o?o(c,a,l):void 0,u===void 0&&(u=Oo(c)?c:A0(t[r+1])?[]:{})}Q3(l,a,u),l=l[a]}return e}function cY(e,t,n){for(var o=-1,r=t.length,s={};++o<r;){var i=t[o],l=iw(e,i);n(l,i)&&Xx(s,L0(i,e),l)}return s}function dY(e,t){return cY(e,t,function(n,o){return qx(e,o)})}var fY=aK(function(e,t){return e==null?{}:dY(e,t)});const pY=fY;function hY(e,t,n){return e==null?e:Xx(e,t,n)}var mY="Expected a function";function oy(e,t,n){var o=!0,r=!0;if(typeof e!="function")throw new TypeError(mY);return Oo(n)&&(o="leading"in n?!!n.leading:o,r="trailing"in n?!!n.trailing:r),jl(e,t,{leading:o,maxWait:t,trailing:r})}const Uo=e=>e===void 0,Br=e=>typeof e=="boolean",_t=e=>typeof e=="number",Qx=e=>!e&&e!==0||Te(e)&&e.length===0||pt(e)&&!Object.keys(e).length,ys=e=>typeof Element>"u"?!1:e instanceof Element,Np=e=>To(e),gY=e=>tt(e)?!Number.isNaN(Number(e)):!1,vY=e=>Tt?window.requestAnimationFrame(e):setTimeout(e,16),yY=(e="")=>e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d"),kl=e=>Gl(e),eb=e=>Object.keys(e),_Y=e=>Object.entries(e),Ym=(e,t,n)=>({get value(){return Mr(e,t,n)},set value(o){hY(e,t,o)}});class bY extends Error{constructor(t){super(t),this.name="ElementPlusError"}}function Cs(e,t){throw new bY(`[${e}] ${t}`)}const eT=(e="")=>e.split(" ").filter(t=>!!t.trim()),Oi=(e,t)=>{if(!e||!t)return!1;if(t.includes(" "))throw new Error("className should not contain space.");return e.classList.contains(t)},uu=(e,t)=>{!e||!t.trim()||e.classList.add(...eT(t))},Zs=(e,t)=>{!e||!t.trim()||e.classList.remove(...eT(t))},Sl=(e,t)=>{var n;if(!Tt||!e||!t)return"";let o=yn(t);o==="float"&&(o="cssFloat");try{const r=e.style[o];if(r)return r;const s=(n=document.defaultView)==null?void 0:n.getComputedStyle(e,"");return s?s[o]:""}catch{return e.style[o]}};function Zo(e,t="px"){if(!e)return"";if(_t(e)||gY(e))return`${e}${t}`;if(tt(e))return e}const wY=(e,t)=>{if(!Tt)return!1;const n={undefined:"overflow",true:"overflow-y",false:"overflow-x"}[String(t)],o=Sl(e,n);return["scroll","auto","overlay"].some(r=>o.includes(r))},CY=(e,t)=>{if(!Tt)return;let n=e;for(;n;){if([window,document,document.documentElement].includes(n))return window;if(wY(n,t))return n;n=n.parentNode}return n};let cm;const kY=e=>{var t;if(!Tt)return 0;if(cm!==void 0)return cm;const n=document.createElement("div");n.className=`${e}-scrollbar__wrap`,n.style.visibility="hidden",n.style.width="100px",n.style.position="absolute",n.style.top="-9999px",document.body.appendChild(n);const o=n.offsetWidth;n.style.overflow="scroll";const r=document.createElement("div");r.style.width="100%",n.appendChild(r);const s=r.offsetWidth;return(t=n.parentNode)==null||t.removeChild(n),cm=o-s,cm};function SY(e,t){if(!Tt)return;if(!t){e.scrollTop=0;return}const n=[];let o=t.offsetParent;for(;o!==null&&e!==o&&e.contains(o);)n.push(o),o=o.offsetParent;const r=t.offsetTop+n.reduce((a,u)=>a+u.offsetTop,0),s=r+t.offsetHeight,i=e.scrollTop,l=i+e.clientHeight;r<i?e.scrollTop=r:s>l&&(e.scrollTop=s-e.clientHeight)}/*! Element Plus Icons Vue v2.3.1 */var $Y=Q({name:"ArrowDown",__name:"arrow-down",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"})]))}}),Eu=$Y,EY=Q({name:"ArrowLeft",__name:"arrow-left",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M609.408 149.376 277.76 489.6a32 32 0 0 0 0 44.672l331.648 340.352a29.12 29.12 0 0 0 41.728 0 30.592 30.592 0 0 0 0-42.752L339.264 511.936l311.872-319.872a30.592 30.592 0 0 0 0-42.688 29.12 29.12 0 0 0-41.728 0z"})]))}}),cu=EY,xY=Q({name:"ArrowRight",__name:"arrow-right",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"})]))}}),Ws=xY,TY=Q({name:"ArrowUp",__name:"arrow-up",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"m488.832 344.32-339.84 356.672a32 32 0 0 0 0 44.16l.384.384a29.44 29.44 0 0 0 42.688 0l320-335.872 319.872 335.872a29.44 29.44 0 0 0 42.688 0l.384-.384a32 32 0 0 0 0-44.16L535.168 344.32a32 32 0 0 0-46.336 0"})]))}}),D0=TY,MY=Q({name:"Avatar",__name:"avatar",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M628.736 528.896A416 416 0 0 1 928 928H96a415.872 415.872 0 0 1 299.264-399.104L512 704zM720 304a208 208 0 1 1-416 0 208 208 0 0 1 416 0"})]))}}),OY=MY,IY=Q({name:"Back",__name:"back",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M224 480h640a32 32 0 1 1 0 64H224a32 32 0 0 1 0-64"}),_("path",{fill:"currentColor",d:"m237.248 512 265.408 265.344a32 32 0 0 1-45.312 45.312l-288-288a32 32 0 0 1 0-45.312l288-288a32 32 0 1 1 45.312 45.312z"})]))}}),AY=IY,NY=Q({name:"Bell",__name:"bell",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M512 64a64 64 0 0 1 64 64v64H448v-64a64 64 0 0 1 64-64"}),_("path",{fill:"currentColor",d:"M256 768h512V448a256 256 0 1 0-512 0zm256-640a320 320 0 0 1 320 320v384H192V448a320 320 0 0 1 320-320"}),_("path",{fill:"currentColor",d:"M96 768h832q32 0 32 32t-32 32H96q-32 0-32-32t32-32m352 128h128a64 64 0 0 1-128 0"})]))}}),PY=NY,LY=Q({name:"Bottom",__name:"bottom",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M544 805.888V168a32 32 0 1 0-64 0v637.888L246.656 557.952a30.72 30.72 0 0 0-45.312 0 35.52 35.52 0 0 0 0 48.064l288 306.048a30.72 30.72 0 0 0 45.312 0l288-306.048a35.52 35.52 0 0 0 0-48 30.72 30.72 0 0 0-45.312 0L544 805.824z"})]))}}),RY=LY,DY=Q({name:"Calendar",__name:"calendar",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M128 384v512h768V192H768v32a32 32 0 1 1-64 0v-32H320v32a32 32 0 0 1-64 0v-32H128v128h768v64zm192-256h384V96a32 32 0 1 1 64 0v32h160a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h160V96a32 32 0 0 1 64 0zm-32 384h64a32 32 0 0 1 0 64h-64a32 32 0 0 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m192-192h64a32 32 0 0 1 0 64h-64a32 32 0 0 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m192-192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64"})]))}}),VY=DY,FY=Q({name:"CameraFilled",__name:"camera-filled",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M160 224a64 64 0 0 0-64 64v512a64 64 0 0 0 64 64h704a64 64 0 0 0 64-64V288a64 64 0 0 0-64-64H748.416l-46.464-92.672A64 64 0 0 0 644.736 96H379.328a64 64 0 0 0-57.216 35.392L275.776 224zm352 435.2a115.2 115.2 0 1 0 0-230.4 115.2 115.2 0 0 0 0 230.4m0 140.8a256 256 0 1 1 0-512 256 256 0 0 1 0 512"})]))}}),BY=FY,zY=Q({name:"CaretBottom",__name:"caret-bottom",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"m192 384 320 384 320-384z"})]))}}),jY=zY,HY=Q({name:"ChatDotRound",__name:"chat-dot-round",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"m174.72 855.68 135.296-45.12 23.68 11.84C388.096 849.536 448.576 864 512 864c211.84 0 384-166.784 384-352S723.84 160 512 160 128 326.784 128 512c0 69.12 24.96 139.264 70.848 199.232l22.08 28.8-46.272 115.584zm-45.248 82.56A32 32 0 0 1 89.6 896l58.368-145.92C94.72 680.32 64 596.864 64 512 64 299.904 256 96 512 96s448 203.904 448 416-192 416-448 416a461.056 461.056 0 0 1-206.912-48.384l-175.616 58.56z"}),_("path",{fill:"currentColor",d:"M512 563.2a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4m192 0a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4m-384 0a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4"})]))}}),UY=HY,WY=Q({name:"ChatDotSquare",__name:"chat-dot-square",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M273.536 736H800a64 64 0 0 0 64-64V256a64 64 0 0 0-64-64H224a64 64 0 0 0-64 64v570.88zM296 800 147.968 918.4A32 32 0 0 1 96 893.44V256a128 128 0 0 1 128-128h576a128 128 0 0 1 128 128v416a128 128 0 0 1-128 128z"}),_("path",{fill:"currentColor",d:"M512 499.2a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4zm192 0a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4zm-384 0a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4z"})]))}}),KY=WY,qY=Q({name:"Check",__name:"check",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M406.656 706.944 195.84 496.256a32 32 0 1 0-45.248 45.248l256 256 512-512a32 32 0 0 0-45.248-45.248L406.592 706.944z"})]))}}),tT=qY,GY=Q({name:"CircleCheck",__name:"circle-check",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),_("path",{fill:"currentColor",d:"M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752l265.344-265.408z"})]))}}),fw=GY,YY=Q({name:"CircleCloseFilled",__name:"circle-close-filled",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336z"})]))}}),nT=YY,ZY=Q({name:"CircleClose",__name:"circle-close",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z"}),_("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})]))}}),wd=ZY,JY=Q({name:"Clock",__name:"clock",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),_("path",{fill:"currentColor",d:"M480 256a32 32 0 0 1 32 32v256a32 32 0 0 1-64 0V288a32 32 0 0 1 32-32"}),_("path",{fill:"currentColor",d:"M480 512h256q32 0 32 32t-32 32H480q-32 0-32-32t32-32"})]))}}),oT=JY,XY=Q({name:"CloseBold",__name:"close-bold",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M195.2 195.2a64 64 0 0 1 90.496 0L512 421.504 738.304 195.2a64 64 0 0 1 90.496 90.496L602.496 512 828.8 738.304a64 64 0 0 1-90.496 90.496L512 602.496 285.696 828.8a64 64 0 0 1-90.496-90.496L421.504 512 195.2 285.696a64 64 0 0 1 0-90.496z"})]))}}),QY=XY,eZ=Q({name:"Close",__name:"close",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})]))}}),Js=eZ,tZ=Q({name:"Comment",__name:"comment",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M736 504a56 56 0 1 1 0-112 56 56 0 0 1 0 112m-224 0a56 56 0 1 1 0-112 56 56 0 0 1 0 112m-224 0a56 56 0 1 1 0-112 56 56 0 0 1 0 112M128 128v640h192v160l224-160h352V128z"})]))}}),nZ=tZ,oZ=Q({name:"CopyDocument",__name:"copy-document",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M768 832a128 128 0 0 1-128 128H192A128 128 0 0 1 64 832V384a128 128 0 0 1 128-128v64a64 64 0 0 0-64 64v448a64 64 0 0 0 64 64h448a64 64 0 0 0 64-64z"}),_("path",{fill:"currentColor",d:"M384 128a64 64 0 0 0-64 64v448a64 64 0 0 0 64 64h448a64 64 0 0 0 64-64V192a64 64 0 0 0-64-64zm0-64h448a128 128 0 0 1 128 128v448a128 128 0 0 1-128 128H384a128 128 0 0 1-128-128V192A128 128 0 0 1 384 64"})]))}}),rZ=oZ,sZ=Q({name:"DArrowLeft",__name:"d-arrow-left",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M529.408 149.376a29.12 29.12 0 0 1 41.728 0 30.592 30.592 0 0 1 0 42.688L259.264 511.936l311.872 319.936a30.592 30.592 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L197.76 534.272a32 32 0 0 1 0-44.672l331.648-340.224zm256 0a29.12 29.12 0 0 1 41.728 0 30.592 30.592 0 0 1 0 42.688L515.264 511.936l311.872 319.936a30.592 30.592 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L453.76 534.272a32 32 0 0 1 0-44.672l331.648-340.224z"})]))}}),Jc=sZ,iZ=Q({name:"DArrowRight",__name:"d-arrow-right",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M452.864 149.312a29.12 29.12 0 0 1 41.728.064L826.24 489.664a32 32 0 0 1 0 44.672L494.592 874.624a29.12 29.12 0 0 1-41.728 0 30.592 30.592 0 0 1 0-42.752L764.736 512 452.864 192a30.592 30.592 0 0 1 0-42.688m-256 0a29.12 29.12 0 0 1 41.728.064L570.24 489.664a32 32 0 0 1 0 44.672L238.592 874.624a29.12 29.12 0 0 1-41.728 0 30.592 30.592 0 0 1 0-42.752L508.736 512 196.864 192a30.592 30.592 0 0 1 0-42.688z"})]))}}),Xc=iZ,lZ=Q({name:"DeleteFilled",__name:"delete-filled",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M352 192V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64H96a32 32 0 0 1 0-64zm64 0h192v-64H416zM192 960a32 32 0 0 1-32-32V256h704v672a32 32 0 0 1-32 32zm224-192a32 32 0 0 0 32-32V416a32 32 0 0 0-64 0v320a32 32 0 0 0 32 32m192 0a32 32 0 0 0 32-32V416a32 32 0 0 0-64 0v320a32 32 0 0 0 32 32"})]))}}),aZ=lZ,uZ=Q({name:"Delete",__name:"delete",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"})]))}}),rT=uZ,cZ=Q({name:"Document",__name:"document",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M832 384H576V128H192v768h640zm-26.496-64L640 154.496V320zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m160 448h384v64H320zm0-192h160v64H320zm0 384h384v64H320z"})]))}}),dZ=cZ,fZ=Q({name:"EditPen",__name:"edit-pen",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"m199.04 672.64 193.984 112 224-387.968-193.92-112-224 388.032zm-23.872 60.16 32.896 148.288 144.896-45.696zM455.04 229.248l193.92 112 56.704-98.112-193.984-112-56.64 98.112zM104.32 708.8l384-665.024 304.768 175.936L409.152 884.8h.064l-248.448 78.336zm384 254.272v-64h448v64h-448z"})]))}}),pZ=fZ,hZ=Q({name:"Expand",__name:"expand",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M128 192h768v128H128zm0 256h512v128H128zm0 256h768v128H128zm576-352 192 160-192 128z"})]))}}),mZ=hZ,gZ=Q({name:"FullScreen",__name:"full-screen",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"m160 96.064 192 .192a32 32 0 0 1 0 64l-192-.192V352a32 32 0 0 1-64 0V96h64zm0 831.872V928H96V672a32 32 0 1 1 64 0v191.936l192-.192a32 32 0 1 1 0 64zM864 96.064V96h64v256a32 32 0 1 1-64 0V160.064l-192 .192a32 32 0 1 1 0-64l192-.192zm0 831.872-192-.192a32 32 0 0 1 0-64l192 .192V672a32 32 0 1 1 64 0v256h-64z"})]))}}),sT=gZ,vZ=Q({name:"Guide",__name:"guide",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M640 608h-64V416h64zm0 160v160a32 32 0 0 1-32 32H416a32 32 0 0 1-32-32V768h64v128h128V768zM384 608V416h64v192zm256-352h-64V128H448v128h-64V96a32 32 0 0 1 32-32h192a32 32 0 0 1 32 32z"}),_("path",{fill:"currentColor",d:"m220.8 256-71.232 80 71.168 80H768V256H220.8zm-14.4-64H800a32 32 0 0 1 32 32v224a32 32 0 0 1-32 32H206.4a32 32 0 0 1-23.936-10.752l-99.584-112a32 32 0 0 1 0-42.496l99.584-112A32 32 0 0 1 206.4 192m678.784 496-71.104 80H266.816V608h547.2l71.168 80zm-56.768-144H234.88a32 32 0 0 0-32 32v224a32 32 0 0 0 32 32h593.6a32 32 0 0 0 23.936-10.752l99.584-112a32 32 0 0 0 0-42.496l-99.584-112A32 32 0 0 0 828.48 544z"})]))}}),yZ=vZ,_Z=Q({name:"Hide",__name:"hide",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M876.8 156.8c0-9.6-3.2-16-9.6-22.4-6.4-6.4-12.8-9.6-22.4-9.6-9.6 0-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176C44.8 438.4 0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4 0 9.6 3.2 16 9.6 22.4 6.4 6.4 12.8 9.6 22.4 9.6 9.6 0 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4Zm-646.4 528c-76.8-70.4-128-128-153.6-172.8 28.8-48 80-105.6 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4Zm140.8-96c-12.8-22.4-19.2-48-19.2-76.8 0-44.8 16-83.2 48-112 32-28.8 67.2-48 112-48 28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6-28.8 48-80 105.6-153.6 172.8-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176C979.199 585.6 1024 528 1024 512s-48.001-73.6-134.401-176Z"}),_("path",{fill:"currentColor",d:"M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112-32 28.8-67.2 48-112 48Z"})]))}}),iT=_Z,bZ=Q({name:"HomeFilled",__name:"home-filled",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M512 128 128 447.936V896h255.936V640H640v256h255.936V447.936z"})]))}}),wZ=bZ,CZ=Q({name:"InfoFilled",__name:"info-filled",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64m67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344M590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.992 12.992 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"})]))}}),V0=CZ,kZ=Q({name:"Iphone",__name:"iphone",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M224 768v96.064a64 64 0 0 0 64 64h448a64 64 0 0 0 64-64V768zm0-64h576V160a64 64 0 0 0-64-64H288a64 64 0 0 0-64 64zm32 288a96 96 0 0 1-96-96V128a96 96 0 0 1 96-96h512a96 96 0 0 1 96 96v768a96 96 0 0 1-96 96zm304-144a48 48 0 1 1-96 0 48 48 0 0 1 96 0"})]))}}),SZ=kZ,$Z=Q({name:"Loading",__name:"loading",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"})]))}}),pw=$Z,EZ=Q({name:"Lock",__name:"lock",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M224 448a32 32 0 0 0-32 32v384a32 32 0 0 0 32 32h576a32 32 0 0 0 32-32V480a32 32 0 0 0-32-32zm0-64h576a96 96 0 0 1 96 96v384a96 96 0 0 1-96 96H224a96 96 0 0 1-96-96V480a96 96 0 0 1 96-96"}),_("path",{fill:"currentColor",d:"M512 544a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V576a32 32 0 0 1 32-32m192-160v-64a192 192 0 1 0-384 0v64zM512 64a256 256 0 0 1 256 256v128H256V320A256 256 0 0 1 512 64"})]))}}),xZ=EZ,TZ=Q({name:"Memo",__name:"memo",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg","xml:space":"preserve",style:{"enable-background":"new 0 0 1024 1024"},viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M480 320h192c21.33 0 32-10.67 32-32s-10.67-32-32-32H480c-21.33 0-32 10.67-32 32s10.67 32 32 32"}),_("path",{fill:"currentColor",d:"M887.01 72.99C881.01 67 873.34 64 864 64H160c-9.35 0-17.02 3-23.01 8.99C131 78.99 128 86.66 128 96v832c0 9.35 2.99 17.02 8.99 23.01S150.66 960 160 960h704c9.35 0 17.02-2.99 23.01-8.99S896 937.34 896 928V96c0-9.35-3-17.02-8.99-23.01M192 896V128h96v768zm640 0H352V128h480z"}),_("path",{fill:"currentColor",d:"M480 512h192c21.33 0 32-10.67 32-32s-10.67-32-32-32H480c-21.33 0-32 10.67-32 32s10.67 32 32 32m0 192h192c21.33 0 32-10.67 32-32s-10.67-32-32-32H480c-21.33 0-32 10.67-32 32s10.67 32 32 32"})]))}}),MZ=TZ,OZ=Q({name:"Message",__name:"message",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M128 224v512a64 64 0 0 0 64 64h640a64 64 0 0 0 64-64V224zm0-64h768a64 64 0 0 1 64 64v512a128 128 0 0 1-128 128H192A128 128 0 0 1 64 736V224a64 64 0 0 1 64-64"}),_("path",{fill:"currentColor",d:"M904 224 656.512 506.88a192 192 0 0 1-289.024 0L120 224zm-698.944 0 210.56 240.704a128 128 0 0 0 192.704 0L818.944 224H205.056"})]))}}),IZ=OZ,AZ=Q({name:"Minus",__name:"minus",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M128 544h768a32 32 0 1 0 0-64H128a32 32 0 0 0 0 64"})]))}}),NZ=AZ,PZ=Q({name:"MoreFilled",__name:"more-filled",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M176 416a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224"})]))}}),tb=PZ,LZ=Q({name:"More",__name:"more",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M176 416a112 112 0 1 0 0 224 112 112 0 0 0 0-224m0 64a48 48 0 1 1 0 96 48 48 0 0 1 0-96m336-64a112 112 0 1 1 0 224 112 112 0 0 1 0-224m0 64a48 48 0 1 0 0 96 48 48 0 0 0 0-96m336-64a112 112 0 1 1 0 224 112 112 0 0 1 0-224m0 64a48 48 0 1 0 0 96 48 48 0 0 0 0-96"})]))}}),RZ=LZ,DZ=Q({name:"Notebook",__name:"notebook",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M192 128v768h640V128zm-32-64h704a32 32 0 0 1 32 32v832a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32"}),_("path",{fill:"currentColor",d:"M672 128h64v768h-64zM96 192h128q32 0 32 32t-32 32H96q-32 0-32-32t32-32m0 192h128q32 0 32 32t-32 32H96q-32 0-32-32t32-32m0 192h128q32 0 32 32t-32 32H96q-32 0-32-32t32-32m0 192h128q32 0 32 32t-32 32H96q-32 0-32-32t32-32"})]))}}),VZ=DZ,FZ=Q({name:"Operation",__name:"operation",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M389.44 768a96.064 96.064 0 0 1 181.12 0H896v64H570.56a96.064 96.064 0 0 1-181.12 0H128v-64zm192-288a96.064 96.064 0 0 1 181.12 0H896v64H762.56a96.064 96.064 0 0 1-181.12 0H128v-64zm-320-288a96.064 96.064 0 0 1 181.12 0H896v64H442.56a96.064 96.064 0 0 1-181.12 0H128v-64z"})]))}}),BZ=FZ,zZ=Q({name:"PictureFilled",__name:"picture-filled",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M96 896a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h832a32 32 0 0 1 32 32v704a32 32 0 0 1-32 32zm315.52-228.48-68.928-68.928a32 32 0 0 0-45.248 0L128 768.064h778.688l-242.112-290.56a32 32 0 0 0-49.216 0L458.752 665.408a32 32 0 0 1-47.232 2.112M256 384a96 96 0 1 0 192.064-.064A96 96 0 0 0 256 384"})]))}}),jZ=zZ,HZ=Q({name:"Picture",__name:"picture",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M160 160v704h704V160zm-32-64h768a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32H128a32 32 0 0 1-32-32V128a32 32 0 0 1 32-32"}),_("path",{fill:"currentColor",d:"M384 288q64 0 64 64t-64 64q-64 0-64-64t64-64M185.408 876.992l-50.816-38.912L350.72 556.032a96 96 0 0 1 134.592-17.856l1.856 1.472 122.88 99.136a32 32 0 0 0 44.992-4.864l216-269.888 49.92 39.936-215.808 269.824-.256.32a96 96 0 0 1-135.04 14.464l-122.88-99.072-.64-.512a32 32 0 0 0-44.8 5.952z"})]))}}),UZ=HZ,WZ=Q({name:"Plus",__name:"plus",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64z"})]))}}),hw=WZ,KZ=Q({name:"Postcard",__name:"postcard",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M160 224a32 32 0 0 0-32 32v512a32 32 0 0 0 32 32h704a32 32 0 0 0 32-32V256a32 32 0 0 0-32-32zm0-64h704a96 96 0 0 1 96 96v512a96 96 0 0 1-96 96H160a96 96 0 0 1-96-96V256a96 96 0 0 1 96-96"}),_("path",{fill:"currentColor",d:"M704 320a64 64 0 1 1 0 128 64 64 0 0 1 0-128M288 448h256q32 0 32 32t-32 32H288q-32 0-32-32t32-32m0 128h256q32 0 32 32t-32 32H288q-32 0-32-32t32-32"})]))}}),qZ=KZ,GZ=Q({name:"Reading",__name:"reading",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"m512 863.36 384-54.848v-638.72L525.568 222.72a96 96 0 0 1-27.136 0L128 169.792v638.72zM137.024 106.432l370.432 52.928a32 32 0 0 0 9.088 0l370.432-52.928A64 64 0 0 1 960 169.792v638.72a64 64 0 0 1-54.976 63.36l-388.48 55.488a32 32 0 0 1-9.088 0l-388.48-55.488A64 64 0 0 1 64 808.512v-638.72a64 64 0 0 1 73.024-63.36z"}),_("path",{fill:"currentColor",d:"M480 192h64v704h-64z"})]))}}),YZ=GZ,ZZ=Q({name:"RefreshLeft",__name:"refresh-left",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M289.088 296.704h92.992a32 32 0 0 1 0 64H232.96a32 32 0 0 1-32-32V179.712a32 32 0 0 1 64 0v50.56a384 384 0 0 1 643.84 282.88 384 384 0 0 1-383.936 384 384 384 0 0 1-384-384h64a320 320 0 1 0 640 0 320 320 0 0 0-555.712-216.448z"})]))}}),lT=ZZ,JZ=Q({name:"RefreshRight",__name:"refresh-right",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M784.512 230.272v-50.56a32 32 0 1 1 64 0v149.056a32 32 0 0 1-32 32H667.52a32 32 0 1 1 0-64h92.992A320 320 0 1 0 524.8 833.152a320 320 0 0 0 320-320h64a384 384 0 0 1-384 384 384 384 0 0 1-384-384 384 384 0 0 1 643.712-282.88z"})]))}}),XZ=JZ,QZ=Q({name:"ScaleToOriginal",__name:"scale-to-original",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M813.176 180.706a60.235 60.235 0 0 1 60.236 60.235v481.883a60.235 60.235 0 0 1-60.236 60.235H210.824a60.235 60.235 0 0 1-60.236-60.235V240.94a60.235 60.235 0 0 1 60.236-60.235h602.352zm0-60.235H210.824A120.47 120.47 0 0 0 90.353 240.94v481.883a120.47 120.47 0 0 0 120.47 120.47h602.353a120.47 120.47 0 0 0 120.471-120.47V240.94a120.47 120.47 0 0 0-120.47-120.47zm-120.47 180.705a30.118 30.118 0 0 0-30.118 30.118v301.177a30.118 30.118 0 0 0 60.236 0V331.294a30.118 30.118 0 0 0-30.118-30.118zm-361.412 0a30.118 30.118 0 0 0-30.118 30.118v301.177a30.118 30.118 0 1 0 60.236 0V331.294a30.118 30.118 0 0 0-30.118-30.118M512 361.412a30.118 30.118 0 0 0-30.118 30.117v30.118a30.118 30.118 0 0 0 60.236 0V391.53A30.118 30.118 0 0 0 512 361.412M512 512a30.118 30.118 0 0 0-30.118 30.118v30.117a30.118 30.118 0 0 0 60.236 0v-30.117A30.118 30.118 0 0 0 512 512"})]))}}),eJ=QZ,tJ=Q({name:"Search",__name:"search",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704"})]))}}),nJ=tJ,oJ=Q({name:"SuccessFilled",__name:"success-filled",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.272 38.272 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"})]))}}),mw=oJ,rJ=Q({name:"Tickets",__name:"tickets",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M192 128v768h640V128zm-32-64h704a32 32 0 0 1 32 32v832a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m160 448h384v64H320zm0-192h192v64H320zm0 384h384v64H320z"})]))}}),sJ=rJ,iJ=Q({name:"Timer",__name:"timer",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M512 896a320 320 0 1 0 0-640 320 320 0 0 0 0 640m0 64a384 384 0 1 1 0-768 384 384 0 0 1 0 768"}),_("path",{fill:"currentColor",d:"M512 320a32 32 0 0 1 32 32l-.512 224a32 32 0 1 1-64 0L480 352a32 32 0 0 1 32-32"}),_("path",{fill:"currentColor",d:"M448 576a64 64 0 1 0 128 0 64 64 0 1 0-128 0m96-448v128h-64V128h-96a32 32 0 0 1 0-64h256a32 32 0 1 1 0 64z"})]))}}),lJ=iJ,aJ=Q({name:"Top",__name:"top",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M572.235 205.282v600.365a30.118 30.118 0 1 1-60.235 0V205.282L292.382 438.633a28.913 28.913 0 0 1-42.646 0 33.43 33.43 0 0 1 0-45.236l271.058-288.045a28.913 28.913 0 0 1 42.647 0L834.5 393.397a33.43 33.43 0 0 1 0 45.176 28.913 28.913 0 0 1-42.647 0l-219.618-233.23z"})]))}}),uJ=aJ,cJ=Q({name:"UploadFilled",__name:"upload-filled",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M544 864V672h128L512 480 352 672h128v192H320v-1.6c-5.376.32-10.496 1.6-16 1.6A240 240 0 0 1 64 624c0-123.136 93.12-223.488 212.608-237.248A239.808 239.808 0 0 1 512 192a239.872 239.872 0 0 1 235.456 194.752c119.488 13.76 212.48 114.112 212.48 237.248a240 240 0 0 1-240 240c-5.376 0-10.56-1.28-16-1.6v1.6z"})]))}}),dJ=cJ,fJ=Q({name:"View",__name:"view",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.192 160.192 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"})]))}}),aT=fJ,pJ=Q({name:"WarningFilled",__name:"warning-filled",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 192a58.432 58.432 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.432 58.432 0 0 0 512 256m0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4"})]))}}),gw=pJ,hJ=Q({name:"ZoomIn",__name:"zoom-in",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704m-32-384v-96a32 32 0 0 1 64 0v96h96a32 32 0 0 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64z"})]))}}),uT=hJ,mJ=Q({name:"ZoomOut",__name:"zoom-out",setup(e){return(t,n)=>(C(),T("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704M352 448h256a32 32 0 0 1 0 64H352a32 32 0 0 1 0-64"})]))}}),gJ=mJ;const cT="__epPropKey",Ce=e=>e,vJ=e=>pt(e)&&!!e[cT],F0=(e,t)=>{if(!pt(e)||vJ(e))return e;const{values:n,required:o,default:r,type:s,validator:i}=e,a={type:s,required:!!o,validator:n||i?u=>{let c=!1,d=[];if(n&&(d=Array.from(n),vt(e,"default")&&d.push(r),c||(c=d.includes(u))),i&&(c||(c=i(u))),!c&&d.length>0){const f=[...new Set(d)].map(p=>JSON.stringify(p)).join(", ");XE(`Invalid prop: validation failed${t?` for prop "${t}"`:""}. Expected one of [${f}], got value ${JSON.stringify(u)}.`)}return c}:void 0,[cT]:!0};return vt(e,"default")&&(a.default=r),a},Ke=e=>Ag(Object.entries(e).map(([t,n])=>[t,F0(n,t)])),Io=Ce([String,Object,Function]),dT={Close:Js},yJ={Close:Js,SuccessFilled:mw,InfoFilled:V0,WarningFilled:gw,CircleCloseFilled:nT},Ng={success:mw,warning:gw,error:nT,info:V0},fT={validating:pw,success:fw,error:wd},Zt=(e,t)=>{if(e.install=n=>{for(const o of[e,...Object.values(t??{})])n.component(o.name,o)},t)for(const[n,o]of Object.entries(t))e[n]=o;return e},_J=(e,t)=>(e.install=n=>{e._context=n._context,n.config.globalProperties[t]=e},e),bJ=(e,t)=>(e.install=n=>{n.directive(t,e)},e),Jn=e=>(e.install=yt,e),vw=(...e)=>t=>{e.forEach(n=>{et(n)?n(t):n.value=t})},rt={tab:"Tab",enter:"Enter",space:"Space",left:"ArrowLeft",up:"ArrowUp",right:"ArrowRight",down:"ArrowDown",esc:"Escape",delete:"Delete",backspace:"Backspace",numpadEnter:"NumpadEnter",pageUp:"PageUp",pageDown:"PageDown",home:"Home",end:"End"},wJ=["year","years","month","date","dates","week","datetime","datetimerange","daterange","monthrange"],Jt="update:modelValue",Cd="change",Zm="input",Jl=["","default","small","large"],CJ=e=>["",...Jl].includes(e);var Jm=(e=>(e[e.TEXT=1]="TEXT",e[e.CLASS=2]="CLASS",e[e.STYLE=4]="STYLE",e[e.PROPS=8]="PROPS",e[e.FULL_PROPS=16]="FULL_PROPS",e[e.HYDRATE_EVENTS=32]="HYDRATE_EVENTS",e[e.STABLE_FRAGMENT=64]="STABLE_FRAGMENT",e[e.KEYED_FRAGMENT=128]="KEYED_FRAGMENT",e[e.UNKEYED_FRAGMENT=256]="UNKEYED_FRAGMENT",e[e.NEED_PATCH=512]="NEED_PATCH",e[e.DYNAMIC_SLOTS=1024]="DYNAMIC_SLOTS",e[e.HOISTED=-1]="HOISTED",e[e.BAIL=-2]="BAIL",e))(Jm||{});const Xm=e=>{const t=Te(e)?e:[e],n=[];return t.forEach(o=>{var r;Te(o)?n.push(...Xm(o)):yo(o)&&Te(o.children)?n.push(...Xm(o.children)):(n.push(o),yo(o)&&((r=o.component)!=null&&r.subTree)&&n.push(...Xm(o.component.subTree)))}),n},rs=e=>!e&&e!==0?[]:Array.isArray(e)?e:[e],pT=e=>/([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e),Eo=e=>e,kJ=["class","style"],SJ=/^on[A-Z]/,hT=(e={})=>{const{excludeListeners:t=!1,excludeKeys:n}=e,o=R(()=>((n==null?void 0:n.value)||[]).concat(kJ)),r=at();return R(r?()=>{var s;return Ag(Object.entries((s=r.proxy)==null?void 0:s.$attrs).filter(([i])=>!o.value.includes(i)&&!(t&&SJ.test(i))))}:()=>({}))},qa=({from:e,replacement:t,scope:n,version:o,ref:r,type:s="API"},i)=>{Me(()=>g(i),l=>{},{immediate:!0})},mT=(e,t,n,o)=>{let r={offsetX:0,offsetY:0};const s=a=>{const u=a.clientX,c=a.clientY,{offsetX:d,offsetY:f}=r,p=e.value.getBoundingClientRect(),h=p.left,m=p.top,y=p.width,v=p.height,k=document.documentElement.clientWidth,b=document.documentElement.clientHeight,$=-h+d,x=-m+f,E=k-h-y+d,M=b-m-v+f,N=I=>{let V=d+I.clientX-u,F=f+I.clientY-c;o!=null&&o.value||(V=Math.min(Math.max(V,$),E),F=Math.min(Math.max(F,x),M)),r={offsetX:V,offsetY:F},e.value&&(e.value.style.transform=`translate(${Zo(V)}, ${Zo(F)})`)},P=()=>{document.removeEventListener("mousemove",N),document.removeEventListener("mouseup",P)};document.addEventListener("mousemove",N),document.addEventListener("mouseup",P)},i=()=>{t.value&&e.value&&t.value.addEventListener("mousedown",s)},l=()=>{t.value&&e.value&&t.value.removeEventListener("mousedown",s)};Ct(()=>{as(()=>{n.value?i():l()})}),xn(()=>{l()})};var $J={name:"en",el:{breadcrumb:{label:"Breadcrumb"},colorpicker:{confirm:"OK",clear:"Clear",defaultLabel:"color picker",description:"current color is {color}. press enter to select a new color."},datepicker:{now:"Now",today:"Today",cancel:"Cancel",clear:"Clear",confirm:"OK",dateTablePrompt:"Use the arrow keys and enter to select the day of the month",monthTablePrompt:"Use the arrow keys and enter to select the month",yearTablePrompt:"Use the arrow keys and enter to select the year",selectedDate:"Selected date",selectDate:"Select date",selectTime:"Select time",startDate:"Start Date",startTime:"Start Time",endDate:"End Date",endTime:"End Time",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",year:"",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December",week:"week",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},weeksFull:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"},months:{jan:"Jan",feb:"Feb",mar:"Mar",apr:"Apr",may:"May",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dec"}},inputNumber:{decrease:"decrease number",increase:"increase number"},select:{loading:"Loading",noMatch:"No matching data",noData:"No data",placeholder:"Select"},dropdown:{toggleDropdown:"Toggle Dropdown"},cascader:{noMatch:"No matching data",loading:"Loading",placeholder:"Select",noData:"No data"},pagination:{goto:"Go to",pagesize:"/page",total:"Total {total}",pageClassifier:"",page:"Page",prev:"Go to previous page",next:"Go to next page",currentPage:"page {pager}",prevPages:"Previous {pager} pages",nextPages:"Next {pager} pages",deprecationWarning:"Deprecated usages detected, please refer to the el-pagination documentation for more details"},dialog:{close:"Close this dialog"},drawer:{close:"Close this dialog"},messagebox:{title:"Message",confirm:"OK",cancel:"Cancel",error:"Illegal input",close:"Close this dialog"},upload:{deleteTip:"press delete to remove",delete:"Delete",preview:"Preview",continue:"Continue"},slider:{defaultLabel:"slider between {min} and {max}",defaultRangeStartLabel:"pick start value",defaultRangeEndLabel:"pick end value"},table:{emptyText:"No Data",confirmFilter:"Confirm",resetFilter:"Reset",clearFilter:"All",sumText:"Sum"},tour:{next:"Next",previous:"Previous",finish:"Finish"},tree:{emptyText:"No Data"},transfer:{noMatch:"No matching data",noData:"No data",titles:["List 1","List 2"],filterPlaceholder:"Enter keyword",noCheckedFormat:"{total} items",hasCheckedFormat:"{checked}/{total} checked"},image:{error:"FAILED"},pageHeader:{title:"Back"},popconfirm:{confirmButtonText:"Yes",cancelButtonText:"No"},carousel:{leftArrow:"Carousel arrow left",rightArrow:"Carousel arrow right",indicator:"Carousel switch to index {index}"}}};const EJ=e=>(t,n)=>xJ(t,n,g(e)),xJ=(e,t,n)=>Mr(n,e,e).replace(/\{(\w+)\}/g,(o,r)=>{var s;return`${(s=t==null?void 0:t[r])!=null?s:`{${r}}`}`}),TJ=e=>{const t=R(()=>g(e).name),n=on(e)?e:q(e);return{lang:t,locale:n,t:EJ(e)}},gT=Symbol("localeContextKey"),Kt=e=>{const t=e||je(gT,q());return TJ(R(()=>t.value||$J))},Uf="el",MJ="is-",pa=(e,t,n,o,r)=>{let s=`${e}-${t}`;return n&&(s+=`-${n}`),o&&(s+=`__${o}`),r&&(s+=`--${r}`),s},vT=Symbol("namespaceContextKey"),yw=e=>{const t=e||(at()?je(vT,q(Uf)):q(Uf));return R(()=>g(t)||Uf)},Re=(e,t)=>{const n=yw(t);return{namespace:n,b:(m="")=>pa(n.value,e,m,"",""),e:m=>m?pa(n.value,e,"",m,""):"",m:m=>m?pa(n.value,e,"","",m):"",be:(m,y)=>m&&y?pa(n.value,e,m,y,""):"",em:(m,y)=>m&&y?pa(n.value,e,"",m,y):"",bm:(m,y)=>m&&y?pa(n.value,e,m,"",y):"",bem:(m,y,v)=>m&&y&&v?pa(n.value,e,m,y,v):"",is:(m,...y)=>{const v=y.length>=1?y[0]:!0;return m&&v?`${MJ}${m}`:""},cssVar:m=>{const y={};for(const v in m)m[v]&&(y[`--${n.value}-${v}`]=m[v]);return y},cssVarName:m=>`--${n.value}-${m}`,cssVarBlock:m=>{const y={};for(const v in m)m[v]&&(y[`--${n.value}-${e}-${v}`]=m[v]);return y},cssVarBlockName:m=>`--${n.value}-${e}-${m}`}},yT=(e,t={})=>{on(e)||Cs("[useLockscreen]","You need to pass a ref param to this function");const n=t.ns||Re("popup"),o=Y$(()=>n.bm("parent","hidden"));if(!Tt||Oi(document.body,o.value))return;let r=0,s=!1,i="0";const l=()=>{setTimeout(()=>{Zs(document==null?void 0:document.body,o.value),s&&document&&(document.body.style.width=i)},200)};Me(e,a=>{if(!a){l();return}s=!Oi(document.body,o.value),s&&(i=document.body.style.width),r=kY(n.namespace.value);const u=document.documentElement.clientHeight<document.body.scrollHeight,c=Sl(document.body,"overflowY");r>0&&(u||c==="scroll")&&s&&(document.body.style.width=`calc(100% - ${r}px)`),uu(document.body,o.value)}),s3(()=>l())},OJ=F0({type:Ce(Boolean),default:null}),IJ=F0({type:Ce(Function)}),_T=e=>{const t=`update:${e}`,n=`onUpdate:${e}`,o=[t],r={[e]:OJ,[n]:IJ};return{useModelToggle:({indicator:i,toggleReason:l,shouldHideWhenRouteChanges:a,shouldProceed:u,onShow:c,onHide:d})=>{const f=at(),{emit:p}=f,h=f.props,m=R(()=>et(h[n])),y=R(()=>h[e]===null),v=M=>{i.value!==!0&&(i.value=!0,l&&(l.value=M),et(c)&&c(M))},k=M=>{i.value!==!1&&(i.value=!1,l&&(l.value=M),et(d)&&d(M))},b=M=>{if(h.disabled===!0||et(u)&&!u())return;const N=m.value&&Tt;N&&p(t,!0),(y.value||!N)&&v(M)},$=M=>{if(h.disabled===!0||!Tt)return;const N=m.value&&Tt;N&&p(t,!1),(y.value||!N)&&k(M)},x=M=>{Br(M)&&(h.disabled&&M?m.value&&p(t,!1):i.value!==M&&(M?v():k()))},E=()=>{i.value?$():b()};return Me(()=>h[e],x),a&&f.appContext.config.globalProperties.$route!==void 0&&Me(()=>({...f.proxy.$route}),()=>{a.value&&i.value&&$()}),Ct(()=>{x(h[e])}),{hide:$,show:b,toggle:E,hasUpdateHandler:m}},useModelToggleProps:r,useModelToggleEmits:o}};_T("modelValue");const bT=e=>{const t=at();return R(()=>{var n,o;return(o=(n=t==null?void 0:t.proxy)==null?void 0:n.$props)==null?void 0:o[e]})};var Ko="top",zr="bottom",jr="right",qo="left",_w="auto",dh=[Ko,zr,jr,qo],Qc="start",Pp="end",AJ="clippingParents",wT="viewport",Wd="popper",NJ="reference",y5=dh.reduce(function(e,t){return e.concat([t+"-"+Qc,t+"-"+Pp])},[]),B0=[].concat(dh,[_w]).reduce(function(e,t){return e.concat([t,t+"-"+Qc,t+"-"+Pp])},[]),PJ="beforeRead",LJ="read",RJ="afterRead",DJ="beforeMain",VJ="main",FJ="afterMain",BJ="beforeWrite",zJ="write",jJ="afterWrite",HJ=[PJ,LJ,RJ,DJ,VJ,FJ,BJ,zJ,jJ];function Xs(e){return e?(e.nodeName||"").toLowerCase():null}function ks(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function ed(e){var t=ks(e).Element;return e instanceof t||e instanceof Element}function Lr(e){var t=ks(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function bw(e){if(typeof ShadowRoot>"u")return!1;var t=ks(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function UJ(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var o=t.styles[n]||{},r=t.attributes[n]||{},s=t.elements[n];!Lr(s)||!Xs(s)||(Object.assign(s.style,o),Object.keys(r).forEach(function(i){var l=r[i];l===!1?s.removeAttribute(i):s.setAttribute(i,l===!0?"":l)}))})}function WJ(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(o){var r=t.elements[o],s=t.attributes[o]||{},i=Object.keys(t.styles.hasOwnProperty(o)?t.styles[o]:n[o]),l=i.reduce(function(a,u){return a[u]="",a},{});!Lr(r)||!Xs(r)||(Object.assign(r.style,l),Object.keys(s).forEach(function(a){r.removeAttribute(a)}))})}}var CT={name:"applyStyles",enabled:!0,phase:"write",fn:UJ,effect:WJ,requires:["computeStyles"]};function Ks(e){return e.split("-")[0]}var Ga=Math.max,Pg=Math.min,td=Math.round;function nd(e,t){t===void 0&&(t=!1);var n=e.getBoundingClientRect(),o=1,r=1;if(Lr(e)&&t){var s=e.offsetHeight,i=e.offsetWidth;i>0&&(o=td(n.width)/i||1),s>0&&(r=td(n.height)/s||1)}return{width:n.width/o,height:n.height/r,top:n.top/r,right:n.right/o,bottom:n.bottom/r,left:n.left/o,x:n.left/o,y:n.top/r}}function ww(e){var t=nd(e),n=e.offsetWidth,o=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-o)<=1&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:o}}function kT(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&bw(n)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function Li(e){return ks(e).getComputedStyle(e)}function KJ(e){return["table","td","th"].indexOf(Xs(e))>=0}function Xl(e){return((ed(e)?e.ownerDocument:e.document)||window.document).documentElement}function z0(e){return Xs(e)==="html"?e:e.assignedSlot||e.parentNode||(bw(e)?e.host:null)||Xl(e)}function _5(e){return!Lr(e)||Li(e).position==="fixed"?null:e.offsetParent}function qJ(e){var t=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,n=navigator.userAgent.indexOf("Trident")!==-1;if(n&&Lr(e)){var o=Li(e);if(o.position==="fixed")return null}var r=z0(e);for(bw(r)&&(r=r.host);Lr(r)&&["html","body"].indexOf(Xs(r))<0;){var s=Li(r);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||t&&s.willChange==="filter"||t&&s.filter&&s.filter!=="none")return r;r=r.parentNode}return null}function fh(e){for(var t=ks(e),n=_5(e);n&&KJ(n)&&Li(n).position==="static";)n=_5(n);return n&&(Xs(n)==="html"||Xs(n)==="body"&&Li(n).position==="static")?t:n||qJ(e)||t}function Cw(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Wf(e,t,n){return Ga(e,Pg(t,n))}function GJ(e,t,n){var o=Wf(e,t,n);return o>n?n:o}function ST(){return{top:0,right:0,bottom:0,left:0}}function $T(e){return Object.assign({},ST(),e)}function ET(e,t){return t.reduce(function(n,o){return n[o]=e,n},{})}var YJ=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,$T(typeof e!="number"?e:ET(e,dh))};function ZJ(e){var t,n=e.state,o=e.name,r=e.options,s=n.elements.arrow,i=n.modifiersData.popperOffsets,l=Ks(n.placement),a=Cw(l),u=[qo,jr].indexOf(l)>=0,c=u?"height":"width";if(!(!s||!i)){var d=YJ(r.padding,n),f=ww(s),p=a==="y"?Ko:qo,h=a==="y"?zr:jr,m=n.rects.reference[c]+n.rects.reference[a]-i[a]-n.rects.popper[c],y=i[a]-n.rects.reference[a],v=fh(s),k=v?a==="y"?v.clientHeight||0:v.clientWidth||0:0,b=m/2-y/2,$=d[p],x=k-f[c]-d[h],E=k/2-f[c]/2+b,M=Wf($,E,x),N=a;n.modifiersData[o]=(t={},t[N]=M,t.centerOffset=M-E,t)}}function JJ(e){var t=e.state,n=e.options,o=n.element,r=o===void 0?"[data-popper-arrow]":o;r!=null&&(typeof r=="string"&&(r=t.elements.popper.querySelector(r),!r)||!kT(t.elements.popper,r)||(t.elements.arrow=r))}var XJ={name:"arrow",enabled:!0,phase:"main",fn:ZJ,effect:JJ,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function od(e){return e.split("-")[1]}var QJ={top:"auto",right:"auto",bottom:"auto",left:"auto"};function eX(e){var t=e.x,n=e.y,o=window,r=o.devicePixelRatio||1;return{x:td(t*r)/r||0,y:td(n*r)/r||0}}function b5(e){var t,n=e.popper,o=e.popperRect,r=e.placement,s=e.variation,i=e.offsets,l=e.position,a=e.gpuAcceleration,u=e.adaptive,c=e.roundOffsets,d=e.isFixed,f=i.x,p=f===void 0?0:f,h=i.y,m=h===void 0?0:h,y=typeof c=="function"?c({x:p,y:m}):{x:p,y:m};p=y.x,m=y.y;var v=i.hasOwnProperty("x"),k=i.hasOwnProperty("y"),b=qo,$=Ko,x=window;if(u){var E=fh(n),M="clientHeight",N="clientWidth";if(E===ks(n)&&(E=Xl(n),Li(E).position!=="static"&&l==="absolute"&&(M="scrollHeight",N="scrollWidth")),E=E,r===Ko||(r===qo||r===jr)&&s===Pp){$=zr;var P=d&&E===x&&x.visualViewport?x.visualViewport.height:E[M];m-=P-o.height,m*=a?1:-1}if(r===qo||(r===Ko||r===zr)&&s===Pp){b=jr;var I=d&&E===x&&x.visualViewport?x.visualViewport.width:E[N];p-=I-o.width,p*=a?1:-1}}var V=Object.assign({position:l},u&&QJ),F=c===!0?eX({x:p,y:m}):{x:p,y:m};if(p=F.x,m=F.y,a){var Y;return Object.assign({},V,(Y={},Y[$]=k?"0":"",Y[b]=v?"0":"",Y.transform=(x.devicePixelRatio||1)<=1?"translate("+p+"px, "+m+"px)":"translate3d("+p+"px, "+m+"px, 0)",Y))}return Object.assign({},V,(t={},t[$]=k?m+"px":"",t[b]=v?p+"px":"",t.transform="",t))}function tX(e){var t=e.state,n=e.options,o=n.gpuAcceleration,r=o===void 0?!0:o,s=n.adaptive,i=s===void 0?!0:s,l=n.roundOffsets,a=l===void 0?!0:l,u={placement:Ks(t.placement),variation:od(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,b5(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:i,roundOffsets:a})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,b5(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:a})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var xT={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:tX,data:{}},dm={passive:!0};function nX(e){var t=e.state,n=e.instance,o=e.options,r=o.scroll,s=r===void 0?!0:r,i=o.resize,l=i===void 0?!0:i,a=ks(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return s&&u.forEach(function(c){c.addEventListener("scroll",n.update,dm)}),l&&a.addEventListener("resize",n.update,dm),function(){s&&u.forEach(function(c){c.removeEventListener("scroll",n.update,dm)}),l&&a.removeEventListener("resize",n.update,dm)}}var TT={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:nX,data:{}},oX={left:"right",right:"left",bottom:"top",top:"bottom"};function Qm(e){return e.replace(/left|right|bottom|top/g,function(t){return oX[t]})}var rX={start:"end",end:"start"};function w5(e){return e.replace(/start|end/g,function(t){return rX[t]})}function kw(e){var t=ks(e),n=t.pageXOffset,o=t.pageYOffset;return{scrollLeft:n,scrollTop:o}}function Sw(e){return nd(Xl(e)).left+kw(e).scrollLeft}function sX(e){var t=ks(e),n=Xl(e),o=t.visualViewport,r=n.clientWidth,s=n.clientHeight,i=0,l=0;return o&&(r=o.width,s=o.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(i=o.offsetLeft,l=o.offsetTop)),{width:r,height:s,x:i+Sw(e),y:l}}function iX(e){var t,n=Xl(e),o=kw(e),r=(t=e.ownerDocument)==null?void 0:t.body,s=Ga(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),i=Ga(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),l=-o.scrollLeft+Sw(e),a=-o.scrollTop;return Li(r||n).direction==="rtl"&&(l+=Ga(n.clientWidth,r?r.clientWidth:0)-s),{width:s,height:i,x:l,y:a}}function $w(e){var t=Li(e),n=t.overflow,o=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+o)}function MT(e){return["html","body","#document"].indexOf(Xs(e))>=0?e.ownerDocument.body:Lr(e)&&$w(e)?e:MT(z0(e))}function Kf(e,t){var n;t===void 0&&(t=[]);var o=MT(e),r=o===((n=e.ownerDocument)==null?void 0:n.body),s=ks(o),i=r?[s].concat(s.visualViewport||[],$w(o)?o:[]):o,l=t.concat(i);return r?l:l.concat(Kf(z0(i)))}function nb(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function lX(e){var t=nd(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 C5(e,t){return t===wT?nb(sX(e)):ed(t)?lX(t):nb(iX(Xl(e)))}function aX(e){var t=Kf(z0(e)),n=["absolute","fixed"].indexOf(Li(e).position)>=0,o=n&&Lr(e)?fh(e):e;return ed(o)?t.filter(function(r){return ed(r)&&kT(r,o)&&Xs(r)!=="body"}):[]}function uX(e,t,n){var o=t==="clippingParents"?aX(e):[].concat(t),r=[].concat(o,[n]),s=r[0],i=r.reduce(function(l,a){var u=C5(e,a);return l.top=Ga(u.top,l.top),l.right=Pg(u.right,l.right),l.bottom=Pg(u.bottom,l.bottom),l.left=Ga(u.left,l.left),l},C5(e,s));return i.width=i.right-i.left,i.height=i.bottom-i.top,i.x=i.left,i.y=i.top,i}function OT(e){var t=e.reference,n=e.element,o=e.placement,r=o?Ks(o):null,s=o?od(o):null,i=t.x+t.width/2-n.width/2,l=t.y+t.height/2-n.height/2,a;switch(r){case Ko:a={x:i,y:t.y-n.height};break;case zr:a={x:i,y:t.y+t.height};break;case jr:a={x:t.x+t.width,y:l};break;case qo:a={x:t.x-n.width,y:l};break;default:a={x:t.x,y:t.y}}var u=r?Cw(r):null;if(u!=null){var c=u==="y"?"height":"width";switch(s){case Qc:a[u]=a[u]-(t[c]/2-n[c]/2);break;case Pp:a[u]=a[u]+(t[c]/2-n[c]/2);break}}return a}function Lp(e,t){t===void 0&&(t={});var n=t,o=n.placement,r=o===void 0?e.placement:o,s=n.boundary,i=s===void 0?AJ:s,l=n.rootBoundary,a=l===void 0?wT:l,u=n.elementContext,c=u===void 0?Wd:u,d=n.altBoundary,f=d===void 0?!1:d,p=n.padding,h=p===void 0?0:p,m=$T(typeof h!="number"?h:ET(h,dh)),y=c===Wd?NJ:Wd,v=e.rects.popper,k=e.elements[f?y:c],b=uX(ed(k)?k:k.contextElement||Xl(e.elements.popper),i,a),$=nd(e.elements.reference),x=OT({reference:$,element:v,strategy:"absolute",placement:r}),E=nb(Object.assign({},v,x)),M=c===Wd?E:$,N={top:b.top-M.top+m.top,bottom:M.bottom-b.bottom+m.bottom,left:b.left-M.left+m.left,right:M.right-b.right+m.right},P=e.modifiersData.offset;if(c===Wd&&P){var I=P[r];Object.keys(N).forEach(function(V){var F=[jr,zr].indexOf(V)>=0?1:-1,Y=[Ko,zr].indexOf(V)>=0?"y":"x";N[V]+=I[Y]*F})}return N}function cX(e,t){t===void 0&&(t={});var n=t,o=n.placement,r=n.boundary,s=n.rootBoundary,i=n.padding,l=n.flipVariations,a=n.allowedAutoPlacements,u=a===void 0?B0:a,c=od(o),d=c?l?y5:y5.filter(function(h){return od(h)===c}):dh,f=d.filter(function(h){return u.indexOf(h)>=0});f.length===0&&(f=d);var p=f.reduce(function(h,m){return h[m]=Lp(e,{placement:m,boundary:r,rootBoundary:s,padding:i})[Ks(m)],h},{});return Object.keys(p).sort(function(h,m){return p[h]-p[m]})}function dX(e){if(Ks(e)===_w)return[];var t=Qm(e);return[w5(e),t,w5(t)]}function fX(e){var t=e.state,n=e.options,o=e.name;if(!t.modifiersData[o]._skip){for(var r=n.mainAxis,s=r===void 0?!0:r,i=n.altAxis,l=i===void 0?!0:i,a=n.fallbackPlacements,u=n.padding,c=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,h=p===void 0?!0:p,m=n.allowedAutoPlacements,y=t.options.placement,v=Ks(y),k=v===y,b=a||(k||!h?[Qm(y)]:dX(y)),$=[y].concat(b).reduce(function(ge,Oe){return ge.concat(Ks(Oe)===_w?cX(t,{placement:Oe,boundary:c,rootBoundary:d,padding:u,flipVariations:h,allowedAutoPlacements:m}):Oe)},[]),x=t.rects.reference,E=t.rects.popper,M=new Map,N=!0,P=$[0],I=0;I<$.length;I++){var V=$[I],F=Ks(V),Y=od(V)===Qc,Z=[Ko,zr].indexOf(F)>=0,K=Z?"width":"height",U=Lp(t,{placement:V,boundary:c,rootBoundary:d,altBoundary:f,padding:u}),B=Z?Y?jr:qo:Y?zr:Ko;x[K]>E[K]&&(B=Qm(B));var W=Qm(B),L=[];if(s&&L.push(U[F]<=0),l&&L.push(U[B]<=0,U[W]<=0),L.every(function(ge){return ge})){P=V,N=!1;break}M.set(V,L)}if(N)for(var A=h?3:1,X=function(ge){var Oe=$.find(function(xe){var te=M.get(xe);if(te)return te.slice(0,ge).every(function(fe){return fe})});if(Oe)return P=Oe,"break"},re=A;re>0;re--){var j=X(re);if(j==="break")break}t.placement!==P&&(t.modifiersData[o]._skip=!0,t.placement=P,t.reset=!0)}}var pX={name:"flip",enabled:!0,phase:"main",fn:fX,requiresIfExists:["offset"],data:{_skip:!1}};function k5(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 S5(e){return[Ko,jr,zr,qo].some(function(t){return e[t]>=0})}function hX(e){var t=e.state,n=e.name,o=t.rects.reference,r=t.rects.popper,s=t.modifiersData.preventOverflow,i=Lp(t,{elementContext:"reference"}),l=Lp(t,{altBoundary:!0}),a=k5(i,o),u=k5(l,r,s),c=S5(a),d=S5(u);t.modifiersData[n]={referenceClippingOffsets:a,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}var mX={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:hX};function gX(e,t,n){var o=Ks(e),r=[qo,Ko].indexOf(o)>=0?-1:1,s=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,i=s[0],l=s[1];return i=i||0,l=(l||0)*r,[qo,jr].indexOf(o)>=0?{x:l,y:i}:{x:i,y:l}}function vX(e){var t=e.state,n=e.options,o=e.name,r=n.offset,s=r===void 0?[0,0]:r,i=B0.reduce(function(c,d){return c[d]=gX(d,t.rects,s),c},{}),l=i[t.placement],a=l.x,u=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=a,t.modifiersData.popperOffsets.y+=u),t.modifiersData[o]=i}var yX={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:vX};function _X(e){var t=e.state,n=e.name;t.modifiersData[n]=OT({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var IT={name:"popperOffsets",enabled:!0,phase:"read",fn:_X,data:{}};function bX(e){return e==="x"?"y":"x"}function wX(e){var t=e.state,n=e.options,o=e.name,r=n.mainAxis,s=r===void 0?!0:r,i=n.altAxis,l=i===void 0?!1:i,a=n.boundary,u=n.rootBoundary,c=n.altBoundary,d=n.padding,f=n.tether,p=f===void 0?!0:f,h=n.tetherOffset,m=h===void 0?0:h,y=Lp(t,{boundary:a,rootBoundary:u,padding:d,altBoundary:c}),v=Ks(t.placement),k=od(t.placement),b=!k,$=Cw(v),x=bX($),E=t.modifiersData.popperOffsets,M=t.rects.reference,N=t.rects.popper,P=typeof m=="function"?m(Object.assign({},t.rects,{placement:t.placement})):m,I=typeof P=="number"?{mainAxis:P,altAxis:P}:Object.assign({mainAxis:0,altAxis:0},P),V=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,F={x:0,y:0};if(E){if(s){var Y,Z=$==="y"?Ko:qo,K=$==="y"?zr:jr,U=$==="y"?"height":"width",B=E[$],W=B+y[Z],L=B-y[K],A=p?-N[U]/2:0,X=k===Qc?M[U]:N[U],re=k===Qc?-N[U]:-M[U],j=t.elements.arrow,ge=p&&j?ww(j):{width:0,height:0},Oe=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:ST(),xe=Oe[Z],te=Oe[K],fe=Wf(0,M[U],ge[U]),ve=b?M[U]/2-A-fe-xe-I.mainAxis:X-fe-xe-I.mainAxis,le=b?-M[U]/2+A+fe+te+I.mainAxis:re+fe+te+I.mainAxis,Ae=t.elements.arrow&&fh(t.elements.arrow),Ge=Ae?$==="y"?Ae.clientTop||0:Ae.clientLeft||0:0,G=(Y=V==null?void 0:V[$])!=null?Y:0,J=B+ve-G-Ge,ue=B+le-G,_e=Wf(p?Pg(W,J):W,B,p?Ga(L,ue):L);E[$]=_e,F[$]=_e-B}if(l){var ye,Ne=$==="x"?Ko:qo,Le=$==="x"?zr:jr,Ee=E[x],Pe=x==="y"?"height":"width",me=Ee+y[Ne],Ue=Ee-y[Le],Xe=[Ko,qo].indexOf(v)!==-1,ce=(ye=V==null?void 0:V[x])!=null?ye:0,oe=Xe?me:Ee-M[Pe]-N[Pe]-ce+I.altAxis,pe=Xe?Ee+M[Pe]+N[Pe]-ce-I.altAxis:Ue,ze=p&&Xe?GJ(oe,Ee,pe):Wf(p?oe:me,Ee,p?pe:Ue);E[x]=ze,F[x]=ze-Ee}t.modifiersData[o]=F}}var CX={name:"preventOverflow",enabled:!0,phase:"main",fn:wX,requiresIfExists:["offset"]};function kX(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function SX(e){return e===ks(e)||!Lr(e)?kw(e):kX(e)}function $X(e){var t=e.getBoundingClientRect(),n=td(t.width)/e.offsetWidth||1,o=td(t.height)/e.offsetHeight||1;return n!==1||o!==1}function EX(e,t,n){n===void 0&&(n=!1);var o=Lr(t),r=Lr(t)&&$X(t),s=Xl(t),i=nd(e,r),l={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(o||!o&&!n)&&((Xs(t)!=="body"||$w(s))&&(l=SX(t)),Lr(t)?(a=nd(t,!0),a.x+=t.clientLeft,a.y+=t.clientTop):s&&(a.x=Sw(s))),{x:i.left+l.scrollLeft-a.x,y:i.top+l.scrollTop-a.y,width:i.width,height:i.height}}function xX(e){var t=new Map,n=new Set,o=[];e.forEach(function(s){t.set(s.name,s)});function r(s){n.add(s.name);var i=[].concat(s.requires||[],s.requiresIfExists||[]);i.forEach(function(l){if(!n.has(l)){var a=t.get(l);a&&r(a)}}),o.push(s)}return e.forEach(function(s){n.has(s.name)||r(s)}),o}function TX(e){var t=xX(e);return HJ.reduce(function(n,o){return n.concat(t.filter(function(r){return r.phase===o}))},[])}function MX(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function OX(e){var t=e.reduce(function(n,o){var r=n[o.name];return n[o.name]=r?Object.assign({},r,o,{options:Object.assign({},r.options,o.options),data:Object.assign({},r.data,o.data)}):o,n},{});return Object.keys(t).map(function(n){return t[n]})}var $5={placement:"bottom",modifiers:[],strategy:"absolute"};function E5(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(o){return!(o&&typeof o.getBoundingClientRect=="function")})}function Ew(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,o=n===void 0?[]:n,r=t.defaultOptions,s=r===void 0?$5:r;return function(i,l,a){a===void 0&&(a=s);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},$5,s),modifiersData:{},elements:{reference:i,popper:l},attributes:{},styles:{}},c=[],d=!1,f={state:u,setOptions:function(m){var y=typeof m=="function"?m(u.options):m;h(),u.options=Object.assign({},s,u.options,y),u.scrollParents={reference:ed(i)?Kf(i):i.contextElement?Kf(i.contextElement):[],popper:Kf(l)};var v=TX(OX([].concat(o,u.options.modifiers)));return u.orderedModifiers=v.filter(function(k){return k.enabled}),p(),f.update()},forceUpdate:function(){if(!d){var m=u.elements,y=m.reference,v=m.popper;if(E5(y,v)){u.rects={reference:EX(y,fh(v),u.options.strategy==="fixed"),popper:ww(v)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(N){return u.modifiersData[N.name]=Object.assign({},N.data)});for(var k=0;k<u.orderedModifiers.length;k++){if(u.reset===!0){u.reset=!1,k=-1;continue}var b=u.orderedModifiers[k],$=b.fn,x=b.options,E=x===void 0?{}:x,M=b.name;typeof $=="function"&&(u=$({state:u,options:E,name:M,instance:f})||u)}}}},update:MX(function(){return new Promise(function(m){f.forceUpdate(),m(u)})}),destroy:function(){h(),d=!0}};if(!E5(i,l))return f;f.setOptions(a).then(function(m){!d&&a.onFirstUpdate&&a.onFirstUpdate(m)});function p(){u.orderedModifiers.forEach(function(m){var y=m.name,v=m.options,k=v===void 0?{}:v,b=m.effect;if(typeof b=="function"){var $=b({state:u,name:y,instance:f,options:k}),x=function(){};c.push($||x)}})}function h(){c.forEach(function(m){return m()}),c=[]}return f}}Ew();var IX=[TT,IT,xT,CT];Ew({defaultModifiers:IX});var AX=[TT,IT,xT,CT,yX,pX,CX,XJ,mX],NX=Ew({defaultModifiers:AX});const PX=(e,t,n={})=>{const o={name:"updateState",enabled:!0,phase:"write",fn:({state:a})=>{const u=LX(a);Object.assign(i.value,u)},requires:["computeStyles"]},r=R(()=>{const{onFirstUpdate:a,placement:u,strategy:c,modifiers:d}=g(n);return{onFirstUpdate:a,placement:u||"bottom",strategy:c||"absolute",modifiers:[...d||[],o,{name:"applyStyles",enabled:!1}]}}),s=An(),i=q({styles:{popper:{position:g(r).strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),l=()=>{s.value&&(s.value.destroy(),s.value=void 0)};return Me(r,a=>{const u=g(s);u&&u.setOptions(a)},{deep:!0}),Me([e,t],([a,u])=>{l(),!(!a||!u)&&(s.value=NX(a,u,g(r)))}),xn(()=>{l()}),{state:R(()=>{var a;return{...((a=g(s))==null?void 0:a.state)||{}}}),styles:R(()=>g(i).styles),attributes:R(()=>g(i).attributes),update:()=>{var a;return(a=g(s))==null?void 0:a.update()},forceUpdate:()=>{var a;return(a=g(s))==null?void 0:a.forceUpdate()},instanceRef:R(()=>g(s))}};function LX(e){const t=Object.keys(e.elements),n=Ag(t.map(r=>[r,e.styles[r]||{}])),o=Ag(t.map(r=>[r,e.attributes[r]]));return{styles:n,attributes:o}}const xw=e=>{if(!e)return{onClick:yt,onMousedown:yt,onMouseup:yt};let t=!1,n=!1;return{onClick:i=>{t&&n&&e(i),t=n=!1},onMousedown:i=>{t=i.target===i.currentTarget},onMouseup:i=>{n=i.target===i.currentTarget}}},RX=(e,t=0)=>{if(t===0)return e;const n=q(!1);let o=0;const r=()=>{o&&clearTimeout(o),o=window.setTimeout(()=>{n.value=e.value},t)};return Ct(r),Me(()=>e.value,s=>{s?r():n.value=s}),n};function x5(){let e;const t=(o,r)=>{n(),e=window.setTimeout(o,r)},n=()=>window.clearTimeout(e);return rh(()=>n()),{registerTimeout:t,cancelTimeout:n}}const T5={prefix:Math.floor(Math.random()*1e4),current:0},DX=Symbol("elIdInjection"),AT=()=>at()?je(DX,T5):T5,Hr=e=>{const t=AT(),n=yw();return R(()=>g(e)||`${n.value}-id-${t.prefix}-${t.current++}`)};let Ku=[];const M5=e=>{const t=e;t.key===rt.esc&&Ku.forEach(n=>n(t))},VX=e=>{Ct(()=>{Ku.length===0&&document.addEventListener("keydown",M5),Tt&&Ku.push(e)}),xn(()=>{Ku=Ku.filter(t=>t!==e),Ku.length===0&&Tt&&document.removeEventListener("keydown",M5)})};let O5;const NT=()=>{const e=yw(),t=AT(),n=R(()=>`${e.value}-popper-container-${t.prefix}`),o=R(()=>`#${n.value}`);return{id:n,selector:o}},FX=e=>{const t=document.createElement("div");return t.id=e,document.body.appendChild(t),t},BX=()=>{const{id:e,selector:t}=NT();return yd(()=>{Tt&&!O5&&!document.body.querySelector(t.value)&&(O5=FX(e.value))}),{id:e,selector:t}},zX=Ke({showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0}}),jX=({showAfter:e,hideAfter:t,autoClose:n,open:o,close:r})=>{const{registerTimeout:s}=x5(),{registerTimeout:i,cancelTimeout:l}=x5();return{onOpen:c=>{s(()=>{o(c);const d=g(n);_t(d)&&d>0&&i(()=>{r(c)},d)},g(e))},onClose:c=>{l(),s(()=>{r(c)},g(t))}}},PT=Symbol("elForwardRef"),HX=e=>{wt(PT,{setForwardRef:n=>{e.value=n}})},UX=e=>({mounted(t){e(t)},updated(t){e(t)},unmounted(){e(null)}}),I5={current:0},A5=q(0),LT=2e3,N5=Symbol("elZIndexContextKey"),RT=Symbol("zIndexContextKey"),j0=e=>{const t=at()?je(N5,I5):I5,n=e||(at()?je(RT,void 0):void 0),o=R(()=>{const i=g(n);return _t(i)?i:LT}),r=R(()=>o.value+A5.value),s=()=>(t.current++,A5.value=t.current,r.value);return!Tt&&je(N5),{initialZIndex:o,currentZIndex:r,nextZIndex:s}},P5=Math.min,qf=Math.max,Lg=Math.round,Ul=e=>({x:e,y:e}),WX={left:"right",right:"left",bottom:"top",top:"bottom"},KX={start:"end",end:"start"};function Tw(e,t){return typeof e=="function"?e(t):e}function rd(e){return e.split("-")[0]}function H0(e){return e.split("-")[1]}function qX(e){return e==="x"?"y":"x"}function DT(e){return e==="y"?"height":"width"}function Mw(e){return["top","bottom"].includes(rd(e))?"y":"x"}function VT(e){return qX(Mw(e))}function GX(e,t,n){n===void 0&&(n=!1);const o=H0(e),r=VT(e),s=DT(r);let i=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Rg(i)),[i,Rg(i)]}function YX(e){const t=Rg(e);return[ob(e),t,ob(t)]}function ob(e){return e.replace(/start|end/g,t=>KX[t])}function ZX(e,t,n){const o=["left","right"],r=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?s:i;default:return[]}}function JX(e,t,n,o){const r=H0(e);let s=ZX(rd(e),n==="start",o);return r&&(s=s.map(i=>i+"-"+r),t&&(s=s.concat(s.map(ob)))),s}function Rg(e){return e.replace(/left|right|bottom|top/g,t=>WX[t])}function XX(e){return{top:0,right:0,bottom:0,left:0,...e}}function QX(e){return typeof e!="number"?XX(e):{top:e,right:e,bottom:e,left:e}}function Dg(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function L5(e,t,n){let{reference:o,floating:r}=e;const s=Mw(t),i=VT(t),l=DT(i),a=rd(t),u=s==="y",c=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,f=o[l]/2-r[l]/2;let p;switch(a){case"top":p={x:c,y:o.y-r.height};break;case"bottom":p={x:c,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:d};break;case"left":p={x:o.x-r.width,y:d};break;default:p={x:o.x,y:o.y}}switch(H0(t)){case"start":p[i]-=f*(n&&u?-1:1);break;case"end":p[i]+=f*(n&&u?-1:1);break}return p}const eQ=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:s=[],platform:i}=n,l=s.filter(Boolean),a=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:r}),{x:c,y:d}=L5(u,o,a),f=o,p={},h=0;for(let m=0;m<l.length;m++){const{name:y,fn:v}=l[m],{x:k,y:b,data:$,reset:x}=await v({x:c,y:d,initialPlacement:o,placement:f,strategy:r,middlewareData:p,rects:u,platform:i,elements:{reference:e,floating:t}});c=k??c,d=b??d,p={...p,[y]:{...p[y],...$}},x&&h<=50&&(h++,typeof x=="object"&&(x.placement&&(f=x.placement),x.rects&&(u=x.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:r}):x.rects),{x:c,y:d}=L5(u,f,a)),m=-1)}return{x:c,y:d,placement:f,strategy:r,middlewareData:p}};async function tQ(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:s,rects:i,elements:l,strategy:a}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Tw(t,e),h=QX(p),y=l[f?d==="floating"?"reference":"floating":d],v=Dg(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(y)))==null||n?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:u,rootBoundary:c,strategy:a})),k=d==="floating"?{...i.floating,x:o,y:r}:i.reference,b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),$=await(s.isElement==null?void 0:s.isElement(b))?await(s.getScale==null?void 0:s.getScale(b))||{x:1,y:1}:{x:1,y:1},x=Dg(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:k,offsetParent:b,strategy:a}):k);return{top:(v.top-x.top+h.top)/$.y,bottom:(x.bottom-v.bottom+h.bottom)/$.y,left:(v.left-x.left+h.left)/$.x,right:(x.right-v.right+h.right)/$.x}}const nQ=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:s,rects:i,initialPlacement:l,platform:a,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...y}=Tw(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const v=rd(r),k=rd(l)===l,b=await(a.isRTL==null?void 0:a.isRTL(u.floating)),$=f||(k||!m?[Rg(l)]:YX(l));!f&&h!=="none"&&$.push(...JX(l,m,h,b));const x=[l,...$],E=await tQ(t,y),M=[];let N=((o=s.flip)==null?void 0:o.overflows)||[];if(c&&M.push(E[v]),d){const F=GX(r,i,b);M.push(E[F[0]],E[F[1]])}if(N=[...N,{placement:r,overflows:M}],!M.every(F=>F<=0)){var P,I;const F=(((P=s.flip)==null?void 0:P.index)||0)+1,Y=x[F];if(Y)return{data:{index:F,overflows:N},reset:{placement:Y}};let Z=(I=N.filter(K=>K.overflows[0]<=0).sort((K,U)=>K.overflows[1]-U.overflows[1])[0])==null?void 0:I.placement;if(!Z)switch(p){case"bestFit":{var V;const K=(V=N.map(U=>[U.placement,U.overflows.filter(B=>B>0).reduce((B,W)=>B+W,0)]).sort((U,B)=>U[1]-B[1])[0])==null?void 0:V[0];K&&(Z=K);break}case"initialPlacement":Z=l;break}if(r!==Z)return{reset:{placement:Z}}}return{}}}};async function oQ(e,t){const{placement:n,platform:o,elements:r}=e,s=await(o.isRTL==null?void 0:o.isRTL(r.floating)),i=rd(n),l=H0(n),a=Mw(n)==="y",u=["left","top"].includes(i)?-1:1,c=s&&a?-1:1,d=Tw(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return l&&typeof h=="number"&&(p=l==="end"?h*-1:h),a?{x:p*c,y:f*u}:{x:f*u,y:p*c}}const rb=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:s,placement:i,middlewareData:l}=t,a=await oQ(t,e);return i===((n=l.offset)==null?void 0:n.placement)&&(o=l.arrow)!=null&&o.alignmentOffset?{}:{x:r+a.x,y:s+a.y,data:{...a,placement:i}}}}};function Wl(e){return FT(e)?(e.nodeName||"").toLowerCase():"#document"}function mr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ql(e){var t;return(t=(FT(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function FT(e){return e instanceof Node||e instanceof mr(e).Node}function Ri(e){return e instanceof Element||e instanceof mr(e).Element}function Qs(e){return e instanceof HTMLElement||e instanceof mr(e).HTMLElement}function R5(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof mr(e).ShadowRoot}function ph(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=Ur(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function rQ(e){return["table","td","th"].includes(Wl(e))}function Ow(e){const t=Iw(),n=Ur(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function sQ(e){let t=sd(e);for(;Qs(t)&&!U0(t);){if(Ow(t))return t;t=sd(t)}return null}function Iw(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function U0(e){return["html","body","#document"].includes(Wl(e))}function Ur(e){return mr(e).getComputedStyle(e)}function W0(e){return Ri(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function sd(e){if(Wl(e)==="html")return e;const t=e.assignedSlot||e.parentNode||R5(e)&&e.host||Ql(e);return R5(t)?t.host:t}function BT(e){const t=sd(e);return U0(t)?e.ownerDocument?e.ownerDocument.body:e.body:Qs(t)&&ph(t)?t:BT(t)}function sb(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=BT(e),s=r===((o=e.ownerDocument)==null?void 0:o.body),i=mr(r);return s?t.concat(i,i.visualViewport||[],ph(r)?r:[],i.frameElement&&n?sb(i.frameElement):[]):t.concat(r,sb(r,[],n))}function zT(e){const t=Ur(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=Qs(e),s=r?e.offsetWidth:n,i=r?e.offsetHeight:o,l=Lg(n)!==s||Lg(o)!==i;return l&&(n=s,o=i),{width:n,height:o,$:l}}function jT(e){return Ri(e)?e:e.contextElement}function Sc(e){const t=jT(e);if(!Qs(t))return Ul(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:s}=zT(t);let i=(s?Lg(n.width):n.width)/o,l=(s?Lg(n.height):n.height)/r;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const iQ=Ul(0);function HT(e){const t=mr(e);return!Iw()||!t.visualViewport?iQ:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function lQ(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==mr(e)?!1:t}function Rp(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=jT(e);let i=Ul(1);t&&(o?Ri(o)&&(i=Sc(o)):i=Sc(e));const l=lQ(s,n,o)?HT(s):Ul(0);let a=(r.left+l.x)/i.x,u=(r.top+l.y)/i.y,c=r.width/i.x,d=r.height/i.y;if(s){const f=mr(s),p=o&&Ri(o)?mr(o):o;let h=f,m=h.frameElement;for(;m&&o&&p!==h;){const y=Sc(m),v=m.getBoundingClientRect(),k=Ur(m),b=v.left+(m.clientLeft+parseFloat(k.paddingLeft))*y.x,$=v.top+(m.clientTop+parseFloat(k.paddingTop))*y.y;a*=y.x,u*=y.y,c*=y.x,d*=y.y,a+=b,u+=$,h=mr(m),m=h.frameElement}}return Dg({width:c,height:d,x:a,y:u})}const aQ=[":popover-open",":modal"];function UT(e){return aQ.some(t=>{try{return e.matches(t)}catch{return!1}})}function uQ(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const s=r==="fixed",i=Ql(o),l=t?UT(t.floating):!1;if(o===i||l&&s)return n;let a={scrollLeft:0,scrollTop:0},u=Ul(1);const c=Ul(0),d=Qs(o);if((d||!d&&!s)&&((Wl(o)!=="body"||ph(i))&&(a=W0(o)),Qs(o))){const f=Rp(o);u=Sc(o),c.x=f.x+o.clientLeft,c.y=f.y+o.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-a.scrollLeft*u.x+c.x,y:n.y*u.y-a.scrollTop*u.y+c.y}}function cQ(e){return Array.from(e.getClientRects())}function WT(e){return Rp(Ql(e)).left+W0(e).scrollLeft}function dQ(e){const t=Ql(e),n=W0(e),o=e.ownerDocument.body,r=qf(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),s=qf(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let i=-n.scrollLeft+WT(e);const l=-n.scrollTop;return Ur(o).direction==="rtl"&&(i+=qf(t.clientWidth,o.clientWidth)-r),{width:r,height:s,x:i,y:l}}function fQ(e,t){const n=mr(e),o=Ql(e),r=n.visualViewport;let s=o.clientWidth,i=o.clientHeight,l=0,a=0;if(r){s=r.width,i=r.height;const u=Iw();(!u||u&&t==="fixed")&&(l=r.offsetLeft,a=r.offsetTop)}return{width:s,height:i,x:l,y:a}}function pQ(e,t){const n=Rp(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,s=Qs(e)?Sc(e):Ul(1),i=e.clientWidth*s.x,l=e.clientHeight*s.y,a=r*s.x,u=o*s.y;return{width:i,height:l,x:a,y:u}}function D5(e,t,n){let o;if(t==="viewport")o=fQ(e,n);else if(t==="document")o=dQ(Ql(e));else if(Ri(t))o=pQ(t,n);else{const r=HT(e);o={...t,x:t.x-r.x,y:t.y-r.y}}return Dg(o)}function KT(e,t){const n=sd(e);return n===t||!Ri(n)||U0(n)?!1:Ur(n).position==="fixed"||KT(n,t)}function hQ(e,t){const n=t.get(e);if(n)return n;let o=sb(e,[],!1).filter(l=>Ri(l)&&Wl(l)!=="body"),r=null;const s=Ur(e).position==="fixed";let i=s?sd(e):e;for(;Ri(i)&&!U0(i);){const l=Ur(i),a=Ow(i);!a&&l.position==="fixed"&&(r=null),(s?!a&&!r:!a&&l.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||ph(i)&&!a&&KT(e,i))?o=o.filter(c=>c!==i):r=l,i=sd(i)}return t.set(e,o),o}function mQ(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[...n==="clippingAncestors"?hQ(t,this._c):[].concat(n),o],l=i[0],a=i.reduce((u,c)=>{const d=D5(t,c,r);return u.top=qf(d.top,u.top),u.right=P5(d.right,u.right),u.bottom=P5(d.bottom,u.bottom),u.left=qf(d.left,u.left),u},D5(t,l,r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function gQ(e){const{width:t,height:n}=zT(e);return{width:t,height:n}}function vQ(e,t,n){const o=Qs(t),r=Ql(t),s=n==="fixed",i=Rp(e,!0,s,t);let l={scrollLeft:0,scrollTop:0};const a=Ul(0);if(o||!o&&!s)if((Wl(t)!=="body"||ph(r))&&(l=W0(t)),o){const d=Rp(t,!0,s,t);a.x=d.x+t.clientLeft,a.y=d.y+t.clientTop}else r&&(a.x=WT(r));const u=i.left+l.scrollLeft-a.x,c=i.top+l.scrollTop-a.y;return{x:u,y:c,width:i.width,height:i.height}}function V5(e,t){return!Qs(e)||Ur(e).position==="fixed"?null:t?t(e):e.offsetParent}function qT(e,t){const n=mr(e);if(!Qs(e)||UT(e))return n;let o=V5(e,t);for(;o&&rQ(o)&&Ur(o).position==="static";)o=V5(o,t);return o&&(Wl(o)==="html"||Wl(o)==="body"&&Ur(o).position==="static"&&!Ow(o))?n:o||sQ(e)||n}const yQ=async function(e){const t=this.getOffsetParent||qT,n=this.getDimensions;return{reference:vQ(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await n(e.floating)}}};function _Q(e){return Ur(e).direction==="rtl"}const bQ={convertOffsetParentRelativeRectToViewportRelativeRect:uQ,getDocumentElement:Ql,getClippingRect:mQ,getOffsetParent:qT,getElementRects:yQ,getClientRects:cQ,getDimensions:gQ,getScale:Sc,isElement:Ri,isRTL:_Q},ib=nQ,lb=(e,t,n)=>{const o=new Map,r={platform:bQ,...n},s={...r.platform,_c:o};return eQ(e,t,{...r,platform:s})};function wQ(e){const t=q();function n(){if(e.value==null)return;const{selectionStart:r,selectionEnd:s,value:i}=e.value;if(r==null||s==null)return;const l=i.slice(0,Math.max(0,r)),a=i.slice(Math.max(0,s));t.value={selectionStart:r,selectionEnd:s,value:i,beforeTxt:l,afterTxt:a}}function o(){if(e.value==null||t.value==null)return;const{value:r}=e.value,{beforeTxt:s,afterTxt:i,selectionStart:l}=t.value;if(s==null||i==null||l==null)return;let a=r.length;if(r.endsWith(i))a=r.length-i.length;else if(r.startsWith(s))a=s.length;else{const u=s[l-1],c=r.indexOf(u,l-1);c!==-1&&(a=c+1)}e.value.setSelectionRange(a,a)}return[n,o]}const CQ=(e,t,n)=>Xm(e.subTree).filter(s=>{var i;return yo(s)&&((i=s.type)==null?void 0:i.name)===t&&!!s.component}).map(s=>s.component.uid).map(s=>n[s]).filter(s=>!!s),kQ=(e,t)=>{const n={},o=An([]);return{children:o,addChild:i=>{n[i.uid]=i,o.value=CQ(e,t,n)},removeChild:i=>{delete n[i],o.value=o.value.filter(l=>l.uid!==i)}}},Gr=F0({type:String,values:Jl,required:!1}),GT=Symbol("size"),SQ=()=>{const e=je(GT,{});return R(()=>g(e.size)||"")};function Aw(e,{afterFocus:t,beforeBlur:n,afterBlur:o}={}){const r=at(),{emit:s}=r,i=An(),l=q(!1),a=d=>{l.value||(l.value=!0,s("focus",d),t==null||t())},u=d=>{var f;et(n)&&n(d)||d.relatedTarget&&((f=i.value)!=null&&f.contains(d.relatedTarget))||(l.value=!1,s("blur",d),o==null||o())},c=()=>{var d;(d=e.value)==null||d.focus()};return Me(i,d=>{d&&d.setAttribute("tabindex","-1")}),Vn(i,"click",c),{wrapperRef:i,isFocused:l,handleFocus:a,handleBlur:u}}const $Q=["",void 0,null],EQ=void 0,Nw=Ke({emptyValues:Array,valueOnClear:{type:[String,Number,Boolean,Function],default:void 0,validator:e=>et(e)?!e():!e}}),YT=(e,t)=>{const n=hh();n.value=n.value||{};const o=R(()=>e.emptyValues||n.value.emptyValues||$Q),r=R(()=>et(e.valueOnClear)?e.valueOnClear():e.valueOnClear!==void 0?e.valueOnClear:et(n.value.valueOnClear)?n.value.valueOnClear():n.value.valueOnClear!==void 0?n.value.valueOnClear:t!==void 0?t:EQ),s=i=>o.value.includes(i);return o.value.includes(r.value),{emptyValues:o,valueOnClear:r,isEmptyValue:s}},ZT=Symbol(),Vg=q();function hh(e,t=void 0){const n=at()?je(ZT,Vg):Vg;return e?R(()=>{var o,r;return(r=(o=n.value)==null?void 0:o[e])!=null?r:t}):n}function Pw(e,t){const n=hh(),o=Re(e,R(()=>{var l;return((l=n.value)==null?void 0:l.namespace)||Uf})),r=Kt(R(()=>{var l;return(l=n.value)==null?void 0:l.locale})),s=j0(R(()=>{var l;return((l=n.value)==null?void 0:l.zIndex)||LT})),i=R(()=>{var l;return g(t)||((l=n.value)==null?void 0:l.size)||""});return xQ(R(()=>g(n)||{})),{ns:o,locale:r,zIndex:s,size:i}}const xQ=(e,t,n=!1)=>{var o;const r=!!at(),s=r?hh():void 0,i=(o=t==null?void 0:t.provide)!=null?o:r?wt:void 0;if(!i)return;const l=R(()=>{const a=g(e);return s!=null&&s.value?TQ(s.value,a):a});return i(ZT,l),i(gT,R(()=>l.value.locale)),i(vT,R(()=>l.value.namespace)),i(RT,R(()=>l.value.zIndex)),i(GT,{size:R(()=>l.value.size||"")}),(n||!Vg.value)&&(Vg.value=l.value),l},TQ=(e,t)=>{const n=[...new Set([...eb(e),...eb(t)])],o={};for(const r of n)o[r]=t[r]!==void 0?t[r]:e[r];return o};var He=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n};const MQ=Ke({size:{type:Ce([Number,String])},color:{type:String}}),OQ=Q({name:"ElIcon",inheritAttrs:!1}),IQ=Q({...OQ,props:MQ,setup(e){const t=e,n=Re("icon"),o=R(()=>{const{size:r,color:s}=t;return!r&&!s?{}:{fontSize:Uo(r)?void 0:Zo(r),"--color":s}});return(r,s)=>(C(),T("i",un({class:g(n).b(),style:g(o)},r.$attrs),[he(r.$slots,"default")],16))}});var AQ=He(IQ,[["__file","icon.vue"]]);const Ie=Zt(AQ),kd=Symbol("formContextKey"),du=Symbol("formItemContextKey"),Jo=(e,t={})=>{const n=q(void 0),o=t.prop?n:bT("size"),r=t.global?n:SQ(),s=t.form?{size:void 0}:je(kd,void 0),i=t.formItem?{size:void 0}:je(du,void 0);return R(()=>o.value||g(e)||(i==null?void 0:i.size)||(s==null?void 0:s.size)||r.value||"")},Yr=e=>{const t=bT("disabled"),n=je(kd,void 0);return R(()=>t.value||g(e)||(n==null?void 0:n.disabled)||!1)},si=()=>{const e=je(kd,void 0),t=je(du,void 0);return{form:e,formItem:t}},Sd=(e,{formItemContext:t,disableIdGeneration:n,disableIdManagement:o})=>{n||(n=q(!1)),o||(o=q(!1));const r=q();let s;const i=R(()=>{var l;return!!(!e.label&&t&&t.inputIds&&((l=t.inputIds)==null?void 0:l.length)<=1)});return Ct(()=>{s=Me([pn(e,"id"),n],([l,a])=>{const u=l??(a?void 0:Hr().value);u!==r.value&&(t!=null&&t.removeInputId&&(r.value&&t.removeInputId(r.value),!(o!=null&&o.value)&&!a&&u&&t.addInputId(u)),r.value=u)},{immediate:!0})}),ri(()=>{s&&s(),t!=null&&t.removeInputId&&r.value&&t.removeInputId(r.value)}),{isLabeledByFormItem:i,inputId:r}},NQ=Ke({size:{type:String,values:Jl},disabled:Boolean}),PQ=Ke({...NQ,model:Object,rules:{type:Ce(Object)},labelPosition:{type:String,values:["left","right","top"],default:"right"},requireAsteriskPosition:{type:String,values:["left","right"],default:"left"},labelWidth:{type:[String,Number],default:""},labelSuffix:{type:String,default:""},inline:Boolean,inlineMessage:Boolean,statusIcon:Boolean,showMessage:{type:Boolean,default:!0},validateOnRuleChange:{type:Boolean,default:!0},hideRequiredAsterisk:Boolean,scrollToError:Boolean,scrollIntoViewOptions:{type:[Object,Boolean]}}),LQ={validate:(e,t,n)=>(Te(e)||tt(e))&&Br(t)&&tt(n)};function RQ(){const e=q([]),t=R(()=>{if(!e.value.length)return"0";const s=Math.max(...e.value);return s?`${s}px`:""});function n(s){const i=e.value.indexOf(s);return i===-1&&t.value,i}function o(s,i){if(s&&i){const l=n(i);e.value.splice(l,1,s)}else s&&e.value.push(s)}function r(s){const i=n(s);i>-1&&e.value.splice(i,1)}return{autoLabelWidth:t,registerLabelWidth:o,deregisterLabelWidth:r}}const fm=(e,t)=>{const n=Mg(t);return n.length>0?e.filter(o=>o.prop&&n.includes(o.prop)):e},DQ="ElForm",VQ=Q({name:DQ}),FQ=Q({...VQ,props:PQ,emits:LQ,setup(e,{expose:t,emit:n}){const o=e,r=[],s=Jo(),i=Re("form"),l=R(()=>{const{labelPosition:b,inline:$}=o;return[i.b(),i.m(s.value||"default"),{[i.m(`label-${b}`)]:b,[i.m("inline")]:$}]}),a=b=>r.find($=>$.prop===b),u=b=>{r.push(b)},c=b=>{b.prop&&r.splice(r.indexOf(b),1)},d=(b=[])=>{o.model&&fm(r,b).forEach($=>$.resetField())},f=(b=[])=>{fm(r,b).forEach($=>$.clearValidate())},p=R(()=>!!o.model),h=b=>{if(r.length===0)return[];const $=fm(r,b);return $.length?$:[]},m=async b=>v(void 0,b),y=async(b=[])=>{if(!p.value)return!1;const $=h(b);if($.length===0)return!0;let x={};for(const E of $)try{await E.validate("")}catch(M){x={...x,...M}}return Object.keys(x).length===0?!0:Promise.reject(x)},v=async(b=[],$)=>{const x=!et($);try{const E=await y(b);return E===!0&&($==null||$(E)),E}catch(E){if(E instanceof Error)throw E;const M=E;return o.scrollToError&&k(Object.keys(M)[0]),$==null||$(!1,M),x&&Promise.reject(M)}},k=b=>{var $;const x=fm(r,b)[0];x&&(($=x.$el)==null||$.scrollIntoView(o.scrollIntoViewOptions))};return Me(()=>o.rules,()=>{o.validateOnRuleChange&&m().catch(b=>void 0)},{deep:!0}),wt(kd,Bn({...oi(o),emit:n,resetFields:d,clearValidate:f,validateField:v,getField:a,addField:u,removeField:c,...RQ()})),t({validate:m,validateField:v,resetFields:d,clearValidate:f,scrollToField:k}),(b,$)=>(C(),T("form",{class:D(g(l))},[he(b.$slots,"default")],2))}});var BQ=He(FQ,[["__file","form.vue"]]);function Pa(){return Pa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Pa.apply(this,arguments)}function zQ(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Dp(e,t)}function ab(e){return ab=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ab(e)}function Dp(e,t){return Dp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,r){return o.__proto__=r,o},Dp(e,t)}function jQ(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function e1(e,t,n){return jQ()?e1=Reflect.construct.bind():e1=function(r,s,i){var l=[null];l.push.apply(l,s);var a=Function.bind.apply(r,l),u=new a;return i&&Dp(u,i.prototype),u},e1.apply(null,arguments)}function HQ(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function ub(e){var t=typeof Map=="function"?new Map:void 0;return ub=function(o){if(o===null||!HQ(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(o))return t.get(o);t.set(o,r)}function r(){return e1(o,arguments,ab(this).constructor)}return r.prototype=Object.create(o.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Dp(r,o)},ub(e)}var UQ=/%[sdj%]/g,WQ=function(){};typeof process<"u"&&process.env;function cb(e){if(!e||!e.length)return null;var t={};return e.forEach(function(n){var o=n.field;t[o]=t[o]||[],t[o].push(n)}),t}function dr(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];var r=0,s=n.length;if(typeof e=="function")return e.apply(null,n);if(typeof e=="string"){var i=e.replace(UQ,function(l){if(l==="%%")return"%";if(r>=s)return l;switch(l){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch{return"[Circular]"}break;default:return l}});return i}return e}function KQ(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function Wn(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||KQ(t)&&typeof e=="string"&&!e)}function qQ(e,t,n){var o=[],r=0,s=e.length;function i(l){o.push.apply(o,l||[]),r++,r===s&&n(o)}e.forEach(function(l){t(l,i)})}function F5(e,t,n){var o=0,r=e.length;function s(i){if(i&&i.length){n(i);return}var l=o;o=o+1,l<r?t(e[l],s):n([])}s([])}function GQ(e){var t=[];return Object.keys(e).forEach(function(n){t.push.apply(t,e[n]||[])}),t}var B5=function(e){zQ(t,e);function t(n,o){var r;return r=e.call(this,"Async Validation Error")||this,r.errors=n,r.fields=o,r}return t}(ub(Error));function YQ(e,t,n,o,r){if(t.first){var s=new Promise(function(f,p){var h=function(v){return o(v),v.length?p(new B5(v,cb(v))):f(r)},m=GQ(e);F5(m,n,h)});return s.catch(function(f){return f}),s}var i=t.firstFields===!0?Object.keys(e):t.firstFields||[],l=Object.keys(e),a=l.length,u=0,c=[],d=new Promise(function(f,p){var h=function(y){if(c.push.apply(c,y),u++,u===a)return o(c),c.length?p(new B5(c,cb(c))):f(r)};l.length||(o(c),f(r)),l.forEach(function(m){var y=e[m];i.indexOf(m)!==-1?F5(y,n,h):qQ(y,n,h)})});return d.catch(function(f){return f}),d}function ZQ(e){return!!(e&&e.message!==void 0)}function JQ(e,t){for(var n=e,o=0;o<t.length;o++){if(n==null)return n;n=n[t[o]]}return n}function z5(e,t){return function(n){var o;return e.fullFields?o=JQ(t,e.fullFields):o=t[n.field||e.fullField],ZQ(n)?(n.field=n.field||e.fullField,n.fieldValue=o,n):{message:typeof n=="function"?n():n,fieldValue:o,field:n.field||e.fullField}}}function j5(e,t){if(t){for(var n in t)if(t.hasOwnProperty(n)){var o=t[n];typeof o=="object"&&typeof e[n]=="object"?e[n]=Pa({},e[n],o):e[n]=o}}return e}var JT=function(t,n,o,r,s,i){t.required&&(!o.hasOwnProperty(t.field)||Wn(n,i||t.type))&&r.push(dr(s.messages.required,t.fullField))},XQ=function(t,n,o,r,s){(/^\s+$/.test(n)||n==="")&&r.push(dr(s.messages.whitespace,t.fullField))},pm,QQ=function(){if(pm)return pm;var e="[a-fA-F\\d:]",t=function($){return $&&$.includeBoundaries?"(?:(?<=\\s|^)(?="+e+")|(?<="+e+")(?=\\s|$))":""},n="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",o="[a-fA-F\\d]{1,4}",r=(` |
| 40 |
(?: |
| 41 |
(?:`+o+":){7}(?:"+o+`|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8 |
| 42 |
(?:`+o+":){6}(?:"+n+"|:"+o+`|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4 |
| 43 |
(?:`+o+":){5}(?::"+n+"|(?::"+o+`){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4 |
| 44 |
(?:`+o+":){4}(?:(?::"+o+"){0,1}:"+n+"|(?::"+o+`){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4 |
| 45 |
(?:`+o+":){3}(?:(?::"+o+"){0,2}:"+n+"|(?::"+o+`){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4 |
| 46 |
(?:`+o+":){2}(?:(?::"+o+"){0,3}:"+n+"|(?::"+o+`){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4 |
| 47 |
(?:`+o+":){1}(?:(?::"+o+"){0,4}:"+n+"|(?::"+o+`){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4 |
| 48 |
(?::(?:(?::`+o+"){0,5}:"+n+"|(?::"+o+`){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4 |
| 49 |
)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1 |
| 50 |
`).replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),s=new RegExp("(?:^"+n+"$)|(?:^"+r+"$)"),i=new RegExp("^"+n+"$"),l=new RegExp("^"+r+"$"),a=function($){return $&&$.exact?s:new RegExp("(?:"+t($)+n+t($)+")|(?:"+t($)+r+t($)+")","g")};a.v4=function(b){return b&&b.exact?i:new RegExp(""+t(b)+n+t(b),"g")},a.v6=function(b){return b&&b.exact?l:new RegExp(""+t(b)+r+t(b),"g")};var u="(?:(?:[a-z]+:)?//)",c="(?:\\S+(?::\\S*)?@)?",d=a.v4().source,f=a.v6().source,p="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",h="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",m="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",y="(?::\\d{2,5})?",v='(?:[/?#][^\\s"]*)?',k="(?:"+u+"|www\\.)"+c+"(?:localhost|"+d+"|"+f+"|"+p+h+m+")"+y+v;return pm=new RegExp("(?:^"+k+"$)","i"),pm},H5={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},Qd={integer:function(t){return Qd.number(t)&&parseInt(t,10)===t},float:function(t){return Qd.number(t)&&!Qd.integer(t)},array:function(t){return Array.isArray(t)},regexp:function(t){if(t instanceof RegExp)return!0;try{return!!new RegExp(t)}catch{return!1}},date:function(t){return typeof t.getTime=="function"&&typeof t.getMonth=="function"&&typeof t.getYear=="function"&&!isNaN(t.getTime())},number:function(t){return isNaN(t)?!1:typeof t=="number"},object:function(t){return typeof t=="object"&&!Qd.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&t.length<=320&&!!t.match(H5.email)},url:function(t){return typeof t=="string"&&t.length<=2048&&!!t.match(QQ())},hex:function(t){return typeof t=="string"&&!!t.match(H5.hex)}},eee=function(t,n,o,r,s){if(t.required&&n===void 0){JT(t,n,o,r,s);return}var i=["integer","float","array","regexp","object","method","email","number","date","url","hex"],l=t.type;i.indexOf(l)>-1?Qd[l](n)||r.push(dr(s.messages.types[l],t.fullField,t.type)):l&&typeof n!==t.type&&r.push(dr(s.messages.types[l],t.fullField,t.type))},tee=function(t,n,o,r,s){var i=typeof t.len=="number",l=typeof t.min=="number",a=typeof t.max=="number",u=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,c=n,d=null,f=typeof n=="number",p=typeof n=="string",h=Array.isArray(n);if(f?d="number":p?d="string":h&&(d="array"),!d)return!1;h&&(c=n.length),p&&(c=n.replace(u,"_").length),i?c!==t.len&&r.push(dr(s.messages[d].len,t.fullField,t.len)):l&&!a&&c<t.min?r.push(dr(s.messages[d].min,t.fullField,t.min)):a&&!l&&c>t.max?r.push(dr(s.messages[d].max,t.fullField,t.max)):l&&a&&(c<t.min||c>t.max)&&r.push(dr(s.messages[d].range,t.fullField,t.min,t.max))},Nu="enum",nee=function(t,n,o,r,s){t[Nu]=Array.isArray(t[Nu])?t[Nu]:[],t[Nu].indexOf(n)===-1&&r.push(dr(s.messages[Nu],t.fullField,t[Nu].join(", ")))},oee=function(t,n,o,r,s){if(t.pattern){if(t.pattern instanceof RegExp)t.pattern.lastIndex=0,t.pattern.test(n)||r.push(dr(s.messages.pattern.mismatch,t.fullField,n,t.pattern));else if(typeof t.pattern=="string"){var i=new RegExp(t.pattern);i.test(n)||r.push(dr(s.messages.pattern.mismatch,t.fullField,n,t.pattern))}}},Dt={required:JT,whitespace:XQ,type:eee,range:tee,enum:nee,pattern:oee},ree=function(t,n,o,r,s){var i=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(Wn(n,"string")&&!t.required)return o();Dt.required(t,n,r,i,s,"string"),Wn(n,"string")||(Dt.type(t,n,r,i,s),Dt.range(t,n,r,i,s),Dt.pattern(t,n,r,i,s),t.whitespace===!0&&Dt.whitespace(t,n,r,i,s))}o(i)},see=function(t,n,o,r,s){var i=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(Wn(n)&&!t.required)return o();Dt.required(t,n,r,i,s),n!==void 0&&Dt.type(t,n,r,i,s)}o(i)},iee=function(t,n,o,r,s){var i=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(n===""&&(n=void 0),Wn(n)&&!t.required)return o();Dt.required(t,n,r,i,s),n!==void 0&&(Dt.type(t,n,r,i,s),Dt.range(t,n,r,i,s))}o(i)},lee=function(t,n,o,r,s){var i=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(Wn(n)&&!t.required)return o();Dt.required(t,n,r,i,s),n!==void 0&&Dt.type(t,n,r,i,s)}o(i)},aee=function(t,n,o,r,s){var i=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(Wn(n)&&!t.required)return o();Dt.required(t,n,r,i,s),Wn(n)||Dt.type(t,n,r,i,s)}o(i)},uee=function(t,n,o,r,s){var i=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(Wn(n)&&!t.required)return o();Dt.required(t,n,r,i,s),n!==void 0&&(Dt.type(t,n,r,i,s),Dt.range(t,n,r,i,s))}o(i)},cee=function(t,n,o,r,s){var i=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(Wn(n)&&!t.required)return o();Dt.required(t,n,r,i,s),n!==void 0&&(Dt.type(t,n,r,i,s),Dt.range(t,n,r,i,s))}o(i)},dee=function(t,n,o,r,s){var i=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(n==null&&!t.required)return o();Dt.required(t,n,r,i,s,"array"),n!=null&&(Dt.type(t,n,r,i,s),Dt.range(t,n,r,i,s))}o(i)},fee=function(t,n,o,r,s){var i=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(Wn(n)&&!t.required)return o();Dt.required(t,n,r,i,s),n!==void 0&&Dt.type(t,n,r,i,s)}o(i)},pee="enum",hee=function(t,n,o,r,s){var i=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(Wn(n)&&!t.required)return o();Dt.required(t,n,r,i,s),n!==void 0&&Dt[pee](t,n,r,i,s)}o(i)},mee=function(t,n,o,r,s){var i=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(Wn(n,"string")&&!t.required)return o();Dt.required(t,n,r,i,s),Wn(n,"string")||Dt.pattern(t,n,r,i,s)}o(i)},gee=function(t,n,o,r,s){var i=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(Wn(n,"date")&&!t.required)return o();if(Dt.required(t,n,r,i,s),!Wn(n,"date")){var a;n instanceof Date?a=n:a=new Date(n),Dt.type(t,a,r,i,s),a&&Dt.range(t,a.getTime(),r,i,s)}}o(i)},vee=function(t,n,o,r,s){var i=[],l=Array.isArray(n)?"array":typeof n;Dt.required(t,n,r,i,s,l),o(i)},ry=function(t,n,o,r,s){var i=t.type,l=[],a=t.required||!t.required&&r.hasOwnProperty(t.field);if(a){if(Wn(n,i)&&!t.required)return o();Dt.required(t,n,r,l,s,i),Wn(n,i)||Dt.type(t,n,r,l,s)}o(l)},yee=function(t,n,o,r,s){var i=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(Wn(n)&&!t.required)return o();Dt.required(t,n,r,i,s)}o(i)},Gf={string:ree,method:see,number:iee,boolean:lee,regexp:aee,integer:uee,float:cee,array:dee,object:fee,enum:hee,pattern:mee,date:gee,url:ry,hex:ry,email:ry,required:vee,any:yee};function db(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var t=JSON.parse(JSON.stringify(this));return t.clone=this.clone,t}}}var fb=db(),mh=function(){function e(n){this.rules=null,this._messages=fb,this.define(n)}var t=e.prototype;return t.define=function(o){var r=this;if(!o)throw new Error("Cannot configure a schema with no rules");if(typeof o!="object"||Array.isArray(o))throw new Error("Rules must be an object");this.rules={},Object.keys(o).forEach(function(s){var i=o[s];r.rules[s]=Array.isArray(i)?i:[i]})},t.messages=function(o){return o&&(this._messages=j5(db(),o)),this._messages},t.validate=function(o,r,s){var i=this;r===void 0&&(r={}),s===void 0&&(s=function(){});var l=o,a=r,u=s;if(typeof a=="function"&&(u=a,a={}),!this.rules||Object.keys(this.rules).length===0)return u&&u(null,l),Promise.resolve(l);function c(m){var y=[],v={};function k($){if(Array.isArray($)){var x;y=(x=y).concat.apply(x,$)}else y.push($)}for(var b=0;b<m.length;b++)k(m[b]);y.length?(v=cb(y),u(y,v)):u(null,l)}if(a.messages){var d=this.messages();d===fb&&(d=db()),j5(d,a.messages),a.messages=d}else a.messages=this.messages();var f={},p=a.keys||Object.keys(this.rules);p.forEach(function(m){var y=i.rules[m],v=l[m];y.forEach(function(k){var b=k;typeof b.transform=="function"&&(l===o&&(l=Pa({},l)),v=l[m]=b.transform(v)),typeof b=="function"?b={validator:b}:b=Pa({},b),b.validator=i.getValidationMethod(b),b.validator&&(b.field=m,b.fullField=b.fullField||m,b.type=i.getType(b),f[m]=f[m]||[],f[m].push({rule:b,value:v,source:l,field:m}))})});var h={};return YQ(f,a,function(m,y){var v=m.rule,k=(v.type==="object"||v.type==="array")&&(typeof v.fields=="object"||typeof v.defaultField=="object");k=k&&(v.required||!v.required&&m.value),v.field=m.field;function b(E,M){return Pa({},M,{fullField:v.fullField+"."+E,fullFields:v.fullFields?[].concat(v.fullFields,[E]):[E]})}function $(E){E===void 0&&(E=[]);var M=Array.isArray(E)?E:[E];!a.suppressWarning&&M.length&&e.warning("async-validator:",M),M.length&&v.message!==void 0&&(M=[].concat(v.message));var N=M.map(z5(v,l));if(a.first&&N.length)return h[v.field]=1,y(N);if(!k)y(N);else{if(v.required&&!m.value)return v.message!==void 0?N=[].concat(v.message).map(z5(v,l)):a.error&&(N=[a.error(v,dr(a.messages.required,v.field))]),y(N);var P={};v.defaultField&&Object.keys(m.value).map(function(F){P[F]=v.defaultField}),P=Pa({},P,m.rule.fields);var I={};Object.keys(P).forEach(function(F){var Y=P[F],Z=Array.isArray(Y)?Y:[Y];I[F]=Z.map(b.bind(null,F))});var V=new e(I);V.messages(a.messages),m.rule.options&&(m.rule.options.messages=a.messages,m.rule.options.error=a.error),V.validate(m.value,m.rule.options||a,function(F){var Y=[];N&&N.length&&Y.push.apply(Y,N),F&&F.length&&Y.push.apply(Y,F),y(Y.length?Y:null)})}}var x;if(v.asyncValidator)x=v.asyncValidator(v,m.value,$,m.source,a);else if(v.validator){try{x=v.validator(v,m.value,$,m.source,a)}catch(E){console.error==null||console.error(E),a.suppressValidatorError||setTimeout(function(){throw E},0),$(E.message)}x===!0?$():x===!1?$(typeof v.message=="function"?v.message(v.fullField||v.field):v.message||(v.fullField||v.field)+" fails"):x instanceof Array?$(x):x instanceof Error&&$(x.message)}x&&x.then&&x.then(function(){return $()},function(E){return $(E)})},function(m){c(m)},l)},t.getType=function(o){if(o.type===void 0&&o.pattern instanceof RegExp&&(o.type="pattern"),typeof o.validator!="function"&&o.type&&!Gf.hasOwnProperty(o.type))throw new Error(dr("Unknown rule type %s",o.type));return o.type||"string"},t.getValidationMethod=function(o){if(typeof o.validator=="function")return o.validator;var r=Object.keys(o),s=r.indexOf("message");return s!==-1&&r.splice(s,1),r.length===1&&r[0]==="required"?Gf.required:Gf[this.getType(o)]||void 0},e}();mh.register=function(t,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");Gf[t]=n};mh.warning=WQ;mh.messages=fb;mh.validators=Gf;const _ee=["","error","validating","success"],bee=Ke({label:String,labelWidth:{type:[String,Number],default:""},prop:{type:Ce([String,Array])},required:{type:Boolean,default:void 0},rules:{type:Ce([Object,Array])},error:String,validateStatus:{type:String,values:_ee},for:String,inlineMessage:{type:[String,Boolean],default:""},showMessage:{type:Boolean,default:!0},size:{type:String,values:Jl}}),U5="ElLabelWrap";var wee=Q({name:U5,props:{isAutoWidth:Boolean,updateAll:Boolean},setup(e,{slots:t}){const n=je(kd,void 0),o=je(du);o||Cs(U5,"usage: <el-form-item><label-wrap /></el-form-item>");const r=Re("form"),s=q(),i=q(0),l=()=>{var c;if((c=s.value)!=null&&c.firstElementChild){const d=window.getComputedStyle(s.value.firstElementChild).width;return Math.ceil(Number.parseFloat(d))}else return 0},a=(c="update")=>{ot(()=>{t.default&&e.isAutoWidth&&(c==="update"?i.value=l():c==="remove"&&(n==null||n.deregisterLabelWidth(i.value)))})},u=()=>a("update");return Ct(()=>{u()}),xn(()=>{a("remove")}),Fi(()=>u()),Me(i,(c,d)=>{e.updateAll&&(n==null||n.registerLabelWidth(c,d))}),Bo(R(()=>{var c,d;return(d=(c=s.value)==null?void 0:c.firstElementChild)!=null?d:null}),u),()=>{var c,d;if(!t)return null;const{isAutoWidth:f}=e;if(f){const p=n==null?void 0:n.autoLabelWidth,h=o==null?void 0:o.hasLabel,m={};if(h&&p&&p!=="auto"){const y=Math.max(0,Number.parseInt(p,10)-i.value),v=n.labelPosition==="left"?"marginRight":"marginLeft";y&&(m[v]=`${y}px`)}return w("div",{ref:s,class:[r.be("item","label-wrap")],style:m},[(c=t.default)==null?void 0:c.call(t)])}else return w(de,{ref:s},[(d=t.default)==null?void 0:d.call(t)])}}});const Cee=["role","aria-labelledby"],kee=Q({name:"ElFormItem"}),See=Q({...kee,props:bee,setup(e,{expose:t}){const n=e,o=Kr(),r=je(kd,void 0),s=je(du,void 0),i=Jo(void 0,{formItem:!1}),l=Re("form-item"),a=Hr().value,u=q([]),c=q(""),d=Yj(c,100),f=q(""),p=q();let h,m=!1;const y=R(()=>{if((r==null?void 0:r.labelPosition)==="top")return{};const te=Zo(n.labelWidth||(r==null?void 0:r.labelWidth)||"");return te?{width:te}:{}}),v=R(()=>{if((r==null?void 0:r.labelPosition)==="top"||r!=null&&r.inline)return{};if(!n.label&&!n.labelWidth&&P)return{};const te=Zo(n.labelWidth||(r==null?void 0:r.labelWidth)||"");return!n.label&&!o.label?{marginLeft:te}:{}}),k=R(()=>[l.b(),l.m(i.value),l.is("error",c.value==="error"),l.is("validating",c.value==="validating"),l.is("success",c.value==="success"),l.is("required",Z.value||n.required),l.is("no-asterisk",r==null?void 0:r.hideRequiredAsterisk),(r==null?void 0:r.requireAsteriskPosition)==="right"?"asterisk-right":"asterisk-left",{[l.m("feedback")]:r==null?void 0:r.statusIcon}]),b=R(()=>Br(n.inlineMessage)?n.inlineMessage:(r==null?void 0:r.inlineMessage)||!1),$=R(()=>[l.e("error"),{[l.em("error","inline")]:b.value}]),x=R(()=>n.prop?tt(n.prop)?n.prop:n.prop.join("."):""),E=R(()=>!!(n.label||o.label)),M=R(()=>n.for||(u.value.length===1?u.value[0]:void 0)),N=R(()=>!M.value&&E.value),P=!!s,I=R(()=>{const te=r==null?void 0:r.model;if(!(!te||!n.prop))return Ym(te,n.prop).value}),V=R(()=>{const{required:te}=n,fe=[];n.rules&&fe.push(...Mg(n.rules));const ve=r==null?void 0:r.rules;if(ve&&n.prop){const le=Ym(ve,n.prop).value;le&&fe.push(...Mg(le))}if(te!==void 0){const le=fe.map((Ae,Ge)=>[Ae,Ge]).filter(([Ae])=>Object.keys(Ae).includes("required"));if(le.length>0)for(const[Ae,Ge]of le)Ae.required!==te&&(fe[Ge]={...Ae,required:te});else fe.push({required:te})}return fe}),F=R(()=>V.value.length>0),Y=te=>V.value.filter(ve=>!ve.trigger||!te?!0:Array.isArray(ve.trigger)?ve.trigger.includes(te):ve.trigger===te).map(({trigger:ve,...le})=>le),Z=R(()=>V.value.some(te=>te.required)),K=R(()=>{var te;return d.value==="error"&&n.showMessage&&((te=r==null?void 0:r.showMessage)!=null?te:!0)}),U=R(()=>`${n.label||""}${(r==null?void 0:r.labelSuffix)||""}`),B=te=>{c.value=te},W=te=>{var fe,ve;const{errors:le,fields:Ae}=te;(!le||!Ae)&&console.error(te),B("error"),f.value=le?(ve=(fe=le==null?void 0:le[0])==null?void 0:fe.message)!=null?ve:`${n.prop} is required`:"",r==null||r.emit("validate",n.prop,!1,f.value)},L=()=>{B("success"),r==null||r.emit("validate",n.prop,!0,"")},A=async te=>{const fe=x.value;return new mh({[fe]:te}).validate({[fe]:I.value},{firstFields:!0}).then(()=>(L(),!0)).catch(le=>(W(le),Promise.reject(le)))},X=async(te,fe)=>{if(m||!n.prop)return!1;const ve=et(fe);if(!F.value)return fe==null||fe(!1),!1;const le=Y(te);return le.length===0?(fe==null||fe(!0),!0):(B("validating"),A(le).then(()=>(fe==null||fe(!0),!0)).catch(Ae=>{const{fields:Ge}=Ae;return fe==null||fe(!1,Ge),ve?!1:Promise.reject(Ge)}))},re=()=>{B(""),f.value="",m=!1},j=async()=>{const te=r==null?void 0:r.model;if(!te||!n.prop)return;const fe=Ym(te,n.prop);m=!0,fe.value=f5(h),await ot(),re(),m=!1},ge=te=>{u.value.includes(te)||u.value.push(te)},Oe=te=>{u.value=u.value.filter(fe=>fe!==te)};Me(()=>n.error,te=>{f.value=te||"",B(te?"error":"")},{immediate:!0}),Me(()=>n.validateStatus,te=>B(te||""));const xe=Bn({...oi(n),$el:p,size:i,validateState:c,labelId:a,inputIds:u,isGroup:N,hasLabel:E,fieldValue:I,addInputId:ge,removeInputId:Oe,resetField:j,clearValidate:re,validate:X});return wt(du,xe),Ct(()=>{n.prop&&(r==null||r.addField(xe),h=f5(I.value))}),xn(()=>{r==null||r.removeField(xe)}),t({size:i,validateMessage:f,validateState:c,validate:X,clearValidate:re,resetField:j}),(te,fe)=>{var ve;return C(),T("div",{ref_key:"formItemRef",ref:p,class:D(g(k)),role:g(N)?"group":void 0,"aria-labelledby":g(N)?g(a):void 0},[w(g(wee),{"is-auto-width":g(y).width==="auto","update-all":((ve=g(r))==null?void 0:ve.labelWidth)==="auto"},{default:S(()=>[g(E)?(C(),H(Pt(g(M)?"label":"div"),{key:0,id:g(a),for:g(M),class:D(g(l).e("label")),style:Ye(g(y))},{default:S(()=>[he(te.$slots,"label",{label:g(U)},()=>[ne(O(g(U)),1)])]),_:3},8,["id","for","class","style"])):z("v-if",!0)]),_:3},8,["is-auto-width","update-all"]),_("div",{class:D(g(l).e("content")),style:Ye(g(v))},[he(te.$slots,"default"),w($0,{name:`${g(l).namespace.value}-zoom-in-top`},{default:S(()=>[g(K)?he(te.$slots,"error",{key:0,error:f.value},()=>[_("div",{class:D(g($))},O(f.value),3)]):z("v-if",!0)]),_:3},8,["name"])],6)],10,Cee)}}});var XT=He(See,[["__file","form-item.vue"]]);const Tn=Zt(BQ,{FormItem:XT}),Mn=Jn(XT);let Xr;const $ee=` |
| 51 |
height:0 !important; |
| 52 |
visibility:hidden !important; |
| 53 |
${mH()?"":"overflow:hidden !important;"} |
| 54 |
position:absolute !important; |
| 55 |
z-index:-1000 !important; |
| 56 |
top:0 !important; |
| 57 |
right:0 !important; |
| 58 |
`,Eee=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing"];function xee(e){const t=window.getComputedStyle(e),n=t.getPropertyValue("box-sizing"),o=Number.parseFloat(t.getPropertyValue("padding-bottom"))+Number.parseFloat(t.getPropertyValue("padding-top")),r=Number.parseFloat(t.getPropertyValue("border-bottom-width"))+Number.parseFloat(t.getPropertyValue("border-top-width"));return{contextStyle:Eee.map(i=>`${i}:${t.getPropertyValue(i)}`).join(";"),paddingSize:o,borderSize:r,boxSizing:n}}function W5(e,t=1,n){var o;Xr||(Xr=document.createElement("textarea"),document.body.appendChild(Xr));const{paddingSize:r,borderSize:s,boxSizing:i,contextStyle:l}=xee(e);Xr.setAttribute("style",`${l};${$ee}`),Xr.value=e.value||e.placeholder||"";let a=Xr.scrollHeight;const u={};i==="border-box"?a=a+s:i==="content-box"&&(a=a-r),Xr.value="";const c=Xr.scrollHeight-r;if(_t(t)){let d=c*t;i==="border-box"&&(d=d+r+s),a=Math.max(d,a),u.minHeight=`${d}px`}if(_t(n)){let d=c*n;i==="border-box"&&(d=d+r+s),a=Math.min(d,a)}return u.height=`${a}px`,(o=Xr.parentNode)==null||o.removeChild(Xr),Xr=void 0,u}const Tee=Ke({id:{type:String,default:void 0},size:Gr,disabled:Boolean,modelValue:{type:Ce([String,Number,Object]),default:""},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},type:{type:String,default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:Ce([Boolean,Object]),default:!1},autocomplete:{type:String,default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},showPassword:{type:Boolean,default:!1},showWordLimit:{type:Boolean,default:!1},suffixIcon:{type:Io},prefixIcon:{type:Io},containerRole:{type:String,default:void 0},label:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:Ce([Object,Array,String]),default:()=>Eo({})},autofocus:{type:Boolean,default:!1}}),Mee={[Jt]:e=>tt(e),input:e=>tt(e),change:e=>tt(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>!0,mouseleave:e=>e instanceof MouseEvent,mouseenter:e=>e instanceof MouseEvent,keydown:e=>e instanceof Event,compositionstart:e=>e instanceof CompositionEvent,compositionupdate:e=>e instanceof CompositionEvent,compositionend:e=>e instanceof CompositionEvent},Oee=["role"],Iee=["id","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus"],Aee=["id","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus"],Nee=Q({name:"ElInput",inheritAttrs:!1}),Pee=Q({...Nee,props:Tee,emits:Mee,setup(e,{expose:t,emit:n}){const o=e,r=_d(),s=Kr(),i=R(()=>{const ce={};return o.containerRole==="combobox"&&(ce["aria-haspopup"]=r["aria-haspopup"],ce["aria-owns"]=r["aria-owns"],ce["aria-expanded"]=r["aria-expanded"]),ce}),l=R(()=>[o.type==="textarea"?y.b():m.b(),m.m(p.value),m.is("disabled",h.value),m.is("exceed",ge.value),{[m.b("group")]:s.prepend||s.append,[m.bm("group","append")]:s.append,[m.bm("group","prepend")]:s.prepend,[m.m("prefix")]:s.prefix||o.prefixIcon,[m.m("suffix")]:s.suffix||o.suffixIcon||o.clearable||o.showPassword,[m.bm("suffix","password-clear")]:A.value&&X.value,[m.b("hidden")]:o.type==="hidden"},r.class]),a=R(()=>[m.e("wrapper"),m.is("focus",I.value)]),u=hT({excludeKeys:R(()=>Object.keys(i.value))}),{form:c,formItem:d}=si(),{inputId:f}=Sd(o,{formItemContext:d}),p=Jo(),h=Yr(),m=Re("input"),y=Re("textarea"),v=An(),k=An(),b=q(!1),$=q(!1),x=q(!1),E=q(),M=An(o.inputStyle),N=R(()=>v.value||k.value),{wrapperRef:P,isFocused:I,handleFocus:V,handleBlur:F}=Aw(N,{afterBlur(){var ce;o.validateEvent&&((ce=d==null?void 0:d.validate)==null||ce.call(d,"blur").catch(oe=>void 0))}}),Y=R(()=>{var ce;return(ce=c==null?void 0:c.statusIcon)!=null?ce:!1}),Z=R(()=>(d==null?void 0:d.validateState)||""),K=R(()=>Z.value&&fT[Z.value]),U=R(()=>x.value?aT:iT),B=R(()=>[r.style]),W=R(()=>[o.inputStyle,M.value,{resize:o.resize}]),L=R(()=>To(o.modelValue)?"":String(o.modelValue)),A=R(()=>o.clearable&&!h.value&&!o.readonly&&!!L.value&&(I.value||b.value)),X=R(()=>o.showPassword&&!h.value&&!o.readonly&&!!L.value&&(!!L.value||I.value)),re=R(()=>o.showWordLimit&&!!o.maxlength&&(o.type==="text"||o.type==="textarea")&&!h.value&&!o.readonly&&!o.showPassword),j=R(()=>L.value.length),ge=R(()=>!!re.value&&j.value>Number(o.maxlength)),Oe=R(()=>!!s.suffix||!!o.suffixIcon||A.value||o.showPassword||re.value||!!Z.value&&Y.value),[xe,te]=wQ(v);Bo(k,ce=>{if(le(),!re.value||o.resize!=="both")return;const oe=ce[0],{width:pe}=oe.contentRect;E.value={right:`calc(100% - ${pe+15+6}px)`}});const fe=()=>{const{type:ce,autosize:oe}=o;if(!(!Tt||ce!=="textarea"||!k.value))if(oe){const pe=pt(oe)?oe.minRows:void 0,ze=pt(oe)?oe.maxRows:void 0,Qe=W5(k.value,pe,ze);M.value={overflowY:"hidden",...Qe},ot(()=>{k.value.offsetHeight,M.value=Qe})}else M.value={minHeight:W5(k.value).minHeight}},le=(ce=>{let oe=!1;return()=>{var pe;if(oe||!o.autosize)return;((pe=k.value)==null?void 0:pe.offsetParent)===null||(ce(),oe=!0)}})(fe),Ae=()=>{const ce=N.value,oe=o.formatter?o.formatter(L.value):L.value;!ce||ce.value===oe||(ce.value=oe)},Ge=async ce=>{xe();let{value:oe}=ce.target;if(o.formatter&&(oe=o.parser?o.parser(oe):oe),!$.value){if(oe===L.value){Ae();return}n(Jt,oe),n("input",oe),await ot(),Ae(),te()}},G=ce=>{n("change",ce.target.value)},J=ce=>{n("compositionstart",ce),$.value=!0},ue=ce=>{var oe;n("compositionupdate",ce);const pe=(oe=ce.target)==null?void 0:oe.value,ze=pe[pe.length-1]||"";$.value=!pT(ze)},_e=ce=>{n("compositionend",ce),$.value&&($.value=!1,Ge(ce))},ye=()=>{x.value=!x.value,Ne()},Ne=async()=>{var ce;await ot(),(ce=N.value)==null||ce.focus()},Le=()=>{var ce;return(ce=N.value)==null?void 0:ce.blur()},Ee=ce=>{b.value=!1,n("mouseleave",ce)},Pe=ce=>{b.value=!0,n("mouseenter",ce)},me=ce=>{n("keydown",ce)},Ue=()=>{var ce;(ce=N.value)==null||ce.select()},Xe=()=>{n(Jt,""),n("change",""),n("clear"),n("input","")};return Me(()=>o.modelValue,()=>{var ce;ot(()=>fe()),o.validateEvent&&((ce=d==null?void 0:d.validate)==null||ce.call(d,"change").catch(oe=>void 0))}),Me(L,()=>Ae()),Me(()=>o.type,async()=>{await ot(),Ae(),fe()}),Ct(()=>{!o.formatter&&o.parser,Ae(),ot(fe)}),t({input:v,textarea:k,ref:N,textareaStyle:W,autosize:pn(o,"autosize"),focus:Ne,blur:Le,select:Ue,clear:Xe,resizeTextarea:fe}),(ce,oe)=>(C(),T("div",un(g(i),{class:g(l),style:g(B),role:ce.containerRole,onMouseenter:Pe,onMouseleave:Ee}),[z(" input "),ce.type!=="textarea"?(C(),T(de,{key:0},[z(" prepend slot "),ce.$slots.prepend?(C(),T("div",{key:0,class:D(g(m).be("group","prepend"))},[he(ce.$slots,"prepend")],2)):z("v-if",!0),_("div",{ref_key:"wrapperRef",ref:P,class:D(g(a))},[z(" prefix slot "),ce.$slots.prefix||ce.prefixIcon?(C(),T("span",{key:0,class:D(g(m).e("prefix"))},[_("span",{class:D(g(m).e("prefix-inner"))},[he(ce.$slots,"prefix"),ce.prefixIcon?(C(),H(g(Ie),{key:0,class:D(g(m).e("icon"))},{default:S(()=>[(C(),H(Pt(ce.prefixIcon)))]),_:1},8,["class"])):z("v-if",!0)],2)],2)):z("v-if",!0),_("input",un({id:g(f),ref_key:"input",ref:v,class:g(m).e("inner")},g(u),{minlength:ce.minlength,maxlength:ce.maxlength,type:ce.showPassword?x.value?"text":"password":ce.type,disabled:g(h),readonly:ce.readonly,autocomplete:ce.autocomplete,tabindex:ce.tabindex,"aria-label":ce.label,placeholder:ce.placeholder,style:ce.inputStyle,form:ce.form,autofocus:ce.autofocus,onCompositionstart:J,onCompositionupdate:ue,onCompositionend:_e,onInput:Ge,onFocus:oe[0]||(oe[0]=(...pe)=>g(V)&&g(V)(...pe)),onBlur:oe[1]||(oe[1]=(...pe)=>g(F)&&g(F)(...pe)),onChange:G,onKeydown:me}),null,16,Iee),z(" suffix slot "),g(Oe)?(C(),T("span",{key:1,class:D(g(m).e("suffix"))},[_("span",{class:D(g(m).e("suffix-inner"))},[!g(A)||!g(X)||!g(re)?(C(),T(de,{key:0},[he(ce.$slots,"suffix"),ce.suffixIcon?(C(),H(g(Ie),{key:0,class:D(g(m).e("icon"))},{default:S(()=>[(C(),H(Pt(ce.suffixIcon)))]),_:1},8,["class"])):z("v-if",!0)],64)):z("v-if",!0),g(A)?(C(),H(g(Ie),{key:1,class:D([g(m).e("icon"),g(m).e("clear")]),onMousedown:Ze(g(yt),["prevent"]),onClick:Xe},{default:S(()=>[w(g(wd))]),_:1},8,["class","onMousedown"])):z("v-if",!0),g(X)?(C(),H(g(Ie),{key:2,class:D([g(m).e("icon"),g(m).e("password")]),onClick:ye},{default:S(()=>[(C(),H(Pt(g(U))))]),_:1},8,["class"])):z("v-if",!0),g(re)?(C(),T("span",{key:3,class:D(g(m).e("count"))},[_("span",{class:D(g(m).e("count-inner"))},O(g(j))+" / "+O(ce.maxlength),3)],2)):z("v-if",!0),g(Z)&&g(K)&&g(Y)?(C(),H(g(Ie),{key:4,class:D([g(m).e("icon"),g(m).e("validateIcon"),g(m).is("loading",g(Z)==="validating")])},{default:S(()=>[(C(),H(Pt(g(K))))]),_:1},8,["class"])):z("v-if",!0)],2)],2)):z("v-if",!0)],2),z(" append slot "),ce.$slots.append?(C(),T("div",{key:1,class:D(g(m).be("group","append"))},[he(ce.$slots,"append")],2)):z("v-if",!0)],64)):(C(),T(de,{key:1},[z(" textarea "),_("textarea",un({id:g(f),ref_key:"textarea",ref:k,class:g(y).e("inner")},g(u),{minlength:ce.minlength,maxlength:ce.maxlength,tabindex:ce.tabindex,disabled:g(h),readonly:ce.readonly,autocomplete:ce.autocomplete,style:g(W),"aria-label":ce.label,placeholder:ce.placeholder,form:ce.form,autofocus:ce.autofocus,onCompositionstart:J,onCompositionupdate:ue,onCompositionend:_e,onInput:Ge,onFocus:oe[2]||(oe[2]=(...pe)=>g(V)&&g(V)(...pe)),onBlur:oe[3]||(oe[3]=(...pe)=>g(F)&&g(F)(...pe)),onChange:G,onKeydown:me}),null,16,Aee),g(re)?(C(),T("span",{key:0,style:Ye(E.value),class:D(g(m).e("count"))},O(g(j))+" / "+O(ce.maxlength),7)):z("v-if",!0)],64))],16,Oee))}});var Lee=He(Pee,[["__file","input.vue"]]);const $t=Zt(Lee),Pu=4,Ree={vertical:{offset:"offsetHeight",scroll:"scrollTop",scrollSize:"scrollHeight",size:"height",key:"vertical",axis:"Y",client:"clientY",direction:"top"},horizontal:{offset:"offsetWidth",scroll:"scrollLeft",scrollSize:"scrollWidth",size:"width",key:"horizontal",axis:"X",client:"clientX",direction:"left"}},Dee=({move:e,size:t,bar:n})=>({[n.size]:t,transform:`translate${n.axis}(${e}%)`}),Lw=Symbol("scrollbarContextKey"),Vee=Ke({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),Fee="Thumb",Bee=Q({__name:"thumb",props:Vee,setup(e){const t=e,n=je(Lw),o=Re("scrollbar");n||Cs(Fee,"can not inject scrollbar context");const r=q(),s=q(),i=q({}),l=q(!1);let a=!1,u=!1,c=Tt?document.onselectstart:null;const d=R(()=>Ree[t.vertical?"vertical":"horizontal"]),f=R(()=>Dee({size:t.size,move:t.move,bar:d.value})),p=R(()=>r.value[d.value.offset]**2/n.wrapElement[d.value.scrollSize]/t.ratio/s.value[d.value.offset]),h=E=>{var M;if(E.stopPropagation(),E.ctrlKey||[1,2].includes(E.button))return;(M=window.getSelection())==null||M.removeAllRanges(),y(E);const N=E.currentTarget;N&&(i.value[d.value.axis]=N[d.value.offset]-(E[d.value.client]-N.getBoundingClientRect()[d.value.direction]))},m=E=>{if(!s.value||!r.value||!n.wrapElement)return;const M=Math.abs(E.target.getBoundingClientRect()[d.value.direction]-E[d.value.client]),N=s.value[d.value.offset]/2,P=(M-N)*100*p.value/r.value[d.value.offset];n.wrapElement[d.value.scroll]=P*n.wrapElement[d.value.scrollSize]/100},y=E=>{E.stopImmediatePropagation(),a=!0,document.addEventListener("mousemove",v),document.addEventListener("mouseup",k),c=document.onselectstart,document.onselectstart=()=>!1},v=E=>{if(!r.value||!s.value||a===!1)return;const M=i.value[d.value.axis];if(!M)return;const N=(r.value.getBoundingClientRect()[d.value.direction]-E[d.value.client])*-1,P=s.value[d.value.offset]-M,I=(N-P)*100*p.value/r.value[d.value.offset];n.wrapElement[d.value.scroll]=I*n.wrapElement[d.value.scrollSize]/100},k=()=>{a=!1,i.value[d.value.axis]=0,document.removeEventListener("mousemove",v),document.removeEventListener("mouseup",k),x(),u&&(l.value=!1)},b=()=>{u=!1,l.value=!!t.size},$=()=>{u=!0,l.value=a};xn(()=>{x(),document.removeEventListener("mouseup",k)});const x=()=>{document.onselectstart!==c&&(document.onselectstart=c)};return Vn(pn(n,"scrollbarElement"),"mousemove",b),Vn(pn(n,"scrollbarElement"),"mouseleave",$),(E,M)=>(C(),H(_r,{name:g(o).b("fade"),persisted:""},{default:S(()=>[Fe(_("div",{ref_key:"instance",ref:r,class:D([g(o).e("bar"),g(o).is(g(d).key)]),onMousedown:m},[_("div",{ref_key:"thumb",ref:s,class:D(g(o).e("thumb")),style:Ye(g(f)),onMousedown:h},null,38)],34),[[en,E.always||l.value]])]),_:1},8,["name"]))}});var K5=He(Bee,[["__file","thumb.vue"]]);const zee=Ke({always:{type:Boolean,default:!0},minSize:{type:Number,required:!0}}),jee=Q({__name:"bar",props:zee,setup(e,{expose:t}){const n=e,o=je(Lw),r=q(0),s=q(0),i=q(""),l=q(""),a=q(1),u=q(1);return t({handleScroll:f=>{if(f){const p=f.offsetHeight-Pu,h=f.offsetWidth-Pu;s.value=f.scrollTop*100/p*a.value,r.value=f.scrollLeft*100/h*u.value}},update:()=>{const f=o==null?void 0:o.wrapElement;if(!f)return;const p=f.offsetHeight-Pu,h=f.offsetWidth-Pu,m=p**2/f.scrollHeight,y=h**2/f.scrollWidth,v=Math.max(m,n.minSize),k=Math.max(y,n.minSize);a.value=m/(p-m)/(v/(p-v)),u.value=y/(h-y)/(k/(h-k)),l.value=v+Pu<p?`${v}px`:"",i.value=k+Pu<h?`${k}px`:""}}),(f,p)=>(C(),T(de,null,[w(K5,{move:r.value,ratio:u.value,size:i.value,always:f.always},null,8,["move","ratio","size","always"]),w(K5,{move:s.value,ratio:a.value,size:l.value,vertical:"",always:f.always},null,8,["move","ratio","size","always"])],64))}});var Hee=He(jee,[["__file","bar.vue"]]);const Uee=Ke({height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:{type:Boolean,default:!1},wrapStyle:{type:Ce([String,Object,Array]),default:""},wrapClass:{type:[String,Array],default:""},viewClass:{type:[String,Array],default:""},viewStyle:{type:[String,Array,Object],default:""},noresize:Boolean,tag:{type:String,default:"div"},always:Boolean,minSize:{type:Number,default:20},id:String,role:String,ariaLabel:String,ariaOrientation:{type:String,values:["horizontal","vertical"]}}),Wee={scroll:({scrollTop:e,scrollLeft:t})=>[e,t].every(_t)},Kee="ElScrollbar",qee=Q({name:Kee}),Gee=Q({...qee,props:Uee,emits:Wee,setup(e,{expose:t,emit:n}){const o=e,r=Re("scrollbar");let s,i;const l=q(),a=q(),u=q(),c=q(),d=R(()=>{const b={};return o.height&&(b.height=Zo(o.height)),o.maxHeight&&(b.maxHeight=Zo(o.maxHeight)),[o.wrapStyle,b]}),f=R(()=>[o.wrapClass,r.e("wrap"),{[r.em("wrap","hidden-default")]:!o.native}]),p=R(()=>[r.e("view"),o.viewClass]),h=()=>{var b;a.value&&((b=c.value)==null||b.handleScroll(a.value),n("scroll",{scrollTop:a.value.scrollTop,scrollLeft:a.value.scrollLeft}))};function m(b,$){pt(b)?a.value.scrollTo(b):_t(b)&&_t($)&&a.value.scrollTo(b,$)}const y=b=>{_t(b)&&(a.value.scrollTop=b)},v=b=>{_t(b)&&(a.value.scrollLeft=b)},k=()=>{var b;(b=c.value)==null||b.update()};return Me(()=>o.noresize,b=>{b?(s==null||s(),i==null||i()):({stop:s}=Bo(u,k),i=Vn("resize",k))},{immediate:!0}),Me(()=>[o.maxHeight,o.height],()=>{o.native||ot(()=>{var b;k(),a.value&&((b=c.value)==null||b.handleScroll(a.value))})}),wt(Lw,Bn({scrollbarElement:l,wrapElement:a})),Ct(()=>{o.native||ot(()=>{k()})}),Fi(()=>k()),t({wrapRef:a,update:k,scrollTo:m,setScrollTop:y,setScrollLeft:v,handleScroll:h}),(b,$)=>(C(),T("div",{ref_key:"scrollbarRef",ref:l,class:D(g(r).b())},[_("div",{ref_key:"wrapRef",ref:a,class:D(g(f)),style:Ye(g(d)),onScroll:h},[(C(),H(Pt(b.tag),{id:b.id,ref_key:"resizeRef",ref:u,class:D(g(p)),style:Ye(b.viewStyle),role:b.role,"aria-label":b.ariaLabel,"aria-orientation":b.ariaOrientation},{default:S(()=>[he(b.$slots,"default")]),_:3},8,["id","class","style","role","aria-label","aria-orientation"]))],38),b.native?z("v-if",!0):(C(),H(Hee,{key:0,ref_key:"barRef",ref:c,always:b.always,"min-size":b.minSize},null,8,["always","min-size"]))],2))}});var Yee=He(Gee,[["__file","scrollbar.vue"]]);const Ss=Zt(Yee),Rw=Symbol("popper"),QT=Symbol("popperContent"),Zee=["dialog","grid","group","listbox","menu","navigation","tooltip","tree"],eM=Ke({role:{type:String,values:Zee,default:"tooltip"}}),Jee=Q({name:"ElPopper",inheritAttrs:!1}),Xee=Q({...Jee,props:eM,setup(e,{expose:t}){const n=e,o=q(),r=q(),s=q(),i=q(),l=R(()=>n.role),a={triggerRef:o,popperInstanceRef:r,contentRef:s,referenceRef:i,role:l};return t(a),wt(Rw,a),(u,c)=>he(u.$slots,"default")}});var Qee=He(Xee,[["__file","popper.vue"]]);const tM=Ke({arrowOffset:{type:Number,default:5}}),ete=Q({name:"ElPopperArrow",inheritAttrs:!1}),tte=Q({...ete,props:tM,setup(e,{expose:t}){const n=e,o=Re("popper"),{arrowOffset:r,arrowRef:s,arrowStyle:i}=je(QT,void 0);return Me(()=>n.arrowOffset,l=>{r.value=l}),xn(()=>{s.value=void 0}),t({arrowRef:s}),(l,a)=>(C(),T("span",{ref_key:"arrowRef",ref:s,class:D(g(o).e("arrow")),style:Ye(g(i)),"data-popper-arrow":""},null,6))}});var nte=He(tte,[["__file","arrow.vue"]]);const ote="ElOnlyChild",nM=Q({name:ote,setup(e,{slots:t,attrs:n}){var o;const r=je(PT),s=UX((o=r==null?void 0:r.setForwardRef)!=null?o:yt);return()=>{var i;const l=(i=t.default)==null?void 0:i.call(t,n);if(!l||l.length>1)return null;const a=oM(l);return a?Fe(gs(a,n),[[s]]):null}}});function oM(e){if(!e)return null;const t=e;for(const n of t){if(pt(n))switch(n.type){case Yn:continue;case Ni:case"svg":return q5(n);case de:return oM(n.children);default:return n}return q5(n)}return null}function q5(e){const t=Re("only-child");return w("span",{class:t.e("content")},[e])}const rM=Ke({virtualRef:{type:Ce(Object)},virtualTriggering:Boolean,onMouseenter:{type:Ce(Function)},onMouseleave:{type:Ce(Function)},onClick:{type:Ce(Function)},onKeydown:{type:Ce(Function)},onFocus:{type:Ce(Function)},onBlur:{type:Ce(Function)},onContextmenu:{type:Ce(Function)},id:String,open:Boolean}),rte=Q({name:"ElPopperTrigger",inheritAttrs:!1}),ste=Q({...rte,props:rM,setup(e,{expose:t}){const n=e,{role:o,triggerRef:r}=je(Rw,void 0);HX(r);const s=R(()=>l.value?n.id:void 0),i=R(()=>{if(o&&o.value==="tooltip")return n.open&&n.id?n.id:void 0}),l=R(()=>{if(o&&o.value!=="tooltip")return o.value}),a=R(()=>l.value?`${n.open}`:void 0);let u;return Ct(()=>{Me(()=>n.virtualRef,c=>{c&&(r.value=Si(c))},{immediate:!0}),Me(r,(c,d)=>{u==null||u(),u=void 0,ys(c)&&(["onMouseenter","onMouseleave","onClick","onKeydown","onFocus","onBlur","onContextmenu"].forEach(f=>{var p;const h=n[f];h&&(c.addEventListener(f.slice(2).toLowerCase(),h),(p=d==null?void 0:d.removeEventListener)==null||p.call(d,f.slice(2).toLowerCase(),h))}),u=Me([s,i,l,a],f=>{["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach((p,h)=>{To(f[h])?c.removeAttribute(p):c.setAttribute(p,f[h])})},{immediate:!0})),ys(d)&&["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach(f=>d.removeAttribute(f))},{immediate:!0})}),xn(()=>{u==null||u(),u=void 0}),t({triggerRef:r}),(c,d)=>c.virtualTriggering?z("v-if",!0):(C(),H(g(nM),un({key:0},c.$attrs,{"aria-controls":g(s),"aria-describedby":g(i),"aria-expanded":g(a),"aria-haspopup":g(l)}),{default:S(()=>[he(c.$slots,"default")]),_:3},16,["aria-controls","aria-describedby","aria-expanded","aria-haspopup"]))}});var ite=He(ste,[["__file","trigger.vue"]]);const sy="focus-trap.focus-after-trapped",iy="focus-trap.focus-after-released",lte="focus-trap.focusout-prevented",G5={cancelable:!0,bubbles:!1},ate={cancelable:!0,bubbles:!1},Y5="focusAfterTrapped",Z5="focusAfterReleased",Dw=Symbol("elFocusTrap"),Vw=q(),K0=q(0),Fw=q(0);let hm=0;const sM=e=>{const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0||o===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t},J5=(e,t)=>{for(const n of e)if(!ute(n,t))return n},ute=(e,t)=>{if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1},cte=e=>{const t=sM(e),n=J5(t,e),o=J5(t.reverse(),e);return[n,o]},dte=e=>e instanceof HTMLInputElement&&"select"in e,tl=(e,t)=>{if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),Fw.value=window.performance.now(),e!==n&&dte(e)&&t&&e.select()}};function X5(e,t){const n=[...e],o=e.indexOf(t);return o!==-1&&n.splice(o,1),n}const fte=()=>{let e=[];return{push:o=>{const r=e[0];r&&o!==r&&r.pause(),e=X5(e,o),e.unshift(o)},remove:o=>{var r,s;e=X5(e,o),(s=(r=e[0])==null?void 0:r.resume)==null||s.call(r)}}},pte=(e,t=!1)=>{const n=document.activeElement;for(const o of e)if(tl(o,t),document.activeElement!==n)return},Q5=fte(),hte=()=>K0.value>Fw.value,mm=()=>{Vw.value="pointer",K0.value=window.performance.now()},e8=()=>{Vw.value="keyboard",K0.value=window.performance.now()},mte=()=>(Ct(()=>{hm===0&&(document.addEventListener("mousedown",mm),document.addEventListener("touchstart",mm),document.addEventListener("keydown",e8)),hm++}),xn(()=>{hm--,hm<=0&&(document.removeEventListener("mousedown",mm),document.removeEventListener("touchstart",mm),document.removeEventListener("keydown",e8))}),{focusReason:Vw,lastUserFocusTimestamp:K0,lastAutomatedFocusTimestamp:Fw}),gm=e=>new CustomEvent(lte,{...ate,detail:e}),gte=Q({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[Y5,Z5,"focusin","focusout","focusout-prevented","release-requested"],setup(e,{emit:t}){const n=q();let o,r;const{focusReason:s}=mte();VX(h=>{e.trapped&&!i.paused&&t("release-requested",h)});const i={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},l=h=>{if(!e.loop&&!e.trapped||i.paused)return;const{key:m,altKey:y,ctrlKey:v,metaKey:k,currentTarget:b,shiftKey:$}=h,{loop:x}=e,E=m===rt.tab&&!y&&!v&&!k,M=document.activeElement;if(E&&M){const N=b,[P,I]=cte(N);if(P&&I){if(!$&&M===I){const F=gm({focusReason:s.value});t("focusout-prevented",F),F.defaultPrevented||(h.preventDefault(),x&&tl(P,!0))}else if($&&[P,N].includes(M)){const F=gm({focusReason:s.value});t("focusout-prevented",F),F.defaultPrevented||(h.preventDefault(),x&&tl(I,!0))}}else if(M===N){const F=gm({focusReason:s.value});t("focusout-prevented",F),F.defaultPrevented||h.preventDefault()}}};wt(Dw,{focusTrapRef:n,onKeydown:l}),Me(()=>e.focusTrapEl,h=>{h&&(n.value=h)},{immediate:!0}),Me([n],([h],[m])=>{h&&(h.addEventListener("keydown",l),h.addEventListener("focusin",c),h.addEventListener("focusout",d)),m&&(m.removeEventListener("keydown",l),m.removeEventListener("focusin",c),m.removeEventListener("focusout",d))});const a=h=>{t(Y5,h)},u=h=>t(Z5,h),c=h=>{const m=g(n);if(!m)return;const y=h.target,v=h.relatedTarget,k=y&&m.contains(y);e.trapped||v&&m.contains(v)||(o=v),k&&t("focusin",h),!i.paused&&e.trapped&&(k?r=y:tl(r,!0))},d=h=>{const m=g(n);if(!(i.paused||!m))if(e.trapped){const y=h.relatedTarget;!To(y)&&!m.contains(y)&&setTimeout(()=>{if(!i.paused&&e.trapped){const v=gm({focusReason:s.value});t("focusout-prevented",v),v.defaultPrevented||tl(r,!0)}},0)}else{const y=h.target;y&&m.contains(y)||t("focusout",h)}};async function f(){await ot();const h=g(n);if(h){Q5.push(i);const m=h.contains(document.activeElement)?o:document.activeElement;if(o=m,!h.contains(m)){const v=new Event(sy,G5);h.addEventListener(sy,a),h.dispatchEvent(v),v.defaultPrevented||ot(()=>{let k=e.focusStartEl;tt(k)||(tl(k),document.activeElement!==k&&(k="first")),k==="first"&&pte(sM(h),!0),(document.activeElement===m||k==="container")&&tl(h)})}}}function p(){const h=g(n);if(h){h.removeEventListener(sy,a);const m=new CustomEvent(iy,{...G5,detail:{focusReason:s.value}});h.addEventListener(iy,u),h.dispatchEvent(m),!m.defaultPrevented&&(s.value=="keyboard"||!hte()||h.contains(document.activeElement))&&tl(o??document.body),h.removeEventListener(iy,u),Q5.remove(i)}}return Ct(()=>{e.trapped&&f(),Me(()=>e.trapped,h=>{h?f():p()})}),xn(()=>{e.trapped&&p()}),{onKeydown:l}}});function vte(e,t,n,o,r,s){return he(e.$slots,"default",{handleKeydown:e.onKeydown})}var q0=He(gte,[["render",vte],["__file","focus-trap.vue"]]);const yte=["fixed","absolute"],_te=Ke({boundariesPadding:{type:Number,default:0},fallbackPlacements:{type:Ce(Array),default:void 0},gpuAcceleration:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:String,values:B0,default:"bottom"},popperOptions:{type:Ce(Object),default:()=>({})},strategy:{type:String,values:yte,default:"absolute"}}),iM=Ke({..._te,id:String,style:{type:Ce([String,Array,Object])},className:{type:Ce([String,Array,Object])},effect:{type:String,default:"dark"},visible:Boolean,enterable:{type:Boolean,default:!0},pure:Boolean,focusOnShow:{type:Boolean,default:!1},trapping:{type:Boolean,default:!1},popperClass:{type:Ce([String,Array,Object])},popperStyle:{type:Ce([String,Array,Object])},referenceEl:{type:Ce(Object)},triggerTargetEl:{type:Ce(Object)},stopPopperMouseEvent:{type:Boolean,default:!0},ariaLabel:{type:String,default:void 0},virtualTriggering:Boolean,zIndex:Number}),bte={mouseenter:e=>e instanceof MouseEvent,mouseleave:e=>e instanceof MouseEvent,focus:()=>!0,blur:()=>!0,close:()=>!0},wte=(e,t=[])=>{const{placement:n,strategy:o,popperOptions:r}=e,s={placement:n,strategy:o,...r,modifiers:[...kte(e),...t]};return Ste(s,r==null?void 0:r.modifiers),s},Cte=e=>{if(Tt)return Si(e)};function kte(e){const{offset:t,gpuAcceleration:n,fallbackPlacements:o}=e;return[{name:"offset",options:{offset:[0,t??12]}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5,fallbackPlacements:o}},{name:"computeStyles",options:{gpuAcceleration:n}}]}function Ste(e,t){t&&(e.modifiers=[...e.modifiers,...t??[]])}const $te=0,Ete=e=>{const{popperInstanceRef:t,contentRef:n,triggerRef:o,role:r}=je(Rw,void 0),s=q(),i=q(),l=R(()=>({name:"eventListeners",enabled:!!e.visible})),a=R(()=>{var v;const k=g(s),b=(v=g(i))!=null?v:$te;return{name:"arrow",enabled:!Jx(k),options:{element:k,padding:b}}}),u=R(()=>({onFirstUpdate:()=>{h()},...wte(e,[g(a),g(l)])})),c=R(()=>Cte(e.referenceEl)||g(o)),{attributes:d,state:f,styles:p,update:h,forceUpdate:m,instanceRef:y}=PX(c,n,u);return Me(y,v=>t.value=v),Ct(()=>{Me(()=>{var v;return(v=g(c))==null?void 0:v.getBoundingClientRect()},()=>{h()})}),{attributes:d,arrowRef:s,contentRef:n,instanceRef:y,state:f,styles:p,role:r,forceUpdate:m,update:h}},xte=(e,{attributes:t,styles:n,role:o})=>{const{nextZIndex:r}=j0(),s=Re("popper"),i=R(()=>g(t).popper),l=q(_t(e.zIndex)?e.zIndex:r()),a=R(()=>[s.b(),s.is("pure",e.pure),s.is(e.effect),e.popperClass]),u=R(()=>[{zIndex:g(l)},g(n).popper,e.popperStyle||{}]),c=R(()=>o.value==="dialog"?"false":void 0),d=R(()=>g(n).arrow||{});return{ariaModal:c,arrowStyle:d,contentAttrs:i,contentClass:a,contentStyle:u,contentZIndex:l,updateZIndex:()=>{l.value=_t(e.zIndex)?e.zIndex:r()}}},Tte=(e,t)=>{const n=q(!1),o=q();return{focusStartRef:o,trapped:n,onFocusAfterReleased:u=>{var c;((c=u.detail)==null?void 0:c.focusReason)!=="pointer"&&(o.value="first",t("blur"))},onFocusAfterTrapped:()=>{t("focus")},onFocusInTrap:u=>{e.visible&&!n.value&&(u.target&&(o.value=u.target),n.value=!0)},onFocusoutPrevented:u=>{e.trapping||(u.detail.focusReason==="pointer"&&u.preventDefault(),n.value=!1)},onReleaseRequested:()=>{n.value=!1,t("close")}}},Mte=Q({name:"ElPopperContent"}),Ote=Q({...Mte,props:iM,emits:bte,setup(e,{expose:t,emit:n}){const o=e,{focusStartRef:r,trapped:s,onFocusAfterReleased:i,onFocusAfterTrapped:l,onFocusInTrap:a,onFocusoutPrevented:u,onReleaseRequested:c}=Tte(o,n),{attributes:d,arrowRef:f,contentRef:p,styles:h,instanceRef:m,role:y,update:v}=Ete(o),{ariaModal:k,arrowStyle:b,contentAttrs:$,contentClass:x,contentStyle:E,updateZIndex:M}=xte(o,{styles:h,attributes:d,role:y}),N=je(du,void 0),P=q();wt(QT,{arrowStyle:b,arrowRef:f,arrowOffset:P}),N&&(N.addInputId||N.removeInputId)&&wt(du,{...N,addInputId:yt,removeInputId:yt});let I;const V=(Y=!0)=>{v(),Y&&M()},F=()=>{V(!1),o.visible&&o.focusOnShow?s.value=!0:o.visible===!1&&(s.value=!1)};return Ct(()=>{Me(()=>o.triggerTargetEl,(Y,Z)=>{I==null||I(),I=void 0;const K=g(Y||p.value),U=g(Z||p.value);ys(K)&&(I=Me([y,()=>o.ariaLabel,k,()=>o.id],B=>{["role","aria-label","aria-modal","id"].forEach((W,L)=>{To(B[L])?K.removeAttribute(W):K.setAttribute(W,B[L])})},{immediate:!0})),U!==K&&ys(U)&&["role","aria-label","aria-modal","id"].forEach(B=>{U.removeAttribute(B)})},{immediate:!0}),Me(()=>o.visible,F,{immediate:!0})}),xn(()=>{I==null||I(),I=void 0}),t({popperContentRef:p,popperInstanceRef:m,updatePopper:V,contentStyle:E}),(Y,Z)=>(C(),T("div",un({ref_key:"contentRef",ref:p},g($),{style:g(E),class:g(x),tabindex:"-1",onMouseenter:Z[0]||(Z[0]=K=>Y.$emit("mouseenter",K)),onMouseleave:Z[1]||(Z[1]=K=>Y.$emit("mouseleave",K))}),[w(g(q0),{trapped:g(s),"trap-on-focus-in":!0,"focus-trap-el":g(p),"focus-start-el":g(r),onFocusAfterTrapped:g(l),onFocusAfterReleased:g(i),onFocusin:g(a),onFocusoutPrevented:g(u),onReleaseRequested:g(c)},{default:S(()=>[he(Y.$slots,"default")]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusin","onFocusoutPrevented","onReleaseRequested"])],16))}});var Ite=He(Ote,[["__file","content.vue"]]);const Ate=Zt(Qee),G0=Symbol("elTooltip"),ar=Ke({...zX,...iM,appendTo:{type:Ce([String,Object])},content:{type:String,default:""},rawContent:{type:Boolean,default:!1},persistent:Boolean,ariaLabel:String,visible:{type:Ce(Boolean),default:null},transition:String,teleported:{type:Boolean,default:!0},disabled:Boolean}),Vp=Ke({...rM,disabled:Boolean,trigger:{type:Ce([String,Array]),default:"hover"},triggerKeys:{type:Ce(Array),default:()=>[rt.enter,rt.space]}}),{useModelToggleProps:Nte,useModelToggleEmits:Pte,useModelToggle:Lte}=_T("visible"),Rte=Ke({...eM,...Nte,...ar,...Vp,...tM,showArrow:{type:Boolean,default:!0}}),Dte=[...Pte,"before-show","before-hide","show","hide","open","close"],Vte=(e,t)=>Te(e)?e.includes(t):e===t,Lu=(e,t,n)=>o=>{Vte(g(e),t)&&n(o)},Fte=Q({name:"ElTooltipTrigger"}),Bte=Q({...Fte,props:Vp,setup(e,{expose:t}){const n=e,o=Re("tooltip"),{controlled:r,id:s,open:i,onOpen:l,onClose:a,onToggle:u}=je(G0,void 0),c=q(null),d=()=>{if(g(r)||n.disabled)return!0},f=pn(n,"trigger"),p=Rn(d,Lu(f,"hover",l)),h=Rn(d,Lu(f,"hover",a)),m=Rn(d,Lu(f,"click",$=>{$.button===0&&u($)})),y=Rn(d,Lu(f,"focus",l)),v=Rn(d,Lu(f,"focus",a)),k=Rn(d,Lu(f,"contextmenu",$=>{$.preventDefault(),u($)})),b=Rn(d,$=>{const{code:x}=$;n.triggerKeys.includes(x)&&($.preventDefault(),u($))});return t({triggerRef:c}),($,x)=>(C(),H(g(ite),{id:g(s),"virtual-ref":$.virtualRef,open:g(i),"virtual-triggering":$.virtualTriggering,class:D(g(o).e("trigger")),onBlur:g(v),onClick:g(m),onContextmenu:g(k),onFocus:g(y),onMouseenter:g(p),onMouseleave:g(h),onKeydown:g(b)},{default:S(()=>[he($.$slots,"default")]),_:3},8,["id","virtual-ref","open","virtual-triggering","class","onBlur","onClick","onContextmenu","onFocus","onMouseenter","onMouseleave","onKeydown"]))}});var zte=He(Bte,[["__file","trigger.vue"]]);const jte=Q({name:"ElTooltipContent",inheritAttrs:!1}),Hte=Q({...jte,props:ar,setup(e,{expose:t}){const n=e,{selector:o}=NT(),r=Re("tooltip"),s=q(null),i=q(!1),{controlled:l,id:a,open:u,trigger:c,onClose:d,onOpen:f,onShow:p,onHide:h,onBeforeShow:m,onBeforeHide:y}=je(G0,void 0),v=R(()=>n.transition||`${r.namespace.value}-fade-in-linear`),k=R(()=>n.persistent);xn(()=>{i.value=!0});const b=R(()=>g(k)?!0:g(u)),$=R(()=>n.disabled?!1:g(u)),x=R(()=>n.appendTo||o.value),E=R(()=>{var B;return(B=n.style)!=null?B:{}}),M=R(()=>!g(u)),N=()=>{h()},P=()=>{if(g(l))return!0},I=Rn(P,()=>{n.enterable&&g(c)==="hover"&&f()}),V=Rn(P,()=>{g(c)==="hover"&&d()}),F=()=>{var B,W;(W=(B=s.value)==null?void 0:B.updatePopper)==null||W.call(B),m==null||m()},Y=()=>{y==null||y()},Z=()=>{p(),U=yx(R(()=>{var B;return(B=s.value)==null?void 0:B.popperContentRef}),()=>{if(g(l))return;g(c)!=="hover"&&d()})},K=()=>{n.virtualTriggering||d()};let U;return Me(()=>g(u),B=>{B||U==null||U()},{flush:"post"}),Me(()=>n.content,()=>{var B,W;(W=(B=s.value)==null?void 0:B.updatePopper)==null||W.call(B)}),t({contentRef:s}),(B,W)=>(C(),H(qr,{disabled:!B.teleported,to:g(x)},[w(_r,{name:g(v),onAfterLeave:N,onBeforeEnter:F,onAfterEnter:Z,onBeforeLeave:Y},{default:S(()=>[g(b)?Fe((C(),H(g(Ite),un({key:0,id:g(a),ref_key:"contentRef",ref:s},B.$attrs,{"aria-label":B.ariaLabel,"aria-hidden":g(M),"boundaries-padding":B.boundariesPadding,"fallback-placements":B.fallbackPlacements,"gpu-acceleration":B.gpuAcceleration,offset:B.offset,placement:B.placement,"popper-options":B.popperOptions,strategy:B.strategy,effect:B.effect,enterable:B.enterable,pure:B.pure,"popper-class":B.popperClass,"popper-style":[B.popperStyle,g(E)],"reference-el":B.referenceEl,"trigger-target-el":B.triggerTargetEl,visible:g($),"z-index":B.zIndex,onMouseenter:g(I),onMouseleave:g(V),onBlur:K,onClose:g(d)}),{default:S(()=>[i.value?z("v-if",!0):he(B.$slots,"default",{key:0})]),_:3},16,["id","aria-label","aria-hidden","boundaries-padding","fallback-placements","gpu-acceleration","offset","placement","popper-options","strategy","effect","enterable","pure","popper-class","popper-style","reference-el","trigger-target-el","visible","z-index","onMouseenter","onMouseleave","onClose"])),[[en,g($)]]):z("v-if",!0)]),_:3},8,["name"])],8,["disabled","to"]))}});var Ute=He(Hte,[["__file","content.vue"]]);const Wte=["innerHTML"],Kte={key:1},qte=Q({name:"ElTooltip"}),Gte=Q({...qte,props:Rte,emits:Dte,setup(e,{expose:t,emit:n}){const o=e;BX();const r=Hr(),s=q(),i=q(),l=()=>{var v;const k=g(s);k&&((v=k.popperInstanceRef)==null||v.update())},a=q(!1),u=q(),{show:c,hide:d,hasUpdateHandler:f}=Lte({indicator:a,toggleReason:u}),{onOpen:p,onClose:h}=jX({showAfter:pn(o,"showAfter"),hideAfter:pn(o,"hideAfter"),autoClose:pn(o,"autoClose"),open:c,close:d}),m=R(()=>Br(o.visible)&&!f.value);wt(G0,{controlled:m,id:r,open:wu(a),trigger:pn(o,"trigger"),onOpen:v=>{p(v)},onClose:v=>{h(v)},onToggle:v=>{g(a)?h(v):p(v)},onShow:()=>{n("show",u.value)},onHide:()=>{n("hide",u.value)},onBeforeShow:()=>{n("before-show",u.value)},onBeforeHide:()=>{n("before-hide",u.value)},updatePopper:l}),Me(()=>o.disabled,v=>{v&&a.value&&(a.value=!1)});const y=v=>{var k,b;const $=(b=(k=i.value)==null?void 0:k.contentRef)==null?void 0:b.popperContentRef,x=(v==null?void 0:v.relatedTarget)||document.activeElement;return $&&$.contains(x)};return w3(()=>a.value&&d()),t({popperRef:s,contentRef:i,isFocusInsideContent:y,updatePopper:l,onOpen:p,onClose:h,hide:d}),(v,k)=>(C(),H(g(Ate),{ref_key:"popperRef",ref:s,role:v.role},{default:S(()=>[w(zte,{disabled:v.disabled,trigger:v.trigger,"trigger-keys":v.triggerKeys,"virtual-ref":v.virtualRef,"virtual-triggering":v.virtualTriggering},{default:S(()=>[v.$slots.default?he(v.$slots,"default",{key:0}):z("v-if",!0)]),_:3},8,["disabled","trigger","trigger-keys","virtual-ref","virtual-triggering"]),w(Ute,{ref_key:"contentRef",ref:i,"aria-label":v.ariaLabel,"boundaries-padding":v.boundariesPadding,content:v.content,disabled:v.disabled,effect:v.effect,enterable:v.enterable,"fallback-placements":v.fallbackPlacements,"hide-after":v.hideAfter,"gpu-acceleration":v.gpuAcceleration,offset:v.offset,persistent:v.persistent,"popper-class":v.popperClass,"popper-style":v.popperStyle,placement:v.placement,"popper-options":v.popperOptions,pure:v.pure,"raw-content":v.rawContent,"reference-el":v.referenceEl,"trigger-target-el":v.triggerTargetEl,"show-after":v.showAfter,strategy:v.strategy,teleported:v.teleported,transition:v.transition,"virtual-triggering":v.virtualTriggering,"z-index":v.zIndex,"append-to":v.appendTo},{default:S(()=>[he(v.$slots,"content",{},()=>[v.rawContent?(C(),T("span",{key:0,innerHTML:v.content},null,8,Wte)):(C(),T("span",Kte,O(v.content),1))]),v.showArrow?(C(),H(g(nte),{key:0,"arrow-offset":v.arrowOffset},null,8,["arrow-offset"])):z("v-if",!0)]),_:3},8,["aria-label","boundaries-padding","content","disabled","effect","enterable","fallback-placements","hide-after","gpu-acceleration","offset","persistent","popper-class","popper-style","placement","popper-options","pure","raw-content","reference-el","trigger-target-el","show-after","strategy","teleported","transition","virtual-triggering","z-index","append-to"])]),_:3},8,["role"]))}});var Yte=He(Gte,[["__file","tooltip.vue"]]);const ea=Zt(Yte),Zte=Ke({size:{type:[Number,String],values:Jl,default:"",validator:e=>_t(e)},shape:{type:String,values:["circle","square"],default:"circle"},icon:{type:Io},src:{type:String,default:""},alt:String,srcSet:String,fit:{type:Ce(String),default:"cover"}}),Jte={error:e=>e instanceof Event},Xte=["src","alt","srcset"],Qte=Q({name:"ElAvatar"}),ene=Q({...Qte,props:Zte,emits:Jte,setup(e,{emit:t}){const n=e,o=Re("avatar"),r=q(!1),s=R(()=>{const{size:u,icon:c,shape:d}=n,f=[o.b()];return tt(u)&&f.push(o.m(u)),c&&f.push(o.m("icon")),d&&f.push(o.m(d)),f}),i=R(()=>{const{size:u}=n;return _t(u)?o.cssVarBlock({size:Zo(u)||""}):void 0}),l=R(()=>({objectFit:n.fit}));Me(()=>n.src,()=>r.value=!1);function a(u){r.value=!0,t("error",u)}return(u,c)=>(C(),T("span",{class:D(g(s)),style:Ye(g(i))},[(u.src||u.srcSet)&&!r.value?(C(),T("img",{key:0,src:u.src,alt:u.alt,srcset:u.srcSet,style:Ye(g(l)),onError:a},null,44,Xte)):u.icon?(C(),H(g(Ie),{key:1},{default:S(()=>[(C(),H(Pt(u.icon)))]),_:1})):he(u.$slots,"default",{key:2})],6))}});var tne=He(ene,[["__file","avatar.vue"]]);const nne=Zt(tne),lM=Symbol("breadcrumbKey"),one=Ke({separator:{type:String,default:"/"},separatorIcon:{type:Io}}),rne=["aria-label"],sne=Q({name:"ElBreadcrumb"}),ine=Q({...sne,props:one,setup(e){const t=e,{t:n}=Kt(),o=Re("breadcrumb"),r=q();return wt(lM,t),Ct(()=>{const s=r.value.querySelectorAll(`.${o.e("item")}`);s.length&&s[s.length-1].setAttribute("aria-current","page")}),(s,i)=>(C(),T("div",{ref_key:"breadcrumb",ref:r,class:D(g(o).b()),"aria-label":g(n)("el.breadcrumb.label"),role:"navigation"},[he(s.$slots,"default")],10,rne))}});var lne=He(ine,[["__file","breadcrumb.vue"]]);const ane=Ke({to:{type:Ce([String,Object]),default:""},replace:{type:Boolean,default:!1}}),une=Q({name:"ElBreadcrumbItem"}),cne=Q({...une,props:ane,setup(e){const t=e,n=at(),o=je(lM,void 0),r=Re("breadcrumb"),s=n.appContext.config.globalProperties.$router,i=q(),l=()=>{!t.to||!s||(t.replace?s.replace(t.to):s.push(t.to))};return(a,u)=>{var c,d;return C(),T("span",{class:D(g(r).e("item"))},[_("span",{ref_key:"link",ref:i,class:D([g(r).e("inner"),g(r).is("link",!!a.to)]),role:"link",onClick:l},[he(a.$slots,"default")],2),(c=g(o))!=null&&c.separatorIcon?(C(),H(g(Ie),{key:0,class:D(g(r).e("separator"))},{default:S(()=>[(C(),H(Pt(g(o).separatorIcon)))]),_:1},8,["class"])):(C(),T("span",{key:1,class:D(g(r).e("separator")),role:"presentation"},O((d=g(o))==null?void 0:d.separator),3))],2)}}});var aM=He(cne,[["__file","breadcrumb-item.vue"]]);const dne=Zt(lne,{BreadcrumbItem:aM}),fne=Jn(aM),uM=Symbol("buttonGroupContextKey"),pne=(e,t)=>{qa({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},R(()=>e.type==="text"));const n=je(uM,void 0),o=hh("button"),{form:r}=si(),s=Jo(R(()=>n==null?void 0:n.size)),i=Yr(),l=q(),a=Kr(),u=R(()=>e.type||(n==null?void 0:n.type)||""),c=R(()=>{var h,m,y;return(y=(m=e.autoInsertSpace)!=null?m:(h=o.value)==null?void 0:h.autoInsertSpace)!=null?y:!1}),d=R(()=>e.tag==="button"?{ariaDisabled:i.value||e.loading,disabled:i.value||e.loading,autofocus:e.autofocus,type:e.nativeType}:{}),f=R(()=>{var h;const m=(h=a.default)==null?void 0:h.call(a);if(c.value&&(m==null?void 0:m.length)===1){const y=m[0];if((y==null?void 0:y.type)===Ni){const v=y.children;return/^\p{Unified_Ideograph}{2}$/u.test(v.trim())}}return!1});return{_disabled:i,_size:s,_type:u,_ref:l,_props:d,shouldAddSpace:f,handleClick:h=>{e.nativeType==="reset"&&(r==null||r.resetFields()),t("click",h)}}},hne=["default","primary","success","warning","info","danger","text",""],mne=["button","submit","reset"],pb=Ke({size:Gr,disabled:Boolean,type:{type:String,values:hne,default:""},icon:{type:Io},nativeType:{type:String,values:mne,default:"button"},loading:Boolean,loadingIcon:{type:Io,default:()=>pw},plain:Boolean,text:Boolean,link:Boolean,bg:Boolean,autofocus:Boolean,round:Boolean,circle:Boolean,color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0},tag:{type:Ce([String,Object]),default:"button"}}),gne={click:e=>e instanceof MouseEvent};function lo(e,t){vne(e)&&(e="100%");var n=yne(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function vm(e){return Math.min(1,Math.max(0,e))}function vne(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function yne(e){return typeof e=="string"&&e.indexOf("%")!==-1}function cM(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function ym(e){return e<=1?"".concat(Number(e)*100,"%"):e}function La(e){return e.length===1?"0"+e:String(e)}function _ne(e,t,n){return{r:lo(e,255)*255,g:lo(t,255)*255,b:lo(n,255)*255}}function t8(e,t,n){e=lo(e,255),t=lo(t,255),n=lo(n,255);var o=Math.max(e,t,n),r=Math.min(e,t,n),s=0,i=0,l=(o+r)/2;if(o===r)i=0,s=0;else{var a=o-r;switch(i=l>.5?a/(2-o-r):a/(o+r),o){case e:s=(t-n)/a+(t<n?6:0);break;case t:s=(n-e)/a+2;break;case n:s=(e-t)/a+4;break}s/=6}return{h:s,s:i,l}}function ly(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function bne(e,t,n){var o,r,s;if(e=lo(e,360),t=lo(t,100),n=lo(n,100),t===0)r=n,s=n,o=n;else{var i=n<.5?n*(1+t):n+t-n*t,l=2*n-i;o=ly(l,i,e+1/3),r=ly(l,i,e),s=ly(l,i,e-1/3)}return{r:o*255,g:r*255,b:s*255}}function n8(e,t,n){e=lo(e,255),t=lo(t,255),n=lo(n,255);var o=Math.max(e,t,n),r=Math.min(e,t,n),s=0,i=o,l=o-r,a=o===0?0:l/o;if(o===r)s=0;else{switch(o){case e:s=(t-n)/l+(t<n?6:0);break;case t:s=(n-e)/l+2;break;case n:s=(e-t)/l+4;break}s/=6}return{h:s,s:a,v:i}}function wne(e,t,n){e=lo(e,360)*6,t=lo(t,100),n=lo(n,100);var o=Math.floor(e),r=e-o,s=n*(1-t),i=n*(1-r*t),l=n*(1-(1-r)*t),a=o%6,u=[n,i,s,s,l,n][a],c=[l,n,n,i,s,s][a],d=[s,s,l,n,n,i][a];return{r:u*255,g:c*255,b:d*255}}function o8(e,t,n,o){var r=[La(Math.round(e).toString(16)),La(Math.round(t).toString(16)),La(Math.round(n).toString(16))];return o&&r[0].startsWith(r[0].charAt(1))&&r[1].startsWith(r[1].charAt(1))&&r[2].startsWith(r[2].charAt(1))?r[0].charAt(0)+r[1].charAt(0)+r[2].charAt(0):r.join("")}function Cne(e,t,n,o,r){var s=[La(Math.round(e).toString(16)),La(Math.round(t).toString(16)),La(Math.round(n).toString(16)),La(kne(o))];return r&&s[0].startsWith(s[0].charAt(1))&&s[1].startsWith(s[1].charAt(1))&&s[2].startsWith(s[2].charAt(1))&&s[3].startsWith(s[3].charAt(1))?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0)+s[3].charAt(0):s.join("")}function kne(e){return Math.round(parseFloat(e)*255).toString(16)}function r8(e){return or(e)/255}function or(e){return parseInt(e,16)}function Sne(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var hb={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function $ne(e){var t={r:0,g:0,b:0},n=1,o=null,r=null,s=null,i=!1,l=!1;return typeof e=="string"&&(e=Tne(e)),typeof e=="object"&&(di(e.r)&&di(e.g)&&di(e.b)?(t=_ne(e.r,e.g,e.b),i=!0,l=String(e.r).substr(-1)==="%"?"prgb":"rgb"):di(e.h)&&di(e.s)&&di(e.v)?(o=ym(e.s),r=ym(e.v),t=wne(e.h,o,r),i=!0,l="hsv"):di(e.h)&&di(e.s)&&di(e.l)&&(o=ym(e.s),s=ym(e.l),t=bne(e.h,o,s),i=!0,l="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=cM(n),{ok:i,format:e.format||l,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var Ene="[-\\+]?\\d+%?",xne="[-\\+]?\\d*\\.\\d+%?",Ol="(?:".concat(xne,")|(?:").concat(Ene,")"),ay="[\\s|\\(]+(".concat(Ol,")[,|\\s]+(").concat(Ol,")[,|\\s]+(").concat(Ol,")\\s*\\)?"),uy="[\\s|\\(]+(".concat(Ol,")[,|\\s]+(").concat(Ol,")[,|\\s]+(").concat(Ol,")[,|\\s]+(").concat(Ol,")\\s*\\)?"),Qr={CSS_UNIT:new RegExp(Ol),rgb:new RegExp("rgb"+ay),rgba:new RegExp("rgba"+uy),hsl:new RegExp("hsl"+ay),hsla:new RegExp("hsla"+uy),hsv:new RegExp("hsv"+ay),hsva:new RegExp("hsva"+uy),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function Tne(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(hb[e])e=hb[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=Qr.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=Qr.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Qr.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=Qr.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Qr.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=Qr.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Qr.hex8.exec(e),n?{r:or(n[1]),g:or(n[2]),b:or(n[3]),a:r8(n[4]),format:t?"name":"hex8"}:(n=Qr.hex6.exec(e),n?{r:or(n[1]),g:or(n[2]),b:or(n[3]),format:t?"name":"hex"}:(n=Qr.hex4.exec(e),n?{r:or(n[1]+n[1]),g:or(n[2]+n[2]),b:or(n[3]+n[3]),a:r8(n[4]+n[4]),format:t?"name":"hex8"}:(n=Qr.hex3.exec(e),n?{r:or(n[1]+n[1]),g:or(n[2]+n[2]),b:or(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function di(e){return!!Qr.CSS_UNIT.exec(String(e))}var Mne=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var o;if(t instanceof e)return t;typeof t=="number"&&(t=Sne(t)),this.originalInput=t;var r=$ne(t);this.originalInput=t,this.r=r.r,this.g=r.g,this.b=r.b,this.a=r.a,this.roundA=Math.round(100*this.a)/100,this.format=(o=n.format)!==null&&o!==void 0?o:r.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=r.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,o,r,s=t.r/255,i=t.g/255,l=t.b/255;return s<=.03928?n=s/12.92:n=Math.pow((s+.055)/1.055,2.4),i<=.03928?o=i/12.92:o=Math.pow((i+.055)/1.055,2.4),l<=.03928?r=l/12.92:r=Math.pow((l+.055)/1.055,2.4),.2126*n+.7152*o+.0722*r},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=cM(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var t=this.toHsl().s;return t===0},e.prototype.toHsv=function(){var t=n8(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=n8(this.r,this.g,this.b),n=Math.round(t.h*360),o=Math.round(t.s*100),r=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(o,"%, ").concat(r,"%)"):"hsva(".concat(n,", ").concat(o,"%, ").concat(r,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=t8(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=t8(this.r,this.g,this.b),n=Math.round(t.h*360),o=Math.round(t.s*100),r=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(o,"%, ").concat(r,"%)"):"hsla(".concat(n,", ").concat(o,"%, ").concat(r,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),o8(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),Cne(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toHexShortString=function(t){return t===void 0&&(t=!1),this.a===1?this.toHexString(t):this.toHex8String(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),o=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(o,")"):"rgba(".concat(t,", ").concat(n,", ").concat(o,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(lo(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(lo(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+o8(this.r,this.g,this.b,!1),n=0,o=Object.entries(hb);n<o.length;n++){var r=o[n],s=r[0],i=r[1];if(t===i)return s}return!1},e.prototype.toString=function(t){var n=!!t;t=t??this.format;var o=!1,r=this.a<1&&this.a>=0,s=!n&&r&&(t.startsWith("hex")||t==="name");return s?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(o=this.toRgbString()),t==="prgb"&&(o=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(o=this.toHexString()),t==="hex3"&&(o=this.toHexString(!0)),t==="hex4"&&(o=this.toHex8String(!0)),t==="hex8"&&(o=this.toHex8String()),t==="name"&&(o=this.toName()),t==="hsl"&&(o=this.toHslString()),t==="hsv"&&(o=this.toHsvString()),o||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=vm(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=vm(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=vm(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=vm(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),o=(n.h+t)%360;return n.h=o<0?360+o:o,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var o=this.toRgb(),r=new e(t).toRgb(),s=n/100,i={r:(r.r-o.r)*s+o.r,g:(r.g-o.g)*s+o.g,b:(r.b-o.b)*s+o.b,a:(r.a-o.a)*s+o.a};return new e(i)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var o=this.toHsl(),r=360/n,s=[this];for(o.h=(o.h-(r*t>>1)+720)%360;--t;)o.h=(o.h+r)%360,s.push(new e(o));return s},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),o=n.h,r=n.s,s=n.v,i=[],l=1/t;t--;)i.push(new e({h:o,s:r,v:s})),s=(s+l)%1;return i},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),o=new e(t).toRgb(),r=n.a+o.a*(1-n.a);return new e({r:(n.r*n.a+o.r*o.a*(1-n.a))/r,g:(n.g*n.a+o.g*o.a*(1-n.a))/r,b:(n.b*n.a+o.b*o.a*(1-n.a))/r,a:r})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),o=n.h,r=[this],s=360/t,i=1;i<t;i++)r.push(new e({h:(o+i*s)%360,s:n.s,l:n.l}));return r},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}();function Ji(e,t=20){return e.mix("#141414",t).toString()}function One(e){const t=Yr(),n=Re("button");return R(()=>{let o={};const r=e.color;if(r){const s=new Mne(r),i=e.dark?s.tint(20).toString():Ji(s,20);if(e.plain)o=n.cssVarBlock({"bg-color":e.dark?Ji(s,90):s.tint(90).toString(),"text-color":r,"border-color":e.dark?Ji(s,50):s.tint(50).toString(),"hover-text-color":`var(${n.cssVarName("color-white")})`,"hover-bg-color":r,"hover-border-color":r,"active-bg-color":i,"active-text-color":`var(${n.cssVarName("color-white")})`,"active-border-color":i}),t.value&&(o[n.cssVarBlockName("disabled-bg-color")]=e.dark?Ji(s,90):s.tint(90).toString(),o[n.cssVarBlockName("disabled-text-color")]=e.dark?Ji(s,50):s.tint(50).toString(),o[n.cssVarBlockName("disabled-border-color")]=e.dark?Ji(s,80):s.tint(80).toString());else{const l=e.dark?Ji(s,30):s.tint(30).toString(),a=s.isDark()?`var(${n.cssVarName("color-white")})`:`var(${n.cssVarName("color-black")})`;if(o=n.cssVarBlock({"bg-color":r,"text-color":a,"border-color":r,"hover-bg-color":l,"hover-text-color":a,"hover-border-color":l,"active-bg-color":i,"active-border-color":i}),t.value){const u=e.dark?Ji(s,50):s.tint(50).toString();o[n.cssVarBlockName("disabled-bg-color")]=u,o[n.cssVarBlockName("disabled-text-color")]=e.dark?"rgba(255, 255, 255, 0.5)":`var(${n.cssVarName("color-white")})`,o[n.cssVarBlockName("disabled-border-color")]=u}}}return o})}const Ine=Q({name:"ElButton"}),Ane=Q({...Ine,props:pb,emits:gne,setup(e,{expose:t,emit:n}){const o=e,r=One(o),s=Re("button"),{_ref:i,_size:l,_type:a,_disabled:u,_props:c,shouldAddSpace:d,handleClick:f}=pne(o,n),p=R(()=>[s.b(),s.m(a.value),s.m(l.value),s.is("disabled",u.value),s.is("loading",o.loading),s.is("plain",o.plain),s.is("round",o.round),s.is("circle",o.circle),s.is("text",o.text),s.is("link",o.link),s.is("has-bg",o.bg)]);return t({ref:i,size:l,type:a,disabled:u,shouldAddSpace:d}),(h,m)=>(C(),H(Pt(h.tag),un({ref_key:"_ref",ref:i},g(c),{class:g(p),style:g(r),onClick:g(f)}),{default:S(()=>[h.loading?(C(),T(de,{key:0},[h.$slots.loading?he(h.$slots,"loading",{key:0}):(C(),H(g(Ie),{key:1,class:D(g(s).is("loading"))},{default:S(()=>[(C(),H(Pt(h.loadingIcon)))]),_:1},8,["class"]))],64)):h.icon||h.$slots.icon?(C(),H(g(Ie),{key:1},{default:S(()=>[h.icon?(C(),H(Pt(h.icon),{key:0})):he(h.$slots,"icon",{key:1})]),_:3})):z("v-if",!0),h.$slots.default?(C(),T("span",{key:2,class:D({[g(s).em("text","expand")]:g(d)})},[he(h.$slots,"default")],2)):z("v-if",!0)]),_:3},16,["class","style","onClick"]))}});var Nne=He(Ane,[["__file","button.vue"]]);const Pne={size:pb.size,type:pb.type},Lne=Q({name:"ElButtonGroup"}),Rne=Q({...Lne,props:Pne,setup(e){const t=e;wt(uM,Bn({size:pn(t,"size"),type:pn(t,"type")}));const n=Re("button");return(o,r)=>(C(),T("div",{class:D(`${g(n).b("group")}`)},[he(o.$slots,"default")],2))}});var dM=He(Rne,[["__file","button-group.vue"]]);const ut=Zt(Nne,{ButtonGroup:dM});Jn(dM);var Nn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function _o(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var fM={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(Nn,function(){var n=1e3,o=6e4,r=36e5,s="millisecond",i="second",l="minute",a="hour",u="day",c="week",d="month",f="quarter",p="year",h="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,k={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(Z){var K=["th","st","nd","rd"],U=Z%100;return"["+Z+(K[(U-20)%10]||K[U]||K[0])+"]"}},b=function(Z,K,U){var B=String(Z);return!B||B.length>=K?Z:""+Array(K+1-B.length).join(U)+Z},$={s:b,z:function(Z){var K=-Z.utcOffset(),U=Math.abs(K),B=Math.floor(U/60),W=U%60;return(K<=0?"+":"-")+b(B,2,"0")+":"+b(W,2,"0")},m:function Z(K,U){if(K.date()<U.date())return-Z(U,K);var B=12*(U.year()-K.year())+(U.month()-K.month()),W=K.clone().add(B,d),L=U-W<0,A=K.clone().add(B+(L?-1:1),d);return+(-(B+(U-W)/(L?W-A:A-W))||0)},a:function(Z){return Z<0?Math.ceil(Z)||0:Math.floor(Z)},p:function(Z){return{M:d,y:p,w:c,d:u,D:h,h:a,m:l,s:i,ms:s,Q:f}[Z]||String(Z||"").toLowerCase().replace(/s$/,"")},u:function(Z){return Z===void 0}},x="en",E={};E[x]=k;var M="$isDayjsObject",N=function(Z){return Z instanceof F||!(!Z||!Z[M])},P=function Z(K,U,B){var W;if(!K)return x;if(typeof K=="string"){var L=K.toLowerCase();E[L]&&(W=L),U&&(E[L]=U,W=L);var A=K.split("-");if(!W&&A.length>1)return Z(A[0])}else{var X=K.name;E[X]=K,W=X}return!B&&W&&(x=W),W||!B&&x},I=function(Z,K){if(N(Z))return Z.clone();var U=typeof K=="object"?K:{};return U.date=Z,U.args=arguments,new F(U)},V=$;V.l=P,V.i=N,V.w=function(Z,K){return I(Z,{locale:K.$L,utc:K.$u,x:K.$x,$offset:K.$offset})};var F=function(){function Z(U){this.$L=P(U.locale,null,!0),this.parse(U),this.$x=this.$x||U.x||{},this[M]=!0}var K=Z.prototype;return K.parse=function(U){this.$d=function(B){var W=B.date,L=B.utc;if(W===null)return new Date(NaN);if(V.u(W))return new Date;if(W instanceof Date)return new Date(W);if(typeof W=="string"&&!/Z$/i.test(W)){var A=W.match(y);if(A){var X=A[2]-1||0,re=(A[7]||"0").substring(0,3);return L?new Date(Date.UTC(A[1],X,A[3]||1,A[4]||0,A[5]||0,A[6]||0,re)):new Date(A[1],X,A[3]||1,A[4]||0,A[5]||0,A[6]||0,re)}}return new Date(W)}(U),this.init()},K.init=function(){var U=this.$d;this.$y=U.getFullYear(),this.$M=U.getMonth(),this.$D=U.getDate(),this.$W=U.getDay(),this.$H=U.getHours(),this.$m=U.getMinutes(),this.$s=U.getSeconds(),this.$ms=U.getMilliseconds()},K.$utils=function(){return V},K.isValid=function(){return this.$d.toString()!==m},K.isSame=function(U,B){var W=I(U);return this.startOf(B)<=W&&W<=this.endOf(B)},K.isAfter=function(U,B){return I(U)<this.startOf(B)},K.isBefore=function(U,B){return this.endOf(B)<I(U)},K.$g=function(U,B,W){return V.u(U)?this[B]:this.set(W,U)},K.unix=function(){return Math.floor(this.valueOf()/1e3)},K.valueOf=function(){return this.$d.getTime()},K.startOf=function(U,B){var W=this,L=!!V.u(B)||B,A=V.p(U),X=function(ve,le){var Ae=V.w(W.$u?Date.UTC(W.$y,le,ve):new Date(W.$y,le,ve),W);return L?Ae:Ae.endOf(u)},re=function(ve,le){return V.w(W.toDate()[ve].apply(W.toDate("s"),(L?[0,0,0,0]:[23,59,59,999]).slice(le)),W)},j=this.$W,ge=this.$M,Oe=this.$D,xe="set"+(this.$u?"UTC":"");switch(A){case p:return L?X(1,0):X(31,11);case d:return L?X(1,ge):X(0,ge+1);case c:var te=this.$locale().weekStart||0,fe=(j<te?j+7:j)-te;return X(L?Oe-fe:Oe+(6-fe),ge);case u:case h:return re(xe+"Hours",0);case a:return re(xe+"Minutes",1);case l:return re(xe+"Seconds",2);case i:return re(xe+"Milliseconds",3);default:return this.clone()}},K.endOf=function(U){return this.startOf(U,!1)},K.$set=function(U,B){var W,L=V.p(U),A="set"+(this.$u?"UTC":""),X=(W={},W[u]=A+"Date",W[h]=A+"Date",W[d]=A+"Month",W[p]=A+"FullYear",W[a]=A+"Hours",W[l]=A+"Minutes",W[i]=A+"Seconds",W[s]=A+"Milliseconds",W)[L],re=L===u?this.$D+(B-this.$W):B;if(L===d||L===p){var j=this.clone().set(h,1);j.$d[X](re),j.init(),this.$d=j.set(h,Math.min(this.$D,j.daysInMonth())).$d}else X&&this.$d[X](re);return this.init(),this},K.set=function(U,B){return this.clone().$set(U,B)},K.get=function(U){return this[V.p(U)]()},K.add=function(U,B){var W,L=this;U=Number(U);var A=V.p(B),X=function(ge){var Oe=I(L);return V.w(Oe.date(Oe.date()+Math.round(ge*U)),L)};if(A===d)return this.set(d,this.$M+U);if(A===p)return this.set(p,this.$y+U);if(A===u)return X(1);if(A===c)return X(7);var re=(W={},W[l]=o,W[a]=r,W[i]=n,W)[A]||1,j=this.$d.getTime()+U*re;return V.w(j,this)},K.subtract=function(U,B){return this.add(-1*U,B)},K.format=function(U){var B=this,W=this.$locale();if(!this.isValid())return W.invalidDate||m;var L=U||"YYYY-MM-DDTHH:mm:ssZ",A=V.z(this),X=this.$H,re=this.$m,j=this.$M,ge=W.weekdays,Oe=W.months,xe=W.meridiem,te=function(le,Ae,Ge,G){return le&&(le[Ae]||le(B,L))||Ge[Ae].slice(0,G)},fe=function(le){return V.s(X%12||12,le,"0")},ve=xe||function(le,Ae,Ge){var G=le<12?"AM":"PM";return Ge?G.toLowerCase():G};return L.replace(v,function(le,Ae){return Ae||function(Ge){switch(Ge){case"YY":return String(B.$y).slice(-2);case"YYYY":return V.s(B.$y,4,"0");case"M":return j+1;case"MM":return V.s(j+1,2,"0");case"MMM":return te(W.monthsShort,j,Oe,3);case"MMMM":return te(Oe,j);case"D":return B.$D;case"DD":return V.s(B.$D,2,"0");case"d":return String(B.$W);case"dd":return te(W.weekdaysMin,B.$W,ge,2);case"ddd":return te(W.weekdaysShort,B.$W,ge,3);case"dddd":return ge[B.$W];case"H":return String(X);case"HH":return V.s(X,2,"0");case"h":return fe(1);case"hh":return fe(2);case"a":return ve(X,re,!0);case"A":return ve(X,re,!1);case"m":return String(re);case"mm":return V.s(re,2,"0");case"s":return String(B.$s);case"ss":return V.s(B.$s,2,"0");case"SSS":return V.s(B.$ms,3,"0");case"Z":return A}return null}(le)||A.replace(":","")})},K.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},K.diff=function(U,B,W){var L,A=this,X=V.p(B),re=I(U),j=(re.utcOffset()-this.utcOffset())*o,ge=this-re,Oe=function(){return V.m(A,re)};switch(X){case p:L=Oe()/12;break;case d:L=Oe();break;case f:L=Oe()/3;break;case c:L=(ge-j)/6048e5;break;case u:L=(ge-j)/864e5;break;case a:L=ge/r;break;case l:L=ge/o;break;case i:L=ge/n;break;default:L=ge}return W?L:V.a(L)},K.daysInMonth=function(){return this.endOf(d).$D},K.$locale=function(){return E[this.$L]},K.locale=function(U,B){if(!U)return this.$L;var W=this.clone(),L=P(U,B,!0);return L&&(W.$L=L),W},K.clone=function(){return V.w(this.$d,this)},K.toDate=function(){return new Date(this.valueOf())},K.toJSON=function(){return this.isValid()?this.toISOString():null},K.toISOString=function(){return this.$d.toISOString()},K.toString=function(){return this.$d.toUTCString()},Z}(),Y=F.prototype;return I.prototype=Y,[["$ms",s],["$s",i],["$m",l],["$H",a],["$W",u],["$M",d],["$y",p],["$D",h]].forEach(function(Z){Y[Z[1]]=function(K){return this.$g(K,Z[0],Z[1])}}),I.extend=function(Z,K){return Z.$i||(Z(K,F,I),Z.$i=!0),I},I.locale=P,I.isDayjs=N,I.unix=function(Z){return I(1e3*Z)},I.en=E[x],I.Ls=E,I.p={},I})})(fM);var Dne=fM.exports;const ct=_o(Dne);var pM={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(Nn,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},o=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d\d/,s=/\d\d?/,i=/\d*[^-_:/,()\s\d]+/,l={},a=function(m){return(m=+m)+(m>68?1900:2e3)},u=function(m){return function(y){this[m]=+y}},c=[/[+-]\d\d:?(\d\d)?|Z/,function(m){(this.zone||(this.zone={})).offset=function(y){if(!y||y==="Z")return 0;var v=y.match(/([+-]|\d\d)/g),k=60*v[1]+(+v[2]||0);return k===0?0:v[0]==="+"?-k:k}(m)}],d=function(m){var y=l[m];return y&&(y.indexOf?y:y.s.concat(y.f))},f=function(m,y){var v,k=l.meridiem;if(k){for(var b=1;b<=24;b+=1)if(m.indexOf(k(b,0,y))>-1){v=b>12;break}}else v=m===(y?"pm":"PM");return v},p={A:[i,function(m){this.afternoon=f(m,!1)}],a:[i,function(m){this.afternoon=f(m,!0)}],S:[/\d/,function(m){this.milliseconds=100*+m}],SS:[r,function(m){this.milliseconds=10*+m}],SSS:[/\d{3}/,function(m){this.milliseconds=+m}],s:[s,u("seconds")],ss:[s,u("seconds")],m:[s,u("minutes")],mm:[s,u("minutes")],H:[s,u("hours")],h:[s,u("hours")],HH:[s,u("hours")],hh:[s,u("hours")],D:[s,u("day")],DD:[r,u("day")],Do:[i,function(m){var y=l.ordinal,v=m.match(/\d+/);if(this.day=v[0],y)for(var k=1;k<=31;k+=1)y(k).replace(/\[|\]/g,"")===m&&(this.day=k)}],M:[s,u("month")],MM:[r,u("month")],MMM:[i,function(m){var y=d("months"),v=(d("monthsShort")||y.map(function(k){return k.slice(0,3)})).indexOf(m)+1;if(v<1)throw new Error;this.month=v%12||v}],MMMM:[i,function(m){var y=d("months").indexOf(m)+1;if(y<1)throw new Error;this.month=y%12||y}],Y:[/[+-]?\d+/,u("year")],YY:[r,function(m){this.year=a(m)}],YYYY:[/\d{4}/,u("year")],Z:c,ZZ:c};function h(m){var y,v;y=m,v=l&&l.formats;for(var k=(m=y.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(P,I,V){var F=V&&V.toUpperCase();return I||v[V]||n[V]||v[F].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(Y,Z,K){return Z||K.slice(1)})})).match(o),b=k.length,$=0;$<b;$+=1){var x=k[$],E=p[x],M=E&&E[0],N=E&&E[1];k[$]=N?{regex:M,parser:N}:x.replace(/^\[|\]$/g,"")}return function(P){for(var I={},V=0,F=0;V<b;V+=1){var Y=k[V];if(typeof Y=="string")F+=Y.length;else{var Z=Y.regex,K=Y.parser,U=P.slice(F),B=Z.exec(U)[0];K.call(I,B),P=P.replace(B,"")}}return function(W){var L=W.afternoon;if(L!==void 0){var A=W.hours;L?A<12&&(W.hours+=12):A===12&&(W.hours=0),delete W.afternoon}}(I),I}}return function(m,y,v){v.p.customParseFormat=!0,m&&m.parseTwoDigitYear&&(a=m.parseTwoDigitYear);var k=y.prototype,b=k.parse;k.parse=function($){var x=$.date,E=$.utc,M=$.args;this.$u=E;var N=M[1];if(typeof N=="string"){var P=M[2]===!0,I=M[3]===!0,V=P||I,F=M[2];I&&(F=M[2]),l=this.$locale(),!P&&F&&(l=v.Ls[F]),this.$d=function(U,B,W){try{if(["x","X"].indexOf(B)>-1)return new Date((B==="X"?1e3:1)*U);var L=h(B)(U),A=L.year,X=L.month,re=L.day,j=L.hours,ge=L.minutes,Oe=L.seconds,xe=L.milliseconds,te=L.zone,fe=new Date,ve=re||(A||X?1:fe.getDate()),le=A||fe.getFullYear(),Ae=0;A&&!X||(Ae=X>0?X-1:fe.getMonth());var Ge=j||0,G=ge||0,J=Oe||0,ue=xe||0;return te?new Date(Date.UTC(le,Ae,ve,Ge,G,J,ue+60*te.offset*1e3)):W?new Date(Date.UTC(le,Ae,ve,Ge,G,J,ue)):new Date(le,Ae,ve,Ge,G,J,ue)}catch{return new Date("")}}(x,N,E),this.init(),F&&F!==!0&&(this.$L=this.locale(F).$L),V&&x!=this.format(N)&&(this.$d=new Date("")),l={}}else if(N instanceof Array)for(var Y=N.length,Z=1;Z<=Y;Z+=1){M[1]=N[Z-1];var K=v.apply(this,M);if(K.isValid()){this.$d=K.$d,this.$L=K.$L,this.init();break}Z===Y&&(this.$d=new Date(""))}else b.call(this,$)}}})})(pM);var Vne=pM.exports;const hM=_o(Vne),s8=["hours","minutes","seconds"],i8="HH:mm:ss",qu="YYYY-MM-DD",Fne={date:qu,dates:qu,week:"gggg[w]ww",year:"YYYY",years:"YYYY",month:"YYYY-MM",datetime:`${qu} ${i8}`,monthrange:"YYYY-MM",daterange:qu,datetimerange:`${qu} ${i8}`},cy=(e,t)=>[e>0?e-1:void 0,e,e<t?e+1:void 0],mM=e=>Array.from(Array.from({length:e}).keys()),gM=e=>e.replace(/\W?m{1,2}|\W?ZZ/g,"").replace(/\W?h{1,2}|\W?s{1,3}|\W?a/gi,"").trim(),vM=e=>e.replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?Y{2,4}/g,"").trim(),l8=function(e,t){const n=ig(e),o=ig(t);return n&&o?e.getTime()===t.getTime():!n&&!o?e===t:!1},a8=function(e,t){const n=Te(e),o=Te(t);return n&&o?e.length!==t.length?!1:e.every((r,s)=>l8(r,t[s])):!n&&!o?l8(e,t):!1},u8=function(e,t,n){const o=Qx(t)||t==="x"?ct(e).locale(n):ct(e,t).locale(n);return o.isValid()?o:void 0},c8=function(e,t,n){return Qx(t)?e:t==="x"?+e:ct(e).locale(n).format(t)},dy=(e,t)=>{var n;const o=[],r=t==null?void 0:t();for(let s=0;s<e;s++)o.push((n=r==null?void 0:r.includes(s))!=null?n:!1);return o},yM=Ke({disabledHours:{type:Ce(Function)},disabledMinutes:{type:Ce(Function)},disabledSeconds:{type:Ce(Function)}}),Bne=Ke({visible:Boolean,actualVisible:{type:Boolean,default:void 0},format:{type:String,default:""}}),_M=Ke({id:{type:Ce([Array,String])},name:{type:Ce([Array,String]),default:""},popperClass:{type:String,default:""},format:String,valueFormat:String,dateFormat:String,timeFormat:String,type:{type:String,default:""},clearable:{type:Boolean,default:!0},clearIcon:{type:Ce([String,Object]),default:wd},editable:{type:Boolean,default:!0},prefixIcon:{type:Ce([String,Object]),default:""},size:Gr,readonly:Boolean,disabled:Boolean,placeholder:{type:String,default:""},popperOptions:{type:Ce(Object),default:()=>({})},modelValue:{type:Ce([Date,Array,String,Number]),default:""},rangeSeparator:{type:String,default:"-"},startPlaceholder:String,endPlaceholder:String,defaultValue:{type:Ce([Date,Array])},defaultTime:{type:Ce([Date,Array])},isRange:Boolean,...yM,disabledDate:{type:Function},cellClassName:{type:Function},shortcuts:{type:Array,default:()=>[]},arrowControl:Boolean,label:{type:String,default:void 0},tabindex:{type:Ce([String,Number]),default:0},validateEvent:{type:Boolean,default:!0},unlinkPanels:Boolean,...Nw}),zne=["id","name","placeholder","value","disabled","readonly"],jne=["id","name","placeholder","value","disabled","readonly"],Hne=Q({name:"Picker"}),Une=Q({...Hne,props:_M,emits:["update:modelValue","change","focus","blur","calendar-change","panel-change","visible-change","keydown"],setup(e,{expose:t,emit:n}){const o=e,r=_d(),{lang:s}=Kt(),i=Re("date"),l=Re("input"),a=Re("range"),{form:u,formItem:c}=si(),d=je("ElPopperOptions",{}),{valueOnClear:f}=YT(o,null),p=q(),h=q(),m=q(!1),y=q(!1),v=q(null);let k=!1,b=!1;const $=R(()=>[i.b("editor"),i.bm("editor",o.type),l.e("wrapper"),i.is("disabled",j.value),i.is("active",m.value),a.b("editor"),Le?a.bm("editor",Le.value):"",r.class]),x=R(()=>[l.e("icon"),a.e("close-icon"),Ae.value?"":a.e("close-icon--hidden")]);Me(m,se=>{se?ot(()=>{se&&(v.value=o.modelValue)}):(me.value=null,ot(()=>{E(o.modelValue)}))});const E=(se,De)=>{(De||!a8(se,v.value))&&(n("change",se),o.validateEvent&&(c==null||c.validate("change").catch(At=>void 0)))},M=se=>{if(!a8(o.modelValue,se)){let De;Te(se)?De=se.map(At=>c8(At,o.valueFormat,s.value)):se&&(De=c8(se,o.valueFormat,s.value)),n("update:modelValue",se&&De,s.value)}},N=se=>{n("keydown",se)},P=R(()=>{if(h.value){const se=Ne.value?h.value:h.value.$el;return Array.from(se.querySelectorAll("input"))}return[]}),I=(se,De,At)=>{const mn=P.value;mn.length&&(!At||At==="min"?(mn[0].setSelectionRange(se,De),mn[0].focus()):At==="max"&&(mn[1].setSelectionRange(se,De),mn[1].focus()))},V=()=>{L(!0,!0),ot(()=>{b=!1})},F=(se="",De=!1)=>{De||(b=!0),m.value=De;let At;Te(se)?At=se.map(mn=>mn.toDate()):At=se&&se.toDate(),me.value=null,M(At)},Y=()=>{y.value=!0},Z=()=>{n("visible-change",!0)},K=se=>{(se==null?void 0:se.key)===rt.esc&&L(!0,!0)},U=()=>{y.value=!1,m.value=!1,b=!1,n("visible-change",!1)},B=()=>{m.value=!0},W=()=>{m.value=!1},L=(se=!0,De=!1)=>{b=De;const[At,mn]=g(P);let qn=At;!se&&Ne.value&&(qn=mn),qn&&qn.focus()},A=se=>{o.readonly||j.value||m.value||b||(m.value=!0,n("focus",se))};let X;const re=se=>{const De=async()=>{setTimeout(()=>{var At;X===De&&(!((At=p.value)!=null&&At.isFocusInsideContent()&&!k)&&P.value.filter(mn=>mn.contains(document.activeElement)).length===0&&(Ue(),m.value=!1,n("blur",se),o.validateEvent&&(c==null||c.validate("blur").catch(mn=>void 0))),k=!1)},0)};X=De,De()},j=R(()=>o.disabled||(u==null?void 0:u.disabled)),ge=R(()=>{let se;if(G.value?ae.value.getDefaultValue&&(se=ae.value.getDefaultValue()):Te(o.modelValue)?se=o.modelValue.map(De=>u8(De,o.valueFormat,s.value)):se=u8(o.modelValue,o.valueFormat,s.value),ae.value.getRangeAvailableTime){const De=ae.value.getRangeAvailableTime(se);Hl(De,se)||(se=De,M(Te(se)?se.map(At=>At.toDate()):se.toDate()))}return Te(se)&&se.some(De=>!De)&&(se=[]),se}),Oe=R(()=>{if(!ae.value.panelReady)return"";const se=ce(ge.value);return Te(me.value)?[me.value[0]||se&&se[0]||"",me.value[1]||se&&se[1]||""]:me.value!==null?me.value:!te.value&&G.value||!m.value&&G.value?"":se?fe.value||ve.value?se.join(", "):se:""}),xe=R(()=>o.type.includes("time")),te=R(()=>o.type.startsWith("time")),fe=R(()=>o.type==="dates"),ve=R(()=>o.type==="years"),le=R(()=>o.prefixIcon||(xe.value?oT:VY)),Ae=q(!1),Ge=se=>{o.readonly||j.value||Ae.value&&(se.stopPropagation(),V(),M(f.value),E(f.value,!0),Ae.value=!1,m.value=!1,ae.value.handleClear&&ae.value.handleClear())},G=R(()=>{const{modelValue:se}=o;return!se||Te(se)&&!se.filter(Boolean).length}),J=async se=>{var De;o.readonly||j.value||(((De=se.target)==null?void 0:De.tagName)!=="INPUT"||P.value.includes(document.activeElement))&&(m.value=!0)},ue=()=>{o.readonly||j.value||!G.value&&o.clearable&&(Ae.value=!0)},_e=()=>{Ae.value=!1},ye=se=>{var De;o.readonly||j.value||(((De=se.touches[0].target)==null?void 0:De.tagName)!=="INPUT"||P.value.includes(document.activeElement))&&(m.value=!0)},Ne=R(()=>o.type.includes("range")),Le=Jo(),Ee=R(()=>{var se,De;return(De=(se=g(p))==null?void 0:se.popperRef)==null?void 0:De.contentRef}),Pe=R(()=>{var se;return g(Ne)?g(h):(se=g(h))==null?void 0:se.$el});yx(Pe,se=>{const De=g(Ee),At=g(Pe);De&&(se.target===De||se.composedPath().includes(De))||se.target===At||se.composedPath().includes(At)||(m.value=!1)});const me=q(null),Ue=()=>{if(me.value){const se=Xe(Oe.value);se&&oe(se)&&(M(Te(se)?se.map(De=>De.toDate()):se.toDate()),me.value=null)}me.value===""&&(M(f.value),E(f.value),me.value=null)},Xe=se=>se?ae.value.parseUserInput(se):null,ce=se=>se?ae.value.formatToString(se):null,oe=se=>ae.value.isValidValue(se),pe=async se=>{if(o.readonly||j.value)return;const{code:De}=se;if(N(se),De===rt.esc){m.value===!0&&(m.value=!1,se.preventDefault(),se.stopPropagation());return}if(De===rt.down&&(ae.value.handleFocusPicker&&(se.preventDefault(),se.stopPropagation()),m.value===!1&&(m.value=!0,await ot()),ae.value.handleFocusPicker)){ae.value.handleFocusPicker();return}if(De===rt.tab){k=!0;return}if(De===rt.enter||De===rt.numpadEnter){(me.value===null||me.value===""||oe(Xe(Oe.value)))&&(Ue(),m.value=!1),se.stopPropagation();return}if(me.value){se.stopPropagation();return}ae.value.handleKeydownInput&&ae.value.handleKeydownInput(se)},ze=se=>{me.value=se,m.value||(m.value=!0)},Qe=se=>{const De=se.target;me.value?me.value=[De.value,me.value[1]]:me.value=[De.value,null]},$e=se=>{const De=se.target;me.value?me.value=[me.value[0],De.value]:me.value=[null,De.value]},ie=()=>{var se;const De=me.value,At=Xe(De&&De[0]),mn=g(ge);if(At&&At.isValid()){me.value=[ce(At),((se=Oe.value)==null?void 0:se[1])||null];const qn=[At,mn&&(mn[1]||null)];oe(qn)&&(M(qn),me.value=null)}},we=()=>{var se;const De=g(me),At=Xe(De&&De[1]),mn=g(ge);if(At&&At.isValid()){me.value=[((se=g(Oe))==null?void 0:se[0])||null,ce(At)];const qn=[mn&&mn[0],At];oe(qn)&&(M(qn),me.value=null)}},ae=q({}),Se=se=>{ae.value[se[0]]=se[1],ae.value.panelReady=!0},Ve=se=>{n("calendar-change",se)},st=(se,De,At)=>{n("panel-change",se,De,At)};return wt("EP_PICKER_BASE",{props:o}),t({focus:L,handleFocusInput:A,handleBlurInput:re,handleOpen:B,handleClose:W,onPick:F}),(se,De)=>(C(),H(g(ea),un({ref_key:"refPopper",ref:p,visible:m.value,effect:"light",pure:"",trigger:"click"},se.$attrs,{role:"dialog",teleported:"",transition:`${g(i).namespace.value}-zoom-in-top`,"popper-class":[`${g(i).namespace.value}-picker__popper`,se.popperClass],"popper-options":g(d),"fallback-placements":["bottom","top","right","left"],"gpu-acceleration":!1,"stop-popper-mouse-event":!1,"hide-after":0,persistent:"",onBeforeShow:Y,onShow:Z,onHide:U}),{default:S(()=>[g(Ne)?(C(),T("div",{key:1,ref_key:"inputRef",ref:h,class:D(g($)),style:Ye(se.$attrs.style),onClick:A,onMouseenter:ue,onMouseleave:_e,onTouchstart:ye,onKeydown:pe},[g(le)?(C(),H(g(Ie),{key:0,class:D([g(l).e("icon"),g(a).e("icon")]),onMousedown:Ze(J,["prevent"]),onTouchstart:ye},{default:S(()=>[(C(),H(Pt(g(le))))]),_:1},8,["class","onMousedown"])):z("v-if",!0),_("input",{id:se.id&&se.id[0],autocomplete:"off",name:se.name&&se.name[0],placeholder:se.startPlaceholder,value:g(Oe)&&g(Oe)[0],disabled:g(j),readonly:!se.editable||se.readonly,class:D(g(a).b("input")),onMousedown:J,onInput:Qe,onChange:ie,onFocus:A,onBlur:re},null,42,zne),he(se.$slots,"range-separator",{},()=>[_("span",{class:D(g(a).b("separator"))},O(se.rangeSeparator),3)]),_("input",{id:se.id&&se.id[1],autocomplete:"off",name:se.name&&se.name[1],placeholder:se.endPlaceholder,value:g(Oe)&&g(Oe)[1],disabled:g(j),readonly:!se.editable||se.readonly,class:D(g(a).b("input")),onMousedown:J,onFocus:A,onBlur:re,onInput:$e,onChange:we},null,42,jne),se.clearIcon?(C(),H(g(Ie),{key:1,class:D(g(x)),onClick:Ge},{default:S(()=>[(C(),H(Pt(se.clearIcon)))]),_:1},8,["class"])):z("v-if",!0)],38)):(C(),H(g($t),{key:0,id:se.id,ref_key:"inputRef",ref:h,"container-role":"combobox","model-value":g(Oe),name:se.name,size:g(Le),disabled:g(j),placeholder:se.placeholder,class:D([g(i).b("editor"),g(i).bm("editor",se.type),se.$attrs.class]),style:Ye(se.$attrs.style),readonly:!se.editable||se.readonly||g(fe)||g(ve)||se.type==="week",label:se.label,tabindex:se.tabindex,"validate-event":!1,onInput:ze,onFocus:A,onBlur:re,onKeydown:pe,onChange:Ue,onMousedown:J,onMouseenter:ue,onMouseleave:_e,onTouchstart:ye,onClick:De[0]||(De[0]=Ze(()=>{},["stop"]))},{prefix:S(()=>[g(le)?(C(),H(g(Ie),{key:0,class:D(g(l).e("icon")),onMousedown:Ze(J,["prevent"]),onTouchstart:ye},{default:S(()=>[(C(),H(Pt(g(le))))]),_:1},8,["class","onMousedown"])):z("v-if",!0)]),suffix:S(()=>[Ae.value&&se.clearIcon?(C(),H(g(Ie),{key:0,class:D(`${g(l).e("icon")} clear-icon`),onClick:Ze(Ge,["stop"])},{default:S(()=>[(C(),H(Pt(se.clearIcon)))]),_:1},8,["class","onClick"])):z("v-if",!0)]),_:1},8,["id","model-value","name","size","disabled","placeholder","class","style","readonly","label","tabindex","onKeydown"]))]),content:S(()=>[he(se.$slots,"default",{visible:m.value,actualVisible:y.value,parsedValue:g(ge),format:se.format,dateFormat:se.dateFormat,timeFormat:se.timeFormat,unlinkPanels:se.unlinkPanels,type:se.type,defaultValue:se.defaultValue,onPick:F,onSelectRange:I,onSetPickerOption:Se,onCalendarChange:Ve,onPanelChange:st,onKeydown:K,onMousedown:De[1]||(De[1]=Ze(()=>{},["stop"]))})]),_:3},16,["visible","transition","popper-class","popper-options"]))}});var Wne=He(Une,[["__file","picker.vue"]]);const Kne=Ke({...Bne,datetimeRole:String,parsedValue:{type:Ce(Object)}}),qne=({getAvailableHours:e,getAvailableMinutes:t,getAvailableSeconds:n})=>{const o=(i,l,a,u)=>{const c={hour:e,minute:t,second:n};let d=i;return["hour","minute","second"].forEach(f=>{if(c[f]){let p;const h=c[f];switch(f){case"minute":{p=h(d.hour(),l,u);break}case"second":{p=h(d.hour(),d.minute(),l,u);break}default:{p=h(l,u);break}}if(p!=null&&p.length&&!p.includes(d[f]())){const m=a?0:p.length-1;d=d[f](p[m])}}}),d},r={};return{timePickerOptions:r,getAvailableTime:o,onSetOption:([i,l])=>{r[i]=l}}},fy=e=>{const t=(o,r)=>o||r,n=o=>o!==!0;return e.map(t).filter(n)},bM=(e,t,n)=>({getHoursList:(i,l)=>dy(24,e&&(()=>e==null?void 0:e(i,l))),getMinutesList:(i,l,a)=>dy(60,t&&(()=>t==null?void 0:t(i,l,a))),getSecondsList:(i,l,a,u)=>dy(60,n&&(()=>n==null?void 0:n(i,l,a,u)))}),Gne=(e,t,n)=>{const{getHoursList:o,getMinutesList:r,getSecondsList:s}=bM(e,t,n);return{getAvailableHours:(u,c)=>fy(o(u,c)),getAvailableMinutes:(u,c,d)=>fy(r(u,c,d)),getAvailableSeconds:(u,c,d,f)=>fy(s(u,c,d,f))}},Yne=e=>{const t=q(e.parsedValue);return Me(()=>e.visible,n=>{n||(t.value=e.parsedValue)}),t},nl=new Map;let d8;Tt&&(document.addEventListener("mousedown",e=>d8=e),document.addEventListener("mouseup",e=>{for(const t of nl.values())for(const{documentHandler:n}of t)n(e,d8)}));function f8(e,t){let n=[];return Array.isArray(t.arg)?n=t.arg:ys(t.arg)&&n.push(t.arg),function(o,r){const s=t.instance.popperRef,i=o.target,l=r==null?void 0:r.target,a=!t||!t.instance,u=!i||!l,c=e.contains(i)||e.contains(l),d=e===i,f=n.length&&n.some(h=>h==null?void 0:h.contains(i))||n.length&&n.includes(l),p=s&&(s.contains(i)||s.contains(l));a||u||c||d||f||p||t.value(o,r)}}const id={beforeMount(e,t){nl.has(e)||nl.set(e,[]),nl.get(e).push({documentHandler:f8(e,t),bindingFn:t.value})},updated(e,t){nl.has(e)||nl.set(e,[]);const n=nl.get(e),o=n.findIndex(s=>s.bindingFn===t.oldValue),r={documentHandler:f8(e,t),bindingFn:t.value};o>=0?n.splice(o,1,r):n.push(r)},unmounted(e){nl.delete(e)}},Zne=100,Jne=600,Fg={beforeMount(e,t){const n=t.value,{interval:o=Zne,delay:r=Jne}=et(n)?{}:n;let s,i;const l=()=>et(n)?n():n.handler(),a=()=>{i&&(clearTimeout(i),i=void 0),s&&(clearInterval(s),s=void 0)};e.addEventListener("mousedown",u=>{u.button===0&&(a(),l(),document.addEventListener("mouseup",()=>a(),{once:!0}),i=setTimeout(()=>{s=setInterval(()=>{l()},o)},r))})}},mb="_trap-focus-children",Ra=[],p8=e=>{if(Ra.length===0)return;const t=Ra[Ra.length-1][mb];if(t.length>0&&e.code===rt.tab){if(t.length===1){e.preventDefault(),document.activeElement!==t[0]&&t[0].focus();return}const n=e.shiftKey,o=e.target===t[0],r=e.target===t[t.length-1];o&&n&&(e.preventDefault(),t[t.length-1].focus()),r&&!n&&(e.preventDefault(),t[0].focus())}},Xne={beforeMount(e){e[mb]=E6(e),Ra.push(e),Ra.length<=1&&document.addEventListener("keydown",p8)},updated(e){ot(()=>{e[mb]=E6(e)})},unmounted(){Ra.shift(),Ra.length===0&&document.removeEventListener("keydown",p8)}};var h8=!1,Ma,gb,vb,t1,n1,wM,o1,yb,_b,bb,CM,wb,Cb,kM,SM;function Ro(){if(!h8){h8=!0;var e=navigator.userAgent,t=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),n=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(wb=/\b(iPhone|iP[ao]d)/.exec(e),Cb=/\b(iP[ao]d)/.exec(e),bb=/Android/i.exec(e),kM=/FBAN\/\w+;/i.exec(e),SM=/Mobile/i.exec(e),CM=!!/Win64/.exec(e),t){Ma=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN,Ma&&document&&document.documentMode&&(Ma=document.documentMode);var o=/(?:Trident\/(\d+.\d+))/.exec(e);wM=o?parseFloat(o[1])+4:Ma,gb=t[2]?parseFloat(t[2]):NaN,vb=t[3]?parseFloat(t[3]):NaN,t1=t[4]?parseFloat(t[4]):NaN,t1?(t=/(?:Chrome\/(\d+\.\d+))/.exec(e),n1=t&&t[1]?parseFloat(t[1]):NaN):n1=NaN}else Ma=gb=vb=n1=t1=NaN;if(n){if(n[1]){var r=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);o1=r?parseFloat(r[1].replace("_",".")):!0}else o1=!1;yb=!!n[2],_b=!!n[3]}else o1=yb=_b=!1}}var kb={ie:function(){return Ro()||Ma},ieCompatibilityMode:function(){return Ro()||wM>Ma},ie64:function(){return kb.ie()&&CM},firefox:function(){return Ro()||gb},opera:function(){return Ro()||vb},webkit:function(){return Ro()||t1},safari:function(){return kb.webkit()},chrome:function(){return Ro()||n1},windows:function(){return Ro()||yb},osx:function(){return Ro()||o1},linux:function(){return Ro()||_b},iphone:function(){return Ro()||wb},mobile:function(){return Ro()||wb||Cb||bb||SM},nativeApp:function(){return Ro()||kM},android:function(){return Ro()||bb},ipad:function(){return Ro()||Cb}},Qne=kb,_m=!!(typeof window<"u"&&window.document&&window.document.createElement),eoe={canUseDOM:_m,canUseWorkers:typeof Worker<"u",canUseEventListeners:_m&&!!(window.addEventListener||window.attachEvent),canUseViewport:_m&&!!window.screen,isInWorker:!_m},$M=eoe,EM;$M.canUseDOM&&(EM=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);function toe(e,t){if(!$M.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,o=n in document;if(!o){var r=document.createElement("div");r.setAttribute(n,"return;"),o=typeof r[n]=="function"}return!o&&EM&&e==="wheel"&&(o=document.implementation.hasFeature("Events.wheel","3.0")),o}var noe=toe,m8=10,g8=40,v8=800;function xM(e){var t=0,n=0,o=0,r=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),o=t*m8,r=n*m8,"deltaY"in e&&(r=e.deltaY),"deltaX"in e&&(o=e.deltaX),(o||r)&&e.deltaMode&&(e.deltaMode==1?(o*=g8,r*=g8):(o*=v8,r*=v8)),o&&!t&&(t=o<1?-1:1),r&&!n&&(n=r<1?-1:1),{spinX:t,spinY:n,pixelX:o,pixelY:r}}xM.getEventType=function(){return Qne.firefox()?"DOMMouseScroll":noe("wheel")?"wheel":"mousewheel"};var ooe=xM;/** |
| 59 |
* Checks if an event is supported in the current execution environment. |
| 60 |
* |
| 61 |
* NOTE: This will not work correctly for non-generic events such as `change`, |
| 62 |
* `reset`, `load`, `error`, and `select`. |
| 63 |
* |
| 64 |
* Borrows from Modernizr. |
| 65 |
* |
| 66 |
* @param {string} eventNameSuffix Event name, e.g. "click". |
| 67 |
* @param {?boolean} capture Check if the capture phase is supported. |
| 68 |
* @return {boolean} True if the event is supported. |
| 69 |
* @internal |
| 70 |
* @license Modernizr 3.0.0pre (Custom Build) | MIT |
| 71 |
*/const roe=function(e,t){if(e&&e.addEventListener){const n=function(o){const r=ooe(o);t&&Reflect.apply(t,this,[o,r])};e.addEventListener("wheel",n,{passive:!0})}},soe={beforeMount(e,t){roe(e,t.value)}},ioe=Ke({role:{type:String,required:!0},spinnerDate:{type:Ce(Object),required:!0},showSeconds:{type:Boolean,default:!0},arrowControl:Boolean,amPmMode:{type:Ce(String),default:""},...yM}),loe=["onClick"],aoe=["onMouseenter"],uoe=Q({__name:"basic-time-spinner",props:ioe,emits:["change","select-range","set-option"],setup(e,{emit:t}){const n=e,o=Re("time"),{getHoursList:r,getMinutesList:s,getSecondsList:i}=bM(n.disabledHours,n.disabledMinutes,n.disabledSeconds);let l=!1;const a=q(),u=q(),c=q(),d=q(),f={hours:u,minutes:c,seconds:d},p=R(()=>n.showSeconds?s8:s8.slice(0,2)),h=R(()=>{const{spinnerDate:L}=n,A=L.hour(),X=L.minute(),re=L.second();return{hours:A,minutes:X,seconds:re}}),m=R(()=>{const{hours:L,minutes:A}=g(h);return{hours:r(n.role),minutes:s(L,n.role),seconds:i(L,A,n.role)}}),y=R(()=>{const{hours:L,minutes:A,seconds:X}=g(h);return{hours:cy(L,23),minutes:cy(A,59),seconds:cy(X,59)}}),v=jl(L=>{l=!1,$(L)},200),k=L=>{if(!!!n.amPmMode)return"";const X=n.amPmMode==="A";let re=L<12?" am":" pm";return X&&(re=re.toUpperCase()),re},b=L=>{let A;switch(L){case"hours":A=[0,2];break;case"minutes":A=[3,5];break;case"seconds":A=[6,8];break}const[X,re]=A;t("select-range",X,re),a.value=L},$=L=>{M(L,g(h)[L])},x=()=>{$("hours"),$("minutes"),$("seconds")},E=L=>L.querySelector(`.${o.namespace.value}-scrollbar__wrap`),M=(L,A)=>{if(n.arrowControl)return;const X=g(f[L]);X&&X.$el&&(E(X.$el).scrollTop=Math.max(0,A*N(L)))},N=L=>{const A=g(f[L]),X=A==null?void 0:A.$el.querySelector("li");return X&&Number.parseFloat(Sl(X,"height"))||0},P=()=>{V(1)},I=()=>{V(-1)},V=L=>{a.value||b("hours");const A=a.value,X=g(h)[A],re=a.value==="hours"?24:60,j=F(A,X,L,re);Y(A,j),M(A,j),ot(()=>b(A))},F=(L,A,X,re)=>{let j=(A+X+re)%re;const ge=g(m)[L];for(;ge[j]&&j!==A;)j=(j+X+re)%re;return j},Y=(L,A)=>{if(g(m)[L][A])return;const{hours:j,minutes:ge,seconds:Oe}=g(h);let xe;switch(L){case"hours":xe=n.spinnerDate.hour(A).minute(ge).second(Oe);break;case"minutes":xe=n.spinnerDate.hour(j).minute(A).second(Oe);break;case"seconds":xe=n.spinnerDate.hour(j).minute(ge).second(A);break}t("change",xe)},Z=(L,{value:A,disabled:X})=>{X||(Y(L,A),b(L),M(L,A))},K=L=>{l=!0,v(L);const A=Math.min(Math.round((E(g(f[L]).$el).scrollTop-(U(L)*.5-10)/N(L)+3)/N(L)),L==="hours"?23:59);Y(L,A)},U=L=>g(f[L]).$el.offsetHeight,B=()=>{const L=A=>{const X=g(f[A]);X&&X.$el&&(E(X.$el).onscroll=()=>{K(A)})};L("hours"),L("minutes"),L("seconds")};Ct(()=>{ot(()=>{!n.arrowControl&&B(),x(),n.role==="start"&&b("hours")})});const W=(L,A)=>{f[A].value=L};return t("set-option",[`${n.role}_scrollDown`,V]),t("set-option",[`${n.role}_emitSelectRange`,b]),Me(()=>n.spinnerDate,()=>{l||x()}),(L,A)=>(C(),T("div",{class:D([g(o).b("spinner"),{"has-seconds":L.showSeconds}])},[L.arrowControl?z("v-if",!0):(C(!0),T(de,{key:0},nt(g(p),X=>(C(),H(g(Ss),{key:X,ref_for:!0,ref:re=>W(re,X),class:D(g(o).be("spinner","wrapper")),"wrap-style":"max-height: inherit;","view-class":g(o).be("spinner","list"),noresize:"",tag:"ul",onMouseenter:re=>b(X),onMousemove:re=>$(X)},{default:S(()=>[(C(!0),T(de,null,nt(g(m)[X],(re,j)=>(C(),T("li",{key:j,class:D([g(o).be("spinner","item"),g(o).is("active",j===g(h)[X]),g(o).is("disabled",re)]),onClick:ge=>Z(X,{value:j,disabled:re})},[X==="hours"?(C(),T(de,{key:0},[ne(O(("0"+(L.amPmMode?j%12||12:j)).slice(-2))+O(k(j)),1)],64)):(C(),T(de,{key:1},[ne(O(("0"+j).slice(-2)),1)],64))],10,loe))),128))]),_:2},1032,["class","view-class","onMouseenter","onMousemove"]))),128)),L.arrowControl?(C(!0),T(de,{key:1},nt(g(p),X=>(C(),T("div",{key:X,class:D([g(o).be("spinner","wrapper"),g(o).is("arrow")]),onMouseenter:re=>b(X)},[Fe((C(),H(g(Ie),{class:D(["arrow-up",g(o).be("spinner","arrow")])},{default:S(()=>[w(g(D0))]),_:1},8,["class"])),[[g(Fg),I]]),Fe((C(),H(g(Ie),{class:D(["arrow-down",g(o).be("spinner","arrow")])},{default:S(()=>[w(g(Eu))]),_:1},8,["class"])),[[g(Fg),P]]),_("ul",{class:D(g(o).be("spinner","list"))},[(C(!0),T(de,null,nt(g(y)[X],(re,j)=>(C(),T("li",{key:j,class:D([g(o).be("spinner","item"),g(o).is("active",re===g(h)[X]),g(o).is("disabled",g(m)[X][re])])},[typeof re=="number"?(C(),T(de,{key:0},[X==="hours"?(C(),T(de,{key:0},[ne(O(("0"+(L.amPmMode?re%12||12:re)).slice(-2))+O(k(re)),1)],64)):(C(),T(de,{key:1},[ne(O(("0"+re).slice(-2)),1)],64))],64)):z("v-if",!0)],2))),128))],2)],42,aoe))),128)):z("v-if",!0)],2))}});var coe=He(uoe,[["__file","basic-time-spinner.vue"]]);const doe=Q({__name:"panel-time-pick",props:Kne,emits:["pick","select-range","set-picker-option"],setup(e,{emit:t}){const n=e,o=je("EP_PICKER_BASE"),{arrowControl:r,disabledHours:s,disabledMinutes:i,disabledSeconds:l,defaultValue:a}=o.props,{getAvailableHours:u,getAvailableMinutes:c,getAvailableSeconds:d}=Gne(s,i,l),f=Re("time"),{t:p,lang:h}=Kt(),m=q([0,2]),y=Yne(n),v=R(()=>Uo(n.actualVisible)?`${f.namespace.value}-zoom-in-top`:""),k=R(()=>n.format.includes("ss")),b=R(()=>n.format.includes("A")?"A":n.format.includes("a")?"a":""),$=W=>{const L=ct(W).locale(h.value),A=Z(L);return L.isSame(A)},x=()=>{t("pick",y.value,!1)},E=(W=!1,L=!1)=>{L||t("pick",n.parsedValue,W)},M=W=>{if(!n.visible)return;const L=Z(W).millisecond(0);t("pick",L,!0)},N=(W,L)=>{t("select-range",W,L),m.value=[W,L]},P=W=>{const L=[0,3].concat(k.value?[6]:[]),A=["hours","minutes"].concat(k.value?["seconds"]:[]),re=(L.indexOf(m.value[0])+W+L.length)%L.length;V.start_emitSelectRange(A[re])},I=W=>{const L=W.code,{left:A,right:X,up:re,down:j}=rt;if([A,X].includes(L)){P(L===A?-1:1),W.preventDefault();return}if([re,j].includes(L)){const ge=L===re?-1:1;V.start_scrollDown(ge),W.preventDefault();return}},{timePickerOptions:V,onSetOption:F,getAvailableTime:Y}=qne({getAvailableHours:u,getAvailableMinutes:c,getAvailableSeconds:d}),Z=W=>Y(W,n.datetimeRole||"",!0),K=W=>W?ct(W,n.format).locale(h.value):null,U=W=>W?W.format(n.format):null,B=()=>ct(a).locale(h.value);return t("set-picker-option",["isValidValue",$]),t("set-picker-option",["formatToString",U]),t("set-picker-option",["parseUserInput",K]),t("set-picker-option",["handleKeydownInput",I]),t("set-picker-option",["getRangeAvailableTime",Z]),t("set-picker-option",["getDefaultValue",B]),(W,L)=>(C(),H(_r,{name:g(v)},{default:S(()=>[W.actualVisible||W.visible?(C(),T("div",{key:0,class:D(g(f).b("panel"))},[_("div",{class:D([g(f).be("panel","content"),{"has-seconds":g(k)}])},[w(coe,{ref:"spinner",role:W.datetimeRole||"start","arrow-control":g(r),"show-seconds":g(k),"am-pm-mode":g(b),"spinner-date":W.parsedValue,"disabled-hours":g(s),"disabled-minutes":g(i),"disabled-seconds":g(l),onChange:M,onSetOption:g(F),onSelectRange:N},null,8,["role","arrow-control","show-seconds","am-pm-mode","spinner-date","disabled-hours","disabled-minutes","disabled-seconds","onSetOption"])],2),_("div",{class:D(g(f).be("panel","footer"))},[_("button",{type:"button",class:D([g(f).be("panel","btn"),"cancel"]),onClick:x},O(g(p)("el.datepicker.cancel")),3),_("button",{type:"button",class:D([g(f).be("panel","btn"),"confirm"]),onClick:L[0]||(L[0]=A=>E())},O(g(p)("el.datepicker.confirm")),3)],2)],2)):z("v-if",!0)]),_:1},8,["name"]))}});var Sb=He(doe,[["__file","panel-time-pick.vue"]]),TM={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(Nn,function(){return function(n,o,r){var s=o.prototype,i=function(d){return d&&(d.indexOf?d:d.s)},l=function(d,f,p,h,m){var y=d.name?d:d.$locale(),v=i(y[f]),k=i(y[p]),b=v||k.map(function(x){return x.slice(0,h)});if(!m)return b;var $=y.weekStart;return b.map(function(x,E){return b[(E+($||0))%7]})},a=function(){return r.Ls[r.locale()]},u=function(d,f){return d.formats[f]||function(p){return p.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(h,m,y){return m||y.slice(1)})}(d.formats[f.toUpperCase()])},c=function(){var d=this;return{months:function(f){return f?f.format("MMMM"):l(d,"months")},monthsShort:function(f){return f?f.format("MMM"):l(d,"monthsShort","months",3)},firstDayOfWeek:function(){return d.$locale().weekStart||0},weekdays:function(f){return f?f.format("dddd"):l(d,"weekdays")},weekdaysMin:function(f){return f?f.format("dd"):l(d,"weekdaysMin","weekdays",2)},weekdaysShort:function(f){return f?f.format("ddd"):l(d,"weekdaysShort","weekdays",3)},longDateFormat:function(f){return u(d.$locale(),f)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};s.localeData=function(){return c.bind(this)()},r.localeData=function(){var d=a();return{firstDayOfWeek:function(){return d.weekStart||0},weekdays:function(){return r.weekdays()},weekdaysShort:function(){return r.weekdaysShort()},weekdaysMin:function(){return r.weekdaysMin()},months:function(){return r.months()},monthsShort:function(){return r.monthsShort()},longDateFormat:function(f){return u(d,f)},meridiem:d.meridiem,ordinal:d.ordinal}},r.months=function(){return l(a(),"months")},r.monthsShort=function(){return l(a(),"monthsShort","months",3)},r.weekdays=function(d){return l(a(),"weekdays",null,null,d)},r.weekdaysShort=function(d){return l(a(),"weekdaysShort","weekdays",3,d)},r.weekdaysMin=function(d){return l(a(),"weekdaysMin","weekdays",2,d)}}})})(TM);var foe=TM.exports;const poe=_o(foe),MM={modelValue:{type:[Number,String,Boolean],default:void 0},label:{type:[String,Boolean,Number,Object],default:void 0},value:{type:[String,Boolean,Number,Object],default:void 0},indeterminate:Boolean,disabled:Boolean,checked:Boolean,name:{type:String,default:void 0},trueValue:{type:[String,Number],default:void 0},falseValue:{type:[String,Number],default:void 0},trueLabel:{type:[String,Number],default:void 0},falseLabel:{type:[String,Number],default:void 0},id:{type:String,default:void 0},controls:{type:String,default:void 0},border:Boolean,size:Gr,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0}},OM={[Jt]:e=>tt(e)||_t(e)||Br(e),change:e=>tt(e)||_t(e)||Br(e)},$d=Symbol("checkboxGroupContextKey"),hoe=({model:e,isChecked:t})=>{const n=je($d,void 0),o=R(()=>{var s,i;const l=(s=n==null?void 0:n.max)==null?void 0:s.value,a=(i=n==null?void 0:n.min)==null?void 0:i.value;return!Uo(l)&&e.value.length>=l&&!t.value||!Uo(a)&&e.value.length<=a&&t.value});return{isDisabled:Yr(R(()=>(n==null?void 0:n.disabled.value)||o.value)),isLimitDisabled:o}},moe=(e,{model:t,isLimitExceeded:n,hasOwnLabel:o,isDisabled:r,isLabeledByFormItem:s})=>{const i=je($d,void 0),{formItem:l}=si(),{emit:a}=at();function u(h){var m,y,v,k;return[!0,e.trueValue,e.trueLabel].includes(h)?(y=(m=e.trueValue)!=null?m:e.trueLabel)!=null?y:!0:(k=(v=e.falseValue)!=null?v:e.falseLabel)!=null?k:!1}function c(h,m){a("change",u(h),m)}function d(h){if(n.value)return;const m=h.target;a("change",u(m.checked),h)}async function f(h){n.value||!o.value&&!r.value&&s.value&&(h.composedPath().some(v=>v.tagName==="LABEL")||(t.value=u([!1,e.falseValue,e.falseLabel].includes(t.value)),await ot(),c(t.value,h)))}const p=R(()=>(i==null?void 0:i.validateEvent)||e.validateEvent);return Me(()=>e.modelValue,()=>{p.value&&(l==null||l.validate("change").catch(h=>void 0))}),{handleChange:d,onClickRoot:f}},goe=e=>{const t=q(!1),{emit:n}=at(),o=je($d,void 0),r=R(()=>Uo(o)===!1),s=q(!1),i=R({get(){var l,a;return r.value?(l=o==null?void 0:o.modelValue)==null?void 0:l.value:(a=e.modelValue)!=null?a:t.value},set(l){var a,u;r.value&&Te(l)?(s.value=((a=o==null?void 0:o.max)==null?void 0:a.value)!==void 0&&l.length>(o==null?void 0:o.max.value)&&l.length>i.value.length,s.value===!1&&((u=o==null?void 0:o.changeEvent)==null||u.call(o,l))):(n(Jt,l),t.value=l)}});return{model:i,isGroup:r,isLimitExceeded:s}},voe=(e,t,{model:n})=>{const o=je($d,void 0),r=q(!1),s=R(()=>Np(e.value)?e.label:e.value),i=R(()=>{const c=n.value;return Br(c)?c:Te(c)?pt(s.value)?c.map(Ot).some(d=>Hl(d,s.value)):c.map(Ot).includes(s.value):c!=null?c===e.trueValue||c===e.trueLabel:!!c}),l=Jo(R(()=>{var c;return(c=o==null?void 0:o.size)==null?void 0:c.value}),{prop:!0}),a=Jo(R(()=>{var c;return(c=o==null?void 0:o.size)==null?void 0:c.value})),u=R(()=>!!t.default||!Np(s.value));return{checkboxButtonSize:l,isChecked:i,isFocused:r,checkboxSize:a,hasOwnLabel:u,actualValue:s}},IM=(e,t)=>{const{formItem:n}=si(),{model:o,isGroup:r,isLimitExceeded:s}=goe(e),{isFocused:i,isChecked:l,checkboxButtonSize:a,checkboxSize:u,hasOwnLabel:c,actualValue:d}=voe(e,t,{model:o}),{isDisabled:f}=hoe({model:o,isChecked:l}),{inputId:p,isLabeledByFormItem:h}=Sd(e,{formItemContext:n,disableIdGeneration:c,disableIdManagement:r}),{handleChange:m,onClickRoot:y}=moe(e,{model:o,isLimitExceeded:s,hasOwnLabel:c,isDisabled:f,isLabeledByFormItem:h});return(()=>{function k(){var b,$;Te(o.value)&&!o.value.includes(d.value)?o.value.push(d.value):o.value=($=(b=e.trueValue)!=null?b:e.trueLabel)!=null?$:!0}e.checked&&k()})(),qa({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},R(()=>r.value&&Np(e.value))),qa({from:"true-label",replacement:"true-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},R(()=>!!e.trueLabel)),qa({from:"false-label",replacement:"false-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},R(()=>!!e.falseLabel)),{inputId:p,isLabeledByFormItem:h,isChecked:l,isDisabled:f,isFocused:i,checkboxButtonSize:a,checkboxSize:u,hasOwnLabel:c,model:o,actualValue:d,handleChange:m,onClickRoot:y}},yoe=["id","indeterminate","name","tabindex","disabled","true-value","false-value"],_oe=["id","indeterminate","disabled","value","name","tabindex"],boe=Q({name:"ElCheckbox"}),woe=Q({...boe,props:MM,emits:OM,setup(e){const t=e,n=Kr(),{inputId:o,isLabeledByFormItem:r,isChecked:s,isDisabled:i,isFocused:l,checkboxSize:a,hasOwnLabel:u,model:c,actualValue:d,handleChange:f,onClickRoot:p}=IM(t,n),h=Re("checkbox"),m=R(()=>[h.b(),h.m(a.value),h.is("disabled",i.value),h.is("bordered",t.border),h.is("checked",s.value)]),y=R(()=>[h.e("input"),h.is("disabled",i.value),h.is("checked",s.value),h.is("indeterminate",t.indeterminate),h.is("focus",l.value)]);return(v,k)=>(C(),H(Pt(!g(u)&&g(r)?"span":"label"),{class:D(g(m)),"aria-controls":v.indeterminate?v.controls:null,onClick:g(p)},{default:S(()=>{var b,$;return[_("span",{class:D(g(y))},[v.trueValue||v.falseValue||v.trueLabel||v.falseLabel?Fe((C(),T("input",{key:0,id:g(o),"onUpdate:modelValue":k[0]||(k[0]=x=>on(c)?c.value=x:null),class:D(g(h).e("original")),type:"checkbox",indeterminate:v.indeterminate,name:v.name,tabindex:v.tabindex,disabled:g(i),"true-value":(b=v.trueValue)!=null?b:v.trueLabel,"false-value":($=v.falseValue)!=null?$:v.falseLabel,onChange:k[1]||(k[1]=(...x)=>g(f)&&g(f)(...x)),onFocus:k[2]||(k[2]=x=>l.value=!0),onBlur:k[3]||(k[3]=x=>l.value=!1),onClick:k[4]||(k[4]=Ze(()=>{},["stop"]))},null,42,yoe)),[[iu,g(c)]]):Fe((C(),T("input",{key:1,id:g(o),"onUpdate:modelValue":k[5]||(k[5]=x=>on(c)?c.value=x:null),class:D(g(h).e("original")),type:"checkbox",indeterminate:v.indeterminate,disabled:g(i),value:g(d),name:v.name,tabindex:v.tabindex,onChange:k[6]||(k[6]=(...x)=>g(f)&&g(f)(...x)),onFocus:k[7]||(k[7]=x=>l.value=!0),onBlur:k[8]||(k[8]=x=>l.value=!1),onClick:k[9]||(k[9]=Ze(()=>{},["stop"]))},null,42,_oe)),[[iu,g(c)]]),_("span",{class:D(g(h).e("inner"))},null,2)],2),g(u)?(C(),T("span",{key:0,class:D(g(h).e("label"))},[he(v.$slots,"default"),v.$slots.default?z("v-if",!0):(C(),T(de,{key:0},[ne(O(v.label),1)],64))],2)):z("v-if",!0)]}),_:3},8,["class","aria-controls","onClick"]))}});var Coe=He(woe,[["__file","checkbox.vue"]]);const koe=["name","tabindex","disabled","true-value","false-value"],Soe=["name","tabindex","disabled","value"],$oe=Q({name:"ElCheckboxButton"}),Eoe=Q({...$oe,props:MM,emits:OM,setup(e){const t=e,n=Kr(),{isFocused:o,isChecked:r,isDisabled:s,checkboxButtonSize:i,model:l,actualValue:a,handleChange:u}=IM(t,n),c=je($d,void 0),d=Re("checkbox"),f=R(()=>{var h,m,y,v;const k=(m=(h=c==null?void 0:c.fill)==null?void 0:h.value)!=null?m:"";return{backgroundColor:k,borderColor:k,color:(v=(y=c==null?void 0:c.textColor)==null?void 0:y.value)!=null?v:"",boxShadow:k?`-1px 0 0 0 ${k}`:void 0}}),p=R(()=>[d.b("button"),d.bm("button",i.value),d.is("disabled",s.value),d.is("checked",r.value),d.is("focus",o.value)]);return(h,m)=>{var y,v;return C(),T("label",{class:D(g(p))},[h.trueValue||h.falseValue||h.trueLabel||h.falseLabel?Fe((C(),T("input",{key:0,"onUpdate:modelValue":m[0]||(m[0]=k=>on(l)?l.value=k:null),class:D(g(d).be("button","original")),type:"checkbox",name:h.name,tabindex:h.tabindex,disabled:g(s),"true-value":(y=h.trueValue)!=null?y:h.trueLabel,"false-value":(v=h.falseValue)!=null?v:h.falseLabel,onChange:m[1]||(m[1]=(...k)=>g(u)&&g(u)(...k)),onFocus:m[2]||(m[2]=k=>o.value=!0),onBlur:m[3]||(m[3]=k=>o.value=!1),onClick:m[4]||(m[4]=Ze(()=>{},["stop"]))},null,42,koe)),[[iu,g(l)]]):Fe((C(),T("input",{key:1,"onUpdate:modelValue":m[5]||(m[5]=k=>on(l)?l.value=k:null),class:D(g(d).be("button","original")),type:"checkbox",name:h.name,tabindex:h.tabindex,disabled:g(s),value:g(a),onChange:m[6]||(m[6]=(...k)=>g(u)&&g(u)(...k)),onFocus:m[7]||(m[7]=k=>o.value=!0),onBlur:m[8]||(m[8]=k=>o.value=!1),onClick:m[9]||(m[9]=Ze(()=>{},["stop"]))},null,42,Soe)),[[iu,g(l)]]),h.$slots.default||h.label?(C(),T("span",{key:2,class:D(g(d).be("button","inner")),style:Ye(g(r)?g(f):void 0)},[he(h.$slots,"default",{},()=>[ne(O(h.label),1)])],6)):z("v-if",!0)],2)}}});var AM=He(Eoe,[["__file","checkbox-button.vue"]]);const xoe=Ke({modelValue:{type:Ce(Array),default:()=>[]},disabled:Boolean,min:Number,max:Number,size:Gr,label:String,fill:String,textColor:String,tag:{type:String,default:"div"},validateEvent:{type:Boolean,default:!0}}),Toe={[Jt]:e=>Te(e),change:e=>Te(e)},Moe=Q({name:"ElCheckboxGroup"}),Ooe=Q({...Moe,props:xoe,emits:Toe,setup(e,{emit:t}){const n=e,o=Re("checkbox"),{formItem:r}=si(),{inputId:s,isLabeledByFormItem:i}=Sd(n,{formItemContext:r}),l=async u=>{t(Jt,u),await ot(),t("change",u)},a=R({get(){return n.modelValue},set(u){l(u)}});return wt($d,{...pY(oi(n),["size","min","max","disabled","validateEvent","fill","textColor"]),modelValue:a,changeEvent:l}),Me(()=>n.modelValue,()=>{n.validateEvent&&(r==null||r.validate("change").catch(u=>void 0))}),(u,c)=>{var d;return C(),H(Pt(u.tag),{id:g(s),class:D(g(o).b("group")),role:"group","aria-label":g(i)?void 0:u.label||"checkbox-group","aria-labelledby":g(i)?(d=g(r))==null?void 0:d.labelId:void 0},{default:S(()=>[he(u.$slots,"default")]),_:3},8,["id","class","aria-label","aria-labelledby"])}}});var NM=He(Ooe,[["__file","checkbox-group.vue"]]);const En=Zt(Coe,{CheckboxButton:AM,CheckboxGroup:NM});Jn(AM);const Ioe=Jn(NM),PM=Ke({modelValue:{type:[String,Number,Boolean],default:void 0},size:Gr,disabled:Boolean,label:{type:[String,Number,Boolean],default:void 0},value:{type:[String,Number,Boolean],default:void 0},name:{type:String,default:void 0}}),Aoe=Ke({...PM,border:Boolean}),LM={[Jt]:e=>tt(e)||_t(e)||Br(e),[Cd]:e=>tt(e)||_t(e)||Br(e)},RM=Symbol("radioGroupKey"),DM=(e,t)=>{const n=q(),o=je(RM,void 0),r=R(()=>!!o),s=R(()=>Np(e.value)?e.label:e.value),i=R({get(){return r.value?o.modelValue:e.modelValue},set(d){r.value?o.changeEvent(d):t&&t(Jt,d),n.value.checked=e.modelValue===s.value}}),l=Jo(R(()=>o==null?void 0:o.size)),a=Yr(R(()=>o==null?void 0:o.disabled)),u=q(!1),c=R(()=>a.value||r.value&&i.value!==s.value?-1:0);return qa({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-radio",ref:"https://element-plus.org/en-US/component/radio.html"},R(()=>r.value&&Np(e.value))),{radioRef:n,isGroup:r,radioGroup:o,focus:u,size:l,disabled:a,tabIndex:c,modelValue:i,actualValue:s}},Noe=["value","name","disabled"],Poe=Q({name:"ElRadio"}),Loe=Q({...Poe,props:Aoe,emits:LM,setup(e,{emit:t}){const n=e,o=Re("radio"),{radioRef:r,radioGroup:s,focus:i,size:l,disabled:a,modelValue:u,actualValue:c}=DM(n,t);function d(){ot(()=>t("change",u.value))}return(f,p)=>{var h;return C(),T("label",{class:D([g(o).b(),g(o).is("disabled",g(a)),g(o).is("focus",g(i)),g(o).is("bordered",f.border),g(o).is("checked",g(u)===g(c)),g(o).m(g(l))])},[_("span",{class:D([g(o).e("input"),g(o).is("disabled",g(a)),g(o).is("checked",g(u)===g(c))])},[Fe(_("input",{ref_key:"radioRef",ref:r,"onUpdate:modelValue":p[0]||(p[0]=m=>on(u)?u.value=m:null),class:D(g(o).e("original")),value:g(c),name:f.name||((h=g(s))==null?void 0:h.name),disabled:g(a),type:"radio",onFocus:p[1]||(p[1]=m=>i.value=!0),onBlur:p[2]||(p[2]=m=>i.value=!1),onChange:d,onClick:p[3]||(p[3]=Ze(()=>{},["stop"]))},null,42,Noe),[[Qp,g(u)]]),_("span",{class:D(g(o).e("inner"))},null,2)],2),_("span",{class:D(g(o).e("label")),onKeydown:p[4]||(p[4]=Ze(()=>{},["stop"]))},[he(f.$slots,"default",{},()=>[ne(O(f.label),1)])],34)],2)}}});var Roe=He(Loe,[["__file","radio.vue"]]);const Doe=Ke({...PM}),Voe=["value","name","disabled"],Foe=Q({name:"ElRadioButton"}),Boe=Q({...Foe,props:Doe,setup(e){const t=e,n=Re("radio"),{radioRef:o,focus:r,size:s,disabled:i,modelValue:l,radioGroup:a,actualValue:u}=DM(t),c=R(()=>({backgroundColor:(a==null?void 0:a.fill)||"",borderColor:(a==null?void 0:a.fill)||"",boxShadow:a!=null&&a.fill?`-1px 0 0 0 ${a.fill}`:"",color:(a==null?void 0:a.textColor)||""}));return(d,f)=>{var p;return C(),T("label",{class:D([g(n).b("button"),g(n).is("active",g(l)===g(u)),g(n).is("disabled",g(i)),g(n).is("focus",g(r)),g(n).bm("button",g(s))])},[Fe(_("input",{ref_key:"radioRef",ref:o,"onUpdate:modelValue":f[0]||(f[0]=h=>on(l)?l.value=h:null),class:D(g(n).be("button","original-radio")),value:g(u),type:"radio",name:d.name||((p=g(a))==null?void 0:p.name),disabled:g(i),onFocus:f[1]||(f[1]=h=>r.value=!0),onBlur:f[2]||(f[2]=h=>r.value=!1),onClick:f[3]||(f[3]=Ze(()=>{},["stop"]))},null,42,Voe),[[Qp,g(l)]]),_("span",{class:D(g(n).be("button","inner")),style:Ye(g(l)===g(u)?g(c):{}),onKeydown:f[4]||(f[4]=Ze(()=>{},["stop"]))},[he(d.$slots,"default",{},()=>[ne(O(d.label),1)])],38)],2)}}});var VM=He(Boe,[["__file","radio-button.vue"]]);const zoe=Ke({id:{type:String,default:void 0},size:Gr,disabled:Boolean,modelValue:{type:[String,Number,Boolean],default:void 0},fill:{type:String,default:""},label:{type:String,default:void 0},textColor:{type:String,default:""},name:{type:String,default:void 0},validateEvent:{type:Boolean,default:!0}}),joe=LM,Hoe=["id","aria-label","aria-labelledby"],Uoe=Q({name:"ElRadioGroup"}),Woe=Q({...Uoe,props:zoe,emits:joe,setup(e,{emit:t}){const n=e,o=Re("radio"),r=Hr(),s=q(),{formItem:i}=si(),{inputId:l,isLabeledByFormItem:a}=Sd(n,{formItemContext:i}),u=d=>{t(Jt,d),ot(()=>t("change",d))};Ct(()=>{const d=s.value.querySelectorAll("[type=radio]"),f=d[0];!Array.from(d).some(p=>p.checked)&&f&&(f.tabIndex=0)});const c=R(()=>n.name||r.value);return wt(RM,Bn({...oi(n),changeEvent:u,name:c})),Me(()=>n.modelValue,()=>{n.validateEvent&&(i==null||i.validate("change").catch(d=>void 0))}),(d,f)=>(C(),T("div",{id:g(l),ref_key:"radioGroupRef",ref:s,class:D(g(o).b("group")),role:"radiogroup","aria-label":g(a)?void 0:d.label||"radio-group","aria-labelledby":g(a)?g(i).labelId:void 0},[he(d.$slots,"default")],10,Hoe))}});var FM=He(Woe,[["__file","radio-group.vue"]]);const gh=Zt(Roe,{RadioButton:VM,RadioGroup:FM}),ta=Jn(FM),Y0=Jn(VM),BM=Ke({type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"},closable:Boolean,disableTransitions:Boolean,hit:Boolean,color:String,size:{type:String,values:Jl},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),Koe={close:e=>e instanceof MouseEvent,click:e=>e instanceof MouseEvent},qoe=Q({name:"ElTag"}),Goe=Q({...qoe,props:BM,emits:Koe,setup(e,{emit:t}){const n=e,o=Jo(),r=Re("tag"),s=R(()=>{const{type:a,hit:u,effect:c,closable:d,round:f}=n;return[r.b(),r.is("closable",d),r.m(a||"primary"),r.m(o.value),r.m(c),r.is("hit",u),r.is("round",f)]}),i=a=>{t("close",a)},l=a=>{t("click",a)};return(a,u)=>a.disableTransitions?(C(),T("span",{key:0,class:D(g(s)),style:Ye({backgroundColor:a.color}),onClick:l},[_("span",{class:D(g(r).e("content"))},[he(a.$slots,"default")],2),a.closable?(C(),H(g(Ie),{key:0,class:D(g(r).e("close")),onClick:Ze(i,["stop"])},{default:S(()=>[w(g(Js))]),_:1},8,["class","onClick"])):z("v-if",!0)],6)):(C(),H(_r,{key:1,name:`${g(r).namespace.value}-zoom-in-center`,appear:""},{default:S(()=>[_("span",{class:D(g(s)),style:Ye({backgroundColor:a.color}),onClick:l},[_("span",{class:D(g(r).e("content"))},[he(a.$slots,"default")],2),a.closable?(C(),H(g(Ie),{key:0,class:D(g(r).e("close")),onClick:Ze(i,["stop"])},{default:S(()=>[w(g(Js))]),_:1},8,["class","onClick"])):z("v-if",!0)],6)]),_:3},8,["name"]))}});var Yoe=He(Goe,[["__file","tag.vue"]]);const vh=Zt(Yoe),zM=Symbol("rowContextKey"),Zoe=["start","center","end","space-around","space-between","space-evenly"],Joe=["top","middle","bottom"],Xoe=Ke({tag:{type:String,default:"div"},gutter:{type:Number,default:0},justify:{type:String,values:Zoe,default:"start"},align:{type:String,values:Joe}}),Qoe=Q({name:"ElRow"}),ere=Q({...Qoe,props:Xoe,setup(e){const t=e,n=Re("row"),o=R(()=>t.gutter);wt(zM,{gutter:o});const r=R(()=>{const i={};return t.gutter&&(i.marginRight=i.marginLeft=`-${t.gutter/2}px`),i}),s=R(()=>[n.b(),n.is(`justify-${t.justify}`,t.justify!=="start"),n.is(`align-${t.align}`,!!t.align)]);return(i,l)=>(C(),H(Pt(i.tag),{class:D(g(s)),style:Ye(g(r))},{default:S(()=>[he(i.$slots,"default")]),_:3},8,["class","style"]))}});var tre=He(ere,[["__file","row.vue"]]);const yh=Zt(tre),nre=Ke({tag:{type:String,default:"div"},span:{type:Number,default:24},offset:{type:Number,default:0},pull:{type:Number,default:0},push:{type:Number,default:0},xs:{type:Ce([Number,Object]),default:()=>Eo({})},sm:{type:Ce([Number,Object]),default:()=>Eo({})},md:{type:Ce([Number,Object]),default:()=>Eo({})},lg:{type:Ce([Number,Object]),default:()=>Eo({})},xl:{type:Ce([Number,Object]),default:()=>Eo({})}}),ore=Q({name:"ElCol"}),rre=Q({...ore,props:nre,setup(e){const t=e,{gutter:n}=je(zM,{gutter:R(()=>0)}),o=Re("col"),r=R(()=>{const i={};return n.value&&(i.paddingLeft=i.paddingRight=`${n.value/2}px`),i}),s=R(()=>{const i=[];return["span","offset","pull","push"].forEach(u=>{const c=t[u];_t(c)&&(u==="span"?i.push(o.b(`${t[u]}`)):c>0&&i.push(o.b(`${u}-${t[u]}`)))}),["xs","sm","md","lg","xl"].forEach(u=>{_t(t[u])?i.push(o.b(`${u}-${t[u]}`)):pt(t[u])&&Object.entries(t[u]).forEach(([c,d])=>{i.push(c!=="span"?o.b(`${u}-${c}-${d}`):o.b(`${u}-${d}`))})}),n.value&&i.push(o.is("guttered")),[o.b(),i]});return(i,l)=>(C(),H(Pt(i.tag),{class:D(g(s)),style:Ye(g(r))},{default:S(()=>[he(i.$slots,"default")]),_:3},8,["class","style"]))}});var sre=He(rre,[["__file","col.vue"]]);const _h=Zt(sre),ire=Ke({color:{type:Ce(Object),required:!0},vertical:{type:Boolean,default:!1}});let py=!1;function Fp(e,t){if(!Tt)return;const n=function(s){var i;(i=t.drag)==null||i.call(t,s)},o=function(s){var i;document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",o),document.removeEventListener("touchmove",n),document.removeEventListener("touchend",o),document.onselectstart=null,document.ondragstart=null,py=!1,(i=t.end)==null||i.call(t,s)},r=function(s){var i;py||(s.preventDefault(),document.onselectstart=()=>!1,document.ondragstart=()=>!1,document.addEventListener("mousemove",n),document.addEventListener("mouseup",o),document.addEventListener("touchmove",n),document.addEventListener("touchend",o),py=!0,(i=t.start)==null||i.call(t,s))};e.addEventListener("mousedown",r),e.addEventListener("touchstart",r)}const lre=e=>{const t=at(),n=An(),o=An();function r(i){i.target!==n.value&&s(i)}function s(i){if(!o.value||!n.value)return;const a=t.vnode.el.getBoundingClientRect(),{clientX:u,clientY:c}=Y3(i);if(e.vertical){let d=c-a.top;d=Math.max(n.value.offsetHeight/2,d),d=Math.min(d,a.height-n.value.offsetHeight/2),e.color.set("alpha",Math.round((d-n.value.offsetHeight/2)/(a.height-n.value.offsetHeight)*100))}else{let d=u-a.left;d=Math.max(n.value.offsetWidth/2,d),d=Math.min(d,a.width-n.value.offsetWidth/2),e.color.set("alpha",Math.round((d-n.value.offsetWidth/2)/(a.width-n.value.offsetWidth)*100))}}return{thumb:n,bar:o,handleDrag:s,handleClick:r}},are=(e,{bar:t,thumb:n,handleDrag:o})=>{const r=at(),s=Re("color-alpha-slider"),i=q(0),l=q(0),a=q();function u(){if(!n.value||e.vertical)return 0;const k=r.vnode.el,b=e.color.get("alpha");return k?Math.round(b*(k.offsetWidth-n.value.offsetWidth/2)/100):0}function c(){if(!n.value)return 0;const k=r.vnode.el;if(!e.vertical)return 0;const b=e.color.get("alpha");return k?Math.round(b*(k.offsetHeight-n.value.offsetHeight/2)/100):0}function d(){if(e.color&&e.color.value){const{r:k,g:b,b:$}=e.color.toRgb();return`linear-gradient(to right, rgba(${k}, ${b}, ${$}, 0) 0%, rgba(${k}, ${b}, ${$}, 1) 100%)`}return""}function f(){i.value=u(),l.value=c(),a.value=d()}Ct(()=>{if(!t.value||!n.value)return;const k={drag:b=>{o(b)},end:b=>{o(b)}};Fp(t.value,k),Fp(n.value,k),f()}),Me(()=>e.color.get("alpha"),()=>f()),Me(()=>e.color.value,()=>f());const p=R(()=>[s.b(),s.is("vertical",e.vertical)]),h=R(()=>s.e("bar")),m=R(()=>s.e("thumb")),y=R(()=>({background:a.value})),v=R(()=>({left:Zo(i.value),top:Zo(l.value)}));return{rootKls:p,barKls:h,barStyle:y,thumbKls:m,thumbStyle:v,update:f}},ure="ElColorAlphaSlider",cre=Q({name:ure}),dre=Q({...cre,props:ire,setup(e,{expose:t}){const n=e,{bar:o,thumb:r,handleDrag:s,handleClick:i}=lre(n),{rootKls:l,barKls:a,barStyle:u,thumbKls:c,thumbStyle:d,update:f}=are(n,{bar:o,thumb:r,handleDrag:s});return t({update:f,bar:o,thumb:r}),(p,h)=>(C(),T("div",{class:D(g(l))},[_("div",{ref_key:"bar",ref:o,class:D(g(a)),style:Ye(g(u)),onClick:h[0]||(h[0]=(...m)=>g(i)&&g(i)(...m))},null,6),_("div",{ref_key:"thumb",ref:r,class:D(g(c)),style:Ye(g(d))},null,6)],2))}});var fre=He(dre,[["__file","alpha-slider.vue"]]);const pre=Q({name:"ElColorHueSlider",props:{color:{type:Object,required:!0},vertical:Boolean},setup(e){const t=Re("color-hue-slider"),n=at(),o=q(),r=q(),s=q(0),i=q(0),l=R(()=>e.color.get("hue"));Me(()=>l.value,()=>{f()});function a(p){p.target!==o.value&&u(p)}function u(p){if(!r.value||!o.value)return;const m=n.vnode.el.getBoundingClientRect(),{clientX:y,clientY:v}=Y3(p);let k;if(e.vertical){let b=v-m.top;b=Math.min(b,m.height-o.value.offsetHeight/2),b=Math.max(o.value.offsetHeight/2,b),k=Math.round((b-o.value.offsetHeight/2)/(m.height-o.value.offsetHeight)*360)}else{let b=y-m.left;b=Math.min(b,m.width-o.value.offsetWidth/2),b=Math.max(o.value.offsetWidth/2,b),k=Math.round((b-o.value.offsetWidth/2)/(m.width-o.value.offsetWidth)*360)}e.color.set("hue",k)}function c(){if(!o.value)return 0;const p=n.vnode.el;if(e.vertical)return 0;const h=e.color.get("hue");return p?Math.round(h*(p.offsetWidth-o.value.offsetWidth/2)/360):0}function d(){if(!o.value)return 0;const p=n.vnode.el;if(!e.vertical)return 0;const h=e.color.get("hue");return p?Math.round(h*(p.offsetHeight-o.value.offsetHeight/2)/360):0}function f(){s.value=c(),i.value=d()}return Ct(()=>{if(!r.value||!o.value)return;const p={drag:h=>{u(h)},end:h=>{u(h)}};Fp(r.value,p),Fp(o.value,p),f()}),{bar:r,thumb:o,thumbLeft:s,thumbTop:i,hueValue:l,handleClick:a,update:f,ns:t}}});function hre(e,t,n,o,r,s){return C(),T("div",{class:D([e.ns.b(),e.ns.is("vertical",e.vertical)])},[_("div",{ref:"bar",class:D(e.ns.e("bar")),onClick:t[0]||(t[0]=(...i)=>e.handleClick&&e.handleClick(...i))},null,2),_("div",{ref:"thumb",class:D(e.ns.e("thumb")),style:Ye({left:e.thumbLeft+"px",top:e.thumbTop+"px"})},null,6)],2)}var mre=He(pre,[["render",hre],["__file","hue-slider.vue"]]);const gre=Ke({modelValue:String,id:String,showAlpha:Boolean,colorFormat:String,disabled:Boolean,size:Gr,popperClass:{type:String,default:""},label:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},predefine:{type:Ce(Array)},validateEvent:{type:Boolean,default:!0}}),vre={[Jt]:e=>tt(e)||To(e),[Cd]:e=>tt(e)||To(e),activeChange:e=>tt(e)||To(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent},jM=Symbol("colorPickerContextKey"),y8=function(e,t,n){return[e,t*n/((e=(2-t)*n)<1?e:2-e)||0,e/2]},yre=function(e){return typeof e=="string"&&e.includes(".")&&Number.parseFloat(e)===1},_re=function(e){return typeof e=="string"&&e.includes("%")},$c=function(e,t){yre(e)&&(e="100%");const n=_re(e);return e=Math.min(t,Math.max(0,Number.parseFloat(`${e}`))),n&&(e=Number.parseInt(`${e*t}`,10)/100),Math.abs(e-t)<1e-6?1:e%t/Number.parseFloat(t)},_8={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},r1=e=>{e=Math.min(Math.round(e),255);const t=Math.floor(e/16),n=e%16;return`${_8[t]||t}${_8[n]||n}`},b8=function({r:e,g:t,b:n}){return Number.isNaN(+e)||Number.isNaN(+t)||Number.isNaN(+n)?"":`#${r1(e)}${r1(t)}${r1(n)}`},hy={A:10,B:11,C:12,D:13,E:14,F:15},ha=function(e){return e.length===2?(hy[e[0].toUpperCase()]||+e[0])*16+(hy[e[1].toUpperCase()]||+e[1]):hy[e[1].toUpperCase()]||+e[1]},bre=function(e,t,n){t=t/100,n=n/100;let o=t;const r=Math.max(n,.01);n*=2,t*=n<=1?n:2-n,o*=r<=1?r:2-r;const s=(n+t)/2,i=n===0?2*o/(r+o):2*t/(n+t);return{h:e,s:i*100,v:s*100}},w8=(e,t,n)=>{e=$c(e,255),t=$c(t,255),n=$c(n,255);const o=Math.max(e,t,n),r=Math.min(e,t,n);let s;const i=o,l=o-r,a=o===0?0:l/o;if(o===r)s=0;else{switch(o){case e:{s=(t-n)/l+(t<n?6:0);break}case t:{s=(n-e)/l+2;break}case n:{s=(e-t)/l+4;break}}s/=6}return{h:s*360,s:a*100,v:i*100}},Kd=function(e,t,n){e=$c(e,360)*6,t=$c(t,100),n=$c(n,100);const o=Math.floor(e),r=e-o,s=n*(1-t),i=n*(1-r*t),l=n*(1-(1-r)*t),a=o%6,u=[n,i,s,s,l,n][a],c=[l,n,n,i,s,s][a],d=[s,s,l,n,n,i][a];return{r:Math.round(u*255),g:Math.round(c*255),b:Math.round(d*255)}};class Yf{constructor(t={}){this._hue=0,this._saturation=100,this._value=100,this._alpha=100,this.enableAlpha=!1,this.format="hex",this.value="";for(const n in t)vt(t,n)&&(this[n]=t[n]);t.value?this.fromString(t.value):this.doOnChange()}set(t,n){if(arguments.length===1&&typeof t=="object"){for(const o in t)vt(t,o)&&this.set(o,t[o]);return}this[`_${t}`]=n,this.doOnChange()}get(t){return t==="alpha"?Math.floor(this[`_${t}`]):this[`_${t}`]}toRgb(){return Kd(this._hue,this._saturation,this._value)}fromString(t){if(!t){this._hue=0,this._saturation=100,this._value=100,this.doOnChange();return}const n=(o,r,s)=>{this._hue=Math.max(0,Math.min(360,o)),this._saturation=Math.max(0,Math.min(100,r)),this._value=Math.max(0,Math.min(100,s)),this.doOnChange()};if(t.includes("hsl")){const o=t.replace(/hsla|hsl|\(|\)/gm,"").split(/\s|,/g).filter(r=>r!=="").map((r,s)=>s>2?Number.parseFloat(r):Number.parseInt(r,10));if(o.length===4?this._alpha=Number.parseFloat(o[3])*100:o.length===3&&(this._alpha=100),o.length>=3){const{h:r,s,v:i}=bre(o[0],o[1],o[2]);n(r,s,i)}}else if(t.includes("hsv")){const o=t.replace(/hsva|hsv|\(|\)/gm,"").split(/\s|,/g).filter(r=>r!=="").map((r,s)=>s>2?Number.parseFloat(r):Number.parseInt(r,10));o.length===4?this._alpha=Number.parseFloat(o[3])*100:o.length===3&&(this._alpha=100),o.length>=3&&n(o[0],o[1],o[2])}else if(t.includes("rgb")){const o=t.replace(/rgba|rgb|\(|\)/gm,"").split(/\s|,/g).filter(r=>r!=="").map((r,s)=>s>2?Number.parseFloat(r):Number.parseInt(r,10));if(o.length===4?this._alpha=Number.parseFloat(o[3])*100:o.length===3&&(this._alpha=100),o.length>=3){const{h:r,s,v:i}=w8(o[0],o[1],o[2]);n(r,s,i)}}else if(t.includes("#")){const o=t.replace("#","").trim();if(!/^[0-9a-fA-F]{3}$|^[0-9a-fA-F]{6}$|^[0-9a-fA-F]{8}$/.test(o))return;let r,s,i;o.length===3?(r=ha(o[0]+o[0]),s=ha(o[1]+o[1]),i=ha(o[2]+o[2])):(o.length===6||o.length===8)&&(r=ha(o.slice(0,2)),s=ha(o.slice(2,4)),i=ha(o.slice(4,6))),o.length===8?this._alpha=ha(o.slice(6))/255*100:(o.length===3||o.length===6)&&(this._alpha=100);const{h:l,s:a,v:u}=w8(r,s,i);n(l,a,u)}}compare(t){return Math.abs(t._hue-this._hue)<2&&Math.abs(t._saturation-this._saturation)<1&&Math.abs(t._value-this._value)<1&&Math.abs(t._alpha-this._alpha)<1}doOnChange(){const{_hue:t,_saturation:n,_value:o,_alpha:r,format:s}=this;if(this.enableAlpha)switch(s){case"hsl":{const i=y8(t,n/100,o/100);this.value=`hsla(${t}, ${Math.round(i[1]*100)}%, ${Math.round(i[2]*100)}%, ${this.get("alpha")/100})`;break}case"hsv":{this.value=`hsva(${t}, ${Math.round(n)}%, ${Math.round(o)}%, ${this.get("alpha")/100})`;break}case"hex":{this.value=`${b8(Kd(t,n,o))}${r1(r*255/100)}`;break}default:{const{r:i,g:l,b:a}=Kd(t,n,o);this.value=`rgba(${i}, ${l}, ${a}, ${this.get("alpha")/100})`}}else switch(s){case"hsl":{const i=y8(t,n/100,o/100);this.value=`hsl(${t}, ${Math.round(i[1]*100)}%, ${Math.round(i[2]*100)}%)`;break}case"hsv":{this.value=`hsv(${t}, ${Math.round(n)}%, ${Math.round(o)}%)`;break}case"rgb":{const{r:i,g:l,b:a}=Kd(t,n,o);this.value=`rgb(${i}, ${l}, ${a})`;break}default:this.value=b8(Kd(t,n,o))}}}const wre=Q({props:{colors:{type:Array,required:!0},color:{type:Object,required:!0}},setup(e){const t=Re("color-predefine"),{currentColor:n}=je(jM),o=q(s(e.colors,e.color));Me(()=>n.value,i=>{const l=new Yf;l.fromString(i),o.value.forEach(a=>{a.selected=l.compare(a)})}),as(()=>{o.value=s(e.colors,e.color)});function r(i){e.color.fromString(e.colors[i])}function s(i,l){return i.map(a=>{const u=new Yf;return u.enableAlpha=!0,u.format="rgba",u.fromString(a),u.selected=u.value===l.value,u})}return{rgbaColors:o,handleSelect:r,ns:t}}}),Cre=["onClick"];function kre(e,t,n,o,r,s){return C(),T("div",{class:D(e.ns.b())},[_("div",{class:D(e.ns.e("colors"))},[(C(!0),T(de,null,nt(e.rgbaColors,(i,l)=>(C(),T("div",{key:e.colors[l],class:D([e.ns.e("color-selector"),e.ns.is("alpha",i._alpha<100),{selected:i.selected}]),onClick:a=>e.handleSelect(l)},[_("div",{style:Ye({backgroundColor:i.value})},null,4)],10,Cre))),128))],2)],2)}var Sre=He(wre,[["render",kre],["__file","predefine.vue"]]);const $re=Q({name:"ElSlPanel",props:{color:{type:Object,required:!0}},setup(e){const t=Re("color-svpanel"),n=at(),o=q(0),r=q(0),s=q("hsl(0, 100%, 50%)"),i=R(()=>{const u=e.color.get("hue"),c=e.color.get("value");return{hue:u,value:c}});function l(){const u=e.color.get("saturation"),c=e.color.get("value"),d=n.vnode.el,{clientWidth:f,clientHeight:p}=d;r.value=u*f/100,o.value=(100-c)*p/100,s.value=`hsl(${e.color.get("hue")}, 100%, 50%)`}function a(u){const d=n.vnode.el.getBoundingClientRect(),{clientX:f,clientY:p}=Y3(u);let h=f-d.left,m=p-d.top;h=Math.max(0,h),h=Math.min(h,d.width),m=Math.max(0,m),m=Math.min(m,d.height),r.value=h,o.value=m,e.color.set({saturation:h/d.width*100,value:100-m/d.height*100})}return Me(()=>i.value,()=>{l()}),Ct(()=>{Fp(n.vnode.el,{drag:u=>{a(u)},end:u=>{a(u)}}),l()}),{cursorTop:o,cursorLeft:r,background:s,colorValue:i,handleDrag:a,update:l,ns:t}}}),Ere=_("div",null,null,-1),xre=[Ere];function Tre(e,t,n,o,r,s){return C(),T("div",{class:D(e.ns.b()),style:Ye({backgroundColor:e.background})},[_("div",{class:D(e.ns.e("white"))},null,2),_("div",{class:D(e.ns.e("black"))},null,2),_("div",{class:D(e.ns.e("cursor")),style:Ye({top:e.cursorTop+"px",left:e.cursorLeft+"px"})},xre,6)],6)}var Mre=He($re,[["render",Tre],["__file","sv-panel.vue"]]);const Ore=["onKeydown"],Ire=["id","aria-label","aria-labelledby","aria-description","aria-disabled","tabindex"],Are=Q({name:"ElColorPicker"}),Nre=Q({...Are,props:gre,emits:vre,setup(e,{expose:t,emit:n}){const o=e,{t:r}=Kt(),s=Re("color"),{formItem:i}=si(),l=Jo(),a=Yr(),{inputId:u,isLabeledByFormItem:c}=Sd(o,{formItemContext:i}),d=q(),f=q(),p=q(),h=q(),m=q(),y=q(),{isFocused:v,handleFocus:k,handleBlur:b}=Aw(m,{beforeBlur(le){var Ae;return(Ae=h.value)==null?void 0:Ae.isFocusInsideContent(le)},afterBlur(){U(!1),A()}}),$=le=>{if(a.value)return ve();k(le)};let x=!0;const E=Bn(new Yf({enableAlpha:o.showAlpha,format:o.colorFormat||"",value:o.modelValue})),M=q(!1),N=q(!1),P=q(""),I=R(()=>!o.modelValue&&!N.value?"transparent":K(E,o.showAlpha)),V=R(()=>!o.modelValue&&!N.value?"":E.value),F=R(()=>c.value?void 0:o.label||r("el.colorpicker.defaultLabel")),Y=R(()=>c.value?i==null?void 0:i.labelId:void 0),Z=R(()=>[s.b("picker"),s.is("disabled",a.value),s.bm("picker",l.value),s.is("focused",v.value)]);function K(le,Ae){if(!(le instanceof Yf))throw new TypeError("color should be instance of _color Class");const{r:Ge,g:G,b:J}=le.toRgb();return Ae?`rgba(${Ge}, ${G}, ${J}, ${le.get("alpha")/100})`:`rgb(${Ge}, ${G}, ${J})`}function U(le){M.value=le}const B=jl(U,100,{leading:!0});function W(){a.value||U(!0)}function L(){B(!1),A()}function A(){ot(()=>{o.modelValue?E.fromString(o.modelValue):(E.value="",ot(()=>{N.value=!1}))})}function X(){a.value||B(!M.value)}function re(){E.fromString(P.value)}function j(){const le=E.value;n(Jt,le),n("change",le),o.validateEvent&&(i==null||i.validate("change").catch(Ae=>void 0)),B(!1),ot(()=>{const Ae=new Yf({enableAlpha:o.showAlpha,format:o.colorFormat||"",value:o.modelValue});E.compare(Ae)||A()})}function ge(){B(!1),n(Jt,null),n("change",null),o.modelValue!==null&&o.validateEvent&&(i==null||i.validate("change").catch(le=>void 0)),A()}function Oe(le){if(M.value&&(L(),v.value)){const Ae=new FocusEvent("focus",le);b(Ae)}}function xe(le){le.preventDefault(),le.stopPropagation(),U(!1),A()}function te(le){switch(le.code){case rt.enter:case rt.space:le.preventDefault(),le.stopPropagation(),W(),y.value.focus();break;case rt.esc:xe(le);break}}function fe(){m.value.focus()}function ve(){m.value.blur()}return Ct(()=>{o.modelValue&&(P.value=V.value)}),Me(()=>o.modelValue,le=>{le?le&&le!==E.value&&(x=!1,E.fromString(le)):N.value=!1}),Me(()=>V.value,le=>{P.value=le,x&&n("activeChange",le),x=!0}),Me(()=>E.value,()=>{!o.modelValue&&!N.value&&(N.value=!0)}),Me(()=>M.value,()=>{ot(()=>{var le,Ae,Ge;(le=d.value)==null||le.update(),(Ae=f.value)==null||Ae.update(),(Ge=p.value)==null||Ge.update()})}),wt(jM,{currentColor:V}),t({color:E,show:W,hide:L,focus:fe,blur:ve}),(le,Ae)=>(C(),H(g(ea),{ref_key:"popper",ref:h,visible:M.value,"show-arrow":!1,"fallback-placements":["bottom","top","right","left"],offset:0,"gpu-acceleration":!1,"popper-class":[g(s).be("picker","panel"),g(s).b("dropdown"),le.popperClass],"stop-popper-mouse-event":!1,effect:"light",trigger:"click",transition:`${g(s).namespace.value}-zoom-in-top`,persistent:"",onHide:Ae[2]||(Ae[2]=Ge=>U(!1))},{content:S(()=>[Fe((C(),T("div",{onKeydown:Mt(xe,["esc"])},[_("div",{class:D(g(s).be("dropdown","main-wrapper"))},[w(mre,{ref_key:"hue",ref:d,class:"hue-slider",color:g(E),vertical:""},null,8,["color"]),w(Mre,{ref_key:"sv",ref:f,color:g(E)},null,8,["color"])],2),le.showAlpha?(C(),H(fre,{key:0,ref_key:"alpha",ref:p,color:g(E)},null,8,["color"])):z("v-if",!0),le.predefine?(C(),H(Sre,{key:1,ref:"predefine",color:g(E),colors:le.predefine},null,8,["color","colors"])):z("v-if",!0),_("div",{class:D(g(s).be("dropdown","btns"))},[_("span",{class:D(g(s).be("dropdown","value"))},[w(g($t),{ref_key:"inputRef",ref:y,modelValue:P.value,"onUpdate:modelValue":Ae[0]||(Ae[0]=Ge=>P.value=Ge),"validate-event":!1,size:"small",onKeyup:Mt(re,["enter"]),onBlur:re},null,8,["modelValue","onKeyup"])],2),w(g(ut),{class:D(g(s).be("dropdown","link-btn")),text:"",size:"small",onClick:ge},{default:S(()=>[ne(O(g(r)("el.colorpicker.clear")),1)]),_:1},8,["class"]),w(g(ut),{plain:"",size:"small",class:D(g(s).be("dropdown","btn")),onClick:j},{default:S(()=>[ne(O(g(r)("el.colorpicker.confirm")),1)]),_:1},8,["class"])],2)],40,Ore)),[[g(id),Oe]])]),default:S(()=>[_("div",{id:g(u),ref_key:"triggerRef",ref:m,class:D(g(Z)),role:"button","aria-label":g(F),"aria-labelledby":g(Y),"aria-description":g(r)("el.colorpicker.description",{color:le.modelValue||""}),"aria-disabled":g(a),tabindex:g(a)?-1:le.tabindex,onKeydown:te,onFocus:$,onBlur:Ae[1]||(Ae[1]=(...Ge)=>g(b)&&g(b)(...Ge))},[g(a)?(C(),T("div",{key:0,class:D(g(s).be("picker","mask"))},null,2)):z("v-if",!0),_("div",{class:D(g(s).be("picker","trigger")),onClick:X},[_("span",{class:D([g(s).be("picker","color"),g(s).is("alpha",le.showAlpha)])},[_("span",{class:D(g(s).be("picker","color-inner")),style:Ye({backgroundColor:g(I)})},[Fe(w(g(Ie),{class:D([g(s).be("picker","icon"),g(s).is("icon-arrow-down")])},{default:S(()=>[w(g(Eu))]),_:1},8,["class"]),[[en,le.modelValue||N.value]]),Fe(w(g(Ie),{class:D([g(s).be("picker","empty"),g(s).is("icon-close")])},{default:S(()=>[w(g(Js))]),_:1},8,["class"]),[[en,!le.modelValue&&!N.value]])],6)],2)],2)],42,Ire)]),_:1},8,["visible","popper-class","transition"]))}});var Pre=He(Nre,[["__file","color-picker.vue"]]);const Z0=Zt(Pre),Lre=Q({name:"ElContainer"}),Rre=Q({...Lre,props:{direction:{type:String}},setup(e){const t=e,n=Kr(),o=Re("container"),r=R(()=>t.direction==="vertical"?!0:t.direction==="horizontal"?!1:n&&n.default?n.default().some(i=>{const l=i.type.name;return l==="ElHeader"||l==="ElFooter"}):!1);return(s,i)=>(C(),T("section",{class:D([g(o).b(),g(o).is("vertical",g(r))])},[he(s.$slots,"default")],2))}});var Dre=He(Rre,[["__file","container.vue"]]);const Vre=Q({name:"ElAside"}),Fre=Q({...Vre,props:{width:{type:String,default:null}},setup(e){const t=e,n=Re("aside"),o=R(()=>t.width?n.cssVarBlock({width:t.width}):{});return(r,s)=>(C(),T("aside",{class:D(g(n).b()),style:Ye(g(o))},[he(r.$slots,"default")],6))}});var HM=He(Fre,[["__file","aside.vue"]]);const Bre=Q({name:"ElFooter"}),zre=Q({...Bre,props:{height:{type:String,default:null}},setup(e){const t=e,n=Re("footer"),o=R(()=>t.height?n.cssVarBlock({height:t.height}):{});return(r,s)=>(C(),T("footer",{class:D(g(n).b()),style:Ye(g(o))},[he(r.$slots,"default")],6))}});var UM=He(zre,[["__file","footer.vue"]]);const jre=Q({name:"ElHeader"}),Hre=Q({...jre,props:{height:{type:String,default:null}},setup(e){const t=e,n=Re("header"),o=R(()=>t.height?n.cssVarBlock({height:t.height}):{});return(r,s)=>(C(),T("header",{class:D(g(n).b()),style:Ye(g(o))},[he(r.$slots,"default")],6))}});var WM=He(Hre,[["__file","header.vue"]]);const Ure=Q({name:"ElMain"}),Wre=Q({...Ure,setup(e){const t=Re("main");return(n,o)=>(C(),T("main",{class:D(g(t).b())},[he(n.$slots,"default")],2))}});var KM=He(Wre,[["__file","main.vue"]]);const Bw=Zt(Dre,{Aside:HM,Footer:UM,Header:WM,Main:KM}),J0=Jn(HM);Jn(UM);const zw=Jn(WM),Ed=Jn(KM);var qM={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(Nn,function(){return function(n,o){var r=o.prototype,s=r.format;r.format=function(i){var l=this,a=this.$locale();if(!this.isValid())return s.bind(this)(i);var u=this.$utils(),c=(i||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(d){switch(d){case"Q":return Math.ceil((l.$M+1)/3);case"Do":return a.ordinal(l.$D);case"gggg":return l.weekYear();case"GGGG":return l.isoWeekYear();case"wo":return a.ordinal(l.week(),"W");case"w":case"ww":return u.s(l.week(),d==="w"?1:2,"0");case"W":case"WW":return u.s(l.isoWeek(),d==="W"?1:2,"0");case"k":case"kk":return u.s(String(l.$H===0?24:l.$H),d==="k"?1:2,"0");case"X":return Math.floor(l.$d.getTime()/1e3);case"x":return l.$d.getTime();case"z":return"["+l.offsetName()+"]";case"zzz":return"["+l.offsetName("long")+"]";default:return d}});return s.bind(this)(c)}}})})(qM);var Kre=qM.exports;const qre=_o(Kre);var GM={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(Nn,function(){var n="week",o="year";return function(r,s,i){var l=s.prototype;l.week=function(a){if(a===void 0&&(a=null),a!==null)return this.add(7*(a-this.week()),"day");var u=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var c=i(this).startOf(o).add(1,o).date(u),d=i(this).endOf(n);if(c.isBefore(d))return 1}var f=i(this).startOf(o).date(u).startOf(n).subtract(1,"millisecond"),p=this.diff(f,n,!0);return p<0?i(this).startOf("week").week():Math.ceil(p)},l.weeks=function(a){return a===void 0&&(a=null),this.week(a)}}})})(GM);var Gre=GM.exports;const Yre=_o(Gre);var YM={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(Nn,function(){return function(n,o){o.prototype.weekYear=function(){var r=this.month(),s=this.week(),i=this.year();return s===1&&r===11?i+1:r===0&&s>=52?i-1:i}}})})(YM);var Zre=YM.exports;const Jre=_o(Zre);var ZM={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(Nn,function(){return function(n,o,r){o.prototype.dayOfYear=function(s){var i=Math.round((r(this).startOf("day")-r(this).startOf("year"))/864e5)+1;return s==null?i:this.add(s-i,"day")}}})})(ZM);var Xre=ZM.exports;const Qre=_o(Xre);var JM={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(Nn,function(){return function(n,o){o.prototype.isSameOrAfter=function(r,s){return this.isSame(r,s)||this.isAfter(r,s)}}})})(JM);var ese=JM.exports;const tse=_o(ese);var XM={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(Nn,function(){return function(n,o){o.prototype.isSameOrBefore=function(r,s){return this.isSame(r,s)||this.isBefore(r,s)}}})})(XM);var nse=XM.exports;const ose=_o(nse),jw=Symbol(),rse=Ke({..._M,type:{type:Ce(String),default:"date"}}),sse=["date","dates","year","years","month","week","range"],Hw=Ke({disabledDate:{type:Ce(Function)},date:{type:Ce(Object),required:!0},minDate:{type:Ce(Object)},maxDate:{type:Ce(Object)},parsedValue:{type:Ce([Object,Array])},rangeState:{type:Ce(Object),default:()=>({endDate:null,selecting:!1})}}),QM=Ke({type:{type:Ce(String),required:!0,values:wJ},dateFormat:String,timeFormat:String}),eO=Ke({unlinkPanels:Boolean,parsedValue:{type:Ce(Array)}}),Uw=e=>({type:String,values:sse,default:e}),ise=Ke({...QM,parsedValue:{type:Ce([Object,Array])},visible:{type:Boolean},format:{type:String,default:""}}),lse=Ke({...Hw,cellClassName:{type:Ce(Function)},showWeekNumber:Boolean,selectionMode:Uw("date")}),ase=["changerange","pick","select"],$b=e=>{if(!Te(e))return!1;const[t,n]=e;return ct.isDayjs(t)&&ct.isDayjs(n)&&t.isSameOrBefore(n)},tO=(e,{lang:t,unit:n,unlinkPanels:o})=>{let r;if(Te(e)){let[s,i]=e.map(l=>ct(l).locale(t));return o||(i=s.add(1,n)),[s,i]}else e?r=ct(e):r=ct();return r=r.locale(t),[r,r.add(1,n)]},use=(e,t,{columnIndexOffset:n,startDate:o,nextEndDate:r,now:s,unit:i,relativeDateGetter:l,setCellMetadata:a,setRowMetadata:u})=>{for(let c=0;c<e.row;c++){const d=t[c];for(let f=0;f<e.column;f++){let p=d[f+n];p||(p={row:c,column:f,type:"normal",inRange:!1,start:!1,end:!1});const h=c*e.column+f,m=l(h);p.dayjs=m,p.date=m.toDate(),p.timestamp=m.valueOf(),p.type="normal",p.inRange=!!(o&&m.isSameOrAfter(o,i)&&r&&m.isSameOrBefore(r,i))||!!(o&&m.isSameOrBefore(o,i)&&r&&m.isSameOrAfter(r,i)),o!=null&&o.isSameOrAfter(r)?(p.start=!!r&&m.isSame(r,i),p.end=o&&m.isSame(o,i)):(p.start=!!o&&m.isSame(o,i),p.end=!!r&&m.isSame(r,i)),m.isSame(s,i)&&(p.type="today"),a==null||a(p,{rowIndex:c,columnIndex:f}),d[f+n]=p}u==null||u(d)}},Eb=(e="")=>["normal","today"].includes(e),cse=(e,t)=>{const{lang:n}=Kt(),o=q(),r=q(),s=q(),i=q(),l=q([[],[],[],[],[],[]]);let a=!1;const u=e.date.$locale().weekStart||7,c=e.date.locale("en").localeData().weekdaysShort().map(L=>L.toLowerCase()),d=R(()=>u>3?7-u:-u),f=R(()=>{const L=e.date.startOf("month");return L.subtract(L.day()||7,"day")}),p=R(()=>c.concat(c).slice(u,u+7)),h=R(()=>Ax(g($)).some(L=>L.isCurrent)),m=R(()=>{const L=e.date.startOf("month"),A=L.day()||7,X=L.daysInMonth(),re=L.subtract(1,"month").daysInMonth();return{startOfMonthDay:A,dateCountOfMonth:X,dateCountOfLastMonth:re}}),y=R(()=>e.selectionMode==="dates"?rs(e.parsedValue):[]),v=(L,{count:A,rowIndex:X,columnIndex:re})=>{const{startOfMonthDay:j,dateCountOfMonth:ge,dateCountOfLastMonth:Oe}=g(m),xe=g(d);if(X>=0&&X<=1){const te=j+xe<0?7+j+xe:j+xe;if(re+X*7>=te)return L.text=A,!0;L.text=Oe-(te-re%7)+1+X*7,L.type="prev-month"}else return A<=ge?L.text=A:(L.text=A-ge,L.type="next-month"),!0;return!1},k=(L,{columnIndex:A,rowIndex:X},re)=>{const{disabledDate:j,cellClassName:ge}=e,Oe=g(y),xe=v(L,{count:re,rowIndex:X,columnIndex:A}),te=L.dayjs.toDate();return L.selected=Oe.find(fe=>fe.isSame(L.dayjs,"day")),L.isSelected=!!L.selected,L.isCurrent=E(L),L.disabled=j==null?void 0:j(te),L.customClass=ge==null?void 0:ge(te),xe},b=L=>{if(e.selectionMode==="week"){const[A,X]=e.showWeekNumber?[1,7]:[0,6],re=W(L[A+1]);L[A].inRange=re,L[A].start=re,L[X].inRange=re,L[X].end=re}},$=R(()=>{const{minDate:L,maxDate:A,rangeState:X,showWeekNumber:re}=e,j=g(d),ge=g(l),Oe="day";let xe=1;if(re)for(let te=0;te<6;te++)ge[te][0]||(ge[te][0]={type:"week",text:g(f).add(te*7+1,Oe).week()});return use({row:6,column:7},ge,{startDate:L,columnIndexOffset:re?1:0,nextEndDate:X.endDate||A||X.selecting&&L||null,now:ct().locale(g(n)).startOf(Oe),unit:Oe,relativeDateGetter:te=>g(f).add(te-j,Oe),setCellMetadata:(...te)=>{k(...te,xe)&&(xe+=1)},setRowMetadata:b}),ge});Me(()=>e.date,async()=>{var L;(L=g(o))!=null&&L.contains(document.activeElement)&&(await ot(),await x())});const x=async()=>{var L;return(L=g(r))==null?void 0:L.focus()},E=L=>e.selectionMode==="date"&&Eb(L.type)&&M(L,e.parsedValue),M=(L,A)=>A?ct(A).locale(g(n)).isSame(e.date.date(Number(L.text)),"day"):!1,N=(L,A)=>{const X=L*7+(A-(e.showWeekNumber?1:0))-g(d);return g(f).add(X,"day")},P=L=>{var A;if(!e.rangeState.selecting)return;let X=L.target;if(X.tagName==="SPAN"&&(X=(A=X.parentNode)==null?void 0:A.parentNode),X.tagName==="DIV"&&(X=X.parentNode),X.tagName!=="TD")return;const re=X.parentNode.rowIndex-1,j=X.cellIndex;g($)[re][j].disabled||(re!==g(s)||j!==g(i))&&(s.value=re,i.value=j,t("changerange",{selecting:!0,endDate:N(re,j)}))},I=L=>!g(h)&&(L==null?void 0:L.text)===1&&L.type==="normal"||L.isCurrent,V=L=>{a||g(h)||e.selectionMode!=="date"||B(L,!0)},F=L=>{L.target.closest("td")&&(a=!0)},Y=L=>{L.target.closest("td")&&(a=!1)},Z=L=>{!e.rangeState.selecting||!e.minDate?(t("pick",{minDate:L,maxDate:null}),t("select",!0)):(L>=e.minDate?t("pick",{minDate:e.minDate,maxDate:L}):t("pick",{minDate:L,maxDate:e.minDate}),t("select",!1))},K=L=>{const A=L.week(),X=`${L.year()}w${A}`;t("pick",{year:L.year(),week:A,value:X,date:L.startOf("week")})},U=(L,A)=>{const X=A?rs(e.parsedValue).filter(re=>(re==null?void 0:re.valueOf())!==L.valueOf()):rs(e.parsedValue).concat([L]);t("pick",X)},B=(L,A=!1)=>{const X=L.target.closest("td");if(!X)return;const re=X.parentNode.rowIndex-1,j=X.cellIndex,ge=g($)[re][j];if(ge.disabled||ge.type==="week")return;const Oe=N(re,j);switch(e.selectionMode){case"range":{Z(Oe);break}case"date":{t("pick",Oe,A);break}case"week":{K(Oe);break}case"dates":{U(Oe,!!ge.selected);break}}},W=L=>{if(e.selectionMode!=="week")return!1;let A=e.date.startOf("day");if(L.type==="prev-month"&&(A=A.subtract(1,"month")),L.type==="next-month"&&(A=A.add(1,"month")),A=A.date(Number.parseInt(L.text,10)),e.parsedValue&&!Array.isArray(e.parsedValue)){const X=(e.parsedValue.day()-u+7)%7-1;return e.parsedValue.subtract(X,"day").isSame(A,"day")}return!1};return{WEEKS:p,rows:$,tbodyRef:o,currentCellRef:r,focus:x,isCurrent:E,isWeekActive:W,isSelectedCell:I,handlePickDate:B,handleMouseUp:Y,handleMouseDown:F,handleMouseMove:P,handleFocus:V}},dse=(e,{isCurrent:t,isWeekActive:n})=>{const o=Re("date-table"),{t:r}=Kt(),s=R(()=>[o.b(),{"is-week-mode":e.selectionMode==="week"}]),i=R(()=>r("el.datepicker.dateTablePrompt")),l=R(()=>r("el.datepicker.week"));return{tableKls:s,tableLabel:i,weekLabel:l,getCellClasses:c=>{const d=[];return Eb(c.type)&&!c.disabled?(d.push("available"),c.type==="today"&&d.push("today")):d.push(c.type),t(c)&&d.push("current"),c.inRange&&(Eb(c.type)||e.selectionMode==="week")&&(d.push("in-range"),c.start&&d.push("start-date"),c.end&&d.push("end-date")),c.disabled&&d.push("disabled"),c.selected&&d.push("selected"),c.customClass&&d.push(c.customClass),d.join(" ")},getRowKls:c=>[o.e("row"),{current:n(c)}],t:r}},fse=Ke({cell:{type:Ce(Object)}});var pse=Q({name:"ElDatePickerCell",props:fse,setup(e){const t=Re("date-table-cell"),{slots:n}=je(jw);return()=>{const{cell:o}=e;return he(n,"default",{...o},()=>[w("div",{class:t.b()},[w("span",{class:t.e("text")},[o==null?void 0:o.text])])])}}});const hse=["aria-label"],mse={key:0,scope:"col"},gse=["aria-label"],vse=["aria-current","aria-selected","tabindex"],yse=Q({__name:"basic-date-table",props:lse,emits:ase,setup(e,{expose:t,emit:n}){const o=e,{WEEKS:r,rows:s,tbodyRef:i,currentCellRef:l,focus:a,isCurrent:u,isWeekActive:c,isSelectedCell:d,handlePickDate:f,handleMouseUp:p,handleMouseDown:h,handleMouseMove:m,handleFocus:y}=cse(o,n),{tableLabel:v,tableKls:k,weekLabel:b,getCellClasses:$,getRowKls:x,t:E}=dse(o,{isCurrent:u,isWeekActive:c});return t({focus:a}),(M,N)=>(C(),T("table",{"aria-label":g(v),class:D(g(k)),cellspacing:"0",cellpadding:"0",role:"grid",onClick:N[1]||(N[1]=(...P)=>g(f)&&g(f)(...P)),onMousemove:N[2]||(N[2]=(...P)=>g(m)&&g(m)(...P)),onMousedown:N[3]||(N[3]=Ze((...P)=>g(h)&&g(h)(...P),["prevent"])),onMouseup:N[4]||(N[4]=(...P)=>g(p)&&g(p)(...P))},[_("tbody",{ref_key:"tbodyRef",ref:i},[_("tr",null,[M.showWeekNumber?(C(),T("th",mse,O(g(b)),1)):z("v-if",!0),(C(!0),T(de,null,nt(g(r),(P,I)=>(C(),T("th",{key:I,"aria-label":g(E)("el.datepicker.weeksFull."+P),scope:"col"},O(g(E)("el.datepicker.weeks."+P)),9,gse))),128))]),(C(!0),T(de,null,nt(g(s),(P,I)=>(C(),T("tr",{key:I,class:D(g(x)(P[1]))},[(C(!0),T(de,null,nt(P,(V,F)=>(C(),T("td",{key:`${I}.${F}`,ref_for:!0,ref:Y=>g(d)(V)&&(l.value=Y),class:D(g($)(V)),"aria-current":V.isCurrent?"date":void 0,"aria-selected":V.isCurrent,tabindex:g(d)(V)?0:-1,onFocus:N[0]||(N[0]=(...Y)=>g(y)&&g(y)(...Y))},[w(g(pse),{cell:V},null,8,["cell"])],42,vse))),128))],2))),128))],512)],42,hse))}});var xb=He(yse,[["__file","basic-date-table.vue"]]);const _se=Ke({...Hw,selectionMode:Uw("month")}),bse=["aria-label"],wse=["aria-selected","aria-label","tabindex","onKeydown"],Cse={class:"cell"},kse=Q({__name:"basic-month-table",props:_se,emits:["changerange","pick","select"],setup(e,{expose:t,emit:n}){const o=e,r=($,x,E)=>{const M=ct().locale(E).startOf("month").month(x).year($),N=M.daysInMonth();return mM(N).map(P=>M.add(P,"day").toDate())},s=Re("month-table"),{t:i,lang:l}=Kt(),a=q(),u=q(),c=q(o.date.locale("en").localeData().monthsShort().map($=>$.toLowerCase())),d=q([[],[],[]]),f=q(),p=q(),h=R(()=>{var $,x;const E=d.value,M=ct().locale(l.value).startOf("month");for(let N=0;N<3;N++){const P=E[N];for(let I=0;I<4;I++){const V=P[I]||(P[I]={row:N,column:I,type:"normal",inRange:!1,start:!1,end:!1,text:-1,disabled:!1});V.type="normal";const F=N*4+I,Y=o.date.startOf("year").month(F),Z=o.rangeState.endDate||o.maxDate||o.rangeState.selecting&&o.minDate||null;V.inRange=!!(o.minDate&&Y.isSameOrAfter(o.minDate,"month")&&Z&&Y.isSameOrBefore(Z,"month"))||!!(o.minDate&&Y.isSameOrBefore(o.minDate,"month")&&Z&&Y.isSameOrAfter(Z,"month")),($=o.minDate)!=null&&$.isSameOrAfter(Z)?(V.start=!!(Z&&Y.isSame(Z,"month")),V.end=o.minDate&&Y.isSame(o.minDate,"month")):(V.start=!!(o.minDate&&Y.isSame(o.minDate,"month")),V.end=!!(Z&&Y.isSame(Z,"month"))),M.isSame(Y)&&(V.type="today"),V.text=F,V.disabled=((x=o.disabledDate)==null?void 0:x.call(o,Y.toDate()))||!1}}return E}),m=()=>{var $;($=u.value)==null||$.focus()},y=$=>{const x={},E=o.date.year(),M=new Date,N=$.text;return x.disabled=o.disabledDate?r(E,N,l.value).every(o.disabledDate):!1,x.current=rs(o.parsedValue).findIndex(P=>ct.isDayjs(P)&&P.year()===E&&P.month()===N)>=0,x.today=M.getFullYear()===E&&M.getMonth()===N,$.inRange&&(x["in-range"]=!0,$.start&&(x["start-date"]=!0),$.end&&(x["end-date"]=!0)),x},v=$=>{const x=o.date.year(),E=$.text;return rs(o.date).findIndex(M=>M.year()===x&&M.month()===E)>=0},k=$=>{var x;if(!o.rangeState.selecting)return;let E=$.target;if(E.tagName==="SPAN"&&(E=(x=E.parentNode)==null?void 0:x.parentNode),E.tagName==="DIV"&&(E=E.parentNode),E.tagName!=="TD")return;const M=E.parentNode.rowIndex,N=E.cellIndex;h.value[M][N].disabled||(M!==f.value||N!==p.value)&&(f.value=M,p.value=N,n("changerange",{selecting:!0,endDate:o.date.startOf("year").month(M*4+N)}))},b=$=>{var x;const E=(x=$.target)==null?void 0:x.closest("td");if((E==null?void 0:E.tagName)!=="TD"||Oi(E,"disabled"))return;const M=E.cellIndex,P=E.parentNode.rowIndex*4+M,I=o.date.startOf("year").month(P);o.selectionMode==="range"?o.rangeState.selecting?(o.minDate&&I>=o.minDate?n("pick",{minDate:o.minDate,maxDate:I}):n("pick",{minDate:I,maxDate:o.minDate}),n("select",!1)):(n("pick",{minDate:I,maxDate:null}),n("select",!0)):n("pick",P)};return Me(()=>o.date,async()=>{var $,x;($=a.value)!=null&&$.contains(document.activeElement)&&(await ot(),(x=u.value)==null||x.focus())}),t({focus:m}),($,x)=>(C(),T("table",{role:"grid","aria-label":g(i)("el.datepicker.monthTablePrompt"),class:D(g(s).b()),onClick:b,onMousemove:k},[_("tbody",{ref_key:"tbodyRef",ref:a},[(C(!0),T(de,null,nt(g(h),(E,M)=>(C(),T("tr",{key:M},[(C(!0),T(de,null,nt(E,(N,P)=>(C(),T("td",{key:P,ref_for:!0,ref:I=>v(N)&&(u.value=I),class:D(y(N)),"aria-selected":`${v(N)}`,"aria-label":g(i)(`el.datepicker.month${+N.text+1}`),tabindex:v(N)?0:-1,onKeydown:[Mt(Ze(b,["prevent","stop"]),["space"]),Mt(Ze(b,["prevent","stop"]),["enter"])]},[_("div",null,[_("span",Cse,O(g(i)("el.datepicker.months."+c.value[N.text])),1)])],42,wse))),128))]))),128))],512)],42,bse))}});var Tb=He(kse,[["__file","basic-month-table.vue"]]);const{date:Sse,disabledDate:$se,parsedValue:Ese}=Hw,xse=Ke({date:Sse,disabledDate:$se,parsedValue:Ese,selectionMode:Uw("year")}),Tse=["aria-label"],Mse=["aria-selected","tabindex","onKeydown"],Ose={class:"cell"},Ise={key:1},Ase=Q({__name:"basic-year-table",props:xse,emits:["pick"],setup(e,{expose:t,emit:n}){const o=e,r=(m,y)=>{const v=ct(String(m)).locale(y).startOf("year"),b=v.endOf("year").dayOfYear();return mM(b).map($=>v.add($,"day").toDate())},s=Re("year-table"),{t:i,lang:l}=Kt(),a=q(),u=q(),c=R(()=>Math.floor(o.date.year()/10)*10),d=()=>{var m;(m=u.value)==null||m.focus()},f=m=>{const y={},v=ct().locale(l.value);return y.disabled=o.disabledDate?r(m,l.value).every(o.disabledDate):!1,y.current=rs(o.parsedValue).findIndex(k=>k.year()===m)>=0,y.today=v.year()===m,y},p=m=>m===c.value&&o.date.year()<c.value&&o.date.year()>c.value+9||rs(o.date).findIndex(y=>y.year()===m)>=0||rs(o.parsedValue).findIndex(y=>(y==null?void 0:y.year())===m)>=0,h=m=>{const v=m.target.closest("td");if(v&&v.textContent){if(Oi(v,"disabled"))return;const k=v.textContent||v.innerText;if(o.selectionMode==="years"){if(m.type==="keydown"){n("pick",rs(o.parsedValue),!1);return}const b=Oi(v,"current")?rs(o.parsedValue).filter($=>($==null?void 0:$.year())!==Number(k)):rs(o.parsedValue).concat([ct(k)]);n("pick",b)}else n("pick",Number(k))}};return Me(()=>o.date,async()=>{var m,y;(m=a.value)!=null&&m.contains(document.activeElement)&&(await ot(),(y=u.value)==null||y.focus())}),t({focus:d}),(m,y)=>(C(),T("table",{role:"grid","aria-label":g(i)("el.datepicker.yearTablePrompt"),class:D(g(s).b()),onClick:h},[_("tbody",{ref_key:"tbodyRef",ref:a},[(C(),T(de,null,nt(3,(v,k)=>_("tr",{key:k},[(C(),T(de,null,nt(4,(b,$)=>(C(),T(de,{key:k+"_"+$},[k*4+$<10?(C(),T("td",{key:0,ref_for:!0,ref:x=>p(g(c)+k*4+$)&&(u.value=x),class:D(["available",f(g(c)+k*4+$)]),"aria-selected":`${p(g(c)+k*4+$)}`,tabindex:p(g(c)+k*4+$)?0:-1,onKeydown:[Mt(Ze(h,["prevent","stop"]),["space"]),Mt(Ze(h,["prevent","stop"]),["enter"])]},[_("div",null,[_("span",Ose,O(g(c)+k*4+$),1)])],42,Mse)):(C(),T("td",Ise))],64))),64))])),64))],512)],10,Tse))}});var Nse=He(Ase,[["__file","basic-year-table.vue"]]);const Pse=["onClick"],Lse=["aria-label"],Rse=["aria-label"],Dse=["aria-label"],Vse=["aria-label"],Fse=Q({__name:"panel-date-pick",props:ise,emits:["pick","set-picker-option","panel-change"],setup(e,{emit:t}){const n=e,o=(ie,we,ae)=>!0,r=Re("picker-panel"),s=Re("date-picker"),i=_d(),l=Kr(),{t:a,lang:u}=Kt(),c=je("EP_PICKER_BASE"),d=je(G0),{shortcuts:f,disabledDate:p,cellClassName:h,defaultTime:m}=c.props,y=pn(c.props,"defaultValue"),v=q(),k=q(ct().locale(u.value)),b=q(!1);let $=!1;const x=R(()=>ct(m).locale(u.value)),E=R(()=>k.value.month()),M=R(()=>k.value.year()),N=q([]),P=q(null),I=q(null),V=ie=>N.value.length>0?o(ie,N.value,n.format||"HH:mm:ss"):!0,F=ie=>m&&!J.value&&!b.value&&!$?x.value.year(ie.year()).month(ie.month()).date(ie.date()):xe.value?ie.millisecond(0):ie.startOf("day"),Y=(ie,...we)=>{if(!ie)t("pick",ie,...we);else if(Te(ie)){const ae=ie.map(F);t("pick",ae,...we)}else t("pick",F(ie),...we);P.value=null,I.value=null,b.value=!1,$=!1},Z=async(ie,we)=>{if(A.value==="date"){ie=ie;let ae=n.parsedValue?n.parsedValue.year(ie.year()).month(ie.month()).date(ie.date()):ie;V(ae)||(ae=N.value[0][0].year(ie.year()).month(ie.month()).date(ie.date())),k.value=ae,Y(ae,xe.value||we),n.type==="datetime"&&(await ot(),pe())}else A.value==="week"?Y(ie.date):A.value==="dates"&&Y(ie,!0)},K=ie=>{const we=ie?"add":"subtract";k.value=k.value[we](1,"month"),$e("month")},U=ie=>{const we=k.value,ae=ie?"add":"subtract";k.value=B.value==="year"?we[ae](10,"year"):we[ae](1,"year"),$e("year")},B=q("date"),W=R(()=>{const ie=a("el.datepicker.year");if(B.value==="year"){const we=Math.floor(M.value/10)*10;return ie?`${we} ${ie} - ${we+9} ${ie}`:`${we} - ${we+9}`}return`${M.value} ${ie}`}),L=ie=>{const we=et(ie.value)?ie.value():ie.value;if(we){$=!0,Y(ct(we).locale(u.value));return}ie.onClick&&ie.onClick({attrs:i,slots:l,emit:t})},A=R(()=>{const{type:ie}=n;return["week","month","year","years","dates"].includes(ie)?ie:"date"}),X=R(()=>A.value==="date"?B.value:A.value),re=R(()=>!!f.length),j=async ie=>{k.value=k.value.startOf("month").month(ie),A.value==="month"?Y(k.value,!1):(B.value="date",["month","year","date","week"].includes(A.value)&&(Y(k.value,!0),await ot(),pe())),$e("month")},ge=async(ie,we)=>{A.value==="year"?(k.value=k.value.startOf("year").year(ie),Y(k.value,!1)):A.value==="years"?Y(ie,we??!0):(k.value=k.value.year(ie),B.value="month",["month","year","date","week"].includes(A.value)&&(Y(k.value,!0),await ot(),pe())),$e("year")},Oe=async ie=>{B.value=ie,await ot(),pe()},xe=R(()=>n.type==="datetime"||n.type==="datetimerange"),te=R(()=>{const ie=xe.value||A.value==="dates",we=A.value==="years",ae=B.value==="date",Se=B.value==="year";return ie&&ae||we&&Se}),fe=R(()=>p?n.parsedValue?Te(n.parsedValue)?p(n.parsedValue[0].toDate()):p(n.parsedValue.toDate()):!0:!1),ve=()=>{if(A.value==="dates"||A.value==="years")Y(n.parsedValue);else{let ie=n.parsedValue;if(!ie){const we=ct(m).locale(u.value),ae=oe();ie=we.year(ae.year()).month(ae.month()).date(ae.date())}k.value=ie,Y(ie)}},le=R(()=>p?p(ct().locale(u.value).toDate()):!1),Ae=()=>{const we=ct().locale(u.value).toDate();b.value=!0,(!p||!p(we))&&V(we)&&(k.value=ct().locale(u.value),Y(k.value))},Ge=R(()=>n.timeFormat||vM(n.format)),G=R(()=>n.dateFormat||gM(n.format)),J=R(()=>{if(I.value)return I.value;if(!(!n.parsedValue&&!y.value))return(n.parsedValue||k.value).format(Ge.value)}),ue=R(()=>{if(P.value)return P.value;if(!(!n.parsedValue&&!y.value))return(n.parsedValue||k.value).format(G.value)}),_e=q(!1),ye=()=>{_e.value=!0},Ne=()=>{_e.value=!1},Le=ie=>({hour:ie.hour(),minute:ie.minute(),second:ie.second(),year:ie.year(),month:ie.month(),date:ie.date()}),Ee=(ie,we,ae)=>{const{hour:Se,minute:Ve,second:st}=Le(ie),se=n.parsedValue?n.parsedValue.hour(Se).minute(Ve).second(st):ie;k.value=se,Y(k.value,!0),ae||(_e.value=we)},Pe=ie=>{const we=ct(ie,Ge.value).locale(u.value);if(we.isValid()&&V(we)){const{year:ae,month:Se,date:Ve}=Le(k.value);k.value=we.year(ae).month(Se).date(Ve),I.value=null,_e.value=!1,Y(k.value,!0)}},me=ie=>{const we=ct(ie,G.value).locale(u.value);if(we.isValid()){if(p&&p(we.toDate()))return;const{hour:ae,minute:Se,second:Ve}=Le(k.value);k.value=we.hour(ae).minute(Se).second(Ve),P.value=null,Y(k.value,!0)}},Ue=ie=>ct.isDayjs(ie)&&ie.isValid()&&(p?!p(ie.toDate()):!0),Xe=ie=>Te(ie)?ie.map(we=>we.format(n.format)):ie.format(n.format),ce=ie=>ct(ie,n.format).locale(u.value),oe=()=>{const ie=ct(y.value).locale(u.value);if(!y.value){const we=x.value;return ct().hour(we.hour()).minute(we.minute()).second(we.second()).locale(u.value)}return ie},pe=async()=>{var ie;["week","month","year","date"].includes(A.value)&&((ie=v.value)==null||ie.focus(),A.value==="week"&&Qe(rt.down))},ze=ie=>{const{code:we}=ie;[rt.up,rt.down,rt.left,rt.right,rt.home,rt.end,rt.pageUp,rt.pageDown].includes(we)&&(Qe(we),ie.stopPropagation(),ie.preventDefault()),[rt.enter,rt.space,rt.numpadEnter].includes(we)&&P.value===null&&I.value===null&&(ie.preventDefault(),Y(k.value,!1))},Qe=ie=>{var we;const{up:ae,down:Se,left:Ve,right:st,home:se,end:De,pageUp:At,pageDown:mn}=rt,qn={year:{[ae]:-4,[Se]:4,[Ve]:-1,[st]:1,offset:(qt,nr)=>qt.setFullYear(qt.getFullYear()+nr)},month:{[ae]:-4,[Se]:4,[Ve]:-1,[st]:1,offset:(qt,nr)=>qt.setMonth(qt.getMonth()+nr)},week:{[ae]:-1,[Se]:1,[Ve]:-1,[st]:1,offset:(qt,nr)=>qt.setDate(qt.getDate()+nr*7)},date:{[ae]:-7,[Se]:7,[Ve]:-1,[st]:1,[se]:qt=>-qt.getDay(),[De]:qt=>-qt.getDay()+6,[At]:qt=>-new Date(qt.getFullYear(),qt.getMonth(),0).getDate(),[mn]:qt=>new Date(qt.getFullYear(),qt.getMonth()+1,0).getDate(),offset:(qt,nr)=>qt.setDate(qt.getDate()+nr)}},Jr=k.value.toDate();for(;Math.abs(k.value.diff(Jr,"year",!0))<1;){const qt=qn[X.value];if(!qt)return;if(qt.offset(Jr,et(qt[ie])?qt[ie](Jr):(we=qt[ie])!=null?we:0),p&&p(Jr))break;const nr=ct(Jr).locale(u.value);k.value=nr,t("pick",nr,!0);break}},$e=ie=>{t("panel-change",k.value.toDate(),ie,B.value)};return Me(()=>A.value,ie=>{if(["month","year"].includes(ie)){B.value=ie;return}else if(ie==="years"){B.value="year";return}B.value="date"},{immediate:!0}),Me(()=>B.value,()=>{d==null||d.updatePopper()}),Me(()=>y.value,ie=>{ie&&(k.value=oe())},{immediate:!0}),Me(()=>n.parsedValue,ie=>{if(ie){if(A.value==="dates"||A.value==="years"||Array.isArray(ie))return;k.value=ie}else k.value=oe()},{immediate:!0}),t("set-picker-option",["isValidValue",Ue]),t("set-picker-option",["formatToString",Xe]),t("set-picker-option",["parseUserInput",ce]),t("set-picker-option",["handleFocusPicker",pe]),(ie,we)=>(C(),T("div",{class:D([g(r).b(),g(s).b(),{"has-sidebar":ie.$slots.sidebar||g(re),"has-time":g(xe)}])},[_("div",{class:D(g(r).e("body-wrapper"))},[he(ie.$slots,"sidebar",{class:D(g(r).e("sidebar"))}),g(re)?(C(),T("div",{key:0,class:D(g(r).e("sidebar"))},[(C(!0),T(de,null,nt(g(f),(ae,Se)=>(C(),T("button",{key:Se,type:"button",class:D(g(r).e("shortcut")),onClick:Ve=>L(ae)},O(ae.text),11,Pse))),128))],2)):z("v-if",!0),_("div",{class:D(g(r).e("body"))},[g(xe)?(C(),T("div",{key:0,class:D(g(s).e("time-header"))},[_("span",{class:D(g(s).e("editor-wrap"))},[w(g($t),{placeholder:g(a)("el.datepicker.selectDate"),"model-value":g(ue),size:"small","validate-event":!1,onInput:we[0]||(we[0]=ae=>P.value=ae),onChange:me},null,8,["placeholder","model-value"])],2),Fe((C(),T("span",{class:D(g(s).e("editor-wrap"))},[w(g($t),{placeholder:g(a)("el.datepicker.selectTime"),"model-value":g(J),size:"small","validate-event":!1,onFocus:ye,onInput:we[1]||(we[1]=ae=>I.value=ae),onChange:Pe},null,8,["placeholder","model-value"]),w(g(Sb),{visible:_e.value,format:g(Ge),"parsed-value":k.value,onPick:Ee},null,8,["visible","format","parsed-value"])],2)),[[g(id),Ne]])],2)):z("v-if",!0),Fe(_("div",{class:D([g(s).e("header"),(B.value==="year"||B.value==="month")&&g(s).e("header--bordered")])},[_("span",{class:D(g(s).e("prev-btn"))},[_("button",{type:"button","aria-label":g(a)("el.datepicker.prevYear"),class:D(["d-arrow-left",g(r).e("icon-btn")]),onClick:we[2]||(we[2]=ae=>U(!1))},[w(g(Ie),null,{default:S(()=>[w(g(Jc))]),_:1})],10,Lse),Fe(_("button",{type:"button","aria-label":g(a)("el.datepicker.prevMonth"),class:D([g(r).e("icon-btn"),"arrow-left"]),onClick:we[3]||(we[3]=ae=>K(!1))},[w(g(Ie),null,{default:S(()=>[w(g(cu))]),_:1})],10,Rse),[[en,B.value==="date"]])],2),_("span",{role:"button",class:D(g(s).e("header-label")),"aria-live":"polite",tabindex:"0",onKeydown:we[4]||(we[4]=Mt(ae=>Oe("year"),["enter"])),onClick:we[5]||(we[5]=ae=>Oe("year"))},O(g(W)),35),Fe(_("span",{role:"button","aria-live":"polite",tabindex:"0",class:D([g(s).e("header-label"),{active:B.value==="month"}]),onKeydown:we[6]||(we[6]=Mt(ae=>Oe("month"),["enter"])),onClick:we[7]||(we[7]=ae=>Oe("month"))},O(g(a)(`el.datepicker.month${g(E)+1}`)),35),[[en,B.value==="date"]]),_("span",{class:D(g(s).e("next-btn"))},[Fe(_("button",{type:"button","aria-label":g(a)("el.datepicker.nextMonth"),class:D([g(r).e("icon-btn"),"arrow-right"]),onClick:we[8]||(we[8]=ae=>K(!0))},[w(g(Ie),null,{default:S(()=>[w(g(Ws))]),_:1})],10,Dse),[[en,B.value==="date"]]),_("button",{type:"button","aria-label":g(a)("el.datepicker.nextYear"),class:D([g(r).e("icon-btn"),"d-arrow-right"]),onClick:we[9]||(we[9]=ae=>U(!0))},[w(g(Ie),null,{default:S(()=>[w(g(Xc))]),_:1})],10,Vse)],2)],2),[[en,B.value!=="time"]]),_("div",{class:D(g(r).e("content")),onKeydown:ze},[B.value==="date"?(C(),H(xb,{key:0,ref_key:"currentViewRef",ref:v,"selection-mode":g(A),date:k.value,"parsed-value":ie.parsedValue,"disabled-date":g(p),"cell-class-name":g(h),onPick:Z},null,8,["selection-mode","date","parsed-value","disabled-date","cell-class-name"])):z("v-if",!0),B.value==="year"?(C(),H(Nse,{key:1,ref_key:"currentViewRef",ref:v,"selection-mode":g(A),date:k.value,"disabled-date":g(p),"parsed-value":ie.parsedValue,onPick:ge},null,8,["selection-mode","date","disabled-date","parsed-value"])):z("v-if",!0),B.value==="month"?(C(),H(Tb,{key:2,ref_key:"currentViewRef",ref:v,date:k.value,"parsed-value":ie.parsedValue,"disabled-date":g(p),onPick:j},null,8,["date","parsed-value","disabled-date"])):z("v-if",!0)],34)],2)],2),Fe(_("div",{class:D(g(r).e("footer"))},[Fe(w(g(ut),{text:"",size:"small",class:D(g(r).e("link-btn")),disabled:g(le),onClick:Ae},{default:S(()=>[ne(O(g(a)("el.datepicker.now")),1)]),_:1},8,["class","disabled"]),[[en,g(A)!=="dates"&&g(A)!=="years"]]),w(g(ut),{plain:"",size:"small",class:D(g(r).e("link-btn")),disabled:g(fe),onClick:ve},{default:S(()=>[ne(O(g(a)("el.datepicker.confirm")),1)]),_:1},8,["class","disabled"])],2),[[en,g(te)]])],2))}});var Bse=He(Fse,[["__file","panel-date-pick.vue"]]);const zse=Ke({...QM,...eO}),jse=e=>{const{emit:t}=at(),n=_d(),o=Kr();return s=>{const i=et(s.value)?s.value():s.value;if(i){t("pick",[ct(i[0]).locale(e.value),ct(i[1]).locale(e.value)]);return}s.onClick&&s.onClick({attrs:n,slots:o,emit:t})}},nO=(e,{defaultValue:t,leftDate:n,rightDate:o,unit:r,onParsedValueChanged:s})=>{const{emit:i}=at(),{pickerNs:l}=je(jw),a=Re("date-range-picker"),{t:u,lang:c}=Kt(),d=jse(c),f=q(),p=q(),h=q({endDate:null,selecting:!1}),m=b=>{h.value=b},y=(b=!1)=>{const $=g(f),x=g(p);$b([$,x])&&i("pick",[$,x],b)},v=b=>{h.value.selecting=b,b||(h.value.endDate=null)},k=()=>{const[b,$]=tO(g(t),{lang:g(c),unit:r,unlinkPanels:e.unlinkPanels});f.value=void 0,p.value=void 0,n.value=b,o.value=$};return Me(t,b=>{b&&k()},{immediate:!0}),Me(()=>e.parsedValue,b=>{if(Te(b)&&b.length===2){const[$,x]=b;f.value=$,n.value=$,p.value=x,s(g(f),g(p))}else k()},{immediate:!0}),{minDate:f,maxDate:p,rangeState:h,lang:c,ppNs:l,drpNs:a,handleChangeRange:m,handleRangeConfirm:y,handleShortcutClick:d,onSelect:v,t:u}},Hse=["onClick"],Use=["aria-label"],Wse=["aria-label"],Kse=["disabled","aria-label"],qse=["disabled","aria-label"],Gse=["disabled","aria-label"],Yse=["disabled","aria-label"],Zse=["aria-label"],Jse=["aria-label"],bm="month",Xse=Q({__name:"panel-date-range",props:zse,emits:["pick","set-picker-option","calendar-change","panel-change"],setup(e,{emit:t}){const n=e,o=je("EP_PICKER_BASE"),{disabledDate:r,cellClassName:s,format:i,defaultTime:l,clearable:a}=o.props,u=pn(o.props,"shortcuts"),c=pn(o.props,"defaultValue"),{lang:d}=Kt(),f=q(ct().locale(d.value)),p=q(ct().locale(d.value).add(1,bm)),{minDate:h,maxDate:m,rangeState:y,ppNs:v,drpNs:k,handleChangeRange:b,handleRangeConfirm:$,handleShortcutClick:x,onSelect:E,t:M}=nO(n,{defaultValue:c,leftDate:f,rightDate:p,unit:bm,onParsedValueChanged:we}),N=q({min:null,max:null}),P=q({min:null,max:null}),I=R(()=>`${f.value.year()} ${M("el.datepicker.year")} ${M(`el.datepicker.month${f.value.month()+1}`)}`),V=R(()=>`${p.value.year()} ${M("el.datepicker.year")} ${M(`el.datepicker.month${p.value.month()+1}`)}`),F=R(()=>f.value.year()),Y=R(()=>f.value.month()),Z=R(()=>p.value.year()),K=R(()=>p.value.month()),U=R(()=>!!u.value.length),B=R(()=>N.value.min!==null?N.value.min:h.value?h.value.format(re.value):""),W=R(()=>N.value.max!==null?N.value.max:m.value||h.value?(m.value||h.value).format(re.value):""),L=R(()=>P.value.min!==null?P.value.min:h.value?h.value.format(X.value):""),A=R(()=>P.value.max!==null?P.value.max:m.value||h.value?(m.value||h.value).format(X.value):""),X=R(()=>n.timeFormat||vM(i)),re=R(()=>n.dateFormat||gM(i)),j=ae=>$b(ae)&&(r?!r(ae[0].toDate())&&!r(ae[1].toDate()):!0),ge=()=>{f.value=f.value.subtract(1,"year"),n.unlinkPanels||(p.value=f.value.add(1,"month")),Ge("year")},Oe=()=>{f.value=f.value.subtract(1,"month"),n.unlinkPanels||(p.value=f.value.add(1,"month")),Ge("month")},xe=()=>{n.unlinkPanels?p.value=p.value.add(1,"year"):(f.value=f.value.add(1,"year"),p.value=f.value.add(1,"month")),Ge("year")},te=()=>{n.unlinkPanels?p.value=p.value.add(1,"month"):(f.value=f.value.add(1,"month"),p.value=f.value.add(1,"month")),Ge("month")},fe=()=>{f.value=f.value.add(1,"year"),Ge("year")},ve=()=>{f.value=f.value.add(1,"month"),Ge("month")},le=()=>{p.value=p.value.subtract(1,"year"),Ge("year")},Ae=()=>{p.value=p.value.subtract(1,"month"),Ge("month")},Ge=ae=>{t("panel-change",[f.value.toDate(),p.value.toDate()],ae)},G=R(()=>{const ae=(Y.value+1)%12,Se=Y.value+1>=12?1:0;return n.unlinkPanels&&new Date(F.value+Se,ae)<new Date(Z.value,K.value)}),J=R(()=>n.unlinkPanels&&Z.value*12+K.value-(F.value*12+Y.value+1)>=12),ue=R(()=>!(h.value&&m.value&&!y.value.selecting&&$b([h.value,m.value]))),_e=R(()=>n.type==="datetime"||n.type==="datetimerange"),ye=(ae,Se)=>{if(ae)return l?ct(l[Se]||l).locale(d.value).year(ae.year()).month(ae.month()).date(ae.date()):ae},Ne=(ae,Se=!0)=>{const Ve=ae.minDate,st=ae.maxDate,se=ye(Ve,0),De=ye(st,1);m.value===De&&h.value===se||(t("calendar-change",[Ve.toDate(),st&&st.toDate()]),m.value=De,h.value=se,!(!Se||_e.value)&&$())},Le=q(!1),Ee=q(!1),Pe=()=>{Le.value=!1},me=()=>{Ee.value=!1},Ue=(ae,Se)=>{N.value[Se]=ae;const Ve=ct(ae,re.value).locale(d.value);if(Ve.isValid()){if(r&&r(Ve.toDate()))return;Se==="min"?(f.value=Ve,h.value=(h.value||f.value).year(Ve.year()).month(Ve.month()).date(Ve.date()),!n.unlinkPanels&&(!m.value||m.value.isBefore(h.value))&&(p.value=Ve.add(1,"month"),m.value=h.value.add(1,"month"))):(p.value=Ve,m.value=(m.value||p.value).year(Ve.year()).month(Ve.month()).date(Ve.date()),!n.unlinkPanels&&(!h.value||h.value.isAfter(m.value))&&(f.value=Ve.subtract(1,"month"),h.value=m.value.subtract(1,"month")))}},Xe=(ae,Se)=>{N.value[Se]=null},ce=(ae,Se)=>{P.value[Se]=ae;const Ve=ct(ae,X.value).locale(d.value);Ve.isValid()&&(Se==="min"?(Le.value=!0,h.value=(h.value||f.value).hour(Ve.hour()).minute(Ve.minute()).second(Ve.second()),(!m.value||m.value.isBefore(h.value))&&(m.value=h.value)):(Ee.value=!0,m.value=(m.value||p.value).hour(Ve.hour()).minute(Ve.minute()).second(Ve.second()),p.value=m.value,m.value&&m.value.isBefore(h.value)&&(h.value=m.value)))},oe=(ae,Se)=>{P.value[Se]=null,Se==="min"?(f.value=h.value,Le.value=!1):(p.value=m.value,Ee.value=!1)},pe=(ae,Se,Ve)=>{P.value.min||(ae&&(f.value=ae,h.value=(h.value||f.value).hour(ae.hour()).minute(ae.minute()).second(ae.second())),Ve||(Le.value=Se),(!m.value||m.value.isBefore(h.value))&&(m.value=h.value,p.value=ae))},ze=(ae,Se,Ve)=>{P.value.max||(ae&&(p.value=ae,m.value=(m.value||p.value).hour(ae.hour()).minute(ae.minute()).second(ae.second())),Ve||(Ee.value=Se),m.value&&m.value.isBefore(h.value)&&(h.value=m.value))},Qe=()=>{f.value=tO(g(c),{lang:g(d),unit:"month",unlinkPanels:n.unlinkPanels})[0],p.value=f.value.add(1,"month"),m.value=void 0,h.value=void 0,t("pick",null)},$e=ae=>Te(ae)?ae.map(Se=>Se.format(i)):ae.format(i),ie=ae=>Te(ae)?ae.map(Se=>ct(Se,i).locale(d.value)):ct(ae,i).locale(d.value);function we(ae,Se){if(n.unlinkPanels&&Se){const Ve=(ae==null?void 0:ae.year())||0,st=(ae==null?void 0:ae.month())||0,se=Se.year(),De=Se.month();p.value=Ve===se&&st===De?Se.add(1,bm):Se}else p.value=f.value.add(1,bm),Se&&(p.value=p.value.hour(Se.hour()).minute(Se.minute()).second(Se.second()))}return t("set-picker-option",["isValidValue",j]),t("set-picker-option",["parseUserInput",ie]),t("set-picker-option",["formatToString",$e]),t("set-picker-option",["handleClear",Qe]),(ae,Se)=>(C(),T("div",{class:D([g(v).b(),g(k).b(),{"has-sidebar":ae.$slots.sidebar||g(U),"has-time":g(_e)}])},[_("div",{class:D(g(v).e("body-wrapper"))},[he(ae.$slots,"sidebar",{class:D(g(v).e("sidebar"))}),g(U)?(C(),T("div",{key:0,class:D(g(v).e("sidebar"))},[(C(!0),T(de,null,nt(g(u),(Ve,st)=>(C(),T("button",{key:st,type:"button",class:D(g(v).e("shortcut")),onClick:se=>g(x)(Ve)},O(Ve.text),11,Hse))),128))],2)):z("v-if",!0),_("div",{class:D(g(v).e("body"))},[g(_e)?(C(),T("div",{key:0,class:D(g(k).e("time-header"))},[_("span",{class:D(g(k).e("editors-wrap"))},[_("span",{class:D(g(k).e("time-picker-wrap"))},[w(g($t),{size:"small",disabled:g(y).selecting,placeholder:g(M)("el.datepicker.startDate"),class:D(g(k).e("editor")),"model-value":g(B),"validate-event":!1,onInput:Se[0]||(Se[0]=Ve=>Ue(Ve,"min")),onChange:Se[1]||(Se[1]=Ve=>Xe(Ve,"min"))},null,8,["disabled","placeholder","class","model-value"])],2),Fe((C(),T("span",{class:D(g(k).e("time-picker-wrap"))},[w(g($t),{size:"small",class:D(g(k).e("editor")),disabled:g(y).selecting,placeholder:g(M)("el.datepicker.startTime"),"model-value":g(L),"validate-event":!1,onFocus:Se[2]||(Se[2]=Ve=>Le.value=!0),onInput:Se[3]||(Se[3]=Ve=>ce(Ve,"min")),onChange:Se[4]||(Se[4]=Ve=>oe(Ve,"min"))},null,8,["class","disabled","placeholder","model-value"]),w(g(Sb),{visible:Le.value,format:g(X),"datetime-role":"start","parsed-value":f.value,onPick:pe},null,8,["visible","format","parsed-value"])],2)),[[g(id),Pe]])],2),_("span",null,[w(g(Ie),null,{default:S(()=>[w(g(Ws))]),_:1})]),_("span",{class:D([g(k).e("editors-wrap"),"is-right"])},[_("span",{class:D(g(k).e("time-picker-wrap"))},[w(g($t),{size:"small",class:D(g(k).e("editor")),disabled:g(y).selecting,placeholder:g(M)("el.datepicker.endDate"),"model-value":g(W),readonly:!g(h),"validate-event":!1,onInput:Se[5]||(Se[5]=Ve=>Ue(Ve,"max")),onChange:Se[6]||(Se[6]=Ve=>Xe(Ve,"max"))},null,8,["class","disabled","placeholder","model-value","readonly"])],2),Fe((C(),T("span",{class:D(g(k).e("time-picker-wrap"))},[w(g($t),{size:"small",class:D(g(k).e("editor")),disabled:g(y).selecting,placeholder:g(M)("el.datepicker.endTime"),"model-value":g(A),readonly:!g(h),"validate-event":!1,onFocus:Se[7]||(Se[7]=Ve=>g(h)&&(Ee.value=!0)),onInput:Se[8]||(Se[8]=Ve=>ce(Ve,"max")),onChange:Se[9]||(Se[9]=Ve=>oe(Ve,"max"))},null,8,["class","disabled","placeholder","model-value","readonly"]),w(g(Sb),{"datetime-role":"end",visible:Ee.value,format:g(X),"parsed-value":p.value,onPick:ze},null,8,["visible","format","parsed-value"])],2)),[[g(id),me]])],2)],2)):z("v-if",!0),_("div",{class:D([[g(v).e("content"),g(k).e("content")],"is-left"])},[_("div",{class:D(g(k).e("header"))},[_("button",{type:"button",class:D([g(v).e("icon-btn"),"d-arrow-left"]),"aria-label":g(M)("el.datepicker.prevYear"),onClick:ge},[w(g(Ie),null,{default:S(()=>[w(g(Jc))]),_:1})],10,Use),_("button",{type:"button",class:D([g(v).e("icon-btn"),"arrow-left"]),"aria-label":g(M)("el.datepicker.prevMonth"),onClick:Oe},[w(g(Ie),null,{default:S(()=>[w(g(cu))]),_:1})],10,Wse),ae.unlinkPanels?(C(),T("button",{key:0,type:"button",disabled:!g(J),class:D([[g(v).e("icon-btn"),{"is-disabled":!g(J)}],"d-arrow-right"]),"aria-label":g(M)("el.datepicker.nextYear"),onClick:fe},[w(g(Ie),null,{default:S(()=>[w(g(Xc))]),_:1})],10,Kse)):z("v-if",!0),ae.unlinkPanels?(C(),T("button",{key:1,type:"button",disabled:!g(G),class:D([[g(v).e("icon-btn"),{"is-disabled":!g(G)}],"arrow-right"]),"aria-label":g(M)("el.datepicker.nextMonth"),onClick:ve},[w(g(Ie),null,{default:S(()=>[w(g(Ws))]),_:1})],10,qse)):z("v-if",!0),_("div",null,O(g(I)),1)],2),w(xb,{"selection-mode":"range",date:f.value,"min-date":g(h),"max-date":g(m),"range-state":g(y),"disabled-date":g(r),"cell-class-name":g(s),onChangerange:g(b),onPick:Ne,onSelect:g(E)},null,8,["date","min-date","max-date","range-state","disabled-date","cell-class-name","onChangerange","onSelect"])],2),_("div",{class:D([[g(v).e("content"),g(k).e("content")],"is-right"])},[_("div",{class:D(g(k).e("header"))},[ae.unlinkPanels?(C(),T("button",{key:0,type:"button",disabled:!g(J),class:D([[g(v).e("icon-btn"),{"is-disabled":!g(J)}],"d-arrow-left"]),"aria-label":g(M)("el.datepicker.prevYear"),onClick:le},[w(g(Ie),null,{default:S(()=>[w(g(Jc))]),_:1})],10,Gse)):z("v-if",!0),ae.unlinkPanels?(C(),T("button",{key:1,type:"button",disabled:!g(G),class:D([[g(v).e("icon-btn"),{"is-disabled":!g(G)}],"arrow-left"]),"aria-label":g(M)("el.datepicker.prevMonth"),onClick:Ae},[w(g(Ie),null,{default:S(()=>[w(g(cu))]),_:1})],10,Yse)):z("v-if",!0),_("button",{type:"button","aria-label":g(M)("el.datepicker.nextYear"),class:D([g(v).e("icon-btn"),"d-arrow-right"]),onClick:xe},[w(g(Ie),null,{default:S(()=>[w(g(Xc))]),_:1})],10,Zse),_("button",{type:"button",class:D([g(v).e("icon-btn"),"arrow-right"]),"aria-label":g(M)("el.datepicker.nextMonth"),onClick:te},[w(g(Ie),null,{default:S(()=>[w(g(Ws))]),_:1})],10,Jse),_("div",null,O(g(V)),1)],2),w(xb,{"selection-mode":"range",date:p.value,"min-date":g(h),"max-date":g(m),"range-state":g(y),"disabled-date":g(r),"cell-class-name":g(s),onChangerange:g(b),onPick:Ne,onSelect:g(E)},null,8,["date","min-date","max-date","range-state","disabled-date","cell-class-name","onChangerange","onSelect"])],2)],2)],2),g(_e)?(C(),T("div",{key:0,class:D(g(v).e("footer"))},[g(a)?(C(),H(g(ut),{key:0,text:"",size:"small",class:D(g(v).e("link-btn")),onClick:Qe},{default:S(()=>[ne(O(g(M)("el.datepicker.clear")),1)]),_:1},8,["class"])):z("v-if",!0),w(g(ut),{plain:"",size:"small",class:D(g(v).e("link-btn")),disabled:g(ue),onClick:Se[10]||(Se[10]=Ve=>g($)(!1))},{default:S(()=>[ne(O(g(M)("el.datepicker.confirm")),1)]),_:1},8,["class","disabled"])],2)):z("v-if",!0)],2))}});var Qse=He(Xse,[["__file","panel-date-range.vue"]]);const eie=Ke({...eO}),tie=["pick","set-picker-option","calendar-change"],nie=({unlinkPanels:e,leftDate:t,rightDate:n})=>{const{t:o}=Kt(),r=()=>{t.value=t.value.subtract(1,"year"),e.value||(n.value=n.value.subtract(1,"year"))},s=()=>{e.value||(t.value=t.value.add(1,"year")),n.value=n.value.add(1,"year")},i=()=>{t.value=t.value.add(1,"year")},l=()=>{n.value=n.value.subtract(1,"year")},a=R(()=>`${t.value.year()} ${o("el.datepicker.year")}`),u=R(()=>`${n.value.year()} ${o("el.datepicker.year")}`),c=R(()=>t.value.year()),d=R(()=>n.value.year()===t.value.year()?t.value.year()+1:n.value.year());return{leftPrevYear:r,rightNextYear:s,leftNextYear:i,rightPrevYear:l,leftLabel:a,rightLabel:u,leftYear:c,rightYear:d}},oie=["onClick"],rie=["disabled"],sie=["disabled"],wm="year",iie=Q({name:"DatePickerMonthRange"}),lie=Q({...iie,props:eie,emits:tie,setup(e,{emit:t}){const n=e,{lang:o}=Kt(),r=je("EP_PICKER_BASE"),{shortcuts:s,disabledDate:i,format:l}=r.props,a=pn(r.props,"defaultValue"),u=q(ct().locale(o.value)),c=q(ct().locale(o.value).add(1,wm)),{minDate:d,maxDate:f,rangeState:p,ppNs:h,drpNs:m,handleChangeRange:y,handleRangeConfirm:v,handleShortcutClick:k,onSelect:b}=nO(n,{defaultValue:a,leftDate:u,rightDate:c,unit:wm,onParsedValueChanged:U}),$=R(()=>!!s.length),{leftPrevYear:x,rightNextYear:E,leftNextYear:M,rightPrevYear:N,leftLabel:P,rightLabel:I,leftYear:V,rightYear:F}=nie({unlinkPanels:pn(n,"unlinkPanels"),leftDate:u,rightDate:c}),Y=R(()=>n.unlinkPanels&&F.value>V.value+1),Z=(B,W=!0)=>{const L=B.minDate,A=B.maxDate;f.value===A&&d.value===L||(t("calendar-change",[L.toDate(),A&&A.toDate()]),f.value=A,d.value=L,W&&v())},K=B=>B.map(W=>W.format(l));function U(B,W){if(n.unlinkPanels&&W){const L=(B==null?void 0:B.year())||0,A=W.year();c.value=L===A?W.add(1,wm):W}else c.value=u.value.add(1,wm)}return t("set-picker-option",["formatToString",K]),(B,W)=>(C(),T("div",{class:D([g(h).b(),g(m).b(),{"has-sidebar":!!B.$slots.sidebar||g($)}])},[_("div",{class:D(g(h).e("body-wrapper"))},[he(B.$slots,"sidebar",{class:D(g(h).e("sidebar"))}),g($)?(C(),T("div",{key:0,class:D(g(h).e("sidebar"))},[(C(!0),T(de,null,nt(g(s),(L,A)=>(C(),T("button",{key:A,type:"button",class:D(g(h).e("shortcut")),onClick:X=>g(k)(L)},O(L.text),11,oie))),128))],2)):z("v-if",!0),_("div",{class:D(g(h).e("body"))},[_("div",{class:D([[g(h).e("content"),g(m).e("content")],"is-left"])},[_("div",{class:D(g(m).e("header"))},[_("button",{type:"button",class:D([g(h).e("icon-btn"),"d-arrow-left"]),onClick:W[0]||(W[0]=(...L)=>g(x)&&g(x)(...L))},[w(g(Ie),null,{default:S(()=>[w(g(Jc))]),_:1})],2),B.unlinkPanels?(C(),T("button",{key:0,type:"button",disabled:!g(Y),class:D([[g(h).e("icon-btn"),{[g(h).is("disabled")]:!g(Y)}],"d-arrow-right"]),onClick:W[1]||(W[1]=(...L)=>g(M)&&g(M)(...L))},[w(g(Ie),null,{default:S(()=>[w(g(Xc))]),_:1})],10,rie)):z("v-if",!0),_("div",null,O(g(P)),1)],2),w(Tb,{"selection-mode":"range",date:u.value,"min-date":g(d),"max-date":g(f),"range-state":g(p),"disabled-date":g(i),onChangerange:g(y),onPick:Z,onSelect:g(b)},null,8,["date","min-date","max-date","range-state","disabled-date","onChangerange","onSelect"])],2),_("div",{class:D([[g(h).e("content"),g(m).e("content")],"is-right"])},[_("div",{class:D(g(m).e("header"))},[B.unlinkPanels?(C(),T("button",{key:0,type:"button",disabled:!g(Y),class:D([[g(h).e("icon-btn"),{"is-disabled":!g(Y)}],"d-arrow-left"]),onClick:W[2]||(W[2]=(...L)=>g(N)&&g(N)(...L))},[w(g(Ie),null,{default:S(()=>[w(g(Jc))]),_:1})],10,sie)):z("v-if",!0),_("button",{type:"button",class:D([g(h).e("icon-btn"),"d-arrow-right"]),onClick:W[3]||(W[3]=(...L)=>g(E)&&g(E)(...L))},[w(g(Ie),null,{default:S(()=>[w(g(Xc))]),_:1})],2),_("div",null,O(g(I)),1)],2),w(Tb,{"selection-mode":"range",date:c.value,"min-date":g(d),"max-date":g(f),"range-state":g(p),"disabled-date":g(i),onChangerange:g(y),onPick:Z,onSelect:g(b)},null,8,["date","min-date","max-date","range-state","disabled-date","onChangerange","onSelect"])],2)],2)],2)],2))}});var aie=He(lie,[["__file","panel-month-range.vue"]]);const uie=function(e){switch(e){case"daterange":case"datetimerange":return Qse;case"monthrange":return aie;default:return Bse}};ct.extend(poe);ct.extend(qre);ct.extend(hM);ct.extend(Yre);ct.extend(Jre);ct.extend(Qre);ct.extend(tse);ct.extend(ose);var cie=Q({name:"ElDatePicker",install:null,props:rse,emits:["update:modelValue"],setup(e,{expose:t,emit:n,slots:o}){const r=Re("picker-panel");wt("ElPopperOptions",Bn(pn(e,"popperOptions"))),wt(jw,{slots:o,pickerNs:r});const s=q();t({focus:(a=!0)=>{var u;(u=s.value)==null||u.focus(a)},handleOpen:()=>{var a;(a=s.value)==null||a.handleOpen()},handleClose:()=>{var a;(a=s.value)==null||a.handleClose()}});const l=a=>{n("update:modelValue",a)};return()=>{var a;const u=(a=e.format)!=null?a:Fne[e.type]||qu,c=uie(e.type);return w(Wne,un(e,{format:u,type:e.type,ref:s,"onUpdate:modelValue":l}),{default:d=>w(c,d,null),"range-separator":o["range-separator"]})}}});const s1=cie;s1.install=e=>{e.component(s1.name,s1)};const die=s1,fie=Ke({mask:{type:Boolean,default:!0},customMaskEvent:{type:Boolean,default:!1},overlayClass:{type:Ce([String,Array,Object])},zIndex:{type:Ce([String,Number])}}),pie={click:e=>e instanceof MouseEvent},hie="overlay";var mie=Q({name:"ElOverlay",props:fie,emits:pie,setup(e,{slots:t,emit:n}){const o=Re(hie),r=a=>{n("click",a)},{onClick:s,onMousedown:i,onMouseup:l}=xw(e.customMaskEvent?void 0:r);return()=>e.mask?w("div",{class:[o.b(),e.overlayClass],style:{zIndex:e.zIndex},onClick:s,onMousedown:i,onMouseup:l},[he(t,"default")],Jm.STYLE|Jm.CLASS|Jm.PROPS,["onClick","onMouseup","onMousedown"]):lt("div",{class:e.overlayClass,style:{zIndex:e.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[he(t,"default")])}});const Ww=mie,oO=Symbol("dialogInjectionKey"),rO=Ke({center:Boolean,alignCenter:Boolean,closeIcon:{type:Io},draggable:Boolean,overflow:Boolean,fullscreen:Boolean,showClose:{type:Boolean,default:!0},title:{type:String,default:""},ariaLevel:{type:String,default:"2"}}),gie={close:()=>!0},vie=["aria-level"],yie=["aria-label"],_ie=["id"],bie=Q({name:"ElDialogContent"}),wie=Q({...bie,props:rO,emits:gie,setup(e){const t=e,{t:n}=Kt(),{Close:o}=dT,{dialogRef:r,headerRef:s,bodyId:i,ns:l,style:a}=je(oO),{focusTrapRef:u}=je(Dw),c=R(()=>[l.b(),l.is("fullscreen",t.fullscreen),l.is("draggable",t.draggable),l.is("align-center",t.alignCenter),{[l.m("center")]:t.center}]),d=vw(u,r),f=R(()=>t.draggable),p=R(()=>t.overflow);return mT(r,s,f,p),(h,m)=>(C(),T("div",{ref:g(d),class:D(g(c)),style:Ye(g(a)),tabindex:"-1"},[_("header",{ref_key:"headerRef",ref:s,class:D([g(l).e("header"),{"show-close":h.showClose}])},[he(h.$slots,"header",{},()=>[_("span",{role:"heading","aria-level":h.ariaLevel,class:D(g(l).e("title"))},O(h.title),11,vie)]),h.showClose?(C(),T("button",{key:0,"aria-label":g(n)("el.dialog.close"),class:D(g(l).e("headerbtn")),type:"button",onClick:m[0]||(m[0]=y=>h.$emit("close"))},[w(g(Ie),{class:D(g(l).e("close"))},{default:S(()=>[(C(),H(Pt(h.closeIcon||g(o))))]),_:1},8,["class"])],10,yie)):z("v-if",!0)],2),_("div",{id:g(i),class:D(g(l).e("body"))},[he(h.$slots,"default")],10,_ie),h.$slots.footer?(C(),T("footer",{key:0,class:D(g(l).e("footer"))},[he(h.$slots,"footer")],2)):z("v-if",!0)],6))}});var Cie=He(wie,[["__file","dialog-content.vue"]]);const sO=Ke({...rO,appendToBody:Boolean,appendTo:{type:Ce(String),default:"body"},beforeClose:{type:Ce(Function)},destroyOnClose:Boolean,closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},openDelay:{type:Number,default:0},closeDelay:{type:Number,default:0},top:{type:String},modelValue:Boolean,modalClass:String,width:{type:[String,Number]},zIndex:{type:Number},trapFocus:{type:Boolean,default:!1},headerAriaLevel:{type:String,default:"2"}}),iO={open:()=>!0,opened:()=>!0,close:()=>!0,closed:()=>!0,[Jt]:e=>Br(e),openAutoFocus:()=>!0,closeAutoFocus:()=>!0},lO=(e,t)=>{var n;const r=at().emit,{nextZIndex:s}=j0();let i="";const l=Hr(),a=Hr(),u=q(!1),c=q(!1),d=q(!1),f=q((n=e.zIndex)!=null?n:s());let p,h;const m=hh("namespace",Uf),y=R(()=>{const K={},U=`--${m.value}-dialog`;return e.fullscreen||(e.top&&(K[`${U}-margin-top`]=e.top),e.width&&(K[`${U}-width`]=Zo(e.width))),K}),v=R(()=>e.alignCenter?{display:"flex"}:{});function k(){r("opened")}function b(){r("closed"),r(Jt,!1),e.destroyOnClose&&(d.value=!1)}function $(){r("close")}function x(){h==null||h(),p==null||p(),e.openDelay&&e.openDelay>0?{stop:p}=W_(()=>P(),e.openDelay):P()}function E(){p==null||p(),h==null||h(),e.closeDelay&&e.closeDelay>0?{stop:h}=W_(()=>I(),e.closeDelay):I()}function M(){function K(U){U||(c.value=!0,u.value=!1)}e.beforeClose?e.beforeClose(K):E()}function N(){e.closeOnClickModal&&M()}function P(){Tt&&(u.value=!0)}function I(){u.value=!1}function V(){r("openAutoFocus")}function F(){r("closeAutoFocus")}function Y(K){var U;((U=K.detail)==null?void 0:U.focusReason)==="pointer"&&K.preventDefault()}e.lockScroll&&yT(u);function Z(){e.closeOnPressEscape&&M()}return Me(()=>e.modelValue,K=>{K?(c.value=!1,x(),d.value=!0,f.value=Jx(e.zIndex)?s():f.value++,ot(()=>{r("open"),t.value&&(t.value.scrollTop=0)})):u.value&&E()}),Me(()=>e.fullscreen,K=>{t.value&&(K?(i=t.value.style.transform,t.value.style.transform=""):t.value.style.transform=i)}),Ct(()=>{e.modelValue&&(u.value=!0,d.value=!0,x())}),{afterEnter:k,afterLeave:b,beforeLeave:$,handleClose:M,onModalClick:N,close:E,doClose:I,onOpenAutoFocus:V,onCloseAutoFocus:F,onCloseRequested:Z,onFocusoutPrevented:Y,titleId:l,bodyId:a,closed:c,style:y,overlayDialogStyle:v,rendered:d,visible:u,zIndex:f}},kie=["aria-label","aria-labelledby","aria-describedby"],Sie=Q({name:"ElDialog",inheritAttrs:!1}),$ie=Q({...Sie,props:sO,emits:iO,setup(e,{expose:t}){const n=e,o=Kr();qa({scope:"el-dialog",from:"the title slot",replacement:"the header slot",version:"3.0.0",ref:"https://element-plus.org/en-US/component/dialog.html#slots"},R(()=>!!o.title));const r=Re("dialog"),s=q(),i=q(),l=q(),{visible:a,titleId:u,bodyId:c,style:d,overlayDialogStyle:f,rendered:p,zIndex:h,afterEnter:m,afterLeave:y,beforeLeave:v,handleClose:k,onModalClick:b,onOpenAutoFocus:$,onCloseAutoFocus:x,onCloseRequested:E,onFocusoutPrevented:M}=lO(n,s);wt(oO,{dialogRef:s,headerRef:i,bodyId:c,ns:r,rendered:p,style:d});const N=xw(b),P=R(()=>n.draggable&&!n.fullscreen);return t({visible:a,dialogContentRef:l}),(I,V)=>(C(),H(qr,{to:I.appendTo,disabled:I.appendTo!=="body"?!1:!I.appendToBody},[w(_r,{name:"dialog-fade",onAfterEnter:g(m),onAfterLeave:g(y),onBeforeLeave:g(v),persisted:""},{default:S(()=>[Fe(w(g(Ww),{"custom-mask-event":"",mask:I.modal,"overlay-class":I.modalClass,"z-index":g(h)},{default:S(()=>[_("div",{role:"dialog","aria-modal":"true","aria-label":I.title||void 0,"aria-labelledby":I.title?void 0:g(u),"aria-describedby":g(c),class:D(`${g(r).namespace.value}-overlay-dialog`),style:Ye(g(f)),onClick:V[0]||(V[0]=(...F)=>g(N).onClick&&g(N).onClick(...F)),onMousedown:V[1]||(V[1]=(...F)=>g(N).onMousedown&&g(N).onMousedown(...F)),onMouseup:V[2]||(V[2]=(...F)=>g(N).onMouseup&&g(N).onMouseup(...F))},[w(g(q0),{loop:"",trapped:g(a),"focus-start-el":"container",onFocusAfterTrapped:g($),onFocusAfterReleased:g(x),onFocusoutPrevented:g(M),onReleaseRequested:g(E)},{default:S(()=>[g(p)?(C(),H(Cie,un({key:0,ref_key:"dialogContentRef",ref:l},I.$attrs,{center:I.center,"align-center":I.alignCenter,"close-icon":I.closeIcon,draggable:g(P),overflow:I.overflow,fullscreen:I.fullscreen,"show-close":I.showClose,title:I.title,"aria-level":I.headerAriaLevel,onClose:g(k)}),ms({header:S(()=>[I.$slots.title?he(I.$slots,"title",{key:1}):he(I.$slots,"header",{key:0,close:g(k),titleId:g(u),titleClass:g(r).e("title")})]),default:S(()=>[he(I.$slots,"default")]),_:2},[I.$slots.footer?{name:"footer",fn:S(()=>[he(I.$slots,"footer")])}:void 0]),1040,["center","align-center","close-icon","draggable","overflow","fullscreen","show-close","title","aria-level","onClose"])):z("v-if",!0)]),_:3},8,["trapped","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])],46,kie)]),_:3},8,["mask","overlay-class","z-index"]),[[en,g(a)]])]),_:3},8,["onAfterEnter","onAfterLeave","onBeforeLeave"])],8,["to","disabled"]))}});var Eie=He($ie,[["__file","dialog.vue"]]);const bh=Zt(Eie),xie=Ke({direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},contentPosition:{type:String,values:["left","center","right"],default:"center"},borderStyle:{type:Ce(String),default:"solid"}}),Tie=Q({name:"ElDivider"}),Mie=Q({...Tie,props:xie,setup(e){const t=e,n=Re("divider"),o=R(()=>n.cssVar({"border-style":t.borderStyle}));return(r,s)=>(C(),T("div",{class:D([g(n).b(),g(n).m(r.direction)]),style:Ye(g(o)),role:"separator"},[r.$slots.default&&r.direction!=="vertical"?(C(),T("div",{key:0,class:D([g(n).e("text"),g(n).is(r.contentPosition)])},[he(r.$slots,"default")],2)):z("v-if",!0)],6))}});var Oie=He(Mie,[["__file","divider.vue"]]);const aO=Zt(Oie),Iie=Ke({...sO,direction:{type:String,default:"rtl",values:["ltr","rtl","ttb","btt"]},size:{type:[String,Number],default:"30%"},withHeader:{type:Boolean,default:!0},modalFade:{type:Boolean,default:!0},headerAriaLevel:{type:String,default:"2"}}),Aie=iO,Nie=["aria-label","aria-labelledby","aria-describedby"],Pie=["id","aria-level"],Lie=["aria-label"],Rie=["id"],Die=Q({name:"ElDrawer",inheritAttrs:!1}),Vie=Q({...Die,props:Iie,emits:Aie,setup(e,{expose:t}){const n=e,o=Kr();qa({scope:"el-drawer",from:"the title slot",replacement:"the header slot",version:"3.0.0",ref:"https://element-plus.org/en-US/component/drawer.html#slots"},R(()=>!!o.title));const r=q(),s=q(),i=Re("drawer"),{t:l}=Kt(),{afterEnter:a,afterLeave:u,beforeLeave:c,visible:d,rendered:f,titleId:p,bodyId:h,zIndex:m,onModalClick:y,onOpenAutoFocus:v,onCloseAutoFocus:k,onFocusoutPrevented:b,onCloseRequested:$,handleClose:x}=lO(n,r),E=R(()=>n.direction==="rtl"||n.direction==="ltr"),M=R(()=>Zo(n.size));return t({handleClose:x,afterEnter:a,afterLeave:u}),(N,P)=>(C(),H(qr,{to:"body",disabled:!N.appendToBody},[w(_r,{name:g(i).b("fade"),onAfterEnter:g(a),onAfterLeave:g(u),onBeforeLeave:g(c),persisted:""},{default:S(()=>[Fe(w(g(Ww),{mask:N.modal,"overlay-class":N.modalClass,"z-index":g(m),onClick:g(y)},{default:S(()=>[w(g(q0),{loop:"",trapped:g(d),"focus-trap-el":r.value,"focus-start-el":s.value,onFocusAfterTrapped:g(v),onFocusAfterReleased:g(k),onFocusoutPrevented:g(b),onReleaseRequested:g($)},{default:S(()=>[_("div",un({ref_key:"drawerRef",ref:r,"aria-modal":"true","aria-label":N.title||void 0,"aria-labelledby":N.title?void 0:g(p),"aria-describedby":g(h)},N.$attrs,{class:[g(i).b(),N.direction,g(d)&&"open"],style:g(E)?"width: "+g(M):"height: "+g(M),role:"dialog",onClick:P[1]||(P[1]=Ze(()=>{},["stop"]))}),[_("span",{ref_key:"focusStartRef",ref:s,class:D(g(i).e("sr-focus")),tabindex:"-1"},null,2),N.withHeader?(C(),T("header",{key:0,class:D(g(i).e("header"))},[N.$slots.title?he(N.$slots,"title",{key:1},()=>[z(" DEPRECATED SLOT ")]):he(N.$slots,"header",{key:0,close:g(x),titleId:g(p),titleClass:g(i).e("title")},()=>[N.$slots.title?z("v-if",!0):(C(),T("span",{key:0,id:g(p),role:"heading","aria-level":N.headerAriaLevel,class:D(g(i).e("title"))},O(N.title),11,Pie))]),N.showClose?(C(),T("button",{key:2,"aria-label":g(l)("el.drawer.close"),class:D(g(i).e("close-btn")),type:"button",onClick:P[0]||(P[0]=(...I)=>g(x)&&g(x)(...I))},[w(g(Ie),{class:D(g(i).e("close"))},{default:S(()=>[w(g(Js))]),_:1},8,["class"])],10,Lie)):z("v-if",!0)],2)):z("v-if",!0),g(f)?(C(),T("div",{key:1,id:g(h),class:D(g(i).e("body"))},[he(N.$slots,"default")],10,Rie)):z("v-if",!0),N.$slots.footer?(C(),T("div",{key:2,class:D(g(i).e("footer"))},[he(N.$slots,"footer")],2)):z("v-if",!0)],16,Nie)]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])]),_:3},8,["mask","overlay-class","z-index","onClick"]),[[en,g(d)]])]),_:3},8,["name","onAfterEnter","onAfterLeave","onBeforeLeave"])],8,["disabled"]))}});var Fie=He(Vie,[["__file","drawer.vue"]]);const na=Zt(Fie),Bie=Q({inheritAttrs:!1});function zie(e,t,n,o,r,s){return he(e.$slots,"default")}var jie=He(Bie,[["render",zie],["__file","collection.vue"]]);const Hie=Q({name:"ElCollectionItem",inheritAttrs:!1});function Uie(e,t,n,o,r,s){return he(e.$slots,"default")}var Wie=He(Hie,[["render",Uie],["__file","collection-item.vue"]]);const uO="data-el-collection-item",cO=e=>{const t=`El${e}Collection`,n=`${t}Item`,o=Symbol(t),r=Symbol(n),s={...jie,name:t,setup(){const l=q(null),a=new Map;wt(o,{itemMap:a,getItems:()=>{const c=g(l);if(!c)return[];const d=Array.from(c.querySelectorAll(`[${uO}]`));return[...a.values()].sort((p,h)=>d.indexOf(p.ref)-d.indexOf(h.ref))},collectionRef:l})}},i={...Wie,name:n,setup(l,{attrs:a}){const u=q(null),c=je(o,void 0);wt(r,{collectionItemRef:u}),Ct(()=>{const d=g(u);d&&c.itemMap.set(d,{ref:d,...a})}),xn(()=>{const d=g(u);c.itemMap.delete(d)})}};return{COLLECTION_INJECTION_KEY:o,COLLECTION_ITEM_INJECTION_KEY:r,ElCollection:s,ElCollectionItem:i}},Kie=Ke({style:{type:Ce([String,Array,Object])},currentTabId:{type:Ce(String)},defaultCurrentTabId:String,loop:Boolean,dir:{type:String,values:["ltr","rtl"],default:"ltr"},orientation:{type:Ce(String)},onBlur:Function,onFocus:Function,onMousedown:Function}),{ElCollection:qie,ElCollectionItem:Gie,COLLECTION_INJECTION_KEY:Kw,COLLECTION_ITEM_INJECTION_KEY:Yie}=cO("RovingFocusGroup"),qw=Symbol("elRovingFocusGroup"),dO=Symbol("elRovingFocusGroupItem"),Zie={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"},Jie=(e,t)=>{if(t!=="rtl")return e;switch(e){case rt.right:return rt.left;case rt.left:return rt.right;default:return e}},Xie=(e,t,n)=>{const o=Jie(e.key,n);if(!(t==="vertical"&&[rt.left,rt.right].includes(o))&&!(t==="horizontal"&&[rt.up,rt.down].includes(o)))return Zie[o]},Qie=(e,t)=>e.map((n,o)=>e[(o+t)%e.length]),Gw=e=>{const{activeElement:t}=document;for(const n of e)if(n===t||(n.focus(),t!==document.activeElement))return},C8="currentTabIdChange",k8="rovingFocusGroup.entryFocus",ele={bubbles:!1,cancelable:!0},tle=Q({name:"ElRovingFocusGroupImpl",inheritAttrs:!1,props:Kie,emits:[C8,"entryFocus"],setup(e,{emit:t}){var n;const o=q((n=e.currentTabId||e.defaultCurrentTabId)!=null?n:null),r=q(!1),s=q(!1),i=q(null),{getItems:l}=je(Kw,void 0),a=R(()=>[{outline:"none"},e.style]),u=m=>{t(C8,m)},c=()=>{r.value=!0},d=Rn(m=>{var y;(y=e.onMousedown)==null||y.call(e,m)},()=>{s.value=!0}),f=Rn(m=>{var y;(y=e.onFocus)==null||y.call(e,m)},m=>{const y=!g(s),{target:v,currentTarget:k}=m;if(v===k&&y&&!g(r)){const b=new Event(k8,ele);if(k==null||k.dispatchEvent(b),!b.defaultPrevented){const $=l().filter(P=>P.focusable),x=$.find(P=>P.active),E=$.find(P=>P.id===g(o)),N=[x,E,...$].filter(Boolean).map(P=>P.ref);Gw(N)}}s.value=!1}),p=Rn(m=>{var y;(y=e.onBlur)==null||y.call(e,m)},()=>{r.value=!1}),h=(...m)=>{t("entryFocus",...m)};wt(qw,{currentTabbedId:wu(o),loop:pn(e,"loop"),tabIndex:R(()=>g(r)?-1:0),rovingFocusGroupRef:i,rovingFocusGroupRootStyle:a,orientation:pn(e,"orientation"),dir:pn(e,"dir"),onItemFocus:u,onItemShiftTab:c,onBlur:p,onFocus:f,onMousedown:d}),Me(()=>e.currentTabId,m=>{o.value=m??null}),Vn(i,k8,h)}});function nle(e,t,n,o,r,s){return he(e.$slots,"default")}var ole=He(tle,[["render",nle],["__file","roving-focus-group-impl.vue"]]);const rle=Q({name:"ElRovingFocusGroup",components:{ElFocusGroupCollection:qie,ElRovingFocusGroupImpl:ole}});function sle(e,t,n,o,r,s){const i=ee("el-roving-focus-group-impl"),l=ee("el-focus-group-collection");return C(),H(l,null,{default:S(()=>[w(i,n3($3(e.$attrs)),{default:S(()=>[he(e.$slots,"default")]),_:3},16)]),_:3})}var ile=He(rle,[["render",sle],["__file","roving-focus-group.vue"]]);const lle=Q({components:{ElRovingFocusCollectionItem:Gie},props:{focusable:{type:Boolean,default:!0},active:{type:Boolean,default:!1}},emits:["mousedown","focus","keydown"],setup(e,{emit:t}){const{currentTabbedId:n,loop:o,onItemFocus:r,onItemShiftTab:s}=je(qw,void 0),{getItems:i}=je(Kw,void 0),l=Hr(),a=q(null),u=Rn(p=>{t("mousedown",p)},p=>{e.focusable?r(g(l)):p.preventDefault()}),c=Rn(p=>{t("focus",p)},()=>{r(g(l))}),d=Rn(p=>{t("keydown",p)},p=>{const{key:h,shiftKey:m,target:y,currentTarget:v}=p;if(h===rt.tab&&m){s();return}if(y!==v)return;const k=Xie(p);if(k){p.preventDefault();let $=i().filter(x=>x.focusable).map(x=>x.ref);switch(k){case"last":{$.reverse();break}case"prev":case"next":{k==="prev"&&$.reverse();const x=$.indexOf(v);$=o.value?Qie($,x+1):$.slice(x+1);break}}ot(()=>{Gw($)})}}),f=R(()=>n.value===g(l));return wt(dO,{rovingFocusGroupItemRef:a,tabIndex:R(()=>g(f)?0:-1),handleMousedown:u,handleFocus:c,handleKeydown:d}),{id:l,handleKeydown:d,handleFocus:c,handleMousedown:u}}});function ale(e,t,n,o,r,s){const i=ee("el-roving-focus-collection-item");return C(),H(i,{id:e.id,focusable:e.focusable,active:e.active},{default:S(()=>[he(e.$slots,"default")]),_:3},8,["id","focusable","active"])}var ule=He(lle,[["render",ale],["__file","roving-focus-item.vue"]]);const i1=Ke({trigger:Vp.trigger,effect:{...ar.effect,default:"light"},type:{type:Ce(String)},placement:{type:Ce(String),default:"bottom"},popperOptions:{type:Ce(Object),default:()=>({})},id:String,size:{type:String,default:""},splitButton:Boolean,hideOnClick:{type:Boolean,default:!0},loop:{type:Boolean,default:!0},showTimeout:{type:Number,default:150},hideTimeout:{type:Number,default:150},tabindex:{type:Ce([Number,String]),default:0},maxHeight:{type:Ce([Number,String]),default:""},popperClass:{type:String,default:""},disabled:{type:Boolean,default:!1},role:{type:String,default:"menu"},buttonProps:{type:Ce(Object)},teleported:ar.teleported}),fO=Ke({command:{type:[Object,String,Number],default:()=>({})},disabled:Boolean,divided:Boolean,textValue:String,icon:{type:Io}}),cle=Ke({onKeydown:{type:Ce(Function)}}),dle=[rt.down,rt.pageDown,rt.home],pO=[rt.up,rt.pageUp,rt.end],fle=[...dle,...pO],{ElCollection:ple,ElCollectionItem:hle,COLLECTION_INJECTION_KEY:mle,COLLECTION_ITEM_INJECTION_KEY:gle}=cO("Dropdown"),X0=Symbol("elDropdown"),{ButtonGroup:vle}=ut,yle=Q({name:"ElDropdown",components:{ElButton:ut,ElButtonGroup:vle,ElScrollbar:Ss,ElDropdownCollection:ple,ElTooltip:ea,ElRovingFocusGroup:ile,ElOnlyChild:nM,ElIcon:Ie,ArrowDown:Eu},props:i1,emits:["visible-change","click","command"],setup(e,{emit:t}){const n=at(),o=Re("dropdown"),{t:r}=Kt(),s=q(),i=q(),l=q(null),a=q(null),u=q(null),c=q(null),d=q(!1),f=[rt.enter,rt.space,rt.down],p=R(()=>({maxHeight:Zo(e.maxHeight)})),h=R(()=>[o.m(x.value)]),m=R(()=>Mg(e.trigger)),y=Hr().value,v=R(()=>e.id||y);Me([s,m],([B,W],[L])=>{var A,X,re;(A=L==null?void 0:L.$el)!=null&&A.removeEventListener&&L.$el.removeEventListener("pointerenter",M),(X=B==null?void 0:B.$el)!=null&&X.removeEventListener&&B.$el.removeEventListener("pointerenter",M),(re=B==null?void 0:B.$el)!=null&&re.addEventListener&&W.includes("hover")&&B.$el.addEventListener("pointerenter",M)},{immediate:!0}),xn(()=>{var B,W;(W=(B=s.value)==null?void 0:B.$el)!=null&&W.removeEventListener&&s.value.$el.removeEventListener("pointerenter",M)});function k(){b()}function b(){var B;(B=l.value)==null||B.onClose()}function $(){var B;(B=l.value)==null||B.onOpen()}const x=Jo();function E(...B){t("command",...B)}function M(){var B,W;(W=(B=s.value)==null?void 0:B.$el)==null||W.focus()}function N(){}function P(){const B=g(a);m.value.includes("hover")&&(B==null||B.focus()),c.value=null}function I(B){c.value=B}function V(B){d.value||(B.preventDefault(),B.stopImmediatePropagation())}function F(){t("visible-change",!0)}function Y(B){(B==null?void 0:B.type)==="keydown"&&a.value.focus()}function Z(){t("visible-change",!1)}return wt(X0,{contentRef:a,role:R(()=>e.role),triggerId:v,isUsingKeyboard:d,onItemEnter:N,onItemLeave:P}),wt("elDropdown",{instance:n,dropdownSize:x,handleClick:k,commandHandler:E,trigger:pn(e,"trigger"),hideOnClick:pn(e,"hideOnClick")}),{t:r,ns:o,scrollbar:u,wrapStyle:p,dropdownTriggerKls:h,dropdownSize:x,triggerId:v,triggerKeys:f,currentTabId:c,handleCurrentTabIdChange:I,handlerMainButtonClick:B=>{t("click",B)},handleEntryFocus:V,handleClose:b,handleOpen:$,handleBeforeShowTooltip:F,handleShowTooltip:Y,handleBeforeHideTooltip:Z,onFocusAfterTrapped:B=>{var W,L;B.preventDefault(),(L=(W=a.value)==null?void 0:W.focus)==null||L.call(W,{preventScroll:!0})},popperRef:l,contentRef:a,triggeringElementRef:s,referenceElementRef:i}}});function _le(e,t,n,o,r,s){var i;const l=ee("el-dropdown-collection"),a=ee("el-roving-focus-group"),u=ee("el-scrollbar"),c=ee("el-only-child"),d=ee("el-tooltip"),f=ee("el-button"),p=ee("arrow-down"),h=ee("el-icon"),m=ee("el-button-group");return C(),T("div",{class:D([e.ns.b(),e.ns.is("disabled",e.disabled)])},[w(d,{ref:"popperRef",role:e.role,effect:e.effect,"fallback-placements":["bottom","top"],"popper-options":e.popperOptions,"gpu-acceleration":!1,"hide-after":e.trigger==="hover"?e.hideTimeout:0,"manual-mode":!0,placement:e.placement,"popper-class":[e.ns.e("popper"),e.popperClass],"reference-element":(i=e.referenceElementRef)==null?void 0:i.$el,trigger:e.trigger,"trigger-keys":e.triggerKeys,"trigger-target-el":e.contentRef,"show-after":e.trigger==="hover"?e.showTimeout:0,"stop-popper-mouse-event":!1,"virtual-ref":e.triggeringElementRef,"virtual-triggering":e.splitButton,disabled:e.disabled,transition:`${e.ns.namespace.value}-zoom-in-top`,teleported:e.teleported,pure:"",persistent:"",onBeforeShow:e.handleBeforeShowTooltip,onShow:e.handleShowTooltip,onBeforeHide:e.handleBeforeHideTooltip},ms({content:S(()=>[w(u,{ref:"scrollbar","wrap-style":e.wrapStyle,tag:"div","view-class":e.ns.e("list")},{default:S(()=>[w(a,{loop:e.loop,"current-tab-id":e.currentTabId,orientation:"horizontal",onCurrentTabIdChange:e.handleCurrentTabIdChange,onEntryFocus:e.handleEntryFocus},{default:S(()=>[w(l,null,{default:S(()=>[he(e.$slots,"dropdown")]),_:3})]),_:3},8,["loop","current-tab-id","onCurrentTabIdChange","onEntryFocus"])]),_:3},8,["wrap-style","view-class"])]),_:2},[e.splitButton?void 0:{name:"default",fn:S(()=>[w(c,{id:e.triggerId,ref:"triggeringElementRef",role:"button",tabindex:e.tabindex},{default:S(()=>[he(e.$slots,"default")]),_:3},8,["id","tabindex"])])}]),1032,["role","effect","popper-options","hide-after","placement","popper-class","reference-element","trigger","trigger-keys","trigger-target-el","show-after","virtual-ref","virtual-triggering","disabled","transition","teleported","onBeforeShow","onShow","onBeforeHide"]),e.splitButton?(C(),H(m,{key:0},{default:S(()=>[w(f,un({ref:"referenceElementRef"},e.buttonProps,{size:e.dropdownSize,type:e.type,disabled:e.disabled,tabindex:e.tabindex,onClick:e.handlerMainButtonClick}),{default:S(()=>[he(e.$slots,"default")]),_:3},16,["size","type","disabled","tabindex","onClick"]),w(f,un({id:e.triggerId,ref:"triggeringElementRef"},e.buttonProps,{role:"button",size:e.dropdownSize,type:e.type,class:e.ns.e("caret-button"),disabled:e.disabled,tabindex:e.tabindex,"aria-label":e.t("el.dropdown.toggleDropdown")}),{default:S(()=>[w(h,{class:D(e.ns.e("icon"))},{default:S(()=>[w(p)]),_:1},8,["class"])]),_:1},16,["id","size","type","class","disabled","tabindex","aria-label"])]),_:3})):z("v-if",!0)],2)}var ble=He(yle,[["render",_le],["__file","dropdown.vue"]]);const wle=Q({name:"DropdownItemImpl",components:{ElIcon:Ie},props:fO,emits:["pointermove","pointerleave","click","clickimpl"],setup(e,{emit:t}){const n=Re("dropdown"),{role:o}=je(X0,void 0),{collectionItemRef:r}=je(gle,void 0),{collectionItemRef:s}=je(Yie,void 0),{rovingFocusGroupItemRef:i,tabIndex:l,handleFocus:a,handleKeydown:u,handleMousedown:c}=je(dO,void 0),d=vw(r,s,i),f=R(()=>o.value==="menu"?"menuitem":o.value==="navigation"?"link":"button"),p=Rn(h=>{const{code:m}=h;if(m===rt.enter||m===rt.space)return h.preventDefault(),h.stopImmediatePropagation(),t("clickimpl",h),!0},u);return{ns:n,itemRef:d,dataset:{[uO]:""},role:f,tabIndex:l,handleFocus:a,handleKeydown:p,handleMousedown:c}}}),Cle=["aria-disabled","tabindex","role"];function kle(e,t,n,o,r,s){const i=ee("el-icon");return C(),T(de,null,[e.divided?(C(),T("li",un({key:0,role:"separator",class:e.ns.bem("menu","item","divided")},e.$attrs),null,16)):z("v-if",!0),_("li",un({ref:e.itemRef},{...e.dataset,...e.$attrs},{"aria-disabled":e.disabled,class:[e.ns.be("menu","item"),e.ns.is("disabled",e.disabled)],tabindex:e.tabIndex,role:e.role,onClick:t[0]||(t[0]=l=>e.$emit("clickimpl",l)),onFocus:t[1]||(t[1]=(...l)=>e.handleFocus&&e.handleFocus(...l)),onKeydown:t[2]||(t[2]=Ze((...l)=>e.handleKeydown&&e.handleKeydown(...l),["self"])),onMousedown:t[3]||(t[3]=(...l)=>e.handleMousedown&&e.handleMousedown(...l)),onPointermove:t[4]||(t[4]=l=>e.$emit("pointermove",l)),onPointerleave:t[5]||(t[5]=l=>e.$emit("pointerleave",l))}),[e.icon?(C(),H(i,{key:0},{default:S(()=>[(C(),H(Pt(e.icon)))]),_:1})):z("v-if",!0),he(e.$slots,"default")],16,Cle)],64)}var Sle=He(wle,[["render",kle],["__file","dropdown-item-impl.vue"]]);const hO=()=>{const e=je("elDropdown",{}),t=R(()=>e==null?void 0:e.dropdownSize);return{elDropdown:e,_elDropdownSize:t}},$le=Q({name:"ElDropdownItem",components:{ElDropdownCollectionItem:hle,ElRovingFocusItem:ule,ElDropdownItemImpl:Sle},inheritAttrs:!1,props:fO,emits:["pointermove","pointerleave","click"],setup(e,{emit:t,attrs:n}){const{elDropdown:o}=hO(),r=at(),s=q(null),i=R(()=>{var p,h;return(h=(p=g(s))==null?void 0:p.textContent)!=null?h:""}),{onItemEnter:l,onItemLeave:a}=je(X0,void 0),u=Rn(p=>(t("pointermove",p),p.defaultPrevented),x6(p=>{if(e.disabled){a(p);return}const h=p.currentTarget;h===document.activeElement||h.contains(document.activeElement)||(l(p),p.defaultPrevented||h==null||h.focus())})),c=Rn(p=>(t("pointerleave",p),p.defaultPrevented),x6(p=>{a(p)})),d=Rn(p=>{if(!e.disabled)return t("click",p),p.type!=="keydown"&&p.defaultPrevented},p=>{var h,m,y;if(e.disabled){p.stopImmediatePropagation();return}(h=o==null?void 0:o.hideOnClick)!=null&&h.value&&((m=o.handleClick)==null||m.call(o)),(y=o.commandHandler)==null||y.call(o,e.command,r,p)}),f=R(()=>({...e,...n}));return{handleClick:d,handlePointerMove:u,handlePointerLeave:c,textContent:i,propsAndAttrs:f}}});function Ele(e,t,n,o,r,s){var i;const l=ee("el-dropdown-item-impl"),a=ee("el-roving-focus-item"),u=ee("el-dropdown-collection-item");return C(),H(u,{disabled:e.disabled,"text-value":(i=e.textValue)!=null?i:e.textContent},{default:S(()=>[w(a,{focusable:!e.disabled},{default:S(()=>[w(l,un(e.propsAndAttrs,{onPointerleave:e.handlePointerLeave,onPointermove:e.handlePointerMove,onClickimpl:e.handleClick}),{default:S(()=>[he(e.$slots,"default")]),_:3},16,["onPointerleave","onPointermove","onClickimpl"])]),_:3},8,["focusable"])]),_:3},8,["disabled","text-value"])}var mO=He($le,[["render",Ele],["__file","dropdown-item.vue"]]);const xle=Q({name:"ElDropdownMenu",props:cle,setup(e){const t=Re("dropdown"),{_elDropdownSize:n}=hO(),o=n.value,{focusTrapRef:r,onKeydown:s}=je(Dw,void 0),{contentRef:i,role:l,triggerId:a}=je(X0,void 0),{collectionRef:u,getItems:c}=je(mle,void 0),{rovingFocusGroupRef:d,rovingFocusGroupRootStyle:f,tabIndex:p,onBlur:h,onFocus:m,onMousedown:y}=je(qw,void 0),{collectionRef:v}=je(Kw,void 0),k=R(()=>[t.b("menu"),t.bm("menu",o==null?void 0:o.value)]),b=vw(i,u,r,d,v),$=Rn(E=>{var M;(M=e.onKeydown)==null||M.call(e,E)},E=>{const{currentTarget:M,code:N,target:P}=E;if(M.contains(P),rt.tab===N&&E.stopImmediatePropagation(),E.preventDefault(),P!==g(i)||!fle.includes(N))return;const V=c().filter(F=>!F.disabled).map(F=>F.ref);pO.includes(N)&&V.reverse(),Gw(V)});return{size:o,rovingFocusGroupRootStyle:f,tabIndex:p,dropdownKls:k,role:l,triggerId:a,dropdownListWrapperRef:b,handleKeydown:E=>{$(E),s(E)},onBlur:h,onFocus:m,onMousedown:y}}}),Tle=["role","aria-labelledby"];function Mle(e,t,n,o,r,s){return C(),T("ul",{ref:e.dropdownListWrapperRef,class:D(e.dropdownKls),style:Ye(e.rovingFocusGroupRootStyle),tabindex:-1,role:e.role,"aria-labelledby":e.triggerId,onBlur:t[0]||(t[0]=(...i)=>e.onBlur&&e.onBlur(...i)),onFocus:t[1]||(t[1]=(...i)=>e.onFocus&&e.onFocus(...i)),onKeydown:t[2]||(t[2]=Ze((...i)=>e.handleKeydown&&e.handleKeydown(...i),["self"])),onMousedown:t[3]||(t[3]=Ze((...i)=>e.onMousedown&&e.onMousedown(...i),["self"]))},[he(e.$slots,"default")],46,Tle)}var gO=He(xle,[["render",Mle],["__file","dropdown-menu.vue"]]);const wh=Zt(ble,{DropdownItem:mO,DropdownMenu:gO}),Ch=Jn(mO),kh=Jn(gO),Ole=Ke({urlList:{type:Ce(Array),default:()=>Eo([])},zIndex:{type:Number},initialIndex:{type:Number,default:0},infinite:{type:Boolean,default:!0},hideOnClickModal:Boolean,teleported:Boolean,closeOnPressEscape:{type:Boolean,default:!0},zoomRate:{type:Number,default:1.2},minScale:{type:Number,default:.2},maxScale:{type:Number,default:7},crossorigin:{type:Ce(String)}}),Ile={close:()=>!0,switch:e=>_t(e),rotate:e=>_t(e)},Ale=["src","crossorigin"],Nle=Q({name:"ElImageViewer"}),Ple=Q({...Nle,props:Ole,emits:Ile,setup(e,{expose:t,emit:n}){var o;const r=e,s={CONTAIN:{name:"contain",icon:Ai(sT)},ORIGINAL:{name:"original",icon:Ai(eJ)}},{t:i}=Kt(),l=Re("image-viewer"),{nextZIndex:a}=j0(),u=q(),c=q([]),d=N$(),f=q(!0),p=q(r.initialIndex),h=An(s.CONTAIN),m=q({scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}),y=q((o=r.zIndex)!=null?o:a()),v=R(()=>{const{urlList:A}=r;return A.length<=1}),k=R(()=>p.value===0),b=R(()=>p.value===r.urlList.length-1),$=R(()=>r.urlList[p.value]),x=R(()=>[l.e("btn"),l.e("prev"),l.is("disabled",!r.infinite&&k.value)]),E=R(()=>[l.e("btn"),l.e("next"),l.is("disabled",!r.infinite&&b.value)]),M=R(()=>{const{scale:A,deg:X,offsetX:re,offsetY:j,enableTransition:ge}=m.value;let Oe=re/A,xe=j/A;switch(X%360){case 90:case-270:[Oe,xe]=[xe,-Oe];break;case 180:case-180:[Oe,xe]=[-Oe,-xe];break;case 270:case-90:[Oe,xe]=[-xe,Oe];break}const te={transform:`scale(${A}) rotate(${X}deg) translate(${Oe}px, ${xe}px)`,transition:ge?"transform .3s":""};return h.value.name===s.CONTAIN.name&&(te.maxWidth=te.maxHeight="100%"),te});function N(){I(),n("close")}function P(){const A=oy(re=>{switch(re.code){case rt.esc:r.closeOnPressEscape&&N();break;case rt.space:K();break;case rt.left:B();break;case rt.up:L("zoomIn");break;case rt.right:W();break;case rt.down:L("zoomOut");break}}),X=oy(re=>{const j=re.deltaY||re.deltaX;L(j<0?"zoomIn":"zoomOut",{zoomRate:r.zoomRate,enableTransition:!1})});d.run(()=>{Vn(document,"keydown",A),Vn(document,"wheel",X)})}function I(){d.stop()}function V(){f.value=!1}function F(A){f.value=!1,A.target.alt=i("el.image.error")}function Y(A){if(f.value||A.button!==0||!u.value)return;m.value.enableTransition=!1;const{offsetX:X,offsetY:re}=m.value,j=A.pageX,ge=A.pageY,Oe=oy(te=>{m.value={...m.value,offsetX:X+te.pageX-j,offsetY:re+te.pageY-ge}}),xe=Vn(document,"mousemove",Oe);Vn(document,"mouseup",()=>{xe()}),A.preventDefault()}function Z(){m.value={scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}}function K(){if(f.value)return;const A=eb(s),X=Object.values(s),re=h.value.name,ge=(X.findIndex(Oe=>Oe.name===re)+1)%A.length;h.value=s[A[ge]],Z()}function U(A){const X=r.urlList.length;p.value=(A+X)%X}function B(){k.value&&!r.infinite||U(p.value-1)}function W(){b.value&&!r.infinite||U(p.value+1)}function L(A,X={}){if(f.value)return;const{minScale:re,maxScale:j}=r,{zoomRate:ge,rotateDeg:Oe,enableTransition:xe}={zoomRate:r.zoomRate,rotateDeg:90,enableTransition:!0,...X};switch(A){case"zoomOut":m.value.scale>re&&(m.value.scale=Number.parseFloat((m.value.scale/ge).toFixed(3)));break;case"zoomIn":m.value.scale<j&&(m.value.scale=Number.parseFloat((m.value.scale*ge).toFixed(3)));break;case"clockwise":m.value.deg+=Oe,n("rotate",m.value.deg);break;case"anticlockwise":m.value.deg-=Oe,n("rotate",m.value.deg);break}m.value.enableTransition=xe}return Me($,()=>{ot(()=>{const A=c.value[0];A!=null&&A.complete||(f.value=!0)})}),Me(p,A=>{Z(),n("switch",A)}),Ct(()=>{var A,X;P(),(X=(A=u.value)==null?void 0:A.focus)==null||X.call(A)}),t({setActiveItem:U}),(A,X)=>(C(),H(qr,{to:"body",disabled:!A.teleported},[w(_r,{name:"viewer-fade",appear:""},{default:S(()=>[_("div",{ref_key:"wrapper",ref:u,tabindex:-1,class:D(g(l).e("wrapper")),style:Ye({zIndex:y.value})},[_("div",{class:D(g(l).e("mask")),onClick:X[0]||(X[0]=Ze(re=>A.hideOnClickModal&&N(),["self"]))},null,2),z(" CLOSE "),_("span",{class:D([g(l).e("btn"),g(l).e("close")]),onClick:N},[w(g(Ie),null,{default:S(()=>[w(g(Js))]),_:1})],2),z(" ARROW "),g(v)?z("v-if",!0):(C(),T(de,{key:0},[_("span",{class:D(g(x)),onClick:B},[w(g(Ie),null,{default:S(()=>[w(g(cu))]),_:1})],2),_("span",{class:D(g(E)),onClick:W},[w(g(Ie),null,{default:S(()=>[w(g(Ws))]),_:1})],2)],64)),z(" ACTIONS "),_("div",{class:D([g(l).e("btn"),g(l).e("actions")])},[_("div",{class:D(g(l).e("actions__inner"))},[w(g(Ie),{onClick:X[1]||(X[1]=re=>L("zoomOut"))},{default:S(()=>[w(g(gJ))]),_:1}),w(g(Ie),{onClick:X[2]||(X[2]=re=>L("zoomIn"))},{default:S(()=>[w(g(uT))]),_:1}),_("i",{class:D(g(l).e("actions__divider"))},null,2),w(g(Ie),{onClick:K},{default:S(()=>[(C(),H(Pt(g(h).icon)))]),_:1}),_("i",{class:D(g(l).e("actions__divider"))},null,2),w(g(Ie),{onClick:X[3]||(X[3]=re=>L("anticlockwise"))},{default:S(()=>[w(g(lT))]),_:1}),w(g(Ie),{onClick:X[4]||(X[4]=re=>L("clockwise"))},{default:S(()=>[w(g(XZ))]),_:1})],2)],2),z(" CANVAS "),_("div",{class:D(g(l).e("canvas"))},[(C(!0),T(de,null,nt(A.urlList,(re,j)=>Fe((C(),T("img",{ref_for:!0,ref:ge=>c.value[j]=ge,key:re,src:re,style:Ye(g(M)),class:D(g(l).e("img")),crossorigin:A.crossorigin,onLoad:V,onError:F,onMousedown:Y},null,46,Ale)),[[en,j===p.value]])),128))],2),he(A.$slots,"default")],6)]),_:3})],8,["disabled"]))}});var Lle=He(Ple,[["__file","image-viewer.vue"]]);const Rle=Zt(Lle),Dle=Ke({hideOnClickModal:Boolean,src:{type:String,default:""},fit:{type:String,values:["","contain","cover","fill","none","scale-down"],default:""},loading:{type:String,values:["eager","lazy"]},lazy:Boolean,scrollContainer:{type:Ce([String,Object])},previewSrcList:{type:Ce(Array),default:()=>Eo([])},previewTeleported:Boolean,zIndex:{type:Number},initialIndex:{type:Number,default:0},infinite:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},zoomRate:{type:Number,default:1.2},minScale:{type:Number,default:.2},maxScale:{type:Number,default:7},crossorigin:{type:Ce(String)}}),Vle={load:e=>e instanceof Event,error:e=>e instanceof Event,switch:e=>_t(e),close:()=>!0,show:()=>!0},Fle=["src","loading","crossorigin"],Ble={key:0},zle=Q({name:"ElImage",inheritAttrs:!1}),jle=Q({...zle,props:Dle,emits:Vle,setup(e,{emit:t}){const n=e;let o="";const{t:r}=Kt(),s=Re("image"),i=_d(),l=hT(),a=q(),u=q(!1),c=q(!0),d=q(!1),f=q(),p=q(),h=Tt&&"loading"in HTMLImageElement.prototype;let m,y;const v=R(()=>[s.e("inner"),$.value&&s.e("preview"),c.value&&s.is("loading")]),k=R(()=>i.style),b=R(()=>{const{fit:W}=n;return Tt&&W?{objectFit:W}:{}}),$=R(()=>{const{previewSrcList:W}=n;return Array.isArray(W)&&W.length>0}),x=R(()=>{const{previewSrcList:W,initialIndex:L}=n;let A=L;return L>W.length-1&&(A=0),A}),E=R(()=>n.loading==="eager"?!1:!h&&n.loading==="lazy"||n.lazy),M=()=>{Tt&&(c.value=!0,u.value=!1,a.value=n.src)};function N(W){c.value=!1,u.value=!1,t("load",W)}function P(W){c.value=!1,u.value=!0,t("error",W)}function I(){gH(f.value,p.value)&&(M(),Y())}const V=Zj(I,200,!0);async function F(){var W;if(!Tt)return;await ot();const{scrollContainer:L}=n;ys(L)?p.value=L:tt(L)&&L!==""?p.value=(W=document.querySelector(L))!=null?W:void 0:f.value&&(p.value=CY(f.value)),p.value&&(m=Vn(p,"scroll",V),setTimeout(()=>I(),100))}function Y(){!Tt||!p.value||!V||(m==null||m(),p.value=void 0)}function Z(W){if(W.ctrlKey){if(W.deltaY<0)return W.preventDefault(),!1;if(W.deltaY>0)return W.preventDefault(),!1}}function K(){$.value&&(y=Vn("wheel",Z,{passive:!1}),o=document.body.style.overflow,document.body.style.overflow="hidden",d.value=!0,t("show"))}function U(){y==null||y(),document.body.style.overflow=o,d.value=!1,t("close")}function B(W){t("switch",W)}return Me(()=>n.src,()=>{E.value?(c.value=!0,u.value=!1,Y(),F()):M()}),Ct(()=>{E.value?F():M()}),(W,L)=>(C(),T("div",{ref_key:"container",ref:f,class:D([g(s).b(),W.$attrs.class]),style:Ye(g(k))},[u.value?he(W.$slots,"error",{key:0},()=>[_("div",{class:D(g(s).e("error"))},O(g(r)("el.image.error")),3)]):(C(),T(de,{key:1},[a.value!==void 0?(C(),T("img",un({key:0},g(l),{src:a.value,loading:W.loading,style:g(b),class:g(v),crossorigin:W.crossorigin,onClick:K,onLoad:N,onError:P}),null,16,Fle)):z("v-if",!0),c.value?(C(),T("div",{key:1,class:D(g(s).e("wrapper"))},[he(W.$slots,"placeholder",{},()=>[_("div",{class:D(g(s).e("placeholder"))},null,2)])],2)):z("v-if",!0)],64)),g($)?(C(),T(de,{key:2},[d.value?(C(),H(g(Rle),{key:0,"z-index":W.zIndex,"initial-index":g(x),infinite:W.infinite,"zoom-rate":W.zoomRate,"min-scale":W.minScale,"max-scale":W.maxScale,"url-list":W.previewSrcList,"hide-on-click-modal":W.hideOnClickModal,teleported:W.previewTeleported,"close-on-press-escape":W.closeOnPressEscape,onClose:U,onSwitch:B},{default:S(()=>[W.$slots.viewer?(C(),T("div",Ble,[he(W.$slots,"viewer")])):z("v-if",!0)]),_:3},8,["z-index","initial-index","infinite","zoom-rate","min-scale","max-scale","url-list","hide-on-click-modal","teleported","close-on-press-escape"])):z("v-if",!0)],64)):z("v-if",!0)],6))}});var Hle=He(jle,[["__file","image.vue"]]);const xd=Zt(Hle),Ule=Ke({id:{type:String,default:void 0},step:{type:Number,default:1},stepStrictly:Boolean,max:{type:Number,default:Number.POSITIVE_INFINITY},min:{type:Number,default:Number.NEGATIVE_INFINITY},modelValue:Number,readonly:Boolean,disabled:Boolean,size:Gr,controls:{type:Boolean,default:!0},controlsPosition:{type:String,default:"",values:["","right"]},valueOnClear:{type:[String,Number,null],validator:e=>e===null||_t(e)||["min","max"].includes(e),default:null},name:String,label:String,placeholder:String,precision:{type:Number,validator:e=>e>=0&&e===Number.parseInt(`${e}`,10)},validateEvent:{type:Boolean,default:!0}}),Wle={[Cd]:(e,t)=>t!==e,blur:e=>e instanceof FocusEvent,focus:e=>e instanceof FocusEvent,[Zm]:e=>_t(e)||To(e),[Jt]:e=>_t(e)||To(e)},Kle=["aria-label","onKeydown"],qle=["aria-label","onKeydown"],Gle=Q({name:"ElInputNumber"}),Yle=Q({...Gle,props:Ule,emits:Wle,setup(e,{expose:t,emit:n}){const o=e,{t:r}=Kt(),s=Re("input-number"),i=q(),l=Bn({currentValue:o.modelValue,userInput:null}),{formItem:a}=si(),u=R(()=>_t(o.modelValue)&&o.modelValue<=o.min),c=R(()=>_t(o.modelValue)&&o.modelValue>=o.max),d=R(()=>{const K=v(o.step);return Uo(o.precision)?Math.max(v(o.modelValue),K):(K>o.precision,o.precision)}),f=R(()=>o.controls&&o.controlsPosition==="right"),p=Jo(),h=Yr(),m=R(()=>{if(l.userInput!==null)return l.userInput;let K=l.currentValue;if(To(K))return"";if(_t(K)){if(Number.isNaN(K))return"";Uo(o.precision)||(K=K.toFixed(o.precision))}return K}),y=(K,U)=>{if(Uo(U)&&(U=d.value),U===0)return Math.round(K);let B=String(K);const W=B.indexOf(".");if(W===-1||!B.replace(".","").split("")[W+U])return K;const X=B.length;return B.charAt(X-1)==="5"&&(B=`${B.slice(0,Math.max(0,X-1))}6`),Number.parseFloat(Number(B).toFixed(U))},v=K=>{if(To(K))return 0;const U=K.toString(),B=U.indexOf(".");let W=0;return B!==-1&&(W=U.length-B-1),W},k=(K,U=1)=>_t(K)?y(K+o.step*U):l.currentValue,b=()=>{if(o.readonly||h.value||c.value)return;const K=Number(m.value)||0,U=k(K);E(U),n(Zm,l.currentValue),Y()},$=()=>{if(o.readonly||h.value||u.value)return;const K=Number(m.value)||0,U=k(K,-1);E(U),n(Zm,l.currentValue),Y()},x=(K,U)=>{const{max:B,min:W,step:L,precision:A,stepStrictly:X,valueOnClear:re}=o;B<W&&Cs("InputNumber","min should not be greater than max.");let j=Number(K);if(To(K)||Number.isNaN(j))return null;if(K===""){if(re===null)return null;j=tt(re)?{min:W,max:B}[re]:re}return X&&(j=y(Math.round(j/L)*L,A)),Uo(A)||(j=y(j,A)),(j>B||j<W)&&(j=j>B?B:W,U&&n(Jt,j)),j},E=(K,U=!0)=>{var B;const W=l.currentValue,L=x(K);if(!U){n(Jt,L);return}W===L&&K||(l.userInput=null,n(Jt,L),W!==L&&n(Cd,L,W),o.validateEvent&&((B=a==null?void 0:a.validate)==null||B.call(a,"change").catch(A=>void 0)),l.currentValue=L)},M=K=>{l.userInput=K;const U=K===""?null:Number(K);n(Zm,U),E(U,!1)},N=K=>{const U=K!==""?Number(K):"";(_t(U)&&!Number.isNaN(U)||K==="")&&E(U),Y(),l.userInput=null},P=()=>{var K,U;(U=(K=i.value)==null?void 0:K.focus)==null||U.call(K)},I=()=>{var K,U;(U=(K=i.value)==null?void 0:K.blur)==null||U.call(K)},V=K=>{n("focus",K)},F=K=>{var U;l.userInput=null,n("blur",K),o.validateEvent&&((U=a==null?void 0:a.validate)==null||U.call(a,"blur").catch(B=>void 0))},Y=()=>{l.currentValue!==o.modelValue&&(l.currentValue=o.modelValue)},Z=K=>{document.activeElement===K.target&&K.preventDefault()};return Me(()=>o.modelValue,(K,U)=>{const B=x(K,!0);l.userInput===null&&B!==U&&(l.currentValue=B)},{immediate:!0}),Ct(()=>{var K;const{min:U,max:B,modelValue:W}=o,L=(K=i.value)==null?void 0:K.input;if(L.setAttribute("role","spinbutton"),Number.isFinite(B)?L.setAttribute("aria-valuemax",String(B)):L.removeAttribute("aria-valuemax"),Number.isFinite(U)?L.setAttribute("aria-valuemin",String(U)):L.removeAttribute("aria-valuemin"),L.setAttribute("aria-valuenow",l.currentValue||l.currentValue===0?String(l.currentValue):""),L.setAttribute("aria-disabled",String(h.value)),!_t(W)&&W!=null){let A=Number(W);Number.isNaN(A)&&(A=null),n(Jt,A)}}),Fi(()=>{var K,U;const B=(K=i.value)==null?void 0:K.input;B==null||B.setAttribute("aria-valuenow",`${(U=l.currentValue)!=null?U:""}`)}),t({focus:P,blur:I}),(K,U)=>(C(),T("div",{class:D([g(s).b(),g(s).m(g(p)),g(s).is("disabled",g(h)),g(s).is("without-controls",!K.controls),g(s).is("controls-right",g(f))]),onDragstart:U[0]||(U[0]=Ze(()=>{},["prevent"]))},[K.controls?Fe((C(),T("span",{key:0,role:"button","aria-label":g(r)("el.inputNumber.decrease"),class:D([g(s).e("decrease"),g(s).is("disabled",g(u))]),onKeydown:Mt($,["enter"])},[he(K.$slots,"decrease-icon",{},()=>[w(g(Ie),null,{default:S(()=>[g(f)?(C(),H(g(Eu),{key:0})):(C(),H(g(NZ),{key:1}))]),_:1})])],42,Kle)),[[g(Fg),$]]):z("v-if",!0),K.controls?Fe((C(),T("span",{key:1,role:"button","aria-label":g(r)("el.inputNumber.increase"),class:D([g(s).e("increase"),g(s).is("disabled",g(c))]),onKeydown:Mt(b,["enter"])},[he(K.$slots,"increase-icon",{},()=>[w(g(Ie),null,{default:S(()=>[g(f)?(C(),H(g(D0),{key:0})):(C(),H(g(hw),{key:1}))]),_:1})])],42,qle)),[[g(Fg),b]]):z("v-if",!0),w(g($t),{id:K.id,ref_key:"input",ref:i,type:"number",step:K.step,"model-value":g(m),placeholder:K.placeholder,readonly:K.readonly,disabled:g(h),size:g(p),max:K.max,min:K.min,name:K.name,label:K.label,"validate-event":!1,onWheel:Z,onKeydown:[Mt(Ze(b,["prevent"]),["up"]),Mt(Ze($,["prevent"]),["down"])],onBlur:F,onFocus:V,onInput:M,onChange:N},null,8,["id","step","model-value","placeholder","readonly","disabled","size","max","min","name","label","onKeydown"])],34))}});var Zle=He(Yle,[["__file","input-number.vue"]]);const vO=Zt(Zle),yO=Symbol("elPaginationKey"),Jle=Ke({disabled:Boolean,currentPage:{type:Number,default:1},prevText:{type:String},prevIcon:{type:Io}}),Xle={click:e=>e instanceof MouseEvent},Qle=["disabled","aria-label","aria-disabled"],eae={key:0},tae=Q({name:"ElPaginationPrev"}),nae=Q({...tae,props:Jle,emits:Xle,setup(e){const t=e,{t:n}=Kt(),o=R(()=>t.disabled||t.currentPage<=1);return(r,s)=>(C(),T("button",{type:"button",class:"btn-prev",disabled:g(o),"aria-label":r.prevText||g(n)("el.pagination.prev"),"aria-disabled":g(o),onClick:s[0]||(s[0]=i=>r.$emit("click",i))},[r.prevText?(C(),T("span",eae,O(r.prevText),1)):(C(),H(g(Ie),{key:1},{default:S(()=>[(C(),H(Pt(r.prevIcon)))]),_:1}))],8,Qle))}});var oae=He(nae,[["__file","prev.vue"]]);const rae=Ke({disabled:Boolean,currentPage:{type:Number,default:1},pageCount:{type:Number,default:50},nextText:{type:String},nextIcon:{type:Io}}),sae=["disabled","aria-label","aria-disabled"],iae={key:0},lae=Q({name:"ElPaginationNext"}),aae=Q({...lae,props:rae,emits:["click"],setup(e){const t=e,{t:n}=Kt(),o=R(()=>t.disabled||t.currentPage===t.pageCount||t.pageCount===0);return(r,s)=>(C(),T("button",{type:"button",class:"btn-next",disabled:g(o),"aria-label":r.nextText||g(n)("el.pagination.next"),"aria-disabled":g(o),onClick:s[0]||(s[0]=i=>r.$emit("click",i))},[r.nextText?(C(),T("span",iae,O(r.nextText),1)):(C(),H(g(Ie),{key:1},{default:S(()=>[(C(),H(Pt(r.nextIcon)))]),_:1}))],8,sae))}});var uae=He(aae,[["__file","next.vue"]]);const _O=Symbol("ElSelectGroup"),Q0=Symbol("ElSelect");function cae(e,t){const n=je(Q0),o=je(_O,{disabled:!1}),r=R(()=>n.props.multiple?c(n.props.modelValue,e.value):c([n.props.modelValue],e.value)),s=R(()=>{if(n.props.multiple){const p=n.props.modelValue||[];return!r.value&&p.length>=n.props.multipleLimit&&n.props.multipleLimit>0}else return!1}),i=R(()=>e.label||(pt(e.value)?"":e.value)),l=R(()=>e.value||e.label||""),a=R(()=>e.disabled||t.groupDisabled||s.value),u=at(),c=(p=[],h)=>{if(pt(e.value)){const m=n.props.valueKey;return p&&p.some(y=>Ot(Mr(y,m))===Mr(h,m))}else return p&&p.includes(h)},d=()=>{!e.disabled&&!o.disabled&&(n.states.hoveringIndex=n.optionsArray.indexOf(u.proxy))},f=p=>{const h=new RegExp(yY(p),"i");t.visible=h.test(i.value)||e.created};return Me(()=>i.value,()=>{!e.created&&!n.props.remote&&n.setSelected()}),Me(()=>e.value,(p,h)=>{const{remote:m,valueKey:y}=n.props;if(Hl(p,h)||(n.onOptionDestroy(h,u.proxy),n.onOptionCreate(u.proxy)),!e.created&&!m){if(y&&pt(p)&&pt(h)&&p[y]===h[y])return;n.setSelected()}}),Me(()=>o.disabled,()=>{t.groupDisabled=o.disabled},{immediate:!0}),{select:n,currentLabel:i,currentValue:l,itemSelected:r,isDisabled:a,hoverItem:d,updateOption:f}}const dae=Q({name:"ElOption",componentName:"ElOption",props:{value:{required:!0,type:[String,Number,Boolean,Object]},label:[String,Number],created:Boolean,disabled:Boolean},setup(e){const t=Re("select"),n=Hr(),o=R(()=>[t.be("dropdown","item"),t.is("disabled",g(l)),t.is("selected",g(i)),t.is("hovering",g(f))]),r=Bn({index:-1,groupDisabled:!1,visible:!0,hover:!1}),{currentLabel:s,itemSelected:i,isDisabled:l,select:a,hoverItem:u,updateOption:c}=cae(e,r),{visible:d,hover:f}=oi(r),p=at().proxy;a.onOptionCreate(p),xn(()=>{const m=p.value,{selected:y}=a.states,k=(a.props.multiple?y:[y]).some(b=>b.value===p.value);ot(()=>{a.states.cachedOptions.get(m)===p&&!k&&a.states.cachedOptions.delete(m)}),a.onOptionDestroy(m,p)});function h(){e.disabled!==!0&&r.groupDisabled!==!0&&a.handleOptionSelect(p)}return{ns:t,id:n,containerKls:o,currentLabel:s,itemSelected:i,isDisabled:l,select:a,hoverItem:u,updateOption:c,visible:d,hover:f,selectOptionClick:h,states:r}}}),fae=["id","aria-disabled","aria-selected"];function pae(e,t,n,o,r,s){return Fe((C(),T("li",{id:e.id,class:D(e.containerKls),role:"option","aria-disabled":e.isDisabled||void 0,"aria-selected":e.itemSelected,onMouseenter:t[0]||(t[0]=(...i)=>e.hoverItem&&e.hoverItem(...i)),onClick:t[1]||(t[1]=Ze((...i)=>e.selectOptionClick&&e.selectOptionClick(...i),["stop"]))},[he(e.$slots,"default",{},()=>[_("span",null,O(e.currentLabel),1)])],42,fae)),[[en,e.visible]])}var Yw=He(dae,[["render",pae],["__file","option.vue"]]);const hae=Q({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const e=je(Q0),t=Re("select"),n=R(()=>e.props.popperClass),o=R(()=>e.props.multiple),r=R(()=>e.props.fitInputWidth),s=q("");function i(){var l;s.value=`${(l=e.selectRef)==null?void 0:l.offsetWidth}px`}return Ct(()=>{i(),Bo(e.selectRef,i)}),{ns:t,minWidth:s,popperClass:n,isMultiple:o,isFitInputWidth:r}}});function mae(e,t,n,o,r,s){return C(),T("div",{class:D([e.ns.b("dropdown"),e.ns.is("multiple",e.isMultiple),e.popperClass]),style:Ye({[e.isFitInputWidth?"width":"minWidth"]:e.minWidth})},[e.$slots.header?(C(),T("div",{key:0,class:D(e.ns.be("dropdown","header"))},[he(e.$slots,"header")],2)):z("v-if",!0),he(e.$slots,"default"),e.$slots.footer?(C(),T("div",{key:1,class:D(e.ns.be("dropdown","footer"))},[he(e.$slots,"footer")],2)):z("v-if",!0)],6)}var gae=He(hae,[["render",mae],["__file","select-dropdown.vue"]]);function vae(e){const t=q(!1);return{handleCompositionStart:()=>{t.value=!0},handleCompositionUpdate:s=>{const i=s.target.value,l=i[i.length-1]||"";t.value=!pT(l)},handleCompositionEnd:s=>{t.value&&(t.value=!1,et(e)&&e(s))}}}const yae=11,_ae=(e,t)=>{const{t:n}=Kt(),o=Hr(),r=Re("select"),s=Re("input"),i=Bn({inputValue:"",options:new Map,cachedOptions:new Map,disabledOptions:new Map,optionValues:[],selected:e.multiple?[]:{},selectionWidth:0,calculatorWidth:0,collapseItemWidth:0,selectedLabel:"",hoveringIndex:-1,previousQuery:null,inputHovering:!1,menuVisibleOnFocus:!1,isBeforeHide:!1}),l=q(null),a=q(null),u=q(null),c=q(null),d=q(null),f=q(null),p=q(null),h=q(null),m=q(null),y=q(null),v=q(null),k=q(null),{wrapperRef:b,isFocused:$,handleFocus:x,handleBlur:E}=Aw(d,{afterFocus(){e.automaticDropdown&&!M.value&&(M.value=!0,i.menuVisibleOnFocus=!0)},beforeBlur(be){var qe,tn;return((qe=u.value)==null?void 0:qe.isFocusInsideContent(be))||((tn=c.value)==null?void 0:tn.isFocusInsideContent(be))},afterBlur(){M.value=!1,i.menuVisibleOnFocus=!1}}),M=q(!1),N=q(),{form:P,formItem:I}=si(),{inputId:V}=Sd(e,{formItemContext:I}),{valueOnClear:F,isEmptyValue:Y}=YT(e),Z=R(()=>e.disabled||(P==null?void 0:P.disabled)),K=R(()=>e.multiple?Te(e.modelValue)&&e.modelValue.length>0:!Y(e.modelValue)),U=R(()=>e.clearable&&!Z.value&&i.inputHovering&&K.value),B=R(()=>e.remote&&e.filterable&&!e.remoteShowSuffix?"":e.suffixIcon),W=R(()=>r.is("reverse",B.value&&M.value)),L=R(()=>(I==null?void 0:I.validateState)||""),A=R(()=>fT[L.value]),X=R(()=>e.remote?300:0),re=R(()=>e.loading?e.loadingText||n("el.select.loading"):e.remote&&!i.inputValue&&i.options.size===0?!1:e.filterable&&i.inputValue&&i.options.size>0&&j.value===0?e.noMatchText||n("el.select.noMatch"):i.options.size===0?e.noDataText||n("el.select.noData"):null),j=R(()=>ge.value.filter(be=>be.visible).length),ge=R(()=>{const be=Array.from(i.options.values()),qe=[];return i.optionValues.forEach(tn=>{const In=be.findIndex(Wi=>Wi.value===tn);In>-1&&qe.push(be[In])}),qe.length>=be.length?qe:be}),Oe=R(()=>Array.from(i.cachedOptions.values())),xe=R(()=>{const be=ge.value.filter(qe=>!qe.created).some(qe=>qe.currentLabel===i.inputValue);return e.filterable&&e.allowCreate&&i.inputValue!==""&&!be}),te=()=>{e.filterable&&et(e.filterMethod)||e.filterable&&e.remote&&et(e.remoteMethod)||ge.value.forEach(be=>{var qe;(qe=be.updateOption)==null||qe.call(be,i.inputValue)})},fe=Jo(),ve=R(()=>["small"].includes(fe.value)?"small":"default"),le=R({get(){return M.value&&re.value!==!1},set(be){M.value=be}}),Ae=R(()=>Te(e.modelValue)?e.modelValue.length===0&&!i.inputValue:e.filterable?!i.inputValue:!0),Ge=R(()=>{var be;const qe=(be=e.placeholder)!=null?be:n("el.select.placeholder");return e.multiple||!K.value?qe:i.selectedLabel});Me(()=>e.modelValue,(be,qe)=>{e.multiple&&e.filterable&&!e.reserveKeyword&&(i.inputValue="",G("")),ue(),!Hl(be,qe)&&e.validateEvent&&(I==null||I.validate("change").catch(tn=>void 0))},{flush:"post",deep:!0}),Me(()=>M.value,be=>{be?G(i.inputValue):(i.inputValue="",i.previousQuery=null,i.isBeforeHide=!0),t("visible-change",be)}),Me(()=>i.options.entries(),()=>{var be;if(!Tt)return;const qe=((be=l.value)==null?void 0:be.querySelectorAll("input"))||[];(!e.filterable&&!e.defaultFirstOption&&!Uo(e.modelValue)||!Array.from(qe).includes(document.activeElement))&&ue(),e.defaultFirstOption&&(e.filterable||e.remote)&&j.value&&J()},{flush:"post"}),Me(()=>i.hoveringIndex,be=>{_t(be)&&be>-1?N.value=ge.value[be]||{}:N.value={},ge.value.forEach(qe=>{qe.hover=N.value===qe})}),as(()=>{i.isBeforeHide||te()});const G=be=>{i.previousQuery!==be&&(i.previousQuery=be,e.filterable&&et(e.filterMethod)?e.filterMethod(be):e.filterable&&e.remote&&et(e.remoteMethod)&&e.remoteMethod(be),e.defaultFirstOption&&(e.filterable||e.remote)&&j.value?ot(J):ot(ye))},J=()=>{const be=ge.value.filter(In=>In.visible&&!In.disabled&&!In.states.groupDisabled),qe=be.find(In=>In.created),tn=be[0];i.hoveringIndex=we(ge.value,qe||tn)},ue=()=>{if(e.multiple)i.selectedLabel="";else{const qe=_e(e.modelValue);i.selectedLabel=qe.currentLabel,i.selected=qe;return}const be=[];Te(e.modelValue)&&e.modelValue.forEach(qe=>{be.push(_e(qe))}),i.selected=be},_e=be=>{let qe;const tn=zm(be).toLowerCase()==="object",In=zm(be).toLowerCase()==="null",Wi=zm(be).toLowerCase()==="undefined";for(let ca=i.cachedOptions.size-1;ca>=0;ca--){const Ms=Oe.value[ca];if(tn?Mr(Ms.value,e.valueKey)===Mr(be,e.valueKey):Ms.value===be){qe={value:be,currentLabel:Ms.currentLabel,isDisabled:Ms.isDisabled};break}}if(qe)return qe;const Iu=tn?be.label:!In&&!Wi?be:"";return{value:be,currentLabel:Iu}},ye=()=>{e.multiple?i.hoveringIndex=ge.value.findIndex(be=>i.selected.some(qe=>Bd(qe)===Bd(be))):i.hoveringIndex=ge.value.findIndex(be=>Bd(be)===Bd(i.selected))},Ne=()=>{i.selectionWidth=a.value.getBoundingClientRect().width},Le=()=>{i.calculatorWidth=f.value.getBoundingClientRect().width},Ee=()=>{i.collapseItemWidth=v.value.getBoundingClientRect().width},Pe=()=>{var be,qe;(qe=(be=u.value)==null?void 0:be.updatePopper)==null||qe.call(be)},me=()=>{var be,qe;(qe=(be=c.value)==null?void 0:be.updatePopper)==null||qe.call(be)},Ue=()=>{i.inputValue.length>0&&!M.value&&(M.value=!0),G(i.inputValue)},Xe=be=>{if(i.inputValue=be.target.value,e.remote)ce();else return Ue()},ce=jl(()=>{Ue()},X.value),oe=be=>{Hl(e.modelValue,be)||t(Cd,be)},pe=be=>rY(be,qe=>!i.disabledOptions.has(qe)),ze=be=>{if(e.multiple&&be.code!==rt.delete&&be.target.value.length<=0){const qe=e.modelValue.slice(),tn=pe(qe);if(tn<0)return;qe.splice(tn,1),t(Jt,qe),oe(qe)}},Qe=(be,qe)=>{const tn=i.selected.indexOf(qe);if(tn>-1&&!Z.value){const In=e.modelValue.slice();In.splice(tn,1),t(Jt,In),oe(In),t("remove-tag",qe.value)}be.stopPropagation(),qn()},$e=be=>{be.stopPropagation();const qe=e.multiple?[]:F.value;if(e.multiple)for(const tn of i.selected)tn.isDisabled&&qe.push(tn.value);t(Jt,qe),oe(qe),i.hoveringIndex=-1,M.value=!1,t("clear"),qn()},ie=be=>{if(e.multiple){const qe=(e.modelValue||[]).slice(),tn=we(qe,be.value);tn>-1?qe.splice(tn,1):(e.multipleLimit<=0||qe.length<e.multipleLimit)&&qe.push(be.value),t(Jt,qe),oe(qe),be.created&&G(""),e.filterable&&!e.reserveKeyword&&(i.inputValue="")}else t(Jt,be.value),oe(be.value),M.value=!1;qn(),!M.value&&ot(()=>{ae(be)})},we=(be=[],qe)=>{if(!pt(qe))return be.indexOf(qe);const tn=e.valueKey;let In=-1;return be.some((Wi,Iu)=>Ot(Mr(Wi,tn))===Mr(qe,tn)?(In=Iu,!0):!1),In},ae=be=>{var qe,tn,In,Wi,Iu;const qh=Te(be)?be[0]:be;let ca=null;if(qh!=null&&qh.value){const Ms=ge.value.filter(t4=>t4.value===qh.value);Ms.length>0&&(ca=Ms[0].$el)}if(u.value&&ca){const Ms=(Wi=(In=(tn=(qe=u.value)==null?void 0:qe.popperRef)==null?void 0:tn.contentRef)==null?void 0:In.querySelector)==null?void 0:Wi.call(In,`.${r.be("dropdown","wrap")}`);Ms&&SY(Ms,ca)}(Iu=k.value)==null||Iu.handleScroll()},Se=be=>{i.options.set(be.value,be),i.cachedOptions.set(be.value,be),be.disabled&&i.disabledOptions.set(be.value,be)},Ve=(be,qe)=>{i.options.get(be)===qe&&i.options.delete(be)},{handleCompositionStart:st,handleCompositionUpdate:se,handleCompositionEnd:De}=vae(be=>Xe(be)),At=R(()=>{var be,qe;return(qe=(be=u.value)==null?void 0:be.popperRef)==null?void 0:qe.contentRef}),mn=()=>{i.isBeforeHide=!1,ot(()=>ae(i.selected))},qn=()=>{var be;(be=d.value)==null||be.focus()},Jr=()=>{nr()},qt=be=>{$e(be)},nr=be=>{if(M.value=!1,$.value){const qe=new FocusEvent("focus",be);ot(()=>E(qe))}},vR=()=>{i.inputValue.length>0?i.inputValue="":M.value=!1},Qk=()=>{Z.value||(i.menuVisibleOnFocus?i.menuVisibleOnFocus=!1:M.value=!M.value)},yR=()=>{M.value?ge.value[i.hoveringIndex]&&ie(ge.value[i.hoveringIndex]):Qk()},Bd=be=>pt(be.value)?Mr(be.value,e.valueKey):be.value,_R=R(()=>ge.value.filter(be=>be.visible).every(be=>be.disabled)),bR=R(()=>e.multiple?e.collapseTags?i.selected.slice(0,e.maxCollapseTags):i.selected:[]),wR=R(()=>e.multiple?e.collapseTags?i.selected.slice(e.maxCollapseTags):[]:[]),e4=be=>{if(!M.value){M.value=!0;return}if(!(i.options.size===0||j.value===0)&&!_R.value){be==="next"?(i.hoveringIndex++,i.hoveringIndex===i.options.size&&(i.hoveringIndex=0)):be==="prev"&&(i.hoveringIndex--,i.hoveringIndex<0&&(i.hoveringIndex=i.options.size-1));const qe=ge.value[i.hoveringIndex];(qe.disabled===!0||qe.states.groupDisabled===!0||!qe.visible)&&e4(be),ot(()=>ae(N.value))}},CR=()=>{if(!a.value)return 0;const be=window.getComputedStyle(a.value);return Number.parseFloat(be.gap||"6px")},kR=R(()=>{const be=CR();return{maxWidth:`${v.value&&e.maxCollapseTags===1?i.selectionWidth-i.collapseItemWidth-be:i.selectionWidth}px`}}),SR=R(()=>({maxWidth:`${i.selectionWidth}px`})),$R=R(()=>({width:`${Math.max(i.calculatorWidth,yae)}px`}));return e.multiple&&!Te(e.modelValue)&&t(Jt,[]),!e.multiple&&Te(e.modelValue)&&t(Jt,""),Bo(a,Ne),Bo(f,Le),Bo(m,Pe),Bo(b,Pe),Bo(y,me),Bo(v,Ee),Ct(()=>{ue()}),{inputId:V,contentId:o,nsSelect:r,nsInput:s,states:i,isFocused:$,expanded:M,optionsArray:ge,hoverOption:N,selectSize:fe,filteredOptionsCount:j,resetCalculatorWidth:Le,updateTooltip:Pe,updateTagTooltip:me,debouncedOnInputChange:ce,onInput:Xe,deletePrevTag:ze,deleteTag:Qe,deleteSelected:$e,handleOptionSelect:ie,scrollToOption:ae,hasModelValue:K,shouldShowPlaceholder:Ae,currentPlaceholder:Ge,showClose:U,iconComponent:B,iconReverse:W,validateState:L,validateIcon:A,showNewOption:xe,updateOptions:te,collapseTagSize:ve,setSelected:ue,selectDisabled:Z,emptyText:re,handleCompositionStart:st,handleCompositionUpdate:se,handleCompositionEnd:De,onOptionCreate:Se,onOptionDestroy:Ve,handleMenuEnter:mn,handleFocus:x,focus:qn,blur:Jr,handleBlur:E,handleClearClick:qt,handleClickOutside:nr,handleEsc:vR,toggleMenu:Qk,selectOption:yR,getValueKey:Bd,navigateOptions:e4,dropdownMenuVisible:le,showTagList:bR,collapseTagList:wR,tagStyle:kR,collapseTagStyle:SR,inputStyle:$R,popperRef:At,inputRef:d,tooltipRef:u,tagTooltipRef:c,calculatorRef:f,prefixRef:p,suffixRef:h,selectRef:l,wrapperRef:b,selectionRef:a,scrollbarRef:k,menuRef:m,tagMenuRef:y,collapseItemRef:v}};var bae=Q({name:"ElOptions",setup(e,{slots:t}){const n=je(Q0);let o=[];return()=>{var r,s;const i=(r=t.default)==null?void 0:r.call(t),l=[];function a(u){Te(u)&&u.forEach(c=>{var d,f,p,h;const m=(d=(c==null?void 0:c.type)||{})==null?void 0:d.name;m==="ElOptionGroup"?a(!tt(c.children)&&!Te(c.children)&&et((f=c.children)==null?void 0:f.default)?(p=c.children)==null?void 0:p.default():c.children):m==="ElOption"?l.push((h=c.props)==null?void 0:h.value):Te(c.children)&&a(c.children)})}return i.length&&a((s=i[0])==null?void 0:s.children),Hl(l,o)||(o=l,n&&(n.states.optionValues=l)),i}}});const wae=Ke({name:String,id:String,modelValue:{type:[Array,String,Number,Boolean,Object],default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:Gr,effect:{type:Ce(String),default:"light"},disabled:Boolean,clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:String,default:""},popperOptions:{type:Ce(Object),default:()=>({})},remote:Boolean,loadingText:String,noMatchText:String,noDataText:String,remoteMethod:Function,filterMethod:Function,multiple:Boolean,multipleLimit:{type:Number,default:0},placeholder:{type:String},defaultFirstOption:Boolean,reserveKeyword:{type:Boolean,default:!0},valueKey:{type:String,default:"value"},collapseTags:Boolean,collapseTagsTooltip:Boolean,maxCollapseTags:{type:Number,default:1},teleported:ar.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:Io,default:wd},fitInputWidth:Boolean,suffixIcon:{type:Io,default:Eu},tagType:{...BM.type,default:"info"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:Boolean,placement:{type:Ce(String),values:B0,default:"bottom-start"},fallbackPlacements:{type:Ce(Array),default:["bottom-start","top-start","right","left"]},ariaLabel:{type:String,default:void 0},...Nw}),S8="ElSelect",Cae=Q({name:S8,componentName:S8,components:{ElInput:$t,ElSelectMenu:gae,ElOption:Yw,ElOptions:bae,ElTag:vh,ElScrollbar:Ss,ElTooltip:ea,ElIcon:Ie},directives:{ClickOutside:id},props:wae,emits:[Jt,Cd,"remove-tag","clear","visible-change","focus","blur"],setup(e,{emit:t}){const n=_ae(e,t);return wt(Q0,Bn({props:e,states:n.states,optionsArray:n.optionsArray,handleOptionSelect:n.handleOptionSelect,onOptionCreate:n.onOptionCreate,onOptionDestroy:n.onOptionDestroy,selectRef:n.selectRef,setSelected:n.setSelected})),{...n}}}),kae=["id","disabled","autocomplete","readonly","aria-activedescendant","aria-controls","aria-expanded","aria-label"],Sae=["textContent"];function $ae(e,t,n,o,r,s){const i=ee("el-tag"),l=ee("el-tooltip"),a=ee("el-icon"),u=ee("el-option"),c=ee("el-options"),d=ee("el-scrollbar"),f=ee("el-select-menu"),p=Rt("click-outside");return Fe((C(),T("div",{ref:"selectRef",class:D([e.nsSelect.b(),e.nsSelect.m(e.selectSize)]),onMouseenter:t[16]||(t[16]=h=>e.states.inputHovering=!0),onMouseleave:t[17]||(t[17]=h=>e.states.inputHovering=!1),onClick:t[18]||(t[18]=Ze((...h)=>e.toggleMenu&&e.toggleMenu(...h),["prevent","stop"]))},[w(l,{ref:"tooltipRef",visible:e.dropdownMenuVisible,placement:e.placement,teleported:e.teleported,"popper-class":[e.nsSelect.e("popper"),e.popperClass],"popper-options":e.popperOptions,"fallback-placements":e.fallbackPlacements,effect:e.effect,pure:"",trigger:"click",transition:`${e.nsSelect.namespace.value}-zoom-in-top`,"stop-popper-mouse-event":!1,"gpu-acceleration":!1,persistent:e.persistent,onBeforeShow:e.handleMenuEnter,onHide:t[15]||(t[15]=h=>e.states.isBeforeHide=!1)},{default:S(()=>{var h;return[_("div",{ref:"wrapperRef",class:D([e.nsSelect.e("wrapper"),e.nsSelect.is("focused",e.isFocused),e.nsSelect.is("hovering",e.states.inputHovering),e.nsSelect.is("filterable",e.filterable),e.nsSelect.is("disabled",e.selectDisabled)])},[e.$slots.prefix?(C(),T("div",{key:0,ref:"prefixRef",class:D(e.nsSelect.e("prefix"))},[he(e.$slots,"prefix")],2)):z("v-if",!0),_("div",{ref:"selectionRef",class:D([e.nsSelect.e("selection"),e.nsSelect.is("near",e.multiple&&!e.$slots.prefix&&!!e.states.selected.length)])},[e.multiple?he(e.$slots,"tag",{key:0},()=>[(C(!0),T(de,null,nt(e.showTagList,m=>(C(),T("div",{key:e.getValueKey(m),class:D(e.nsSelect.e("selected-item"))},[w(i,{closable:!e.selectDisabled&&!m.isDisabled,size:e.collapseTagSize,type:e.tagType,"disable-transitions":"",style:Ye(e.tagStyle),onClose:y=>e.deleteTag(y,m)},{default:S(()=>[_("span",{class:D(e.nsSelect.e("tags-text"))},O(m.currentLabel),3)]),_:2},1032,["closable","size","type","style","onClose"])],2))),128)),e.collapseTags&&e.states.selected.length>e.maxCollapseTags?(C(),H(l,{key:0,ref:"tagTooltipRef",disabled:e.dropdownMenuVisible||!e.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],effect:e.effect,placement:"bottom",teleported:e.teleported},{default:S(()=>[_("div",{ref:"collapseItemRef",class:D(e.nsSelect.e("selected-item"))},[w(i,{closable:!1,size:e.collapseTagSize,type:e.tagType,"disable-transitions":"",style:Ye(e.collapseTagStyle)},{default:S(()=>[_("span",{class:D(e.nsSelect.e("tags-text"))}," + "+O(e.states.selected.length-e.maxCollapseTags),3)]),_:1},8,["size","type","style"])],2)]),content:S(()=>[_("div",{ref:"tagMenuRef",class:D(e.nsSelect.e("selection"))},[(C(!0),T(de,null,nt(e.collapseTagList,m=>(C(),T("div",{key:e.getValueKey(m),class:D(e.nsSelect.e("selected-item"))},[w(i,{class:"in-tooltip",closable:!e.selectDisabled&&!m.isDisabled,size:e.collapseTagSize,type:e.tagType,"disable-transitions":"",onClose:y=>e.deleteTag(y,m)},{default:S(()=>[_("span",{class:D(e.nsSelect.e("tags-text"))},O(m.currentLabel),3)]),_:2},1032,["closable","size","type","onClose"])],2))),128))],2)]),_:1},8,["disabled","effect","teleported"])):z("v-if",!0)]):z("v-if",!0),e.selectDisabled?z("v-if",!0):(C(),T("div",{key:1,class:D([e.nsSelect.e("selected-item"),e.nsSelect.e("input-wrapper"),e.nsSelect.is("hidden",!e.filterable)])},[Fe(_("input",{id:e.inputId,ref:"inputRef","onUpdate:modelValue":t[0]||(t[0]=m=>e.states.inputValue=m),type:"text",class:D([e.nsSelect.e("input"),e.nsSelect.is(e.selectSize)]),disabled:e.selectDisabled,autocomplete:e.autocomplete,style:Ye(e.inputStyle),role:"combobox",readonly:!e.filterable,spellcheck:"false","aria-activedescendant":((h=e.hoverOption)==null?void 0:h.id)||"","aria-controls":e.contentId,"aria-expanded":e.dropdownMenuVisible,"aria-label":e.ariaLabel,"aria-autocomplete":"none","aria-haspopup":"listbox",onFocus:t[1]||(t[1]=(...m)=>e.handleFocus&&e.handleFocus(...m)),onBlur:t[2]||(t[2]=(...m)=>e.handleBlur&&e.handleBlur(...m)),onKeydown:[t[3]||(t[3]=Mt(Ze(m=>e.navigateOptions("next"),["stop","prevent"]),["down"])),t[4]||(t[4]=Mt(Ze(m=>e.navigateOptions("prev"),["stop","prevent"]),["up"])),t[5]||(t[5]=Mt(Ze((...m)=>e.handleEsc&&e.handleEsc(...m),["stop","prevent"]),["esc"])),t[6]||(t[6]=Mt(Ze((...m)=>e.selectOption&&e.selectOption(...m),["stop","prevent"]),["enter"])),t[7]||(t[7]=Mt(Ze((...m)=>e.deletePrevTag&&e.deletePrevTag(...m),["stop"]),["delete"]))],onCompositionstart:t[8]||(t[8]=(...m)=>e.handleCompositionStart&&e.handleCompositionStart(...m)),onCompositionupdate:t[9]||(t[9]=(...m)=>e.handleCompositionUpdate&&e.handleCompositionUpdate(...m)),onCompositionend:t[10]||(t[10]=(...m)=>e.handleCompositionEnd&&e.handleCompositionEnd(...m)),onInput:t[11]||(t[11]=(...m)=>e.onInput&&e.onInput(...m)),onClick:t[12]||(t[12]=Ze((...m)=>e.toggleMenu&&e.toggleMenu(...m),["stop"]))},null,46,kae),[[Bc,e.states.inputValue]]),e.filterable?(C(),T("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:D(e.nsSelect.e("input-calculator")),textContent:O(e.states.inputValue)},null,10,Sae)):z("v-if",!0)],2)),e.shouldShowPlaceholder?(C(),T("div",{key:2,class:D([e.nsSelect.e("selected-item"),e.nsSelect.e("placeholder"),e.nsSelect.is("transparent",!e.hasModelValue||e.expanded&&!e.states.inputValue)])},[_("span",null,O(e.currentPlaceholder),1)],2)):z("v-if",!0)],2),_("div",{ref:"suffixRef",class:D(e.nsSelect.e("suffix"))},[e.iconComponent&&!e.showClose?(C(),H(a,{key:0,class:D([e.nsSelect.e("caret"),e.nsSelect.e("icon"),e.iconReverse])},{default:S(()=>[(C(),H(Pt(e.iconComponent)))]),_:1},8,["class"])):z("v-if",!0),e.showClose&&e.clearIcon?(C(),H(a,{key:1,class:D([e.nsSelect.e("caret"),e.nsSelect.e("icon")]),onClick:e.handleClearClick},{default:S(()=>[(C(),H(Pt(e.clearIcon)))]),_:1},8,["class","onClick"])):z("v-if",!0),e.validateState&&e.validateIcon?(C(),H(a,{key:2,class:D([e.nsInput.e("icon"),e.nsInput.e("validateIcon")])},{default:S(()=>[(C(),H(Pt(e.validateIcon)))]),_:1},8,["class"])):z("v-if",!0)],2)],2)]}),content:S(()=>[w(f,{ref:"menuRef"},{default:S(()=>[e.$slots.header?(C(),T("div",{key:0,class:D(e.nsSelect.be("dropdown","header")),onClick:t[13]||(t[13]=Ze(()=>{},["stop"]))},[he(e.$slots,"header")],2)):z("v-if",!0),Fe(w(d,{id:e.contentId,ref:"scrollbarRef",tag:"ul","wrap-class":e.nsSelect.be("dropdown","wrap"),"view-class":e.nsSelect.be("dropdown","list"),class:D([e.nsSelect.is("empty",e.filteredOptionsCount===0)]),role:"listbox","aria-label":e.ariaLabel,"aria-orientation":"vertical"},{default:S(()=>[e.showNewOption?(C(),H(u,{key:0,value:e.states.inputValue,created:!0},null,8,["value"])):z("v-if",!0),w(c,null,{default:S(()=>[he(e.$slots,"default")]),_:3})]),_:3},8,["id","wrap-class","view-class","class","aria-label"]),[[en,e.states.options.size>0&&!e.loading]]),e.$slots.loading&&e.loading?(C(),T("div",{key:1,class:D(e.nsSelect.be("dropdown","loading"))},[he(e.$slots,"loading")],2)):e.loading||e.filteredOptionsCount===0?(C(),T("div",{key:2,class:D(e.nsSelect.be("dropdown","empty"))},[he(e.$slots,"empty",{},()=>[_("span",null,O(e.emptyText),1)])],2)):z("v-if",!0),e.$slots.footer?(C(),T("div",{key:3,class:D(e.nsSelect.be("dropdown","footer")),onClick:t[14]||(t[14]=Ze(()=>{},["stop"]))},[he(e.$slots,"footer")],2)):z("v-if",!0)]),_:3},512)]),_:3},8,["visible","placement","teleported","popper-class","popper-options","fallback-placements","effect","transition","persistent","onBeforeShow"])],34)),[[p,e.handleClickOutside,e.popperRef]])}var Eae=He(Cae,[["render",$ae],["__file","select.vue"]]);const xae=Q({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(e){const t=Re("select"),n=q(null),o=at(),r=q([]);wt(_O,Bn({...oi(e)}));const s=R(()=>r.value.some(a=>a.visible===!0)),i=a=>{const u=[];return Te(a.children)&&a.children.forEach(c=>{var d,f;c.type&&c.type.name==="ElOption"&&c.component&&c.component.proxy?u.push(c.component.proxy):(d=c.children)!=null&&d.length?u.push(...i(c)):(f=c.component)!=null&&f.subTree&&u.push(...i(c.component.subTree))}),u},l=()=>{r.value=i(o.subTree)};return Ct(()=>{l()}),lH(n,l,{attributes:!0,subtree:!0,childList:!0}),{groupRef:n,visible:s,ns:t}}});function Tae(e,t,n,o,r,s){return Fe((C(),T("ul",{ref:"groupRef",class:D(e.ns.be("group","wrap"))},[_("li",{class:D(e.ns.be("group","title"))},O(e.label),3),_("li",null,[_("ul",{class:D(e.ns.b("group"))},[he(e.$slots,"default")],2)])],2)),[[en,e.visible]])}var bO=He(xae,[["render",Tae],["__file","option-group.vue"]]);const vr=Zt(Eae,{Option:Yw,OptionGroup:bO}),$s=Jn(Yw),Mae=Jn(bO),Zw=()=>je(yO,{}),Oae=Ke({pageSize:{type:Number,required:!0},pageSizes:{type:Ce(Array),default:()=>Eo([10,20,30,40,50,100])},popperClass:{type:String},disabled:Boolean,teleported:Boolean,size:{type:String,values:Jl}}),Iae=Q({name:"ElPaginationSizes"}),Aae=Q({...Iae,props:Oae,emits:["page-size-change"],setup(e,{emit:t}){const n=e,{t:o}=Kt(),r=Re("pagination"),s=Zw(),i=q(n.pageSize);Me(()=>n.pageSizes,(u,c)=>{if(!Hl(u,c)&&Array.isArray(u)){const d=u.includes(n.pageSize)?n.pageSize:n.pageSizes[0];t("page-size-change",d)}}),Me(()=>n.pageSize,u=>{i.value=u});const l=R(()=>n.pageSizes);function a(u){var c;u!==i.value&&(i.value=u,(c=s.handleSizeChange)==null||c.call(s,Number(u)))}return(u,c)=>(C(),T("span",{class:D(g(r).e("sizes"))},[w(g(vr),{"model-value":i.value,disabled:u.disabled,"popper-class":u.popperClass,size:u.size,teleported:u.teleported,"validate-event":!1,onChange:a},{default:S(()=>[(C(!0),T(de,null,nt(g(l),d=>(C(),H(g($s),{key:d,value:d,label:d+g(o)("el.pagination.pagesize")},null,8,["value","label"]))),128))]),_:1},8,["model-value","disabled","popper-class","size","teleported"])],2))}});var Nae=He(Aae,[["__file","sizes.vue"]]);const Pae=Ke({size:{type:String,values:Jl}}),Lae=["disabled"],Rae=Q({name:"ElPaginationJumper"}),Dae=Q({...Rae,props:Pae,setup(e){const{t}=Kt(),n=Re("pagination"),{pageCount:o,disabled:r,currentPage:s,changeEvent:i}=Zw(),l=q(),a=R(()=>{var d;return(d=l.value)!=null?d:s==null?void 0:s.value});function u(d){l.value=d?+d:""}function c(d){d=Math.trunc(+d),i==null||i(d),l.value=void 0}return(d,f)=>(C(),T("span",{class:D(g(n).e("jump")),disabled:g(r)},[_("span",{class:D([g(n).e("goto")])},O(g(t)("el.pagination.goto")),3),w(g($t),{size:d.size,class:D([g(n).e("editor"),g(n).is("in-pagination")]),min:1,max:g(o),disabled:g(r),"model-value":g(a),"validate-event":!1,label:g(t)("el.pagination.page"),type:"number","onUpdate:modelValue":u,onChange:c},null,8,["size","class","max","disabled","model-value","label"]),_("span",{class:D([g(n).e("classifier")])},O(g(t)("el.pagination.pageClassifier")),3)],10,Lae))}});var Vae=He(Dae,[["__file","jumper.vue"]]);const Fae=Ke({total:{type:Number,default:1e3}}),Bae=["disabled"],zae=Q({name:"ElPaginationTotal"}),jae=Q({...zae,props:Fae,setup(e){const{t}=Kt(),n=Re("pagination"),{disabled:o}=Zw();return(r,s)=>(C(),T("span",{class:D(g(n).e("total")),disabled:g(o)},O(g(t)("el.pagination.total",{total:r.total})),11,Bae))}});var Hae=He(jae,[["__file","total.vue"]]);const Uae=Ke({currentPage:{type:Number,default:1},pageCount:{type:Number,required:!0},pagerCount:{type:Number,default:7},disabled:Boolean}),Wae=["onKeyup"],Kae=["aria-current","aria-label","tabindex"],qae=["tabindex","aria-label"],Gae=["aria-current","aria-label","tabindex"],Yae=["tabindex","aria-label"],Zae=["aria-current","aria-label","tabindex"],Jae=Q({name:"ElPaginationPager"}),Xae=Q({...Jae,props:Uae,emits:["change"],setup(e,{emit:t}){const n=e,o=Re("pager"),r=Re("icon"),{t:s}=Kt(),i=q(!1),l=q(!1),a=q(!1),u=q(!1),c=q(!1),d=q(!1),f=R(()=>{const $=n.pagerCount,x=($-1)/2,E=Number(n.currentPage),M=Number(n.pageCount);let N=!1,P=!1;M>$&&(E>$-x&&(N=!0),E<M-x&&(P=!0));const I=[];if(N&&!P){const V=M-($-2);for(let F=V;F<M;F++)I.push(F)}else if(!N&&P)for(let V=2;V<$;V++)I.push(V);else if(N&&P){const V=Math.floor($/2)-1;for(let F=E-V;F<=E+V;F++)I.push(F)}else for(let V=2;V<M;V++)I.push(V);return I}),p=R(()=>["more","btn-quickprev",r.b(),o.is("disabled",n.disabled)]),h=R(()=>["more","btn-quicknext",r.b(),o.is("disabled",n.disabled)]),m=R(()=>n.disabled?-1:0);as(()=>{const $=(n.pagerCount-1)/2;i.value=!1,l.value=!1,n.pageCount>n.pagerCount&&(n.currentPage>n.pagerCount-$&&(i.value=!0),n.currentPage<n.pageCount-$&&(l.value=!0))});function y($=!1){n.disabled||($?a.value=!0:u.value=!0)}function v($=!1){$?c.value=!0:d.value=!0}function k($){const x=$.target;if(x.tagName.toLowerCase()==="li"&&Array.from(x.classList).includes("number")){const E=Number(x.textContent);E!==n.currentPage&&t("change",E)}else x.tagName.toLowerCase()==="li"&&Array.from(x.classList).includes("more")&&b($)}function b($){const x=$.target;if(x.tagName.toLowerCase()==="ul"||n.disabled)return;let E=Number(x.textContent);const M=n.pageCount,N=n.currentPage,P=n.pagerCount-2;x.className.includes("more")&&(x.className.includes("quickprev")?E=N-P:x.className.includes("quicknext")&&(E=N+P)),Number.isNaN(+E)||(E<1&&(E=1),E>M&&(E=M)),E!==N&&t("change",E)}return($,x)=>(C(),T("ul",{class:D(g(o).b()),onClick:b,onKeyup:Mt(k,["enter"])},[$.pageCount>0?(C(),T("li",{key:0,class:D([[g(o).is("active",$.currentPage===1),g(o).is("disabled",$.disabled)],"number"]),"aria-current":$.currentPage===1,"aria-label":g(s)("el.pagination.currentPage",{pager:1}),tabindex:g(m)}," 1 ",10,Kae)):z("v-if",!0),i.value?(C(),T("li",{key:1,class:D(g(p)),tabindex:g(m),"aria-label":g(s)("el.pagination.prevPages",{pager:$.pagerCount-2}),onMouseenter:x[0]||(x[0]=E=>y(!0)),onMouseleave:x[1]||(x[1]=E=>a.value=!1),onFocus:x[2]||(x[2]=E=>v(!0)),onBlur:x[3]||(x[3]=E=>c.value=!1)},[(a.value||c.value)&&!$.disabled?(C(),H(g(Jc),{key:0})):(C(),H(g(tb),{key:1}))],42,qae)):z("v-if",!0),(C(!0),T(de,null,nt(g(f),E=>(C(),T("li",{key:E,class:D([[g(o).is("active",$.currentPage===E),g(o).is("disabled",$.disabled)],"number"]),"aria-current":$.currentPage===E,"aria-label":g(s)("el.pagination.currentPage",{pager:E}),tabindex:g(m)},O(E),11,Gae))),128)),l.value?(C(),T("li",{key:2,class:D(g(h)),tabindex:g(m),"aria-label":g(s)("el.pagination.nextPages",{pager:$.pagerCount-2}),onMouseenter:x[4]||(x[4]=E=>y()),onMouseleave:x[5]||(x[5]=E=>u.value=!1),onFocus:x[6]||(x[6]=E=>v()),onBlur:x[7]||(x[7]=E=>d.value=!1)},[(u.value||d.value)&&!$.disabled?(C(),H(g(Xc),{key:0})):(C(),H(g(tb),{key:1}))],42,Yae)):z("v-if",!0),$.pageCount>1?(C(),T("li",{key:3,class:D([[g(o).is("active",$.currentPage===$.pageCount),g(o).is("disabled",$.disabled)],"number"]),"aria-current":$.currentPage===$.pageCount,"aria-label":g(s)("el.pagination.currentPage",{pager:$.pageCount}),tabindex:g(m)},O($.pageCount),11,Zae)):z("v-if",!0)],42,Wae))}});var Qae=He(Xae,[["__file","pager.vue"]]);const Co=e=>typeof e!="number",eue=Ke({pageSize:Number,defaultPageSize:Number,total:Number,pageCount:Number,pagerCount:{type:Number,validator:e=>_t(e)&&Math.trunc(e)===e&&e>4&&e<22&&e%2===1,default:7},currentPage:Number,defaultCurrentPage:Number,layout:{type:String,default:["prev","pager","next","jumper","->","total"].join(", ")},pageSizes:{type:Ce(Array),default:()=>Eo([10,20,30,40,50,100])},popperClass:{type:String,default:""},prevText:{type:String,default:""},prevIcon:{type:Io,default:()=>cu},nextText:{type:String,default:""},nextIcon:{type:Io,default:()=>Ws},teleported:{type:Boolean,default:!0},small:Boolean,background:Boolean,disabled:Boolean,hideOnSinglePage:Boolean}),tue={"update:current-page":e=>_t(e),"update:page-size":e=>_t(e),"size-change":e=>_t(e),change:(e,t)=>_t(e)&&_t(t),"current-change":e=>_t(e),"prev-click":e=>_t(e),"next-click":e=>_t(e)},$8="ElPagination";var nue=Q({name:$8,props:eue,emits:tue,setup(e,{emit:t,slots:n}){const{t:o}=Kt(),r=Re("pagination"),s=at().vnode.props||{},i="onUpdate:currentPage"in s||"onUpdate:current-page"in s||"onCurrentChange"in s,l="onUpdate:pageSize"in s||"onUpdate:page-size"in s||"onSizeChange"in s,a=R(()=>{if(Co(e.total)&&Co(e.pageCount)||!Co(e.currentPage)&&!i)return!1;if(e.layout.includes("sizes")){if(Co(e.pageCount)){if(!Co(e.total)&&!Co(e.pageSize)&&!l)return!1}else if(!l)return!1}return!0}),u=q(Co(e.defaultPageSize)?10:e.defaultPageSize),c=q(Co(e.defaultCurrentPage)?1:e.defaultCurrentPage),d=R({get(){return Co(e.pageSize)?u.value:e.pageSize},set(b){Co(e.pageSize)&&(u.value=b),l&&(t("update:page-size",b),t("size-change",b))}}),f=R(()=>{let b=0;return Co(e.pageCount)?Co(e.total)||(b=Math.max(1,Math.ceil(e.total/d.value))):b=e.pageCount,b}),p=R({get(){return Co(e.currentPage)?c.value:e.currentPage},set(b){let $=b;b<1?$=1:b>f.value&&($=f.value),Co(e.currentPage)&&(c.value=$),i&&(t("update:current-page",$),t("current-change",$))}});Me(f,b=>{p.value>b&&(p.value=b)}),Me([p,d],b=>{t("change",...b)},{flush:"post"});function h(b){p.value=b}function m(b){d.value=b;const $=f.value;p.value>$&&(p.value=$)}function y(){e.disabled||(p.value-=1,t("prev-click",p.value))}function v(){e.disabled||(p.value+=1,t("next-click",p.value))}function k(b,$){b&&(b.props||(b.props={}),b.props.class=[b.props.class,$].join(" "))}return wt(yO,{pageCount:f,disabled:R(()=>e.disabled),currentPage:p,changeEvent:h,handleSizeChange:m}),()=>{var b,$;if(!a.value)return o("el.pagination.deprecationWarning"),null;if(!e.layout||e.hideOnSinglePage&&f.value<=1)return null;const x=[],E=[],M=lt("div",{class:r.e("rightwrapper")},E),N={prev:lt(oae,{disabled:e.disabled,currentPage:p.value,prevText:e.prevText,prevIcon:e.prevIcon,onClick:y}),jumper:lt(Vae,{size:e.small?"small":"default"}),pager:lt(Qae,{currentPage:p.value,pageCount:f.value,pagerCount:e.pagerCount,onChange:h,disabled:e.disabled}),next:lt(uae,{disabled:e.disabled,currentPage:p.value,pageCount:f.value,nextText:e.nextText,nextIcon:e.nextIcon,onClick:v}),sizes:lt(Nae,{pageSize:d.value,pageSizes:e.pageSizes,popperClass:e.popperClass,disabled:e.disabled,teleported:e.teleported,size:e.small?"small":"default"}),slot:($=(b=n==null?void 0:n.default)==null?void 0:b.call(n))!=null?$:null,total:lt(Hae,{total:Co(e.total)?0:e.total})},P=e.layout.split(",").map(V=>V.trim());let I=!1;return P.forEach(V=>{if(V==="->"){I=!0;return}I?E.push(N[V]):x.push(N[V])}),k(x[0],r.is("first")),k(x[x.length-1],r.is("last")),I&&E.length>0&&(k(E[0],r.is("first")),k(E[E.length-1],r.is("last")),x.push(M)),lt("div",{class:[r.b(),r.is("background",e.background),{[r.m("small")]:e.small}]},x)}}});const oue=Zt(nue),rue=Ke({trigger:Vp.trigger,placement:i1.placement,disabled:Vp.disabled,visible:ar.visible,transition:ar.transition,popperOptions:i1.popperOptions,tabindex:i1.tabindex,content:ar.content,popperStyle:ar.popperStyle,popperClass:ar.popperClass,enterable:{...ar.enterable,default:!0},effect:{...ar.effect,default:"light"},teleported:ar.teleported,title:String,width:{type:[String,Number],default:150},offset:{type:Number,default:void 0},showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0},showArrow:{type:Boolean,default:!0},persistent:{type:Boolean,default:!0},"onUpdate:visible":{type:Function}}),sue={"update:visible":e=>Br(e),"before-enter":()=>!0,"before-leave":()=>!0,"after-enter":()=>!0,"after-leave":()=>!0},iue="onUpdate:visible",lue=Q({name:"ElPopover"}),aue=Q({...lue,props:rue,emits:sue,setup(e,{expose:t,emit:n}){const o=e,r=R(()=>o[iue]),s=Re("popover"),i=q(),l=R(()=>{var y;return(y=g(i))==null?void 0:y.popperRef}),a=R(()=>[{width:Zo(o.width)},o.popperStyle]),u=R(()=>[s.b(),o.popperClass,{[s.m("plain")]:!!o.content}]),c=R(()=>o.transition===`${s.namespace.value}-fade-in-linear`),d=()=>{var y;(y=i.value)==null||y.hide()},f=()=>{n("before-enter")},p=()=>{n("before-leave")},h=()=>{n("after-enter")},m=()=>{n("update:visible",!1),n("after-leave")};return t({popperRef:l,hide:d}),(y,v)=>(C(),H(g(ea),un({ref_key:"tooltipRef",ref:i},y.$attrs,{trigger:y.trigger,placement:y.placement,disabled:y.disabled,visible:y.visible,transition:y.transition,"popper-options":y.popperOptions,tabindex:y.tabindex,content:y.content,offset:y.offset,"show-after":y.showAfter,"hide-after":y.hideAfter,"auto-close":y.autoClose,"show-arrow":y.showArrow,"aria-label":y.title,effect:y.effect,enterable:y.enterable,"popper-class":g(u),"popper-style":g(a),teleported:y.teleported,persistent:y.persistent,"gpu-acceleration":g(c),"onUpdate:visible":g(r),onBeforeShow:f,onBeforeHide:p,onShow:h,onHide:m}),{content:S(()=>[y.title?(C(),T("div",{key:0,class:D(g(s).e("title")),role:"title"},O(y.title),3)):z("v-if",!0),he(y.$slots,"default",{},()=>[ne(O(y.content),1)])]),default:S(()=>[y.$slots.reference?he(y.$slots,"reference",{key:0}):z("v-if",!0)]),_:3},16,["trigger","placement","disabled","visible","transition","popper-options","tabindex","content","offset","show-after","hide-after","auto-close","show-arrow","aria-label","effect","enterable","popper-class","popper-style","teleported","persistent","gpu-acceleration","onUpdate:visible"]))}});var uue=He(aue,[["__file","popover.vue"]]);const E8=(e,t)=>{const n=t.arg||t.value,o=n==null?void 0:n.popperRef;o&&(o.triggerRef=e)};var cue={mounted(e,t){E8(e,t)},updated(e,t){E8(e,t)}};const due="popover",fue=bJ(cue,due),bo=Zt(uue,{directive:fue}),pue=Ke({type:{type:String,default:"line",values:["line","circle","dashboard"]},percentage:{type:Number,default:0,validator:e=>e>=0&&e<=100},status:{type:String,default:"",values:["","success","exception","warning"]},indeterminate:{type:Boolean,default:!1},duration:{type:Number,default:3},strokeWidth:{type:Number,default:6},strokeLinecap:{type:Ce(String),default:"round"},textInside:{type:Boolean,default:!1},width:{type:Number,default:126},showText:{type:Boolean,default:!0},color:{type:Ce([String,Array,Function]),default:""},striped:Boolean,stripedFlow:Boolean,format:{type:Ce(Function),default:e=>`${e}%`}}),hue=["aria-valuenow"],mue={viewBox:"0 0 100 100"},gue=["d","stroke","stroke-linecap","stroke-width"],vue=["d","stroke","opacity","stroke-linecap","stroke-width"],yue={key:0},_ue=Q({name:"ElProgress"}),bue=Q({..._ue,props:pue,setup(e){const t=e,n={success:"#13ce66",exception:"#ff4949",warning:"#e6a23c",default:"#20a0ff"},o=Re("progress"),r=R(()=>({width:`${t.percentage}%`,animationDuration:`${t.duration}s`,backgroundColor:k(t.percentage)})),s=R(()=>(t.strokeWidth/t.width*100).toFixed(1)),i=R(()=>["circle","dashboard"].includes(t.type)?Number.parseInt(`${50-Number.parseFloat(s.value)/2}`,10):0),l=R(()=>{const b=i.value,$=t.type==="dashboard";return` |
| 72 |
M 50 50 |
| 73 |
m 0 ${$?"":"-"}${b} |
| 74 |
a ${b} ${b} 0 1 1 0 ${$?"-":""}${b*2} |
| 75 |
a ${b} ${b} 0 1 1 0 ${$?"":"-"}${b*2} |
| 76 |
`}),a=R(()=>2*Math.PI*i.value),u=R(()=>t.type==="dashboard"?.75:1),c=R(()=>`${-1*a.value*(1-u.value)/2}px`),d=R(()=>({strokeDasharray:`${a.value*u.value}px, ${a.value}px`,strokeDashoffset:c.value})),f=R(()=>({strokeDasharray:`${a.value*u.value*(t.percentage/100)}px, ${a.value}px`,strokeDashoffset:c.value,transition:"stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s"})),p=R(()=>{let b;return t.color?b=k(t.percentage):b=n[t.status]||n.default,b}),h=R(()=>t.status==="warning"?gw:t.type==="line"?t.status==="success"?fw:wd:t.status==="success"?tT:Js),m=R(()=>t.type==="line"?12+t.strokeWidth*.4:t.width*.111111+2),y=R(()=>t.format(t.percentage));function v(b){const $=100/b.length;return b.map((E,M)=>tt(E)?{color:E,percentage:(M+1)*$}:E).sort((E,M)=>E.percentage-M.percentage)}const k=b=>{var $;const{color:x}=t;if(et(x))return x(b);if(tt(x))return x;{const E=v(x);for(const M of E)if(M.percentage>b)return M.color;return($=E[E.length-1])==null?void 0:$.color}};return(b,$)=>(C(),T("div",{class:D([g(o).b(),g(o).m(b.type),g(o).is(b.status),{[g(o).m("without-text")]:!b.showText,[g(o).m("text-inside")]:b.textInside}]),role:"progressbar","aria-valuenow":b.percentage,"aria-valuemin":"0","aria-valuemax":"100"},[b.type==="line"?(C(),T("div",{key:0,class:D(g(o).b("bar"))},[_("div",{class:D(g(o).be("bar","outer")),style:Ye({height:`${b.strokeWidth}px`})},[_("div",{class:D([g(o).be("bar","inner"),{[g(o).bem("bar","inner","indeterminate")]:b.indeterminate},{[g(o).bem("bar","inner","striped")]:b.striped},{[g(o).bem("bar","inner","striped-flow")]:b.stripedFlow}]),style:Ye(g(r))},[(b.showText||b.$slots.default)&&b.textInside?(C(),T("div",{key:0,class:D(g(o).be("bar","innerText"))},[he(b.$slots,"default",{percentage:b.percentage},()=>[_("span",null,O(g(y)),1)])],2)):z("v-if",!0)],6)],6)],2)):(C(),T("div",{key:1,class:D(g(o).b("circle")),style:Ye({height:`${b.width}px`,width:`${b.width}px`})},[(C(),T("svg",mue,[_("path",{class:D(g(o).be("circle","track")),d:g(l),stroke:`var(${g(o).cssVarName("fill-color-light")}, #e5e9f2)`,"stroke-linecap":b.strokeLinecap,"stroke-width":g(s),fill:"none",style:Ye(g(d))},null,14,gue),_("path",{class:D(g(o).be("circle","path")),d:g(l),stroke:g(p),fill:"none",opacity:b.percentage?1:0,"stroke-linecap":b.strokeLinecap,"stroke-width":g(s),style:Ye(g(f))},null,14,vue)]))],6)),(b.showText||b.$slots.default)&&!b.textInside?(C(),T("div",{key:2,class:D(g(o).e("text")),style:Ye({fontSize:`${g(m)}px`})},[he(b.$slots,"default",{percentage:b.percentage},()=>[b.status?(C(),H(g(Ie),{key:1},{default:S(()=>[(C(),H(Pt(g(h))))]),_:1})):(C(),T("span",yue,O(g(y)),1))])],6)):z("v-if",!0)],10,hue))}});var wue=He(bue,[["__file","progress.vue"]]);const wO=Zt(wue),Cue=Ke({animated:{type:Boolean,default:!1},count:{type:Number,default:1},rows:{type:Number,default:3},loading:{type:Boolean,default:!0},throttle:{type:Number}}),kue=Ke({variant:{type:String,values:["circle","rect","h1","h3","text","caption","p","image","button"],default:"text"}}),Sue=Q({name:"ElSkeletonItem"}),$ue=Q({...Sue,props:kue,setup(e){const t=Re("skeleton");return(n,o)=>(C(),T("div",{class:D([g(t).e("item"),g(t).e(n.variant)])},[n.variant==="image"?(C(),H(g(jZ),{key:0})):z("v-if",!0)],2))}});var Bg=He($ue,[["__file","skeleton-item.vue"]]);const Eue=Q({name:"ElSkeleton"}),xue=Q({...Eue,props:Cue,setup(e,{expose:t}){const n=e,o=Re("skeleton"),r=RX(pn(n,"loading"),n.throttle);return t({uiLoading:r}),(s,i)=>g(r)?(C(),T("div",un({key:0,class:[g(o).b(),g(o).is("animated",s.animated)]},s.$attrs),[(C(!0),T(de,null,nt(s.count,l=>(C(),T(de,{key:l},[s.loading?he(s.$slots,"template",{key:l},()=>[w(Bg,{class:D(g(o).is("first")),variant:"p"},null,8,["class"]),(C(!0),T(de,null,nt(s.rows,a=>(C(),H(Bg,{key:a,class:D([g(o).e("paragraph"),g(o).is("last",a===s.rows&&s.rows>1)]),variant:"p"},null,8,["class"]))),128))]):z("v-if",!0)],64))),128))],16)):he(s.$slots,"default",n3(un({key:1},s.$attrs)))}});var Tue=He(xue,[["__file","skeleton.vue"]]);const Kn=Zt(Tue,{SkeletonItem:Bg});Jn(Bg);const my=function(e){var t;return(t=e.target)==null?void 0:t.closest("td")},Mue=function(e,t,n,o,r){if(!t&&!o&&(!r||Array.isArray(r)&&!r.length))return e;typeof n=="string"?n=n==="descending"?-1:1:n=n&&n<0?-1:1;const s=o?null:function(l,a){return r?(Array.isArray(r)||(r=[r]),r.map(u=>typeof u=="string"?Mr(l,u):u(l,a,e))):(t!=="$key"&&pt(l)&&"$value"in l&&(l=l.$value),[pt(l)?Mr(l,t):l])},i=function(l,a){if(o)return o(l.value,a.value);for(let u=0,c=l.key.length;u<c;u++){if(l.key[u]<a.key[u])return-1;if(l.key[u]>a.key[u])return 1}return 0};return e.map((l,a)=>({value:l,index:a,key:s?s(l,a):null})).sort((l,a)=>{let u=i(l,a);return u||(u=l.index-a.index),u*+n}).map(l=>l.value)},CO=function(e,t){let n=null;return e.columns.forEach(o=>{o.id===t&&(n=o)}),n},Oue=function(e,t){let n=null;for(let o=0;o<e.columns.length;o++){const r=e.columns[o];if(r.columnKey===t){n=r;break}}return n||Cs("ElTable",`No column matching with column-key: ${t}`),n},x8=function(e,t,n){const o=(t.className||"").match(new RegExp(`${n}-table_[^\\s]+`,"gm"));return o?CO(e,o[0]):null},io=(e,t)=>{if(!e)throw new Error("Row is required when get row identity");if(typeof t=="string"){if(!t.includes("."))return`${e[t]}`;const n=t.split(".");let o=e;for(const r of n)o=o[r];return`${o}`}else if(typeof t=="function")return t.call(null,e)},Da=function(e,t){const n={};return(e||[]).forEach((o,r)=>{n[io(o,t)]={row:o,index:r}}),n};function Iue(e,t){const n={};let o;for(o in e)n[o]=e[o];for(o in t)if(vt(t,o)){const r=t[o];typeof r<"u"&&(n[o]=r)}return n}function Jw(e){return e===""||e!==void 0&&(e=Number.parseInt(e,10),Number.isNaN(e)&&(e="")),e}function kO(e){return e===""||e!==void 0&&(e=Jw(e),Number.isNaN(e)&&(e=80)),e}function Aue(e){return typeof e=="number"?e:typeof e=="string"?/^\d+(?:px)?$/.test(e)?Number.parseInt(e,10):e:null}function Nue(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...o)=>t(n(...o)))}function Zf(e,t,n){let o=!1;const r=e.indexOf(t),s=r!==-1,i=l=>{l==="add"?e.push(t):e.splice(r,1),o=!0,Te(t.children)&&t.children.forEach(a=>{Zf(e,a,n??!s)})};return Br(n)?n&&!s?i("add"):!n&&s&&i("remove"):i(s?"remove":"add"),o}function Pue(e,t,n="children",o="hasChildren"){const r=i=>!(Array.isArray(i)&&i.length);function s(i,l,a){t(i,l,a),l.forEach(u=>{if(u[o]){t(u,null,a+1);return}const c=u[n];r(c)||s(u,c,a+1)})}e.forEach(i=>{if(i[o]){t(i,null,0);return}const l=i[n];r(l)||s(i,l,0)})}let Sr=null;function Lue(e,t,n,o){if((Sr==null?void 0:Sr.trigger)===n)return;Sr==null||Sr();const r=o==null?void 0:o.refs.tableWrapper,s=r==null?void 0:r.dataset.prefix,i={strategy:"fixed",...e.popperOptions},l=w(ea,{content:t,virtualTriggering:!0,virtualRef:n,appendTo:r,placement:"top",transition:"none",offset:0,hideAfter:0,...e,popperOptions:i,onHide:()=>{Sr==null||Sr()}});l.appContext={...o.appContext,...o};const a=document.createElement("div");Pi(l,a),l.component.exposed.onOpen();const u=r==null?void 0:r.querySelector(`.${s}-scrollbar__wrap`);Sr=()=>{Pi(null,a),u==null||u.removeEventListener("scroll",Sr),Sr=null},Sr.trigger=n,u==null||u.addEventListener("scroll",Sr)}function SO(e){return e.children?lY(e.children,SO):[e]}function T8(e,t){return e+t.colSpan}const $O=(e,t,n,o)=>{let r=0,s=e;const i=n.states.columns.value;if(o){const a=SO(o[e]);r=i.slice(0,i.indexOf(a[0])).reduce(T8,0),s=r+a.reduce(T8,0)-1}else r=e;let l;switch(t){case"left":s<n.states.fixedLeafColumnsLength.value&&(l="left");break;case"right":r>=i.length-n.states.rightFixedLeafColumnsLength.value&&(l="right");break;default:s<n.states.fixedLeafColumnsLength.value?l="left":r>=i.length-n.states.rightFixedLeafColumnsLength.value&&(l="right")}return l?{direction:l,start:r,after:s}:{}},Xw=(e,t,n,o,r,s=0)=>{const i=[],{direction:l,start:a,after:u}=$O(t,n,o,r);if(l){const c=l==="left";i.push(`${e}-fixed-column--${l}`),c&&u+s===o.states.fixedLeafColumnsLength.value-1?i.push("is-last-column"):!c&&a-s===o.states.columns.value.length-o.states.rightFixedLeafColumnsLength.value&&i.push("is-first-column")}return i};function M8(e,t){return e+(t.realWidth===null||Number.isNaN(t.realWidth)?Number(t.width):t.realWidth)}const Qw=(e,t,n,o)=>{const{direction:r,start:s=0,after:i=0}=$O(e,t,n,o);if(!r)return;const l={},a=r==="left",u=n.states.columns.value;return a?l.left=u.slice(0,s).reduce(M8,0):l.right=u.slice(i+1).reverse().reduce(M8,0),l},ld=(e,t)=>{e&&(Number.isNaN(e[t])||(e[t]=`${e[t]}px`))};function Rue(e){const t=at(),n=q(!1),o=q([]);return{updateExpandRows:()=>{const a=e.data.value||[],u=e.rowKey.value;if(n.value)o.value=a.slice();else if(u){const c=Da(o.value,u);o.value=a.reduce((d,f)=>{const p=io(f,u);return c[p]&&d.push(f),d},[])}else o.value=[]},toggleRowExpansion:(a,u)=>{Zf(o.value,a,u)&&t.emit("expand-change",a,o.value.slice())},setExpandRowKeys:a=>{t.store.assertRowKey();const u=e.data.value||[],c=e.rowKey.value,d=Da(u,c);o.value=a.reduce((f,p)=>{const h=d[p];return h&&f.push(h.row),f},[])},isRowExpanded:a=>{const u=e.rowKey.value;return u?!!Da(o.value,u)[io(a,u)]:o.value.includes(a)},states:{expandRows:o,defaultExpandAll:n}}}function Due(e){const t=at(),n=q(null),o=q(null),r=u=>{t.store.assertRowKey(),n.value=u,i(u)},s=()=>{n.value=null},i=u=>{const{data:c,rowKey:d}=e;let f=null;d.value&&(f=(g(c)||[]).find(p=>io(p,d.value)===u)),o.value=f,t.emit("current-change",o.value,null)};return{setCurrentRowKey:r,restoreCurrentRowKey:s,setCurrentRowByKey:i,updateCurrentRow:u=>{const c=o.value;if(u&&u!==c){o.value=u,t.emit("current-change",o.value,c);return}!u&&c&&(o.value=null,t.emit("current-change",null,c))},updateCurrentRowData:()=>{const u=e.rowKey.value,c=e.data.value||[],d=o.value;if(!c.includes(d)&&d){if(u){const f=io(d,u);i(f)}else o.value=null;o.value===null&&t.emit("current-change",null,d)}else n.value&&(i(n.value),s())},states:{_currentRowKey:n,currentRow:o}}}function Vue(e){const t=q([]),n=q({}),o=q(16),r=q(!1),s=q({}),i=q("hasChildren"),l=q("children"),a=at(),u=R(()=>{if(!e.rowKey.value)return{};const v=e.data.value||[];return d(v)}),c=R(()=>{const v=e.rowKey.value,k=Object.keys(s.value),b={};return k.length&&k.forEach($=>{if(s.value[$].length){const x={children:[]};s.value[$].forEach(E=>{const M=io(E,v);x.children.push(M),E[i.value]&&!b[M]&&(b[M]={children:[]})}),b[$]=x}}),b}),d=v=>{const k=e.rowKey.value,b={};return Pue(v,($,x,E)=>{const M=io($,k);Array.isArray(x)?b[M]={children:x.map(N=>io(N,k)),level:E}:r.value&&(b[M]={children:[],lazy:!0,level:E})},l.value,i.value),b},f=(v=!1,k=(b=>(b=a.store)==null?void 0:b.states.defaultExpandAll.value)())=>{var b;const $=u.value,x=c.value,E=Object.keys($),M={};if(E.length){const N=g(n),P=[],I=(F,Y)=>{if(v)return t.value?k||t.value.includes(Y):!!(k||F!=null&&F.expanded);{const Z=k||t.value&&t.value.includes(Y);return!!(F!=null&&F.expanded||Z)}};E.forEach(F=>{const Y=N[F],Z={...$[F]};if(Z.expanded=I(Y,F),Z.lazy){const{loaded:K=!1,loading:U=!1}=Y||{};Z.loaded=!!K,Z.loading=!!U,P.push(F)}M[F]=Z});const V=Object.keys(x);r.value&&V.length&&P.length&&V.forEach(F=>{const Y=N[F],Z=x[F].children;if(P.includes(F)){if(M[F].children.length!==0)throw new Error("[ElTable]children must be an empty array.");M[F].children=Z}else{const{loaded:K=!1,loading:U=!1}=Y||{};M[F]={lazy:!0,loaded:!!K,loading:!!U,expanded:I(Y,F),children:Z,level:""}}})}n.value=M,(b=a.store)==null||b.updateTableScrollY()};Me(()=>t.value,()=>{f(!0)}),Me(()=>u.value,()=>{f()}),Me(()=>c.value,()=>{f()});const p=v=>{t.value=v,f()},h=(v,k)=>{a.store.assertRowKey();const b=e.rowKey.value,$=io(v,b),x=$&&n.value[$];if($&&x&&"expanded"in x){const E=x.expanded;k=typeof k>"u"?!x.expanded:k,n.value[$].expanded=k,E!==k&&a.emit("expand-change",v,k),a.store.updateTableScrollY()}},m=v=>{a.store.assertRowKey();const k=e.rowKey.value,b=io(v,k),$=n.value[b];r.value&&$&&"loaded"in $&&!$.loaded?y(v,b,$):h(v,void 0)},y=(v,k,b)=>{const{load:$}=a.props;$&&!n.value[k].loaded&&(n.value[k].loading=!0,$(v,b,x=>{if(!Array.isArray(x))throw new TypeError("[ElTable] data must be an array");n.value[k].loading=!1,n.value[k].loaded=!0,n.value[k].expanded=!0,x.length&&(s.value[k]=x),a.emit("expand-change",v,!0)}))};return{loadData:y,loadOrToggle:m,toggleTreeExpansion:h,updateTreeExpandKeys:p,updateTreeData:f,normalize:d,states:{expandRowKeys:t,treeData:n,indent:o,lazy:r,lazyTreeNodeMap:s,lazyColumnIdentifier:i,childrenColumnName:l}}}const Fue=(e,t)=>{const n=t.sortingColumn;return!n||typeof n.sortable=="string"?e:Mue(e,t.sortProp,t.sortOrder,n.sortMethod,n.sortBy)},l1=e=>{const t=[];return e.forEach(n=>{n.children&&n.children.length>0?t.push.apply(t,l1(n.children)):t.push(n)}),t};function Bue(){var e;const t=at(),{size:n}=oi((e=t.proxy)==null?void 0:e.$props),o=q(null),r=q([]),s=q([]),i=q(!1),l=q([]),a=q([]),u=q([]),c=q([]),d=q([]),f=q([]),p=q([]),h=q([]),m=[],y=q(0),v=q(0),k=q(0),b=q(!1),$=q([]),x=q(!1),E=q(!1),M=q(null),N=q({}),P=q(null),I=q(null),V=q(null),F=q(null),Y=q(null);Me(r,()=>t.state&&B(!1),{deep:!0});const Z=()=>{if(!o.value)throw new Error("[ElTable] prop row-key is required")},K=$e=>{var ie;(ie=$e.children)==null||ie.forEach(we=>{we.fixed=$e.fixed,K(we)})},U=()=>{l.value.forEach(Se=>{K(Se)}),c.value=l.value.filter(Se=>Se.fixed===!0||Se.fixed==="left"),d.value=l.value.filter(Se=>Se.fixed==="right"),c.value.length>0&&l.value[0]&&l.value[0].type==="selection"&&!l.value[0].fixed&&(l.value[0].fixed=!0,c.value.unshift(l.value[0]));const $e=l.value.filter(Se=>!Se.fixed);a.value=[].concat(c.value).concat($e).concat(d.value);const ie=l1($e),we=l1(c.value),ae=l1(d.value);y.value=ie.length,v.value=we.length,k.value=ae.length,u.value=[].concat(we).concat(ie).concat(ae),i.value=c.value.length>0||d.value.length>0},B=($e,ie=!1)=>{$e&&U(),ie?t.state.doLayout():t.state.debouncedUpdateLayout()},W=$e=>$.value.includes($e),L=()=>{b.value=!1,$.value.length&&($.value=[],t.emit("selection-change",[]))},A=()=>{let $e;if(o.value){$e=[];const ie=Da($.value,o.value),we=Da(r.value,o.value);for(const ae in ie)vt(ie,ae)&&!we[ae]&&$e.push(ie[ae].row)}else $e=$.value.filter(ie=>!r.value.includes(ie));if($e.length){const ie=$.value.filter(we=>!$e.includes(we));$.value=ie,t.emit("selection-change",ie.slice())}},X=()=>($.value||[]).slice(),re=($e,ie=void 0,we=!0)=>{if(Zf($.value,$e,ie)){const Se=($.value||[]).slice();we&&t.emit("select",Se,$e),t.emit("selection-change",Se)}},j=()=>{var $e,ie;const we=E.value?!b.value:!(b.value||$.value.length);b.value=we;let ae=!1,Se=0;const Ve=(ie=($e=t==null?void 0:t.store)==null?void 0:$e.states)==null?void 0:ie.rowKey.value;r.value.forEach((st,se)=>{const De=se+Se;M.value?M.value.call(null,st,De)&&Zf($.value,st,we)&&(ae=!0):Zf($.value,st,we)&&(ae=!0),Se+=xe(io(st,Ve))}),ae&&t.emit("selection-change",$.value?$.value.slice():[]),t.emit("select-all",$.value)},ge=()=>{const $e=Da($.value,o.value);r.value.forEach(ie=>{const we=io(ie,o.value),ae=$e[we];ae&&($.value[ae.index]=ie)})},Oe=()=>{var $e,ie,we;if((($e=r.value)==null?void 0:$e.length)===0){b.value=!1;return}let ae;o.value&&(ae=Da($.value,o.value));const Se=function(De){return ae?!!ae[io(De,o.value)]:$.value.includes(De)};let Ve=!0,st=0,se=0;for(let De=0,At=(r.value||[]).length;De<At;De++){const mn=(we=(ie=t==null?void 0:t.store)==null?void 0:ie.states)==null?void 0:we.rowKey.value,qn=De+se,Jr=r.value[De],qt=M.value&&M.value.call(null,Jr,qn);if(Se(Jr))st++;else if(!M.value||qt){Ve=!1;break}se+=xe(io(Jr,mn))}st===0&&(Ve=!1),b.value=Ve},xe=$e=>{var ie;if(!t||!t.store)return 0;const{treeData:we}=t.store.states;let ae=0;const Se=(ie=we.value[$e])==null?void 0:ie.children;return Se&&(ae+=Se.length,Se.forEach(Ve=>{ae+=xe(Ve)})),ae},te=($e,ie)=>{Array.isArray($e)||($e=[$e]);const we={};return $e.forEach(ae=>{N.value[ae.id]=ie,we[ae.columnKey||ae.id]=ie}),we},fe=($e,ie,we)=>{I.value&&I.value!==$e&&(I.value.order=null),I.value=$e,V.value=ie,F.value=we},ve=()=>{let $e=g(s);Object.keys(N.value).forEach(ie=>{const we=N.value[ie];if(!we||we.length===0)return;const ae=CO({columns:u.value},ie);ae&&ae.filterMethod&&($e=$e.filter(Se=>we.some(Ve=>ae.filterMethod.call(null,Ve,Se,ae))))}),P.value=$e},le=()=>{r.value=Fue(P.value,{sortingColumn:I.value,sortProp:V.value,sortOrder:F.value})},Ae=($e=void 0)=>{$e&&$e.filter||ve(),le()},Ge=$e=>{const{tableHeaderRef:ie}=t.refs;if(!ie)return;const we=Object.assign({},ie.filterPanels),ae=Object.keys(we);if(ae.length)if(typeof $e=="string"&&($e=[$e]),Array.isArray($e)){const Se=$e.map(Ve=>Oue({columns:u.value},Ve));ae.forEach(Ve=>{const st=Se.find(se=>se.id===Ve);st&&(st.filteredValue=[])}),t.store.commit("filterChange",{column:Se,values:[],silent:!0,multi:!0})}else ae.forEach(Se=>{const Ve=u.value.find(st=>st.id===Se);Ve&&(Ve.filteredValue=[])}),N.value={},t.store.commit("filterChange",{column:{},values:[],silent:!0})},G=()=>{I.value&&(fe(null,null,null),t.store.commit("changeSortCondition",{silent:!0}))},{setExpandRowKeys:J,toggleRowExpansion:ue,updateExpandRows:_e,states:ye,isRowExpanded:Ne}=Rue({data:r,rowKey:o}),{updateTreeExpandKeys:Le,toggleTreeExpansion:Ee,updateTreeData:Pe,loadOrToggle:me,states:Ue}=Vue({data:r,rowKey:o}),{updateCurrentRowData:Xe,updateCurrentRow:ce,setCurrentRowKey:oe,states:pe}=Due({data:r,rowKey:o});return{assertRowKey:Z,updateColumns:U,scheduleLayout:B,isSelected:W,clearSelection:L,cleanSelection:A,getSelectionRows:X,toggleRowSelection:re,_toggleAllSelection:j,toggleAllSelection:null,updateSelectionByRowKey:ge,updateAllSelected:Oe,updateFilters:te,updateCurrentRow:ce,updateSort:fe,execFilter:ve,execSort:le,execQuery:Ae,clearFilter:Ge,clearSort:G,toggleRowExpansion:ue,setExpandRowKeysAdapter:$e=>{J($e),Le($e)},setCurrentRowKey:oe,toggleRowExpansionAdapter:($e,ie)=>{u.value.some(({type:ae})=>ae==="expand")?ue($e,ie):Ee($e,ie)},isRowExpanded:Ne,updateExpandRows:_e,updateCurrentRowData:Xe,loadOrToggle:me,updateTreeData:Pe,states:{tableSize:n,rowKey:o,data:r,_data:s,isComplex:i,_columns:l,originColumns:a,columns:u,fixedColumns:c,rightFixedColumns:d,leafColumns:f,fixedLeafColumns:p,rightFixedLeafColumns:h,updateOrderFns:m,leafColumnsLength:y,fixedLeafColumnsLength:v,rightFixedLeafColumnsLength:k,isAllSelected:b,selection:$,reserveSelection:x,selectOnIndeterminate:E,selectable:M,filters:N,filteredData:P,sortingColumn:I,sortProp:V,sortOrder:F,hoverRow:Y,...ye,...Ue,...pe}}}function Mb(e,t){return e.map(n=>{var o;return n.id===t.id?t:((o=n.children)!=null&&o.length&&(n.children=Mb(n.children,t)),n)})}function Ob(e){e.forEach(t=>{var n,o;t.no=(n=t.getColumnIndex)==null?void 0:n.call(t),(o=t.children)!=null&&o.length&&Ob(t.children)}),e.sort((t,n)=>t.no-n.no)}function zue(){const e=at(),t=Bue();return{ns:Re("table"),...t,mutations:{setData(i,l){const a=g(i._data)!==l;i.data.value=l,i._data.value=l,e.store.execQuery(),e.store.updateCurrentRowData(),e.store.updateExpandRows(),e.store.updateTreeData(e.store.states.defaultExpandAll.value),g(i.reserveSelection)?(e.store.assertRowKey(),e.store.updateSelectionByRowKey()):a?e.store.clearSelection():e.store.cleanSelection(),e.store.updateAllSelected(),e.$ready&&e.store.scheduleLayout()},insertColumn(i,l,a,u){const c=g(i._columns);let d=[];a?(a&&!a.children&&(a.children=[]),a.children.push(l),d=Mb(c,a)):(c.push(l),d=c),Ob(d),i._columns.value=d,i.updateOrderFns.push(u),l.type==="selection"&&(i.selectable.value=l.selectable,i.reserveSelection.value=l.reserveSelection),e.$ready&&(e.store.updateColumns(),e.store.scheduleLayout())},updateColumnOrder(i,l){var a;((a=l.getColumnIndex)==null?void 0:a.call(l))!==l.no&&(Ob(i._columns.value),e.$ready&&e.store.updateColumns())},removeColumn(i,l,a,u){const c=g(i._columns)||[];if(a)a.children.splice(a.children.findIndex(f=>f.id===l.id),1),ot(()=>{var f;((f=a.children)==null?void 0:f.length)===0&&delete a.children}),i._columns.value=Mb(c,a);else{const f=c.indexOf(l);f>-1&&(c.splice(f,1),i._columns.value=c)}const d=i.updateOrderFns.indexOf(u);d>-1&&i.updateOrderFns.splice(d,1),e.$ready&&(e.store.updateColumns(),e.store.scheduleLayout())},sort(i,l){const{prop:a,order:u,init:c}=l;if(a){const d=g(i.columns).find(f=>f.property===a);d&&(d.order=u,e.store.updateSort(d,a,u),e.store.commit("changeSortCondition",{init:c}))}},changeSortCondition(i,l){const{sortingColumn:a,sortProp:u,sortOrder:c}=i,d=g(a),f=g(u),p=g(c);p===null&&(i.sortingColumn.value=null,i.sortProp.value=null);const h={filter:!0};e.store.execQuery(h),(!l||!(l.silent||l.init))&&e.emit("sort-change",{column:d,prop:f,order:p}),e.store.updateTableScrollY()},filterChange(i,l){const{column:a,values:u,silent:c}=l,d=e.store.updateFilters(a,u);e.store.execQuery(),c||e.emit("filter-change",d),e.store.updateTableScrollY()},toggleAllSelection(){e.store.toggleAllSelection()},rowSelectedChanged(i,l){e.store.toggleRowSelection(l),e.store.updateAllSelected()},setHoverRow(i,l){i.hoverRow.value=l},setCurrentRow(i,l){e.store.updateCurrentRow(l)}},commit:function(i,...l){const a=e.store.mutations;if(a[i])a[i].apply(e,[e.store.states].concat(l));else throw new Error(`Action not found: ${i}`)},updateTableScrollY:function(){ot(()=>e.layout.updateScrollY.apply(e.layout))}}}const Jf={rowKey:"rowKey",defaultExpandAll:"defaultExpandAll",selectOnIndeterminate:"selectOnIndeterminate",indent:"indent",lazy:"lazy",data:"data","treeProps.hasChildren":{key:"lazyColumnIdentifier",default:"hasChildren"},"treeProps.children":{key:"childrenColumnName",default:"children"}};function jue(e,t){if(!e)throw new Error("Table is required.");const n=zue();return n.toggleAllSelection=jl(n._toggleAllSelection,10),Object.keys(Jf).forEach(o=>{EO(xO(t,o),o,n)}),Hue(n,t),n}function Hue(e,t){Object.keys(Jf).forEach(n=>{Me(()=>xO(t,n),o=>{EO(o,n,e)})})}function EO(e,t,n){let o=e,r=Jf[t];typeof Jf[t]=="object"&&(r=r.key,o=o||Jf[t].default),n.states[r].value=o}function xO(e,t){if(t.includes(".")){const n=t.split(".");let o=e;return n.forEach(r=>{o=o[r]}),o}else return e[t]}class Uue{constructor(t){this.observers=[],this.table=null,this.store=null,this.columns=[],this.fit=!0,this.showHeader=!0,this.height=q(null),this.scrollX=q(!1),this.scrollY=q(!1),this.bodyWidth=q(null),this.fixedWidth=q(null),this.rightFixedWidth=q(null),this.gutterWidth=0;for(const n in t)vt(t,n)&&(on(this[n])?this[n].value=t[n]:this[n]=t[n]);if(!this.table)throw new Error("Table is required for Table Layout");if(!this.store)throw new Error("Store is required for Table Layout")}updateScrollY(){if(this.height.value===null)return!1;const n=this.table.refs.scrollBarRef;if(this.table.vnode.el&&(n!=null&&n.wrapRef)){let o=!0;const r=this.scrollY.value;return o=n.wrapRef.scrollHeight>n.wrapRef.clientHeight,this.scrollY.value=o,r!==o}return!1}setHeight(t,n="height"){if(!Tt)return;const o=this.table.vnode.el;if(t=Aue(t),this.height.value=Number(t),!o&&(t||t===0))return ot(()=>this.setHeight(t,n));typeof t=="number"?(o.style[n]=`${t}px`,this.updateElsHeight()):typeof t=="string"&&(o.style[n]=t,this.updateElsHeight())}setMaxHeight(t){this.setHeight(t,"max-height")}getFlattenColumns(){const t=[];return this.table.store.states.columns.value.forEach(o=>{o.isColumnGroup?t.push.apply(t,o.columns):t.push(o)}),t}updateElsHeight(){this.updateScrollY(),this.notifyObservers("scrollable")}headerDisplayNone(t){if(!t)return!0;let n=t;for(;n.tagName!=="DIV";){if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1}updateColumnsWidth(){if(!Tt)return;const t=this.fit,n=this.table.vnode.el.clientWidth;let o=0;const r=this.getFlattenColumns(),s=r.filter(a=>typeof a.width!="number");if(r.forEach(a=>{typeof a.width=="number"&&a.realWidth&&(a.realWidth=null)}),s.length>0&&t){if(r.forEach(a=>{o+=Number(a.width||a.minWidth||80)}),o<=n){this.scrollX.value=!1;const a=n-o;if(s.length===1)s[0].realWidth=Number(s[0].minWidth||80)+a;else{const u=s.reduce((f,p)=>f+Number(p.minWidth||80),0),c=a/u;let d=0;s.forEach((f,p)=>{if(p===0)return;const h=Math.floor(Number(f.minWidth||80)*c);d+=h,f.realWidth=Number(f.minWidth||80)+h}),s[0].realWidth=Number(s[0].minWidth||80)+a-d}}else this.scrollX.value=!0,s.forEach(a=>{a.realWidth=Number(a.minWidth)});this.bodyWidth.value=Math.max(o,n),this.table.state.resizeState.value.width=this.bodyWidth.value}else r.forEach(a=>{!a.width&&!a.minWidth?a.realWidth=80:a.realWidth=Number(a.width||a.minWidth),o+=a.realWidth}),this.scrollX.value=o>n,this.bodyWidth.value=o;const i=this.store.states.fixedColumns.value;if(i.length>0){let a=0;i.forEach(u=>{a+=Number(u.realWidth||u.width)}),this.fixedWidth.value=a}const l=this.store.states.rightFixedColumns.value;if(l.length>0){let a=0;l.forEach(u=>{a+=Number(u.realWidth||u.width)}),this.rightFixedWidth.value=a}this.notifyObservers("columns")}addObserver(t){this.observers.push(t)}removeObserver(t){const n=this.observers.indexOf(t);n!==-1&&this.observers.splice(n,1)}notifyObservers(t){this.observers.forEach(o=>{var r,s;switch(t){case"columns":(r=o.state)==null||r.onColumnsChange(this);break;case"scrollable":(s=o.state)==null||s.onScrollableChange(this);break;default:throw new Error(`Table Layout don't have event ${t}.`)}})}}const{CheckboxGroup:Wue}=En,Kue=Q({name:"ElTableFilterPanel",components:{ElCheckbox:En,ElCheckboxGroup:Wue,ElScrollbar:Ss,ElTooltip:ea,ElIcon:Ie,ArrowDown:Eu,ArrowUp:D0},directives:{ClickOutside:id},props:{placement:{type:String,default:"bottom-start"},store:{type:Object},column:{type:Object},upDataColumn:{type:Function}},setup(e){const t=at(),{t:n}=Kt(),o=Re("table-filter"),r=t==null?void 0:t.parent;r.filterPanels.value[e.column.id]||(r.filterPanels.value[e.column.id]=t);const s=q(!1),i=q(null),l=R(()=>e.column&&e.column.filters),a=R(()=>e.column.filterClassName?`${o.b()} ${e.column.filterClassName}`:o.b()),u=R({get:()=>{var x;return(((x=e.column)==null?void 0:x.filteredValue)||[])[0]},set:x=>{c.value&&(typeof x<"u"&&x!==null?c.value.splice(0,1,x):c.value.splice(0,1))}}),c=R({get(){return e.column?e.column.filteredValue||[]:[]},set(x){e.column&&e.upDataColumn("filteredValue",x)}}),d=R(()=>e.column?e.column.filterMultiple:!0),f=x=>x.value===u.value,p=()=>{s.value=!1},h=x=>{x.stopPropagation(),s.value=!s.value},m=()=>{s.value=!1},y=()=>{b(c.value),p()},v=()=>{c.value=[],b(c.value),p()},k=x=>{u.value=x,b(typeof x<"u"&&x!==null?c.value:[]),p()},b=x=>{e.store.commit("filterChange",{column:e.column,values:x}),e.store.updateAllSelected()};Me(s,x=>{e.column&&e.upDataColumn("filterOpened",x)},{immediate:!0});const $=R(()=>{var x,E;return(E=(x=i.value)==null?void 0:x.popperRef)==null?void 0:E.contentRef});return{tooltipVisible:s,multiple:d,filterClassName:a,filteredValue:c,filterValue:u,filters:l,handleConfirm:y,handleReset:v,handleSelect:k,isActive:f,t:n,ns:o,showFilterPanel:h,hideFilterPanel:m,popperPaneRef:$,tooltip:i}}}),que={key:0},Gue=["disabled"],Yue=["label","onClick"];function Zue(e,t,n,o,r,s){const i=ee("el-checkbox"),l=ee("el-checkbox-group"),a=ee("el-scrollbar"),u=ee("arrow-up"),c=ee("arrow-down"),d=ee("el-icon"),f=ee("el-tooltip"),p=Rt("click-outside");return C(),H(f,{ref:"tooltip",visible:e.tooltipVisible,offset:0,placement:e.placement,"show-arrow":!1,"stop-popper-mouse-event":!1,teleported:"",effect:"light",pure:"","popper-class":e.filterClassName,persistent:""},{content:S(()=>[e.multiple?(C(),T("div",que,[_("div",{class:D(e.ns.e("content"))},[w(a,{"wrap-class":e.ns.e("wrap")},{default:S(()=>[w(l,{modelValue:e.filteredValue,"onUpdate:modelValue":t[0]||(t[0]=h=>e.filteredValue=h),class:D(e.ns.e("checkbox-group"))},{default:S(()=>[(C(!0),T(de,null,nt(e.filters,h=>(C(),H(i,{key:h.value,value:h.value},{default:S(()=>[ne(O(h.text),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","class"])]),_:1},8,["wrap-class"])],2),_("div",{class:D(e.ns.e("bottom"))},[_("button",{class:D({[e.ns.is("disabled")]:e.filteredValue.length===0}),disabled:e.filteredValue.length===0,type:"button",onClick:t[1]||(t[1]=(...h)=>e.handleConfirm&&e.handleConfirm(...h))},O(e.t("el.table.confirmFilter")),11,Gue),_("button",{type:"button",onClick:t[2]||(t[2]=(...h)=>e.handleReset&&e.handleReset(...h))},O(e.t("el.table.resetFilter")),1)],2)])):(C(),T("ul",{key:1,class:D(e.ns.e("list"))},[_("li",{class:D([e.ns.e("list-item"),{[e.ns.is("active")]:e.filterValue===void 0||e.filterValue===null}]),onClick:t[3]||(t[3]=h=>e.handleSelect(null))},O(e.t("el.table.clearFilter")),3),(C(!0),T(de,null,nt(e.filters,h=>(C(),T("li",{key:h.value,class:D([e.ns.e("list-item"),e.ns.is("active",e.isActive(h))]),label:h.value,onClick:m=>e.handleSelect(h.value)},O(h.text),11,Yue))),128))],2))]),default:S(()=>[Fe((C(),T("span",{class:D([`${e.ns.namespace.value}-table__column-filter-trigger`,`${e.ns.namespace.value}-none-outline`]),onClick:t[4]||(t[4]=(...h)=>e.showFilterPanel&&e.showFilterPanel(...h))},[w(d,null,{default:S(()=>[e.column.filterOpened?(C(),H(u,{key:0})):(C(),H(c,{key:1}))]),_:1})],2)),[[p,e.hideFilterPanel,e.popperPaneRef]])]),_:1},8,["visible","placement","popper-class"])}var Jue=He(Kue,[["render",Zue],["__file","filter-panel.vue"]]);function TO(e){const t=at();yd(()=>{n.value.addObserver(t)}),Ct(()=>{o(n.value),r(n.value)}),Fi(()=>{o(n.value),r(n.value)}),ri(()=>{n.value.removeObserver(t)});const n=R(()=>{const s=e.layout;if(!s)throw new Error("Can not find table layout.");return s}),o=s=>{var i;const l=((i=e.vnode.el)==null?void 0:i.querySelectorAll("colgroup > col"))||[];if(!l.length)return;const a=s.getFlattenColumns(),u={};a.forEach(c=>{u[c.id]=c});for(let c=0,d=l.length;c<d;c++){const f=l[c],p=f.getAttribute("name"),h=u[p];h&&f.setAttribute("width",h.realWidth||h.width)}},r=s=>{var i,l;const a=((i=e.vnode.el)==null?void 0:i.querySelectorAll("colgroup > col[name=gutter]"))||[];for(let c=0,d=a.length;c<d;c++)a[c].setAttribute("width",s.scrollY.value?s.gutterWidth:"0");const u=((l=e.vnode.el)==null?void 0:l.querySelectorAll("th.gutter"))||[];for(let c=0,d=u.length;c<d;c++){const f=u[c];f.style.width=s.scrollY.value?`${s.gutterWidth}px`:"0",f.style.display=s.scrollY.value?"":"none"}};return{tableLayout:n.value,onColumnsChange:o,onScrollableChange:r}}const ii=Symbol("ElTable");function Xue(e,t){const n=at(),o=je(ii),r=m=>{m.stopPropagation()},s=(m,y)=>{!y.filters&&y.sortable?h(m,y,!1):y.filterable&&!y.sortable&&r(m),o==null||o.emit("header-click",y,m)},i=(m,y)=>{o==null||o.emit("header-contextmenu",y,m)},l=q(null),a=q(!1),u=q({}),c=(m,y)=>{if(Tt&&!(y.children&&y.children.length>0)&&l.value&&e.border){a.value=!0;const v=o;t("set-drag-visible",!0);const b=(v==null?void 0:v.vnode.el).getBoundingClientRect().left,$=n.vnode.el.querySelector(`th.${y.id}`),x=$.getBoundingClientRect(),E=x.left-b+30;uu($,"noclick"),u.value={startMouseLeft:m.clientX,startLeft:x.right-b,startColumnLeft:x.left-b,tableLeft:b};const M=v==null?void 0:v.refs.resizeProxy;M.style.left=`${u.value.startLeft}px`,document.onselectstart=function(){return!1},document.ondragstart=function(){return!1};const N=I=>{const V=I.clientX-u.value.startMouseLeft,F=u.value.startLeft+V;M.style.left=`${Math.max(E,F)}px`},P=()=>{if(a.value){const{startColumnLeft:I,startLeft:V}=u.value,Y=Number.parseInt(M.style.left,10)-I;y.width=y.realWidth=Y,v==null||v.emit("header-dragend",y.width,V-I,y,m),requestAnimationFrame(()=>{e.store.scheduleLayout(!1,!0)}),document.body.style.cursor="",a.value=!1,l.value=null,u.value={},t("set-drag-visible",!1)}document.removeEventListener("mousemove",N),document.removeEventListener("mouseup",P),document.onselectstart=null,document.ondragstart=null,setTimeout(()=>{Zs($,"noclick")},0)};document.addEventListener("mousemove",N),document.addEventListener("mouseup",P)}},d=(m,y)=>{if(y.children&&y.children.length>0)return;const v=m.target;if(!ys(v))return;const k=v==null?void 0:v.closest("th");if(!(!y||!y.resizable)&&!a.value&&e.border){const b=k.getBoundingClientRect(),$=document.body.style;b.width>12&&b.right-m.pageX<8?($.cursor="col-resize",Oi(k,"is-sortable")&&(k.style.cursor="col-resize"),l.value=y):a.value||($.cursor="",Oi(k,"is-sortable")&&(k.style.cursor="pointer"),l.value=null)}},f=()=>{Tt&&(document.body.style.cursor="")},p=({order:m,sortOrders:y})=>{if(m==="")return y[0];const v=y.indexOf(m||null);return y[v>y.length-2?0:v+1]},h=(m,y,v)=>{var k;m.stopPropagation();const b=y.order===v?null:v||p(y),$=(k=m.target)==null?void 0:k.closest("th");if($&&Oi($,"noclick")){Zs($,"noclick");return}if(!y.sortable)return;const x=e.store.states;let E=x.sortProp.value,M;const N=x.sortingColumn.value;(N!==y||N===y&&N.order===null)&&(N&&(N.order=null),x.sortingColumn.value=y,E=y.property),b?M=y.order=b:M=y.order=null,x.sortProp.value=E,x.sortOrder.value=M,o==null||o.store.commit("changeSortCondition")};return{handleHeaderClick:s,handleHeaderContextMenu:i,handleMouseDown:c,handleMouseMove:d,handleMouseOut:f,handleSortClick:h,handleFilterClick:r}}function Que(e){const t=je(ii),n=Re("table");return{getHeaderRowStyle:l=>{const a=t==null?void 0:t.props.headerRowStyle;return typeof a=="function"?a.call(null,{rowIndex:l}):a},getHeaderRowClass:l=>{const a=[],u=t==null?void 0:t.props.headerRowClassName;return typeof u=="string"?a.push(u):typeof u=="function"&&a.push(u.call(null,{rowIndex:l})),a.join(" ")},getHeaderCellStyle:(l,a,u,c)=>{var d;let f=(d=t==null?void 0:t.props.headerCellStyle)!=null?d:{};typeof f=="function"&&(f=f.call(null,{rowIndex:l,columnIndex:a,row:u,column:c}));const p=Qw(a,c.fixed,e.store,u);return ld(p,"left"),ld(p,"right"),Object.assign({},f,p)},getHeaderCellClass:(l,a,u,c)=>{const d=Xw(n.b(),a,c.fixed,e.store,u),f=[c.id,c.order,c.headerAlign,c.className,c.labelClassName,...d];c.children||f.push("is-leaf"),c.sortable&&f.push("is-sortable");const p=t==null?void 0:t.props.headerCellClassName;return typeof p=="string"?f.push(p):typeof p=="function"&&f.push(p.call(null,{rowIndex:l,columnIndex:a,row:u,column:c})),f.push(n.e("cell")),f.filter(h=>!!h).join(" ")}}}const MO=e=>{const t=[];return e.forEach(n=>{n.children?(t.push(n),t.push.apply(t,MO(n.children))):t.push(n)}),t},ece=e=>{let t=1;const n=(s,i)=>{if(i&&(s.level=i.level+1,t<s.level&&(t=s.level)),s.children){let l=0;s.children.forEach(a=>{n(a,s),l+=a.colSpan}),s.colSpan=l}else s.colSpan=1};e.forEach(s=>{s.level=1,n(s,void 0)});const o=[];for(let s=0;s<t;s++)o.push([]);return MO(e).forEach(s=>{s.children?(s.rowSpan=1,s.children.forEach(i=>i.isSubColumn=!0)):s.rowSpan=t-s.level+1,o[s.level-1].push(s)}),o};function tce(e){const t=je(ii),n=R(()=>ece(e.store.states.originColumns.value));return{isGroup:R(()=>{const s=n.value.length>1;return s&&t&&(t.state.isGroup.value=!0),s}),toggleAllSelection:s=>{s.stopPropagation(),t==null||t.store.commit("toggleAllSelection")},columnRows:n}}var nce=Q({name:"ElTableHeader",components:{ElCheckbox:En},props:{fixed:{type:String,default:""},store:{required:!0,type:Object},border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})}},setup(e,{emit:t}){const n=at(),o=je(ii),r=Re("table"),s=q({}),{onColumnsChange:i,onScrollableChange:l}=TO(o);Ct(async()=>{await ot(),await ot();const{prop:E,order:M}=e.defaultSort;o==null||o.store.commit("sort",{prop:E,order:M,init:!0})});const{handleHeaderClick:a,handleHeaderContextMenu:u,handleMouseDown:c,handleMouseMove:d,handleMouseOut:f,handleSortClick:p,handleFilterClick:h}=Xue(e,t),{getHeaderRowStyle:m,getHeaderRowClass:y,getHeaderCellStyle:v,getHeaderCellClass:k}=Que(e),{isGroup:b,toggleAllSelection:$,columnRows:x}=tce(e);return n.state={onColumnsChange:i,onScrollableChange:l},n.filterPanels=s,{ns:r,filterPanels:s,onColumnsChange:i,onScrollableChange:l,columnRows:x,getHeaderRowClass:y,getHeaderRowStyle:m,getHeaderCellClass:k,getHeaderCellStyle:v,handleHeaderClick:a,handleHeaderContextMenu:u,handleMouseDown:c,handleMouseMove:d,handleMouseOut:f,handleSortClick:p,handleFilterClick:h,isGroup:b,toggleAllSelection:$}},render(){const{ns:e,isGroup:t,columnRows:n,getHeaderCellStyle:o,getHeaderCellClass:r,getHeaderRowClass:s,getHeaderRowStyle:i,handleHeaderClick:l,handleHeaderContextMenu:a,handleMouseDown:u,handleMouseMove:c,handleSortClick:d,handleMouseOut:f,store:p,$parent:h}=this;let m=1;return lt("thead",{class:{[e.is("group")]:t}},n.map((y,v)=>lt("tr",{class:s(v),key:v,style:i(v)},y.map((k,b)=>(k.rowSpan>m&&(m=k.rowSpan),lt("th",{class:r(v,b,y,k),colspan:k.colSpan,key:`${k.id}-thead`,rowspan:k.rowSpan,style:o(v,b,y,k),onClick:$=>l($,k),onContextmenu:$=>a($,k),onMousedown:$=>u($,k),onMousemove:$=>c($,k),onMouseout:f},[lt("div",{class:["cell",k.filteredValue&&k.filteredValue.length>0?"highlight":""]},[k.renderHeader?k.renderHeader({column:k,$index:b,store:p,_self:h}):k.label,k.sortable&<("span",{onClick:$=>d($,k),class:"caret-wrapper"},[lt("i",{onClick:$=>d($,k,"ascending"),class:"sort-caret ascending"}),lt("i",{onClick:$=>d($,k,"descending"),class:"sort-caret descending"})]),k.filterable&<(Jue,{store:p,placement:k.filterPlacement||"bottom-start",column:k,upDataColumn:($,x)=>{k[$]=x}})])]))))))}});function oce(e){const t=je(ii),n=q(""),o=q(lt("div")),r=(h,m,y)=>{var v;const k=t,b=my(h);let $;const x=(v=k==null?void 0:k.vnode.el)==null?void 0:v.dataset.prefix;b&&($=x8({columns:e.store.states.columns.value},b,x),$&&(k==null||k.emit(`cell-${y}`,m,$,b,h))),k==null||k.emit(`row-${y}`,m,$,h)},s=(h,m)=>{r(h,m,"dblclick")},i=(h,m)=>{e.store.commit("setCurrentRow",m),r(h,m,"click")},l=(h,m)=>{r(h,m,"contextmenu")},a=jl(h=>{e.store.commit("setHoverRow",h)},30),u=jl(()=>{e.store.commit("setHoverRow",null)},30),c=h=>{const m=window.getComputedStyle(h,null),y=Number.parseInt(m.paddingLeft,10)||0,v=Number.parseInt(m.paddingRight,10)||0,k=Number.parseInt(m.paddingTop,10)||0,b=Number.parseInt(m.paddingBottom,10)||0;return{left:y,right:v,top:k,bottom:b}},d=(h,m,y)=>{let v=m.target.parentNode;for(;h>1&&(v=v==null?void 0:v.nextSibling,!(!v||v.nodeName!=="TR"));)y(v,"hover-row hover-fixed-row"),h--};return{handleDoubleClick:s,handleClick:i,handleContextMenu:l,handleMouseEnter:a,handleMouseLeave:u,handleCellMouseEnter:(h,m,y)=>{var v;const k=t,b=my(h),$=(v=k==null?void 0:k.vnode.el)==null?void 0:v.dataset.prefix;if(b){const B=x8({columns:e.store.states.columns.value},b,$);b.rowSpan>1&&d(b.rowSpan,h,uu);const W=k.hoverState={cell:b,column:B,row:m};k==null||k.emit("cell-mouse-enter",W.row,W.column,W.cell,h)}if(!y)return;const x=h.target.querySelector(".cell");if(!(Oi(x,`${$}-tooltip`)&&x.childNodes.length))return;const E=document.createRange();E.setStart(x,0),E.setEnd(x,x.childNodes.length);let M=E.getBoundingClientRect().width,N=E.getBoundingClientRect().height;M-Math.floor(M)<.001&&(M=Math.floor(M)),N-Math.floor(N)<.001&&(N=Math.floor(N));const{top:V,left:F,right:Y,bottom:Z}=c(x),K=F+Y,U=V+Z;(M+K>x.offsetWidth||N+U>x.offsetHeight||x.scrollWidth>x.offsetWidth)&&Lue(y,b.innerText||b.textContent,b,k)},handleCellMouseLeave:h=>{const m=my(h);if(!m)return;m.rowSpan>1&&d(m.rowSpan,h,Zs);const y=t==null?void 0:t.hoverState;t==null||t.emit("cell-mouse-leave",y==null?void 0:y.row,y==null?void 0:y.column,y==null?void 0:y.cell,h)},tooltipContent:n,tooltipTrigger:o}}function rce(e){const t=je(ii),n=Re("table");return{getRowStyle:(u,c)=>{const d=t==null?void 0:t.props.rowStyle;return typeof d=="function"?d.call(null,{row:u,rowIndex:c}):d||null},getRowClass:(u,c)=>{const d=[n.e("row")];t!=null&&t.props.highlightCurrentRow&&u===e.store.states.currentRow.value&&d.push("current-row"),e.stripe&&c%2===1&&d.push(n.em("row","striped"));const f=t==null?void 0:t.props.rowClassName;return typeof f=="string"?d.push(f):typeof f=="function"&&d.push(f.call(null,{row:u,rowIndex:c})),d},getCellStyle:(u,c,d,f)=>{const p=t==null?void 0:t.props.cellStyle;let h=p??{};typeof p=="function"&&(h=p.call(null,{rowIndex:u,columnIndex:c,row:d,column:f}));const m=Qw(c,e==null?void 0:e.fixed,e.store);return ld(m,"left"),ld(m,"right"),Object.assign({},h,m)},getCellClass:(u,c,d,f,p)=>{const h=Xw(n.b(),c,e==null?void 0:e.fixed,e.store,void 0,p),m=[f.id,f.align,f.className,...h],y=t==null?void 0:t.props.cellClassName;return typeof y=="string"?m.push(y):typeof y=="function"&&m.push(y.call(null,{rowIndex:u,columnIndex:c,row:d,column:f})),m.push(n.e("cell")),m.filter(v=>!!v).join(" ")},getSpan:(u,c,d,f)=>{let p=1,h=1;const m=t==null?void 0:t.props.spanMethod;if(typeof m=="function"){const y=m({row:u,column:c,rowIndex:d,columnIndex:f});Array.isArray(y)?(p=y[0],h=y[1]):typeof y=="object"&&(p=y.rowspan,h=y.colspan)}return{rowspan:p,colspan:h}},getColspanRealWidth:(u,c,d)=>{if(c<1)return u[d].realWidth;const f=u.map(({realWidth:p,width:h})=>p||h).slice(d,d+c);return Number(f.reduce((p,h)=>Number(p)+Number(h),-1))}}}function sce(e){const t=je(ii),n=Re("table"),{handleDoubleClick:o,handleClick:r,handleContextMenu:s,handleMouseEnter:i,handleMouseLeave:l,handleCellMouseEnter:a,handleCellMouseLeave:u,tooltipContent:c,tooltipTrigger:d}=oce(e),{getRowStyle:f,getRowClass:p,getCellStyle:h,getCellClass:m,getSpan:y,getColspanRealWidth:v}=rce(e),k=R(()=>e.store.states.columns.value.findIndex(({type:M})=>M==="default")),b=(M,N)=>{const P=t.props.rowKey;return P?io(M,P):N},$=(M,N,P,I=!1)=>{const{tooltipEffect:V,tooltipOptions:F,store:Y}=e,{indent:Z,columns:K}=Y.states,U=p(M,N);let B=!0;return P&&(U.push(n.em("row",`level-${P.level}`)),B=P.display),lt("tr",{style:[B?null:{display:"none"},f(M,N)],class:U,key:b(M,N),onDblclick:L=>o(L,M),onClick:L=>r(L,M),onContextmenu:L=>s(L,M),onMouseenter:()=>i(N),onMouseleave:l},K.value.map((L,A)=>{const{rowspan:X,colspan:re}=y(M,L,N,A);if(!X||!re)return null;const j=Object.assign({},L);j.realWidth=v(K.value,re,A);const ge={store:e.store,_self:e.context||t,column:j,row:M,$index:N,cellIndex:A,expanded:I};A===k.value&&P&&(ge.treeNode={indent:P.level*Z.value,level:P.level},typeof P.expanded=="boolean"&&(ge.treeNode.expanded=P.expanded,"loading"in P&&(ge.treeNode.loading=P.loading),"noLazyChildren"in P&&(ge.treeNode.noLazyChildren=P.noLazyChildren)));const Oe=`${N},${A}`,xe=j.columnKey||j.rawColumnKey||"",te=x(A,L,ge),fe=L.showOverflowTooltip&&uY({effect:V},F,L.showOverflowTooltip);return lt("td",{style:h(N,A,M,L),class:m(N,A,M,L,re-1),key:`${xe}${Oe}`,rowspan:X,colspan:re,onMouseenter:ve=>a(ve,M,fe),onMouseleave:u},[te])}))},x=(M,N,P)=>N.renderCell(P);return{wrappedRowRender:(M,N)=>{const P=e.store,{isRowExpanded:I,assertRowKey:V}=P,{treeData:F,lazyTreeNodeMap:Y,childrenColumnName:Z,rowKey:K}=P.states,U=P.states.columns.value;if(U.some(({type:W})=>W==="expand")){const W=I(M),L=$(M,N,void 0,W),A=t.renderExpanded;return W?A?[[L,lt("tr",{key:`expanded-row__${L.key}`},[lt("td",{colspan:U.length,class:`${n.e("cell")} ${n.e("expanded-cell")}`},[A({row:M,$index:N,store:P,expanded:W})])])]]:(console.error("[Element Error]renderExpanded is required."),L):[[L]]}else if(Object.keys(F.value).length){V();const W=io(M,K.value);let L=F.value[W],A=null;L&&(A={expanded:L.expanded,level:L.level,display:!0},typeof L.lazy=="boolean"&&(typeof L.loaded=="boolean"&&L.loaded&&(A.noLazyChildren=!(L.children&&L.children.length)),A.loading=L.loading));const X=[$(M,N,A)];if(L){let re=0;const j=(Oe,xe)=>{Oe&&Oe.length&&xe&&Oe.forEach(te=>{const fe={display:xe.display&&xe.expanded,level:xe.level+1,expanded:!1,noLazyChildren:!1,loading:!1},ve=io(te,K.value);if(ve==null)throw new Error("For nested data item, row-key is required.");if(L={...F.value[ve]},L&&(fe.expanded=L.expanded,L.level=L.level||fe.level,L.display=!!(L.expanded&&fe.display),typeof L.lazy=="boolean"&&(typeof L.loaded=="boolean"&&L.loaded&&(fe.noLazyChildren=!(L.children&&L.children.length)),fe.loading=L.loading)),re++,X.push($(te,N+re,fe)),L){const le=Y.value[ve]||te[Z.value];j(le,L)}})};L.display=!0;const ge=Y.value[W]||M[Z.value];j(ge,L)}return X}else return $(M,N,void 0)},tooltipContent:c,tooltipTrigger:d}}const ice={store:{required:!0,type:Object},stripe:Boolean,tooltipEffect:String,tooltipOptions:{type:Object},context:{default:()=>({}),type:Object},rowClassName:[String,Function],rowStyle:[Object,Function],fixed:{type:String,default:""},highlight:Boolean};var lce=Q({name:"ElTableBody",props:ice,setup(e){const t=at(),n=je(ii),o=Re("table"),{wrappedRowRender:r,tooltipContent:s,tooltipTrigger:i}=sce(e),{onColumnsChange:l,onScrollableChange:a}=TO(n),u=[];return Me(e.store.states.hoverRow,(c,d)=>{var f;const p=t==null?void 0:t.vnode.el,h=Array.from((p==null?void 0:p.children)||[]).filter(v=>v==null?void 0:v.classList.contains(`${o.e("row")}`));let m=c;const y=(f=h[m])==null?void 0:f.childNodes;if(y!=null&&y.length){let v=0;Array.from(y).reduce((b,$,x)=>{var E,M;return((E=y[x])==null?void 0:E.colSpan)>1&&(v=(M=y[x])==null?void 0:M.colSpan),$.nodeName!=="TD"&&v===0&&b.push(x),v>0&&v--,b},[]).forEach(b=>{for(var $;m>0;){const x=($=h[m-1])==null?void 0:$.childNodes;if(x[b]&&x[b].nodeName==="TD"&&x[b].rowSpan>1){uu(x[b],"hover-cell"),u.push(x[b]);break}m--}})}else u.forEach(v=>Zs(v,"hover-cell")),u.length=0;!e.store.states.isComplex.value||!Tt||vY(()=>{const v=h[d],k=h[c];v&&!v.classList.contains("hover-fixed-row")&&Zs(v,"hover-row"),k&&uu(k,"hover-row")})}),ri(()=>{var c;(c=Sr)==null||c()}),{ns:o,onColumnsChange:l,onScrollableChange:a,wrappedRowRender:r,tooltipContent:s,tooltipTrigger:i}},render(){const{wrappedRowRender:e,store:t}=this,n=t.states.data.value||[];return lt("tbody",{tabIndex:-1},[n.reduce((o,r)=>o.concat(e(r,o.length)),[])])}});function ace(){const e=je(ii),t=e==null?void 0:e.store,n=R(()=>t.states.fixedLeafColumnsLength.value),o=R(()=>t.states.rightFixedColumns.value.length),r=R(()=>t.states.columns.value.length),s=R(()=>t.states.fixedColumns.value.length),i=R(()=>t.states.rightFixedColumns.value.length);return{leftFixedLeafCount:n,rightFixedLeafCount:o,columnsCount:r,leftFixedCount:s,rightFixedCount:i,columns:t.states.columns}}function uce(e){const{columns:t}=ace(),n=Re("table");return{getCellClasses:(s,i)=>{const l=s[i],a=[n.e("cell"),l.id,l.align,l.labelClassName,...Xw(n.b(),i,l.fixed,e.store)];return l.className&&a.push(l.className),l.children||a.push(n.is("leaf")),a},getCellStyles:(s,i)=>{const l=Qw(i,s.fixed,e.store);return ld(l,"left"),ld(l,"right"),l},columns:t}}var cce=Q({name:"ElTableFooter",props:{fixed:{type:String,default:""},store:{required:!0,type:Object},summaryMethod:Function,sumText:String,border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})}},setup(e){const{getCellClasses:t,getCellStyles:n,columns:o}=uce(e);return{ns:Re("table"),getCellClasses:t,getCellStyles:n,columns:o}},render(){const{columns:e,getCellStyles:t,getCellClasses:n,summaryMethod:o,sumText:r}=this,s=this.store.states.data.value;let i=[];return o?i=o({columns:e,data:s}):e.forEach((l,a)=>{if(a===0){i[a]=r;return}const u=s.map(p=>Number(p[l.property])),c=[];let d=!0;u.forEach(p=>{if(!Number.isNaN(+p)){d=!1;const h=`${p}`.split(".")[1];c.push(h?h.length:0)}});const f=Math.max.apply(null,c);d?i[a]="":i[a]=u.reduce((p,h)=>{const m=Number(h);return Number.isNaN(+m)?p:Number.parseFloat((p+h).toFixed(Math.min(f,20)))},0)}),lt(lt("tfoot",[lt("tr",{},[...e.map((l,a)=>lt("td",{key:a,colspan:l.colSpan,rowspan:l.rowSpan,class:n(e,a),style:t(l,a)},[lt("div",{class:["cell",l.labelClassName]},[i[a]])]))])]))}});function dce(e){return{setCurrentRow:c=>{e.commit("setCurrentRow",c)},getSelectionRows:()=>e.getSelectionRows(),toggleRowSelection:(c,d)=>{e.toggleRowSelection(c,d,!1),e.updateAllSelected()},clearSelection:()=>{e.clearSelection()},clearFilter:c=>{e.clearFilter(c)},toggleAllSelection:()=>{e.commit("toggleAllSelection")},toggleRowExpansion:(c,d)=>{e.toggleRowExpansionAdapter(c,d)},clearSort:()=>{e.clearSort()},sort:(c,d)=>{e.commit("sort",{prop:c,order:d})}}}function fce(e,t,n,o){const r=q(!1),s=q(null),i=q(!1),l=L=>{i.value=L},a=q({width:null,height:null,headerHeight:null}),u=q(!1),c={display:"inline-block",verticalAlign:"middle"},d=q(),f=q(0),p=q(0),h=q(0),m=q(0),y=q(0);as(()=>{t.setHeight(e.height)}),as(()=>{t.setMaxHeight(e.maxHeight)}),Me(()=>[e.currentRowKey,n.states.rowKey],([L,A])=>{!g(A)||!g(L)||n.setCurrentRowKey(`${L}`)},{immediate:!0}),Me(()=>e.data,L=>{o.store.commit("setData",L)},{immediate:!0,deep:!0}),as(()=>{e.expandRowKeys&&n.setExpandRowKeysAdapter(e.expandRowKeys)});const v=()=>{o.store.commit("setHoverRow",null),o.hoverState&&(o.hoverState=null)},k=(L,A)=>{const{pixelX:X,pixelY:re}=A;Math.abs(X)>=Math.abs(re)&&(o.refs.bodyWrapper.scrollLeft+=A.pixelX/5)},b=R(()=>e.height||e.maxHeight||n.states.fixedColumns.value.length>0||n.states.rightFixedColumns.value.length>0),$=R(()=>({width:t.bodyWidth.value?`${t.bodyWidth.value}px`:""})),x=()=>{b.value&&t.updateElsHeight(),t.updateColumnsWidth(),requestAnimationFrame(P)};Ct(async()=>{await ot(),n.updateColumns(),I(),requestAnimationFrame(x);const L=o.vnode.el,A=o.refs.headerWrapper;e.flexible&&L&&L.parentElement&&(L.parentElement.style.minWidth="0"),a.value={width:d.value=L.offsetWidth,height:L.offsetHeight,headerHeight:e.showHeader&&A?A.offsetHeight:null},n.states.columns.value.forEach(X=>{X.filteredValue&&X.filteredValue.length&&o.store.commit("filterChange",{column:X,values:X.filteredValue,silent:!0})}),o.$ready=!0});const E=(L,A)=>{if(!L)return;const X=Array.from(L.classList).filter(re=>!re.startsWith("is-scrolling-"));X.push(t.scrollX.value?A:"is-scrolling-none"),L.className=X.join(" ")},M=L=>{const{tableWrapper:A}=o.refs;E(A,L)},N=L=>{const{tableWrapper:A}=o.refs;return!!(A&&A.classList.contains(L))},P=function(){if(!o.refs.scrollBarRef)return;if(!t.scrollX.value){const xe="is-scrolling-none";N(xe)||M(xe);return}const L=o.refs.scrollBarRef.wrapRef;if(!L)return;const{scrollLeft:A,offsetWidth:X,scrollWidth:re}=L,{headerWrapper:j,footerWrapper:ge}=o.refs;j&&(j.scrollLeft=A),ge&&(ge.scrollLeft=A);const Oe=re-X-1;A>=Oe?M("is-scrolling-right"):M(A===0?"is-scrolling-left":"is-scrolling-middle")},I=()=>{o.refs.scrollBarRef&&(o.refs.scrollBarRef.wrapRef&&Vn(o.refs.scrollBarRef.wrapRef,"scroll",P,{passive:!0}),e.fit?Bo(o.vnode.el,V):Vn(window,"resize",V),Bo(o.refs.bodyWrapper,()=>{var L,A;V(),(A=(L=o.refs)==null?void 0:L.scrollBarRef)==null||A.update()}))},V=()=>{var L,A,X,re;const j=o.vnode.el;if(!o.$ready||!j)return;let ge=!1;const{width:Oe,height:xe,headerHeight:te}=a.value,fe=d.value=j.offsetWidth;Oe!==fe&&(ge=!0);const ve=j.offsetHeight;(e.height||b.value)&&xe!==ve&&(ge=!0);const le=e.tableLayout==="fixed"?o.refs.headerWrapper:(L=o.refs.tableHeaderRef)==null?void 0:L.$el;e.showHeader&&(le==null?void 0:le.offsetHeight)!==te&&(ge=!0),f.value=((A=o.refs.tableWrapper)==null?void 0:A.scrollHeight)||0,h.value=(le==null?void 0:le.scrollHeight)||0,m.value=((X=o.refs.footerWrapper)==null?void 0:X.offsetHeight)||0,y.value=((re=o.refs.appendWrapper)==null?void 0:re.offsetHeight)||0,p.value=f.value-h.value-m.value-y.value,ge&&(a.value={width:fe,height:ve,headerHeight:e.showHeader&&(le==null?void 0:le.offsetHeight)||0},x())},F=Jo(),Y=R(()=>{const{bodyWidth:L,scrollY:A,gutterWidth:X}=t;return L.value?`${L.value-(A.value?X:0)}px`:""}),Z=R(()=>e.maxHeight?"fixed":e.tableLayout),K=R(()=>{if(e.data&&e.data.length)return null;let L="100%";e.height&&p.value&&(L=`${p.value}px`);const A=d.value;return{width:A?`${A}px`:"",height:L}}),U=R(()=>e.height?{height:Number.isNaN(Number(e.height))?e.height:`${e.height}px`}:e.maxHeight?{maxHeight:Number.isNaN(Number(e.maxHeight))?e.maxHeight:`${e.maxHeight}px`}:{}),B=R(()=>e.height?{height:"100%"}:e.maxHeight?Number.isNaN(Number(e.maxHeight))?{maxHeight:`calc(${e.maxHeight} - ${h.value+m.value}px)`}:{maxHeight:`${e.maxHeight-h.value-m.value}px`}:{});return{isHidden:r,renderExpanded:s,setDragVisible:l,isGroup:u,handleMouseLeave:v,handleHeaderFooterMousewheel:k,tableSize:F,emptyBlockStyle:K,handleFixedMousewheel:(L,A)=>{const X=o.refs.bodyWrapper;if(Math.abs(A.spinY)>0){const re=X.scrollTop;A.pixelY<0&&re!==0&&L.preventDefault(),A.pixelY>0&&X.scrollHeight-X.clientHeight>re&&L.preventDefault(),X.scrollTop+=Math.ceil(A.pixelY/5)}else X.scrollLeft+=Math.ceil(A.pixelX/5)},resizeProxyVisible:i,bodyWidth:Y,resizeState:a,doLayout:x,tableBodyStyles:$,tableLayout:Z,scrollbarViewStyle:c,tableInnerStyle:U,scrollbarStyle:B}}function pce(e){const t=q(),n=()=>{const r=e.vnode.el.querySelector(".hidden-columns"),s={childList:!0,subtree:!0},i=e.store.states.updateOrderFns;t.value=new MutationObserver(()=>{i.forEach(l=>l())}),t.value.observe(r,s)};Ct(()=>{n()}),ri(()=>{var o;(o=t.value)==null||o.disconnect()})}var hce={data:{type:Array,default:()=>[]},size:Gr,width:[String,Number],height:[String,Number],maxHeight:[String,Number],fit:{type:Boolean,default:!0},stripe:Boolean,border:Boolean,rowKey:[String,Function],showHeader:{type:Boolean,default:!0},showSummary:Boolean,sumText:String,summaryMethod:Function,rowClassName:[String,Function],rowStyle:[Object,Function],cellClassName:[String,Function],cellStyle:[Object,Function],headerRowClassName:[String,Function],headerRowStyle:[Object,Function],headerCellClassName:[String,Function],headerCellStyle:[Object,Function],highlightCurrentRow:Boolean,currentRowKey:[String,Number],emptyText:String,expandRowKeys:Array,defaultExpandAll:Boolean,defaultSort:Object,tooltipEffect:String,tooltipOptions:Object,spanMethod:Function,selectOnIndeterminate:{type:Boolean,default:!0},indent:{type:Number,default:16},treeProps:{type:Object,default:()=>({hasChildren:"hasChildren",children:"children"})},lazy:Boolean,load:Function,style:{type:Object,default:()=>({})},className:{type:String,default:""},tableLayout:{type:String,default:"fixed"},scrollbarAlwaysOn:Boolean,flexible:Boolean,showOverflowTooltip:[Boolean,Object]};function OO(e){const t=e.tableLayout==="auto";let n=e.columns||[];t&&n.every(r=>r.width===void 0)&&(n=[]);const o=r=>{const s={key:`${e.tableLayout}_${r.id}`,style:{},name:void 0};return t?s.style={width:`${r.width}px`}:s.name=r.id,s};return lt("colgroup",{},n.map(r=>lt("col",o(r))))}OO.props=["columns","tableLayout"];const mce=()=>{const e=q(),t=(s,i)=>{const l=e.value;l&&l.scrollTo(s,i)},n=(s,i)=>{const l=e.value;l&&_t(i)&&["Top","Left"].includes(s)&&l[`setScroll${s}`](i)};return{scrollBarRef:e,scrollTo:t,setScrollTop:s=>n("Top",s),setScrollLeft:s=>n("Left",s)}};let gce=1;const vce=Q({name:"ElTable",directives:{Mousewheel:soe},components:{TableHeader:nce,TableBody:lce,TableFooter:cce,ElScrollbar:Ss,hColgroup:OO},props:hce,emits:["select","select-all","selection-change","cell-mouse-enter","cell-mouse-leave","cell-contextmenu","cell-click","cell-dblclick","row-click","row-contextmenu","row-dblclick","header-click","header-contextmenu","sort-change","filter-change","current-change","header-dragend","expand-change"],setup(e){const{t}=Kt(),n=Re("table"),o=at();wt(ii,o);const r=jue(o,e);o.store=r;const s=new Uue({store:o.store,table:o,fit:e.fit,showHeader:e.showHeader});o.layout=s;const i=R(()=>(r.states.data.value||[]).length===0),{setCurrentRow:l,getSelectionRows:a,toggleRowSelection:u,clearSelection:c,clearFilter:d,toggleAllSelection:f,toggleRowExpansion:p,clearSort:h,sort:m}=dce(r),{isHidden:y,renderExpanded:v,setDragVisible:k,isGroup:b,handleMouseLeave:$,handleHeaderFooterMousewheel:x,tableSize:E,emptyBlockStyle:M,handleFixedMousewheel:N,resizeProxyVisible:P,bodyWidth:I,resizeState:V,doLayout:F,tableBodyStyles:Y,tableLayout:Z,scrollbarViewStyle:K,tableInnerStyle:U,scrollbarStyle:B}=fce(e,s,r,o),{scrollBarRef:W,scrollTo:L,setScrollLeft:A,setScrollTop:X}=mce(),re=jl(F,50),j=`${n.namespace.value}-table_${gce++}`;o.tableId=j,o.state={isGroup:b,resizeState:V,doLayout:F,debouncedUpdateLayout:re};const ge=R(()=>e.sumText||t("el.table.sumText")),Oe=R(()=>e.emptyText||t("el.table.emptyText"));return pce(o),{ns:n,layout:s,store:r,handleHeaderFooterMousewheel:x,handleMouseLeave:$,tableId:j,tableSize:E,isHidden:y,isEmpty:i,renderExpanded:v,resizeProxyVisible:P,resizeState:V,isGroup:b,bodyWidth:I,tableBodyStyles:Y,emptyBlockStyle:M,debouncedUpdateLayout:re,handleFixedMousewheel:N,setCurrentRow:l,getSelectionRows:a,toggleRowSelection:u,clearSelection:c,clearFilter:d,toggleAllSelection:f,toggleRowExpansion:p,clearSort:h,doLayout:F,sort:m,t,setDragVisible:k,context:o,computedSumText:ge,computedEmptyText:Oe,tableLayout:Z,scrollbarViewStyle:K,tableInnerStyle:U,scrollbarStyle:B,scrollBarRef:W,scrollTo:L,setScrollLeft:A,setScrollTop:X}}}),yce=["data-prefix"],_ce={ref:"hiddenColumns",class:"hidden-columns"};function bce(e,t,n,o,r,s){const i=ee("hColgroup"),l=ee("table-header"),a=ee("table-body"),u=ee("table-footer"),c=ee("el-scrollbar"),d=Rt("mousewheel");return C(),T("div",{ref:"tableWrapper",class:D([{[e.ns.m("fit")]:e.fit,[e.ns.m("striped")]:e.stripe,[e.ns.m("border")]:e.border||e.isGroup,[e.ns.m("hidden")]:e.isHidden,[e.ns.m("group")]:e.isGroup,[e.ns.m("fluid-height")]:e.maxHeight,[e.ns.m("scrollable-x")]:e.layout.scrollX.value,[e.ns.m("scrollable-y")]:e.layout.scrollY.value,[e.ns.m("enable-row-hover")]:!e.store.states.isComplex.value,[e.ns.m("enable-row-transition")]:(e.store.states.data.value||[]).length!==0&&(e.store.states.data.value||[]).length<100,"has-footer":e.showSummary},e.ns.m(e.tableSize),e.className,e.ns.b(),e.ns.m(`layout-${e.tableLayout}`)]),style:Ye(e.style),"data-prefix":e.ns.namespace.value,onMouseleave:t[0]||(t[0]=(...f)=>e.handleMouseLeave&&e.handleMouseLeave(...f))},[_("div",{class:D(e.ns.e("inner-wrapper")),style:Ye(e.tableInnerStyle)},[_("div",_ce,[he(e.$slots,"default")],512),e.showHeader&&e.tableLayout==="fixed"?Fe((C(),T("div",{key:0,ref:"headerWrapper",class:D(e.ns.e("header-wrapper"))},[_("table",{ref:"tableHeader",class:D(e.ns.e("header")),style:Ye(e.tableBodyStyles),border:"0",cellpadding:"0",cellspacing:"0"},[w(i,{columns:e.store.states.columns.value,"table-layout":e.tableLayout},null,8,["columns","table-layout"]),w(l,{ref:"tableHeaderRef",border:e.border,"default-sort":e.defaultSort,store:e.store,onSetDragVisible:e.setDragVisible},null,8,["border","default-sort","store","onSetDragVisible"])],6)],2)),[[d,e.handleHeaderFooterMousewheel]]):z("v-if",!0),_("div",{ref:"bodyWrapper",class:D(e.ns.e("body-wrapper"))},[w(c,{ref:"scrollBarRef","view-style":e.scrollbarViewStyle,"wrap-style":e.scrollbarStyle,always:e.scrollbarAlwaysOn},{default:S(()=>[_("table",{ref:"tableBody",class:D(e.ns.e("body")),cellspacing:"0",cellpadding:"0",border:"0",style:Ye({width:e.bodyWidth,tableLayout:e.tableLayout})},[w(i,{columns:e.store.states.columns.value,"table-layout":e.tableLayout},null,8,["columns","table-layout"]),e.showHeader&&e.tableLayout==="auto"?(C(),H(l,{key:0,ref:"tableHeaderRef",class:D(e.ns.e("body-header")),border:e.border,"default-sort":e.defaultSort,store:e.store,onSetDragVisible:e.setDragVisible},null,8,["class","border","default-sort","store","onSetDragVisible"])):z("v-if",!0),w(a,{context:e.context,highlight:e.highlightCurrentRow,"row-class-name":e.rowClassName,"tooltip-effect":e.tooltipEffect,"tooltip-options":e.tooltipOptions,"row-style":e.rowStyle,store:e.store,stripe:e.stripe},null,8,["context","highlight","row-class-name","tooltip-effect","tooltip-options","row-style","store","stripe"]),e.showSummary&&e.tableLayout==="auto"?(C(),H(u,{key:1,class:D(e.ns.e("body-footer")),border:e.border,"default-sort":e.defaultSort,store:e.store,"sum-text":e.computedSumText,"summary-method":e.summaryMethod},null,8,["class","border","default-sort","store","sum-text","summary-method"])):z("v-if",!0)],6),e.isEmpty?(C(),T("div",{key:0,ref:"emptyBlock",style:Ye(e.emptyBlockStyle),class:D(e.ns.e("empty-block"))},[_("span",{class:D(e.ns.e("empty-text"))},[he(e.$slots,"empty",{},()=>[ne(O(e.computedEmptyText),1)])],2)],6)):z("v-if",!0),e.$slots.append?(C(),T("div",{key:1,ref:"appendWrapper",class:D(e.ns.e("append-wrapper"))},[he(e.$slots,"append")],2)):z("v-if",!0)]),_:3},8,["view-style","wrap-style","always"])],2),e.showSummary&&e.tableLayout==="fixed"?Fe((C(),T("div",{key:1,ref:"footerWrapper",class:D(e.ns.e("footer-wrapper"))},[_("table",{class:D(e.ns.e("footer")),cellspacing:"0",cellpadding:"0",border:"0",style:Ye(e.tableBodyStyles)},[w(i,{columns:e.store.states.columns.value,"table-layout":e.tableLayout},null,8,["columns","table-layout"]),w(u,{border:e.border,"default-sort":e.defaultSort,store:e.store,"sum-text":e.computedSumText,"summary-method":e.summaryMethod},null,8,["border","default-sort","store","sum-text","summary-method"])],6)],2)),[[en,!e.isEmpty],[d,e.handleHeaderFooterMousewheel]]):z("v-if",!0),e.border||e.isGroup?(C(),T("div",{key:2,class:D(e.ns.e("border-left-patch"))},null,2)):z("v-if",!0)],6),Fe(_("div",{ref:"resizeProxy",class:D(e.ns.e("column-resize-proxy"))},null,2),[[en,e.resizeProxyVisible]])],46,yce)}var wce=He(vce,[["render",bce],["__file","table.vue"]]);const Cce={selection:"table-column--selection",expand:"table__expand-column"},kce={default:{order:""},selection:{width:48,minWidth:48,realWidth:48,order:""},expand:{width:48,minWidth:48,realWidth:48,order:""},index:{width:48,minWidth:48,realWidth:48,order:""}},Sce=e=>Cce[e]||"",$ce={selection:{renderHeader({store:e,column:t}){function n(){return e.states.data.value&&e.states.data.value.length===0}return lt(En,{disabled:n(),size:e.states.tableSize.value,indeterminate:e.states.selection.value.length>0&&!e.states.isAllSelected.value,"onUpdate:modelValue":e.toggleAllSelection,modelValue:e.states.isAllSelected.value,ariaLabel:t.label})},renderCell({row:e,column:t,store:n,$index:o}){return lt(En,{disabled:t.selectable?!t.selectable.call(null,e,o):!1,size:n.states.tableSize.value,onChange:()=>{n.commit("rowSelectedChanged",e)},onClick:r=>r.stopPropagation(),modelValue:n.isSelected(e),ariaLabel:t.label})},sortable:!1,resizable:!1},index:{renderHeader({column:e}){return e.label||"#"},renderCell({column:e,$index:t}){let n=t+1;const o=e.index;return typeof o=="number"?n=t+o:typeof o=="function"&&(n=o(t)),lt("div",{},[n])},sortable:!1},expand:{renderHeader({column:e}){return e.label||""},renderCell({row:e,store:t,expanded:n}){const{ns:o}=t,r=[o.e("expand-icon")];return n&&r.push(o.em("expand-icon","expanded")),lt("div",{class:r,onClick:function(i){i.stopPropagation(),t.toggleRowExpansion(e)}},{default:()=>[lt(Ie,null,{default:()=>[lt(Ws)]})]})},sortable:!1,resizable:!1}};function Ece({row:e,column:t,$index:n}){var o;const r=t.property,s=r&&Ym(e,r).value;return t&&t.formatter?t.formatter(e,t,s,n):((o=s==null?void 0:s.toString)==null?void 0:o.call(s))||""}function xce({row:e,treeNode:t,store:n},o=!1){const{ns:r}=n;if(!t)return o?[lt("span",{class:r.e("placeholder")})]:null;const s=[],i=function(l){l.stopPropagation(),!t.loading&&n.loadOrToggle(e)};if(t.indent&&s.push(lt("span",{class:r.e("indent"),style:{"padding-left":`${t.indent}px`}})),typeof t.expanded=="boolean"&&!t.noLazyChildren){const l=[r.e("expand-icon"),t.expanded?r.em("expand-icon","expanded"):""];let a=Ws;t.loading&&(a=pw),s.push(lt("div",{class:l,onClick:i},{default:()=>[lt(Ie,{class:{[r.is("loading")]:t.loading}},{default:()=>[lt(a)]})]}))}else s.push(lt("span",{class:r.e("placeholder")}));return s}function O8(e,t){return e.reduce((n,o)=>(n[o]=o,n),t)}function Tce(e,t){const n=at();return{registerComplexWatchers:()=>{const s=["fixed"],i={realWidth:"width",realMinWidth:"minWidth"},l=O8(s,i);Object.keys(l).forEach(a=>{const u=i[a];vt(t,u)&&Me(()=>t[u],c=>{let d=c;u==="width"&&a==="realWidth"&&(d=Jw(c)),u==="minWidth"&&a==="realMinWidth"&&(d=kO(c)),n.columnConfig.value[u]=d,n.columnConfig.value[a]=d;const f=u==="fixed";e.value.store.scheduleLayout(f)})})},registerNormalWatchers:()=>{const s=["label","filters","filterMultiple","filteredValue","sortable","index","formatter","className","labelClassName","filterClassName","showOverflowTooltip"],i={property:"prop",align:"realAlign",headerAlign:"realHeaderAlign"},l=O8(s,i);Object.keys(l).forEach(a=>{const u=i[a];vt(t,u)&&Me(()=>t[u],c=>{n.columnConfig.value[a]=c})})}}}function Mce(e,t,n){const o=at(),r=q(""),s=q(!1),i=q(),l=q(),a=Re("table");as(()=>{i.value=e.align?`is-${e.align}`:null,i.value}),as(()=>{l.value=e.headerAlign?`is-${e.headerAlign}`:i.value,l.value});const u=R(()=>{let $=o.vnode.vParent||o.parent;for(;$&&!$.tableId&&!$.columnId;)$=$.vnode.vParent||$.parent;return $}),c=R(()=>{const{store:$}=o.parent;if(!$)return!1;const{treeData:x}=$.states,E=x.value;return E&&Object.keys(E).length>0}),d=q(Jw(e.width)),f=q(kO(e.minWidth)),p=$=>(d.value&&($.width=d.value),f.value&&($.minWidth=f.value),!d.value&&f.value&&($.width=void 0),$.minWidth||($.minWidth=80),$.realWidth=Number($.width===void 0?$.minWidth:$.width),$),h=$=>{const x=$.type,E=$ce[x]||{};Object.keys(E).forEach(N=>{const P=E[N];N!=="className"&&P!==void 0&&($[N]=P)});const M=Sce(x);if(M){const N=`${g(a.namespace)}-${M}`;$.className=$.className?`${$.className} ${N}`:N}return $},m=$=>{Array.isArray($)?$.forEach(E=>x(E)):x($);function x(E){var M;((M=E==null?void 0:E.type)==null?void 0:M.name)==="ElTableColumn"&&(E.vParent=o)}};return{columnId:r,realAlign:i,isSubColumn:s,realHeaderAlign:l,columnOrTableParent:u,setColumnWidth:p,setColumnForcedProps:h,setColumnRenders:$=>{e.renderHeader||$.type!=="selection"&&($.renderHeader=E=>(o.columnConfig.value.label,he(t,"header",E,()=>[$.label])));let x=$.renderCell;return $.type==="expand"?($.renderCell=E=>lt("div",{class:"cell"},[x(E)]),n.value.renderExpanded=E=>t.default?t.default(E):t.default):(x=x||Ece,$.renderCell=E=>{let M=null;if(t.default){const Y=t.default(E);M=Y.some(Z=>Z.type!==Yn)?Y:x(E)}else M=x(E);const{columns:N}=n.value.store.states,P=N.value.findIndex(Y=>Y.type==="default"),I=c.value&&E.cellIndex===P,V=xce(E,I),F={class:"cell",style:{}};return $.showOverflowTooltip&&(F.class=`${F.class} ${g(a.namespace)}-tooltip`,F.style={width:`${(E.column.realWidth||Number(E.column.width))-1}px`}),m(M),lt("div",F,[V,M])}),$},getPropsData:(...$)=>$.reduce((x,E)=>(Array.isArray(E)&&E.forEach(M=>{x[M]=e[M]}),x),{}),getColumnElIndex:($,x)=>Array.prototype.indexOf.call($,x),updateColumnOrder:()=>{n.value.store.commit("updateColumnOrder",o.columnConfig.value)}}}var Oce={type:{type:String,default:"default"},label:String,className:String,labelClassName:String,property:String,prop:String,width:{type:[String,Number],default:""},minWidth:{type:[String,Number],default:""},renderHeader:Function,sortable:{type:[Boolean,String],default:!1},sortMethod:Function,sortBy:[String,Function,Array],resizable:{type:Boolean,default:!0},columnKey:String,align:String,headerAlign:String,showOverflowTooltip:{type:[Boolean,Object],default:void 0},fixed:[Boolean,String],formatter:Function,selectable:Function,reserveSelection:Boolean,filterMethod:Function,filteredValue:Array,filters:Array,filterPlacement:String,filterMultiple:{type:Boolean,default:!0},filterClassName:String,index:[Number,Function],sortOrders:{type:Array,default:()=>["ascending","descending",null],validator:e=>e.every(t=>["ascending","descending",null].includes(t))}};let Ice=1;var IO=Q({name:"ElTableColumn",components:{ElCheckbox:En},props:Oce,setup(e,{slots:t}){const n=at(),o=q({}),r=R(()=>{let b=n.parent;for(;b&&!b.tableId;)b=b.parent;return b}),{registerNormalWatchers:s,registerComplexWatchers:i}=Tce(r,e),{columnId:l,isSubColumn:a,realHeaderAlign:u,columnOrTableParent:c,setColumnWidth:d,setColumnForcedProps:f,setColumnRenders:p,getPropsData:h,getColumnElIndex:m,realAlign:y,updateColumnOrder:v}=Mce(e,t,r),k=c.value;l.value=`${k.tableId||k.columnId}_column_${Ice++}`,yd(()=>{a.value=r.value!==k;const b=e.type||"default",$=e.sortable===""?!0:e.sortable,x=Uo(e.showOverflowTooltip)?k.props.showOverflowTooltip:e.showOverflowTooltip,E={...kce[b],id:l.value,type:b,property:e.prop||e.property,align:y,headerAlign:u,showOverflowTooltip:x,filterable:e.filters||e.filterMethod,filteredValue:[],filterPlacement:"",filterClassName:"",isColumnGroup:!1,isSubColumn:!1,filterOpened:!1,sortable:$,index:e.index,rawColumnKey:n.vnode.key};let V=h(["columnKey","label","className","labelClassName","type","renderHeader","formatter","fixed","resizable"],["sortMethod","sortBy","sortOrders"],["selectable","reserveSelection"],["filterMethod","filters","filterMultiple","filterOpened","filteredValue","filterPlacement","filterClassName"]);V=Iue(E,V),V=Nue(p,d,f)(V),o.value=V,s(),i()}),Ct(()=>{var b;const $=c.value,x=a.value?$.vnode.el.children:(b=$.refs.hiddenColumns)==null?void 0:b.children,E=()=>m(x||[],n.vnode.el);o.value.getColumnIndex=E,E()>-1&&r.value.store.commit("insertColumn",o.value,a.value?$.columnConfig.value:null,v)}),xn(()=>{r.value.store.commit("removeColumn",o.value,a.value?k.columnConfig.value:null,v)}),n.columnId=l.value,n.columnConfig=o},render(){var e,t,n;try{const o=(t=(e=this.$slots).default)==null?void 0:t.call(e,{row:{},column:{},$index:-1}),r=[];if(Array.isArray(o))for(const i of o)((n=i.type)==null?void 0:n.name)==="ElTableColumn"||i.shapeFlag&2?r.push(i):i.type===de&&Array.isArray(i.children)&&i.children.forEach(l=>{(l==null?void 0:l.patchFlag)!==1024&&!tt(l==null?void 0:l.children)&&r.push(l)});return lt("div",r)}catch{return lt("div",[])}}});const ev=Zt(wce,{TableColumn:IO}),tv=Jn(IO),nv=Symbol("tabsRootContextKey"),Ace=Ke({tabs:{type:Ce(Array),default:()=>Eo([])}}),AO="ElTabBar",Nce=Q({name:AO}),Pce=Q({...Nce,props:Ace,setup(e,{expose:t}){const n=e,o=at(),r=je(nv);r||Cs(AO,"<el-tabs><el-tab-bar /></el-tabs>");const s=Re("tabs"),i=q(),l=q(),a=()=>{let c=0,d=0;const f=["top","bottom"].includes(r.props.tabPosition)?"width":"height",p=f==="width"?"x":"y",h=p==="x"?"left":"top";return n.tabs.every(m=>{var y,v;const k=(v=(y=o.parent)==null?void 0:y.refs)==null?void 0:v[`tab-${m.uid}`];if(!k)return!1;if(!m.active)return!0;c=k[`offset${kl(h)}`],d=k[`client${kl(f)}`];const b=window.getComputedStyle(k);return f==="width"&&(n.tabs.length>1&&(d-=Number.parseFloat(b.paddingLeft)+Number.parseFloat(b.paddingRight)),c+=Number.parseFloat(b.paddingLeft)),!1}),{[f]:`${d}px`,transform:`translate${kl(p)}(${c}px)`}},u=()=>l.value=a();return Me(()=>n.tabs,async()=>{await ot(),u()},{immediate:!0}),Bo(i,()=>u()),t({ref:i,update:u}),(c,d)=>(C(),T("div",{ref_key:"barRef",ref:i,class:D([g(s).e("active-bar"),g(s).is(g(r).props.tabPosition)]),style:Ye(l.value)},null,6))}});var Lce=He(Pce,[["__file","tab-bar.vue"]]);const Rce=Ke({panes:{type:Ce(Array),default:()=>Eo([])},currentName:{type:[String,Number],default:""},editable:Boolean,type:{type:String,values:["card","border-card",""],default:""},stretch:Boolean}),Dce={tabClick:(e,t,n)=>n instanceof Event,tabRemove:(e,t)=>t instanceof Event},I8="ElTabNav",Vce=Q({name:I8,props:Rce,emits:Dce,setup(e,{expose:t,emit:n}){const o=at(),r=je(nv);r||Cs(I8,"<el-tabs><tab-nav /></el-tabs>");const s=Re("tabs"),i=eH(),l=hH(),a=q(),u=q(),c=q(),d=q(),f=q(!1),p=q(0),h=q(!1),m=q(!0),y=R(()=>["top","bottom"].includes(r.props.tabPosition)?"width":"height"),v=R(()=>({transform:`translate${y.value==="width"?"X":"Y"}(-${p.value}px)`})),k=()=>{if(!a.value)return;const P=a.value[`offset${kl(y.value)}`],I=p.value;if(!I)return;const V=I>P?I-P:0;p.value=V},b=()=>{if(!a.value||!u.value)return;const P=u.value[`offset${kl(y.value)}`],I=a.value[`offset${kl(y.value)}`],V=p.value;if(P-V<=I)return;const F=P-V>I*2?V+I:P-I;p.value=F},$=async()=>{const P=u.value;if(!f.value||!c.value||!a.value||!P)return;await ot();const I=c.value.querySelector(".is-active");if(!I)return;const V=a.value,F=["top","bottom"].includes(r.props.tabPosition),Y=I.getBoundingClientRect(),Z=V.getBoundingClientRect(),K=F?P.offsetWidth-Z.width:P.offsetHeight-Z.height,U=p.value;let B=U;F?(Y.left<Z.left&&(B=U-(Z.left-Y.left)),Y.right>Z.right&&(B=U+Y.right-Z.right)):(Y.top<Z.top&&(B=U-(Z.top-Y.top)),Y.bottom>Z.bottom&&(B=U+(Y.bottom-Z.bottom))),B=Math.max(B,0),p.value=Math.min(B,K)},x=()=>{var P;if(!u.value||!a.value)return;e.stretch&&((P=d.value)==null||P.update());const I=u.value[`offset${kl(y.value)}`],V=a.value[`offset${kl(y.value)}`],F=p.value;V<I?(f.value=f.value||{},f.value.prev=F,f.value.next=F+V<I,I-F<V&&(p.value=I-V)):(f.value=!1,F>0&&(p.value=0))},E=P=>{const I=P.code,{up:V,down:F,left:Y,right:Z}=rt;if(![V,F,Y,Z].includes(I))return;const K=Array.from(P.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)")),U=K.indexOf(P.target);let B;I===Y||I===V?U===0?B=K.length-1:B=U-1:U<K.length-1?B=U+1:B=0,K[B].focus({preventScroll:!0}),K[B].click(),M()},M=()=>{m.value&&(h.value=!0)},N=()=>h.value=!1;return Me(i,P=>{P==="hidden"?m.value=!1:P==="visible"&&setTimeout(()=>m.value=!0,50)}),Me(l,P=>{P?setTimeout(()=>m.value=!0,50):m.value=!1}),Bo(c,x),Ct(()=>setTimeout(()=>$(),0)),Fi(()=>x()),t({scrollToActiveTab:$,removeFocus:N}),Me(()=>e.panes,()=>o.update(),{flush:"post",deep:!0}),()=>{const P=f.value?[w("span",{class:[s.e("nav-prev"),s.is("disabled",!f.value.prev)],onClick:k},[w(Ie,null,{default:()=>[w(cu,null,null)]})]),w("span",{class:[s.e("nav-next"),s.is("disabled",!f.value.next)],onClick:b},[w(Ie,null,{default:()=>[w(Ws,null,null)]})])]:null,I=e.panes.map((V,F)=>{var Y,Z,K,U;const B=V.uid,W=V.props.disabled,L=(Z=(Y=V.props.name)!=null?Y:V.index)!=null?Z:`${F}`,A=!W&&(V.isClosable||e.editable);V.index=`${F}`;const X=A?w(Ie,{class:"is-icon-close",onClick:ge=>n("tabRemove",V,ge)},{default:()=>[w(Js,null,null)]}):null,re=((U=(K=V.slots).label)==null?void 0:U.call(K))||V.props.label,j=!W&&V.active?0:-1;return w("div",{ref:`tab-${B}`,class:[s.e("item"),s.is(r.props.tabPosition),s.is("active",V.active),s.is("disabled",W),s.is("closable",A),s.is("focus",h.value)],id:`tab-${L}`,key:`tab-${B}`,"aria-controls":`pane-${L}`,role:"tab","aria-selected":V.active,tabindex:j,onFocus:()=>M(),onBlur:()=>N(),onClick:ge=>{N(),n("tabClick",V,L,ge)},onKeydown:ge=>{A&&(ge.code===rt.delete||ge.code===rt.backspace)&&n("tabRemove",V,ge)}},[re,X])});return w("div",{ref:c,class:[s.e("nav-wrap"),s.is("scrollable",!!f.value),s.is(r.props.tabPosition)]},[P,w("div",{class:s.e("nav-scroll"),ref:a},[w("div",{class:[s.e("nav"),s.is(r.props.tabPosition),s.is("stretch",e.stretch&&["top","bottom"].includes(r.props.tabPosition))],ref:u,style:v.value,role:"tablist",onKeydown:E},[e.type?null:w(Lce,{ref:d,tabs:[...e.panes]},null),I])])])}}}),Fce=Ke({type:{type:String,values:["card","border-card",""],default:""},closable:Boolean,addable:Boolean,modelValue:{type:[String,Number]},editable:Boolean,tabPosition:{type:String,values:["top","right","bottom","left"],default:"top"},beforeLeave:{type:Ce(Function),default:()=>!0},stretch:Boolean}),gy=e=>tt(e)||_t(e),Bce={[Jt]:e=>gy(e),tabClick:(e,t)=>t instanceof Event,tabChange:e=>gy(e),edit:(e,t)=>["remove","add"].includes(t),tabRemove:e=>gy(e),tabAdd:()=>!0},zce=Q({name:"ElTabs",props:Fce,emits:Bce,setup(e,{emit:t,slots:n,expose:o}){var r;const s=Re("tabs"),{children:i,addChild:l,removeChild:a}=kQ(at(),"ElTabPane"),u=q(),c=q((r=e.modelValue)!=null?r:"0"),d=async(m,y=!1)=>{var v,k,b;if(!(c.value===m||Uo(m)))try{await((v=e.beforeLeave)==null?void 0:v.call(e,m,c.value))!==!1&&(c.value=m,y&&(t(Jt,m),t("tabChange",m)),(b=(k=u.value)==null?void 0:k.removeFocus)==null||b.call(k))}catch{}},f=(m,y,v)=>{m.props.disabled||(d(y,!0),t("tabClick",m,v))},p=(m,y)=>{m.props.disabled||Uo(m.props.name)||(y.stopPropagation(),t("edit",m.props.name,"remove"),t("tabRemove",m.props.name))},h=()=>{t("edit",void 0,"add"),t("tabAdd")};return Me(()=>e.modelValue,m=>d(m)),Me(c,async()=>{var m;await ot(),(m=u.value)==null||m.scrollToActiveTab()}),wt(nv,{props:e,currentName:c,registerPane:l,unregisterPane:a}),o({currentName:c}),()=>{const m=n["add-icon"],y=e.editable||e.addable?w("span",{class:s.e("new-tab"),tabindex:"0",onClick:h,onKeydown:b=>{b.code===rt.enter&&h()}},[m?he(n,"add-icon"):w(Ie,{class:s.is("icon-plus")},{default:()=>[w(hw,null,null)]})]):null,v=w("div",{class:[s.e("header"),s.is(e.tabPosition)]},[y,w(Vce,{ref:u,currentName:c.value,editable:e.editable,type:e.type,panes:i.value,stretch:e.stretch,onTabClick:f,onTabRemove:p},null)]),k=w("div",{class:s.e("content")},[he(n,"default")]);return w("div",{class:[s.b(),s.m(e.tabPosition),{[s.m("card")]:e.type==="card",[s.m("border-card")]:e.type==="border-card"}]},[...e.tabPosition!=="bottom"?[v,k]:[k,v]])}}}),jce=Ke({label:{type:String,default:""},name:{type:[String,Number]},closable:Boolean,disabled:Boolean,lazy:Boolean}),Hce=["id","aria-hidden","aria-labelledby"],NO="ElTabPane",Uce=Q({name:NO}),Wce=Q({...Uce,props:jce,setup(e){const t=e,n=at(),o=Kr(),r=je(nv);r||Cs(NO,"usage: <el-tabs><el-tab-pane /></el-tabs/>");const s=Re("tab-pane"),i=q(),l=R(()=>t.closable||r.props.closable),a=O6(()=>{var p;return r.currentName.value===((p=t.name)!=null?p:i.value)}),u=q(a.value),c=R(()=>{var p;return(p=t.name)!=null?p:i.value}),d=O6(()=>!t.lazy||u.value||a.value);Me(a,p=>{p&&(u.value=!0)});const f=Bn({uid:n.uid,slots:o,props:t,paneName:c,active:a,index:i,isClosable:l});return Ct(()=>{r.registerPane(f)}),ri(()=>{r.unregisterPane(f.uid)}),(p,h)=>g(d)?Fe((C(),T("div",{key:0,id:`pane-${g(c)}`,class:D(g(s).b()),role:"tabpanel","aria-hidden":!g(a),"aria-labelledby":`tab-${g(c)}`},[he(p.$slots,"default")],10,Hce)),[[en,g(a)]]):z("v-if",!0)}});var PO=He(Wce,[["__file","tab-pane.vue"]]);const eC=Zt(zce,{TabPane:PO}),tC=Jn(PO),Kce=Ke({format:{type:String,default:"HH:mm"},modelValue:String,disabled:Boolean,editable:{type:Boolean,default:!0},effect:{type:String,default:"light"},clearable:{type:Boolean,default:!0},size:Gr,placeholder:String,start:{type:String,default:"09:00"},end:{type:String,default:"18:00"},step:{type:String,default:"00:30"},minTime:String,maxTime:String,name:String,prefixIcon:{type:Ce([String,Object]),default:()=>oT},clearIcon:{type:Ce([String,Object]),default:()=>wd},...Nw}),Ci=e=>{const t=(e||"").split(":");if(t.length>=2){let n=Number.parseInt(t[0],10);const o=Number.parseInt(t[1],10),r=e.toUpperCase();return r.includes("AM")&&n===12?n=0:r.includes("PM")&&n!==12&&(n+=12),{hours:n,minutes:o}}return null},vy=(e,t)=>{const n=Ci(e);if(!n)return-1;const o=Ci(t);if(!o)return-1;const r=n.minutes+n.hours*60,s=o.minutes+o.hours*60;return r===s?0:r>s?1:-1},A8=e=>`${e}`.padStart(2,"0"),Gu=e=>`${A8(e.hours)}:${A8(e.minutes)}`,qce=(e,t)=>{const n=Ci(e);if(!n)return"";const o=Ci(t);if(!o)return"";const r={hours:n.hours,minutes:n.minutes};return r.minutes+=o.minutes,r.hours+=o.hours,r.hours+=Math.floor(r.minutes/60),r.minutes=r.minutes%60,Gu(r)},Gce=Q({name:"ElTimeSelect"}),Yce=Q({...Gce,props:Kce,emits:["change","blur","focus","update:modelValue"],setup(e,{expose:t}){const n=e;ct.extend(hM);const{Option:o}=vr,r=Re("input"),s=q(),i=Yr(),{lang:l}=Kt(),a=R(()=>n.modelValue),u=R(()=>{const v=Ci(n.start);return v?Gu(v):null}),c=R(()=>{const v=Ci(n.end);return v?Gu(v):null}),d=R(()=>{const v=Ci(n.step);return v?Gu(v):null}),f=R(()=>{const v=Ci(n.minTime||"");return v?Gu(v):null}),p=R(()=>{const v=Ci(n.maxTime||"");return v?Gu(v):null}),h=R(()=>{const v=[];if(n.start&&n.end&&n.step){let k=u.value,b;for(;k&&c.value&&vy(k,c.value)<=0;)b=ct(k,"HH:mm").locale(l.value).format(n.format),v.push({value:b,disabled:vy(k,f.value||"-1:-1")<=0||vy(k,p.value||"100:100")>=0}),k=qce(k,d.value)}return v});return t({blur:()=>{var v,k;(k=(v=s.value)==null?void 0:v.blur)==null||k.call(v)},focus:()=>{var v,k;(k=(v=s.value)==null?void 0:v.focus)==null||k.call(v)}}),(v,k)=>(C(),H(g(vr),{ref_key:"select",ref:s,"model-value":g(a),disabled:g(i),clearable:v.clearable,"clear-icon":v.clearIcon,size:v.size,effect:v.effect,placeholder:v.placeholder,"default-first-option":"",filterable:v.editable,"empty-values":v.emptyValues,"value-on-clear":v.valueOnClear,"onUpdate:modelValue":k[0]||(k[0]=b=>v.$emit("update:modelValue",b)),onChange:k[1]||(k[1]=b=>v.$emit("change",b)),onBlur:k[2]||(k[2]=b=>v.$emit("blur",b)),onFocus:k[3]||(k[3]=b=>v.$emit("focus",b))},{prefix:S(()=>[v.prefixIcon?(C(),H(g(Ie),{key:0,class:D(g(r).e("prefix-icon"))},{default:S(()=>[(C(),H(Pt(v.prefixIcon)))]),_:1},8,["class"])):z("v-if",!0)]),default:S(()=>[(C(!0),T(de,null,nt(g(h),b=>(C(),H(g(o),{key:b.value,label:b.value,value:b.value,disabled:b.disabled},null,8,["label","value","disabled"]))),128))]),_:1},8,["model-value","disabled","clearable","clear-icon","size","effect","placeholder","filterable","empty-values","value-on-clear"]))}});var a1=He(Yce,[["__file","time-select.vue"]]);a1.install=e=>{e.component(a1.name,a1)};const Zce=a1,LO=Zce,RO=Symbol("uploadContextKey"),Jce="ElUpload";class Xce extends Error{constructor(t,n,o,r){super(t),this.name="UploadAjaxError",this.status=n,this.method=o,this.url=r}}function N8(e,t,n){let o;return n.response?o=`${n.response.error||n.response}`:n.responseText?o=`${n.responseText}`:o=`fail to ${t.method} ${e} ${n.status}`,new Xce(o,n.status,t.method,e)}function Qce(e){const t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}const ede=e=>{typeof XMLHttpRequest>"u"&&Cs(Jce,"XMLHttpRequest is undefined");const t=new XMLHttpRequest,n=e.action;t.upload&&t.upload.addEventListener("progress",s=>{const i=s;i.percent=s.total>0?s.loaded/s.total*100:0,e.onProgress(i)});const o=new FormData;if(e.data)for(const[s,i]of Object.entries(e.data))Te(i)&&i.length?o.append(s,...i):o.append(s,i);o.append(e.filename,e.file,e.file.name),t.addEventListener("error",()=>{e.onError(N8(n,e,t))}),t.addEventListener("load",()=>{if(t.status<200||t.status>=300)return e.onError(N8(n,e,t));e.onSuccess(Qce(t))}),t.open(e.method,n,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);const r=e.headers||{};if(r instanceof Headers)r.forEach((s,i)=>t.setRequestHeader(i,s));else for(const[s,i]of Object.entries(r))To(i)||t.setRequestHeader(s,String(i));return t.send(o),t},DO=["text","picture","picture-card"];let tde=1;const Ib=()=>Date.now()+tde++,VO=Ke({action:{type:String,default:"#"},headers:{type:Ce(Object)},method:{type:String,default:"post"},data:{type:Ce([Object,Function,Promise]),default:()=>Eo({})},multiple:{type:Boolean,default:!1},name:{type:String,default:"file"},drag:{type:Boolean,default:!1},withCredentials:Boolean,showFileList:{type:Boolean,default:!0},accept:{type:String,default:""},fileList:{type:Ce(Array),default:()=>Eo([])},autoUpload:{type:Boolean,default:!0},listType:{type:String,values:DO,default:"text"},httpRequest:{type:Ce(Function),default:ede},disabled:Boolean,limit:Number}),nde=Ke({...VO,beforeUpload:{type:Ce(Function),default:yt},beforeRemove:{type:Ce(Function)},onRemove:{type:Ce(Function),default:yt},onChange:{type:Ce(Function),default:yt},onPreview:{type:Ce(Function),default:yt},onSuccess:{type:Ce(Function),default:yt},onProgress:{type:Ce(Function),default:yt},onError:{type:Ce(Function),default:yt},onExceed:{type:Ce(Function),default:yt},crossorigin:{type:Ce(String)}}),ode=Ke({files:{type:Ce(Array),default:()=>Eo([])},disabled:{type:Boolean,default:!1},handlePreview:{type:Ce(Function),default:yt},listType:{type:String,values:DO,default:"text"},crossorigin:{type:Ce(String)}}),rde={remove:e=>!!e},sde=["onKeydown"],ide=["src","crossorigin"],lde=["onClick"],ade=["title"],ude=["onClick"],cde=["onClick"],dde=Q({name:"ElUploadList"}),fde=Q({...dde,props:ode,emits:rde,setup(e,{emit:t}){const n=e,{t:o}=Kt(),r=Re("upload"),s=Re("icon"),i=Re("list"),l=Yr(),a=q(!1),u=R(()=>[r.b("list"),r.bm("list",n.listType),r.is("disabled",n.disabled)]),c=d=>{t("remove",d)};return(d,f)=>(C(),H($0,{tag:"ul",class:D(g(u)),name:g(i).b()},{default:S(()=>[(C(!0),T(de,null,nt(d.files,p=>(C(),T("li",{key:p.uid||p.name,class:D([g(r).be("list","item"),g(r).is(p.status),{focusing:a.value}]),tabindex:"0",onKeydown:Mt(h=>!g(l)&&c(p),["delete"]),onFocus:f[0]||(f[0]=h=>a.value=!0),onBlur:f[1]||(f[1]=h=>a.value=!1),onClick:f[2]||(f[2]=h=>a.value=!1)},[he(d.$slots,"default",{file:p},()=>[d.listType==="picture"||p.status!=="uploading"&&d.listType==="picture-card"?(C(),T("img",{key:0,class:D(g(r).be("list","item-thumbnail")),src:p.url,crossorigin:d.crossorigin,alt:""},null,10,ide)):z("v-if",!0),p.status==="uploading"||d.listType!=="picture-card"?(C(),T("div",{key:1,class:D(g(r).be("list","item-info"))},[_("a",{class:D(g(r).be("list","item-name")),onClick:Ze(h=>d.handlePreview(p),["prevent"])},[w(g(Ie),{class:D(g(s).m("document"))},{default:S(()=>[w(g(dZ))]),_:1},8,["class"]),_("span",{class:D(g(r).be("list","item-file-name")),title:p.name},O(p.name),11,ade)],10,lde),p.status==="uploading"?(C(),H(g(wO),{key:0,type:d.listType==="picture-card"?"circle":"line","stroke-width":d.listType==="picture-card"?6:2,percentage:Number(p.percentage),style:Ye(d.listType==="picture-card"?"":"margin-top: 0.5rem")},null,8,["type","stroke-width","percentage","style"])):z("v-if",!0)],2)):z("v-if",!0),_("label",{class:D(g(r).be("list","item-status-label"))},[d.listType==="text"?(C(),H(g(Ie),{key:0,class:D([g(s).m("upload-success"),g(s).m("circle-check")])},{default:S(()=>[w(g(fw))]),_:1},8,["class"])):["picture-card","picture"].includes(d.listType)?(C(),H(g(Ie),{key:1,class:D([g(s).m("upload-success"),g(s).m("check")])},{default:S(()=>[w(g(tT))]),_:1},8,["class"])):z("v-if",!0)],2),g(l)?z("v-if",!0):(C(),H(g(Ie),{key:2,class:D(g(s).m("close")),onClick:h=>c(p)},{default:S(()=>[w(g(Js))]),_:2},1032,["class","onClick"])),z(" Due to close btn only appears when li gets focused disappears after li gets blurred, thus keyboard navigation can never reach close btn"),z(" This is a bug which needs to be fixed "),z(" TODO: Fix the incorrect navigation interaction "),g(l)?z("v-if",!0):(C(),T("i",{key:3,class:D(g(s).m("close-tip"))},O(g(o)("el.upload.deleteTip")),3)),d.listType==="picture-card"?(C(),T("span",{key:4,class:D(g(r).be("list","item-actions"))},[_("span",{class:D(g(r).be("list","item-preview")),onClick:h=>d.handlePreview(p)},[w(g(Ie),{class:D(g(s).m("zoom-in"))},{default:S(()=>[w(g(uT))]),_:1},8,["class"])],10,ude),g(l)?z("v-if",!0):(C(),T("span",{key:0,class:D(g(r).be("list","item-delete")),onClick:h=>c(p)},[w(g(Ie),{class:D(g(s).m("delete"))},{default:S(()=>[w(g(rT))]),_:1},8,["class"])],10,cde))],2)):z("v-if",!0)])],42,sde))),128)),he(d.$slots,"append")]),_:3},8,["class","name"]))}});var P8=He(fde,[["__file","upload-list.vue"]]);const pde=Ke({disabled:{type:Boolean,default:!1}}),hde={file:e=>Te(e)},mde=["onDrop","onDragover"],FO="ElUploadDrag",gde=Q({name:FO}),vde=Q({...gde,props:pde,emits:hde,setup(e,{emit:t}){je(RO)||Cs(FO,"usage: <el-upload><el-upload-dragger /></el-upload>");const o=Re("upload"),r=q(!1),s=Yr(),i=a=>{if(s.value)return;r.value=!1,a.stopPropagation();const u=Array.from(a.dataTransfer.files);t("file",u)},l=()=>{s.value||(r.value=!0)};return(a,u)=>(C(),T("div",{class:D([g(o).b("dragger"),g(o).is("dragover",r.value)]),onDrop:Ze(i,["prevent"]),onDragover:Ze(l,["prevent"]),onDragleave:u[0]||(u[0]=Ze(c=>r.value=!1,["prevent"]))},[he(a.$slots,"default")],42,mde))}});var yde=He(vde,[["__file","upload-dragger.vue"]]);const _de=Ke({...VO,beforeUpload:{type:Ce(Function),default:yt},onRemove:{type:Ce(Function),default:yt},onStart:{type:Ce(Function),default:yt},onSuccess:{type:Ce(Function),default:yt},onProgress:{type:Ce(Function),default:yt},onError:{type:Ce(Function),default:yt},onExceed:{type:Ce(Function),default:yt}}),bde=["onKeydown"],wde=["name","multiple","accept"],Cde=Q({name:"ElUploadContent",inheritAttrs:!1}),kde=Q({...Cde,props:_de,setup(e,{expose:t}){const n=e,o=Re("upload"),r=Yr(),s=An({}),i=An(),l=m=>{if(m.length===0)return;const{autoUpload:y,limit:v,fileList:k,multiple:b,onStart:$,onExceed:x}=n;if(v&&k.length+m.length>v){x(m,k);return}b||(m=m.slice(0,1));for(const E of m){const M=E;M.uid=Ib(),$(M),y&&a(M)}},a=async m=>{if(i.value.value="",!n.beforeUpload)return c(m);let y,v={};try{const b=n.data,$=n.beforeUpload(m);v=lg(n.data)?p5(n.data):n.data,y=await $,lg(n.data)&&Hl(b,v)&&(v=p5(n.data))}catch{y=!1}if(y===!1){n.onRemove(m);return}let k=m;y instanceof Blob&&(y instanceof File?k=y:k=new File([y],m.name,{type:m.type})),c(Object.assign(k,{uid:m.uid}),v)},u=async(m,y)=>et(m)?m(y):m,c=async(m,y)=>{const{headers:v,data:k,method:b,withCredentials:$,name:x,action:E,onProgress:M,onSuccess:N,onError:P,httpRequest:I}=n;try{y=await u(y??k,m)}catch{n.onRemove(m);return}const{uid:V}=m,F={headers:v||{},withCredentials:$,file:m,data:y,method:b,filename:x,action:E,onProgress:Z=>{M(Z,m)},onSuccess:Z=>{N(Z,m),delete s.value[V]},onError:Z=>{P(Z,m),delete s.value[V]}},Y=I(F);s.value[V]=Y,Y instanceof Promise&&Y.then(F.onSuccess,F.onError)},d=m=>{const y=m.target.files;y&&l(Array.from(y))},f=()=>{r.value||(i.value.value="",i.value.click())},p=()=>{f()};return t({abort:m=>{_Y(s.value).filter(m?([v])=>String(m.uid)===v:()=>!0).forEach(([v,k])=>{k instanceof XMLHttpRequest&&k.abort(),delete s.value[v]})},upload:a}),(m,y)=>(C(),T("div",{class:D([g(o).b(),g(o).m(m.listType),g(o).is("drag",m.drag)]),tabindex:"0",onClick:f,onKeydown:Mt(Ze(p,["self"]),["enter","space"])},[m.drag?(C(),H(yde,{key:0,disabled:g(r),onFile:l},{default:S(()=>[he(m.$slots,"default")]),_:3},8,["disabled"])):he(m.$slots,"default",{key:1}),_("input",{ref_key:"inputRef",ref:i,class:D(g(o).e("input")),name:m.name,multiple:m.multiple,accept:m.accept,type:"file",onChange:d,onClick:y[0]||(y[0]=Ze(()=>{},["stop"]))},null,42,wde)],42,bde))}});var L8=He(kde,[["__file","upload-content.vue"]]);const R8="ElUpload",D8=e=>{var t;(t=e.url)!=null&&t.startsWith("blob:")&&URL.revokeObjectURL(e.url)},Sde=(e,t)=>{const n=pH(e,"fileList",void 0,{passive:!0}),o=f=>n.value.find(p=>p.uid===f.uid);function r(f){var p;(p=t.value)==null||p.abort(f)}function s(f=["ready","uploading","success","fail"]){n.value=n.value.filter(p=>!f.includes(p.status))}const i=(f,p)=>{const h=o(p);h&&(console.error(f),h.status="fail",n.value.splice(n.value.indexOf(h),1),e.onError(f,h,n.value),e.onChange(h,n.value))},l=(f,p)=>{const h=o(p);h&&(e.onProgress(f,h,n.value),h.status="uploading",h.percentage=Math.round(f.percent))},a=(f,p)=>{const h=o(p);h&&(h.status="success",h.response=f,e.onSuccess(f,h,n.value),e.onChange(h,n.value))},u=f=>{To(f.uid)&&(f.uid=Ib());const p={name:f.name,percentage:0,status:"ready",size:f.size,raw:f,uid:f.uid};if(e.listType==="picture-card"||e.listType==="picture")try{p.url=URL.createObjectURL(f)}catch(h){h.message,e.onError(h,p,n.value)}n.value=[...n.value,p],e.onChange(p,n.value)},c=async f=>{const p=f instanceof File?o(f):f;p||Cs(R8,"file to be removed not found");const h=m=>{r(m);const y=n.value;y.splice(y.indexOf(m),1),e.onRemove(m,y),D8(m)};e.beforeRemove?await e.beforeRemove(p,n.value)!==!1&&h(p):h(p)};function d(){n.value.filter(({status:f})=>f==="ready").forEach(({raw:f})=>{var p;return f&&((p=t.value)==null?void 0:p.upload(f))})}return Me(()=>e.listType,f=>{f!=="picture-card"&&f!=="picture"||(n.value=n.value.map(p=>{const{raw:h,url:m}=p;if(!m&&h)try{p.url=URL.createObjectURL(h)}catch(y){e.onError(y,p,n.value)}return p}))}),Me(n,f=>{for(const p of f)p.uid||(p.uid=Ib()),p.status||(p.status="success")},{immediate:!0,deep:!0}),{uploadFiles:n,abort:r,clearFiles:s,handleError:i,handleProgress:l,handleStart:u,handleSuccess:a,handleRemove:c,submit:d,revokeFileObjectURL:D8}},$de=Q({name:"ElUpload"}),Ede=Q({...$de,props:nde,setup(e,{expose:t}){const n=e,o=Yr(),r=An(),{abort:s,submit:i,clearFiles:l,uploadFiles:a,handleStart:u,handleError:c,handleRemove:d,handleSuccess:f,handleProgress:p,revokeFileObjectURL:h}=Sde(n,r),m=R(()=>n.listType==="picture-card"),y=R(()=>({...n,fileList:a.value,onStart:u,onProgress:p,onSuccess:f,onError:c,onRemove:d}));return xn(()=>{a.value.forEach(h)}),wt(RO,{accept:pn(n,"accept")}),t({abort:s,submit:i,clearFiles:l,handleStart:u,handleRemove:d}),(v,k)=>(C(),T("div",null,[g(m)&&v.showFileList?(C(),H(P8,{key:0,disabled:g(o),"list-type":v.listType,files:g(a),crossorigin:v.crossorigin,"handle-preview":v.onPreview,onRemove:g(d)},ms({append:S(()=>[w(L8,un({ref_key:"uploadRef",ref:r},g(y)),{default:S(()=>[v.$slots.trigger?he(v.$slots,"trigger",{key:0}):z("v-if",!0),!v.$slots.trigger&&v.$slots.default?he(v.$slots,"default",{key:1}):z("v-if",!0)]),_:3},16)]),_:2},[v.$slots.file?{name:"default",fn:S(({file:b})=>[he(v.$slots,"file",{file:b})])}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):z("v-if",!0),!g(m)||g(m)&&!v.showFileList?(C(),H(L8,un({key:1,ref_key:"uploadRef",ref:r},g(y)),{default:S(()=>[v.$slots.trigger?he(v.$slots,"trigger",{key:0}):z("v-if",!0),!v.$slots.trigger&&v.$slots.default?he(v.$slots,"default",{key:1}):z("v-if",!0)]),_:3},16)):z("v-if",!0),v.$slots.trigger?he(v.$slots,"default",{key:2}):z("v-if",!0),he(v.$slots,"tip"),!g(m)&&v.showFileList?(C(),H(P8,{key:3,disabled:g(o),"list-type":v.listType,files:g(a),crossorigin:v.crossorigin,"handle-preview":v.onPreview,onRemove:g(d)},ms({_:2},[v.$slots.file?{name:"default",fn:S(({file:b})=>[he(v.$slots,"file",{file:b})])}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):z("v-if",!0)]))}});var xde=He(Ede,[["__file","upload.vue"]]);const BO=Zt(xde);function Tde(e){let t;const n=q(!1),o=Bn({...e,originalPosition:"",originalOverflow:"",visible:!1});function r(f){o.text=f}function s(){const f=o.parent,p=d.ns;if(!f.vLoadingAddClassList){let h=f.getAttribute("loading-number");h=Number.parseInt(h)-1,h?f.setAttribute("loading-number",h.toString()):(Zs(f,p.bm("parent","relative")),f.removeAttribute("loading-number")),Zs(f,p.bm("parent","hidden"))}i(),c.unmount()}function i(){var f,p;(p=(f=d.$el)==null?void 0:f.parentNode)==null||p.removeChild(d.$el)}function l(){var f;e.beforeClose&&!e.beforeClose()||(n.value=!0,clearTimeout(t),t=window.setTimeout(a,400),o.visible=!1,(f=e.closed)==null||f.call(e))}function a(){if(!n.value)return;const f=o.parent;n.value=!1,f.vLoadingAddClassList=void 0,s()}const c=x3(Q({name:"ElLoading",setup(f,{expose:p}){const{ns:h,zIndex:m}=Pw("loading");return p({ns:h,zIndex:m}),()=>{const y=o.spinner||o.svg,v=lt("svg",{class:"circular",viewBox:o.svgViewBox?o.svgViewBox:"0 0 50 50",...y?{innerHTML:y}:{}},[lt("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),k=o.text?lt("p",{class:h.b("text")},[o.text]):void 0;return lt(_r,{name:h.b("fade"),onAfterLeave:a},{default:S(()=>[Fe(w("div",{style:{backgroundColor:o.background||""},class:[h.b("mask"),o.customClass,o.fullscreen?"is-fullscreen":""]},[lt("div",{class:h.b("spinner")},[v,k])]),[[en,o.visible]])])})}}})),d=c.mount(document.createElement("div"));return{...oi(o),setText:r,removeElLoadingChild:i,close:l,handleAfterLeave:a,vm:d,get $el(){return d.$el}}}let Cm;const Ab=function(e={}){if(!Tt)return;const t=Mde(e);if(t.fullscreen&&Cm)return Cm;const n=Tde({...t,closed:()=>{var r;(r=t.closed)==null||r.call(t),t.fullscreen&&(Cm=void 0)}});Ode(t,t.parent,n),V8(t,t.parent,n),t.parent.vLoadingAddClassList=()=>V8(t,t.parent,n);let o=t.parent.getAttribute("loading-number");return o?o=`${Number.parseInt(o)+1}`:o="1",t.parent.setAttribute("loading-number",o),t.parent.appendChild(n.$el),ot(()=>n.visible.value=t.visible),t.fullscreen&&(Cm=n),n},Mde=e=>{var t,n,o,r;let s;return tt(e.target)?s=(t=document.querySelector(e.target))!=null?t:document.body:s=e.target||document.body,{parent:s===document.body||e.body?document.body:s,background:e.background||"",svg:e.svg||"",svgViewBox:e.svgViewBox||"",spinner:e.spinner||!1,text:e.text||"",fullscreen:s===document.body&&((n=e.fullscreen)!=null?n:!0),lock:(o=e.lock)!=null?o:!1,customClass:e.customClass||"",visible:(r=e.visible)!=null?r:!0,target:s}},Ode=async(e,t,n)=>{const{nextZIndex:o}=n.vm.zIndex||n.vm._.exposed.zIndex,r={};if(e.fullscreen)n.originalPosition.value=Sl(document.body,"position"),n.originalOverflow.value=Sl(document.body,"overflow"),r.zIndex=o();else if(e.parent===document.body){n.originalPosition.value=Sl(document.body,"position"),await ot();for(const s of["top","left"]){const i=s==="top"?"scrollTop":"scrollLeft";r[s]=`${e.target.getBoundingClientRect()[s]+document.body[i]+document.documentElement[i]-Number.parseInt(Sl(document.body,`margin-${s}`),10)}px`}for(const s of["height","width"])r[s]=`${e.target.getBoundingClientRect()[s]}px`}else n.originalPosition.value=Sl(t,"position");for(const[s,i]of Object.entries(r))n.$el.style[s]=i},V8=(e,t,n)=>{const o=n.vm.ns||n.vm._.exposed.ns;["absolute","fixed","sticky"].includes(n.originalPosition.value)?Zs(t,o.bm("parent","relative")):uu(t,o.bm("parent","relative")),e.fullscreen&&e.lock?uu(t,o.bm("parent","hidden")):Zs(t,o.bm("parent","hidden"))},u1=Symbol("ElLoading"),F8=(e,t)=>{var n,o,r,s;const i=t.instance,l=f=>pt(t.value)?t.value[f]:void 0,a=f=>{const p=tt(f)&&(i==null?void 0:i[f])||f;return p&&q(p)},u=f=>a(l(f)||e.getAttribute(`element-loading-${zo(f)}`)),c=(n=l("fullscreen"))!=null?n:t.modifiers.fullscreen,d={text:u("text"),svg:u("svg"),svgViewBox:u("svgViewBox"),spinner:u("spinner"),background:u("background"),customClass:u("customClass"),fullscreen:c,target:(o=l("target"))!=null?o:c?void 0:e,body:(r=l("body"))!=null?r:t.modifiers.body,lock:(s=l("lock"))!=null?s:t.modifiers.lock};e[u1]={options:d,instance:Ab(d)}},Ide=(e,t)=>{for(const n of Object.keys(t))on(t[n])&&(t[n].value=e[n])},B8={mounted(e,t){t.value&&F8(e,t)},updated(e,t){const n=e[u1];t.oldValue!==t.value&&(t.value&&!t.oldValue?F8(e,t):t.value&&t.oldValue?pt(t.value)&&Ide(t.value,n.options):n==null||n.instance.close())},unmounted(e){var t;(t=e[u1])==null||t.instance.close(),e[u1]=null}},Ade={install(e){e.directive("loading",B8),e.config.globalProperties.$loading=Ab},directive:B8,service:Ab},Nde=Q({name:"ElMessageBox",directives:{TrapFocus:Xne},components:{ElButton:ut,ElFocusTrap:q0,ElInput:$t,ElOverlay:Ww,ElIcon:Ie,...yJ},inheritAttrs:!1,props:{buttonSize:{type:String,validator:CJ},modal:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},closeOnHashChange:{type:Boolean,default:!0},center:Boolean,draggable:Boolean,overflow:Boolean,roundButton:{default:!1,type:Boolean},container:{type:String,default:"body"},boxType:{type:String,default:""}},emits:["vanish","action"],setup(e,{emit:t}){const{locale:n,zIndex:o,ns:r,size:s}=Pw("message-box",R(()=>e.buttonSize)),{t:i}=n,{nextZIndex:l}=o,a=q(!1),u=Bn({autofocus:!0,beforeClose:null,callback:null,cancelButtonText:"",cancelButtonClass:"",confirmButtonText:"",confirmButtonClass:"",customClass:"",customStyle:{},dangerouslyUseHTMLString:!1,distinguishCancelAndClose:!1,icon:"",inputPattern:null,inputPlaceholder:"",inputType:"text",inputValue:null,inputValidator:null,inputErrorMessage:"",message:null,modalFade:!0,modalClass:"",showCancelButton:!1,showConfirmButton:!0,type:"",title:void 0,showInput:!1,action:"",confirmButtonLoading:!1,cancelButtonLoading:!1,confirmButtonDisabled:!1,editorErrorMessage:"",validateError:!1,zIndex:l()}),c=R(()=>{const U=u.type;return{[r.bm("icon",U)]:U&&Ng[U]}}),d=Hr(),f=Hr(),p=R(()=>u.icon||Ng[u.type]||""),h=R(()=>!!u.message),m=q(),y=q(),v=q(),k=q(),b=q(),$=R(()=>u.confirmButtonClass);Me(()=>u.inputValue,async U=>{await ot(),e.boxType==="prompt"&&U!==null&&F()},{immediate:!0}),Me(()=>a.value,U=>{var B,W;U&&(e.boxType!=="prompt"&&(u.autofocus?v.value=(W=(B=b.value)==null?void 0:B.$el)!=null?W:m.value:v.value=m.value),u.zIndex=l()),e.boxType==="prompt"&&(U?ot().then(()=>{var L;k.value&&k.value.$el&&(u.autofocus?v.value=(L=Y())!=null?L:m.value:v.value=m.value)}):(u.editorErrorMessage="",u.validateError=!1))});const x=R(()=>e.draggable),E=R(()=>e.overflow);mT(m,y,x,E),Ct(async()=>{await ot(),e.closeOnHashChange&&window.addEventListener("hashchange",M)}),xn(()=>{e.closeOnHashChange&&window.removeEventListener("hashchange",M)});function M(){a.value&&(a.value=!1,ot(()=>{u.action&&t("action",u.action)}))}const N=()=>{e.closeOnClickModal&&V(u.distinguishCancelAndClose?"close":"cancel")},P=xw(N),I=U=>{if(u.inputType!=="textarea")return U.preventDefault(),V("confirm")},V=U=>{var B;e.boxType==="prompt"&&U==="confirm"&&!F()||(u.action=U,u.beforeClose?(B=u.beforeClose)==null||B.call(u,U,u,M):M())},F=()=>{if(e.boxType==="prompt"){const U=u.inputPattern;if(U&&!U.test(u.inputValue||""))return u.editorErrorMessage=u.inputErrorMessage||i("el.messagebox.error"),u.validateError=!0,!1;const B=u.inputValidator;if(typeof B=="function"){const W=B(u.inputValue);if(W===!1)return u.editorErrorMessage=u.inputErrorMessage||i("el.messagebox.error"),u.validateError=!0,!1;if(typeof W=="string")return u.editorErrorMessage=W,u.validateError=!0,!1}}return u.editorErrorMessage="",u.validateError=!1,!0},Y=()=>{const U=k.value.$refs;return U.input||U.textarea},Z=()=>{V("close")},K=()=>{e.closeOnPressEscape&&Z()};return e.lockScroll&&yT(a),{...oi(u),ns:r,overlayEvent:P,visible:a,hasMessage:h,typeClass:c,contentId:d,inputId:f,btnSize:s,iconComponent:p,confirmButtonClasses:$,rootRef:m,focusStartRef:v,headerRef:y,inputRef:k,confirmRef:b,doClose:M,handleClose:Z,onCloseRequested:K,handleWrapperClick:N,handleInputEnter:I,handleAction:V,t:i}}}),Pde=["aria-label","aria-describedby"],Lde=["aria-label"],Rde=["id"];function Dde(e,t,n,o,r,s){const i=ee("el-icon"),l=ee("close"),a=ee("el-input"),u=ee("el-button"),c=ee("el-focus-trap"),d=ee("el-overlay");return C(),H(_r,{name:"fade-in-linear",onAfterLeave:t[11]||(t[11]=f=>e.$emit("vanish")),persisted:""},{default:S(()=>[Fe(w(d,{"z-index":e.zIndex,"overlay-class":[e.ns.is("message-box"),e.modalClass],mask:e.modal},{default:S(()=>[_("div",{role:"dialog","aria-label":e.title,"aria-modal":"true","aria-describedby":e.showInput?void 0:e.contentId,class:D(`${e.ns.namespace.value}-overlay-message-box`),onClick:t[8]||(t[8]=(...f)=>e.overlayEvent.onClick&&e.overlayEvent.onClick(...f)),onMousedown:t[9]||(t[9]=(...f)=>e.overlayEvent.onMousedown&&e.overlayEvent.onMousedown(...f)),onMouseup:t[10]||(t[10]=(...f)=>e.overlayEvent.onMouseup&&e.overlayEvent.onMouseup(...f))},[w(c,{loop:"",trapped:e.visible,"focus-trap-el":e.rootRef,"focus-start-el":e.focusStartRef,onReleaseRequested:e.onCloseRequested},{default:S(()=>[_("div",{ref:"rootRef",class:D([e.ns.b(),e.customClass,e.ns.is("draggable",e.draggable),{[e.ns.m("center")]:e.center}]),style:Ye(e.customStyle),tabindex:"-1",onClick:t[7]||(t[7]=Ze(()=>{},["stop"]))},[e.title!==null&&e.title!==void 0?(C(),T("div",{key:0,ref:"headerRef",class:D([e.ns.e("header"),{"show-close":e.showClose}])},[_("div",{class:D(e.ns.e("title"))},[e.iconComponent&&e.center?(C(),H(i,{key:0,class:D([e.ns.e("status"),e.typeClass])},{default:S(()=>[(C(),H(Pt(e.iconComponent)))]),_:1},8,["class"])):z("v-if",!0),_("span",null,O(e.title),1)],2),e.showClose?(C(),T("button",{key:0,type:"button",class:D(e.ns.e("headerbtn")),"aria-label":e.t("el.messagebox.close"),onClick:t[0]||(t[0]=f=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel")),onKeydown:t[1]||(t[1]=Mt(Ze(f=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel"),["prevent"]),["enter"]))},[w(i,{class:D(e.ns.e("close"))},{default:S(()=>[w(l)]),_:1},8,["class"])],42,Lde)):z("v-if",!0)],2)):z("v-if",!0),_("div",{id:e.contentId,class:D(e.ns.e("content"))},[_("div",{class:D(e.ns.e("container"))},[e.iconComponent&&!e.center&&e.hasMessage?(C(),H(i,{key:0,class:D([e.ns.e("status"),e.typeClass])},{default:S(()=>[(C(),H(Pt(e.iconComponent)))]),_:1},8,["class"])):z("v-if",!0),e.hasMessage?(C(),T("div",{key:1,class:D(e.ns.e("message"))},[he(e.$slots,"default",{},()=>[e.dangerouslyUseHTMLString?(C(),H(Pt(e.showInput?"label":"p"),{key:1,for:e.showInput?e.inputId:void 0,innerHTML:e.message},null,8,["for","innerHTML"])):(C(),H(Pt(e.showInput?"label":"p"),{key:0,for:e.showInput?e.inputId:void 0},{default:S(()=>[ne(O(e.dangerouslyUseHTMLString?"":e.message),1)]),_:1},8,["for"]))])],2)):z("v-if",!0)],2),Fe(_("div",{class:D(e.ns.e("input"))},[w(a,{id:e.inputId,ref:"inputRef",modelValue:e.inputValue,"onUpdate:modelValue":t[2]||(t[2]=f=>e.inputValue=f),type:e.inputType,placeholder:e.inputPlaceholder,"aria-invalid":e.validateError,class:D({invalid:e.validateError}),onKeydown:Mt(e.handleInputEnter,["enter"])},null,8,["id","modelValue","type","placeholder","aria-invalid","class","onKeydown"]),_("div",{class:D(e.ns.e("errormsg")),style:Ye({visibility:e.editorErrorMessage?"visible":"hidden"})},O(e.editorErrorMessage),7)],2),[[en,e.showInput]])],10,Rde),_("div",{class:D(e.ns.e("btns"))},[e.showCancelButton?(C(),H(u,{key:0,loading:e.cancelButtonLoading,class:D([e.cancelButtonClass]),round:e.roundButton,size:e.btnSize,onClick:t[3]||(t[3]=f=>e.handleAction("cancel")),onKeydown:t[4]||(t[4]=Mt(Ze(f=>e.handleAction("cancel"),["prevent"]),["enter"]))},{default:S(()=>[ne(O(e.cancelButtonText||e.t("el.messagebox.cancel")),1)]),_:1},8,["loading","class","round","size"])):z("v-if",!0),Fe(w(u,{ref:"confirmRef",type:"primary",loading:e.confirmButtonLoading,class:D([e.confirmButtonClasses]),round:e.roundButton,disabled:e.confirmButtonDisabled,size:e.btnSize,onClick:t[5]||(t[5]=f=>e.handleAction("confirm")),onKeydown:t[6]||(t[6]=Mt(Ze(f=>e.handleAction("confirm"),["prevent"]),["enter"]))},{default:S(()=>[ne(O(e.confirmButtonText||e.t("el.messagebox.confirm")),1)]),_:1},8,["loading","class","round","disabled","size"]),[[en,e.showConfirmButton]])],2)],6)]),_:3},8,["trapped","focus-trap-el","focus-start-el","onReleaseRequested"])],42,Pde)]),_:3},8,["z-index","overlay-class","mask"]),[[en,e.visible]])]),_:3})}var Vde=He(Nde,[["render",Dde],["__file","index.vue"]]);const Bp=new Map,Fde=e=>{let t=document.body;return e.appendTo&&(tt(e.appendTo)&&(t=document.querySelector(e.appendTo)),ys(e.appendTo)&&(t=e.appendTo),ys(t)||(t=document.body)),t},Bde=(e,t,n=null)=>{const o=w(Vde,e,et(e.message)||yo(e.message)?{default:et(e.message)?e.message:()=>e.message}:null);return o.appContext=n,Pi(o,t),Fde(e).appendChild(t.firstElementChild),o.component},zde=()=>document.createElement("div"),jde=(e,t)=>{const n=zde();e.onVanish=()=>{Pi(null,n),Bp.delete(r)},e.onAction=s=>{const i=Bp.get(r);let l;e.showInput?l={value:r.inputValue,action:s}:l=s,e.callback?e.callback(l,o.proxy):s==="cancel"||s==="close"?e.distinguishCancelAndClose&&s!=="cancel"?i.reject("close"):i.reject("cancel"):i.resolve(l)};const o=Bde(e,n,t),r=o.proxy;for(const s in e)vt(e,s)&&!vt(r.$props,s)&&(r[s]=e[s]);return r.visible=!0,r};function Td(e,t=null){if(!Tt)return Promise.reject();let n;return tt(e)||yo(e)?e={message:e}:n=e.callback,new Promise((o,r)=>{const s=jde(e,t??Td._context);Bp.set(s,{options:e,callback:n,resolve:o,reject:r})})}const Hde=["alert","confirm","prompt"],Ude={alert:{closeOnPressEscape:!1,closeOnClickModal:!1},confirm:{showCancelButton:!0},prompt:{showCancelButton:!0,showInput:!0}};Hde.forEach(e=>{Td[e]=Wde(e)});function Wde(e){return(t,n,o,r)=>{let s="";return pt(n)?(o=n,s=""):Uo(n)?s="":s=n,Td(Object.assign({title:s,message:t,type:"",...Ude[e]},o,{boxType:e}),r)}}Td.close=()=>{Bp.forEach((e,t)=>{t.doClose()}),Bp.clear()};Td._context=null;const ol=Td;ol.install=e=>{ol._context=e._context,e.config.globalProperties.$msgbox=ol,e.config.globalProperties.$messageBox=ol,e.config.globalProperties.$alert=ol.alert,e.config.globalProperties.$confirm=ol.confirm,e.config.globalProperties.$prompt=ol.prompt};const yy=ol,zO=["success","info","warning","error"],Kde=Ke({customClass:{type:String,default:""},dangerouslyUseHTMLString:{type:Boolean,default:!1},duration:{type:Number,default:4500},icon:{type:Io},id:{type:String,default:""},message:{type:Ce([String,Object]),default:""},offset:{type:Number,default:0},onClick:{type:Ce(Function),default:()=>{}},onClose:{type:Ce(Function),required:!0},position:{type:String,values:["top-right","top-left","bottom-right","bottom-left"],default:"top-right"},showClose:{type:Boolean,default:!0},title:{type:String,default:""},type:{type:String,values:[...zO,""],default:""},zIndex:Number}),qde={destroy:()=>!0},Gde=["id"],Yde=["textContent"],Zde={key:0},Jde=["innerHTML"],Xde=Q({name:"ElNotification"}),Qde=Q({...Xde,props:Kde,emits:qde,setup(e,{expose:t}){const n=e,{ns:o,zIndex:r}=Pw("notification"),{nextZIndex:s,currentZIndex:i}=r,{Close:l}=dT,a=q(!1);let u;const c=R(()=>{const b=n.type;return b&&Ng[n.type]?o.m(b):""}),d=R(()=>n.type&&Ng[n.type]||n.icon),f=R(()=>n.position.endsWith("right")?"right":"left"),p=R(()=>n.position.startsWith("top")?"top":"bottom"),h=R(()=>{var b;return{[p.value]:`${n.offset}px`,zIndex:(b=n.zIndex)!=null?b:i.value}});function m(){n.duration>0&&({stop:u}=W_(()=>{a.value&&v()},n.duration))}function y(){u==null||u()}function v(){a.value=!1}function k({code:b}){b===rt.delete||b===rt.backspace?y():b===rt.esc?a.value&&v():m()}return Ct(()=>{m(),s(),a.value=!0}),Vn(document,"keydown",k),t({visible:a,close:v}),(b,$)=>(C(),H(_r,{name:g(o).b("fade"),onBeforeLeave:b.onClose,onAfterLeave:$[1]||($[1]=x=>b.$emit("destroy")),persisted:""},{default:S(()=>[Fe(_("div",{id:b.id,class:D([g(o).b(),b.customClass,g(f)]),style:Ye(g(h)),role:"alert",onMouseenter:y,onMouseleave:m,onClick:$[0]||($[0]=(...x)=>b.onClick&&b.onClick(...x))},[g(d)?(C(),H(g(Ie),{key:0,class:D([g(o).e("icon"),g(c)])},{default:S(()=>[(C(),H(Pt(g(d))))]),_:1},8,["class"])):z("v-if",!0),_("div",{class:D(g(o).e("group"))},[_("h2",{class:D(g(o).e("title")),textContent:O(b.title)},null,10,Yde),Fe(_("div",{class:D(g(o).e("content")),style:Ye(b.title?void 0:{margin:0})},[he(b.$slots,"default",{},()=>[b.dangerouslyUseHTMLString?(C(),T(de,{key:1},[z(" Caution here, message could've been compromised, never use user's input as message "),_("p",{innerHTML:b.message},null,8,Jde)],2112)):(C(),T("p",Zde,O(b.message),1))])],6),[[en,b.message]]),b.showClose?(C(),H(g(Ie),{key:0,class:D(g(o).e("closeBtn")),onClick:Ze(v,["stop"])},{default:S(()=>[w(g(l))]),_:1},8,["class","onClick"])):z("v-if",!0)],2)],46,Gde),[[en,a.value]])]),_:3},8,["name","onBeforeLeave"]))}});var efe=He(Qde,[["__file","notification.vue"]]);const zg={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]},Nb=16;let tfe=1;const ad=function(e={},t=null){if(!Tt)return{close:()=>{}};(typeof e=="string"||yo(e))&&(e={message:e});const n=e.position||"top-right";let o=e.offset||0;zg[n].forEach(({vm:c})=>{var d;o+=(((d=c.el)==null?void 0:d.offsetHeight)||0)+Nb}),o+=Nb;const r=`notification_${tfe++}`,s=e.onClose,i={...e,offset:o,id:r,onClose:()=>{nfe(r,n,s)}};let l=document.body;ys(e.appendTo)?l=e.appendTo:tt(e.appendTo)&&(l=document.querySelector(e.appendTo)),ys(l)||(l=document.body);const a=document.createElement("div"),u=w(efe,i,yo(i.message)?{default:()=>i.message}:null);return u.appContext=t??ad._context,u.props.onDestroy=()=>{Pi(null,a)},Pi(u,a),zg[n].push({vm:u}),l.appendChild(a.firstElementChild),{close:()=>{u.component.exposed.visible.value=!1}}};zO.forEach(e=>{ad[e]=(t={})=>((typeof t=="string"||yo(t))&&(t={message:t}),ad({...t,type:e}))});function nfe(e,t,n){const o=zg[t],r=o.findIndex(({vm:u})=>{var c;return((c=u.component)==null?void 0:c.props.id)===e});if(r===-1)return;const{vm:s}=o[r];if(!s)return;n==null||n(s);const i=s.el.offsetHeight,l=t.split("-")[0];o.splice(r,1);const a=o.length;if(!(a<1))for(let u=r;u<a;u++){const{el:c,component:d}=o[u].vm,f=Number.parseInt(c.style[l],10)-i-Nb;d.props.offset=f}}function ofe(){for(const e of Object.values(zg))e.forEach(({vm:t})=>{t.component.exposed.visible.value=!1})}ad.closeAll=ofe;ad._context=null;const rfe=_J(ad,"$notify"),Be=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},sfe={name:"PortalApplication",components:{},data(){return{loading:!1,hasSearchHolder:!1,hasNotificationHolder:!1,isSmallScreen:!1,menuItems:[{label:this.$t("General"),route:"settings",icon_svg:'<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M2.08301 10.0002C2.08301 6.26821 2.08301 4.40223 3.24238 3.24287C4.40175 2.0835 6.26772 2.0835 9.99967 2.0835C13.7316 2.0835 15.5976 2.0835 16.757 3.24287C17.9163 4.40223 17.9163 6.26821 17.9163 10.0002C17.9163 13.7321 17.9163 15.5981 16.757 16.7575C15.5976 17.9168 13.7316 17.9168 9.99967 17.9168C6.26772 17.9168 4.40175 17.9168 3.24238 16.7575C2.08301 15.5981 2.08301 13.7321 2.08301 10.0002Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/><path d="M8.33301 12.917C8.33301 13.6073 7.77336 14.167 7.08301 14.167C6.39265 14.167 5.83301 13.6073 5.83301 12.917C5.83301 12.2266 6.39265 11.667 7.08301 11.667C7.77336 11.667 8.33301 12.2266 8.33301 12.917Z" stroke="currentColor" stroke-width="1.5"/><path d="M14.166 7.0835C14.166 6.39314 13.6064 5.8335 12.916 5.8335C12.2257 5.8335 11.666 6.39314 11.666 7.0835C11.666 7.77385 12.2257 8.3335 12.916 8.3335C13.6064 8.3335 14.166 7.77385 14.166 7.0835Z" stroke="currentColor" stroke-width="1.5"/><path d="M7.08301 11.6668L7.08301 5.8335" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M12.916 8.33366L12.916 14.167" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg>'},{label:this.$t("Customizations"),route:"customization",icon_svg:'<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_3687_33463)"><path d="M18.3337 9.99984C18.3337 5.39746 14.6027 1.6665 10.0003 1.6665C5.39795 1.6665 1.66699 5.39746 1.66699 9.99984C1.66699 14.6022 5.39795 18.3332 10.0003 18.3332C10.7018 18.3332 11.667 18.4301 11.667 17.4998C11.667 16.9924 11.403 16.6008 11.1408 16.2119C10.7572 15.6428 10.3773 15.0793 10.8337 14.1665C11.3892 13.0554 12.3152 13.0554 13.7349 13.0554C14.4448 13.0554 15.2781 13.0554 16.2504 12.9165C18.0012 12.6664 18.3337 11.5902 18.3337 9.99984Z" stroke="currentColor" stroke-width="1.5"/><path d="M5.83398 12.502L5.84121 12.5" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><ellipse cx="7.91699" cy="7.08301" rx="1.25" ry="1.25" stroke="currentColor" stroke-width="1.5"/><ellipse cx="13.75" cy="7.9165" rx="1.25" ry="1.25" stroke="currentColor" stroke-width="1.5"/></g><defs><clipPath id="clip0_3687_33463"><rect width="20" height="20" fill="white"/></clipPath></defs></svg>'},{label:this.$t("Managers"),route:"admin_moderators",icon_svg:'<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M17.3117 15C17.9361 15 18.4328 14.6071 18.8787 14.0576C19.7916 12.9329 18.2928 12.034 17.7211 11.5938C17.14 11.1463 16.4912 10.8928 15.8333 10.8333M15 9.16667C16.1506 9.16667 17.0833 8.23393 17.0833 7.08333C17.0833 5.93274 16.1506 5 15 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M2.68797 15C2.06355 15 1.5669 14.6071 1.12096 14.0576C0.208082 12.9329 1.7069 12.034 2.27855 11.5938C2.85965 11.1463 3.50849 10.8928 4.16634 10.8333M4.58301 9.16667C3.43241 9.16667 2.49967 8.23393 2.49967 7.08333C2.49967 5.93274 3.43241 5 4.58301 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M6.73618 12.593C5.8847 13.1195 3.65216 14.1946 5.01192 15.5398C5.67616 16.197 6.41594 16.667 7.34603 16.667H12.6533C13.5834 16.667 14.3232 16.197 14.9874 15.5398C16.3472 14.1946 14.1147 13.1195 13.2632 12.593C11.2665 11.3583 8.73289 11.3583 6.73618 12.593Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M12.9163 6.25016C12.9163 7.86099 11.6105 9.16683 9.99967 9.16683C8.38884 9.16683 7.08301 7.86099 7.08301 6.25016C7.08301 4.63933 8.38884 3.3335 9.99967 3.3335C11.6105 3.3335 12.9163 4.63933 12.9163 6.25016Z" stroke="currentColor" stroke-width="1.5"/></svg>'},{label:this.$t("Email Settings"),route:"email_notifications",icon_svg:'<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M5.83398 7.08301L8.28566 8.53253C9.715 9.37761 10.2863 9.37761 11.7156 8.53253L14.1673 7.08301" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M1.68013 11.2295C1.73461 13.7841 1.76185 15.0614 2.70446 16.0076C3.64706 16.9538 4.95894 16.9868 7.58268 17.0527C9.19975 17.0933 10.8009 17.0933 12.418 17.0527C15.0417 16.9868 16.3536 16.9538 17.2962 16.0076C18.2388 15.0614 18.266 13.7841 18.3205 11.2295C18.338 10.4081 18.338 9.59157 18.3205 8.77017C18.266 6.21555 18.2388 4.93825 17.2962 3.99206C16.3536 3.04586 15.0417 3.0129 12.418 2.94698C10.8009 2.90635 9.19975 2.90635 7.58268 2.94697C4.95893 3.01289 3.64706 3.04585 2.70445 3.99204C1.76184 4.93824 1.73461 6.21554 1.68013 8.77015C1.66261 9.59156 1.66261 10.4081 1.68013 11.2295Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/></svg>'},{label:this.$t("Features & Addons"),route:"features",icon_svg:'<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_3687_33503)"><path d="M3.33301 10.0002C3.33301 6.85746 3.33301 5.28612 4.30932 4.3098C5.28563 3.3335 6.85697 3.3335 9.99967 3.3335C13.1423 3.3335 14.7138 3.3335 15.69 4.3098C16.6663 5.28612 16.6663 6.85746 16.6663 10.0002C16.6663 13.1428 16.6663 14.7142 15.69 15.6905C14.7138 16.6668 13.1423 16.6668 9.99967 16.6668C6.85697 16.6668 5.28563 16.6668 4.30932 15.6905C3.33301 14.7142 3.33301 13.1428 3.33301 10.0002Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/><path d="M6.4432 13.5567C7.0534 14.1668 8.03549 14.1668 9.99967 14.1668C10.6578 14.1668 11.2058 14.1668 11.6663 14.1438L14.1433 11.6668C14.1663 11.2062 14.1663 10.6583 14.1663 10.0002C14.1663 8.03598 14.1663 7.05389 13.5562 6.44369C12.9459 5.8335 11.9638 5.8335 9.99967 5.8335C8.03549 5.8335 7.0534 5.8335 6.4432 6.44369C5.83301 7.05389 5.83301 8.03598 5.83301 10.0002C5.83301 11.9643 5.83301 12.9464 6.4432 13.5567Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/><path d="M6.66699 1.6665V3.33317M13.3337 1.6665V3.33317M10.0003 1.6665V3.33317M6.66699 16.6665V18.3332M10.0003 16.6665V18.3332M13.3337 16.6665V18.3332M18.3337 13.3332H16.667M3.33366 6.6665H1.66699M3.33366 13.3332H1.66699M3.33366 9.99984H1.66699M18.3337 6.6665H16.667M18.3337 9.99984H16.667" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></g><defs><clipPath id="clip0_3687_33503"><rect width="20" height="20" fill="white"/></clipPath></defs></svg>'},{label:this.$t("Manage Topics"),route:"all_topics",icon_svg:'<svg viewBox="0 0 24 24" width="20" height="20" color="currentColor" fill="none"><path d="M2.73552 11.6867C1.78253 12.7511 1.76203 14.3569 2.63665 15.4865C4.37226 17.7281 6.2719 19.6277 8.51351 21.3633C9.64313 22.238 11.2489 22.2175 12.3133 21.2645C15.203 18.6771 17.8494 15.9731 20.4033 13.0016C20.6558 12.7078 20.8137 12.3477 20.8492 11.9619C21.0059 10.2561 21.3279 5.34144 19.9932 4.00675C18.6586 2.67207 13.7439 2.99408 12.0381 3.15083C11.6523 3.18627 11.2922 3.34421 10.9984 3.59671C8.02692 6.15064 5.32291 8.797 2.73552 11.6867Z" stroke="currentColor" stroke-width="1.5" /><path opacity="0.4" d="M7.5 14.5L9.5 16.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" /><path d="M18 6L22 2" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" /></svg>'},{label:this.$t("Space Groups"),route:"space_groups",icon_svg:'<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_3687_33515)"><path d="M5.00033 3.33317C5.00033 4.25365 4.25413 4.99984 3.33366 4.99984C2.41318 4.99984 1.66699 4.25365 1.66699 3.33317C1.66699 2.4127 2.41318 1.6665 3.33366 1.6665C4.25413 1.6665 5.00033 2.4127 5.00033 3.33317Z" stroke="currentColor" stroke-width="1.5"/><path d="M18.3333 3.33317C18.3333 4.25365 17.5872 4.99984 16.6667 4.99984C15.7462 4.99984 15 4.25365 15 3.33317C15 2.4127 15.7462 1.6665 16.6667 1.6665C17.5872 1.6665 18.3333 2.4127 18.3333 3.33317Z" stroke="currentColor" stroke-width="1.5"/><path d="M18.3333 16.6667C18.3333 17.5872 17.5872 18.3333 16.6667 18.3333C15.7462 18.3333 15 17.5872 15 16.6667C15 15.7462 15.7462 15 16.6667 15C17.5872 15 18.3333 15.7462 18.3333 16.6667Z" stroke="currentColor" stroke-width="1.5"/><path d="M5.00033 16.6667C5.00033 17.5872 4.25413 18.3333 3.33366 18.3333C2.41318 18.3333 1.66699 17.5872 1.66699 16.6667C1.66699 15.7462 2.41318 15 3.33366 15C4.25413 15 5.00033 15.7462 5.00033 16.6667Z" stroke="currentColor" stroke-width="1.5"/><path d="M16.6663 5.00016V15.0002M14.9997 16.6668H4.99967M14.9997 3.3335H4.99967M3.33301 5.00016V15.0002" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M13.75 7.5C13.75 7.11172 13.75 6.91758 13.6866 6.76443C13.602 6.56024 13.4397 6.39801 13.2356 6.31343C13.0824 6.25 12.8882 6.25 12.5 6.25H7.5C7.11172 6.25 6.91758 6.25 6.76443 6.31343C6.56024 6.39801 6.39801 6.56024 6.31343 6.76443C6.25 6.91758 6.25 7.11172 6.25 7.5C6.25 7.88828 6.25 8.08242 6.31343 8.23557C6.39801 8.43975 6.56024 8.602 6.76443 8.68658C6.91758 8.75 7.11172 8.75 7.5 8.75H12.5C12.8882 8.75 13.0824 8.75 13.2356 8.68658C13.4397 8.602 13.602 8.43975 13.6866 8.23557C13.75 8.08242 13.75 7.88828 13.75 7.5Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M13.75 12.5C13.75 12.1117 13.75 11.9176 13.6866 11.7644C13.602 11.5603 13.4397 11.398 13.2356 11.3134C13.0824 11.25 12.8882 11.25 12.5 11.25H7.5C7.11172 11.25 6.91758 11.25 6.76443 11.3134C6.56024 11.398 6.39801 11.5603 6.31343 11.7644C6.25 11.9176 6.25 12.1117 6.25 12.5C6.25 12.8882 6.25 13.0824 6.31343 13.2356C6.39801 13.4397 6.56024 13.602 6.76443 13.6866C6.91758 13.75 7.11172 13.75 7.5 13.75H12.5C12.8882 13.75 13.0824 13.75 13.2356 13.6866C13.4397 13.602 13.602 13.4397 13.6866 13.2356C13.75 13.0824 13.75 12.8882 13.75 12.5Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></g><defs><clipPath id="clip0_3687_33515"><rect width="20" height="20" fill="white"/></clipPath></defs></svg>'},{label:this.$t("Menu Settings"),route:"menu_settings",icon_svg:'<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.33301 4.1665L16.6663 4.1665" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M3.33301 10L16.6663 10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M3.33301 15.833L11.6663 15.833" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>'},{label:this.$t("Privacy Settings"),route:"privacy_settings",icon_svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="20" height="20" color="currentColor" fill="none"><path d="M10.8338 1.53871C11.5609 1.15376 12.4391 1.15376 13.1662 1.53871C14.3681 2.17509 16.8304 3.32075 19.7836 3.8341C20.873 4.02349 21.75 4.95478 21.75 6.12325V11.0511C21.75 14.5419 19.9704 17.2085 18.0079 19.0834C16.0479 20.9559 13.848 22.0975 12.8466 22.5619C12.3057 22.8127 11.6943 22.8127 11.1534 22.5619C10.152 22.0975 7.95205 20.9559 5.99214 19.0834C4.02964 17.2085 2.25 14.5419 2.25 11.0511V6.12325C2.25 4.95478 3.12696 4.02349 4.21644 3.8341C7.1696 3.32075 9.63189 2.17509 10.8338 1.53871Z" fill="currentColor" /></svg>'}]}},watch:{},methods:{},created(){this.isSmallScreen=window.innerWidth<=1024},mounted(){}},ife={class:"fcom_general_menu"},lfe=["href"],afe={class:"el-icon"},ufe={class:"fcom_communities_menu"},cfe={style:{"margin-left":"18px","font-size":"0.875rem","font-weight":"bold","margin-bottom":"10px",color:"currentColor"}},dfe={style:{"margin-bottom":"30px"},class:"fcom_general_menu"},ffe={class:"community_avatar"},pfe={class:"fcom_shape"},hfe={class:"community_name"},mfe={style:{"margin-left":"18px","font-size":"0.875rem","font-weight":"bold","margin-bottom":"10px",color:"currentColor"}},gfe={class:"fcom_general_menu"},vfe={class:"community_avatar"},yfe={class:"fcom_shape"},_fe=_("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},[_("path",{d:"M10.734 5.84746L14.7114 6.9072M9.88139 9.01146L11.8701 9.54132M9.98031 14.9723L10.7758 15.1843C13.0258 15.7838 14.1508 16.0835 15.037 15.5747C15.9233 15.0659 16.2247 13.9473 16.8276 11.71L17.6802 8.54599C18.2831 6.3087 18.5845 5.19006 18.0728 4.30879C17.5611 3.42752 16.4362 3.12778 14.1862 2.52831L13.3907 2.31636C11.1407 1.71688 10.0157 1.41714 9.12948 1.92594C8.24322 2.43474 7.94178 3.55338 7.3389 5.79067L6.4863 8.95466C5.88342 11.1919 5.58198 12.3106 6.09367 13.1919C6.60536 14.0731 7.73034 14.3729 9.98031 14.9723Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"}),_("path",{d:"M9.99996 17.4559L9.20634 17.672C6.96165 18.2832 5.83931 18.5889 4.95512 18.0701C4.07093 17.5513 3.7702 16.4107 3.16874 14.1295L2.31814 10.9035C1.71668 8.62232 1.41595 7.48174 1.92643 6.58318C2.36802 5.80591 3.33329 5.83421 4.58329 5.83411",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})],-1),bfe={class:"community_name"};function wfe(e,t,n,o,r,s){const i=ee("router-view"),l=ee("Back"),a=Ie,u=ee("router-link");return C(),T(de,null,[w(i,{class:D(e.appVars.route_classes)},null,8,["class"]),(C(),H(qr,{to:"#fcom_menu_sidebar"},[_("ul",ife,[_("li",null,[_("a",{href:e.appVars.portal_url},[_("i",afe,[w(l)]),_("span",null,O(e.$t("Back to home")),1)],8,lfe)])]),_("div",ufe,[_("h4",cfe,O(e.$t("Portal Settings")),1),_("ul",dfe,[(C(!0),T(de,null,nt(r.menuItems,c=>(C(),T("li",{key:c.name,class:D("course_inner_menu_"+c.name)},[w(u,{to:{name:c.route}},{default:S(()=>[_("div",ffe,[_("span",pfe,[w(a,{innerHTML:c.icon_svg},null,8,["innerHTML"])])]),_("span",hfe,O(c.label),1)]),_:2},1032,["to"])],2))),128))]),e.hasFeature("has_course")?(C(),T(de,{key:0},[_("h4",mfe,O(e.$t("Course Management")),1),_("ul",gfe,[_("li",null,[w(u,{to:{name:"manage_courses"}},{default:S(()=>[_("div",vfe,[_("span",yfe,[w(a,null,{default:S(()=>[_fe]),_:1})])]),_("span",bfe,O(e.$t("Manage Courses")),1)]),_:1})])])],64)):z("",!0)])]))],64)}const Cfe=Be(sfe,[["render",wfe]]),kfe={name:"SettingsRoute",components:{},data(){return{loading:!1}}};function Sfe(e,t,n,o,r,s){const i=ee("router-view");return C(),H(i)}const $fe=Be(kfe,[["render",Sfe]]),Efe={name:"ImageUploader",emits:["uploaded","completed","uploading"],data(){return{loading:!1}},props:{button_text:{type:String,default:"Upload Photo"},additionalData:{type:Object,default:()=>({})},isMultiple:{type:Boolean,default:!1},can_remove:{type:Boolean,default:!1},isTextBtn:{type:Boolean,default:!0},removeIcon:{type:Boolean,default:!0},className:{type:String,default:"image-uploader"}},methods:{handleSuccess(e){this.$emit("uploaded",e.media.url),this.$emit("completed",e),this.loading=!1},handleError(e){this.$handleError(JSON.parse(e.message)),this.$emit("completed",e),this.loading=!1},inProgress(e){this.$emit("uploading"),this.loading=!0}},computed:{action_url(){return this.appVars.rest.url+"/feeds/media-upload"},headers(){return{"X-WP-Nonce":this.appVars.rest.nonce}}}};function xfe(e,t,n,o,r,s){const i=ut,l=BO,a=ee("CloseBold"),u=Ie,c=Rt("loading");return C(),T(de,null,[w(l,{class:D(n.className),multiple:n.isMultiple,action:s.action_url,headers:s.headers,accept:"image/*",data:n.additionalData,"on-success":s.handleSuccess,"on-progress":s.inProgress,"on-error":s.handleError,"show-file-list":!1},{default:S(()=>[he(e.$slots,"trigger",{},()=>[he(e.$slots,"default",{},()=>[Fe((C(),H(i,{disabled:r.loading,text:n.isTextBtn,class:"fcom_plain_button"},{default:S(()=>[ne(O(n.button_text),1)]),_:1},8,["disabled","text"])),[[c,r.loading]])])])]),_:3},8,["class","multiple","action","headers","data","on-success","on-progress","on-error"]),n.can_remove?(C(),H(i,{key:0,class:"remove_img",size:"small",type:"danger",plain:"",onClick:t[0]||(t[0]=d=>e.$emit("uploaded","")),text:n.isTextBtn},{default:S(()=>[he(e.$slots,"remove",{},()=>[n.removeIcon?(C(),H(u,{key:0},{default:S(()=>[w(a)]),_:1})):z("",!0),_("span",null,O(e.$t("Remove")),1)])]),_:3},8,["text"])):z("",!0)],64)}const Md=Be(Efe,[["render",xfe]]);function Tfe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Sh=Tfe,Mfe=typeof Nn=="object"&&Nn&&Nn.Object===Object&&Nn,jO=Mfe,Ofe=jO,Ife=typeof self=="object"&&self&&self.Object===Object&&self,Afe=Ofe||Ife||Function("return this")(),ji=Afe,Nfe=ji,Pfe=function(){return Nfe.Date.now()},Lfe=Pfe,Rfe=/\s/;function Dfe(e){for(var t=e.length;t--&&Rfe.test(e.charAt(t)););return t}var Vfe=Dfe,Ffe=Vfe,Bfe=/^\s+/;function zfe(e){return e&&e.slice(0,Ffe(e)+1).replace(Bfe,"")}var jfe=zfe,Hfe=ji,Ufe=Hfe.Symbol,HO=Ufe,z8=HO,UO=Object.prototype,Wfe=UO.hasOwnProperty,Kfe=UO.toString,qd=z8?z8.toStringTag:void 0;function qfe(e){var t=Wfe.call(e,qd),n=e[qd];try{e[qd]=void 0;var o=!0}catch{}var r=Kfe.call(e);return o&&(t?e[qd]=n:delete e[qd]),r}var Gfe=qfe,Yfe=Object.prototype,Zfe=Yfe.toString;function Jfe(e){return Zfe.call(e)}var Xfe=Jfe,j8=HO,Qfe=Gfe,epe=Xfe,tpe="[object Null]",npe="[object Undefined]",H8=j8?j8.toStringTag:void 0;function ope(e){return e==null?e===void 0?npe:tpe:H8&&H8 in Object(e)?Qfe(e):epe(e)}var $h=ope;function rpe(e){return e!=null&&typeof e=="object"}var ov=rpe,spe=$h,ipe=ov,lpe="[object Symbol]";function ape(e){return typeof e=="symbol"||ipe(e)&&spe(e)==lpe}var upe=ape,cpe=jfe,U8=Sh,dpe=upe,W8=0/0,fpe=/^[-+]0x[0-9a-f]+$/i,ppe=/^0b[01]+$/i,hpe=/^0o[0-7]+$/i,mpe=parseInt;function gpe(e){if(typeof e=="number")return e;if(dpe(e))return W8;if(U8(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=U8(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=cpe(e);var n=ppe.test(e);return n||hpe.test(e)?mpe(e.slice(2),n?2:8):fpe.test(e)?W8:+e}var vpe=gpe,ype=Sh,_y=Lfe,K8=vpe,_pe="Expected a function",bpe=Math.max,wpe=Math.min;function Cpe(e,t,n){var o,r,s,i,l,a,u=0,c=!1,d=!1,f=!0;if(typeof e!="function")throw new TypeError(_pe);t=K8(t)||0,ype(n)&&(c=!!n.leading,d="maxWait"in n,s=d?bpe(K8(n.maxWait)||0,t):s,f="trailing"in n?!!n.trailing:f);function p(E){var M=o,N=r;return o=r=void 0,u=E,i=e.apply(N,M),i}function h(E){return u=E,l=setTimeout(v,t),c?p(E):i}function m(E){var M=E-a,N=E-u,P=t-M;return d?wpe(P,s-N):P}function y(E){var M=E-a,N=E-u;return a===void 0||M>=t||M<0||d&&N>=s}function v(){var E=_y();if(y(E))return k(E);l=setTimeout(v,m(E))}function k(E){return l=void 0,f&&o?p(E):(o=r=void 0,i)}function b(){l!==void 0&&clearTimeout(l),u=0,o=a=r=l=void 0}function $(){return l===void 0?i:k(_y())}function x(){var E=_y(),M=y(E);if(o=arguments,r=this,a=E,M){if(l===void 0)return h(a);if(d)return clearTimeout(l),l=setTimeout(v,t),p(a)}return l===void 0&&(l=setTimeout(v,t)),i}return x.cancel=b,x.flush=$,x}var WO=Cpe;const kpe=_o(WO);var Spe=WO,$pe=Sh,Epe="Expected a function";function xpe(e,t,n){var o=!0,r=!0;if(typeof e!="function")throw new TypeError(Epe);return $pe(n)&&(o="leading"in n?!!n.leading:o,r="trailing"in n?!!n.trailing:r),Spe(e,t,{leading:o,maxWait:t,trailing:r})}var Tpe=xpe;const Mpe=_o(Tpe),Ope={name:"ContentLayout",props:["title","content_class","wrapper_class"],data(){return{throttledScrollHandler:null}},created(){this.throttledScrollHandler=Mpe(e=>{document.dispatchEvent(new CustomEvent("fcom_layout_scroll",{detail:{scrollTop:e}}))},1e3)},methods:{handleLayoutScroll(e){this.throttledScrollHandler(e.scrollTop)}},mounted(){window.fcomLayoutRef=this.$refs.layoutScrollbarRef}},Ipe={key:0,class:"fhr_content_layout_header"},Ape={role:"region","aria-label":"Actions",class:"fhr_page_actions"};function Npe(e,t,n,o,r,s){const i=Ss;return C(),T("div",{class:D([n.wrapper_class,"fhr_content_layout"])},[w(i,{"min-size":100,always:!0,noresize:!0,native:!0,onScroll:s.handleLayoutScroll,ref:"layoutScrollbarRef",height:"calc(100vh - var(--fcom-header-height, 0px)"},{default:S(()=>[he(e.$slots,"header",{},()=>[n.title?(C(),T("div",Ipe,[he(e.$slots,"title",{},()=>[_("h1",{role:"region","aria-label":"Page Title",style:{cursor:"pointer"},onClick:t[0]||(t[0]=l=>e.$eventBus.emit("toTop")),class:"fhr_page_title"},O(n.title),1)]),_("div",Ape,[he(e.$slots,"actions")])])):z("",!0)]),he(e.$slots,"sub_header"),_("div",{class:D([n.content_class,"fhr_content_layout_body"])},[he(e.$slots,"default")],2)]),_:3},8,["onScroll"])],2)}const Es=Be(Ope,[["render",Npe]]),Ppe={name:"AppLayout",props:["wrapper_class"]},Lpe={class:"feeds_main"};function Rpe(e,t,n,o,r,s){const i=ee("router-view");return C(),T("div",{class:D([n.wrapper_class,"feeds"])},[_("div",Lpe,[he(e.$slots,"before_route_view"),he(e.$slots,"default",{},()=>[w(i)]),he(e.$slots,"after_route_view")])],2)}const xs=Be(Ppe,[["render",Rpe]]),Dpe={name:"BgImageUpload",emits:["update:modelValue"],props:{modelValue:{type:String,required:!1},button_text:{type:String,default:"Upload Image"},can_remove:{type:Boolean,default:!1},is_multiple:{type:Boolean,default:!1},additional_data:{type:Object,default:()=>({})}},data(){return{imageUrl:this.modelValue}},computed:{action_url(){return this.appVars.rest.url+"/feeds/media-upload"},headers(){return{"X-WP-Nonce":this.appVars.rest.nonce}}},methods:{handleSuccess(e){this.imageUrl=e.media.url,this.$emit("update:modelValue",this.imageUrl)},handleError(e){this.$handleError(JSON.parse(e.message))},removeImage(){this.imageUrl="",this.$emit("update:modelValue","")}}};function Vpe(e,t,n,o,r,s){const i=xd,l=ut,a=BO,u=ee("CloseBold"),c=Ie;return C(),T(de,null,[w(a,{action:s.action_url,headers:s.headers,accept:"image/*",class:"fcom_bg_upload",multiple:n.is_multiple,data:n.additional_data,"show-file-list":!1,"on-success":s.handleSuccess,"on-error":s.handleError},{default:S(()=>[he(e.$slots,"trigger",{},()=>[he(e.$slots,"default",{},()=>[r.imageUrl?(C(),H(i,{key:0,alt:e.$t("Image Preview"),src:r.imageUrl},null,8,["alt","src"])):(C(),H(l,{key:1,class:"fcom_btn_upload",text:""},{default:S(()=>[ne(O(n.button_text),1)]),_:1}))])])]),_:3},8,["action","headers","multiple","data","on-success","on-error"]),r.imageUrl&&n.can_remove?(C(),H(l,{key:0,class:"fcom_bg_remove",text:"",size:"small",onClick:s.removeImage},{default:S(()=>[w(c,null,{default:S(()=>[w(u)]),_:1})]),_:1},8,["onClick"])):z("",!0)],64)}const KO=Be(Dpe,[["render",Vpe]]);var Xo=(e=>(e.docTypeError="docTypeError",e.contextNotFound="contextNotFound",e.timerNotFound="timerNotFound",e.ctxCallOutOfScope="ctxCallOutOfScope",e.createNodeInParserFail="createNodeInParserFail",e.stackOverFlow="stackOverFlow",e.parserMatchError="parserMatchError",e.serializerMatchError="serializerMatchError",e.getAtomFromSchemaFail="getAtomFromSchemaFail",e.expectDomTypeError="expectDomTypeError",e.callCommandBeforeEditorView="callCommandBeforeEditorView",e.missingRootElement="missingRootElement",e.missingNodeInSchema="missingNodeInSchema",e.missingMarkInSchema="missingMarkInSchema",e.ctxNotBind="ctxNotBind",e.missingYjsDoc="missingYjsDoc",e))(Xo||{});let wr=class extends Error{constructor(t,n){super(n),this.name="MilkdownError",this.code=t}};const Fpe=(e,t)=>typeof t=="function"?"[Function]":t,ud=e=>JSON.stringify(e,Fpe);function Bpe(e){return new wr(Xo.docTypeError,`Doc type error, unsupported type: ${ud(e)}`)}function zpe(e){return new wr(Xo.contextNotFound,`Context "${e}" not found, do you forget to inject it?`)}function jpe(e){return new wr(Xo.timerNotFound,`Timer "${e}" not found, do you forget to record it?`)}function nC(){return new wr(Xo.ctxCallOutOfScope,"Should not call a context out of the plugin.")}function Hpe(...e){const t=e.reduce((n,o)=>{if(!o)return n;const r=s=>Array.isArray(s)?s.map(i=>r(i)).join(", "):s.toJSON?ud(s.toJSON()):s.spec?ud(s.spec):s.toString();return`${n}, ${r(o)}`},"Create prosemirror node from remark failed in parser");return new wr(Xo.createNodeInParserFail,t)}function qO(){return new wr(Xo.stackOverFlow,"Stack over flow, cannot pop on an empty stack.")}function Upe(e){return new wr(Xo.parserMatchError,`Cannot match target parser for node: ${ud(e)}.`)}function Wpe(e){return new wr(Xo.serializerMatchError,`Cannot match target serializer for node: ${ud(e)}.`)}function Kpe(e,t){return new wr(Xo.getAtomFromSchemaFail,`Cannot get ${e}: ${t} from schema.`)}function li(e){return new wr(Xo.expectDomTypeError,`Expect to be a dom, but get: ${ud(e)}.`)}function qpe(){return new wr(Xo.callCommandBeforeEditorView,"You're trying to call a command before editor view initialized, make sure to get commandManager from ctx after editor view has been initialized")}function GO(e){return new wr(Xo.missingNodeInSchema,`Missing node in schema, milkdown cannot find "${e}" in schema.`)}function Gpe(e){return new wr(Xo.missingMarkInSchema,`Missing mark in schema, milkdown cannot find "${e}" in schema.`)}var YO=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},it=(e,t,n)=>(YO(e,t,"read from private field"),n?n.call(e):t.get(e)),kn=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Ut=(e,t,n,o)=>(YO(e,t,"write to private field"),o?o.call(e,n):t.set(e,n),n);let ZO=class{constructor(){this.sliceMap=new Map,this.get=t=>{const n=typeof t=="string"?[...this.sliceMap.values()].find(o=>o.type.name===t):this.sliceMap.get(t.id);if(!n){const o=typeof t=="string"?t:t.name;throw zpe(o)}return n},this.remove=t=>{const n=typeof t=="string"?[...this.sliceMap.values()].find(o=>o.type.name===t):this.sliceMap.get(t.id);n&&this.sliceMap.delete(n.type.id)},this.has=t=>typeof t=="string"?[...this.sliceMap.values()].some(n=>n.type.name===t):this.sliceMap.has(t.id)}};var Ns,rl,ef;let Ype=class{constructor(t,n,o){kn(this,Ns,void 0),kn(this,rl,void 0),kn(this,ef,void 0),Ut(this,Ns,[]),Ut(this,ef,()=>{it(this,Ns).forEach(r=>r(it(this,rl)))}),this.set=r=>{Ut(this,rl,r),it(this,ef).call(this)},this.get=()=>it(this,rl),this.update=r=>{Ut(this,rl,r(it(this,rl))),it(this,ef).call(this)},this.type=o,Ut(this,rl,n),t.set(o.id,this)}on(t){return it(this,Ns).push(t),()=>{Ut(this,Ns,it(this,Ns).filter(n=>n!==t))}}once(t){const n=this.on(o=>{t(o),n()});return n}off(t){Ut(this,Ns,it(this,Ns).filter(n=>n!==t))}offAll(){Ut(this,Ns,[])}};Ns=new WeakMap,rl=new WeakMap,ef=new WeakMap;let Zpe=class{constructor(t,n){this.id=Symbol(`Context-${n}`),this.name=n,this._defaultValue=t,this._typeInfo=()=>{throw nC()}}create(t,n=this._defaultValue){return new Ype(t,n,this)}};const jt=(e,t)=>new Zpe(e,t);var c1,d1,f1,Yu,tf,wa,nf,of,rf;let Jpe=class{constructor(t,n,o){kn(this,c1,void 0),kn(this,d1,void 0),kn(this,f1,void 0),kn(this,Yu,void 0),kn(this,tf,void 0),kn(this,wa,void 0),kn(this,nf,void 0),kn(this,of,void 0),kn(this,rf,void 0),Ut(this,Yu,new Set),Ut(this,tf,new Set),Ut(this,wa,new Map),Ut(this,nf,new Map),this.read=()=>({metadata:it(this,c1),injectedSlices:[...it(this,Yu)].map(r=>({name:typeof r=="string"?r:r.name,value:it(this,of).call(this,r)})),consumedSlices:[...it(this,tf)].map(r=>({name:typeof r=="string"?r:r.name,value:it(this,of).call(this,r)})),recordedTimers:[...it(this,wa)].map(([r,{duration:s}])=>({name:r.name,duration:s,status:it(this,rf).call(this,r)})),waitTimers:[...it(this,nf)].map(([r,{duration:s}])=>({name:r.name,duration:s,status:it(this,rf).call(this,r)}))}),this.onRecord=r=>{it(this,wa).set(r,{start:Date.now(),duration:0})},this.onClear=r=>{it(this,wa).delete(r)},this.onDone=r=>{const s=it(this,wa).get(r);s&&(s.duration=Date.now()-s.start)},this.onWait=(r,s)=>{const i=Date.now();s.finally(()=>{it(this,nf).set(r,{duration:Date.now()-i})})},this.onInject=r=>{it(this,Yu).add(r)},this.onRemove=r=>{it(this,Yu).delete(r)},this.onUse=r=>{it(this,tf).add(r)},Ut(this,of,r=>it(this,d1).get(r).get()),Ut(this,rf,r=>it(this,f1).get(r).status),Ut(this,d1,t),Ut(this,f1,n),Ut(this,c1,o)}};c1=new WeakMap,d1=new WeakMap,f1=new WeakMap,Yu=new WeakMap,tf=new WeakMap,wa=new WeakMap,nf=new WeakMap,of=new WeakMap,rf=new WeakMap;var sl,il,p1,es;const Xpe=class JO{constructor(t,n,o){kn(this,sl,void 0),kn(this,il,void 0),kn(this,p1,void 0),kn(this,es,void 0),this.produce=r=>r&&Object.keys(r).length?new JO(it(this,sl),it(this,il),{...r}):this,this.inject=(r,s)=>{var i;const l=r.create(it(this,sl).sliceMap);return s!=null&&l.set(s),(i=it(this,es))==null||i.onInject(r),this},this.remove=r=>{var s;return it(this,sl).remove(r),(s=it(this,es))==null||s.onRemove(r),this},this.record=r=>{var s;return r.create(it(this,il).store),(s=it(this,es))==null||s.onRecord(r),this},this.clearTimer=r=>{var s;return it(this,il).remove(r),(s=it(this,es))==null||s.onClear(r),this},this.isInjected=r=>it(this,sl).has(r),this.isRecorded=r=>it(this,il).has(r),this.use=r=>{var s;return(s=it(this,es))==null||s.onUse(r),it(this,sl).get(r)},this.get=r=>this.use(r).get(),this.set=(r,s)=>this.use(r).set(s),this.update=(r,s)=>this.use(r).update(s),this.timer=r=>it(this,il).get(r),this.done=r=>{var s;this.timer(r).done(),(s=it(this,es))==null||s.onDone(r)},this.wait=r=>{var s;const i=this.timer(r).start();return(s=it(this,es))==null||s.onWait(r,i),i},this.waitTimers=async r=>{await Promise.all(this.get(r).map(s=>this.wait(s)))},Ut(this,sl,t),Ut(this,il,n),Ut(this,p1,o),o&&Ut(this,es,new Jpe(t,n,o))}get meta(){return it(this,p1)}get inspector(){return it(this,es)}};sl=new WeakMap,il=new WeakMap,p1=new WeakMap,es=new WeakMap;let Qpe=Xpe,ehe=class{constructor(){this.store=new Map,this.get=t=>{const n=this.store.get(t.id);if(!n)throw jpe(t.name);return n},this.remove=t=>{this.store.delete(t.id)},this.has=t=>this.store.has(t.id)}};var Zu,Ca,sf,ll,lf,h1;let the=class{constructor(t,n){kn(this,Zu,void 0),kn(this,Ca,void 0),kn(this,sf,void 0),kn(this,ll,void 0),kn(this,lf,void 0),kn(this,h1,void 0),Ut(this,Zu,null),Ut(this,Ca,null),Ut(this,ll,"pending"),this.start=()=>(it(this,Zu)??Ut(this,Zu,new Promise((o,r)=>{Ut(this,Ca,s=>{s instanceof CustomEvent&&s.detail.id===it(this,sf)&&(Ut(this,ll,"resolved"),it(this,lf).call(this),s.stopImmediatePropagation(),o())}),it(this,h1).call(this,()=>{it(this,ll)==="pending"&&Ut(this,ll,"rejected"),it(this,lf).call(this),r(new Error(`Timing ${this.type.name} timeout.`))}),Ut(this,ll,"pending"),addEventListener(this.type.name,it(this,Ca))})),it(this,Zu)),this.done=()=>{const o=new CustomEvent(this.type.name,{detail:{id:it(this,sf)}});dispatchEvent(o)},Ut(this,lf,()=>{it(this,Ca)&&removeEventListener(this.type.name,it(this,Ca))}),Ut(this,h1,o=>{setTimeout(()=>{o()},this.type.timeout)}),Ut(this,sf,Symbol(n.name)),this.type=n,t.set(n.id,this)}get status(){return it(this,ll)}};Zu=new WeakMap,Ca=new WeakMap,sf=new WeakMap,ll=new WeakMap,lf=new WeakMap,h1=new WeakMap;let nhe=class{constructor(t,n=3e3){this.create=o=>new the(o,this),this.id=Symbol(`Timer-${t}`),this.name=t,this.timeout=n}};const oa=(e,t=3e3)=>new nhe(e,t);function to(e){this.content=e}to.prototype={constructor:to,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 o=n&&n!=e?this.remove(n):this,r=o.find(e),s=o.content.slice();return r==-1?s.push(n||e,t):(s[r+1]=t,n&&(s[r]=n)),new to(s)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new to(n)},addToStart:function(e,t){return new to([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new to(n)},addBefore:function(e,t,n){var o=this.remove(t),r=o.content.slice(),s=o.find(e);return r.splice(s==-1?r.length:s,0,t,n),new to(r)},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=to.from(e),e.size?new to(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=to.from(e),e.size?new to(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=to.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}};to.from=function(e){if(e instanceof to)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new to(t)};function XO(e,t,n){for(let o=0;;o++){if(o==e.childCount||o==t.childCount)return e.childCount==t.childCount?null:n;let r=e.child(o),s=t.child(o);if(r==s){n+=r.nodeSize;continue}if(!r.sameMarkup(s))return n;if(r.isText&&r.text!=s.text){for(let i=0;r.text[i]==s.text[i];i++)n++;return n}if(r.content.size||s.content.size){let i=XO(r.content,s.content,n+1);if(i!=null)return i}n+=r.nodeSize}}function QO(e,t,n,o){for(let r=e.childCount,s=t.childCount;;){if(r==0||s==0)return r==s?null:{a:n,b:o};let i=e.child(--r),l=t.child(--s),a=i.nodeSize;if(i==l){n-=a,o-=a;continue}if(!i.sameMarkup(l))return{a:n,b:o};if(i.isText&&i.text!=l.text){let u=0,c=Math.min(i.text.length,l.text.length);for(;u<c&&i.text[i.text.length-u-1]==l.text[l.text.length-u-1];)u++,n--,o--;return{a:n,b:o}}if(i.content.size||l.content.size){let u=QO(i.content,l.content,n-1,o-1);if(u)return u}n-=a,o-=a}}let We=class So{constructor(t,n){if(this.content=t,this.size=n||0,n==null)for(let o=0;o<t.length;o++)this.size+=t[o].nodeSize}nodesBetween(t,n,o,r=0,s){for(let i=0,l=0;l<n;i++){let a=this.content[i],u=l+a.nodeSize;if(u>t&&o(a,r+l,s||null,i)!==!1&&a.content.size){let c=l+1;a.nodesBetween(Math.max(0,t-c),Math.min(a.content.size,n-c),o,r+c)}l=u}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,o,r){let s="",i=!0;return this.nodesBetween(t,n,(l,a)=>{let u=l.isText?l.text.slice(Math.max(t,a)-a,n-a):l.isLeaf?r?typeof r=="function"?r(l):r:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&u||l.isTextblock)&&o&&(i?i=!1:s+=o),s+=u},0),s}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,o=t.firstChild,r=this.content.slice(),s=0;for(n.isText&&n.sameMarkup(o)&&(r[r.length-1]=n.withText(n.text+o.text),s=1);s<t.content.length;s++)r.push(t.content[s]);return new So(r,this.size+t.size)}cut(t,n=this.size){if(t==0&&n==this.size)return this;let o=[],r=0;if(n>t)for(let s=0,i=0;i<n;s++){let l=this.content[s],a=i+l.nodeSize;a>t&&((i<t||a>n)&&(l.isText?l=l.cut(Math.max(0,t-i),Math.min(l.text.length,n-i)):l=l.cut(Math.max(0,t-i-1),Math.min(l.content.size,n-i-1))),o.push(l),r+=l.nodeSize),i=a}return new So(o,r)}cutByIndex(t,n){return t==n?So.empty:t==0&&n==this.content.length?this:new So(this.content.slice(t,n))}replaceChild(t,n){let o=this.content[t];if(o==n)return this;let r=this.content.slice(),s=this.size+n.nodeSize-o.nodeSize;return r[t]=n,new So(r,s)}addToStart(t){return new So([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new So(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,o=0;n<this.content.length;n++){let r=this.content[n];t(r,o,n),o+=r.nodeSize}}findDiffStart(t,n=0){return XO(this,t,n)}findDiffEnd(t,n=this.size,o=t.size){return QO(this,t,n,o)}findIndex(t,n=-1){if(t==0)return km(0,t);if(t==this.size)return km(this.content.length,t);if(t>this.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let o=0,r=0;;o++){let s=this.child(o),i=r+s.nodeSize;if(i>=t)return i==t||n>0?km(o+1,i):km(o,r);r=i}}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 So.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new So(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return So.empty;let n,o=0;for(let r=0;r<t.length;r++){let s=t[r];o+=s.nodeSize,r&&s.isText&&t[r-1].sameMarkup(s)?(n||(n=t.slice(0,r)),n[n.length-1]=s.withText(n[n.length-1].text+s.text)):n&&n.push(s)}return new So(n||t,o)}static from(t){if(!t)return So.empty;if(t instanceof So)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new So([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}};We.empty=new We([],0);const by={index:0,offset:0};function km(e,t){return by.index=e,by.offset=t,by}function jg(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 o=0;o<e.length;o++)if(!jg(e[o],t[o]))return!1}else{for(let o in e)if(!(o in t)||!jg(e[o],t[o]))return!1;for(let o in t)if(!(o in e))return!1}return!0}let Yt=class Pb{constructor(t,n){this.type=t,this.attrs=n}addToSet(t){let n,o=!1;for(let r=0;r<t.length;r++){let s=t[r];if(this.eq(s))return t;if(this.type.excludes(s.type))n||(n=t.slice(0,r));else{if(s.type.excludes(this.type))return t;!o&&s.type.rank>this.type.rank&&(n||(n=t.slice(0,r)),n.push(this),o=!0),n&&n.push(s)}}return n||(n=t.slice()),o||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&&jg(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 o=t.marks[n.type];if(!o)throw new RangeError(`There is no mark type ${n.type} in this schema`);let r=o.create(n.attrs);return o.checkAttrs(r.attrs),r}static sameSet(t,n){if(t==n)return!0;if(t.length!=n.length)return!1;for(let o=0;o<t.length;o++)if(!t[o].eq(n[o]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return Pb.none;if(t instanceof Pb)return[t];let n=t.slice();return n.sort((o,r)=>o.type.rank-r.type.rank),n}};Yt.none=[];class Hg extends Error{}class Je{constructor(t,n,o){this.content=t,this.openStart=n,this.openEnd=o}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let o=tI(this.content,t+this.openStart,n);return o&&new Je(o,this.openStart,this.openEnd)}removeBetween(t,n){return new Je(eI(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 Je.empty;let o=n.openStart||0,r=n.openEnd||0;if(typeof o!="number"||typeof r!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new Je(We.fromJSON(t,n.content),o,r)}static maxOpen(t,n=!0){let o=0,r=0;for(let s=t.firstChild;s&&!s.isLeaf&&(n||!s.type.spec.isolating);s=s.firstChild)o++;for(let s=t.lastChild;s&&!s.isLeaf&&(n||!s.type.spec.isolating);s=s.lastChild)r++;return new Je(t,o,r)}}Je.empty=new Je(We.empty,0,0);function eI(e,t,n){let{index:o,offset:r}=e.findIndex(t),s=e.maybeChild(o),{index:i,offset:l}=e.findIndex(n);if(r==t||s.isText){if(l!=n&&!e.child(i).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(o!=i)throw new RangeError("Removing non-flat range");return e.replaceChild(o,s.copy(eI(s.content,t-r-1,n-r-1)))}function tI(e,t,n,o){let{index:r,offset:s}=e.findIndex(t),i=e.maybeChild(r);if(s==t||i.isText)return o&&!o.canReplace(r,r,n)?null:e.cut(0,t).append(n).append(e.cut(t));let l=tI(i.content,t-s-1,n);return l&&e.replaceChild(r,i.copy(l))}function ohe(e,t,n){if(n.openStart>e.depth)throw new Hg("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new Hg("Inconsistent open depths");return nI(e,t,n,0)}function nI(e,t,n,o){let r=e.index(o),s=e.node(o);if(r==t.index(o)&&o<e.depth-n.openStart){let i=nI(e,t,n,o+1);return s.copy(s.content.replaceChild(r,i))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&e.depth==o&&t.depth==o){let i=e.parent,l=i.content;return Za(i,l.cut(0,e.parentOffset).append(n.content).append(l.cut(t.parentOffset)))}else{let{start:i,end:l}=rhe(n,e);return Za(s,rI(e,i,l,t,o))}else return Za(s,Ug(e,t,o))}function oI(e,t){if(!t.type.compatibleContent(e.type))throw new Hg("Cannot join "+t.type.name+" onto "+e.type.name)}function Lb(e,t,n){let o=e.node(n);return oI(o,t.node(n)),o}function Ya(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 Xf(e,t,n,o){let r=(t||e).node(n),s=0,i=t?t.index(n):r.childCount;e&&(s=e.index(n),e.depth>n?s++:e.textOffset&&(Ya(e.nodeAfter,o),s++));for(let l=s;l<i;l++)Ya(r.child(l),o);t&&t.depth==n&&t.textOffset&&Ya(t.nodeBefore,o)}function Za(e,t){return e.type.checkContent(t),e.copy(t)}function rI(e,t,n,o,r){let s=e.depth>r&&Lb(e,t,r+1),i=o.depth>r&&Lb(n,o,r+1),l=[];return Xf(null,e,r,l),s&&i&&t.index(r)==n.index(r)?(oI(s,i),Ya(Za(s,rI(e,t,n,o,r+1)),l)):(s&&Ya(Za(s,Ug(e,t,r+1)),l),Xf(t,n,r,l),i&&Ya(Za(i,Ug(n,o,r+1)),l)),Xf(o,null,r,l),new We(l)}function Ug(e,t,n){let o=[];if(Xf(null,e,n,o),e.depth>n){let r=Lb(e,t,n+1);Ya(Za(r,Ug(e,t,n+1)),o)}return Xf(t,null,n,o),new We(o)}function rhe(e,t){let n=t.depth-e.openStart,r=t.node(n).copy(e.content);for(let s=n-1;s>=0;s--)r=t.node(s).copy(We.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}class zp{constructor(t,n,o){this.pos=t,this.path=n,this.parentOffset=o,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 o=this.pos-this.path[this.path.length-1],r=t.child(n);return o?t.child(n).cut(o):r}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 o=this.path[n*3],r=n==0?0:this.path[n*3-1]+1;for(let s=0;s<t;s++)r+=o.child(s).nodeSize;return r}marks(){let t=this.parent,n=this.index();if(t.content.size==0)return Yt.none;if(this.textOffset)return t.child(n).marks;let o=t.maybeChild(n-1),r=t.maybeChild(n);if(!o){let l=o;o=r,r=l}let s=o.marks;for(var i=0;i<s.length;i++)s[i].type.spec.inclusive===!1&&(!r||!s[i].isInSet(r.marks))&&(s=s[i--].removeFromSet(s));return s}marksAcross(t){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let o=n.marks,r=t.parent.maybeChild(t.index());for(var s=0;s<o.length;s++)o[s].type.spec.inclusive===!1&&(!r||!o[s].isInSet(r.marks))&&(o=o[s--].removeFromSet(o));return o}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 o=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);o>=0;o--)if(t.pos<=this.end(o)&&(!n||n(this.node(o))))return new sI(this,t,o);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 o=[],r=0,s=n;for(let i=t;;){let{index:l,offset:a}=i.content.findIndex(s),u=s-a;if(o.push(i,l,r+a),!u||(i=i.child(l),i.isText))break;s=u-1,r+=a+1}return new zp(n,o,s)}static resolveCached(t,n){let o=q8.get(t);if(o)for(let s=0;s<o.elts.length;s++){let i=o.elts[s];if(i.pos==n)return i}else q8.set(t,o=new she);let r=o.elts[o.i]=zp.resolve(t,n);return o.i=(o.i+1)%ihe,r}}class she{constructor(){this.elts=[],this.i=0}}const ihe=12,q8=new WeakMap;class sI{constructor(t,n,o){this.$from=t,this.$to=n,this.depth=o}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 lhe=Object.create(null);let Rl=class Rb{constructor(t,n,o,r=Yt.none){this.type=t,this.attrs=n,this.marks=r,this.content=o||We.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,o,r=0){this.content.nodesBetween(t,n,o,r,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,o,r){return this.content.textBetween(t,n,o,r)}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,o){return this.type==t&&jg(this.attrs,n||t.defaultAttrs||lhe)&&Yt.sameSet(this.marks,o||Yt.none)}copy(t=null){return t==this.content?this:new Rb(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new Rb(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,o=!1){if(t==n)return Je.empty;let r=this.resolve(t),s=this.resolve(n),i=o?0:r.sharedDepth(n),l=r.start(i),u=r.node(i).content.cut(r.pos-l,s.pos-l);return new Je(u,r.depth-i,s.depth-i)}replace(t,n,o){return ohe(this.resolve(t),this.resolve(n),o)}nodeAt(t){for(let n=this;;){let{index:o,offset:r}=n.content.findIndex(t);if(n=n.maybeChild(o),!n)return null;if(r==t||n.isText)return n;t-=r+1}}childAfter(t){let{index:n,offset:o}=this.content.findIndex(t);return{node:this.content.maybeChild(n),index:n,offset:o}}childBefore(t){if(t==0)return{node:null,index:0,offset:0};let{index:n,offset:o}=this.content.findIndex(t);if(o<t)return{node:this.content.child(n),index:n,offset:o};let r=this.content.child(n-1);return{node:r,index:n-1,offset:o-r.nodeSize}}resolve(t){return zp.resolveCached(this,t)}resolveNoCache(t){return zp.resolve(this,t)}rangeHasMark(t,n,o){let r=!1;return n>t&&this.nodesBetween(t,n,s=>(o.isInSet(s.marks)&&(r=!0),!r)),r}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()+")"),iI(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,o=We.empty,r=0,s=o.childCount){let i=this.contentMatchAt(t).matchFragment(o,r,s),l=i&&i.matchFragment(this.content,n);if(!l||!l.validEnd)return!1;for(let a=r;a<s;a++)if(!this.type.allowsMarks(o.child(a).marks))return!1;return!0}canReplaceWith(t,n,o,r){if(r&&!this.type.allowsMarks(r))return!1;let s=this.contentMatchAt(t).matchType(o),i=s&&s.matchFragment(this.content,n);return i?i.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),this.type.checkAttrs(this.attrs);let t=Yt.none;for(let n=0;n<this.marks.length;n++){let o=this.marks[n];o.type.checkAttrs(o.attrs),t=o.addToSet(t)}if(!Yt.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 o;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");o=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,o)}let r=We.fromJSON(t,n.content),s=t.nodeType(n.type).create(n.attrs,r,o);return s.type.checkAttrs(s.attrs),s}};Rl.prototype.text=void 0;class Wg extends Rl{constructor(t,n,o,r){if(super(t,n,null,r),!o)throw new RangeError("Empty text nodes are not allowed");this.text=o}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):iI(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,n){return this.text.slice(t,n)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new Wg(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new Wg(this.type,this.attrs,t,this.marks)}cut(t=0,n=this.text.length){return t==0&&n==this.text.length?this:this.withText(this.text.slice(t,n))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function iI(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class fu{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let o=new ahe(t,n);if(o.next==null)return fu.empty;let r=lI(o);o.next&&o.err("Unexpected trailing text");let s=mhe(hhe(r));return ghe(s,o),s}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,o=t.childCount){let r=this;for(let s=n;r&&s<o;s++)r=r.matchType(t.child(s).type);return r}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 o=0;o<t.next.length;o++)if(this.next[n].type==t.next[o].type)return!0;return!1}fillBefore(t,n=!1,o=0){let r=[this];function s(i,l){let a=i.matchFragment(t,o);if(a&&(!n||a.validEnd))return We.from(l.map(u=>u.createAndFill()));for(let u=0;u<i.next.length;u++){let{type:c,next:d}=i.next[u];if(!(c.isText||c.hasRequiredAttrs())&&r.indexOf(d)==-1){r.push(d);let f=s(d,l.concat(c));if(f)return f}}return null}return s(this,[])}findWrapping(t){for(let o=0;o<this.wrapCache.length;o+=2)if(this.wrapCache[o]==t)return this.wrapCache[o+1];let n=this.computeWrapping(t);return this.wrapCache.push(t,n),n}computeWrapping(t){let n=Object.create(null),o=[{match:this,type:null,via:null}];for(;o.length;){let r=o.shift(),s=r.match;if(s.matchType(t)){let i=[];for(let l=r;l.type;l=l.via)i.push(l.type);return i.reverse()}for(let i=0;i<s.next.length;i++){let{type:l,next:a}=s.next[i];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in n)&&(!r.type||a.validEnd)&&(o.push({match:l.contentMatch,type:l,via:r}),n[l.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(o){t.push(o);for(let r=0;r<o.next.length;r++)t.indexOf(o.next[r].next)==-1&&n(o.next[r].next)}return n(this),t.map((o,r)=>{let s=r+(o.validEnd?"*":" ")+" ";for(let i=0;i<o.next.length;i++)s+=(i?", ":"")+o.next[i].type.name+"->"+t.indexOf(o.next[i].next);return s}).join(` |
| 77 |
`)}}fu.empty=new fu(!0);class ahe{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 lI(e){let t=[];do t.push(uhe(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function uhe(e){let t=[];do t.push(che(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function che(e){let t=phe(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=dhe(e,t);else break;return t}function G8(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function dhe(e,t){let n=G8(e),o=n;return e.eat(",")&&(e.next!="}"?o=G8(e):o=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:o,expr:t}}function fhe(e,t){let n=e.nodeTypes,o=n[t];if(o)return[o];let r=[];for(let s in n){let i=n[s];i.groups.indexOf(t)>-1&&r.push(i)}return r.length==0&&e.err("No node type or group '"+t+"' found"),r}function phe(e){if(e.eat("(")){let t=lI(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=fhe(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 hhe(e){let t=[[]];return r(s(e,0),n()),t;function n(){return t.push([])-1}function o(i,l,a){let u={term:a,to:l};return t[i].push(u),u}function r(i,l){i.forEach(a=>a.to=l)}function s(i,l){if(i.type=="choice")return i.exprs.reduce((a,u)=>a.concat(s(u,l)),[]);if(i.type=="seq")for(let a=0;;a++){let u=s(i.exprs[a],l);if(a==i.exprs.length-1)return u;r(u,l=n())}else if(i.type=="star"){let a=n();return o(l,a),r(s(i.expr,a),a),[o(a)]}else if(i.type=="plus"){let a=n();return r(s(i.expr,l),a),r(s(i.expr,a),a),[o(a)]}else{if(i.type=="opt")return[o(l)].concat(s(i.expr,l));if(i.type=="range"){let a=l;for(let u=0;u<i.min;u++){let c=n();r(s(i.expr,a),c),a=c}if(i.max==-1)r(s(i.expr,a),a);else for(let u=i.min;u<i.max;u++){let c=n();o(a,c),r(s(i.expr,a),c),a=c}return[o(a)]}else{if(i.type=="name")return[o(l,void 0,i.value)];throw new Error("Unknown expr type")}}}}function aI(e,t){return t-e}function Y8(e,t){let n=[];return o(t),n.sort(aI);function o(r){let s=e[r];if(s.length==1&&!s[0].term)return o(s[0].to);n.push(r);for(let i=0;i<s.length;i++){let{term:l,to:a}=s[i];!l&&n.indexOf(a)==-1&&o(a)}}}function mhe(e){let t=Object.create(null);return n(Y8(e,0));function n(o){let r=[];o.forEach(i=>{e[i].forEach(({term:l,to:a})=>{if(!l)return;let u;for(let c=0;c<r.length;c++)r[c][0]==l&&(u=r[c][1]);Y8(e,a).forEach(c=>{u||r.push([l,u=[]]),u.indexOf(c)==-1&&u.push(c)})})});let s=t[o.join(",")]=new fu(o.indexOf(e.length-1)>-1);for(let i=0;i<r.length;i++){let l=r[i][1].sort(aI);s.next.push({type:r[i][0],next:t[l.join(",")]||n(l)})}return s}}function ghe(e,t){for(let n=0,o=[e];n<o.length;n++){let r=o[n],s=!r.validEnd,i=[];for(let l=0;l<r.next.length;l++){let{type:a,next:u}=r.next[l];i.push(a.name),s&&!(a.isText||a.hasRequiredAttrs())&&(s=!1),o.indexOf(u)==-1&&o.push(u)}s&&t.err("Only non-generatable nodes ("+i.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function uI(e){let t=Object.create(null);for(let n in e){let o=e[n];if(!o.hasDefault)return null;t[n]=o.default}return t}function cI(e,t){let n=Object.create(null);for(let o in e){let r=t&&t[o];if(r===void 0){let s=e[o];if(s.hasDefault)r=s.default;else throw new RangeError("No value supplied for attribute "+o)}n[o]=r}return n}function dI(e,t,n,o){for(let r in t)if(!(r in e))throw new RangeError(`Unsupported attribute ${r} for ${n} of type ${r}`);for(let r in e){let s=e[r];s.validate&&s.validate(t[r])}}function fI(e,t){let n=Object.create(null);if(t)for(let o in t)n[o]=new yhe(e,o,t[o]);return n}let Z8=class pI{constructor(t,n,o){this.name=t,this.schema=n,this.spec=o,this.markSet=null,this.groups=o.group?o.group.split(" "):[],this.attrs=fI(t,o.attrs),this.defaultAttrs=uI(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(o.inline||t=="text"),this.isText=t=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==fu.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:cI(this.attrs,t)}create(t=null,n,o){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Rl(this,this.computeAttrs(t),We.from(n),Yt.setFrom(o))}createChecked(t=null,n,o){return n=We.from(n),this.checkContent(n),new Rl(this,this.computeAttrs(t),n,Yt.setFrom(o))}createAndFill(t=null,n,o){if(t=this.computeAttrs(t),n=We.from(n),n.size){let i=this.contentMatch.fillBefore(n);if(!i)return null;n=i.append(n)}let r=this.contentMatch.matchFragment(n),s=r&&r.fillBefore(We.empty,!0);return s?new Rl(this,t,n.append(s),Yt.setFrom(o)):null}validContent(t){let n=this.contentMatch.matchFragment(t);if(!n||!n.validEnd)return!1;for(let o=0;o<t.childCount;o++)if(!this.allowsMarks(t.child(o).marks))return!1;return!0}checkContent(t){if(!this.validContent(t))throw new RangeError(`Invalid content for node ${this.name}: ${t.toString().slice(0,50)}`)}checkAttrs(t){dI(this.attrs,t,"node",this.name)}allowsMarkType(t){return this.markSet==null||this.markSet.indexOf(t)>-1}allowsMarks(t){if(this.markSet==null)return!0;for(let n=0;n<t.length;n++)if(!this.allowsMarkType(t[n].type))return!1;return!0}allowedMarks(t){if(this.markSet==null)return t;let n;for(let o=0;o<t.length;o++)this.allowsMarkType(t[o].type)?n&&n.push(t[o]):n||(n=t.slice(0,o));return n?n.length?n:Yt.none:t}static compile(t,n){let o=Object.create(null);t.forEach((s,i)=>o[s]=new pI(s,n,i));let r=n.spec.topNode||"doc";if(!o[r])throw new RangeError("Schema is missing its top node type ('"+r+"')");if(!o.text)throw new RangeError("Every schema needs a 'text' type");for(let s in o.text.attrs)throw new RangeError("The text node type should not have attributes");return o}};function vhe(e,t,n){let o=n.split("|");return r=>{let s=r===null?"null":typeof r;if(o.indexOf(s)<0)throw new RangeError(`Expected value of type ${o} for attribute ${t} on type ${e}, got ${s}`)}}class yhe{constructor(t,n,o){this.hasDefault=Object.prototype.hasOwnProperty.call(o,"default"),this.default=o.default,this.validate=typeof o.validate=="string"?vhe(t,n,o.validate):o.validate}get isRequired(){return!this.hasDefault}}class rv{constructor(t,n,o,r){this.name=t,this.rank=n,this.schema=o,this.spec=r,this.attrs=fI(t,r.attrs),this.excluded=null;let s=uI(this.attrs);this.instance=s?new Yt(this,s):null}create(t=null){return!t&&this.instance?this.instance:new Yt(this,cI(this.attrs,t))}static compile(t,n){let o=Object.create(null),r=0;return t.forEach((s,i)=>o[s]=new rv(s,r++,n,i)),o}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]}checkAttrs(t){dI(this.attrs,t,"mark",this.name)}excludes(t){return this.excluded.indexOf(t)>-1}}class _he{constructor(t){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let r in t)n[r]=t[r];n.nodes=to.from(t.nodes),n.marks=to.from(t.marks||{}),this.nodes=Z8.compile(this.spec.nodes,this),this.marks=rv.compile(this.spec.marks,this);let o=Object.create(null);for(let r in this.nodes){if(r in this.marks)throw new RangeError(r+" can not be both a node and a mark");let s=this.nodes[r],i=s.spec.content||"",l=s.spec.marks;if(s.contentMatch=o[i]||(o[i]=fu.parse(i,this.nodes)),s.inlineContent=s.contentMatch.inlineContent,s.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!s.isInline||!s.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=s}s.markSet=l=="_"?null:l?J8(this,l.split(" ")):l==""||!s.inlineContent?[]:null}for(let r in this.marks){let s=this.marks[r],i=s.spec.excludes;s.excluded=i==null?[s]:i==""?[]:J8(this,i.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,n=null,o,r){if(typeof t=="string")t=this.nodeType(t);else if(t instanceof Z8){if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}else throw new RangeError("Invalid node type: "+t);return t.createChecked(n,o,r)}text(t,n){let o=this.nodes.text;return new Wg(o,o.defaultAttrs,t,Yt.setFrom(n))}mark(t,n){return typeof t=="string"&&(t=this.marks[t]),t.create(n)}nodeFromJSON(t){return Rl.fromJSON(this,t)}markFromJSON(t){return Yt.fromJSON(this,t)}nodeType(t){let n=this.nodes[t];if(!n)throw new RangeError("Unknown node type: "+t);return n}}function J8(e,t){let n=[];for(let o=0;o<t.length;o++){let r=t[o],s=e.marks[r],i=s;if(s)n.push(s);else for(let l in e.marks){let a=e.marks[l];(r=="_"||a.spec.group&&a.spec.group.split(" ").indexOf(r)>-1)&&n.push(i=a)}if(!i)throw new SyntaxError("Unknown mark type: '"+t[o]+"'")}return n}function bhe(e){return e.tag!=null}function whe(e){return e.style!=null}class pu{constructor(t,n){this.schema=t,this.rules=n,this.tags=[],this.styles=[];let o=this.matchedStyles=[];n.forEach(r=>{if(bhe(r))this.tags.push(r);else if(whe(r)){let s=/[^=]*/.exec(r.style)[0];o.indexOf(s)<0&&o.push(s),this.styles.push(r)}}),this.normalizeLists=!this.tags.some(r=>{if(!/^(ul|ol)\b/.test(r.tag)||!r.node)return!1;let s=t.nodes[r.node];return s.contentMatch.matchType(s)})}parse(t,n={}){let o=new Q8(this,n,!1);return o.addAll(t,Yt.none,n.from,n.to),o.finish()}parseSlice(t,n={}){let o=new Q8(this,n,!0);return o.addAll(t,Yt.none,n.from,n.to),Je.maxOpen(o.finish())}matchTag(t,n,o){for(let r=o?this.tags.indexOf(o)+1:0;r<this.tags.length;r++){let s=this.tags[r];if(She(t,s.tag)&&(s.namespace===void 0||t.namespaceURI==s.namespace)&&(!s.context||n.matchesContext(s.context))){if(s.getAttrs){let i=s.getAttrs(t);if(i===!1)continue;s.attrs=i||void 0}return s}}}matchStyle(t,n,o,r){for(let s=r?this.styles.indexOf(r)+1:0;s<this.styles.length;s++){let i=this.styles[s],l=i.style;if(!(l.indexOf(t)!=0||i.context&&!o.matchesContext(i.context)||l.length>t.length&&(l.charCodeAt(t.length)!=61||l.slice(t.length+1)!=n))){if(i.getAttrs){let a=i.getAttrs(n);if(a===!1)continue;i.attrs=a||void 0}return i}}}static schemaRules(t){let n=[];function o(r){let s=r.priority==null?50:r.priority,i=0;for(;i<n.length;i++){let l=n[i];if((l.priority==null?50:l.priority)<s)break}n.splice(i,0,r)}for(let r in t.marks){let s=t.marks[r].spec.parseDOM;s&&s.forEach(i=>{o(i=eS(i)),i.mark||i.ignore||i.clearMark||(i.mark=r)})}for(let r in t.nodes){let s=t.nodes[r].spec.parseDOM;s&&s.forEach(i=>{o(i=eS(i)),i.node||i.ignore||i.mark||(i.node=r)})}return n}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new pu(t,pu.schemaRules(t)))}}const hI={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},Che={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},mI={ol:!0,ul:!0},Kg=1,qg=2,Qf=4;function X8(e,t,n){return t!=null?(t?Kg:0)|(t==="full"?qg:0):e&&e.whitespace=="pre"?Kg|qg:n&~Qf}class Sm{constructor(t,n,o,r,s,i){this.type=t,this.attrs=n,this.marks=o,this.solid=r,this.options=i,this.content=[],this.activeMarks=Yt.none,this.match=s||(i&Qf?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(We.from(t));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let o=this.type.contentMatch,r;return(r=o.findWrapping(t.type))?(this.match=o,r):null}}return this.match.findWrapping(t.type)}finish(t){if(!(this.options&Kg)){let o=this.content[this.content.length-1],r;if(o&&o.isText&&(r=/[ \t\r\n\u000c]+$/.exec(o.text))){let s=o;o.text.length==r[0].length?this.content.pop():this.content[this.content.length-1]=s.withText(s.text.slice(0,s.text.length-r[0].length))}}let n=We.from(this.content);return!t&&this.match&&(n=n.append(this.match.fillBefore(We.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!hI.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}}class Q8{constructor(t,n,o){this.parser=t,this.options=n,this.isOpen=o,this.open=0;let r=n.topNode,s,i=X8(null,n.preserveWhitespace,0)|(o?Qf:0);r?s=new Sm(r.type,r.attrs,Yt.none,!0,n.topMatch||r.type.contentMatch,i):o?s=new Sm(null,null,Yt.none,!0,null,i):s=new Sm(t.schema.topNodeType,null,Yt.none,!0,null,i),this.nodes=[s],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t,n){t.nodeType==3?this.addTextNode(t,n):t.nodeType==1&&this.addElement(t,n)}addTextNode(t,n){let o=t.nodeValue,r=this.top;if(r.options&qg||r.inlineContext(t)||/[^ \t\r\n\u000c]/.test(o)){if(r.options&Kg)r.options&qg?o=o.replace(/\r\n?/g,` |
| 78 |
`):o=o.replace(/\r?\n|\r/g," ");else if(o=o.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(o)&&this.open==this.nodes.length-1){let s=r.content[r.content.length-1],i=t.previousSibling;(!s||i&&i.nodeName=="BR"||s.isText&&/[ \t\r\n\u000c]$/.test(s.text))&&(o=o.slice(1))}o&&this.insertNode(this.parser.schema.text(o),n),this.findInText(t)}else this.findInside(t)}addElement(t,n,o){let r=t.nodeName.toLowerCase(),s;mI.hasOwnProperty(r)&&this.parser.normalizeLists&&khe(t);let i=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(s=this.parser.matchTag(t,this,o));if(i?i.ignore:Che.hasOwnProperty(r))this.findInside(t),this.ignoreFallback(t,n);else if(!i||i.skip||i.closeParent){i&&i.closeParent?this.open=Math.max(0,this.open-1):i&&i.skip.nodeType&&(t=i.skip);let l,a=this.top,u=this.needsBlock;if(hI.hasOwnProperty(r))a.content.length&&a.content[0].isInline&&this.open&&(this.open--,a=this.top),l=!0,a.type||(this.needsBlock=!0);else if(!t.firstChild){this.leafFallback(t,n);return}let c=i&&i.skip?n:this.readStyles(t,n);c&&this.addAll(t,c),l&&this.sync(a),this.needsBlock=u}else{let l=this.readStyles(t,n);l&&this.addElementByRule(t,i,l,i.consuming===!1?s:void 0)}}leafFallback(t,n){t.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode(` |
| 79 |
`),n)}ignoreFallback(t,n){t.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n)}readStyles(t,n){let o=t.style;if(o&&o.length)for(let r=0;r<this.parser.matchedStyles.length;r++){let s=this.parser.matchedStyles[r],i=o.getPropertyValue(s);if(i)for(let l=void 0;;){let a=this.parser.matchStyle(s,i,this,l);if(!a)break;if(a.ignore)return null;if(a.clearMark?n=n.filter(u=>!a.clearMark(u)):n=n.concat(this.parser.schema.marks[a.mark].create(a.attrs)),a.consuming===!1)l=a;else break}}return n}addElementByRule(t,n,o,r){let s,i;if(n.node)if(i=this.parser.schema.nodes[n.node],i.isLeaf)this.insertNode(i.create(n.attrs),o)||this.leafFallback(t,o);else{let a=this.enter(i,n.attrs||null,o,n.preserveWhitespace);a&&(s=!0,o=a)}else{let a=this.parser.schema.marks[n.mark];o=o.concat(a.create(n.attrs))}let l=this.top;if(i&&i.isLeaf)this.findInside(t);else if(r)this.addElement(t,o,r);else if(n.getContent)this.findInside(t),n.getContent(t,this.parser.schema).forEach(a=>this.insertNode(a,o));else{let a=t;typeof n.contentElement=="string"?a=t.querySelector(n.contentElement):typeof n.contentElement=="function"?a=n.contentElement(t):n.contentElement&&(a=n.contentElement),this.findAround(t,a,!0),this.addAll(a,o)}s&&this.sync(l)&&this.open--}addAll(t,n,o,r){let s=o||0;for(let i=o?t.childNodes[o]:t.firstChild,l=r==null?null:t.childNodes[r];i!=l;i=i.nextSibling,++s)this.findAtPoint(t,s),this.addDOM(i,n);this.findAtPoint(t,s)}findPlace(t,n){let o,r;for(let s=this.open;s>=0;s--){let i=this.nodes[s],l=i.findWrapping(t);if(l&&(!o||o.length>l.length)&&(o=l,r=i,!l.length)||i.solid)break}if(!o)return null;this.sync(r);for(let s=0;s<o.length;s++)n=this.enterInner(o[s],null,n,!1);return n}insertNode(t,n){if(t.isInline&&this.needsBlock&&!this.top.type){let r=this.textblockFromContext();r&&(n=this.enterInner(r,null,n))}let o=this.findPlace(t,n);if(o){this.closeExtra();let r=this.top;r.match&&(r.match=r.match.matchType(t.type));let s=Yt.none;for(let i of o.concat(t.marks))(r.type?r.type.allowsMarkType(i.type):tS(i.type,t.type))&&(s=i.addToSet(s));return r.content.push(t.mark(s)),!0}return!1}enter(t,n,o,r){let s=this.findPlace(t.create(n),o);return s&&(s=this.enterInner(t,n,o,!0,r)),s}enterInner(t,n,o,r=!1,s){this.closeExtra();let i=this.top;i.match=i.match&&i.match.matchType(t);let l=X8(t,s,i.options);i.options&Qf&&i.content.length==0&&(l|=Qf);let a=Yt.none;return o=o.filter(u=>(i.type?i.type.allowsMarkType(u.type):tS(u.type,t))?(a=u.addToSet(a),!1):!0),this.nodes.push(new Sm(t,n,a,r,null,l)),this.open++,o}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 o=this.nodes[n].content;for(let r=o.length-1;r>=0;r--)t+=o[r].nodeSize;n&&t++}return t}findAtPoint(t,n){if(this.find)for(let o=0;o<this.find.length;o++)this.find[o].node==t&&this.find[o].offset==n&&(this.find[o].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,o){if(t!=n&&this.find)for(let r=0;r<this.find.length;r++)this.find[r].pos==null&&t.nodeType==1&&t.contains(this.find[r].node)&&n.compareDocumentPosition(this.find[r].node)&(o?2:4)&&(this.find[r].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("/"),o=this.options.context,r=!this.isOpen&&(!o||o.parent.type==this.nodes[0].type),s=-(o?o.depth+1:0)+(r?0:1),i=(l,a)=>{for(;l>=0;l--){let u=n[l];if(u==""){if(l==n.length-1||l==0)continue;for(;a>=s;a--)if(i(l-1,a))return!0;return!1}else{let c=a>0||a==0&&r?this.nodes[a].type:o&&a>=s?o.node(a-s).type:null;if(!c||c.name!=u&&c.groups.indexOf(u)==-1)return!1;a--}}return!0};return i(n.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let n=t.depth;n>=0;n--){let o=t.node(n).contentMatchAt(t.indexAfter(n)).defaultType;if(o&&o.isTextblock&&o.defaultAttrs)return o}for(let n in this.parser.schema.nodes){let o=this.parser.schema.nodes[n];if(o.isTextblock&&o.defaultAttrs)return o}}}function khe(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let o=t.nodeType==1?t.nodeName.toLowerCase():null;o&&mI.hasOwnProperty(o)&&n?(n.appendChild(t),t=n):o=="li"?n=t:o&&(n=null)}}function She(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function eS(e){let t={};for(let n in e)t[n]=e[n];return t}function tS(e,t){let n=t.schema.nodes;for(let o in n){let r=n[o];if(!r.allowsMarkType(e))continue;let s=[],i=l=>{s.push(l);for(let a=0;a<l.edgeCount;a++){let{type:u,next:c}=l.edge(a);if(u==t||s.indexOf(c)<0&&i(c))return!0}};if(i(r.contentMatch))return!0}}class ra{constructor(t,n){this.nodes=t,this.marks=n}serializeFragment(t,n={},o){o||(o=wy(n).createDocumentFragment());let r=o,s=[];return t.forEach(i=>{if(s.length||i.marks.length){let l=0,a=0;for(;l<s.length&&a<i.marks.length;){let u=i.marks[a];if(!this.marks[u.type.name]){a++;continue}if(!u.eq(s[l][0])||u.type.spec.spanning===!1)break;l++,a++}for(;l<s.length;)r=s.pop()[1];for(;a<i.marks.length;){let u=i.marks[a++],c=this.serializeMark(u,i.isInline,n);c&&(s.push([u,r]),r.appendChild(c.dom),r=c.contentDOM||c.dom)}}r.appendChild(this.serializeNodeInner(i,n))}),o}serializeNodeInner(t,n){let{dom:o,contentDOM:r}=m1(wy(n),this.nodes[t.type.name](t),null,t.attrs);if(r){if(t.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(t.content,n,r)}return o}serializeNode(t,n={}){let o=this.serializeNodeInner(t,n);for(let r=t.marks.length-1;r>=0;r--){let s=this.serializeMark(t.marks[r],t.isInline,n);s&&((s.contentDOM||s.dom).appendChild(o),o=s.dom)}return o}serializeMark(t,n,o={}){let r=this.marks[t.type.name];return r&&m1(wy(o),r(t,n),null,t.attrs)}static renderSpec(t,n,o=null,r){return m1(t,n,o,r)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new ra(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let n=nS(t.nodes);return n.text||(n.text=o=>o.text),n}static marksFromSchema(t){return nS(t.marks)}}function nS(e){let t={};for(let n in e){let o=e[n].spec.toDOM;o&&(t[n]=o)}return t}function wy(e){return e.document||window.document}const oS=new WeakMap;function $he(e){let t=oS.get(e);return t===void 0&&oS.set(e,t=Ehe(e)),t}function Ehe(e){let t=null;function n(o){if(o&&typeof o=="object")if(Array.isArray(o))if(typeof o[0]=="string")t||(t=[]),t.push(o);else for(let r=0;r<o.length;r++)n(o[r]);else for(let r in o)n(o[r])}return n(e),t}function m1(e,t,n,o){if(typeof t=="string")return{dom:e.createTextNode(t)};if(t.nodeType!=null)return{dom:t};if(t.dom&&t.dom.nodeType!=null)return t;let r=t[0],s;if(typeof r!="string")throw new RangeError("Invalid array passed to renderSpec");if(o&&(s=$he(o))&&s.indexOf(t)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let i=r.indexOf(" ");i>0&&(n=r.slice(0,i),r=r.slice(i+1));let l,a=n?e.createElementNS(n,r):e.createElement(r),u=t[1],c=1;if(u&&typeof u=="object"&&u.nodeType==null&&!Array.isArray(u)){c=2;for(let d in u)if(u[d]!=null){let f=d.indexOf(" ");f>0?a.setAttributeNS(d.slice(0,f),d.slice(f+1),u[d]):a.setAttribute(d,u[d])}}for(let d=c;d<t.length;d++){let f=t[d];if(f===0){if(d<t.length-1||d>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}else{let{dom:p,contentDOM:h}=m1(e,f,n,o);if(a.appendChild(p),h){if(l)throw new RangeError("Multiple content holes");l=h}}}return{dom:a,contentDOM:l}}const xhe={};function oC(e,t){const n=t||xhe,o=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,r=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return gI(e,o,r)}function gI(e,t,n){if(The(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return rS(e.children,t,n)}return Array.isArray(e)?rS(e,t,n):""}function rS(e,t,n){const o=[];let r=-1;for(;++r<e.length;)o[r]=gI(e[r],t,n);return o.join("")}function The(e){return!!(e&&typeof e=="object")}const sS=document.createElement("i");function rC(e){const t="&"+e+";";sS.innerHTML=t;const n=sS.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Rr(e,t,n,o){const r=e.length;let s=0,i;if(t<0?t=-t>r?0:r+t:t=t>r?r:t,n=n>0?n:0,o.length<1e4)i=Array.from(o),i.unshift(t,n),e.splice(...i);else for(n&&e.splice(t,n);s<o.length;)i=o.slice(s,s+1e4),i.unshift(t,0),e.splice(...i),s+=1e4,t+=1e4}function xr(e,t){return e.length>0?(Rr(e,e.length,0,t),e):t}const iS={}.hasOwnProperty;function vI(e){const t={};let n=-1;for(;++n<e.length;)Mhe(t,e[n]);return t}function Mhe(e,t){let n;for(n in t){const r=(iS.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let i;if(s)for(i in s){iS.call(r,i)||(r[i]=[]);const l=s[i];Ohe(r[i],Array.isArray(l)?l:l?[l]:[])}}}function Ohe(e,t){let n=-1;const o=[];for(;++n<t.length;)(t[n].add==="after"?e:o).push(t[n]);Rr(e,0,0,o)}function yI(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function ds(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const xo=sa(/[A-Za-z]/),Wo=sa(/[\dA-Za-z]/),Ihe=sa(/[#-'*+\--9=?A-Z^-~]/);function Gg(e){return e!==null&&(e<32||e===127)}const Db=sa(/\d/),Ahe=sa(/[\dA-Fa-f]/),Nhe=sa(/[!-/:-@[-`{-~]/);function ft(e){return e!==null&&e<-2}function nn(e){return e!==null&&(e<0||e===32)}function Lt(e){return e===-2||e===-1||e===32}const sv=sa(/\p{P}|\p{S}/u),hu=sa(/\s/);function sa(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Bt(e,t,n,o){const r=o?o-1:Number.POSITIVE_INFINITY;let s=0;return i;function i(a){return Lt(a)?(e.enter(n),l(a)):t(a)}function l(a){return Lt(a)&&s++<r?(e.consume(a),l):(e.exit(n),t(a))}}const Phe={tokenize:Lhe};function Lhe(e){const t=e.attempt(this.parser.constructs.contentInitial,o,r);let n;return t;function o(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Bt(e,t,"linePrefix")}function r(l){return e.enter("paragraph"),s(l)}function s(l){const a=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=a),n=a,i(l)}function i(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return ft(l)?(e.consume(l),e.exit("chunkText"),s):(e.consume(l),i)}}const Rhe={tokenize:Dhe},lS={tokenize:Vhe};function Dhe(e){const t=this,n=[];let o=0,r,s,i;return l;function l(b){if(o<n.length){const $=n[o];return t.containerState=$[1],e.attempt($[0].continuation,a,u)(b)}return u(b)}function a(b){if(o++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&k();const $=t.events.length;let x=$,E;for(;x--;)if(t.events[x][0]==="exit"&&t.events[x][1].type==="chunkFlow"){E=t.events[x][1].end;break}v(o);let M=$;for(;M<t.events.length;)t.events[M][1].end=Object.assign({},E),M++;return Rr(t.events,x+1,0,t.events.slice($)),t.events.length=M,u(b)}return l(b)}function u(b){if(o===n.length){if(!r)return f(b);if(r.currentConstruct&&r.currentConstruct.concrete)return h(b);t.interrupt=!!(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(lS,c,d)(b)}function c(b){return r&&k(),v(o),f(b)}function d(b){return t.parser.lazy[t.now().line]=o!==n.length,i=t.now().offset,h(b)}function f(b){return t.containerState={},e.attempt(lS,p,h)(b)}function p(b){return o++,n.push([t.currentConstruct,t.containerState]),f(b)}function h(b){if(b===null){r&&k(),v(0),e.consume(b);return}return r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:s,_tokenizer:r}),m(b)}function m(b){if(b===null){y(e.exit("chunkFlow"),!0),v(0),e.consume(b);return}return ft(b)?(e.consume(b),y(e.exit("chunkFlow")),o=0,t.interrupt=void 0,l):(e.consume(b),m)}function y(b,$){const x=t.sliceStream(b);if($&&x.push(null),b.previous=s,s&&(s.next=b),s=b,r.defineSkip(b.start),r.write(x),t.parser.lazy[b.start.line]){let E=r.events.length;for(;E--;)if(r.events[E][1].start.offset<i&&(!r.events[E][1].end||r.events[E][1].end.offset>i))return;const M=t.events.length;let N=M,P,I;for(;N--;)if(t.events[N][0]==="exit"&&t.events[N][1].type==="chunkFlow"){if(P){I=t.events[N][1].end;break}P=!0}for(v(o),E=M;E<t.events.length;)t.events[E][1].end=Object.assign({},I),E++;Rr(t.events,N+1,0,t.events.slice(M)),t.events.length=E}}function v(b){let $=n.length;for(;$-- >b;){const x=n[$];t.containerState=x[1],x[0].exit.call(t,e)}n.length=b}function k(){r.write([null]),s=void 0,r=void 0,t.containerState._closeFlow=void 0}}function Vhe(e,t,n){return Bt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Yg(e){if(e===null||nn(e)||hu(e))return 1;if(sv(e))return 2}function iv(e,t,n){const o=[];let r=-1;for(;++r<e.length;){const s=e[r].resolveAll;s&&!o.includes(s)&&(t=s(t,n),o.push(s))}return t}const Vb={name:"attention",tokenize:Bhe,resolveAll:Fhe};function Fhe(e,t){let n=-1,o,r,s,i,l,a,u,c;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(o=n;o--;)if(e[o][0]==="exit"&&e[o][1].type==="attentionSequence"&&e[o][1]._open&&t.sliceSerialize(e[o][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[o][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[o][1].end.offset-e[o][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;a=e[o][1].end.offset-e[o][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d=Object.assign({},e[o][1].end),f=Object.assign({},e[n][1].start);aS(d,-a),aS(f,a),i={type:a>1?"strongSequence":"emphasisSequence",start:d,end:Object.assign({},e[o][1].end)},l={type:a>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:f},s={type:a>1?"strongText":"emphasisText",start:Object.assign({},e[o][1].end),end:Object.assign({},e[n][1].start)},r={type:a>1?"strong":"emphasis",start:Object.assign({},i.start),end:Object.assign({},l.end)},e[o][1].end=Object.assign({},i.start),e[n][1].start=Object.assign({},l.end),u=[],e[o][1].end.offset-e[o][1].start.offset&&(u=xr(u,[["enter",e[o][1],t],["exit",e[o][1],t]])),u=xr(u,[["enter",r,t],["enter",i,t],["exit",i,t],["enter",s,t]]),u=xr(u,iv(t.parser.constructs.insideSpan.null,e.slice(o+1,n),t)),u=xr(u,[["exit",s,t],["enter",l,t],["exit",l,t],["exit",r,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,u=xr(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,Rr(e,o-1,n-o+3,u),n=o+u.length-c-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Bhe(e,t){const n=this.parser.constructs.attentionMarkers.null,o=this.previous,r=Yg(o);let s;return i;function i(a){return s=a,e.enter("attentionSequence"),l(a)}function l(a){if(a===s)return e.consume(a),l;const u=e.exit("attentionSequence"),c=Yg(a),d=!c||c===2&&r||n.includes(a),f=!r||r===2&&c||n.includes(o);return u._open=!!(s===42?d:d&&(r||!f)),u._close=!!(s===42?f:f&&(c||!d)),t(a)}}function aS(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const zhe={name:"autolink",tokenize:jhe};function jhe(e,t,n){let o=0;return r;function r(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(p){return xo(p)?(e.consume(p),i):p===64?n(p):u(p)}function i(p){return p===43||p===45||p===46||Wo(p)?(o=1,l(p)):u(p)}function l(p){return p===58?(e.consume(p),o=0,a):(p===43||p===45||p===46||Wo(p))&&o++<32?(e.consume(p),l):(o=0,u(p))}function a(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||Gg(p)?n(p):(e.consume(p),a)}function u(p){return p===64?(e.consume(p),c):Ihe(p)?(e.consume(p),u):n(p)}function c(p){return Wo(p)?d(p):n(p)}function d(p){return p===46?(e.consume(p),o=0,c):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):f(p)}function f(p){if((p===45||Wo(p))&&o++<63){const h=p===45?f:d;return e.consume(p),h}return n(p)}}const Eh={tokenize:Hhe,partial:!0};function Hhe(e,t,n){return o;function o(s){return Lt(s)?Bt(e,r,"linePrefix")(s):r(s)}function r(s){return s===null||ft(s)?t(s):n(s)}}const _I={name:"blockQuote",tokenize:Uhe,continuation:{tokenize:Whe},exit:Khe};function Uhe(e,t,n){const o=this;return r;function r(i){if(i===62){const l=o.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(i),e.exit("blockQuoteMarker"),s}return n(i)}function s(i){return Lt(i)?(e.enter("blockQuotePrefixWhitespace"),e.consume(i),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(i))}}function Whe(e,t,n){const o=this;return r;function r(i){return Lt(i)?Bt(e,s,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i):s(i)}function s(i){return e.attempt(_I,t,n)(i)}}function Khe(e){e.exit("blockQuote")}const bI={name:"characterEscape",tokenize:qhe};function qhe(e,t,n){return o;function o(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),r}function r(s){return Nhe(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const wI={name:"characterReference",tokenize:Ghe};function Ghe(e,t,n){const o=this;let r=0,s,i;return l;function l(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),a}function a(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),s=31,i=Wo,c(d))}function u(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,i=Ahe,c):(e.enter("characterReferenceValue"),s=7,i=Db,c(d))}function c(d){if(d===59&&r){const f=e.exit("characterReferenceValue");return i===Wo&&!rC(o.sliceSerialize(f))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return i(d)&&r++<s?(e.consume(d),c):n(d)}}const uS={tokenize:Zhe,partial:!0},cS={name:"codeFenced",tokenize:Yhe,concrete:!0};function Yhe(e,t,n){const o=this,r={tokenize:x,partial:!0};let s=0,i=0,l;return a;function a(E){return u(E)}function u(E){const M=o.events[o.events.length-1];return s=M&&M[1].type==="linePrefix"?M[2].sliceSerialize(M[1],!0).length:0,l=E,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(E)}function c(E){return E===l?(i++,e.consume(E),c):i<3?n(E):(e.exit("codeFencedFenceSequence"),Lt(E)?Bt(e,d,"whitespace")(E):d(E))}function d(E){return E===null||ft(E)?(e.exit("codeFencedFence"),o.interrupt?t(E):e.check(uS,m,$)(E)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(E))}function f(E){return E===null||ft(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(E)):Lt(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Bt(e,p,"whitespace")(E)):E===96&&E===l?n(E):(e.consume(E),f)}function p(E){return E===null||ft(E)?d(E):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),h(E))}function h(E){return E===null||ft(E)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(E)):E===96&&E===l?n(E):(e.consume(E),h)}function m(E){return e.attempt(r,$,y)(E)}function y(E){return e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),v}function v(E){return s>0&&Lt(E)?Bt(e,k,"linePrefix",s+1)(E):k(E)}function k(E){return E===null||ft(E)?e.check(uS,m,$)(E):(e.enter("codeFlowValue"),b(E))}function b(E){return E===null||ft(E)?(e.exit("codeFlowValue"),k(E)):(e.consume(E),b)}function $(E){return e.exit("codeFenced"),t(E)}function x(E,M,N){let P=0;return I;function I(K){return E.enter("lineEnding"),E.consume(K),E.exit("lineEnding"),V}function V(K){return E.enter("codeFencedFence"),Lt(K)?Bt(E,F,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(K):F(K)}function F(K){return K===l?(E.enter("codeFencedFenceSequence"),Y(K)):N(K)}function Y(K){return K===l?(P++,E.consume(K),Y):P>=i?(E.exit("codeFencedFenceSequence"),Lt(K)?Bt(E,Z,"whitespace")(K):Z(K)):N(K)}function Z(K){return K===null||ft(K)?(E.exit("codeFencedFence"),M(K)):N(K)}}}function Zhe(e,t,n){const o=this;return r;function r(i){return i===null?n(i):(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),s)}function s(i){return o.parser.lazy[o.now().line]?n(i):t(i)}}const Cy={name:"codeIndented",tokenize:Xhe},Jhe={tokenize:Qhe,partial:!0};function Xhe(e,t,n){const o=this;return r;function r(u){return e.enter("codeIndented"),Bt(e,s,"linePrefix",4+1)(u)}function s(u){const c=o.events[o.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?i(u):n(u)}function i(u){return u===null?a(u):ft(u)?e.attempt(Jhe,i,a)(u):(e.enter("codeFlowValue"),l(u))}function l(u){return u===null||ft(u)?(e.exit("codeFlowValue"),i(u)):(e.consume(u),l)}function a(u){return e.exit("codeIndented"),t(u)}}function Qhe(e,t,n){const o=this;return r;function r(i){return o.parser.lazy[o.now().line]?n(i):ft(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),r):Bt(e,s,"linePrefix",4+1)(i)}function s(i){const l=o.events[o.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(i):ft(i)?r(i):n(i)}}const eme={name:"codeText",tokenize:ome,resolve:tme,previous:nme};function tme(e){let t=e.length-4,n=3,o,r;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(o=n;++o<t;)if(e[o][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(o=n-1,t++;++o<=t;)r===void 0?o!==t&&e[o][1].type!=="lineEnding"&&(r=o):(o===t||e[o][1].type==="lineEnding")&&(e[r][1].type="codeTextData",o!==r+2&&(e[r][1].end=e[o-1][1].end,e.splice(r+2,o-r-2),t-=o-r-2,o=r+2),r=void 0);return e}function nme(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function ome(e,t,n){let o=0,r,s;return i;function i(d){return e.enter("codeText"),e.enter("codeTextSequence"),l(d)}function l(d){return d===96?(e.consume(d),o++,l):(e.exit("codeTextSequence"),a(d))}function a(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),a):d===96?(s=e.enter("codeTextSequence"),r=0,c(d)):ft(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),a):(e.enter("codeTextData"),u(d))}function u(d){return d===null||d===32||d===96||ft(d)?(e.exit("codeTextData"),a(d)):(e.consume(d),u)}function c(d){return d===96?(e.consume(d),r++,c):r===o?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(s.type="codeTextData",u(d))}}class rme{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const o=n??Number.POSITIVE_INFINITY;return o<this.left.length?this.left.slice(t,o):t>this.left.length?this.right.slice(this.right.length-o+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-o+this.left.length).reverse())}splice(t,n,o){const r=n||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return o&&Gd(this.left,o),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Gd(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Gd(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Gd(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Gd(this.left,n.reverse())}}}function Gd(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function CI(e){const t={};let n=-1,o,r,s,i,l,a,u;const c=new rme(e);for(;++n<c.length;){for(;n in t;)n=t[n];if(o=c.get(n),n&&o[1].type==="chunkFlow"&&c.get(n-1)[1].type==="listItemPrefix"&&(a=o[1]._tokenizer.events,s=0,s<a.length&&a[s][1].type==="lineEndingBlank"&&(s+=2),s<a.length&&a[s][1].type==="content"))for(;++s<a.length&&a[s][1].type!=="content";)a[s][1].type==="chunkText"&&(a[s][1]._isInFirstContentOfListItem=!0,s++);if(o[0]==="enter")o[1].contentType&&(Object.assign(t,sme(c,n)),n=t[n],u=!0);else if(o[1]._container){for(s=n,r=void 0;s--&&(i=c.get(s),i[1].type==="lineEnding"||i[1].type==="lineEndingBlank");)i[0]==="enter"&&(r&&(c.get(r)[1].type="lineEndingBlank"),i[1].type="lineEnding",r=s);r&&(o[1].end=Object.assign({},c.get(r)[1].start),l=c.slice(r,n),l.unshift(o),c.splice(r,n-r+1,l))}}return Rr(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!u}function sme(e,t){const n=e.get(t)[1],o=e.get(t)[2];let r=t-1;const s=[],i=n._tokenizer||o.parser[n.contentType](n.start),l=i.events,a=[],u={};let c,d,f=-1,p=n,h=0,m=0;const y=[m];for(;p;){for(;e.get(++r)[1]!==p;);s.push(r),p._tokenizer||(c=o.sliceStream(p),p.next||c.push(null),d&&i.defineSkip(p.start),p._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=!0),i.write(c),p._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<l.length;)l[f][0]==="exit"&&l[f-1][0]==="enter"&&l[f][1].type===l[f-1][1].type&&l[f][1].start.line!==l[f][1].end.line&&(m=f+1,y.push(m),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(i.events=[],p?(p._tokenizer=void 0,p.previous=void 0):y.pop(),f=y.length;f--;){const v=l.slice(y[f],y[f+1]),k=s.pop();a.push([k,k+v.length-1]),e.splice(k,2,v)}for(a.reverse(),f=-1;++f<a.length;)u[h+a[f][0]]=h+a[f][1],h+=a[f][1]-a[f][0]-1;return u}const ime={tokenize:ume,resolve:ame},lme={tokenize:cme,partial:!0};function ame(e){return CI(e),e}function ume(e,t){let n;return o;function o(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(l)}function r(l){return l===null?s(l):ft(l)?e.check(lme,i,s)(l):(e.consume(l),r)}function s(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function i(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}function cme(e,t,n){const o=this;return r;function r(i){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),Bt(e,s,"linePrefix")}function s(i){if(i===null||ft(i))return n(i);const l=o.events[o.events.length-1];return!o.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(i):e.interrupt(o.parser.constructs.flow,n,t)(i)}}function kI(e,t,n,o,r,s,i,l,a){const u=a||Number.POSITIVE_INFINITY;let c=0;return d;function d(v){return v===60?(e.enter(o),e.enter(r),e.enter(s),e.consume(v),e.exit(s),f):v===null||v===32||v===41||Gg(v)?n(v):(e.enter(o),e.enter(i),e.enter(l),e.enter("chunkString",{contentType:"string"}),m(v))}function f(v){return v===62?(e.enter(s),e.consume(v),e.exit(s),e.exit(r),e.exit(o),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),p(v))}function p(v){return v===62?(e.exit("chunkString"),e.exit(l),f(v)):v===null||v===60||ft(v)?n(v):(e.consume(v),v===92?h:p)}function h(v){return v===60||v===62||v===92?(e.consume(v),p):p(v)}function m(v){return!c&&(v===null||v===41||nn(v))?(e.exit("chunkString"),e.exit(l),e.exit(i),e.exit(o),t(v)):c<u&&v===40?(e.consume(v),c++,m):v===41?(e.consume(v),c--,m):v===null||v===32||v===40||Gg(v)?n(v):(e.consume(v),v===92?y:m)}function y(v){return v===40||v===41||v===92?(e.consume(v),m):m(v)}}function SI(e,t,n,o,r,s){const i=this;let l=0,a;return u;function u(p){return e.enter(o),e.enter(r),e.consume(p),e.exit(r),e.enter(s),c}function c(p){return l>999||p===null||p===91||p===93&&!a||p===94&&!l&&"_hiddenFootnoteSupport"in i.parser.constructs?n(p):p===93?(e.exit(s),e.enter(r),e.consume(p),e.exit(r),e.exit(o),t):ft(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===null||p===91||p===93||ft(p)||l++>999?(e.exit("chunkString"),c(p)):(e.consume(p),a||(a=!Lt(p)),p===92?f:d)}function f(p){return p===91||p===92||p===93?(e.consume(p),l++,d):d(p)}}function $I(e,t,n,o,r,s){let i;return l;function l(f){return f===34||f===39||f===40?(e.enter(o),e.enter(r),e.consume(f),e.exit(r),i=f===40?41:f,a):n(f)}function a(f){return f===i?(e.enter(r),e.consume(f),e.exit(r),e.exit(o),t):(e.enter(s),u(f))}function u(f){return f===i?(e.exit(s),a(i)):f===null?n(f):ft(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Bt(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(f))}function c(f){return f===i||f===null||ft(f)?(e.exit("chunkString"),u(f)):(e.consume(f),f===92?d:c)}function d(f){return f===i||f===92?(e.consume(f),c):c(f)}}function ep(e,t){let n;return o;function o(r){return ft(r)?(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),n=!0,o):Lt(r)?Bt(e,o,n?"linePrefix":"lineSuffix")(r):t(r)}}const dme={name:"definition",tokenize:pme},fme={tokenize:hme,partial:!0};function pme(e,t,n){const o=this;let r;return s;function s(p){return e.enter("definition"),i(p)}function i(p){return SI.call(o,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function l(p){return r=ds(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),a):n(p)}function a(p){return nn(p)?ep(e,u)(p):u(p)}function u(p){return kI(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function c(p){return e.attempt(fme,d,d)(p)}function d(p){return Lt(p)?Bt(e,f,"whitespace")(p):f(p)}function f(p){return p===null||ft(p)?(e.exit("definition"),o.parser.defined.push(r),t(p)):n(p)}}function hme(e,t,n){return o;function o(l){return nn(l)?ep(e,r)(l):n(l)}function r(l){return $I(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function s(l){return Lt(l)?Bt(e,i,"whitespace")(l):i(l)}function i(l){return l===null||ft(l)?t(l):n(l)}}const mme={name:"hardBreakEscape",tokenize:gme};function gme(e,t,n){return o;function o(s){return e.enter("hardBreakEscape"),e.consume(s),r}function r(s){return ft(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const vme={name:"headingAtx",tokenize:_me,resolve:yme};function yme(e,t){let n=e.length-2,o=3,r,s;return e[o][1].type==="whitespace"&&(o+=2),n-2>o&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(o===n-1||n-4>o&&e[n-2][1].type==="whitespace")&&(n-=o+1===n?2:4),n>o&&(r={type:"atxHeadingText",start:e[o][1].start,end:e[n][1].end},s={type:"chunkText",start:e[o][1].start,end:e[n][1].end,contentType:"text"},Rr(e,o,n-o+1,[["enter",r,t],["enter",s,t],["exit",s,t],["exit",r,t]])),e}function _me(e,t,n){let o=0;return r;function r(c){return e.enter("atxHeading"),s(c)}function s(c){return e.enter("atxHeadingSequence"),i(c)}function i(c){return c===35&&o++<6?(e.consume(c),i):c===null||nn(c)?(e.exit("atxHeadingSequence"),l(c)):n(c)}function l(c){return c===35?(e.enter("atxHeadingSequence"),a(c)):c===null||ft(c)?(e.exit("atxHeading"),t(c)):Lt(c)?Bt(e,l,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function a(c){return c===35?(e.consume(c),a):(e.exit("atxHeadingSequence"),l(c))}function u(c){return c===null||c===35||nn(c)?(e.exit("atxHeadingText"),l(c)):(e.consume(c),u)}}const bme=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],dS=["pre","script","style","textarea"],wme={name:"htmlFlow",tokenize:$me,resolveTo:Sme,concrete:!0},Cme={tokenize:xme,partial:!0},kme={tokenize:Eme,partial:!0};function Sme(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function $me(e,t,n){const o=this;let r,s,i,l,a;return u;function u(j){return c(j)}function c(j){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(j),d}function d(j){return j===33?(e.consume(j),f):j===47?(e.consume(j),s=!0,m):j===63?(e.consume(j),r=3,o.interrupt?t:A):xo(j)?(e.consume(j),i=String.fromCharCode(j),y):n(j)}function f(j){return j===45?(e.consume(j),r=2,p):j===91?(e.consume(j),r=5,l=0,h):xo(j)?(e.consume(j),r=4,o.interrupt?t:A):n(j)}function p(j){return j===45?(e.consume(j),o.interrupt?t:A):n(j)}function h(j){const ge="CDATA[";return j===ge.charCodeAt(l++)?(e.consume(j),l===ge.length?o.interrupt?t:F:h):n(j)}function m(j){return xo(j)?(e.consume(j),i=String.fromCharCode(j),y):n(j)}function y(j){if(j===null||j===47||j===62||nn(j)){const ge=j===47,Oe=i.toLowerCase();return!ge&&!s&&dS.includes(Oe)?(r=1,o.interrupt?t(j):F(j)):bme.includes(i.toLowerCase())?(r=6,ge?(e.consume(j),v):o.interrupt?t(j):F(j)):(r=7,o.interrupt&&!o.parser.lazy[o.now().line]?n(j):s?k(j):b(j))}return j===45||Wo(j)?(e.consume(j),i+=String.fromCharCode(j),y):n(j)}function v(j){return j===62?(e.consume(j),o.interrupt?t:F):n(j)}function k(j){return Lt(j)?(e.consume(j),k):I(j)}function b(j){return j===47?(e.consume(j),I):j===58||j===95||xo(j)?(e.consume(j),$):Lt(j)?(e.consume(j),b):I(j)}function $(j){return j===45||j===46||j===58||j===95||Wo(j)?(e.consume(j),$):x(j)}function x(j){return j===61?(e.consume(j),E):Lt(j)?(e.consume(j),x):b(j)}function E(j){return j===null||j===60||j===61||j===62||j===96?n(j):j===34||j===39?(e.consume(j),a=j,M):Lt(j)?(e.consume(j),E):N(j)}function M(j){return j===a?(e.consume(j),a=null,P):j===null||ft(j)?n(j):(e.consume(j),M)}function N(j){return j===null||j===34||j===39||j===47||j===60||j===61||j===62||j===96||nn(j)?x(j):(e.consume(j),N)}function P(j){return j===47||j===62||Lt(j)?b(j):n(j)}function I(j){return j===62?(e.consume(j),V):n(j)}function V(j){return j===null||ft(j)?F(j):Lt(j)?(e.consume(j),V):n(j)}function F(j){return j===45&&r===2?(e.consume(j),U):j===60&&r===1?(e.consume(j),B):j===62&&r===4?(e.consume(j),X):j===63&&r===3?(e.consume(j),A):j===93&&r===5?(e.consume(j),L):ft(j)&&(r===6||r===7)?(e.exit("htmlFlowData"),e.check(Cme,re,Y)(j)):j===null||ft(j)?(e.exit("htmlFlowData"),Y(j)):(e.consume(j),F)}function Y(j){return e.check(kme,Z,re)(j)}function Z(j){return e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),K}function K(j){return j===null||ft(j)?Y(j):(e.enter("htmlFlowData"),F(j))}function U(j){return j===45?(e.consume(j),A):F(j)}function B(j){return j===47?(e.consume(j),i="",W):F(j)}function W(j){if(j===62){const ge=i.toLowerCase();return dS.includes(ge)?(e.consume(j),X):F(j)}return xo(j)&&i.length<8?(e.consume(j),i+=String.fromCharCode(j),W):F(j)}function L(j){return j===93?(e.consume(j),A):F(j)}function A(j){return j===62?(e.consume(j),X):j===45&&r===2?(e.consume(j),A):F(j)}function X(j){return j===null||ft(j)?(e.exit("htmlFlowData"),re(j)):(e.consume(j),X)}function re(j){return e.exit("htmlFlow"),t(j)}}function Eme(e,t,n){const o=this;return r;function r(i){return ft(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),s):n(i)}function s(i){return o.parser.lazy[o.now().line]?n(i):t(i)}}function xme(e,t,n){return o;function o(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(Eh,t,n)}}const Tme={name:"htmlText",tokenize:Mme};function Mme(e,t,n){const o=this;let r,s,i;return l;function l(A){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(A),a}function a(A){return A===33?(e.consume(A),u):A===47?(e.consume(A),x):A===63?(e.consume(A),b):xo(A)?(e.consume(A),N):n(A)}function u(A){return A===45?(e.consume(A),c):A===91?(e.consume(A),s=0,h):xo(A)?(e.consume(A),k):n(A)}function c(A){return A===45?(e.consume(A),p):n(A)}function d(A){return A===null?n(A):A===45?(e.consume(A),f):ft(A)?(i=d,B(A)):(e.consume(A),d)}function f(A){return A===45?(e.consume(A),p):d(A)}function p(A){return A===62?U(A):A===45?f(A):d(A)}function h(A){const X="CDATA[";return A===X.charCodeAt(s++)?(e.consume(A),s===X.length?m:h):n(A)}function m(A){return A===null?n(A):A===93?(e.consume(A),y):ft(A)?(i=m,B(A)):(e.consume(A),m)}function y(A){return A===93?(e.consume(A),v):m(A)}function v(A){return A===62?U(A):A===93?(e.consume(A),v):m(A)}function k(A){return A===null||A===62?U(A):ft(A)?(i=k,B(A)):(e.consume(A),k)}function b(A){return A===null?n(A):A===63?(e.consume(A),$):ft(A)?(i=b,B(A)):(e.consume(A),b)}function $(A){return A===62?U(A):b(A)}function x(A){return xo(A)?(e.consume(A),E):n(A)}function E(A){return A===45||Wo(A)?(e.consume(A),E):M(A)}function M(A){return ft(A)?(i=M,B(A)):Lt(A)?(e.consume(A),M):U(A)}function N(A){return A===45||Wo(A)?(e.consume(A),N):A===47||A===62||nn(A)?P(A):n(A)}function P(A){return A===47?(e.consume(A),U):A===58||A===95||xo(A)?(e.consume(A),I):ft(A)?(i=P,B(A)):Lt(A)?(e.consume(A),P):U(A)}function I(A){return A===45||A===46||A===58||A===95||Wo(A)?(e.consume(A),I):V(A)}function V(A){return A===61?(e.consume(A),F):ft(A)?(i=V,B(A)):Lt(A)?(e.consume(A),V):P(A)}function F(A){return A===null||A===60||A===61||A===62||A===96?n(A):A===34||A===39?(e.consume(A),r=A,Y):ft(A)?(i=F,B(A)):Lt(A)?(e.consume(A),F):(e.consume(A),Z)}function Y(A){return A===r?(e.consume(A),r=void 0,K):A===null?n(A):ft(A)?(i=Y,B(A)):(e.consume(A),Y)}function Z(A){return A===null||A===34||A===39||A===60||A===61||A===96?n(A):A===47||A===62||nn(A)?P(A):(e.consume(A),Z)}function K(A){return A===47||A===62||nn(A)?P(A):n(A)}function U(A){return A===62?(e.consume(A),e.exit("htmlTextData"),e.exit("htmlText"),t):n(A)}function B(A){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),W}function W(A){return Lt(A)?Bt(e,L,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):L(A)}function L(A){return e.enter("htmlTextData"),i(A)}}const sC={name:"labelEnd",tokenize:Lme,resolveTo:Pme,resolveAll:Nme},Ome={tokenize:Rme},Ime={tokenize:Dme},Ame={tokenize:Vme};function Nme(e){let t=-1;for(;++t<e.length;){const n=e[t][1];(n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd")&&(e.splice(t+1,n.type==="labelImage"?4:2),n.type="data",t++)}return e}function Pme(e,t){let n=e.length,o=0,r,s,i,l;for(;n--;)if(r=e[n][1],s){if(r.type==="link"||r.type==="labelLink"&&r._inactive)break;e[n][0]==="enter"&&r.type==="labelLink"&&(r._inactive=!0)}else if(i){if(e[n][0]==="enter"&&(r.type==="labelImage"||r.type==="labelLink")&&!r._balanced&&(s=n,r.type!=="labelLink")){o=2;break}}else r.type==="labelEnd"&&(i=n);const a={type:e[s][1].type==="labelLink"?"link":"image",start:Object.assign({},e[s][1].start),end:Object.assign({},e[e.length-1][1].end)},u={type:"label",start:Object.assign({},e[s][1].start),end:Object.assign({},e[i][1].end)},c={type:"labelText",start:Object.assign({},e[s+o+2][1].end),end:Object.assign({},e[i-2][1].start)};return l=[["enter",a,t],["enter",u,t]],l=xr(l,e.slice(s+1,s+o+3)),l=xr(l,[["enter",c,t]]),l=xr(l,iv(t.parser.constructs.insideSpan.null,e.slice(s+o+4,i-3),t)),l=xr(l,[["exit",c,t],e[i-2],e[i-1],["exit",u,t]]),l=xr(l,e.slice(i+1)),l=xr(l,[["exit",a,t]]),Rr(e,s,e.length,l),e}function Lme(e,t,n){const o=this;let r=o.events.length,s,i;for(;r--;)if((o.events[r][1].type==="labelImage"||o.events[r][1].type==="labelLink")&&!o.events[r][1]._balanced){s=o.events[r][1];break}return l;function l(f){return s?s._inactive?d(f):(i=o.parser.defined.includes(ds(o.sliceSerialize({start:s.end,end:o.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),a):n(f)}function a(f){return f===40?e.attempt(Ome,c,i?c:d)(f):f===91?e.attempt(Ime,c,i?u:d)(f):i?c(f):d(f)}function u(f){return e.attempt(Ame,c,d)(f)}function c(f){return t(f)}function d(f){return s._balanced=!0,n(f)}}function Rme(e,t,n){return o;function o(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),r}function r(d){return nn(d)?ep(e,s)(d):s(d)}function s(d){return d===41?c(d):kI(e,i,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function i(d){return nn(d)?ep(e,a)(d):c(d)}function l(d){return n(d)}function a(d){return d===34||d===39||d===40?$I(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):c(d)}function u(d){return nn(d)?ep(e,c)(d):c(d)}function c(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function Dme(e,t,n){const o=this;return r;function r(l){return SI.call(o,e,s,i,"reference","referenceMarker","referenceString")(l)}function s(l){return o.parser.defined.includes(ds(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function i(l){return n(l)}}function Vme(e,t,n){return o;function o(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),r}function r(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):n(s)}}const Fme={name:"labelStartImage",tokenize:Bme,resolveAll:sC.resolveAll};function Bme(e,t,n){const o=this;return r;function r(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),s}function s(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),i):n(l)}function i(l){return l===94&&"_hiddenFootnoteSupport"in o.parser.constructs?n(l):t(l)}}const zme={name:"labelStartLink",tokenize:jme,resolveAll:sC.resolveAll};function jme(e,t,n){const o=this;return r;function r(i){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(i),e.exit("labelMarker"),e.exit("labelLink"),s}function s(i){return i===94&&"_hiddenFootnoteSupport"in o.parser.constructs?n(i):t(i)}}const ky={name:"lineEnding",tokenize:Hme};function Hme(e,t){return n;function n(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Bt(e,t,"linePrefix")}}const g1={name:"thematicBreak",tokenize:Ume};function Ume(e,t,n){let o=0,r;return s;function s(u){return e.enter("thematicBreak"),i(u)}function i(u){return r=u,l(u)}function l(u){return u===r?(e.enter("thematicBreakSequence"),a(u)):o>=3&&(u===null||ft(u))?(e.exit("thematicBreak"),t(u)):n(u)}function a(u){return u===r?(e.consume(u),o++,a):(e.exit("thematicBreakSequence"),Lt(u)?Bt(e,l,"whitespace")(u):l(u))}}const Vo={name:"list",tokenize:qme,continuation:{tokenize:Gme},exit:Zme},Wme={tokenize:Jme,partial:!0},Kme={tokenize:Yme,partial:!0};function qme(e,t,n){const o=this,r=o.events[o.events.length-1];let s=r&&r[1].type==="linePrefix"?r[2].sliceSerialize(r[1],!0).length:0,i=0;return l;function l(p){const h=o.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(h==="listUnordered"?!o.containerState.marker||p===o.containerState.marker:Db(p)){if(o.containerState.type||(o.containerState.type=h,e.enter(h,{_container:!0})),h==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(g1,n,u)(p):u(p);if(!o.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),a(p)}return n(p)}function a(p){return Db(p)&&++i<10?(e.consume(p),a):(!o.interrupt||i<2)&&(o.containerState.marker?p===o.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),u(p)):n(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),o.containerState.marker=o.containerState.marker||p,e.check(Eh,o.interrupt?n:c,e.attempt(Wme,f,d))}function c(p){return o.containerState.initialBlankLine=!0,s++,f(p)}function d(p){return Lt(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),f):n(p)}function f(p){return o.containerState.size=s+o.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function Gme(e,t,n){const o=this;return o.containerState._closeFlow=void 0,e.check(Eh,r,s);function r(l){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,Bt(e,t,"listItemIndent",o.containerState.size+1)(l)}function s(l){return o.containerState.furtherBlankLines||!Lt(l)?(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,i(l)):(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,e.attempt(Kme,t,i)(l))}function i(l){return o.containerState._closeFlow=!0,o.interrupt=void 0,Bt(e,e.attempt(Vo,t,n),"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function Yme(e,t,n){const o=this;return Bt(e,r,"listItemIndent",o.containerState.size+1);function r(s){const i=o.events[o.events.length-1];return i&&i[1].type==="listItemIndent"&&i[2].sliceSerialize(i[1],!0).length===o.containerState.size?t(s):n(s)}}function Zme(e){e.exit(this.containerState.type)}function Jme(e,t,n){const o=this;return Bt(e,r,"listItemPrefixWhitespace",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4+1);function r(s){const i=o.events[o.events.length-1];return!Lt(s)&&i&&i[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const fS={name:"setextUnderline",tokenize:Qme,resolveTo:Xme};function Xme(e,t){let n=e.length,o,r,s;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){o=n;break}e[n][1].type==="paragraph"&&(r=n)}else e[n][1].type==="content"&&e.splice(n,1),!s&&e[n][1].type==="definition"&&(s=n);const i={type:"setextHeading",start:Object.assign({},e[r][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[r][1].type="setextHeadingText",s?(e.splice(r,0,["enter",i,t]),e.splice(s+1,0,["exit",e[o][1],t]),e[o][1].end=Object.assign({},e[s][1].end)):e[o][1]=i,e.push(["exit",i,t]),e}function Qme(e,t,n){const o=this;let r;return s;function s(u){let c=o.events.length,d;for(;c--;)if(o.events[c][1].type!=="lineEnding"&&o.events[c][1].type!=="linePrefix"&&o.events[c][1].type!=="content"){d=o.events[c][1].type==="paragraph";break}return!o.parser.lazy[o.now().line]&&(o.interrupt||d)?(e.enter("setextHeadingLine"),r=u,i(u)):n(u)}function i(u){return e.enter("setextHeadingLineSequence"),l(u)}function l(u){return u===r?(e.consume(u),l):(e.exit("setextHeadingLineSequence"),Lt(u)?Bt(e,a,"lineSuffix")(u):a(u))}function a(u){return u===null||ft(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const e1e={tokenize:t1e};function t1e(e){const t=this,n=e.attempt(Eh,o,e.attempt(this.parser.constructs.flowInitial,r,Bt(e,e.attempt(this.parser.constructs.flow,r,e.attempt(ime,r)),"linePrefix")));return n;function o(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const n1e={resolveAll:xI()},o1e=EI("string"),r1e=EI("text");function EI(e){return{tokenize:t,resolveAll:xI(e==="text"?s1e:void 0)};function t(n){const o=this,r=this.parser.constructs[e],s=n.attempt(r,i,l);return i;function i(c){return u(c)?s(c):l(c)}function l(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),a}function a(c){return u(c)?(n.exit("data"),s(c)):(n.consume(c),a)}function u(c){if(c===null)return!0;const d=r[c];let f=-1;if(d)for(;++f<d.length;){const p=d[f];if(!p.previous||p.previous.call(o,o.previous))return!0}return!1}}}function xI(e){return t;function t(n,o){let r=-1,s;for(;++r<=n.length;)s===void 0?n[r]&&n[r][1].type==="data"&&(s=r,r++):(!n[r]||n[r][1].type!=="data")&&(r!==s+2&&(n[s][1].end=n[r-1][1].end,n.splice(s+2,r-s-2),r=s+2),s=void 0);return e?e(n,o):n}}function s1e(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const o=e[n-1][1],r=t.sliceStream(o);let s=r.length,i=-1,l=0,a;for(;s--;){const u=r[s];if(typeof u=="string"){for(i=u.length;u.charCodeAt(i-1)===32;)l++,i--;if(i)break;i=-1}else if(u===-2)a=!0,l++;else if(u!==-1){s++;break}}if(l){const u={type:n===e.length||a||l<2?"lineSuffix":"hardBreakTrailing",start:{line:o.end.line,column:o.end.column-l,offset:o.end.offset-l,_index:o.start._index+s,_bufferIndex:s?i:o.start._bufferIndex+i},end:Object.assign({},o.end)};o.end=Object.assign({},u.start),o.start.offset===o.end.offset?Object.assign(o,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}function i1e(e,t,n){let o=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const r={},s=[];let i=[],l=[];const a={consume:k,enter:b,exit:$,attempt:M(x),check:M(E),interrupt:M(E,{interrupt:!0})},u={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:p,sliceSerialize:f,now:h,defineSkip:m,write:d};let c=t.tokenize.call(u,a);return t.resolveAll&&s.push(t),u;function d(V){return i=xr(i,V),y(),i[i.length-1]!==null?[]:(N(t,0),u.events=iv(s,u.events,u),u.events)}function f(V,F){return a1e(p(V),F)}function p(V){return l1e(i,V)}function h(){const{line:V,column:F,offset:Y,_index:Z,_bufferIndex:K}=o;return{line:V,column:F,offset:Y,_index:Z,_bufferIndex:K}}function m(V){r[V.line]=V.column,I()}function y(){let V;for(;o._index<i.length;){const F=i[o._index];if(typeof F=="string")for(V=o._index,o._bufferIndex<0&&(o._bufferIndex=0);o._index===V&&o._bufferIndex<F.length;)v(F.charCodeAt(o._bufferIndex));else v(F)}}function v(V){c=c(V)}function k(V){ft(V)?(o.line++,o.column=1,o.offset+=V===-3?2:1,I()):V!==-1&&(o.column++,o.offset++),o._bufferIndex<0?o._index++:(o._bufferIndex++,o._bufferIndex===i[o._index].length&&(o._bufferIndex=-1,o._index++)),u.previous=V}function b(V,F){const Y=F||{};return Y.type=V,Y.start=h(),u.events.push(["enter",Y,u]),l.push(Y),Y}function $(V){const F=l.pop();return F.end=h(),u.events.push(["exit",F,u]),F}function x(V,F){N(V,F.from)}function E(V,F){F.restore()}function M(V,F){return Y;function Y(Z,K,U){let B,W,L,A;return Array.isArray(Z)?re(Z):"tokenize"in Z?re([Z]):X(Z);function X(xe){return te;function te(fe){const ve=fe!==null&&xe[fe],le=fe!==null&&xe.null,Ae=[...Array.isArray(ve)?ve:ve?[ve]:[],...Array.isArray(le)?le:le?[le]:[]];return re(Ae)(fe)}}function re(xe){return B=xe,W=0,xe.length===0?U:j(xe[W])}function j(xe){return te;function te(fe){return A=P(),L=xe,xe.partial||(u.currentConstruct=xe),xe.name&&u.parser.constructs.disable.null.includes(xe.name)?Oe():xe.tokenize.call(F?Object.assign(Object.create(u),F):u,a,ge,Oe)(fe)}}function ge(xe){return V(L,A),K}function Oe(xe){return A.restore(),++W<B.length?j(B[W]):U}}}function N(V,F){V.resolveAll&&!s.includes(V)&&s.push(V),V.resolve&&Rr(u.events,F,u.events.length-F,V.resolve(u.events.slice(F),u)),V.resolveTo&&(u.events=V.resolveTo(u.events,u))}function P(){const V=h(),F=u.previous,Y=u.currentConstruct,Z=u.events.length,K=Array.from(l);return{restore:U,from:Z};function U(){o=V,u.previous=F,u.currentConstruct=Y,u.events.length=Z,l=K,I()}}function I(){o.line in r&&o.column<2&&(o.column=r[o.line],o.offset+=r[o.line]-1)}}function l1e(e,t){const n=t.start._index,o=t.start._bufferIndex,r=t.end._index,s=t.end._bufferIndex;let i;if(n===r)i=[e[n].slice(o,s)];else{if(i=e.slice(n,r),o>-1){const l=i[0];typeof l=="string"?i[0]=l.slice(o):i.shift()}s>0&&i.push(e[r].slice(0,s))}return i}function a1e(e,t){let n=-1;const o=[];let r;for(;++n<e.length;){const s=e[n];let i;if(typeof s=="string")i=s;else switch(s){case-5:{i="\r";break}case-4:{i=` |
| 80 |
`;break}case-3:{i=`\r |
| 81 |
`;break}case-2:{i=t?" ":" ";break}case-1:{if(!t&&r)continue;i=" ";break}default:i=String.fromCharCode(s)}r=s===-2,o.push(i)}return o.join("")}const u1e={42:Vo,43:Vo,45:Vo,48:Vo,49:Vo,50:Vo,51:Vo,52:Vo,53:Vo,54:Vo,55:Vo,56:Vo,57:Vo,62:_I},c1e={91:dme},d1e={[-2]:Cy,[-1]:Cy,32:Cy},f1e={35:vme,42:g1,45:[fS,g1],60:wme,61:fS,95:g1,96:cS,126:cS},p1e={38:wI,92:bI},h1e={[-5]:ky,[-4]:ky,[-3]:ky,33:Fme,38:wI,42:Vb,60:[zhe,Tme],91:zme,92:[mme,bI],93:sC,95:Vb,96:eme},m1e={null:[Vb,n1e]},g1e={null:[42,95]},v1e={null:[]},y1e=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:g1e,contentInitial:c1e,disable:v1e,document:u1e,flow:f1e,flowInitial:d1e,insideSpan:m1e,string:p1e,text:h1e},Symbol.toStringTag,{value:"Module"}));function _1e(e){const n=vI([y1e,...(e||{}).extensions||[]]),o={defined:[],lazy:{},constructs:n,content:r(Phe),document:r(Rhe),flow:r(e1e),string:r(o1e),text:r(r1e)};return o;function r(s){return i;function i(l){return i1e(o,s,l)}}}function b1e(e){for(;!CI(e););return e}const pS=/[\0\t\n\r]/g;function w1e(){let e=1,t="",n=!0,o;return r;function r(s,i,l){const a=[];let u,c,d,f,p;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(i||void 0).decode(s)),d=0,t="",n&&(s.charCodeAt(0)===65279&&d++,n=void 0);d<s.length;){if(pS.lastIndex=d,u=pS.exec(s),f=u&&u.index!==void 0?u.index:s.length,p=s.charCodeAt(f),!u){t=s.slice(d);break}if(p===10&&d===f&&o)a.push(-3),o=void 0;else switch(o&&(a.push(-5),o=void 0),d<f&&(a.push(s.slice(d,f)),e+=f-d),p){case 0:{a.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,a.push(-2);e++<c;)a.push(-1);break}case 10:{a.push(-4),e=1;break}default:o=!0,e=1}d=f+1}return l&&(o&&a.push(-5),t&&a.push(t),a.push(null)),a}}const C1e=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function TI(e){return e.replace(C1e,k1e)}function k1e(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const r=n.charCodeAt(1),s=r===120||r===88;return yI(n.slice(s?2:1),s?16:10)}return rC(n)||e}function tp(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?hS(e.position):"start"in e||"end"in e?hS(e):"line"in e||"column"in e?Fb(e):""}function Fb(e){return mS(e&&e.line)+":"+mS(e&&e.column)}function hS(e){return Fb(e&&e.start)+"-"+Fb(e&&e.end)}function mS(e){return e&&typeof e=="number"?e:1}const MI={}.hasOwnProperty;function S1e(e,t,n){return typeof t!="string"&&(n=t,t=void 0),$1e(n)(b1e(_1e(n).document().write(w1e()(e,t,!0))))}function $1e(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Le),autolinkProtocol:P,autolinkEmail:P,atxHeading:s(ue),blockQuote:s(le),characterEscape:P,characterReference:P,codeFenced:s(Ae),codeFencedFenceInfo:i,codeFencedFenceMeta:i,codeIndented:s(Ae,i),codeText:s(Ge,i),codeTextData:P,data:P,codeFlowValue:P,definition:s(G),definitionDestinationString:i,definitionLabelString:i,definitionTitleString:i,emphasis:s(J),hardBreakEscape:s(_e),hardBreakTrailing:s(_e),htmlFlow:s(ye,i),htmlFlowData:P,htmlText:s(ye,i),htmlTextData:P,image:s(Ne),label:i,link:s(Le),listItem:s(Pe),listItemValue:f,listOrdered:s(Ee,d),listUnordered:s(Ee),paragraph:s(me),reference:j,referenceString:i,resourceDestinationString:i,resourceTitleString:i,setextHeading:s(ue),strong:s(Ue),thematicBreak:s(ce)},exit:{atxHeading:a(),atxHeadingSequence:x,autolink:a(),autolinkEmail:ve,autolinkProtocol:fe,blockQuote:a(),characterEscapeValue:I,characterReferenceMarkerHexadecimal:Oe,characterReferenceMarkerNumeric:Oe,characterReferenceValue:xe,characterReference:te,codeFenced:a(y),codeFencedFence:m,codeFencedFenceInfo:p,codeFencedFenceMeta:h,codeFlowValue:I,codeIndented:a(v),codeText:a(K),codeTextData:I,data:I,definition:a(),definitionDestinationString:$,definitionLabelString:k,definitionTitleString:b,emphasis:a(),hardBreakEscape:a(F),hardBreakTrailing:a(F),htmlFlow:a(Y),htmlFlowData:I,htmlText:a(Z),htmlTextData:I,image:a(B),label:L,labelText:W,lineEnding:V,link:a(U),listItem:a(),listOrdered:a(),listUnordered:a(),paragraph:a(),referenceString:ge,resourceDestinationString:A,resourceTitleString:X,resource:re,setextHeading:a(N),setextHeadingLineSequence:M,setextHeadingText:E,strong:a(),thematicBreak:a()}};OI(t,(e||{}).mdastExtensions||[]);const n={};return o;function o(oe){let pe={type:"root",children:[]};const ze={stack:[pe],tokenStack:[],config:t,enter:l,exit:u,buffer:i,resume:c,data:n},Qe=[];let $e=-1;for(;++$e<oe.length;)if(oe[$e][1].type==="listOrdered"||oe[$e][1].type==="listUnordered")if(oe[$e][0]==="enter")Qe.push($e);else{const ie=Qe.pop();$e=r(oe,ie,$e)}for($e=-1;++$e<oe.length;){const ie=t[oe[$e][0]];MI.call(ie,oe[$e][1].type)&&ie[oe[$e][1].type].call(Object.assign({sliceSerialize:oe[$e][2].sliceSerialize},ze),oe[$e][1])}if(ze.tokenStack.length>0){const ie=ze.tokenStack[ze.tokenStack.length-1];(ie[1]||gS).call(ze,void 0,ie[0])}for(pe.position={start:Xi(oe.length>0?oe[0][1].start:{line:1,column:1,offset:0}),end:Xi(oe.length>0?oe[oe.length-2][1].end:{line:1,column:1,offset:0})},$e=-1;++$e<t.transforms.length;)pe=t.transforms[$e](pe)||pe;return pe}function r(oe,pe,ze){let Qe=pe-1,$e=-1,ie=!1,we,ae,Se,Ve;for(;++Qe<=ze;){const st=oe[Qe];switch(st[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{st[0]==="enter"?$e++:$e--,Ve=void 0;break}case"lineEndingBlank":{st[0]==="enter"&&(we&&!Ve&&!$e&&!Se&&(Se=Qe),Ve=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ve=void 0}if(!$e&&st[0]==="enter"&&st[1].type==="listItemPrefix"||$e===-1&&st[0]==="exit"&&(st[1].type==="listUnordered"||st[1].type==="listOrdered")){if(we){let se=Qe;for(ae=void 0;se--;){const De=oe[se];if(De[1].type==="lineEnding"||De[1].type==="lineEndingBlank"){if(De[0]==="exit")continue;ae&&(oe[ae][1].type="lineEndingBlank",ie=!0),De[1].type="lineEnding",ae=se}else if(!(De[1].type==="linePrefix"||De[1].type==="blockQuotePrefix"||De[1].type==="blockQuotePrefixWhitespace"||De[1].type==="blockQuoteMarker"||De[1].type==="listItemIndent"))break}Se&&(!ae||Se<ae)&&(we._spread=!0),we.end=Object.assign({},ae?oe[ae][1].start:st[1].end),oe.splice(ae||Qe,0,["exit",we,st[2]]),Qe++,ze++}if(st[1].type==="listItemPrefix"){const se={type:"listItem",_spread:!1,start:Object.assign({},st[1].start),end:void 0};we=se,oe.splice(Qe,0,["enter",se,st[2]]),Qe++,ze++,Se=void 0,Ve=!0}}}return oe[pe][1]._spread=ie,ze}function s(oe,pe){return ze;function ze(Qe){l.call(this,oe(Qe),Qe),pe&&pe.call(this,Qe)}}function i(){this.stack.push({type:"fragment",children:[]})}function l(oe,pe,ze){this.stack[this.stack.length-1].children.push(oe),this.stack.push(oe),this.tokenStack.push([pe,ze]),oe.position={start:Xi(pe.start),end:void 0}}function a(oe){return pe;function pe(ze){oe&&oe.call(this,ze),u.call(this,ze)}}function u(oe,pe){const ze=this.stack.pop(),Qe=this.tokenStack.pop();if(Qe)Qe[0].type!==oe.type&&(pe?pe.call(this,oe,Qe[0]):(Qe[1]||gS).call(this,oe,Qe[0]));else throw new Error("Cannot close `"+oe.type+"` ("+tp({start:oe.start,end:oe.end})+"): it’s not open");ze.position.end=Xi(oe.end)}function c(){return oC(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(oe){if(this.data.expectingFirstListItemValue){const pe=this.stack[this.stack.length-2];pe.start=Number.parseInt(this.sliceSerialize(oe),10),this.data.expectingFirstListItemValue=void 0}}function p(){const oe=this.resume(),pe=this.stack[this.stack.length-1];pe.lang=oe}function h(){const oe=this.resume(),pe=this.stack[this.stack.length-1];pe.meta=oe}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){const oe=this.resume(),pe=this.stack[this.stack.length-1];pe.value=oe.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function v(){const oe=this.resume(),pe=this.stack[this.stack.length-1];pe.value=oe.replace(/(\r?\n|\r)$/g,"")}function k(oe){const pe=this.resume(),ze=this.stack[this.stack.length-1];ze.label=pe,ze.identifier=ds(this.sliceSerialize(oe)).toLowerCase()}function b(){const oe=this.resume(),pe=this.stack[this.stack.length-1];pe.title=oe}function $(){const oe=this.resume(),pe=this.stack[this.stack.length-1];pe.url=oe}function x(oe){const pe=this.stack[this.stack.length-1];if(!pe.depth){const ze=this.sliceSerialize(oe).length;pe.depth=ze}}function E(){this.data.setextHeadingSlurpLineEnding=!0}function M(oe){const pe=this.stack[this.stack.length-1];pe.depth=this.sliceSerialize(oe).codePointAt(0)===61?1:2}function N(){this.data.setextHeadingSlurpLineEnding=void 0}function P(oe){const ze=this.stack[this.stack.length-1].children;let Qe=ze[ze.length-1];(!Qe||Qe.type!=="text")&&(Qe=Xe(),Qe.position={start:Xi(oe.start),end:void 0},ze.push(Qe)),this.stack.push(Qe)}function I(oe){const pe=this.stack.pop();pe.value+=this.sliceSerialize(oe),pe.position.end=Xi(oe.end)}function V(oe){const pe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ze=pe.children[pe.children.length-1];ze.position.end=Xi(oe.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(pe.type)&&(P.call(this,oe),I.call(this,oe))}function F(){this.data.atHardBreak=!0}function Y(){const oe=this.resume(),pe=this.stack[this.stack.length-1];pe.value=oe}function Z(){const oe=this.resume(),pe=this.stack[this.stack.length-1];pe.value=oe}function K(){const oe=this.resume(),pe=this.stack[this.stack.length-1];pe.value=oe}function U(){const oe=this.stack[this.stack.length-1];if(this.data.inReference){const pe=this.data.referenceType||"shortcut";oe.type+="Reference",oe.referenceType=pe,delete oe.url,delete oe.title}else delete oe.identifier,delete oe.label;this.data.referenceType=void 0}function B(){const oe=this.stack[this.stack.length-1];if(this.data.inReference){const pe=this.data.referenceType||"shortcut";oe.type+="Reference",oe.referenceType=pe,delete oe.url,delete oe.title}else delete oe.identifier,delete oe.label;this.data.referenceType=void 0}function W(oe){const pe=this.sliceSerialize(oe),ze=this.stack[this.stack.length-2];ze.label=TI(pe),ze.identifier=ds(pe).toLowerCase()}function L(){const oe=this.stack[this.stack.length-1],pe=this.resume(),ze=this.stack[this.stack.length-1];if(this.data.inReference=!0,ze.type==="link"){const Qe=oe.children;ze.children=Qe}else ze.alt=pe}function A(){const oe=this.resume(),pe=this.stack[this.stack.length-1];pe.url=oe}function X(){const oe=this.resume(),pe=this.stack[this.stack.length-1];pe.title=oe}function re(){this.data.inReference=void 0}function j(){this.data.referenceType="collapsed"}function ge(oe){const pe=this.resume(),ze=this.stack[this.stack.length-1];ze.label=pe,ze.identifier=ds(this.sliceSerialize(oe)).toLowerCase(),this.data.referenceType="full"}function Oe(oe){this.data.characterReferenceType=oe.type}function xe(oe){const pe=this.sliceSerialize(oe),ze=this.data.characterReferenceType;let Qe;ze?(Qe=yI(pe,ze==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Qe=rC(pe);const $e=this.stack[this.stack.length-1];$e.value+=Qe}function te(oe){const pe=this.stack.pop();pe.position.end=Xi(oe.end)}function fe(oe){I.call(this,oe);const pe=this.stack[this.stack.length-1];pe.url=this.sliceSerialize(oe)}function ve(oe){I.call(this,oe);const pe=this.stack[this.stack.length-1];pe.url="mailto:"+this.sliceSerialize(oe)}function le(){return{type:"blockquote",children:[]}}function Ae(){return{type:"code",lang:null,meta:null,value:""}}function Ge(){return{type:"inlineCode",value:""}}function G(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function J(){return{type:"emphasis",children:[]}}function ue(){return{type:"heading",depth:0,children:[]}}function _e(){return{type:"break"}}function ye(){return{type:"html",value:""}}function Ne(){return{type:"image",title:null,url:"",alt:null}}function Le(){return{type:"link",title:null,url:"",children:[]}}function Ee(oe){return{type:"list",ordered:oe.type==="listOrdered",start:null,spread:oe._spread,children:[]}}function Pe(oe){return{type:"listItem",spread:oe._spread,checked:null,children:[]}}function me(){return{type:"paragraph",children:[]}}function Ue(){return{type:"strong",children:[]}}function Xe(){return{type:"text",value:""}}function ce(){return{type:"thematicBreak"}}}function Xi(e){return{line:e.line,column:e.column,offset:e.offset}}function OI(e,t){let n=-1;for(;++n<t.length;){const o=t[n];Array.isArray(o)?OI(e,o):E1e(e,o)}}function E1e(e,t){let n;for(n in t)if(MI.call(t,n))switch(n){case"canContainEols":{const o=t[n];o&&e[n].push(...o);break}case"transforms":{const o=t[n];o&&e[n].push(...o);break}case"enter":case"exit":{const o=t[n];o&&Object.assign(e[n],o);break}}}function gS(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+tp({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+tp({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+tp({start:t.start,end:t.end})+") is still open")}function Bb(e){const t=this;t.parser=n;function n(o){return S1e(o,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}const vS={}.hasOwnProperty;function x1e(e,t){const n=t||{};function o(r,...s){let i=o.invalid;const l=o.handlers;if(r&&vS.call(r,e)){const a=String(r[e]);i=vS.call(l,a)?l[a]:o.unknown}if(i)return i.call(this,r,...s)}return o.handlers=n.handlers||{},o.invalid=n.invalid,o.unknown=n.unknown,o}const T1e={}.hasOwnProperty;function II(e,t){let n=-1,o;if(t.extensions)for(;++n<t.extensions.length;)II(e,t.extensions[n]);for(o in t)if(T1e.call(t,o))switch(o){case"extensions":break;case"unsafe":{yS(e[o],t[o]);break}case"join":{yS(e[o],t[o]);break}case"handlers":{M1e(e[o],t[o]);break}default:e.options[o]=t[o]}return e}function yS(e,t){t&&e.push(...t)}function M1e(e,t){t&&Object.assign(e,t)}function O1e(e,t,n,o){const r=n.enter("blockquote"),s=n.createTracker(o);s.move("> "),s.shift(2);const i=n.indentLines(n.containerFlow(e,s.current()),I1e);return r(),i}function I1e(e,t,n){return">"+(n?"":" ")+e}function AI(e,t){return _S(e,t.inConstruct,!0)&&!_S(e,t.notInConstruct,!1)}function _S(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let o=-1;for(;++o<t.length;)if(e.includes(t[o]))return!0;return!1}function bS(e,t,n,o){let r=-1;for(;++r<n.unsafe.length;)if(n.unsafe[r].character===` |
| 82 |
`&&AI(n.stack,n.unsafe[r]))return/[ \t]/.test(o.before)?"":" ";return`\\ |
| 83 |
`}function A1e(e,t){const n=String(e);let o=n.indexOf(t),r=o,s=0,i=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;o!==-1;)o===r?++s>i&&(i=s):s=1,r=o+t.length,o=n.indexOf(t,r);return i}function zb(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function N1e(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function P1e(e,t,n,o){const r=N1e(n),s=e.value||"",i=r==="`"?"GraveAccent":"Tilde";if(zb(e,n)){const d=n.enter("codeIndented"),f=n.indentLines(s,L1e);return d(),f}const l=n.createTracker(o),a=r.repeat(Math.max(A1e(s,r)+1,3)),u=n.enter("codeFenced");let c=l.move(a);if(e.lang){const d=n.enter(`codeFencedLang${i}`);c+=l.move(n.safe(e.lang,{before:c,after:" ",encode:["`"],...l.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${i}`);c+=l.move(" "),c+=l.move(n.safe(e.meta,{before:c,after:` |
| 84 |
`,encode:["`"],...l.current()})),d()}return c+=l.move(` |
| 85 |
`),s&&(c+=l.move(s+` |
| 86 |
`)),c+=l.move(a),u(),c}function L1e(e,t,n){return(n?"":" ")+e}function iC(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function R1e(e,t,n,o){const r=iC(n),s=r==='"'?"Quote":"Apostrophe",i=n.enter("definition");let l=n.enter("label");const a=n.createTracker(o);let u=a.move("[");return u+=a.move(n.safe(n.associationId(e),{before:u,after:"]",...a.current()})),u+=a.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(l=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":` |
| 87 |
`,...a.current()}))),l(),e.title&&(l=n.enter(`title${s}`),u+=a.move(" "+r),u+=a.move(n.safe(e.title,{before:u,after:r,...a.current()})),u+=a.move(r),l()),i(),u}function D1e(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}NI.peek=V1e;function NI(e,t,n,o){const r=D1e(n),s=n.enter("emphasis"),i=n.createTracker(o);let l=i.move(r);return l+=i.move(n.containerPhrasing(e,{before:l,after:r,...i.current()})),l+=i.move(r),s(),l}function V1e(e,t,n){return n.options.emphasis||"*"}const lv=function(e){if(e==null)return j1e;if(typeof e=="function")return av(e);if(typeof e=="object")return Array.isArray(e)?F1e(e):B1e(e);if(typeof e=="string")return z1e(e);throw new Error("Expected function, string, or object as test")};function F1e(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=lv(e[n]);return av(o);function o(...r){let s=-1;for(;++s<t.length;)if(t[s].apply(this,r))return!0;return!1}}function B1e(e){const t=e;return av(n);function n(o){const r=o;let s;for(s in e)if(r[s]!==t[s])return!1;return!0}}function z1e(e){return av(t);function t(n){return n&&n.type===e}}function av(e){return t;function t(n,o,r){return!!(H1e(n)&&e.call(this,n,typeof o=="number"?o:void 0,r||void 0))}}function j1e(){return!0}function H1e(e){return e!==null&&typeof e=="object"&&"type"in e}const PI=[],U1e=!0,jb=!1,Hb="skip";function LI(e,t,n,o){let r;typeof t=="function"&&typeof n!="function"?(o=n,n=t):r=t;const s=lv(r),i=o?-1:1;l(e,void 0,[])();function l(a,u,c){const d=a&&typeof a=="object"?a:{};if(typeof d.type=="string"){const p=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(a.type+(p?"<"+p+">":""))+")"})}return f;function f(){let p=PI,h,m,y;if((!t||s(a,u,c[c.length-1]||void 0))&&(p=W1e(n(a,c)),p[0]===jb))return p;if("children"in a&&a.children){const v=a;if(v.children&&p[0]!==Hb)for(m=(o?v.children.length:-1)+i,y=c.concat(v);m>-1&&m<v.children.length;){const k=v.children[m];if(h=l(k,m,y)(),h[0]===jb)return h;m=typeof h[1]=="number"?h[1]:m+i}}return p}}}function W1e(e){return Array.isArray(e)?e:typeof e=="number"?[U1e,e]:e==null?PI:[e]}function Od(e,t,n,o){let r,s,i;typeof t=="function"&&typeof n!="function"?(s=void 0,i=t,r=n):(s=t,i=n,r=o),LI(e,s,l,r);function l(a,u){const c=u[u.length-1],d=c?c.children.indexOf(a):void 0;return i(a,d,c)}}function RI(e,t){let n=!1;return Od(e,function(o){if("value"in o&&/\r?\n|\r/.test(o.value)||o.type==="break")return n=!0,jb}),!!((!e.depth||e.depth<3)&&oC(e)&&(t.options.setext||n))}function K1e(e,t,n,o){const r=Math.max(Math.min(6,e.depth||1),1),s=n.createTracker(o);if(RI(e,n)){const c=n.enter("headingSetext"),d=n.enter("phrasing"),f=n.containerPhrasing(e,{...s.current(),before:` |
| 88 |
`,after:` |
| 89 |
`});return d(),c(),f+` |
| 90 |
`+(r===1?"=":"-").repeat(f.length-(Math.max(f.lastIndexOf("\r"),f.lastIndexOf(` |
| 91 |
`))+1))}const i="#".repeat(r),l=n.enter("headingAtx"),a=n.enter("phrasing");s.move(i+" ");let u=n.containerPhrasing(e,{before:"# ",after:` |
| 92 |
`,...s.current()});return/^[\t ]/.test(u)&&(u="&#x"+u.charCodeAt(0).toString(16).toUpperCase()+";"+u.slice(1)),u=u?i+" "+u:i,n.options.closeAtx&&(u+=" "+i),a(),l(),u}DI.peek=q1e;function DI(e){return e.value||""}function q1e(){return"<"}VI.peek=G1e;function VI(e,t,n,o){const r=iC(n),s=r==='"'?"Quote":"Apostrophe",i=n.enter("image");let l=n.enter("label");const a=n.createTracker(o);let u=a.move("![");return u+=a.move(n.safe(e.alt,{before:u,after:"]",...a.current()})),u+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(l=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${s}`),u+=a.move(" "+r),u+=a.move(n.safe(e.title,{before:u,after:r,...a.current()})),u+=a.move(r),l()),u+=a.move(")"),i(),u}function G1e(){return"!"}FI.peek=Y1e;function FI(e,t,n,o){const r=e.referenceType,s=n.enter("imageReference");let i=n.enter("label");const l=n.createTracker(o);let a=l.move("![");const u=n.safe(e.alt,{before:a,after:"]",...l.current()});a+=l.move(u+"]["),i();const c=n.stack;n.stack=[],i=n.enter("reference");const d=n.safe(n.associationId(e),{before:a,after:"]",...l.current()});return i(),n.stack=c,s(),r==="full"||!u||u!==d?a+=l.move(d+"]"):r==="shortcut"?a=a.slice(0,-1):a+=l.move("]"),a}function Y1e(){return"!"}BI.peek=Z1e;function BI(e,t,n){let o=e.value||"",r="`",s=-1;for(;new RegExp("(^|[^`])"+r+"([^`]|$)").test(o);)r+="`";for(/[^ \r\n]/.test(o)&&(/^[ \r\n]/.test(o)&&/[ \r\n]$/.test(o)||/^`|`$/.test(o))&&(o=" "+o+" ");++s<n.unsafe.length;){const i=n.unsafe[s],l=n.compilePattern(i);let a;if(i.atBreak)for(;a=l.exec(o);){let u=a.index;o.charCodeAt(u)===10&&o.charCodeAt(u-1)===13&&u--,o=o.slice(0,u)+" "+o.slice(a.index+1)}}return r+o+r}function Z1e(){return"`"}function zI(e,t){const n=oC(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}jI.peek=J1e;function jI(e,t,n,o){const r=iC(n),s=r==='"'?"Quote":"Apostrophe",i=n.createTracker(o);let l,a;if(zI(e,n)){const c=n.stack;n.stack=[],l=n.enter("autolink");let d=i.move("<");return d+=i.move(n.containerPhrasing(e,{before:d,after:">",...i.current()})),d+=i.move(">"),l(),n.stack=c,d}l=n.enter("link"),a=n.enter("label");let u=i.move("[");return u+=i.move(n.containerPhrasing(e,{before:u,after:"](",...i.current()})),u+=i.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),u+=i.move("<"),u+=i.move(n.safe(e.url,{before:u,after:">",...i.current()})),u+=i.move(">")):(a=n.enter("destinationRaw"),u+=i.move(n.safe(e.url,{before:u,after:e.title?" ":")",...i.current()}))),a(),e.title&&(a=n.enter(`title${s}`),u+=i.move(" "+r),u+=i.move(n.safe(e.title,{before:u,after:r,...i.current()})),u+=i.move(r),a()),u+=i.move(")"),l(),u}function J1e(e,t,n){return zI(e,n)?"<":"["}HI.peek=X1e;function HI(e,t,n,o){const r=e.referenceType,s=n.enter("linkReference");let i=n.enter("label");const l=n.createTracker(o);let a=l.move("[");const u=n.containerPhrasing(e,{before:a,after:"]",...l.current()});a+=l.move(u+"]["),i();const c=n.stack;n.stack=[],i=n.enter("reference");const d=n.safe(n.associationId(e),{before:a,after:"]",...l.current()});return i(),n.stack=c,s(),r==="full"||!u||u!==d?a+=l.move(d+"]"):r==="shortcut"?a=a.slice(0,-1):a+=l.move("]"),a}function X1e(){return"["}function lC(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Q1e(e){const t=lC(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function ege(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function UI(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function tge(e,t,n,o){const r=n.enter("list"),s=n.bulletCurrent;let i=e.ordered?ege(n):lC(n);const l=e.ordered?i==="."?")":".":Q1e(n);let a=t&&n.bulletLastUsed?i===n.bulletLastUsed:!1;if(!e.ordered){const c=e.children?e.children[0]:void 0;if((i==="*"||i==="-")&&c&&(!c.children||!c.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(a=!0),UI(n)===i&&c){let d=-1;for(;++d<e.children.length;){const f=e.children[d];if(f&&f.type==="listItem"&&f.children&&f.children[0]&&f.children[0].type==="thematicBreak"){a=!0;break}}}}a&&(i=l),n.bulletCurrent=i;const u=n.containerFlow(e,o);return n.bulletLastUsed=i,n.bulletCurrent=s,r(),u}function nge(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function oge(e,t,n,o){const r=nge(n);let s=n.bulletCurrent||lC(n);t&&t.type==="list"&&t.ordered&&(s=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let i=s.length+1;(r==="tab"||r==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(i=Math.ceil(i/4)*4);const l=n.createTracker(o);l.move(s+" ".repeat(i-s.length)),l.shift(i);const a=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,l.current()),c);return a(),u;function c(d,f,p){return f?(p?"":" ".repeat(i))+d:(p?s:s+" ".repeat(i-s.length))+d}}function rge(e,t,n,o){const r=n.enter("paragraph"),s=n.enter("phrasing"),i=n.containerPhrasing(e,o);return s(),r(),i}const sge=lv(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function ige(e,t,n,o){return(e.children.some(function(i){return sge(i)})?n.containerPhrasing:n.containerFlow).call(n,e,o)}function lge(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}WI.peek=age;function WI(e,t,n,o){const r=lge(n),s=n.enter("strong"),i=n.createTracker(o);let l=i.move(r+r);return l+=i.move(n.containerPhrasing(e,{before:l,after:r,...i.current()})),l+=i.move(r+r),s(),l}function age(e,t,n){return n.options.strong||"*"}function uge(e,t,n,o){return n.safe(e.value,o)}function cge(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function dge(e,t,n){const o=(UI(n)+(n.options.ruleSpaces?" ":"")).repeat(cge(n));return n.options.ruleSpaces?o.slice(0,-1):o}const aC={blockquote:O1e,break:bS,code:P1e,definition:R1e,emphasis:NI,hardBreak:bS,heading:K1e,html:DI,image:VI,imageReference:FI,inlineCode:BI,link:jI,linkReference:HI,list:tge,listItem:oge,paragraph:rge,root:ige,strong:WI,text:uge,thematicBreak:dge},fge=[pge];function pge(e,t,n,o){if(t.type==="code"&&zb(t,o)&&(e.type==="list"||e.type===t.type&&zb(e,o)))return!1;if("spread"in n&&typeof n.spread=="boolean")return e.type==="paragraph"&&(e.type===t.type||t.type==="definition"||t.type==="heading"&&RI(t,o))?void 0:n.spread?1:0}const ma=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],hge=[{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"\r",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:` |
| 93 |
`,inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"!",after:"\\[",inConstruct:"phrasing",notInConstruct:ma},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:`(?:[\r |
| 94 |
]|$)`},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:ma},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:`(?:[ \r |
| 95 |
*])`},{character:"*",inConstruct:"phrasing",notInConstruct:ma},{atBreak:!0,character:"+",after:`(?:[ \r |
| 96 |
])`},{atBreak:!0,character:"-",after:`(?:[ \r |
| 97 |
-])`},{atBreak:!0,before:"\\d+",character:".",after:`(?:[ \r |
| 98 |
]|$)`},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:ma},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:ma},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:ma},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:ma},{atBreak:!0,character:"~"}];function mge(e){return e.label||!e.identifier?e.label||"":TI(e.identifier)}function gge(e){if(!e._compiled){const t=(e.atBreak?"[\\r\\n][\\t ]*":"")+(e.before?"(?:"+e.before+")":"");e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(e.after?"(?:"+e.after+")":""),"g")}return e._compiled}function vge(e,t,n){const o=t.indexStack,r=e.children||[],s=[];let i=-1,l=n.before;o.push(-1);let a=t.createTracker(n);for(;++i<r.length;){const u=r[i];let c;if(o[o.length-1]=i,i+1<r.length){let d=t.handle.handlers[r[i+1].type];d&&d.peek&&(d=d.peek),c=d?d(r[i+1],e,t,{before:"",after:"",...a.current()}).charAt(0):""}else c=n.after;s.length>0&&(l==="\r"||l===` |
| 99 |
`)&&u.type==="html"&&(s[s.length-1]=s[s.length-1].replace(/(\r?\n|\r)$/," "),l=" ",a=t.createTracker(n),a.move(s.join(""))),s.push(a.move(t.handle(u,e,t,{...a.current(),before:l,after:c}))),l=s[s.length-1].slice(-1)}return o.pop(),s.join("")}function yge(e,t,n){const o=t.indexStack,r=e.children||[],s=t.createTracker(n),i=[];let l=-1;for(o.push(-1);++l<r.length;){const a=r[l];o[o.length-1]=l,i.push(s.move(t.handle(a,e,t,{before:` |
| 100 |
`,after:` |
| 101 |
`,...s.current()}))),a.type!=="list"&&(t.bulletLastUsed=void 0),l<r.length-1&&i.push(s.move(_ge(a,r[l+1],e,t)))}return o.pop(),i.join("")}function _ge(e,t,n,o){let r=o.join.length;for(;r--;){const s=o.join[r](e,t,n,o);if(s===!0||s===1)break;if(typeof s=="number")return` |
| 102 |
`.repeat(1+s);if(s===!1)return` |
| 103 |
|
| 104 |
<!----> |
| 105 |
|
| 106 |
`}return` |
| 107 |
|
| 108 |
`}const bge=/\r?\n|\r/g;function wge(e,t){const n=[];let o=0,r=0,s;for(;s=bge.exec(e);)i(e.slice(o,s.index)),n.push(s[0]),o=s.index+s[0].length,r++;return i(e.slice(o)),n.join("");function i(l){n.push(t(l,r,!l))}}function Cge(e,t,n){const o=(n.before||"")+(t||"")+(n.after||""),r=[],s=[],i={};let l=-1;for(;++l<e.unsafe.length;){const c=e.unsafe[l];if(!AI(e.stack,c))continue;const d=e.compilePattern(c);let f;for(;f=d.exec(o);){const p="before"in c||!!c.atBreak,h="after"in c,m=f.index+(p?f[1].length:0);r.includes(m)?(i[m].before&&!p&&(i[m].before=!1),i[m].after&&!h&&(i[m].after=!1)):(r.push(m),i[m]={before:p,after:h})}}r.sort(kge);let a=n.before?n.before.length:0;const u=o.length-(n.after?n.after.length:0);for(l=-1;++l<r.length;){const c=r[l];c<a||c>=u||c+1<u&&r[l+1]===c+1&&i[c].after&&!i[c+1].before&&!i[c+1].after||r[l-1]===c-1&&i[c].before&&!i[c-1].before&&!i[c-1].after||(a!==c&&s.push(wS(o.slice(a,c),"\\")),a=c,/[!-/:-@[-`{-~]/.test(o.charAt(c))&&(!n.encode||!n.encode.includes(o.charAt(c)))?s.push("\\"):(s.push("&#x"+o.charCodeAt(c).toString(16).toUpperCase()+";"),a++))}return s.push(wS(o.slice(a,u),n.after)),s.join("")}function kge(e,t){return e-t}function wS(e,t){const n=/\\(?=[!-/:-@[-`{-~])/g,o=[],r=[],s=e+t;let i=-1,l=0,a;for(;a=n.exec(s);)o.push(a.index);for(;++i<o.length;)l!==o[i]&&r.push(e.slice(l,o[i])),r.push("\\"),l=o[i];return r.push(e.slice(l)),r.join("")}function Sge(e){const t=e||{},n=t.now||{};let o=t.lineShift||0,r=n.line||1,s=n.column||1;return{move:a,current:i,shift:l};function i(){return{now:{line:r,column:s},lineShift:o}}function l(u){o+=u}function a(u){const c=u||"",d=c.split(/\r?\n|\r/g),f=d[d.length-1];return r+=d.length-1,s=d.length===1?s+f.length:1+f.length+o,c}}function $ge(e,t={}){const n={enter:r,indentLines:wge,associationId:mge,containerPhrasing:Mge,containerFlow:Oge,createTracker:Sge,compilePattern:gge,safe:Ige,stack:[],unsafe:[...hge],join:[...fge],handlers:{...aC},options:{},indexStack:[],handle:void 0};II(n,t),n.options.tightDefinitions&&n.join.push(Tge),n.handle=x1e("type",{invalid:Ege,unknown:xge,handlers:n.handlers});let o=n.handle(e,void 0,n,{before:` |
| 109 |
`,after:` |
| 110 |
`,now:{line:1,column:1},lineShift:0});return o&&o.charCodeAt(o.length-1)!==10&&o.charCodeAt(o.length-1)!==13&&(o+=` |
| 111 |
`),o;function r(s){return n.stack.push(s),i;function i(){n.stack.pop()}}}function Ege(e){throw new Error("Cannot handle value `"+e+"`, expected node")}function xge(e){const t=e;throw new Error("Cannot handle unknown node `"+t.type+"`")}function Tge(e,t){if(e.type==="definition"&&e.type===t.type)return 0}function Mge(e,t){return vge(e,this,t)}function Oge(e,t){return yge(e,this,t)}function Ige(e,t){return Cge(this,e,t)}function Ub(e){const t=this;t.compiler=n;function n(o){return $ge(o,{...t.data("settings"),...e,extensions:t.data("toMarkdownExtensions")||[]})}}function CS(e){if(e)throw e}var v1=Object.prototype.hasOwnProperty,KI=Object.prototype.toString,kS=Object.defineProperty,SS=Object.getOwnPropertyDescriptor,$S=function(t){return typeof Array.isArray=="function"?Array.isArray(t):KI.call(t)==="[object Array]"},ES=function(t){if(!t||KI.call(t)!=="[object Object]")return!1;var n=v1.call(t,"constructor"),o=t.constructor&&t.constructor.prototype&&v1.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!o)return!1;var r;for(r in t);return typeof r>"u"||v1.call(t,r)},xS=function(t,n){kS&&n.name==="__proto__"?kS(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},TS=function(t,n){if(n==="__proto__")if(v1.call(t,n)){if(SS)return SS(t,n).value}else return;return t[n]},Age=function e(){var t,n,o,r,s,i,l=arguments[0],a=1,u=arguments.length,c=!1;for(typeof l=="boolean"&&(c=l,l=arguments[1]||{},a=2),(l==null||typeof l!="object"&&typeof l!="function")&&(l={});a<u;++a)if(t=arguments[a],t!=null)for(n in t)o=TS(l,n),r=TS(t,n),l!==r&&(c&&r&&(ES(r)||(s=$S(r)))?(s?(s=!1,i=o&&$S(o)?o:[]):i=o&&ES(o)?o:{},xS(l,{name:n,newValue:e(c,i,r)})):typeof r<"u"&&xS(l,{name:n,newValue:r}));return l};const Sy=_o(Age);function Wb(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Nge(){const e=[],t={run:n,use:o};return t;function n(...r){let s=-1;const i=r.pop();if(typeof i!="function")throw new TypeError("Expected function as last argument, not "+i);l(null,...r);function l(a,...u){const c=e[++s];let d=-1;if(a){i(a);return}for(;++d<r.length;)(u[d]===null||u[d]===void 0)&&(u[d]=r[d]);r=u,c?Pge(c,l)(...u):i(null,...u)}}function o(r){if(typeof r!="function")throw new TypeError("Expected `middelware` to be a function, not "+r);return e.push(r),t}}function Pge(e,t){let n;return o;function o(...i){const l=e.length>i.length;let a;l&&i.push(r);try{a=e.apply(this,i)}catch(u){const c=u;if(l&&n)throw c;return r(c)}l||(a&&a.then&&typeof a.then=="function"?a.then(s,r):a instanceof Error?r(a):s(a))}function r(i,...l){n||(n=!0,t(i,...l))}function s(i){r(null,i)}}class Qo extends Error{constructor(t,n,o){super(),typeof n=="string"&&(o=n,n=void 0);let r="",s={},i=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof t=="string"?r=t:!s.cause&&t&&(i=!0,r=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof o=="string"){const a=o.indexOf(":");a===-1?s.ruleId=o:(s.source=o.slice(0,a),s.ruleId=o.slice(a+1))}if(!s.place&&s.ancestors&&s.ancestors){const a=s.ancestors[s.ancestors.length-1];a&&(s.place=a.position)}const l=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file,this.message=r,this.line=l?l.line:void 0,this.name=tp(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=i&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual,this.expected,this.note,this.url}}Qo.prototype.file="";Qo.prototype.name="";Qo.prototype.reason="";Qo.prototype.message="";Qo.prototype.stack="";Qo.prototype.column=void 0;Qo.prototype.line=void 0;Qo.prototype.ancestors=void 0;Qo.prototype.cause=void 0;Qo.prototype.fatal=void 0;Qo.prototype.place=void 0;Qo.prototype.ruleId=void 0;Qo.prototype.source=void 0;const Vs={basename:Lge,dirname:Rge,extname:Dge,join:Vge,sep:"/"};function Lge(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');xh(e);let n=0,o=-1,r=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;r--;)if(e.codePointAt(r)===47){if(s){n=r+1;break}}else o<0&&(s=!0,o=r+1);return o<0?"":e.slice(n,o)}if(t===e)return"";let i=-1,l=t.length-1;for(;r--;)if(e.codePointAt(r)===47){if(s){n=r+1;break}}else i<0&&(s=!0,i=r+1),l>-1&&(e.codePointAt(r)===t.codePointAt(l--)?l<0&&(o=r):(l=-1,o=i));return n===o?o=i:o<0&&(o=e.length),e.slice(n,o)}function Rge(e){if(xh(e),e.length===0)return".";let t=-1,n=e.length,o;for(;--n;)if(e.codePointAt(n)===47){if(o){t=n;break}}else o||(o=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Dge(e){xh(e);let t=e.length,n=-1,o=0,r=-1,s=0,i;for(;t--;){const l=e.codePointAt(t);if(l===47){if(i){o=t+1;break}continue}n<0&&(i=!0,n=t+1),l===46?r<0?r=t:s!==1&&(s=1):r>-1&&(s=-1)}return r<0||n<0||s===0||s===1&&r===n-1&&r===o+1?"":e.slice(r,n)}function Vge(...e){let t=-1,n;for(;++t<e.length;)xh(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Fge(n)}function Fge(e){xh(e);const t=e.codePointAt(0)===47;let n=Bge(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Bge(e,t){let n="",o=0,r=-1,s=0,i=-1,l,a;for(;++i<=e.length;){if(i<e.length)l=e.codePointAt(i);else{if(l===47)break;l=47}if(l===47){if(!(r===i-1||s===1))if(r!==i-1&&s===2){if(n.length<2||o!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(a=n.lastIndexOf("/"),a!==n.length-1){a<0?(n="",o=0):(n=n.slice(0,a),o=n.length-1-n.lastIndexOf("/")),r=i,s=0;continue}}else if(n.length>0){n="",o=0,r=i,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",o=2)}else n.length>0?n+="/"+e.slice(r+1,i):n=e.slice(r+1,i),o=i-r-1;r=i,s=0}else l===46&&s>-1?s++:s=-1}return n}function xh(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const zge={cwd:jge};function jge(){return"/"}function Kb(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Hge(e){if(typeof e=="string")e=new URL(e);else if(!Kb(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Uge(e)}function Uge(e){if(e.hostname!==""){const o=new TypeError('File URL host must be "localhost" or empty on darwin');throw o.code="ERR_INVALID_FILE_URL_HOST",o}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const o=t.codePointAt(n+2);if(o===70||o===102){const r=new TypeError("File URL path must not include encoded / characters");throw r.code="ERR_INVALID_FILE_URL_PATH",r}}return decodeURIComponent(t)}const $y=["history","path","basename","stem","extname","dirname"];class Wge{constructor(t){let n;t?Kb(t)?n={path:t}:typeof t=="string"||Kge(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":zge.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let o=-1;for(;++o<$y.length;){const s=$y[o];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let r;for(r in n)$y.includes(r)||(this[r]=n[r])}get basename(){return typeof this.path=="string"?Vs.basename(this.path):void 0}set basename(t){xy(t,"basename"),Ey(t,"basename"),this.path=Vs.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Vs.dirname(this.path):void 0}set dirname(t){MS(this.basename,"dirname"),this.path=Vs.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Vs.extname(this.path):void 0}set extname(t){if(Ey(t,"extname"),MS(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Vs.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Kb(t)&&(t=Hge(t)),xy(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Vs.basename(this.path,this.extname):void 0}set stem(t){xy(t,"stem"),Ey(t,"stem"),this.path=Vs.join(this.dirname||"",t+(this.extname||""))}fail(t,n,o){const r=this.message(t,n,o);throw r.fatal=!0,r}info(t,n,o){const r=this.message(t,n,o);return r.fatal=void 0,r}message(t,n,o){const r=new Qo(t,n,o);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Ey(e,t){if(e&&e.includes(Vs.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Vs.sep+"`")}function xy(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function MS(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Kge(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const qge=function(e){const o=this.constructor.prototype,r=o[e],s=function(){return r.apply(s,arguments)};return Object.setPrototypeOf(s,o),s},Gge={}.hasOwnProperty;class uC extends qge{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Nge()}copy(){const t=new uC;let n=-1;for(;++n<this.attachers.length;){const o=this.attachers[n];t.use(...o)}return t.data(Sy(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Oy("data",this.frozen),this.namespace[t]=n,this):Gge.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Oy("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...o]=this.attachers[this.freezeIndex];if(o[0]===!1)continue;o[0]===!0&&(o[0]=void 0);const r=n.call(t,...o);typeof r=="function"&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=$m(t),o=this.parser||this.Parser;return Ty("parse",o),o(String(n),n)}process(t,n){const o=this;return this.freeze(),Ty("process",this.parser||this.Parser),My("process",this.compiler||this.Compiler),n?r(void 0,n):new Promise(r);function r(s,i){const l=$m(t),a=o.parse(l);o.run(a,l,function(c,d,f){if(c||!d||!f)return u(c);const p=d,h=o.stringify(p,f);Zge(h)?f.value=h:f.result=h,u(c,f)});function u(c,d){c||!d?i(c):s?s(d):n(void 0,d)}}}processSync(t){let n=!1,o;return this.freeze(),Ty("processSync",this.parser||this.Parser),My("processSync",this.compiler||this.Compiler),this.process(t,r),IS("processSync","process",n),o;function r(s,i){n=!0,CS(s),o=i}}run(t,n,o){OS(t),this.freeze();const r=this.transformers;return!o&&typeof n=="function"&&(o=n,n=void 0),o?s(void 0,o):new Promise(s);function s(i,l){const a=$m(n);r.run(t,a,u);function u(c,d,f){const p=d||t;c?l(c):i?i(p):o(void 0,p,f)}}}runSync(t,n){let o=!1,r;return this.run(t,n,s),IS("runSync","run",o),r;function s(i,l){CS(i),r=l,o=!0}}stringify(t,n){this.freeze();const o=$m(n),r=this.compiler||this.Compiler;return My("stringify",r),OS(t),r(t,o)}use(t,...n){const o=this.attachers,r=this.namespace;if(Oy("use",this.frozen),t!=null)if(typeof t=="function")a(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):i(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(u){if(typeof u=="function")a(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[c,...d]=u;a(c,d)}else i(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function i(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(u.plugins),u.settings&&(r.settings=Sy(!0,r.settings,u.settings))}function l(u){let c=-1;if(u!=null)if(Array.isArray(u))for(;++c<u.length;){const d=u[c];s(d)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function a(u,c){let d=-1,f=-1;for(;++d<o.length;)if(o[d][0]===u){f=d;break}if(f===-1)o.push([u,...c]);else if(c.length>0){let[p,...h]=c;const m=o[f][1];Wb(m)&&Wb(p)&&(p=Sy(!0,m,p)),o[f]=[u,p,...h]}}}}const qb=new uC().freeze();function Ty(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function My(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Oy(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function OS(e){if(!Wb(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function IS(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function $m(e){return Yge(e)?e:new Wge(e)}function Yge(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Zge(e){return typeof e=="string"||Jge(e)}function Jge(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var qI=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Nt=(e,t,n)=>(qI(e,t,"read from private field"),n?n.call(e):t.get(e)),Ln=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},dn=(e,t,n,o)=>(qI(e,t,"write to private field"),o?o.call(e,n):t.set(e,n),n);let GI=class{},YI=class{constructor(){this.elements=[],this.size=()=>this.elements.length,this.top=()=>this.elements.at(-1),this.push=t=>{var n;(n=this.top())==null||n.push(t)},this.open=t=>{this.elements.push(t)},this.close=()=>{const t=this.elements.pop();if(!t)throw qO();return t}}},Xge=class ZI extends GI{constructor(t,n,o){super(),this.type=t,this.content=n,this.attrs=o}push(t,...n){this.content.push(t,...n)}pop(){return this.content.pop()}static create(t,n,o){return new ZI(t,n,o)}};var Ps,af,y1,_1,b1,uf,cf;const Gb=class extends YI{constructor(t){super(),Ln(this,Ps,void 0),Ln(this,af,void 0),Ln(this,y1,void 0),Ln(this,_1,void 0),Ln(this,b1,void 0),Ln(this,uf,void 0),Ln(this,cf,void 0),dn(this,Ps,Yt.none),dn(this,af,n=>n.isText),dn(this,y1,(n,o)=>{if(Nt(this,af).call(this,n)&&Nt(this,af).call(this,o)&&Yt.sameSet(n.marks,o.marks))return this.schema.text(n.text+o.text,n.marks)}),dn(this,_1,n=>{const o=Object.values({...this.schema.nodes,...this.schema.marks}).find(r=>r.spec.parseMarkdown.match(n));if(!o)throw Upe(n);return o}),dn(this,b1,n=>{const o=Nt(this,_1).call(this,n);o.spec.parseMarkdown.runner(this,n,o)}),this.injectRoot=(n,o,r)=>(this.openNode(o,r),this.next(n.children),this),this.openNode=(n,o)=>(this.open(Xge.create(n,[],o)),this),dn(this,uf,()=>{dn(this,Ps,Yt.none);const n=this.close();return Nt(this,cf).call(this,n.type,n.attrs,n.content)}),this.closeNode=()=>(Nt(this,uf).call(this),this),dn(this,cf,(n,o,r)=>{const s=n.createAndFill(o,r,Nt(this,Ps));if(!s)throw Hpe(n,o,r);return this.push(s),s}),this.addNode=(n,o,r)=>(Nt(this,cf).call(this,n,o,r),this),this.openMark=(n,o)=>{const r=n.create(o);return dn(this,Ps,r.addToSet(Nt(this,Ps))),this},this.closeMark=n=>(dn(this,Ps,n.removeFromSet(Nt(this,Ps))),this),this.addText=n=>{const o=this.top();if(!o)throw qO();const r=o.pop(),s=this.schema.text(n,Nt(this,Ps));if(!r)return o.push(s),this;const i=Nt(this,y1).call(this,r,s);return i?(o.push(i),this):(o.push(r,s),this)},this.build=()=>{let n;do n=Nt(this,uf).call(this);while(this.size());return n},this.next=(n=[])=>([n].flat().forEach(o=>Nt(this,b1).call(this,o)),this),this.toDoc=()=>this.build(),this.run=(n,o)=>{const r=n.runSync(n.parse(o),o);return this.next(r),this},this.schema=t}};Ps=new WeakMap,af=new WeakMap,y1=new WeakMap,_1=new WeakMap,b1=new WeakMap,uf=new WeakMap,cf=new WeakMap,Gb.create=(e,t)=>{const n=new Gb(e);return o=>(n.run(t,o),n.toDoc())};let Qge=Gb;const Yb=class extends GI{constructor(t,n,o,r={}){super(),this.type=t,this.children=n,this.value=o,this.props=r,this.push=(s,...i)=>{this.children||(this.children=[]),this.children.push(s,...i)},this.pop=()=>{var s;return(s=this.children)==null?void 0:s.pop()}}};Yb.create=(e,t,n,o={})=>new Yb(e,t,n,o);let AS=Yb;const e0e=e=>Object.prototype.hasOwnProperty.call(e,"size");var mi,df,w1,C1,ff,k1,pf,S1,$1,Ju,ka,E1,hf;const Zb=class extends YI{constructor(t){super(),Ln(this,mi,void 0),Ln(this,df,void 0),Ln(this,w1,void 0),Ln(this,C1,void 0),Ln(this,ff,void 0),Ln(this,k1,void 0),Ln(this,pf,void 0),Ln(this,S1,void 0),Ln(this,$1,void 0),Ln(this,Ju,void 0),Ln(this,ka,void 0),Ln(this,E1,void 0),Ln(this,hf,void 0),dn(this,mi,Yt.none),dn(this,df,n=>{const o=Object.values({...this.schema.nodes,...this.schema.marks}).find(r=>r.spec.toMarkdown.match(n));if(!o)throw Wpe(n.type);return o}),dn(this,w1,n=>Nt(this,df).call(this,n).spec.toMarkdown.runner(this,n)),dn(this,C1,(n,o)=>Nt(this,df).call(this,n).spec.toMarkdown.runner(this,n,o)),dn(this,ff,n=>{const{marks:o}=n,r=s=>s.type.spec.priority??50;[...o].sort((s,i)=>r(s)-r(i)).every(s=>!Nt(this,C1).call(this,s,n))&&Nt(this,w1).call(this,n),o.forEach(s=>Nt(this,hf).call(this,s))}),dn(this,k1,(n,o)=>{var r;if(n.type===o||((r=n.children)==null?void 0:r.length)!==1)return n;const s=u=>{var c;if(u.type===o)return u;if(((c=u.children)==null?void 0:c.length)!==1)return null;const[d]=u.children;return d?s(d):null},i=s(n);if(!i)return n;const l=i.children?[...i.children]:void 0,a={...n,children:l};return a.children=l,i.children=[a],i}),dn(this,pf,n=>{const{children:o}=n;return o&&(n.children=o.reduce((r,s,i)=>{if(i===0)return[s];const l=r.at(-1);if(l&&l.isMark&&s.isMark){s=Nt(this,k1).call(this,s,l.type);const{children:a,...u}=s,{children:c,...d}=l;if(s.type===l.type&&a&&c&&JSON.stringify(u)===JSON.stringify(d)){const f={...d,children:[...c,...a]};return r.slice(0,-1).concat(Nt(this,pf).call(this,f))}}return r.concat(s)},[])),n}),dn(this,S1,n=>{const o={...n.props,type:n.type};return n.children&&(o.children=n.children),n.value&&(o.value=n.value),o}),this.openNode=(n,o,r)=>(this.open(AS.create(n,void 0,o,r)),this),dn(this,$1,(n,o)=>{let r="",s="";const i=n.children;let l=-1,a=-1;const u=d=>{d&&d.forEach((f,p)=>{f.type==="text"&&f.value&&(l<0&&(l=p),a=p)})};if(i){u(i);const d=i==null?void 0:i[a],f=i==null?void 0:i[l];d&&d.value.endsWith(" ")&&(s=d.value.match(/ +$/)[0],d.value=d.value.trimEnd()),f&&f.value.startsWith(" ")&&(r=f.value.match(/^ +/)[0],f.value=f.value.trimStart())}r.length&&Nt(this,ka).call(this,"text",void 0,r);const c=o();return s.length&&Nt(this,ka).call(this,"text",void 0,s),c}),dn(this,Ju,(n=!1)=>{const o=this.close(),r=()=>Nt(this,ka).call(this,o.type,o.children,o.value,o.props);return n?Nt(this,$1).call(this,o,r):r()}),this.closeNode=()=>(Nt(this,Ju).call(this),this),dn(this,ka,(n,o,r,s)=>{const i=AS.create(n,o,r,s),l=Nt(this,pf).call(this,Nt(this,S1).call(this,i));return this.push(l),l}),this.addNode=(n,o,r,s)=>(Nt(this,ka).call(this,n,o,r,s),this),dn(this,E1,(n,o,r,s)=>n.isInSet(Nt(this,mi))?this:(dn(this,mi,n.addToSet(Nt(this,mi))),this.openNode(o,r,{...s,isMark:!0}))),dn(this,hf,n=>{n.isInSet(Nt(this,mi))&&(dn(this,mi,n.type.removeFromSet(Nt(this,mi))),Nt(this,Ju).call(this,!0))}),this.withMark=(n,o,r,s)=>(Nt(this,E1).call(this,n,o,r,s),this),this.closeMark=n=>(Nt(this,hf).call(this,n),this),this.build=()=>{let n=null;do n=Nt(this,Ju).call(this);while(this.size());return n},this.next=n=>e0e(n)?(n.forEach(o=>{Nt(this,ff).call(this,o)}),this):(Nt(this,ff).call(this,n),this),this.toString=n=>n.stringify(this.build()),this.run=n=>(this.next(n),this),this.schema=t}};mi=new WeakMap,df=new WeakMap,w1=new WeakMap,C1=new WeakMap,ff=new WeakMap,k1=new WeakMap,pf=new WeakMap,S1=new WeakMap,$1=new WeakMap,Ju=new WeakMap,ka=new WeakMap,E1=new WeakMap,hf=new WeakMap,Zb.create=(e,t)=>{const n=new Zb(e);return o=>(n.run(o),n.toString(t))};let t0e=Zb;const JI=65535,XI=Math.pow(2,16);function n0e(e,t){return e+t*XI}function NS(e){return e&JI}function o0e(e){return(e-(e&JI))/XI}const QI=1,eA=2,x1=4,tA=8;class Jb{constructor(t,n,o){this.pos=t,this.delInfo=n,this.recover=o}get deleted(){return(this.delInfo&tA)>0}get deletedBefore(){return(this.delInfo&(QI|x1))>0}get deletedAfter(){return(this.delInfo&(eA|x1))>0}get deletedAcross(){return(this.delInfo&x1)>0}}class cr{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&cr.empty)return cr.empty}recover(t){let n=0,o=NS(t);if(!this.inverted)for(let r=0;r<o;r++)n+=this.ranges[r*3+2]-this.ranges[r*3+1];return this.ranges[o*3]+n+o0e(t)}mapResult(t,n=1){return this._map(t,n,!1)}map(t,n=1){return this._map(t,n,!0)}_map(t,n,o){let r=0,s=this.inverted?2:1,i=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?r:0);if(a>t)break;let u=this.ranges[l+s],c=this.ranges[l+i],d=a+u;if(t<=d){let f=u?t==a?-1:t==d?1:n:n,p=a+r+(f<0?0:c);if(o)return p;let h=t==(n<0?a:d)?null:n0e(l/3,t-a),m=t==a?eA:t==d?QI:x1;return(n<0?t!=a:t!=d)&&(m|=tA),new Jb(p,m,h)}r+=c-u}return o?t+r:new Jb(t+r,0,null)}touches(t,n){let o=0,r=NS(n),s=this.inverted?2:1,i=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?o:0);if(a>t)break;let u=this.ranges[l+s],c=a+u;if(t<=c&&l==r*3)return!0;o+=this.ranges[l+i]-u}return!1}forEach(t){let n=this.inverted?2:1,o=this.inverted?1:2;for(let r=0,s=0;r<this.ranges.length;r+=3){let i=this.ranges[r],l=i-(this.inverted?s:0),a=i+(this.inverted?0:s),u=this.ranges[r+n],c=this.ranges[r+o];t(l,l+u,a,a+c),s+=c-u}}invert(){return new cr(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return t==0?cr.empty:new cr(t<0?[0,-t,0]:[0,0,t])}}cr.empty=new cr([]);class Ec{constructor(t=[],n,o=0,r=t.length){this.maps=t,this.mirror=n,this.from=o,this.to=r}slice(t=0,n=this.maps.length){return new Ec(this.maps,this.mirror,t,n)}copy(){return new Ec(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,o=this.maps.length;n<t.maps.length;n++){let r=t.getMirror(n);this.appendMap(t.maps[n],r!=null&&r<n?o+r: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,o=this.maps.length+t.maps.length;n>=0;n--){let r=t.getMirror(n);this.appendMap(t.maps[n].invert(),r!=null&&r>n?o-r-1:void 0)}}invert(){let t=new Ec;return t.appendMappingInverted(this),t}map(t,n=1){if(this.mirror)return this._map(t,n,!0);for(let o=this.from;o<this.to;o++)t=this.maps[o].map(t,n);return t}mapResult(t,n=1){return this._map(t,n,!1)}_map(t,n,o){let r=0;for(let s=this.from;s<this.to;s++){let i=this.maps[s],l=i.mapResult(t,n);if(l.recover!=null){let a=this.getMirror(s);if(a!=null&&a>s&&a<this.to){s=a,t=this.maps[a].recover(l.recover);continue}}r|=l.delInfo,t=l.pos}return o?t:new Jb(t,r,null)}}const Iy=Object.create(null);class wo{getMap(){return cr.empty}merge(t){return null}static fromJSON(t,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let o=Iy[n.stepType];if(!o)throw new RangeError(`No step type ${n.stepType} defined`);return o.fromJSON(t,n)}static jsonID(t,n){if(t in Iy)throw new RangeError("Duplicate use of step JSON ID "+t);return Iy[t]=n,n.prototype.jsonID=t,n}}class Fn{constructor(t,n){this.doc=t,this.failed=n}static ok(t){return new Fn(t,null)}static fail(t){return new Fn(null,t)}static fromReplace(t,n,o,r){try{return Fn.ok(t.replace(n,o,r))}catch(s){if(s instanceof Hg)return Fn.fail(s.message);throw s}}}function cC(e,t,n){let o=[];for(let r=0;r<e.childCount;r++){let s=e.child(r);s.content.size&&(s=s.copy(cC(s.content,t,s))),s.isInline&&(s=t(s,n,r)),o.push(s)}return We.fromArray(o)}class $i extends wo{constructor(t,n,o){super(),this.from=t,this.to=n,this.mark=o}apply(t){let n=t.slice(this.from,this.to),o=t.resolve(this.from),r=o.node(o.sharedDepth(this.to)),s=new Je(cC(n.content,(i,l)=>!i.isAtom||!l.type.allowsMarkType(this.mark.type)?i:i.mark(this.mark.addToSet(i.marks)),r),n.openStart,n.openEnd);return Fn.fromReplace(t,this.from,this.to,s)}invert(){return new Us(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),o=t.mapResult(this.to,-1);return n.deleted&&o.deleted||n.pos>=o.pos?null:new $i(n.pos,o.pos,this.mark)}merge(t){return t instanceof $i&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new $i(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 $i(n.from,n.to,t.markFromJSON(n.mark))}}wo.jsonID("addMark",$i);class Us extends wo{constructor(t,n,o){super(),this.from=t,this.to=n,this.mark=o}apply(t){let n=t.slice(this.from,this.to),o=new Je(cC(n.content,r=>r.mark(this.mark.removeFromSet(r.marks)),t),n.openStart,n.openEnd);return Fn.fromReplace(t,this.from,this.to,o)}invert(){return new $i(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),o=t.mapResult(this.to,-1);return n.deleted&&o.deleted||n.pos>=o.pos?null:new Us(n.pos,o.pos,this.mark)}merge(t){return t instanceof Us&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Us(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 Us(n.from,n.to,t.markFromJSON(n.mark))}}wo.jsonID("removeMark",Us);class Il extends wo{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return Fn.fail("No node at mark step's position");let o=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return Fn.fromReplace(t,this.pos,this.pos+1,new Je(We.from(o),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);if(n){let o=this.mark.addToSet(n.marks);if(o.length==n.marks.length){for(let r=0;r<n.marks.length;r++)if(!n.marks[r].isInSet(o))return new Il(this.pos,n.marks[r]);return new Il(this.pos,this.mark)}}return new cd(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new Il(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 Il(n.pos,t.markFromJSON(n.mark))}}wo.jsonID("addNodeMark",Il);class cd extends wo{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return Fn.fail("No node at mark step's position");let o=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return Fn.fromReplace(t,this.pos,this.pos+1,new Je(We.from(o),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new Il(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new cd(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 cd(n.pos,t.markFromJSON(n.mark))}}wo.jsonID("removeNodeMark",cd);class oo extends wo{constructor(t,n,o,r=!1){super(),this.from=t,this.to=n,this.slice=o,this.structure=r}apply(t){return this.structure&&Xb(t,this.from,this.to)?Fn.fail("Structure replace would overwrite content"):Fn.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new cr([this.from,this.to-this.from,this.slice.size])}invert(t){return new oo(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let n=t.mapResult(this.from,1),o=t.mapResult(this.to,-1);return n.deletedAcross&&o.deletedAcross?null:new oo(n.pos,Math.max(n.pos,o.pos),this.slice)}merge(t){if(!(t instanceof oo)||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?Je.empty:new Je(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new oo(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?Je.empty:new Je(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new oo(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 oo(n.from,n.to,Je.fromJSON(t,n.slice),!!n.structure)}}wo.jsonID("replace",oo);class vo extends wo{constructor(t,n,o,r,s,i,l=!1){super(),this.from=t,this.to=n,this.gapFrom=o,this.gapTo=r,this.slice=s,this.insert=i,this.structure=l}apply(t){if(this.structure&&(Xb(t,this.from,this.gapFrom)||Xb(t,this.gapTo,this.to)))return Fn.fail("Structure gap-replace would overwrite content");let n=t.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return Fn.fail("Gap is not a flat range");let o=this.slice.insertAt(this.insert,n.content);return o?Fn.fromReplace(t,this.from,this.to,o):Fn.fail("Content does not fit in gap")}getMap(){return new cr([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 vo(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),o=t.mapResult(this.to,-1),r=this.from==this.gapFrom?n.pos:t.map(this.gapFrom,-1),s=this.to==this.gapTo?o.pos:t.map(this.gapTo,1);return n.deletedAcross&&o.deletedAcross||r<n.pos||s>o.pos?null:new vo(n.pos,o.pos,r,s,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 vo(n.from,n.to,n.gapFrom,n.gapTo,Je.fromJSON(t,n.slice),n.insert,!!n.structure)}}wo.jsonID("replaceAround",vo);function Xb(e,t,n){let o=e.resolve(t),r=n-t,s=o.depth;for(;r>0&&s>0&&o.indexAfter(s)==o.node(s).childCount;)s--,r--;if(r>0){let i=o.node(s).maybeChild(o.indexAfter(s));for(;r>0;){if(!i||i.isLeaf)return!0;i=i.firstChild,r--}}return!1}function r0e(e,t,n,o){let r=[],s=[],i,l;e.doc.nodesBetween(t,n,(a,u,c)=>{if(!a.isInline)return;let d=a.marks;if(!o.isInSet(d)&&c.type.allowsMarkType(o.type)){let f=Math.max(u,t),p=Math.min(u+a.nodeSize,n),h=o.addToSet(d);for(let m=0;m<d.length;m++)d[m].isInSet(h)||(i&&i.to==f&&i.mark.eq(d[m])?i.to=p:r.push(i=new Us(f,p,d[m])));l&&l.to==f?l.to=p:s.push(l=new $i(f,p,o))}}),r.forEach(a=>e.step(a)),s.forEach(a=>e.step(a))}function s0e(e,t,n,o){let r=[],s=0;e.doc.nodesBetween(t,n,(i,l)=>{if(!i.isInline)return;s++;let a=null;if(o instanceof rv){let u=i.marks,c;for(;c=o.isInSet(u);)(a||(a=[])).push(c),u=c.removeFromSet(u)}else o?o.isInSet(i.marks)&&(a=[o]):a=i.marks;if(a&&a.length){let u=Math.min(l+i.nodeSize,n);for(let c=0;c<a.length;c++){let d=a[c],f;for(let p=0;p<r.length;p++){let h=r[p];h.step==s-1&&d.eq(r[p].style)&&(f=h)}f?(f.to=u,f.step=s):r.push({style:d,from:Math.max(l,t),to:u,step:s})}}}),r.forEach(i=>e.step(new Us(i.from,i.to,i.style)))}function nA(e,t,n,o=n.contentMatch,r=!0){let s=e.doc.nodeAt(t),i=[],l=t+1;for(let a=0;a<s.childCount;a++){let u=s.child(a),c=l+u.nodeSize,d=o.matchType(u.type);if(!d)i.push(new oo(l,c,Je.empty));else{o=d;for(let f=0;f<u.marks.length;f++)n.allowsMarkType(u.marks[f].type)||e.step(new Us(l,c,u.marks[f]));if(r&&u.isText&&n.whitespace!="pre"){let f,p=/\r?\n|\r/g,h;for(;f=p.exec(u.text);)h||(h=new Je(We.from(n.schema.text(" ",n.allowedMarks(u.marks))),0,0)),i.push(new oo(l+f.index,l+f.index+f[0].length,h))}}l=c}if(!o.validEnd){let a=o.fillBefore(We.empty,!0);e.replace(l,l,new Je(a,0,0))}for(let a=i.length-1;a>=0;a--)e.step(i[a])}function i0e(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function uv(e){let n=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let o=e.depth;;--o){let r=e.$from.node(o),s=e.$from.index(o),i=e.$to.indexAfter(o);if(o<e.depth&&r.canReplace(s,i,n))return o;if(o==0||r.type.spec.isolating||!i0e(r,s,i))break}return null}function l0e(e,t,n){let{$from:o,$to:r,depth:s}=t,i=o.before(s+1),l=r.after(s+1),a=i,u=l,c=We.empty,d=0;for(let h=s,m=!1;h>n;h--)m||o.index(h)>0?(m=!0,c=We.from(o.node(h).copy(c)),d++):a--;let f=We.empty,p=0;for(let h=s,m=!1;h>n;h--)m||r.after(h+1)<r.end(h)?(m=!0,f=We.from(r.node(h).copy(f)),p++):u++;e.step(new vo(a,u,i,l,new Je(c.append(f),d,p),c.size-d,!0))}function dC(e,t,n=null,o=e){let r=a0e(e,t),s=r&&u0e(o,t);return s?r.map(PS).concat({type:t,attrs:n}).concat(s.map(PS)):null}function PS(e){return{type:e,attrs:null}}function a0e(e,t){let{parent:n,startIndex:o,endIndex:r}=e,s=n.contentMatchAt(o).findWrapping(t);if(!s)return null;let i=s.length?s[0]:t;return n.canReplaceWith(o,r,i)?s:null}function u0e(e,t){let{parent:n,startIndex:o,endIndex:r}=e,s=n.child(o),i=t.contentMatch.findWrapping(s.type);if(!i)return null;let a=(i.length?i[i.length-1]:t).contentMatch;for(let u=o;a&&u<r;u++)a=a.matchType(n.child(u).type);return!a||!a.validEnd?null:i}function c0e(e,t,n){let o=We.empty;for(let i=n.length-1;i>=0;i--){if(o.size){let l=n[i].type.contentMatch.matchFragment(o);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}o=We.from(n[i].type.create(n[i].attrs,o))}let r=t.start,s=t.end;e.step(new vo(r,s,r,s,new Je(o,0,0),n.length,!0))}function d0e(e,t,n,o,r){if(!o.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let s=e.steps.length;e.doc.nodesBetween(t,n,(i,l)=>{let a=typeof r=="function"?r(i):r;if(i.isTextblock&&!i.hasMarkup(o,a)&&h0e(e.doc,e.mapping.slice(s).map(l),o)){let u=null;if(o.schema.linebreakReplacement){let p=o.whitespace=="pre",h=!!o.contentMatch.matchType(o.schema.linebreakReplacement);p&&!h?u=!1:!p&&h&&(u=!0)}u===!1&&p0e(e,i,l,s),nA(e,e.mapping.slice(s).map(l,1),o,void 0,u===null);let c=e.mapping.slice(s),d=c.map(l,1),f=c.map(l+i.nodeSize,1);return e.step(new vo(d,f,d+1,f-1,new Je(We.from(o.create(a,null,i.marks)),0,0),1,!0)),u===!0&&f0e(e,i,l,s),!1}})}function f0e(e,t,n,o){t.forEach((r,s)=>{if(r.isText){let i,l=/\r?\n|\r/g;for(;i=l.exec(r.text);){let a=e.mapping.slice(o).map(n+1+s+i.index);e.replaceWith(a,a+1,t.type.schema.linebreakReplacement.create())}}})}function p0e(e,t,n,o){t.forEach((r,s)=>{if(r.type==r.type.schema.linebreakReplacement){let i=e.mapping.slice(o).map(n+1+s);e.replaceWith(i,i+1,t.type.schema.text(` |
| 112 |
`))}})}function h0e(e,t,n){let o=e.resolve(t),r=o.index();return o.parent.canReplaceWith(r,r+1,n)}function m0e(e,t,n,o,r){let s=e.doc.nodeAt(t);if(!s)throw new RangeError("No node at given position");n||(n=s.type);let i=n.create(o,null,r||s.marks);if(s.isLeaf)return e.replaceWith(t,t+s.nodeSize,i);if(!n.validContent(s.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new vo(t,t+s.nodeSize,t+1,t+s.nodeSize-1,new Je(We.from(i),0,0),1,!0))}function np(e,t,n=1,o){let r=e.resolve(t),s=r.depth-n,i=o&&o[o.length-1]||r.parent;if(s<0||r.parent.type.spec.isolating||!r.parent.canReplace(r.index(),r.parent.childCount)||!i.type.validContent(r.parent.content.cutByIndex(r.index(),r.parent.childCount)))return!1;for(let u=r.depth-1,c=n-2;u>s;u--,c--){let d=r.node(u),f=r.index(u);if(d.type.spec.isolating)return!1;let p=d.content.cutByIndex(f,d.childCount),h=o&&o[c+1];h&&(p=p.replaceChild(0,h.type.create(h.attrs)));let m=o&&o[c]||d;if(!d.canReplace(f+1,d.childCount)||!m.type.validContent(p))return!1}let l=r.indexAfter(s),a=o&&o[0];return r.node(s).canReplaceWith(l,l,a?a.type:r.node(s+1).type)}function g0e(e,t,n=1,o){let r=e.doc.resolve(t),s=We.empty,i=We.empty;for(let l=r.depth,a=r.depth-n,u=n-1;l>a;l--,u--){s=We.from(r.node(l).copy(s));let c=o&&o[u];i=We.from(c?c.type.create(c.attrs,i):r.node(l).copy(i))}e.step(new oo(t,t,new Je(s.append(i),n,n),!0))}function cv(e,t){let n=e.resolve(t),o=n.index();return v0e(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(o,o+1)}function v0e(e,t){return!!(e&&t&&!e.isLeaf&&e.canAppend(t))}function y0e(e,t,n){let o=new oo(t-n,t+n,Je.empty,!0);e.step(o)}function _0e(e,t,n){let o=e.resolve(t);if(o.parent.canReplaceWith(o.index(),o.index(),n))return t;if(o.parentOffset==0)for(let r=o.depth-1;r>=0;r--){let s=o.index(r);if(o.node(r).canReplaceWith(s,s,n))return o.before(r+1);if(s>0)return null}if(o.parentOffset==o.parent.content.size)for(let r=o.depth-1;r>=0;r--){let s=o.indexAfter(r);if(o.node(r).canReplaceWith(s,s,n))return o.after(r+1);if(s<o.node(r).childCount)return null}return null}function b0e(e,t,n){let o=e.resolve(t);if(!n.content.size)return t;let r=n.content;for(let s=0;s<n.openStart;s++)r=r.firstChild.content;for(let s=1;s<=(n.openStart==0&&n.size?2:1);s++)for(let i=o.depth;i>=0;i--){let l=i==o.depth?0:o.pos<=(o.start(i+1)+o.end(i+1))/2?-1:1,a=o.index(i)+(l>0?1:0),u=o.node(i),c=!1;if(s==1)c=u.canReplace(a,a,r);else{let d=u.contentMatchAt(a).findWrapping(r.firstChild.type);c=d&&u.canReplaceWith(a,a,d[0])}if(c)return l==0?o.pos:l<0?o.before(i+1):o.after(i+1)}return null}function fC(e,t,n=t,o=Je.empty){if(t==n&&!o.size)return null;let r=e.resolve(t),s=e.resolve(n);return oA(r,s,o)?new oo(t,n,o):new w0e(r,s,o).fit()}function oA(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}class w0e{constructor(t,n,o){this.$from=t,this.$to=n,this.unplaced=o,this.frontier=[],this.placed=We.empty;for(let r=0;r<=t.depth;r++){let s=t.node(r);this.frontier.push({type:s.type,match:s.contentMatchAt(t.indexAfter(r))})}for(let r=t.depth;r>0;r--)this.placed=We.from(t.node(r).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let u=this.findFittable();u?this.placeNodes(u):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,o=this.$from,r=this.close(t<0?this.$to:o.doc.resolve(t));if(!r)return null;let s=this.placed,i=o.depth,l=r.depth;for(;i&&l&&s.childCount==1;)s=s.firstChild.content,i--,l--;let a=new Je(s,i,l);return t>-1?new vo(o.pos,t,this.$to.pos,this.$to.end(),a,n):a.size||o.pos!=this.$to.pos?new oo(o.pos,r.pos,a):null}findFittable(){let t=this.unplaced.openStart;for(let n=this.unplaced.content,o=0,r=this.unplaced.openEnd;o<t;o++){let s=n.firstChild;if(n.childCount>1&&(r=0),s.type.spec.isolating&&r<=o){t=o;break}n=s.content}for(let n=1;n<=2;n++)for(let o=n==1?t:this.unplaced.openStart;o>=0;o--){let r,s=null;o?(s=Ay(this.unplaced.content,o-1).firstChild,r=s.content):r=this.unplaced.content;let i=r.firstChild;for(let l=this.depth;l>=0;l--){let{type:a,match:u}=this.frontier[l],c,d=null;if(n==1&&(i?u.matchType(i.type)||(d=u.fillBefore(We.from(i),!1)):s&&a.compatibleContent(s.type)))return{sliceDepth:o,frontierDepth:l,parent:s,inject:d};if(n==2&&i&&(c=u.findWrapping(i.type)))return{sliceDepth:o,frontierDepth:l,parent:s,wrap:c};if(s&&u.matchType(s.type))break}}}openMore(){let{content:t,openStart:n,openEnd:o}=this.unplaced,r=Ay(t,n);return!r.childCount||r.firstChild.isLeaf?!1:(this.unplaced=new Je(t,n+1,Math.max(o,r.size+n>=t.size-o?n+1:0)),!0)}dropNode(){let{content:t,openStart:n,openEnd:o}=this.unplaced,r=Ay(t,n);if(r.childCount<=1&&n>0){let s=t.size-n<=n+r.size;this.unplaced=new Je(mf(t,n-1,1),n-1,s?n-1:o)}else this.unplaced=new Je(mf(t,n,1),n,o)}placeNodes({sliceDepth:t,frontierDepth:n,parent:o,inject:r,wrap:s}){for(;this.depth>n;)this.closeFrontierNode();if(s)for(let m=0;m<s.length;m++)this.openFrontierNode(s[m]);let i=this.unplaced,l=o?o.content:i.content,a=i.openStart-t,u=0,c=[],{match:d,type:f}=this.frontier[n];if(r){for(let m=0;m<r.childCount;m++)c.push(r.child(m));d=d.matchFragment(r)}let p=l.size+t-(i.content.size-i.openEnd);for(;u<l.childCount;){let m=l.child(u),y=d.matchType(m.type);if(!y)break;u++,(u>1||a==0||m.content.size)&&(d=y,c.push(rA(m.mark(f.allowedMarks(m.marks)),u==1?a:0,u==l.childCount?p:-1)))}let h=u==l.childCount;h||(p=-1),this.placed=gf(this.placed,n,We.from(c)),this.frontier[n].match=d,h&&p<0&&o&&o.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,y=l;m<p;m++){let v=y.lastChild;this.frontier.push({type:v.type,match:v.contentMatchAt(v.childCount)}),y=v.content}this.unplaced=h?t==0?Je.empty:new Je(mf(i.content,t-1,1),t-1,p<0?i.openEnd:t-1):new Je(mf(i.content,t,u),i.openStart,i.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let t=this.frontier[this.depth],n;if(!t.type.isTextblock||!Ny(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:o}=this.$to,r=this.$to.after(o);for(;o>1&&r==this.$to.end(--o);)++r;return r}findCloseLevel(t){e:for(let n=Math.min(this.depth,t.depth);n>=0;n--){let{match:o,type:r}=this.frontier[n],s=n<t.depth&&t.end(n+1)==t.pos+(t.depth-(n+1)),i=Ny(t,n,r,o,s);if(i){for(let l=n-1;l>=0;l--){let{match:a,type:u}=this.frontier[l],c=Ny(t,l,u,a,!0);if(!c||c.childCount)continue e}return{depth:n,fit:i,move:s?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=gf(this.placed,n.depth,n.fit)),t=n.move;for(let o=n.depth+1;o<=t.depth;o++){let r=t.node(o),s=r.type.contentMatch.fillBefore(r.content,!0,t.index(o));this.openFrontierNode(r.type,r.attrs,s)}return t}openFrontierNode(t,n=null,o){let r=this.frontier[this.depth];r.match=r.match.matchType(t),this.placed=gf(this.placed,this.depth,We.from(t.create(n,o))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(We.empty,!0);n.childCount&&(this.placed=gf(this.placed,this.frontier.length,n))}}function mf(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(mf(e.firstChild.content,t-1,n)))}function gf(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(gf(e.lastChild.content,t-1,n)))}function Ay(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function rA(e,t,n){if(t<=0)return e;let o=e.content;return t>1&&(o=o.replaceChild(0,rA(o.firstChild,t-1,o.childCount==1?n-1:0))),t>0&&(o=e.type.contentMatch.fillBefore(o).append(o),n<=0&&(o=o.append(e.type.contentMatch.matchFragment(o).fillBefore(We.empty,!0)))),e.copy(o)}function Ny(e,t,n,o,r){let s=e.node(t),i=r?e.indexAfter(t):e.index(t);if(i==s.childCount&&!n.compatibleContent(s.type))return null;let l=o.fillBefore(s.content,!0,i);return l&&!C0e(n,s.content,i)?l:null}function C0e(e,t,n){for(let o=n;o<t.childCount;o++)if(!e.allowsMarks(t.child(o).marks))return!0;return!1}function k0e(e){return e.spec.defining||e.spec.definingForContent}function S0e(e,t,n,o){if(!o.size)return e.deleteRange(t,n);let r=e.doc.resolve(t),s=e.doc.resolve(n);if(oA(r,s,o))return e.step(new oo(t,n,o));let i=iA(r,e.doc.resolve(n));i[i.length-1]==0&&i.pop();let l=-(r.depth+1);i.unshift(l);for(let f=r.depth,p=r.pos-1;f>0;f--,p--){let h=r.node(f).type.spec;if(h.defining||h.definingAsContext||h.isolating)break;i.indexOf(f)>-1?l=f:r.before(f)==p&&i.splice(1,0,-f)}let a=i.indexOf(l),u=[],c=o.openStart;for(let f=o.content,p=0;;p++){let h=f.firstChild;if(u.push(h),p==o.openStart)break;f=h.content}for(let f=c-1;f>=0;f--){let p=u[f],h=k0e(p.type);if(h&&!p.sameMarkup(r.node(Math.abs(l)-1)))c=f;else if(h||!p.type.isTextblock)break}for(let f=o.openStart;f>=0;f--){let p=(f+c+1)%(o.openStart+1),h=u[p];if(h)for(let m=0;m<i.length;m++){let y=i[(m+a)%i.length],v=!0;y<0&&(v=!1,y=-y);let k=r.node(y-1),b=r.index(y-1);if(k.canReplaceWith(b,b,h.type,h.marks))return e.replace(r.before(y),v?s.after(y):n,new Je(sA(o.content,0,o.openStart,p),p,o.openEnd))}}let d=e.steps.length;for(let f=i.length-1;f>=0&&(e.replace(t,n,o),!(e.steps.length>d));f--){let p=i[f];p<0||(t=r.before(p),n=s.after(p))}}function sA(e,t,n,o,r){if(t<n){let s=e.firstChild;e=e.replaceChild(0,s.copy(sA(s.content,t+1,n,o,s)))}if(t>o){let s=r.contentMatchAt(0),i=s.fillBefore(e).append(e);e=i.append(s.matchFragment(i).fillBefore(We.empty,!0))}return e}function $0e(e,t,n,o){if(!o.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let r=_0e(e.doc,t,o.type);r!=null&&(t=n=r)}e.replaceRange(t,n,new Je(We.from(o),0,0))}function E0e(e,t,n){let o=e.doc.resolve(t),r=e.doc.resolve(n),s=iA(o,r);for(let i=0;i<s.length;i++){let l=s[i],a=i==s.length-1;if(a&&l==0||o.node(l).type.contentMatch.validEnd)return e.delete(o.start(l),r.end(l));if(l>0&&(a||o.node(l-1).canReplace(o.index(l-1),r.indexAfter(l-1))))return e.delete(o.before(l),r.after(l))}for(let i=1;i<=o.depth&&i<=r.depth;i++)if(t-o.start(i)==o.depth-i&&n>o.end(i)&&r.end(i)-n!=r.depth-i)return e.delete(o.before(i),n);e.delete(t,n)}function iA(e,t){let n=[],o=Math.min(e.depth,t.depth);for(let r=o;r>=0;r--){let s=e.start(r);if(s<e.pos-(e.depth-r)||t.end(r)>t.pos+(t.depth-r)||e.node(r).type.spec.isolating||t.node(r).type.spec.isolating)break;(s==t.start(r)||r==e.depth&&r==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&r&&t.start(r-1)==s-1)&&n.push(r)}return n}class xc extends wo{constructor(t,n,o){super(),this.pos=t,this.attr=n,this.value=o}apply(t){let n=t.nodeAt(this.pos);if(!n)return Fn.fail("No node at attribute step's position");let o=Object.create(null);for(let s in n.attrs)o[s]=n.attrs[s];o[this.attr]=this.value;let r=n.type.create(o,null,n.marks);return Fn.fromReplace(t,this.pos,this.pos+1,new Je(We.from(r),0,n.isLeaf?0:1))}getMap(){return cr.empty}invert(t){return new xc(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 xc(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 xc(n.pos,n.attr,n.value)}}wo.jsonID("attr",xc);class jp extends wo{constructor(t,n){super(),this.attr=t,this.value=n}apply(t){let n=Object.create(null);for(let r in t.attrs)n[r]=t.attrs[r];n[this.attr]=this.value;let o=t.type.create(n,t.content,t.marks);return Fn.ok(o)}getMap(){return cr.empty}invert(t){return new jp(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new jp(n.attr,n.value)}}wo.jsonID("docAttr",jp);let dd=class extends Error{};dd=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n};dd.prototype=Object.create(Error.prototype);dd.prototype.constructor=dd;dd.prototype.name="TransformError";class lA{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new Ec}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let n=this.maybeStep(t);if(n.failed)throw new dd(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,o=Je.empty){let r=fC(this.doc,t,n,o);return r&&this.step(r),this}replaceWith(t,n,o){return this.replace(t,n,new Je(We.from(o),0,0))}delete(t,n){return this.replace(t,n,Je.empty)}insert(t,n){return this.replaceWith(t,t,n)}replaceRange(t,n,o){return S0e(this,t,n,o),this}replaceRangeWith(t,n,o){return $0e(this,t,n,o),this}deleteRange(t,n){return E0e(this,t,n),this}lift(t,n){return l0e(this,t,n),this}join(t,n=1){return y0e(this,t,n),this}wrap(t,n){return c0e(this,t,n),this}setBlockType(t,n=t,o,r=null){return d0e(this,t,n,o,r),this}setNodeMarkup(t,n,o=null,r){return m0e(this,t,n,o,r),this}setNodeAttribute(t,n,o){return this.step(new xc(t,n,o)),this}setDocAttribute(t,n){return this.step(new jp(t,n)),this}addNodeMark(t,n){return this.step(new Il(t,n)),this}removeNodeMark(t,n){if(!(n instanceof Yt)){let o=this.doc.nodeAt(t);if(!o)throw new RangeError("No node at position "+t);if(n=n.isInSet(o.marks),!n)return this}return this.step(new cd(t,n)),this}split(t,n=1,o){return g0e(this,t,n,o),this}addMark(t,n,o){return r0e(this,t,n,o),this}removeMark(t,n,o){return s0e(this,t,n,o),this}clearIncompatible(t,n,o){return nA(this,t,n,o),this}}const Py=Object.create(null);class bt{constructor(t,n,o){this.$anchor=t,this.$head=n,this.ranges=o||[new Zg(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=Je.empty){let o=n.content.lastChild,r=null;for(let l=0;l<n.openEnd;l++)r=o,o=o.lastChild;let s=t.steps.length,i=this.ranges;for(let l=0;l<i.length;l++){let{$from:a,$to:u}=i[l],c=t.mapping.slice(s);t.replaceRange(c.map(a.pos),c.map(u.pos),l?Je.empty:n),l==0&&DS(t,s,(o?o.isInline:r&&r.isTextblock)?-1:1)}}replaceWith(t,n){let o=t.steps.length,r=this.ranges;for(let s=0;s<r.length;s++){let{$from:i,$to:l}=r[s],a=t.mapping.slice(o),u=a.map(i.pos),c=a.map(l.pos);s?t.deleteRange(u,c):(t.replaceRangeWith(u,c,n),DS(t,o,n.isInline?-1:1))}}static findFrom(t,n,o=!1){let r=t.parent.inlineContent?new ht(t):Xu(t.node(0),t.parent,t.pos,t.index(),n,o);if(r)return r;for(let s=t.depth-1;s>=0;s--){let i=n<0?Xu(t.node(0),t.node(s),t.before(s+1),t.index(s),n,o):Xu(t.node(0),t.node(s),t.after(s+1),t.index(s)+1,n,o);if(i)return i}return null}static near(t,n=1){return this.findFrom(t,n)||this.findFrom(t,-n)||new gr(t.node(0))}static atStart(t){return Xu(t,t,0,0,1)||new gr(t)}static atEnd(t){return Xu(t,t,t.content.size,t.childCount,-1)||new gr(t)}static fromJSON(t,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let o=Py[n.type];if(!o)throw new RangeError(`No selection type ${n.type} defined`);return o.fromJSON(t,n)}static jsonID(t,n){if(t in Py)throw new RangeError("Duplicate use of selection JSON ID "+t);return Py[t]=n,n.prototype.jsonID=t,n}getBookmark(){return ht.between(this.$anchor,this.$head).getBookmark()}}bt.prototype.visible=!0;class Zg{constructor(t,n){this.$from=t,this.$to=n}}let LS=!1;function RS(e){!LS&&!e.parent.inlineContent&&(LS=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class ht extends bt{constructor(t,n=t){RS(t),RS(n),super(t,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,n){let o=t.resolve(n.map(this.head));if(!o.parent.inlineContent)return bt.near(o);let r=t.resolve(n.map(this.anchor));return new ht(r.parent.inlineContent?r:o,o)}replace(t,n=Je.empty){if(super.replace(t,n),n==Je.empty){let o=this.$from.marksAcross(this.$to);o&&t.ensureMarks(o)}}eq(t){return t instanceof ht&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new dv(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 ht(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,o=n){let r=t.resolve(n);return new this(r,o==n?r:t.resolve(o))}static between(t,n,o){let r=t.pos-n.pos;if((!o||r)&&(o=r>=0?1:-1),!n.parent.inlineContent){let s=bt.findFrom(n,o,!0)||bt.findFrom(n,-o,!0);if(s)n=s.$head;else return bt.near(n,o)}return t.parent.inlineContent||(r==0?t=n:(t=(bt.findFrom(t,-o,!0)||bt.findFrom(t,o,!0)).$anchor,t.pos<n.pos!=r<0&&(t=n))),new ht(t,n)}}bt.jsonID("text",ht);class dv{constructor(t,n){this.anchor=t,this.head=n}map(t){return new dv(t.map(this.anchor),t.map(this.head))}resolve(t){return ht.between(t.resolve(this.anchor),t.resolve(this.head))}}class mt extends bt{constructor(t){let n=t.nodeAfter,o=t.node(0).resolve(t.pos+n.nodeSize);super(t,o),this.node=n}map(t,n){let{deleted:o,pos:r}=n.mapResult(this.anchor),s=t.resolve(r);return o?bt.near(s):new mt(s)}content(){return new Je(We.from(this.node),0,0)}eq(t){return t instanceof mt&&t.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new pC(this.anchor)}static fromJSON(t,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new mt(t.resolve(n.anchor))}static create(t,n){return new mt(t.resolve(n))}static isSelectable(t){return!t.isText&&t.type.spec.selectable!==!1}}mt.prototype.visible=!1;bt.jsonID("node",mt);class pC{constructor(t){this.anchor=t}map(t){let{deleted:n,pos:o}=t.mapResult(this.anchor);return n?new dv(o,o):new pC(o)}resolve(t){let n=t.resolve(this.anchor),o=n.nodeAfter;return o&&mt.isSelectable(o)?new mt(n):bt.near(n)}}class gr extends bt{constructor(t){super(t.resolve(0),t.resolve(t.content.size))}replace(t,n=Je.empty){if(n==Je.empty){t.delete(0,t.doc.content.size);let o=bt.atStart(t.doc);o.eq(t.selection)||t.setSelection(o)}else super.replace(t,n)}toJSON(){return{type:"all"}}static fromJSON(t){return new gr(t)}map(t){return new gr(t)}eq(t){return t instanceof gr}getBookmark(){return x0e}}bt.jsonID("all",gr);const x0e={map(){return this},resolve(e){return new gr(e)}};function Xu(e,t,n,o,r,s=!1){if(t.inlineContent)return ht.create(e,n);for(let i=o-(r>0?0:1);r>0?i<t.childCount:i>=0;i+=r){let l=t.child(i);if(l.isAtom){if(!s&&mt.isSelectable(l))return mt.create(e,n-(r<0?l.nodeSize:0))}else{let a=Xu(e,l,n+r,r<0?l.childCount:0,r,s);if(a)return a}n+=l.nodeSize*r}return null}function DS(e,t,n){let o=e.steps.length-1;if(o<t)return;let r=e.steps[o];if(!(r instanceof oo||r instanceof vo))return;let s=e.mapping.maps[o],i;s.forEach((l,a,u,c)=>{i==null&&(i=c)}),e.setSelection(bt.near(e.doc.resolve(i),n))}const VS=1,Em=2,FS=4;class T0e extends lA{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(t){if(t.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=t,this.curSelectionFor=this.steps.length,this.updated=(this.updated|VS)&~Em,this.storedMarks=null,this}get selectionSet(){return(this.updated&VS)>0}setStoredMarks(t){return this.storedMarks=t,this.updated|=Em,this}ensureMarks(t){return Yt.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&Em)>0}addStep(t,n){super.addStep(t,n),this.updated=this.updated&~Em,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,n=!0){let o=this.selection;return n&&(t=t.mark(this.storedMarks||(o.empty?o.$from.marks():o.$from.marksAcross(o.$to)||Yt.none))),o.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,n,o){let r=this.doc.type.schema;if(n==null)return t?this.replaceSelectionWith(r.text(t),!0):this.deleteSelection();{if(o==null&&(o=n),o=o??n,!t)return this.deleteRange(n,o);let s=this.storedMarks;if(!s){let i=this.doc.resolve(n);s=o==n?i.marks():i.marksAcross(this.doc.resolve(o))}return this.replaceRangeWith(n,o,r.text(t,s)),this.selection.empty||this.setSelection(bt.near(this.selection.$to)),this}}setMeta(t,n){return this.meta[typeof t=="string"?t:t.key]=n,this}getMeta(t){return this.meta[typeof t=="string"?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=FS,this}get scrolledIntoView(){return(this.updated&FS)>0}}function BS(e,t){return!t||!e?e:e.bind(t)}class vf{constructor(t,n,o){this.name=t,this.init=BS(n.init,o),this.apply=BS(n.apply,o)}}const M0e=[new vf("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new vf("selection",{init(e,t){return e.selection||bt.atStart(t.doc)},apply(e){return e.selection}}),new vf("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,n,o){return o.selection.$cursor?e.storedMarks:null}}),new vf("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})];class Ly{constructor(t,n){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=M0e.slice(),n&&n.forEach(o=>{if(this.pluginsByKey[o.key])throw new RangeError("Adding different instances of a keyed plugin ("+o.key+")");this.plugins.push(o),this.pluginsByKey[o.key]=o,o.spec.state&&this.fields.push(new vf(o.key,o.spec.state,o))})}}class Va{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,n=-1){for(let o=0;o<this.config.plugins.length;o++)if(o!=n){let r=this.config.plugins[o];if(r.spec.filterTransaction&&!r.spec.filterTransaction.call(r,t,this))return!1}return!0}applyTransaction(t){if(!this.filterTransaction(t))return{state:this,transactions:[]};let n=[t],o=this.applyInner(t),r=null;for(;;){let s=!1;for(let i=0;i<this.config.plugins.length;i++){let l=this.config.plugins[i];if(l.spec.appendTransaction){let a=r?r[i].n:0,u=r?r[i].state:this,c=a<n.length&&l.spec.appendTransaction.call(l,a?n.slice(a):n,u,o);if(c&&o.filterTransaction(c,i)){if(c.setMeta("appendedTransaction",t),!r){r=[];for(let d=0;d<this.config.plugins.length;d++)r.push(d<i?{state:o,n:n.length}:{state:this,n:0})}n.push(c),o=o.applyInner(c),s=!0}r&&(r[i]={state:o,n:n.length})}}if(!s)return{state:o,transactions:n}}}applyInner(t){if(!t.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new Va(this.config),o=this.config.fields;for(let r=0;r<o.length;r++){let s=o[r];n[s.name]=s.apply(t,this[s.name],this,n)}return n}get tr(){return new T0e(this)}static create(t){let n=new Ly(t.doc?t.doc.type.schema:t.schema,t.plugins),o=new Va(n);for(let r=0;r<n.fields.length;r++)o[n.fields[r].name]=n.fields[r].init(t,o);return o}reconfigure(t){let n=new Ly(this.schema,t.plugins),o=n.fields,r=new Va(n);for(let s=0;s<o.length;s++){let i=o[s].name;r[i]=this.hasOwnProperty(i)?this[i]:o[s].init(t,r)}return r}toJSON(t){let n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.storedMarks=this.storedMarks.map(o=>o.toJSON())),t&&typeof t=="object")for(let o in t){if(o=="doc"||o=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let r=t[o],s=r.spec.state;s&&s.toJSON&&(n[o]=s.toJSON.call(r,this[r.key]))}return n}static fromJSON(t,n,o){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let r=new Ly(t.schema,t.plugins),s=new Va(r);return r.fields.forEach(i=>{if(i.name=="doc")s.doc=Rl.fromJSON(t.schema,n.doc);else if(i.name=="selection")s.selection=bt.fromJSON(s.doc,n.selection);else if(i.name=="storedMarks")n.storedMarks&&(s.storedMarks=n.storedMarks.map(t.schema.markFromJSON));else{if(o)for(let l in o){let a=o[l],u=a.spec.state;if(a.key==i.name&&u&&u.fromJSON&&Object.prototype.hasOwnProperty.call(n,l)){s[i.name]=u.fromJSON.call(a,t,n[l],s);return}}s[i.name]=i.init(t,s)}}),s}}function aA(e,t,n){for(let o in e){let r=e[o];r instanceof Function?r=r.bind(t):o=="handleDOMEvents"&&(r=aA(r,t,{})),n[o]=r}return n}class On{constructor(t){this.spec=t,this.props={},t.props&&aA(t.props,this,this.props),this.key=t.key?t.key.key:uA("plugin")}getState(t){return t[this.key]}}const Ry=Object.create(null);function uA(e){return e in Ry?e+"$"+ ++Ry[e]:(Ry[e]=0,e+"$")}class wn{constructor(t="key"){this.key=uA(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}class Cr{constructor(t,n,o={}){this.match=t,this.match=t,this.handler=typeof n=="string"?O0e(n):n,this.undoable=o.undoable!==!1,this.inCode=o.inCode||!1}}function O0e(e){return function(t,n,o,r){let s=e;if(n[1]){let i=n[0].lastIndexOf(n[1]);s+=n[0].slice(i+n[1].length),o+=i;let l=o-r;l>0&&(s=n[0].slice(i-l,i)+s,o=r)}return t.tr.insertText(s,o,r)}}const I0e=(e,t)=>{let n=e.plugins;for(let o=0;o<n.length;o++){let r=n[o],s;if(r.spec.isInputRules&&(s=r.getState(e))){if(t){let i=e.tr,l=s.transform;for(let a=l.steps.length-1;a>=0;a--)i.step(l.steps[a].invert(l.docs[a]));if(s.text){let a=i.doc.resolve(s.from).marks();i.replaceWith(s.from,s.to,e.schema.text(s.text,a))}else i.delete(s.from,s.to);t(i)}return!0}}return!1};new Cr(/--$/,"—");new Cr(/\.\.\.$/,"…");new Cr(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"“");new Cr(/"$/,"”");new Cr(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"‘");new Cr(/'$/,"’");function hC(e,t,n=null,o){return new Cr(e,(r,s,i,l)=>{let a=n instanceof Function?n(s):n,u=r.tr.delete(i,l),c=u.doc.resolve(i),d=c.blockRange(),f=d&&dC(d,t,a);if(!f)return null;u.wrap(d,f);let p=u.doc.resolve(i-1).nodeBefore;return p&&p.type==t&&cv(u.doc,i-1)&&(!o||o(s,p))&&u.join(i-1),u})}function cA(e,t,n=null){return new Cr(e,(o,r,s,i)=>{let l=o.doc.resolve(s),a=n instanceof Function?n(r):n;return l.node(-1).canReplaceWith(l.index(-1),l.indexAfter(-1),t)?o.tr.delete(s,i).setBlockType(s,s,t,a):null})}const Kl=typeof navigator<"u"?navigator:null,zS=typeof document<"u"?document:null,ia=Kl&&Kl.userAgent||"",Qb=/Edge\/(\d+)/.exec(ia),dA=/MSIE \d/.exec(ia),e2=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ia),fv=!!(dA||e2||Qb),A0e=dA?document.documentMode:e2?+e2[1]:Qb?+Qb[1]:0,fA=!fv&&/gecko\/(\d+)/i.test(ia),N0e=fA&&+(/Firefox\/(\d+)/.exec(ia)||[0,0])[1],t2=!fv&&/Chrome\/(\d+)/.exec(ia),P0e=!!t2,L0e=t2?+t2[1]:0,pA=!fv&&!!Kl&&/Apple Computer/.test(Kl.vendor),hA=pA&&(/Mobile\/\w+/.test(ia)||!!Kl&&Kl.maxTouchPoints>2),R0e=hA||(Kl?/Mac/.test(Kl.platform):!1),D0e=/Android \d/.test(ia),mA=!!zS&&"webkitFontSmoothing"in zS.documentElement.style,V0e=mA?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;var xm=Object.freeze({__proto__:null,android:D0e,chrome:P0e,chrome_version:L0e,gecko:fA,gecko_version:N0e,ie:fv,ie_version:A0e,ios:hA,mac:R0e,safari:pA,webkit:mA,webkit_version:V0e});function Dy(e,t,n,o,r,s){if(e.composing)return!1;const i=e.state,l=i.doc.resolve(t);if(l.parent.type.spec.code)return!1;const a=l.parent.textBetween(Math.max(0,l.parentOffset-500),l.parentOffset,void 0,"")+o;for(let u=0;u<r.length;u++){const c=r[u].match.exec(a),d=c&&c[0]&&r[u].handler(i,c,t-(c[0].length-o.length),n);if(d)return e.dispatch(d.setMeta(s,{transform:d,from:t,to:n,text:o})),!0}return!1}const F0e=new wn("MILKDOWN_CUSTOM_INPUTRULES");function B0e({rules:e}){const t=new On({key:F0e,isInputRules:!0,state:{init(){return null},apply(n,o){const r=n.getMeta(this);return r||(n.selectionSet||n.docChanged?null:o)}},props:{handleTextInput(n,o,r,s){return Dy(n,o,r,s,e,t)},handleDOMEvents:{compositionend:n=>(setTimeout(()=>{const{$cursor:o}=n.state.selection;o&&Dy(n,o.pos,o.pos,"",e,t)}),!1)},handleKeyDown(n,o){if(o.key!=="Enter")return!1;const{$cursor:r}=n.state.selection;return r?Dy(n,r.pos,r.pos,` |
| 113 |
`,e,t):!1}}});return t}function Th(e,t,n={}){return new Cr(e,(o,r,s,i)=>{var l,a,u,c;const{tr:d}=o,f=r.length;let p=r[f-1],h=r[0],m=[],y=i;const v={group:p,fullMatch:h,start:s,end:i},k=(l=n.updateCaptured)==null?void 0:l.call(n,v);if(Object.assign(v,k),{group:p,fullMatch:h,start:s,end:i}=v,h===null||(p==null?void 0:p.trim())==="")return null;if(p){const b=h.search(/\S/),$=s+h.indexOf(p),x=$+p.length;m=(a=d.storedMarks)!=null?a:[],x<i&&d.delete(x,i),$>s&&d.delete(s+b,$),y=s+b+p.length;const E=(u=n.getAttr)==null?void 0:u.call(n,r);d.addMark(s,y,t.create(E)),d.setStoredMarks(m),(c=n.beforeDispatch)==null||c.call(n,{match:r,start:s,end:i,tr:d})}return d})}var z0e=Object.defineProperty,j0e=Object.defineProperties,H0e=Object.getOwnPropertyDescriptors,jS=Object.getOwnPropertySymbols,U0e=Object.prototype.hasOwnProperty,W0e=Object.prototype.propertyIsEnumerable,HS=(e,t,n)=>t in e?z0e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,K0e=(e,t)=>{for(var n in t||(t={}))U0e.call(t,n)&&HS(e,n,t[n]);if(jS)for(var n of jS(t))W0e.call(t,n)&&HS(e,n,t[n]);return e},q0e=(e,t)=>j0e(e,H0e(t));function US(e=0,t=0,n=0){return Math.min(Math.max(e,t),n)}function pv(e,t,n){const r=e.state.doc.content.size,s=US(t,0,r),i=US(n,0,r),l=e.coordsAtPos(s),a=e.coordsAtPos(i,-1),u=Math.min(l.top,a.top),c=Math.max(l.bottom,a.bottom),d=Math.min(l.left,a.left),f=Math.max(l.right,a.right),p=f-d,h=c-u,v={top:u,bottom:c,left:d,right:f,width:p,height:h,x:d,y:u};return q0e(K0e({},v),{toJSON:()=>v})}function hv(e){return Object.assign(Object.create(e),e).setTime(Date.now())}function G0e(e,t){return Array.isArray(e)&&e.includes(t.type)||t.type===e}function mC(e){return t=>{for(let n=t.depth;n>0;n-=1){const o=t.node(n);if(e(o)){const r=t.before(n),s=t.after(n);return{from:r,to:s,node:o}}}}}function Y0e(e,t){return mC(n=>n.type===t)(e)}function Z0e(e,t){const n=t.nodes[e];if(!n)throw Kpe("node",e);return n}function gC(e){return t=>{for(let n=t.depth;n>0;n--){const o=t.node(n);if(e(o))return{pos:n>0?t.before(n):0,start:t.start(n),depth:n,node:o}}}}function J0e(e){return t=>gC(e)(t.$from)}function X0e(e,t){if(!(e instanceof mt))return;const{node:n,$from:o}=e;if(G0e(t,n))return{node:n,pos:o.pos,start:o.start(o.depth),depth:o.depth}}const vC=(e,t)=>e.selection.empty?!1:(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function Q0e(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("backward",e):n.parentOffset>0)?null:n}const gA=(e,t,n)=>{let o=Q0e(e,n);if(!o)return!1;let r=yA(o);if(!r){let i=o.blockRange(),l=i&&uv(i);return l==null?!1:(t&&t(e.tr.lift(i,l).scrollIntoView()),!0)}let s=r.nodeBefore;if(bA(e,r,t,-1))return!0;if(o.parent.content.size==0&&(fd(s,"end")||mt.isSelectable(s)))for(let i=o.depth;;i--){let l=fC(e.doc,o.before(i),o.after(i),Je.empty);if(l&&l.slice.size<l.to-l.from){if(t){let a=e.tr.step(l);a.setSelection(fd(s,"end")?bt.findFrom(a.doc.resolve(a.mapping.map(r.pos,-1)),-1):mt.create(a.doc,r.pos-s.nodeSize)),t(a.scrollIntoView())}return!0}if(i==1||o.node(i-1).childCount>1)break}return s.isAtom&&r.depth==o.depth-1?(t&&t(e.tr.delete(r.pos-s.nodeSize,r.pos).scrollIntoView()),!0):!1};function fd(e,t,n=!1){for(let o=e;o;o=t=="start"?o.firstChild:o.lastChild){if(o.isTextblock)return!0;if(n&&o.childCount!=1)return!1}return!1}const vA=(e,t,n)=>{let{$head:o,empty:r}=e.selection,s=o;if(!r)return!1;if(o.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):o.parentOffset>0)return!1;s=yA(o)}let i=s&&s.nodeBefore;return!i||!mt.isSelectable(i)?!1:(t&&t(e.tr.setSelection(mt.create(e.doc,s.pos-i.nodeSize)).scrollIntoView()),!0)};function yA(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 eve(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("forward",e):n.parentOffset<n.parent.content.size)?null:n}const tve=(e,t,n)=>{let o=eve(e,n);if(!o)return!1;let r=_A(o);if(!r)return!1;let s=r.nodeAfter;if(bA(e,r,t,1))return!0;if(o.parent.content.size==0&&(fd(s,"start")||mt.isSelectable(s))){let i=fC(e.doc,o.before(),o.after(),Je.empty);if(i&&i.slice.size<i.to-i.from){if(t){let l=e.tr.step(i);l.setSelection(fd(s,"start")?bt.findFrom(l.doc.resolve(l.mapping.map(r.pos)),1):mt.create(l.doc,l.mapping.map(r.pos))),t(l.scrollIntoView())}return!0}}return s.isAtom&&r.depth==o.depth-1?(t&&t(e.tr.delete(r.pos,r.pos+s.nodeSize).scrollIntoView()),!0):!1},nve=(e,t,n)=>{let{$head:o,empty:r}=e.selection,s=o;if(!r)return!1;if(o.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):o.parentOffset<o.parent.content.size)return!1;s=_A(o)}let i=s&&s.nodeAfter;return!i||!mt.isSelectable(i)?!1:(t&&t(e.tr.setSelection(mt.create(e.doc,s.pos)).scrollIntoView()),!0)};function _A(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 ove=(e,t)=>{let{$head:n,$anchor:o}=e.selection;return!n.parent.type.spec.code||!n.sameParent(o)?!1:(t&&t(e.tr.insertText(` |
| 114 |
`).scrollIntoView()),!0)};function yC(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 rve=(e,t)=>{let{$head:n,$anchor:o}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(o))return!1;let r=n.node(-1),s=n.indexAfter(-1),i=yC(r.contentMatchAt(s));if(!i||!r.canReplaceWith(s,s,i))return!1;if(t){let l=n.after(),a=e.tr.replaceWith(l,l,i.createAndFill());a.setSelection(bt.near(a.doc.resolve(l),1)),t(a.scrollIntoView())}return!0},sve=(e,t)=>{let n=e.selection,{$from:o,$to:r}=n;if(n instanceof gr||o.parent.inlineContent||r.parent.inlineContent)return!1;let s=yC(r.parent.contentMatchAt(r.indexAfter()));if(!s||!s.isTextblock)return!1;if(t){let i=(!o.parentOffset&&r.index()<r.parent.childCount?o:r).pos,l=e.tr.insert(i,s.createAndFill());l.setSelection(ht.create(l.doc,i+1)),t(l.scrollIntoView())}return!0},ive=(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 s=n.before();if(np(e.doc,s))return t&&t(e.tr.split(s).scrollIntoView()),!0}let o=n.blockRange(),r=o&&uv(o);return r==null?!1:(t&&t(e.tr.lift(o,r).scrollIntoView()),!0)};function lve(e){return(t,n)=>{let{$from:o,$to:r}=t.selection;if(t.selection instanceof mt&&t.selection.node.isBlock)return!o.parentOffset||!np(t.doc,o.pos)?!1:(n&&n(t.tr.split(o.pos).scrollIntoView()),!0);if(!o.parent.isBlock)return!1;if(n){let s=r.parentOffset==r.parent.content.size,i=t.tr;(t.selection instanceof ht||t.selection instanceof gr)&&i.deleteSelection();let l=o.depth==0?null:yC(o.node(-1).contentMatchAt(o.indexAfter(-1))),a=e&&e(r.parent,s,o),u=a?[a]:s&&l?[{type:l}]:void 0,c=np(i.doc,i.mapping.map(o.pos),1,u);if(!u&&!c&&np(i.doc,i.mapping.map(o.pos),1,l?[{type:l}]:void 0)&&(l&&(u=[{type:l}]),c=!0),c&&(i.split(i.mapping.map(o.pos),1,u),!s&&!o.parentOffset&&o.parent.type!=l)){let d=i.mapping.map(o.before()),f=i.doc.resolve(d);l&&o.node(-1).canReplaceWith(f.index(),f.index()+1,l)&&i.setNodeMarkup(i.mapping.map(o.before()),l)}n(i.scrollIntoView())}return!0}}const ave=lve(),uve=(e,t)=>(t&&t(e.tr.setSelection(new gr(e.doc))),!0);function cve(e,t,n){let o=t.nodeBefore,r=t.nodeAfter,s=t.index();return!o||!r||!o.type.compatibleContent(r.type)?!1:!o.content.size&&t.parent.canReplace(s-1,s)?(n&&n(e.tr.delete(t.pos-o.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(s,s+1)||!(r.isTextblock||cv(e.doc,t.pos))?!1:(n&&n(e.tr.clearIncompatible(t.pos,o.type,o.contentMatchAt(o.childCount)).join(t.pos).scrollIntoView()),!0)}function bA(e,t,n,o){let r=t.nodeBefore,s=t.nodeAfter,i,l,a=r.type.spec.isolating||s.type.spec.isolating;if(!a&&cve(e,t,n))return!0;let u=!a&&t.parent.canReplace(t.index(),t.index()+1);if(u&&(i=(l=r.contentMatchAt(r.childCount)).findWrapping(s.type))&&l.matchType(i[0]||s.type).validEnd){if(n){let p=t.pos+s.nodeSize,h=We.empty;for(let v=i.length-1;v>=0;v--)h=We.from(i[v].create(null,h));h=We.from(r.copy(h));let m=e.tr.step(new vo(t.pos-1,p,t.pos,p,new Je(h,1,0),i.length,!0)),y=p+2*i.length;cv(m.doc,y)&&m.join(y),n(m.scrollIntoView())}return!0}let c=s.type.spec.isolating||o>0&&a?null:bt.findFrom(t,1),d=c&&c.$from.blockRange(c.$to),f=d&&uv(d);if(f!=null&&f>=t.depth)return n&&n(e.tr.lift(d,f).scrollIntoView()),!0;if(u&&fd(s,"start",!0)&&fd(r,"end")){let p=r,h=[];for(;h.push(p),!p.isTextblock;)p=p.lastChild;let m=s,y=1;for(;!m.isTextblock;m=m.firstChild)y++;if(p.canReplace(p.childCount,p.childCount,m.content)){if(n){let v=We.empty;for(let b=h.length-1;b>=0;b--)v=We.from(h[b].copy(v));let k=e.tr.step(new vo(t.pos-h.length,t.pos+s.nodeSize,t.pos+y,t.pos+s.nodeSize-y,new Je(v,h.length,0),0,!0));n(k.scrollIntoView())}return!0}}return!1}function wA(e){return function(t,n){let o=t.selection,r=e<0?o.$from:o.$to,s=r.depth;for(;r.node(s).isInline;){if(!s)return!1;s--}return r.node(s).isTextblock?(n&&n(t.tr.setSelection(ht.create(t.doc,e<0?r.start(s):r.end(s)))),!0):!1}}const dve=wA(-1),fve=wA(1);function _C(e,t=null){return function(n,o){let{$from:r,$to:s}=n.selection,i=r.blockRange(s),l=i&&dC(i,e,t);return l?(o&&o(n.tr.wrap(i,l).scrollIntoView()),!0):!1}}function Hp(e,t=null){return function(n,o){let r=!1;for(let s=0;s<n.selection.ranges.length&&!r;s++){let{$from:{pos:i},$to:{pos:l}}=n.selection.ranges[s];n.doc.nodesBetween(i,l,(a,u)=>{if(r)return!1;if(!(!a.isTextblock||a.hasMarkup(e,t)))if(a.type==e)r=!0;else{let c=n.doc.resolve(u),d=c.index();r=c.parent.canReplaceWith(d,d+1,e)}})}if(!r)return!1;if(o){let s=n.tr;for(let i=0;i<n.selection.ranges.length;i++){let{$from:{pos:l},$to:{pos:a}}=n.selection.ranges[i];s.setBlockType(l,a,e,t)}o(s.scrollIntoView())}return!0}}function pve(e,t,n,o){for(let r=0;r<t.length;r++){let{$from:s,$to:i}=t[r],l=s.depth==0?e.inlineContent&&e.type.allowsMarkType(n):!1;if(e.nodesBetween(s.pos,i.pos,(a,u)=>{if(l||!o&&a.isAtom&&a.isInline&&u>=s.pos&&u+a.nodeSize<=i.pos)return!1;l=a.inlineContent&&a.type.allowsMarkType(n)}),l)return!0}return!1}function hve(e){let t=[];for(let n=0;n<e.length;n++){let{$from:o,$to:r}=e[n];o.doc.nodesBetween(o.pos,r.pos,(s,i)=>{if(s.isAtom&&s.content.size&&s.isInline&&i>=o.pos&&i+s.nodeSize<=r.pos)return i+1>o.pos&&t.push(new Zg(o,o.doc.resolve(i+1))),o=o.doc.resolve(i+1+s.content.size),!1}),o.pos<r.pos&&t.push(new Zg(o,r))}return t}function mv(e,t=null,n){let o=(n&&n.removeWhenPresent)!==!1,r=(n&&n.enterInlineAtoms)!==!1;return function(s,i){let{empty:l,$cursor:a,ranges:u}=s.selection;if(l&&!a||!pve(s.doc,u,e,r))return!1;if(i)if(a)e.isInSet(s.storedMarks||a.marks())?i(s.tr.removeStoredMark(e)):i(s.tr.addStoredMark(e.create(t)));else{let c,d=s.tr;r||(u=hve(u)),o?c=!u.some(f=>s.doc.rangeHasMark(f.$from.pos,f.$to.pos,e)):c=!u.every(f=>{let p=!1;return d.doc.nodesBetween(f.$from.pos,f.$to.pos,(h,m,y)=>{if(p)return!1;p=!e.isInSet(h.marks)&&!!y&&y.type.allowsMarkType(e)&&!(h.isText&&/^\s*$/.test(h.textBetween(Math.max(0,f.$from.pos-m),Math.min(h.nodeSize,f.$to.pos-m))))}),!p});for(let f=0;f<u.length;f++){let{$from:p,$to:h}=u[f];if(!c)d.removeMark(p.pos,h.pos,e);else{let m=p.pos,y=h.pos,v=p.nodeAfter,k=h.nodeBefore,b=v&&v.isText?/^\s*/.exec(v.text)[0].length:0,$=k&&k.isText?/\s*$/.exec(k.text)[0].length:0;m+b<y&&(m+=b,y-=$),d.addMark(m,y,e.create(t))}}i(d.scrollIntoView())}return!0}}function gv(...e){return function(t,n,o){for(let r=0;r<e.length;r++)if(e[r](t,n,o))return!0;return!1}}let Vy=gv(vC,gA,vA),WS=gv(vC,tve,nve);const _i={Enter:gv(ove,sve,ive,ave),"Mod-Enter":rve,Backspace:Vy,"Mod-Backspace":Vy,"Shift-Backspace":Vy,Delete:WS,"Mod-Delete":WS,"Mod-a":uve},CA={"Ctrl-h":_i.Backspace,"Alt-Backspace":_i["Mod-Backspace"],"Ctrl-d":_i.Delete,"Ctrl-Alt-Backspace":_i["Mod-Delete"],"Alt-Delete":_i["Mod-Delete"],"Alt-d":_i["Mod-Delete"],"Ctrl-a":dve,"Ctrl-e":fve};for(let e in _i)CA[e]=_i[e];const mve=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform?os.platform()=="darwin":!1,gve=mve?CA:_i;var ql={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:"'"},Jg={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},vve=typeof navigator<"u"&&/Mac/.test(navigator.platform),yve=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var ro=0;ro<10;ro++)ql[48+ro]=ql[96+ro]=String(ro);for(var ro=1;ro<=24;ro++)ql[ro+111]="F"+ro;for(var ro=65;ro<=90;ro++)ql[ro]=String.fromCharCode(ro+32),Jg[ro]=String.fromCharCode(ro);for(var Fy in ql)Jg.hasOwnProperty(Fy)||(Jg[Fy]=ql[Fy]);function _ve(e){var t=vve&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||yve&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",n=!t&&e.key||(e.shiftKey?Jg:ql)[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 bve=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function wve(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n=="Space"&&(n=" ");let o,r,s,i;for(let l=0;l<t.length-1;l++){let a=t[l];if(/^(cmd|meta|m)$/i.test(a))i=!0;else if(/^a(lt)?$/i.test(a))o=!0;else if(/^(c|ctrl|control)$/i.test(a))r=!0;else if(/^s(hift)?$/i.test(a))s=!0;else if(/^mod$/i.test(a))bve?i=!0:r=!0;else throw new Error("Unrecognized modifier name: "+a)}return o&&(n="Alt-"+n),r&&(n="Ctrl-"+n),i&&(n="Meta-"+n),s&&(n="Shift-"+n),n}function Cve(e){let t=Object.create(null);for(let n in e)t[wve(n)]=e[n];return t}function By(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 kA(e){return new On({props:{handleKeyDown:SA(e)}})}function SA(e){let t=Cve(e);return function(n,o){let r=_ve(o),s,i=t[By(r,o)];if(i&&i(n.state,n.dispatch,n))return!0;if(r.length==1&&r!=" "){if(o.shiftKey){let l=t[By(r,o,!1)];if(l&&l(n.state,n.dispatch,n))return!0}if((o.shiftKey||o.altKey||o.metaKey||r.charCodeAt(0)>127)&&(s=ql[o.keyCode])&&s!=r){let l=t[By(s,o)];if(l&&l(n.state,n.dispatch,n))return!0}}return!1}}const so=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},Up=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t};let n2=null;const yi=function(e,t,n){let o=n2||(n2=document.createRange());return o.setEnd(e,n??e.nodeValue.length),o.setStart(e,t||0),o},kve=function(){n2=null},mu=function(e,t,n,o){return n&&(KS(e,t,n,o,-1)||KS(e,t,n,o,1))},Sve=/^(img|br|input|textarea|hr)$/i;function KS(e,t,n,o,r){for(;;){if(e==n&&t==o)return!0;if(t==(r<0?0:Hs(e))){let s=e.parentNode;if(!s||s.nodeType!=1||Mh(e)||Sve.test(e.nodeName)||e.contentEditable=="false")return!1;t=so(e)+(r<0?0:1),e=s}else if(e.nodeType==1){if(e=e.childNodes[t+(r<0?-1:0)],e.contentEditable=="false")return!1;t=r<0?Hs(e):0}else return!1}}function Hs(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function $ve(e,t){for(;;){if(e.nodeType==3&&t)return e;if(e.nodeType==1&&t>0){if(e.contentEditable=="false")return null;e=e.childNodes[t-1],t=Hs(e)}else if(e.parentNode&&!Mh(e))t=so(e),e=e.parentNode;else return null}}function Eve(e,t){for(;;){if(e.nodeType==3&&t<e.nodeValue.length)return e;if(e.nodeType==1&&t<e.childNodes.length){if(e.contentEditable=="false")return null;e=e.childNodes[t],t=0}else if(e.parentNode&&!Mh(e))t=so(e)+1,e=e.parentNode;else return null}}function xve(e,t,n){for(let o=t==0,r=t==Hs(e);o||r;){if(e==n)return!0;let s=so(e);if(e=e.parentNode,!e)return!1;o=o&&s==0,r=r&&s==Hs(e)}}function Mh(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 vv=function(e){return e.focusNode&&mu(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function Oa(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function Tve(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}function Mve(e,t,n){if(e.caretPositionFromPoint)try{let o=e.caretPositionFromPoint(t,n);if(o)return{node:o.offsetNode,offset:o.offset}}catch{}if(e.caretRangeFromPoint){let o=e.caretRangeFromPoint(t,n);if(o)return{node:o.startContainer,offset:o.startOffset}}}const ei=typeof navigator<"u"?navigator:null,qS=typeof document<"u"?document:null,la=ei&&ei.userAgent||"",o2=/Edge\/(\d+)/.exec(la),$A=/MSIE \d/.exec(la),r2=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(la),Go=!!($A||r2||o2),Dl=$A?document.documentMode:r2?+r2[1]:o2?+o2[1]:0,_s=!Go&&/gecko\/(\d+)/i.test(la);_s&&+(/Firefox\/(\d+)/.exec(la)||[0,0])[1];const s2=!Go&&/Chrome\/(\d+)/.exec(la),mo=!!s2,EA=s2?+s2[1]:0,Ao=!Go&&!!ei&&/Apple Computer/.test(ei.vendor),pd=Ao&&(/Mobile\/\w+/.test(la)||!!ei&&ei.maxTouchPoints>2),Er=pd||(ei?/Mac/.test(ei.platform):!1),Ove=ei?/Win/.test(ei.platform):!1,ss=/Android \d/.test(la),Oh=!!qS&&"webkitFontSmoothing"in qS.documentElement.style,Ive=Oh?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function Ave(e){let t=e.defaultView&&e.defaultView.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function fi(e,t){return typeof e=="number"?e:e[t]}function Nve(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,o=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*o}}function GS(e,t,n){let o=e.someProp("scrollThreshold")||0,r=e.someProp("scrollMargin")||5,s=e.dom.ownerDocument;for(let i=n||e.dom;i;i=Up(i)){if(i.nodeType!=1)continue;let l=i,a=l==s.body,u=a?Ave(s):Nve(l),c=0,d=0;if(t.top<u.top+fi(o,"top")?d=-(u.top-t.top+fi(r,"top")):t.bottom>u.bottom-fi(o,"bottom")&&(d=t.bottom-t.top>u.bottom-u.top?t.top+fi(r,"top")-u.top:t.bottom-u.bottom+fi(r,"bottom")),t.left<u.left+fi(o,"left")?c=-(u.left-t.left+fi(r,"left")):t.right>u.right-fi(o,"right")&&(c=t.right-u.right+fi(r,"right")),c||d)if(a)s.defaultView.scrollBy(c,d);else{let f=l.scrollLeft,p=l.scrollTop;d&&(l.scrollTop+=d),c&&(l.scrollLeft+=c);let h=l.scrollLeft-f,m=l.scrollTop-p;t={left:t.left-h,top:t.top-m,right:t.right-h,bottom:t.bottom-m}}if(a||/^(fixed|sticky)$/.test(getComputedStyle(i).position))break}}function Pve(e){let t=e.dom.getBoundingClientRect(),n=Math.max(0,t.top),o,r;for(let s=(t.left+t.right)/2,i=n+1;i<Math.min(innerHeight,t.bottom);i+=5){let l=e.root.elementFromPoint(s,i);if(!l||l==e.dom||!e.dom.contains(l))continue;let a=l.getBoundingClientRect();if(a.top>=n-20){o=l,r=a.top;break}}return{refDOM:o,refTop:r,stack:xA(e.dom)}}function xA(e){let t=[],n=e.ownerDocument;for(let o=e;o&&(t.push({dom:o,top:o.scrollTop,left:o.scrollLeft}),e!=n);o=Up(o));return t}function Lve({refDOM:e,refTop:t,stack:n}){let o=e?e.getBoundingClientRect().top:0;TA(n,o==0?0:o-t)}function TA(e,t){for(let n=0;n<e.length;n++){let{dom:o,top:r,left:s}=e[n];o.scrollTop!=r+t&&(o.scrollTop=r+t),o.scrollLeft!=s&&(o.scrollLeft=s)}}let Ru=null;function Rve(e){if(e.setActive)return e.setActive();if(Ru)return e.focus(Ru);let t=xA(e);e.focus(Ru==null?{get preventScroll(){return Ru={preventScroll:!0},!0}}:void 0),Ru||(Ru=!1,TA(t,0))}function MA(e,t){let n,o=2e8,r,s=0,i=t.top,l=t.top,a,u;for(let c=e.firstChild,d=0;c;c=c.nextSibling,d++){let f;if(c.nodeType==1)f=c.getClientRects();else if(c.nodeType==3)f=yi(c).getClientRects();else continue;for(let p=0;p<f.length;p++){let h=f[p];if(h.top<=i&&h.bottom>=l){i=Math.max(h.bottom,i),l=Math.min(h.top,l);let m=h.left>t.left?h.left-t.left:h.right<t.left?t.left-h.right:0;if(m<o){n=c,o=m,r=m&&n.nodeType==3?{left:h.right<t.left?h.right:h.left,top:t.top}:t,c.nodeType==1&&m&&(s=d+(t.left>=(h.left+h.right)/2?1:0));continue}}else h.top>t.top&&!a&&h.left<=t.left&&h.right>=t.left&&(a=c,u={left:Math.max(h.left,Math.min(h.right,t.left)),top:h.top});!n&&(t.left>=h.right&&t.top>=h.top||t.left>=h.left&&t.top>=h.bottom)&&(s=d+1)}}return!n&&a&&(n=a,r=u,o=0),n&&n.nodeType==3?Dve(n,r):!n||o&&n.nodeType==1?{node:e,offset:s}:MA(n,r)}function Dve(e,t){let n=e.nodeValue.length,o=document.createRange();for(let r=0;r<n;r++){o.setEnd(e,r+1),o.setStart(e,r);let s=al(o,1);if(s.top!=s.bottom&&bC(t,s))return{node:e,offset:r+(t.left>=(s.left+s.right)/2?1:0)}}return{node:e,offset:0}}function bC(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function Vve(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}function Fve(e,t,n){let{node:o,offset:r}=MA(t,n),s=-1;if(o.nodeType==1&&!o.firstChild){let i=o.getBoundingClientRect();s=i.left!=i.right&&n.left>(i.left+i.right)/2?1:-1}return e.docView.posFromDOM(o,r,s)}function Bve(e,t,n,o){let r=-1;for(let s=t,i=!1;s!=e.dom;){let l=e.docView.nearestDesc(s,!0);if(!l)return null;if(l.dom.nodeType==1&&(l.node.isBlock&&l.parent||!l.contentDOM)){let a=l.dom.getBoundingClientRect();if(l.node.isBlock&&l.parent&&(!i&&a.left>o.left||a.top>o.top?r=l.posBefore:(!i&&a.right<o.left||a.bottom<o.top)&&(r=l.posAfter),i=!0),!l.contentDOM&&r<0&&!l.node.isText)return(l.node.isBlock?o.top<(a.top+a.bottom)/2:o.left<(a.left+a.right)/2)?l.posBefore:l.posAfter}s=l.dom.parentNode}return r>-1?r:e.docView.posFromDOM(t,n,-1)}function OA(e,t,n){let o=e.childNodes.length;if(o&&n.top<n.bottom)for(let r=Math.max(0,Math.min(o-1,Math.floor(o*(t.top-n.top)/(n.bottom-n.top))-2)),s=r;;){let i=e.childNodes[s];if(i.nodeType==1){let l=i.getClientRects();for(let a=0;a<l.length;a++){let u=l[a];if(bC(t,u))return OA(i,t,u)}}if((s=(s+1)%o)==r)break}return e}function zve(e,t){let n=e.dom.ownerDocument,o,r=0,s=Mve(n,t.left,t.top);s&&({node:o,offset:r}=s);let i=(e.root.elementFromPoint?e.root:n).elementFromPoint(t.left,t.top),l;if(!i||!e.dom.contains(i.nodeType!=1?i.parentNode:i)){let u=e.dom.getBoundingClientRect();if(!bC(t,u)||(i=OA(e.dom,t,u),!i))return null}if(Ao)for(let u=i;o&&u;u=Up(u))u.draggable&&(o=void 0);if(i=Vve(i,t),o){if(_s&&o.nodeType==1&&(r=Math.min(r,o.childNodes.length),r<o.childNodes.length)){let c=o.childNodes[r],d;c.nodeName=="IMG"&&(d=c.getBoundingClientRect()).right<=t.left&&d.bottom>t.top&&r++}let u;Oh&&r&&o.nodeType==1&&(u=o.childNodes[r-1]).nodeType==1&&u.contentEditable=="false"&&u.getBoundingClientRect().top>=t.top&&r--,o==e.dom&&r==o.childNodes.length-1&&o.lastChild.nodeType==1&&t.top>o.lastChild.getBoundingClientRect().bottom?l=e.state.doc.content.size:(r==0||o.nodeType!=1||o.childNodes[r-1].nodeName!="BR")&&(l=Bve(e,o,r,t))}l==null&&(l=Fve(e,i,t));let a=e.docView.nearestDesc(i,!0);return{pos:l,inside:a?a.posAtStart-a.border:-1}}function YS(e){return e.top<e.bottom||e.left<e.right}function al(e,t){let n=e.getClientRects();if(n.length){let o=n[t<0?0:n.length-1];if(YS(o))return o}return Array.prototype.find.call(n,YS)||e.getBoundingClientRect()}const jve=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function IA(e,t,n){let{node:o,offset:r,atom:s}=e.docView.domFromPos(t,n<0?-1:1),i=Oh||_s;if(o.nodeType==3)if(i&&(jve.test(o.nodeValue)||(n<0?!r:r==o.nodeValue.length))){let a=al(yi(o,r,r),n);if(_s&&r&&/\s/.test(o.nodeValue[r-1])&&r<o.nodeValue.length){let u=al(yi(o,r-1,r-1),-1);if(u.top==a.top){let c=al(yi(o,r,r+1),-1);if(c.top!=a.top)return Yd(c,c.left<u.left)}}return a}else{let a=r,u=r,c=n<0?1:-1;return n<0&&!r?(u++,c=-1):n>=0&&r==o.nodeValue.length?(a--,c=1):n<0?a--:u++,Yd(al(yi(o,a,u),c),c<0)}if(!e.state.doc.resolve(t-(s||0)).parent.inlineContent){if(s==null&&r&&(n<0||r==Hs(o))){let a=o.childNodes[r-1];if(a.nodeType==1)return zy(a.getBoundingClientRect(),!1)}if(s==null&&r<Hs(o)){let a=o.childNodes[r];if(a.nodeType==1)return zy(a.getBoundingClientRect(),!0)}return zy(o.getBoundingClientRect(),n>=0)}if(s==null&&r&&(n<0||r==Hs(o))){let a=o.childNodes[r-1],u=a.nodeType==3?yi(a,Hs(a)-(i?0:1)):a.nodeType==1&&(a.nodeName!="BR"||!a.nextSibling)?a:null;if(u)return Yd(al(u,1),!1)}if(s==null&&r<Hs(o)){let a=o.childNodes[r];for(;a.pmViewDesc&&a.pmViewDesc.ignoreForCoords;)a=a.nextSibling;let u=a?a.nodeType==3?yi(a,0,i?0:1):a.nodeType==1?a:null:null;if(u)return Yd(al(u,-1),!0)}return Yd(al(o.nodeType==3?yi(o):o,-n),n>=0)}function Yd(e,t){if(e.width==0)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function zy(e,t){if(e.height==0)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function AA(e,t,n){let o=e.state,r=e.root.activeElement;o!=t&&e.updateState(t),r!=e.dom&&e.focus();try{return n()}finally{o!=t&&e.updateState(o),r!=e.dom&&r&&r.focus()}}function Hve(e,t,n){let o=t.selection,r=n=="up"?o.$from:o.$to;return AA(e,t,()=>{let{node:s}=e.docView.domFromPos(r.pos,n=="up"?-1:1);for(;;){let l=e.docView.nearestDesc(s,!0);if(!l)break;if(l.node.isBlock){s=l.contentDOM||l.dom;break}s=l.dom.parentNode}let i=IA(e,r.pos,1);for(let l=s.firstChild;l;l=l.nextSibling){let a;if(l.nodeType==1)a=l.getClientRects();else if(l.nodeType==3)a=yi(l,0,l.nodeValue.length).getClientRects();else continue;for(let u=0;u<a.length;u++){let c=a[u];if(c.bottom>c.top+1&&(n=="up"?i.top-c.top>(c.bottom-i.top)*2:c.bottom-i.bottom>(i.bottom-c.top)*2))return!1}}return!0})}const Uve=/[\u0590-\u08ac]/;function Wve(e,t,n){let{$head:o}=t.selection;if(!o.parent.isTextblock)return!1;let r=o.parentOffset,s=!r,i=r==o.parent.content.size,l=e.domSelection();return l?!Uve.test(o.parent.textContent)||!l.modify?n=="left"||n=="backward"?s:i:AA(e,t,()=>{let{focusNode:a,focusOffset:u,anchorNode:c,anchorOffset:d}=e.domSelectionRange(),f=l.caretBidiLevel;l.modify("move",n,"character");let p=o.depth?e.docView.domAfterPos(o.before()):e.dom,{focusNode:h,focusOffset:m}=e.domSelectionRange(),y=h&&!p.contains(h.nodeType==1?h:h.parentNode)||a==h&&u==m;try{l.collapse(c,d),a&&(a!=c||u!=d)&&l.extend&&l.extend(a,u)}catch{}return f!=null&&(l.caretBidiLevel=f),y}):o.pos==o.start()||o.pos==o.end()}let ZS=null,JS=null,XS=!1;function Kve(e,t,n){return ZS==t&&JS==n?XS:(ZS=t,JS=n,XS=n=="up"||n=="down"?Hve(e,t,n):Wve(e,t,n))}const Dr=0,QS=1,Fa=2,ti=3;class Ih{constructor(t,n,o,r){this.parent=t,this.children=n,this.dom=o,this.contentDOM=r,this.dirty=Dr,o.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,n,o){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let n=0;n<this.children.length;n++)t+=this.children[n].size;return t}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let t=0;t<this.children.length;t++)this.children[t].destroy()}posBeforeChild(t){for(let n=0,o=this.posAtStart;;n++){let r=this.children[n];if(r==t)return o;o+=r.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(t,n,o){if(this.contentDOM&&this.contentDOM.contains(t.nodeType==1?t:t.parentNode))if(o<0){let s,i;if(t==this.contentDOM)s=t.childNodes[n-1];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;s=t.previousSibling}for(;s&&!((i=s.pmViewDesc)&&i.parent==this);)s=s.previousSibling;return s?this.posBeforeChild(i)+i.size:this.posAtStart}else{let s,i;if(t==this.contentDOM)s=t.childNodes[n];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;s=t.nextSibling}for(;s&&!((i=s.pmViewDesc)&&i.parent==this);)s=s.nextSibling;return s?this.posBeforeChild(i):this.posAtEnd}let r;if(t==this.dom&&this.contentDOM)r=n>so(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))r=t.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let s=t;;s=s.parentNode){if(s==this.dom){r=!1;break}if(s.previousSibling)break}if(r==null&&n==t.childNodes.length)for(let s=t;;s=s.parentNode){if(s==this.dom){r=!0;break}if(s.nextSibling)break}}return r??o>0?this.posAtEnd:this.posAtStart}nearestDesc(t,n=!1){for(let o=!0,r=t;r;r=r.parentNode){let s=this.getDesc(r),i;if(s&&(!n||s.node))if(o&&(i=s.nodeDOM)&&!(i.nodeType==1?i.contains(t.nodeType==1?t:t.parentNode):i==t))o=!1;else return s}}getDesc(t){let n=t.pmViewDesc;for(let o=n;o;o=o.parent)if(o==this)return n}posFromDOM(t,n,o){for(let r=t;r;r=r.parentNode){let s=this.getDesc(r);if(s)return s.localPosFromDOM(t,n,o)}return-1}descAt(t){for(let n=0,o=0;n<this.children.length;n++){let r=this.children[n],s=o+r.size;if(o==t&&s!=o){for(;!r.border&&r.children.length;)r=r.children[0];return r}if(t<s)return r.descAt(t-o-r.border);o=s}}domFromPos(t,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:t+1};let o=0,r=0;for(let s=0;o<this.children.length;o++){let i=this.children[o],l=s+i.size;if(l>t||i instanceof PA){r=t-s;break}s=l}if(r)return this.children[o].domFromPos(r-this.children[o].border,n);for(let s;o&&!(s=this.children[o-1]).size&&s instanceof NA&&s.side>=0;o--);if(n<=0){let s,i=!0;for(;s=o?this.children[o-1]:null,!(!s||s.dom.parentNode==this.contentDOM);o--,i=!1);return s&&n&&i&&!s.border&&!s.domAtom?s.domFromPos(s.size,n):{node:this.contentDOM,offset:s?so(s.dom)+1:0}}else{let s,i=!0;for(;s=o<this.children.length?this.children[o]:null,!(!s||s.dom.parentNode==this.contentDOM);o++,i=!1);return s&&i&&!s.border&&!s.domAtom?s.domFromPos(0,n):{node:this.contentDOM,offset:s?so(s.dom):this.contentDOM.childNodes.length}}}parseRange(t,n,o=0){if(this.children.length==0)return{node:this.contentDOM,from:t,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let r=-1,s=-1;for(let i=o,l=0;;l++){let a=this.children[l],u=i+a.size;if(r==-1&&t<=u){let c=i+a.border;if(t>=c&&n<=u-a.border&&a.node&&a.contentDOM&&this.contentDOM.contains(a.contentDOM))return a.parseRange(t,n,c);t=i;for(let d=l;d>0;d--){let f=this.children[d-1];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(1)){r=so(f.dom)+1;break}t-=f.size}r==-1&&(r=0)}if(r>-1&&(u>n||l==this.children.length-1)){n=u;for(let c=l+1;c<this.children.length;c++){let d=this.children[c];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(-1)){s=so(d.dom);break}n+=d.size}s==-1&&(s=this.contentDOM.childNodes.length);break}i=u}return{node:this.contentDOM,from:t,to:n,fromOffset:r,toOffset:s}}emptyChildAt(t){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[t<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(t)}domAfterPos(t){let{node:n,offset:o}=this.domFromPos(t,0);if(n.nodeType!=1||o==n.childNodes.length)throw new RangeError("No node after pos "+t);return n.childNodes[o]}setSelection(t,n,o,r=!1){let s=Math.min(t,n),i=Math.max(t,n);for(let f=0,p=0;f<this.children.length;f++){let h=this.children[f],m=p+h.size;if(s>p&&i<m)return h.setSelection(t-p-h.border,n-p-h.border,o,r);p=m}let l=this.domFromPos(t,t?-1:1),a=n==t?l:this.domFromPos(n,n?-1:1),u=o.getSelection(),c=!1;if((_s||Ao)&&t==n){let{node:f,offset:p}=l;if(f.nodeType==3){if(c=!!(p&&f.nodeValue[p-1]==` |
| 115 |
`),c&&p==f.nodeValue.length)for(let h=f,m;h;h=h.parentNode){if(m=h.nextSibling){m.nodeName=="BR"&&(l=a={node:m.parentNode,offset:so(m)+1});break}let y=h.pmViewDesc;if(y&&y.node&&y.node.isBlock)break}}else{let h=f.childNodes[p-1];c=h&&(h.nodeName=="BR"||h.contentEditable=="false")}}if(_s&&u.focusNode&&u.focusNode!=a.node&&u.focusNode.nodeType==1){let f=u.focusNode.childNodes[u.focusOffset];f&&f.contentEditable=="false"&&(r=!0)}if(!(r||c&&Ao)&&mu(l.node,l.offset,u.anchorNode,u.anchorOffset)&&mu(a.node,a.offset,u.focusNode,u.focusOffset))return;let d=!1;if((u.extend||t==n)&&!c){u.collapse(l.node,l.offset);try{t!=n&&u.extend(a.node,a.offset),d=!0}catch{}}if(!d){if(t>n){let p=l;l=a,a=p}let f=document.createRange();f.setEnd(a.node,a.offset),f.setStart(l.node,l.offset),u.removeAllRanges(),u.addRange(f)}}ignoreMutation(t){return!this.contentDOM&&t.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,n){for(let o=0,r=0;r<this.children.length;r++){let s=this.children[r],i=o+s.size;if(o==i?t<=i&&n>=o:t<i&&n>o){let l=o+s.border,a=i-s.border;if(t>=l&&n<=a){this.dirty=t==o||n==i?Fa:QS,t==l&&n==a&&(s.contentLost||s.dom.parentNode!=this.contentDOM)?s.dirty=ti:s.markDirty(t-l,n-l);return}else s.dirty=s.dom==s.contentDOM&&s.dom.parentNode==this.contentDOM&&!s.children.length?Fa:ti}o=i}this.dirty=Fa}markParentsDirty(){let t=1;for(let n=this.parent;n;n=n.parent,t++){let o=t==1?Fa:QS;n.dirty<o&&(n.dirty=o)}}get domAtom(){return!1}get ignoreForCoords(){return!1}isText(t){return!1}}class NA extends Ih{constructor(t,n,o,r){let s,i=n.type.toDOM;if(typeof i=="function"&&(i=i(o,()=>{if(!s)return r;if(s.parent)return s.parent.posBeforeChild(s)})),!n.type.spec.raw){if(i.nodeType!=1){let l=document.createElement("span");l.appendChild(i),i=l}i.contentEditable="false",i.classList.add("ProseMirror-widget")}super(t,[],i,null),this.widget=n,this.widget=n,s=this}matchesWidget(t){return this.dirty==Dr&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let n=this.widget.spec.stopEvent;return n?n(t):!1}ignoreMutation(t){return t.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class qve extends Ih{constructor(t,n,o,r){super(t,[],n,null),this.textDOM=o,this.text=r}get size(){return this.text.length}localPosFromDOM(t,n){return t!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return t.type==="characterData"&&t.target.nodeValue==t.oldValue}}class gu extends Ih{constructor(t,n,o,r){super(t,[],o,r),this.mark=n}static create(t,n,o,r){let s=r.nodeViews[n.type.name],i=s&&s(n,r,o);return(!i||!i.dom)&&(i=ra.renderSpec(document,n.type.spec.toDOM(n,o),null,n.attrs)),new gu(t,n,i.dom,i.contentDOM||i.dom)}parseRule(){return this.dirty&ti||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return this.dirty!=ti&&this.mark.eq(t)}markDirty(t,n){if(super.markDirty(t,n),this.dirty!=Dr){let o=this.parent;for(;!o.node;)o=o.parent;o.dirty<this.dirty&&(o.dirty=this.dirty),this.dirty=Dr}}slice(t,n,o){let r=gu.create(this.parent,this.mark,!0,o),s=this.children,i=this.size;n<i&&(s=a2(s,n,i,o)),t>0&&(s=a2(s,0,t,o));for(let l=0;l<s.length;l++)s[l].parent=r;return r.children=s,r}}class Vl extends Ih{constructor(t,n,o,r,s,i,l,a,u){super(t,[],s,i),this.node=n,this.outerDeco=o,this.innerDeco=r,this.nodeDOM=l}static create(t,n,o,r,s,i){let l=s.nodeViews[n.type.name],a,u=l&&l(n,s,()=>{if(!a)return i;if(a.parent)return a.parent.posBeforeChild(a)},o,r),c=u&&u.dom,d=u&&u.contentDOM;if(n.isText){if(!c)c=document.createTextNode(n.text);else if(c.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else c||({dom:c,contentDOM:d}=ra.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!d&&!n.isText&&c.nodeName!="BR"&&(c.hasAttribute("contenteditable")||(c.contentEditable="false"),n.type.spec.draggable&&(c.draggable=!0));let f=c;return c=DA(c,o,n),u?a=new Gve(t,n,o,r,c,d||null,f,u,s,i+1):n.isText?new yv(t,n,o,r,c,f,s):new Vl(t,n,o,r,c,d||null,f,s,i+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(t.preserveWhitespace="full"),!this.contentDOM)t.getContent=()=>this.node.content;else if(!this.contentLost)t.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let o=this.children[n];if(this.dom.contains(o.dom.parentNode)){t.contentElement=o.dom.parentNode;break}}t.contentElement||(t.getContent=()=>We.empty)}return t}matchesNode(t,n,o){return this.dirty==Dr&&t.eq(this.node)&&l2(n,this.outerDeco)&&o.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,n){let o=this.node.inlineContent,r=n,s=t.composing?this.localCompositionInfo(t,n):null,i=s&&s.pos>-1?s:null,l=s&&s.pos<0,a=new Zve(this,i&&i.node,t);Qve(this.node,this.innerDeco,(u,c,d)=>{u.spec.marks?a.syncToMarks(u.spec.marks,o,t):u.type.side>=0&&!d&&a.syncToMarks(c==this.node.childCount?Yt.none:this.node.child(c).marks,o,t),a.placeWidget(u,t,r)},(u,c,d,f)=>{a.syncToMarks(u.marks,o,t);let p;a.findNodeMatch(u,c,d,f)||l&&t.state.selection.from>r&&t.state.selection.to<r+u.nodeSize&&(p=a.findIndexWithChild(s.node))>-1&&a.updateNodeAt(u,c,d,p,t)||a.updateNextNode(u,c,d,t,f,r)||a.addNode(u,c,d,t,r),r+=u.nodeSize}),a.syncToMarks([],o,t),this.node.isTextblock&&a.addTextblockHacks(),a.destroyRest(),(a.changed||this.dirty==Fa)&&(i&&this.protectLocalComposition(t,i),LA(this.contentDOM,this.children,t),pd&&eye(this.dom))}localCompositionInfo(t,n){let{from:o,to:r}=t.state.selection;if(!(t.state.selection instanceof ht)||o<n||r>n+this.node.content.size)return null;let s=t.input.compositionNode;if(!s||!this.dom.contains(s.parentNode))return null;if(this.node.inlineContent){let i=s.nodeValue,l=tye(this.node.content,i,o-n,r-n);return l<0?null:{node:s,pos:l,text:i}}else return{node:s,pos:-1,text:""}}protectLocalComposition(t,{node:n,pos:o,text:r}){if(this.getDesc(n))return;let s=n;for(;s.parentNode!=this.contentDOM;s=s.parentNode){for(;s.previousSibling;)s.parentNode.removeChild(s.previousSibling);for(;s.nextSibling;)s.parentNode.removeChild(s.nextSibling);s.pmViewDesc&&(s.pmViewDesc=void 0)}let i=new qve(this,s,n,r);t.input.compositionNodes.push(i),this.children=a2(this.children,o,o+r.length,t,i)}update(t,n,o,r){return this.dirty==ti||!t.sameMarkup(this.node)?!1:(this.updateInner(t,n,o,r),!0)}updateInner(t,n,o,r){this.updateOuterDeco(n),this.node=t,this.innerDeco=o,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=Dr}updateOuterDeco(t){if(l2(t,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,o=this.dom;this.dom=RA(this.dom,this.nodeDOM,i2(this.outerDeco,this.node,n),i2(t,this.node,n)),this.dom!=o&&(o.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}selectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function e9(e,t,n,o,r){DA(o,t,e);let s=new Vl(void 0,e,t,n,o,o,o,r,0);return s.contentDOM&&s.updateChildren(r,0),s}class yv extends Vl{constructor(t,n,o,r,s,i,l){super(t,n,o,r,s,null,i,l,0)}parseRule(){let t=this.nodeDOM.parentNode;for(;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}}update(t,n,o,r){return this.dirty==ti||this.dirty!=Dr&&!this.inParent()||!t.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=Dr||t.text!=this.node.text)&&t.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=t.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=t,this.dirty=Dr,!0)}inParent(){let t=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,n,o){return t==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(t,n,o)}ignoreMutation(t){return t.type!="characterData"&&t.type!="selection"}slice(t,n,o){let r=this.node.cut(t,n),s=document.createTextNode(r.text);return new yv(this.parent,r,this.outerDeco,this.innerDeco,s,s,o)}markDirty(t,n){super.markDirty(t,n),this.dom!=this.nodeDOM&&(t==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=ti)}get domAtom(){return!1}isText(t){return this.node.text==t}}class PA extends Ih{parseRule(){return{ignore:!0}}matchesHack(t){return this.dirty==Dr&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class Gve extends Vl{constructor(t,n,o,r,s,i,l,a,u,c){super(t,n,o,r,s,i,l,u,c),this.spec=a}update(t,n,o,r){if(this.dirty==ti)return!1;if(this.spec.update){let s=this.spec.update(t,n,o);return s&&this.updateInner(t,n,o,r),s}else return!this.contentDOM&&!t.isLeaf?!1:super.update(t,n,o,r)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,n,o,r){this.spec.setSelection?this.spec.setSelection(t,n,o):super.setSelection(t,n,o,r)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(t){return this.spec.stopEvent?this.spec.stopEvent(t):!1}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}}function LA(e,t,n){let o=e.firstChild,r=!1;for(let s=0;s<t.length;s++){let i=t[s],l=i.dom;if(l.parentNode==e){for(;l!=o;)o=t9(o),r=!0;o=o.nextSibling}else r=!0,e.insertBefore(l,o);if(i instanceof gu){let a=o?o.previousSibling:e.lastChild;LA(i.contentDOM,i.children,n),o=a?a.nextSibling:e.firstChild}}for(;o;)o=t9(o),r=!0;r&&n.trackWrites==e&&(n.trackWrites=null)}const op=function(e){e&&(this.nodeName=e)};op.prototype=Object.create(null);const Ba=[new op];function i2(e,t,n){if(e.length==0)return Ba;let o=n?Ba[0]:new op,r=[o];for(let s=0;s<e.length;s++){let i=e[s].type.attrs;if(i){i.nodeName&&r.push(o=new op(i.nodeName));for(let l in i){let a=i[l];a!=null&&(n&&r.length==1&&r.push(o=new op(t.isInline?"span":"div")),l=="class"?o.class=(o.class?o.class+" ":"")+a:l=="style"?o.style=(o.style?o.style+";":"")+a:l!="nodeName"&&(o[l]=a))}}}return r}function RA(e,t,n,o){if(n==Ba&&o==Ba)return t;let r=t;for(let s=0;s<o.length;s++){let i=o[s],l=n[s];if(s){let a;l&&l.nodeName==i.nodeName&&r!=e&&(a=r.parentNode)&&a.nodeName.toLowerCase()==i.nodeName||(a=document.createElement(i.nodeName),a.pmIsDeco=!0,a.appendChild(r),l=Ba[0]),r=a}Yve(r,l||Ba[0],i)}return r}function Yve(e,t,n){for(let o in t)o!="class"&&o!="style"&&o!="nodeName"&&!(o in n)&&e.removeAttribute(o);for(let o in n)o!="class"&&o!="style"&&o!="nodeName"&&n[o]!=t[o]&&e.setAttribute(o,n[o]);if(t.class!=n.class){let o=t.class?t.class.split(" ").filter(Boolean):[],r=n.class?n.class.split(" ").filter(Boolean):[];for(let s=0;s<o.length;s++)r.indexOf(o[s])==-1&&e.classList.remove(o[s]);for(let s=0;s<r.length;s++)o.indexOf(r[s])==-1&&e.classList.add(r[s]);e.classList.length==0&&e.removeAttribute("class")}if(t.style!=n.style){if(t.style){let o=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,r;for(;r=o.exec(t.style);)e.style.removeProperty(r[1])}n.style&&(e.style.cssText+=n.style)}}function DA(e,t,n){return RA(e,e,Ba,i2(t,n,e.nodeType!=1))}function l2(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function t9(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}class Zve{constructor(t,n,o){this.lock=n,this.view=o,this.index=0,this.stack=[],this.changed=!1,this.top=t,this.preMatch=Jve(t.node.content,t)}destroyBetween(t,n){if(t!=n){for(let o=t;o<n;o++)this.top.children[o].destroy();this.top.children.splice(t,n-t),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(t,n,o){let r=0,s=this.stack.length>>1,i=Math.min(s,t.length);for(;r<i&&(r==s-1?this.top:this.stack[r+1<<1]).matchesMark(t[r])&&t[r].type.spec.spanning!==!1;)r++;for(;r<s;)this.destroyRest(),this.top.dirty=Dr,this.index=this.stack.pop(),this.top=this.stack.pop(),s--;for(;s<t.length;){this.stack.push(this.top,this.index+1);let l=-1;for(let a=this.index;a<Math.min(this.index+3,this.top.children.length);a++){let u=this.top.children[a];if(u.matchesMark(t[s])&&!this.isLocked(u.dom)){l=a;break}}if(l>-1)l>this.index&&(this.changed=!0,this.destroyBetween(this.index,l)),this.top=this.top.children[this.index];else{let a=gu.create(this.top,t[s],n,o);this.top.children.splice(this.index,0,a),this.top=a,this.changed=!0}this.index=0,s++}}findNodeMatch(t,n,o,r){let s=-1,i;if(r>=this.preMatch.index&&(i=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&i.matchesNode(t,n,o))s=this.top.children.indexOf(i,this.index);else for(let l=this.index,a=Math.min(this.top.children.length,l+5);l<a;l++){let u=this.top.children[l];if(u.matchesNode(t,n,o)&&!this.preMatch.matched.has(u)){s=l;break}}return s<0?!1:(this.destroyBetween(this.index,s),this.index++,!0)}updateNodeAt(t,n,o,r,s){let i=this.top.children[r];return i.dirty==ti&&i.dom==i.contentDOM&&(i.dirty=Fa),i.update(t,n,o,s)?(this.destroyBetween(this.index,r),this.index++,!0):!1}findIndexWithChild(t){for(;;){let n=t.parentNode;if(!n)return-1;if(n==this.top.contentDOM){let o=t.pmViewDesc;if(o){for(let r=this.index;r<this.top.children.length;r++)if(this.top.children[r]==o)return r}return-1}t=n}}updateNextNode(t,n,o,r,s,i){for(let l=this.index;l<this.top.children.length;l++){let a=this.top.children[l];if(a instanceof Vl){let u=this.preMatch.matched.get(a);if(u!=null&&u!=s)return!1;let c=a.dom,d,f=this.isLocked(c)&&!(t.isText&&a.node&&a.node.isText&&a.nodeDOM.nodeValue==t.text&&a.dirty!=ti&&l2(n,a.outerDeco));if(!f&&a.update(t,n,o,r))return this.destroyBetween(this.index,l),a.dom!=c&&(this.changed=!0),this.index++,!0;if(!f&&(d=this.recreateWrapper(a,t,n,o,r,i)))return this.top.children[this.index]=d,d.contentDOM&&(d.dirty=Fa,d.updateChildren(r,i+1),d.dirty=Dr),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(t,n,o,r,s,i){if(t.dirty||n.isAtom||!t.children.length||!t.node.content.eq(n.content))return null;let l=Vl.create(this.top,n,o,r,s,i);if(l.contentDOM){l.children=t.children,t.children=[];for(let a of l.children)a.parent=l}return t.destroy(),l}addNode(t,n,o,r,s){let i=Vl.create(this.top,t,n,o,r,s);i.contentDOM&&i.updateChildren(r,s+1),this.top.children.splice(this.index++,0,i),this.changed=!0}placeWidget(t,n,o){let r=this.index<this.top.children.length?this.top.children[this.index]:null;if(r&&r.matchesWidget(t)&&(t==r.widget||!r.widget.type.toDOM.parentNode))this.index++;else{let s=new NA(this.top,t,n,o);this.top.children.splice(this.index++,0,s),this.changed=!0}}addTextblockHacks(){let t=this.top.children[this.index-1],n=this.top;for(;t instanceof gu;)n=t,t=n.children[n.children.length-1];(!t||!(t instanceof yv)||/\n$/.test(t.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(t.node.text))&&((Ao||mo)&&t&&t.dom.contentEditable=="false"&&this.addHackNode("IMG",n),this.addHackNode("BR",this.top))}addHackNode(t,n){if(n==this.top&&this.index<n.children.length&&n.children[this.index].matchesHack(t))this.index++;else{let o=document.createElement(t);t=="IMG"&&(o.className="ProseMirror-separator",o.alt=""),t=="BR"&&(o.className="ProseMirror-trailingBreak");let r=new PA(this.top,[],o,null);n!=this.top?n.children.push(r):n.children.splice(this.index++,0,r),this.changed=!0}}isLocked(t){return this.lock&&(t==this.lock||t.nodeType==1&&t.contains(this.lock.parentNode))}}function Jve(e,t){let n=t,o=n.children.length,r=e.childCount,s=new Map,i=[];e:for(;r>0;){let l;for(;;)if(o){let u=n.children[o-1];if(u instanceof gu)n=u,o=u.children.length;else{l=u,o--;break}}else{if(n==t)break e;o=n.parent.children.indexOf(n),n=n.parent}let a=l.node;if(a){if(a!=e.child(r-1))break;--r,s.set(l,r),i.push(l)}}return{index:r,matched:s,matches:i.reverse()}}function Xve(e,t){return e.type.side-t.type.side}function Qve(e,t,n,o){let r=t.locals(e),s=0;if(r.length==0){for(let u=0;u<e.childCount;u++){let c=e.child(u);o(c,r,t.forChild(s,c),u),s+=c.nodeSize}return}let i=0,l=[],a=null;for(let u=0;;){let c,d;for(;i<r.length&&r[i].to==s;){let y=r[i++];y.widget&&(c?(d||(d=[c])).push(y):c=y)}if(c)if(d){d.sort(Xve);for(let y=0;y<d.length;y++)n(d[y],u,!!a)}else n(c,u,!!a);let f,p;if(a)p=-1,f=a,a=null;else if(u<e.childCount)p=u,f=e.child(u++);else break;for(let y=0;y<l.length;y++)l[y].to<=s&&l.splice(y--,1);for(;i<r.length&&r[i].from<=s&&r[i].to>s;)l.push(r[i++]);let h=s+f.nodeSize;if(f.isText){let y=h;i<r.length&&r[i].from<y&&(y=r[i].from);for(let v=0;v<l.length;v++)l[v].to<y&&(y=l[v].to);y<h&&(a=f.cut(y-s),f=f.cut(0,y-s),h=y,p=-1)}else for(;i<r.length&&r[i].to<h;)i++;let m=f.isInline&&!f.isLeaf?l.filter(y=>!y.inline):l.slice();o(f,m,t.forChild(s,f),p),s=h}}function eye(e){if(e.nodeName=="UL"||e.nodeName=="OL"){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}function tye(e,t,n,o){for(let r=0,s=0;r<e.childCount&&s<=o;){let i=e.child(r++),l=s;if(s+=i.nodeSize,!i.isText)continue;let a=i.text;for(;r<e.childCount;){let u=e.child(r++);if(s+=u.nodeSize,!u.isText)break;a+=u.text}if(s>=n){if(s>=o&&a.slice(o-t.length-l,o-l)==t)return o-t.length;let u=l<o?a.lastIndexOf(t,o-l-1):-1;if(u>=0&&u+t.length+l>=n)return l+u;if(n==o&&a.length>=o+t.length-l&&a.slice(o-l,o-l+t.length)==t)return o}}return-1}function a2(e,t,n,o,r){let s=[];for(let i=0,l=0;i<e.length;i++){let a=e[i],u=l,c=l+=a.size;u>=n||c<=t?s.push(a):(u<t&&s.push(a.slice(0,t-u,o)),r&&(s.push(r),r=void 0),c>n&&s.push(a.slice(n-u,a.size,o)))}return s}function wC(e,t=null){let n=e.domSelectionRange(),o=e.state.doc;if(!n.focusNode)return null;let r=e.docView.nearestDesc(n.focusNode),s=r&&r.size==0,i=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(i<0)return null;let l=o.resolve(i),a,u;if(vv(n)){for(a=l;r&&!r.node;)r=r.parent;let c=r.node;if(r&&c.isAtom&&mt.isSelectable(c)&&r.parent&&!(c.isInline&&xve(n.focusNode,n.focusOffset,r.dom))){let d=r.posBefore;u=new mt(i==d?l:o.resolve(d))}}else{let c=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(c<0)return null;a=o.resolve(c)}if(!u){let c=t=="pointer"||e.state.selection.head<l.pos&&!s?1:-1;u=CC(e,a,l,c)}return u}function VA(e){return e.editable?e.hasFocus():BA(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function Ii(e,t=!1){let n=e.state.selection;if(FA(e,n),!!VA(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&mo){let o=e.domSelectionRange(),r=e.domObserver.currentSelection;if(o.anchorNode&&r.anchorNode&&mu(o.anchorNode,o.anchorOffset,r.anchorNode,r.anchorOffset)){e.input.mouseDown.delayedSelectionSync=!0,e.domObserver.setCurSelection();return}}if(e.domObserver.disconnectSelection(),e.cursorWrapper)oye(e);else{let{anchor:o,head:r}=n,s,i;n9&&!(n instanceof ht)&&(n.$from.parent.inlineContent||(s=o9(e,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(i=o9(e,n.to))),e.docView.setSelection(o,r,e.root,t),n9&&(s&&r9(s),i&&r9(i)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&nye(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}const n9=Ao||mo&&EA<63;function o9(e,t){let{node:n,offset:o}=e.docView.domFromPos(t,0),r=o<n.childNodes.length?n.childNodes[o]:null,s=o?n.childNodes[o-1]:null;if(Ao&&r&&r.contentEditable=="false")return jy(r);if((!r||r.contentEditable=="false")&&(!s||s.contentEditable=="false")){if(r)return jy(r);if(s)return jy(s)}}function jy(e){return e.contentEditable="true",Ao&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function r9(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function nye(e){let t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.input.hideSelectionGuard);let n=e.domSelectionRange(),o=n.anchorNode,r=n.anchorOffset;t.addEventListener("selectionchange",e.input.hideSelectionGuard=()=>{(n.anchorNode!=o||n.anchorOffset!=r)&&(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{(!VA(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function oye(e){let t=e.domSelection(),n=document.createRange();if(!t)return;let o=e.cursorWrapper.dom,r=o.nodeName=="IMG";r?n.setStart(o.parentNode,so(o)+1):n.setStart(o,0),n.collapse(!0),t.removeAllRanges(),t.addRange(n),!r&&!e.state.selection.visible&&Go&&Dl<=11&&(o.disabled=!0,o.disabled=!1)}function FA(e,t){if(t instanceof mt){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(s9(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else s9(e)}function s9(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function CC(e,t,n,o){return e.someProp("createSelectionBetween",r=>r(e,t,n))||ht.between(t,n,o)}function i9(e){return e.editable&&!e.hasFocus()?!1:BA(e)}function BA(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{return!1}}function rye(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return mu(t.node,t.offset,n.anchorNode,n.anchorOffset)}function u2(e,t){let{$anchor:n,$head:o}=e.selection,r=t>0?n.max(o):n.min(o),s=r.parent.inlineContent?r.depth?e.doc.resolve(t>0?r.after():r.before()):null:r;return s&&bt.findFrom(s,t)}function bl(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function l9(e,t,n){let o=e.state.selection;if(o instanceof ht)if(n.indexOf("s")>-1){let{$head:r}=o,s=r.textOffset?null:t<0?r.nodeBefore:r.nodeAfter;if(!s||s.isText||!s.isLeaf)return!1;let i=e.state.doc.resolve(r.pos+s.nodeSize*(t<0?-1:1));return bl(e,new ht(o.$anchor,i))}else if(o.empty){if(e.endOfTextblock(t>0?"forward":"backward")){let r=u2(e.state,t);return r&&r instanceof mt?bl(e,r):!1}else if(!(Er&&n.indexOf("m")>-1)){let r=o.$head,s=r.textOffset?null:t<0?r.nodeBefore:r.nodeAfter,i;if(!s||s.isText)return!1;let l=t<0?r.pos-s.nodeSize:r.pos;return s.isAtom||(i=e.docView.descAt(l))&&!i.contentDOM?mt.isSelectable(s)?bl(e,new mt(t<0?e.state.doc.resolve(r.pos-s.nodeSize):r)):Oh?bl(e,new ht(e.state.doc.resolve(t<0?l:l+s.nodeSize))):!1:!1}}else return!1;else{if(o instanceof mt&&o.node.isInline)return bl(e,new ht(t>0?o.$to:o.$from));{let r=u2(e.state,t);return r?bl(e,r):!1}}}function Xg(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function rp(e,t){let n=e.pmViewDesc;return n&&n.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function Du(e,t){return t<0?sye(e):iye(e)}function sye(e){let t=e.domSelectionRange(),n=t.focusNode,o=t.focusOffset;if(!n)return;let r,s,i=!1;for(_s&&n.nodeType==1&&o<Xg(n)&&rp(n.childNodes[o],-1)&&(i=!0);;)if(o>0){if(n.nodeType!=1)break;{let l=n.childNodes[o-1];if(rp(l,-1))r=n,s=--o;else if(l.nodeType==3)n=l,o=n.nodeValue.length;else break}}else{if(zA(n))break;{let l=n.previousSibling;for(;l&&rp(l,-1);)r=n.parentNode,s=so(l),l=l.previousSibling;if(l)n=l,o=Xg(n);else{if(n=n.parentNode,n==e.dom)break;o=0}}}i?c2(e,n,o):r&&c2(e,r,s)}function iye(e){let t=e.domSelectionRange(),n=t.focusNode,o=t.focusOffset;if(!n)return;let r=Xg(n),s,i;for(;;)if(o<r){if(n.nodeType!=1)break;let l=n.childNodes[o];if(rp(l,1))s=n,i=++o;else break}else{if(zA(n))break;{let l=n.nextSibling;for(;l&&rp(l,1);)s=l.parentNode,i=so(l)+1,l=l.nextSibling;if(l)n=l,o=0,r=Xg(n);else{if(n=n.parentNode,n==e.dom)break;o=r=0}}}s&&c2(e,s,i)}function zA(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function lye(e,t){for(;e&&t==e.childNodes.length&&!Mh(e);)t=so(e)+1,e=e.parentNode;for(;e&&t<e.childNodes.length;){let n=e.childNodes[t];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;e=n,t=0}}function aye(e,t){for(;e&&!t&&!Mh(e);)t=so(e),e=e.parentNode;for(;e&&t;){let n=e.childNodes[t-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;e=n,t=e.childNodes.length}}function c2(e,t,n){if(t.nodeType!=3){let s,i;(i=lye(t,n))?(t=i,n=0):(s=aye(t,n))&&(t=s,n=s.nodeValue.length)}let o=e.domSelection();if(!o)return;if(vv(o)){let s=document.createRange();s.setEnd(t,n),s.setStart(t,n),o.removeAllRanges(),o.addRange(s)}else o.extend&&o.extend(t,n);e.domObserver.setCurSelection();let{state:r}=e;setTimeout(()=>{e.state==r&&Ii(e)},50)}function a9(e,t){let n=e.state.doc.resolve(t);if(!(mo||Ove)&&n.parent.inlineContent){let r=e.coordsAtPos(t);if(t>n.start()){let s=e.coordsAtPos(t-1),i=(s.top+s.bottom)/2;if(i>r.top&&i<r.bottom&&Math.abs(s.left-r.left)>1)return s.left<r.left?"ltr":"rtl"}if(t<n.end()){let s=e.coordsAtPos(t+1),i=(s.top+s.bottom)/2;if(i>r.top&&i<r.bottom&&Math.abs(s.left-r.left)>1)return s.left>r.left?"ltr":"rtl"}}return getComputedStyle(e.dom).direction=="rtl"?"rtl":"ltr"}function u9(e,t,n){let o=e.state.selection;if(o instanceof ht&&!o.empty||n.indexOf("s")>-1||Er&&n.indexOf("m")>-1)return!1;let{$from:r,$to:s}=o;if(!r.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let i=u2(e.state,t);if(i&&i instanceof mt)return bl(e,i)}if(!r.parent.inlineContent){let i=t<0?r:s,l=o instanceof gr?bt.near(i,t):bt.findFrom(i,t);return l?bl(e,l):!1}return!1}function c9(e,t){if(!(e.state.selection instanceof ht))return!0;let{$head:n,$anchor:o,empty:r}=e.state.selection;if(!n.sameParent(o))return!0;if(!r)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let s=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(s&&!s.isText){let i=e.state.tr;return t<0?i.delete(n.pos-s.nodeSize,n.pos):i.delete(n.pos,n.pos+s.nodeSize),e.dispatch(i),!0}return!1}function d9(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function uye(e){if(!Ao||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 o=t.firstChild;d9(e,o,"true"),setTimeout(()=>d9(e,o,"false"),20)}return!1}function cye(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function dye(e,t){let n=t.keyCode,o=cye(t);if(n==8||Er&&n==72&&o=="c")return c9(e,-1)||Du(e,-1);if(n==46&&!t.shiftKey||Er&&n==68&&o=="c")return c9(e,1)||Du(e,1);if(n==13||n==27)return!0;if(n==37||Er&&n==66&&o=="c"){let r=n==37?a9(e,e.state.selection.from)=="ltr"?-1:1:-1;return l9(e,r,o)||Du(e,r)}else if(n==39||Er&&n==70&&o=="c"){let r=n==39?a9(e,e.state.selection.from)=="ltr"?1:-1:1;return l9(e,r,o)||Du(e,r)}else{if(n==38||Er&&n==80&&o=="c")return u9(e,-1,o)||Du(e,-1);if(n==40||Er&&n==78&&o=="c")return uye(e)||u9(e,1,o)||Du(e,1);if(o==(Er?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function jA(e,t){e.someProp("transformCopied",p=>{t=p(t,e)});let n=[],{content:o,openStart:r,openEnd:s}=t;for(;r>1&&s>1&&o.childCount==1&&o.firstChild.childCount==1;){r--,s--;let p=o.firstChild;n.push(p.type.name,p.attrs!=p.type.defaultAttrs?p.attrs:null),o=p.content}let i=e.someProp("clipboardSerializer")||ra.fromSchema(e.state.schema),l=GA(),a=l.createElement("div");a.appendChild(i.serializeFragment(o,{document:l}));let u=a.firstChild,c,d=0;for(;u&&u.nodeType==1&&(c=qA[u.nodeName.toLowerCase()]);){for(let p=c.length-1;p>=0;p--){let h=l.createElement(c[p]);for(;a.firstChild;)h.appendChild(a.firstChild);a.appendChild(h),d++}u=a.firstChild}u&&u.nodeType==1&&u.setAttribute("data-pm-slice",`${r} ${s}${d?` -${d}`:""} ${JSON.stringify(n)}`);let f=e.someProp("clipboardTextSerializer",p=>p(t,e))||t.content.textBetween(0,t.content.size,` |
| 116 |
|
| 117 |
`);return{dom:a,text:f,slice:t}}function HA(e,t,n,o,r){let s=r.parent.type.spec.code,i,l;if(!n&&!t)return null;let a=t&&(o||s||!n);if(a){if(e.someProp("transformPastedText",f=>{t=f(t,s||o,e)}),s)return t?new Je(We.from(e.state.schema.text(t.replace(/\r\n?/g,` |
| 118 |
`))),0,0):Je.empty;let d=e.someProp("clipboardTextParser",f=>f(t,r,o,e));if(d)l=d;else{let f=r.marks(),{schema:p}=e.state,h=ra.fromSchema(p);i=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(m=>{let y=i.appendChild(document.createElement("p"));m&&y.appendChild(h.serializeNode(p.text(m,f)))})}}else e.someProp("transformPastedHTML",d=>{n=d(n,e)}),i=hye(n),Oh&&mye(i);let u=i&&i.querySelector("[data-pm-slice]"),c=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(c&&c[3])for(let d=+c[3];d>0;d--){let f=i.firstChild;for(;f&&f.nodeType!=1;)f=f.nextSibling;if(!f)break;i=f}if(l||(l=(e.someProp("clipboardParser")||e.someProp("domParser")||pu.fromSchema(e.state.schema)).parseSlice(i,{preserveWhitespace:!!(a||c),context:r,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!fye.test(f.parentNode.nodeName)?{ignore:!0}:null}})),c)l=gye(f9(l,+c[1],+c[2]),c[4]);else if(l=Je.maxOpen(pye(l.content,r),!0),l.openStart||l.openEnd){let d=0,f=0;for(let p=l.content.firstChild;d<l.openStart&&!p.type.spec.isolating;d++,p=p.firstChild);for(let p=l.content.lastChild;f<l.openEnd&&!p.type.spec.isolating;f++,p=p.lastChild);l=f9(l,d,f)}return e.someProp("transformPasted",d=>{l=d(l,e)}),l}const fye=/^(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 pye(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.index(n)),s,i=[];if(e.forEach(l=>{if(!i)return;let a=r.findWrapping(l.type),u;if(!a)return i=null;if(u=i.length&&s.length&&WA(a,s,l,i[i.length-1],0))i[i.length-1]=u;else{i.length&&(i[i.length-1]=KA(i[i.length-1],s.length));let c=UA(l,a);i.push(c),r=r.matchType(c.type),s=a}}),i)return We.from(i)}return e}function UA(e,t,n=0){for(let o=t.length-1;o>=n;o--)e=t[o].create(null,We.from(e));return e}function WA(e,t,n,o,r){if(r<e.length&&r<t.length&&e[r]==t[r]){let s=WA(e,t,n,o.lastChild,r+1);if(s)return o.copy(o.content.replaceChild(o.childCount-1,s));if(o.contentMatchAt(o.childCount).matchType(r==e.length-1?n.type:e[r+1]))return o.copy(o.content.append(We.from(UA(n,e,r+1))))}}function KA(e,t){if(t==0)return e;let n=e.content.replaceChild(e.childCount-1,KA(e.lastChild,t-1)),o=e.contentMatchAt(e.childCount).fillBefore(We.empty,!0);return e.copy(n.append(o))}function d2(e,t,n,o,r,s){let i=t<0?e.firstChild:e.lastChild,l=i.content;return e.childCount>1&&(s=0),r<o-1&&(l=d2(l,t,n,o,r+1,s)),r>=n&&(l=t<0?i.contentMatchAt(0).fillBefore(l,s<=r).append(l):l.append(i.contentMatchAt(i.childCount).fillBefore(We.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,i.copy(l))}function f9(e,t,n){return t<e.openStart&&(e=new Je(d2(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new Je(d2(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}const qA={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 p9=null;function GA(){return p9||(p9=document.implementation.createHTMLDocument("title"))}function hye(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=GA().createElement("div"),o=/<([a-z][^>\s]+)/i.exec(e),r;if((r=o&&qA[o[1].toLowerCase()])&&(e=r.map(s=>"<"+s+">").join("")+e+r.map(s=>"</"+s+">").reverse().join("")),n.innerHTML=e,r)for(let s=0;s<r.length;s++)n=n.querySelector(r[s])||n;return n}function mye(e){let t=e.querySelectorAll(mo?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<t.length;n++){let o=t[n];o.childNodes.length==1&&o.textContent==" "&&o.parentNode&&o.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),o)}}function gye(e,t){if(!e.size)return e;let n=e.content.firstChild.type.schema,o;try{o=JSON.parse(t)}catch{return e}let{content:r,openStart:s,openEnd:i}=e;for(let l=o.length-2;l>=0;l-=2){let a=n.nodes[o[l]];if(!a||a.hasRequiredAttrs())break;r=We.from(a.create(o[l+1],r)),s++,i++}return new Je(r,s,i)}const No={},Po={},vye={touchstart:!0,touchmove:!0};class yye{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastAndroidDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function _ye(e){for(let t in No){let n=No[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=o=>{wye(e,o)&&!kC(e,o)&&(e.editable||!(o.type in Po))&&n(e,o)},vye[t]?{passive:!0}:void 0)}Ao&&e.dom.addEventListener("input",()=>null),f2(e)}function Al(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function bye(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}function f2(e){e.someProp("handleDOMEvents",t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=o=>kC(e,o))})}function kC(e,t){return e.someProp("handleDOMEvents",n=>{let o=n[t.type];return o?o(e,t)||t.defaultPrevented:!1})}function wye(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function Cye(e,t){!kC(e,t)&&No[t.type]&&(e.editable||!(t.type in Po))&&No[t.type](e,t)}Po.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!ZA(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!(ss&&mo&&n.keyCode==13)))if(n.keyCode!=229&&e.domObserver.forceFlush(),pd&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let o=Date.now();e.input.lastIOSEnter=o,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==o&&(e.someProp("handleKeyDown",r=>r(e,Oa(13,"Enter"))),e.input.lastIOSEnter=0)},200)}else e.someProp("handleKeyDown",o=>o(e,n))||dye(e,n)?n.preventDefault():Al(e,"key")};Po.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)};Po.keypress=(e,t)=>{let n=t;if(ZA(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||Er&&n.metaKey)return;if(e.someProp("handleKeyPress",r=>r(e,n))){n.preventDefault();return}let o=e.state.selection;if(!(o instanceof ht)||!o.$from.sameParent(o.$to)){let r=String.fromCharCode(n.charCode);!/[\r\n]/.test(r)&&!e.someProp("handleTextInput",s=>s(e,o.$from.pos,o.$to.pos,r))&&e.dispatch(e.state.tr.insertText(r).scrollIntoView()),n.preventDefault()}};function _v(e){return{left:e.clientX,top:e.clientY}}function kye(e,t){let n=t.x-e.clientX,o=t.y-e.clientY;return n*n+o*o<100}function SC(e,t,n,o,r){if(o==-1)return!1;let s=e.state.doc.resolve(o);for(let i=s.depth+1;i>0;i--)if(e.someProp(t,l=>i>s.depth?l(e,n,s.nodeAfter,s.before(i),r,!0):l(e,n,s.node(i),s.before(i),r,!1)))return!0;return!1}function Tc(e,t,n){if(e.focused||e.focus(),e.state.selection.eq(t))return;let o=e.state.tr.setSelection(t);n=="pointer"&&o.setMeta("pointer",!0),e.dispatch(o)}function Sye(e,t){if(t==-1)return!1;let n=e.state.doc.resolve(t),o=n.nodeAfter;return o&&o.isAtom&&mt.isSelectable(o)?(Tc(e,new mt(n),"pointer"),!0):!1}function $ye(e,t){if(t==-1)return!1;let n=e.state.selection,o,r;n instanceof mt&&(o=n.node);let s=e.state.doc.resolve(t);for(let i=s.depth+1;i>0;i--){let l=i>s.depth?s.nodeAfter:s.node(i);if(mt.isSelectable(l)){o&&n.$from.depth>0&&i>=n.$from.depth&&s.before(n.$from.depth+1)==n.$from.pos?r=s.before(n.$from.depth):r=s.before(i);break}}return r!=null?(Tc(e,mt.create(e.state.doc,r),"pointer"),!0):!1}function Eye(e,t,n,o,r){return SC(e,"handleClickOn",t,n,o)||e.someProp("handleClick",s=>s(e,t,o))||(r?$ye(e,n):Sye(e,n))}function xye(e,t,n,o){return SC(e,"handleDoubleClickOn",t,n,o)||e.someProp("handleDoubleClick",r=>r(e,t,o))}function Tye(e,t,n,o){return SC(e,"handleTripleClickOn",t,n,o)||e.someProp("handleTripleClick",r=>r(e,t,o))||Mye(e,n,o)}function Mye(e,t,n){if(n.button!=0)return!1;let o=e.state.doc;if(t==-1)return o.inlineContent?(Tc(e,ht.create(o,0,o.content.size),"pointer"),!0):!1;let r=o.resolve(t);for(let s=r.depth+1;s>0;s--){let i=s>r.depth?r.nodeAfter:r.node(s),l=r.before(s);if(i.inlineContent)Tc(e,ht.create(o,l+1,l+1+i.content.size),"pointer");else if(mt.isSelectable(i))Tc(e,mt.create(o,l),"pointer");else continue;return!0}}function $C(e){return Qg(e)}const YA=Er?"metaKey":"ctrlKey";No.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let o=$C(e),r=Date.now(),s="singleClick";r-e.input.lastClick.time<500&&kye(n,e.input.lastClick)&&!n[YA]&&(e.input.lastClick.type=="singleClick"?s="doubleClick":e.input.lastClick.type=="doubleClick"&&(s="tripleClick")),e.input.lastClick={time:r,x:n.clientX,y:n.clientY,type:s};let i=e.posAtCoords(_v(n));i&&(s=="singleClick"?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new Oye(e,i,n,!!o)):(s=="doubleClick"?xye:Tye)(e,i.pos,i.inside,n)?n.preventDefault():Al(e,"pointer"))};class Oye{constructor(t,n,o,r){this.view=t,this.pos=n,this.event=o,this.flushed=r,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!o[YA],this.allowDefault=o.shiftKey;let s,i;if(n.inside>-1)s=t.state.doc.nodeAt(n.inside),i=n.inside;else{let c=t.state.doc.resolve(n.pos);s=c.parent,i=c.depth?c.before():0}const l=r?null:o.target,a=l?t.docView.nearestDesc(l,!0):null;this.target=a&&a.dom.nodeType==1?a.dom:null;let{selection:u}=t.state;(o.button==0&&s.type.spec.draggable&&s.type.spec.selectable!==!1||u instanceof mt&&u.from<=i&&u.to>i)&&(this.mightDrag={node:s,pos:i,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&_s&&!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)),Al(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(()=>Ii(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(_v(t))),this.updateAllowDefault(t),this.allowDefault||!n?Al(this.view,"pointer"):Eye(this.view,n.pos,n.inside,t,this.selectNode)?t.preventDefault():t.button==0&&(this.flushed||Ao&&this.mightDrag&&!this.mightDrag.node.isAtom||mo&&!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)?(Tc(this.view,bt.near(this.view.state.doc.resolve(n.pos)),"pointer"),t.preventDefault()):Al(this.view,"pointer")}move(t){this.updateAllowDefault(t),Al(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)}}No.touchstart=e=>{e.input.lastTouch=Date.now(),$C(e),Al(e,"pointer")};No.touchmove=e=>{e.input.lastTouch=Date.now(),Al(e,"pointer")};No.contextmenu=e=>$C(e);function ZA(e,t){return e.composing?!0:Ao&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}const Iye=ss?5e3:-1;Po.compositionstart=Po.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$to;if(t.selection instanceof ht&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(o=>o.type.spec.inclusive===!1)))e.markCursor=e.state.storedMarks||n.marks(),Qg(e,!0),e.markCursor=null;else if(Qg(e,!t.selection.empty),_s&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let o=e.domSelectionRange();for(let r=o.focusNode,s=o.focusOffset;r&&r.nodeType==1&&s!=0;){let i=s<0?r.lastChild:r.childNodes[s-1];if(!i)break;if(i.nodeType==3){let l=e.domSelection();l&&l.collapse(i,i.nodeValue.length);break}else r=i,s=-1}}e.input.composing=!0}JA(e,Iye)};Po.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,JA(e,20))};function JA(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>Qg(e),t))}function XA(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=Nye());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function Aye(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let n=$ve(t.focusNode,t.focusOffset),o=Eve(t.focusNode,t.focusOffset);if(n&&o&&n!=o){let r=o.pmViewDesc,s=e.domObserver.lastChangedTextNode;if(n==s||o==s)return s;if(!r||!r.isText(o.nodeValue))return o;if(e.input.compositionNode==o){let i=n.pmViewDesc;if(!(!i||!i.isText(n.nodeValue)))return o}}return n||o}function Nye(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}function Qg(e,t=!1){if(!(ss&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),XA(e),t||e.docView&&e.docView.dirty){let n=wC(e);return n&&!n.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(n)):(e.markCursor||t)&&!e.state.selection.empty?e.dispatch(e.state.tr.deleteSelection()):e.updateState(e.state),!0}return!1}}function Pye(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 o=getSelection(),r=document.createRange();r.selectNodeContents(t),e.dom.blur(),o.removeAllRanges(),o.addRange(r),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}const Wp=Go&&Dl<15||pd&&Ive<604;No.copy=Po.cut=(e,t)=>{let n=t,o=e.state.selection,r=n.type=="cut";if(o.empty)return;let s=Wp?null:n.clipboardData,i=o.content(),{dom:l,text:a}=jA(e,i);s?(n.preventDefault(),s.clearData(),s.setData("text/html",l.innerHTML),s.setData("text/plain",a)):Pye(e,l),r&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function Lye(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function Rye(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,o=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(o.contentEditable="true"),o.style.cssText="position: fixed; left: -10000px; top: 10px",o.focus();let r=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{e.focus(),o.parentNode&&o.parentNode.removeChild(o),n?Kp(e,o.value,null,r,t):Kp(e,o.textContent,o.innerHTML,r,t)},50)}function Kp(e,t,n,o,r){let s=HA(e,t,n,o,e.state.selection.$from);if(e.someProp("handlePaste",a=>a(e,r,s||Je.empty)))return!0;if(!s)return!1;let i=Lye(s),l=i?e.state.tr.replaceSelectionWith(i,o):e.state.tr.replaceSelection(s);return e.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function QA(e){let t=e.getData("text/plain")||e.getData("Text");if(t)return t;let n=e.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}Po.paste=(e,t)=>{let n=t;if(e.composing&&!ss)return;let o=Wp?null:n.clipboardData,r=e.input.shiftKey&&e.input.lastKeyCode!=45;o&&Kp(e,QA(o),o.getData("text/html"),r,n)?n.preventDefault():Rye(e,n)};class eN{constructor(t,n,o){this.slice=t,this.move=n,this.node=o}}const tN=Er?"altKey":"ctrlKey";No.dragstart=(e,t)=>{let n=t,o=e.input.mouseDown;if(o&&o.done(),!n.dataTransfer)return;let r=e.state.selection,s=r.empty?null:e.posAtCoords(_v(n)),i;if(!(s&&s.pos>=r.from&&s.pos<=(r instanceof mt?r.to-1:r.to))){if(o&&o.mightDrag)i=mt.create(e.state.doc,o.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let d=e.docView.nearestDesc(n.target,!0);d&&d.node.type.spec.draggable&&d!=e.docView&&(i=mt.create(e.state.doc,d.posBefore))}}let l=(i||e.state.selection).content(),{dom:a,text:u,slice:c}=jA(e,l);(!n.dataTransfer.files.length||!mo||EA>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(Wp?"Text":"text/html",a.innerHTML),n.dataTransfer.effectAllowed="copyMove",Wp||n.dataTransfer.setData("text/plain",u),e.dragging=new eN(c,!n[tN],i)};No.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)};Po.dragover=Po.dragenter=(e,t)=>t.preventDefault();Po.drop=(e,t)=>{let n=t,o=e.dragging;if(e.dragging=null,!n.dataTransfer)return;let r=e.posAtCoords(_v(n));if(!r)return;let s=e.state.doc.resolve(r.pos),i=o&&o.slice;i?e.someProp("transformPasted",h=>{i=h(i,e)}):i=HA(e,QA(n.dataTransfer),Wp?null:n.dataTransfer.getData("text/html"),!1,s);let l=!!(o&&!n[tN]);if(e.someProp("handleDrop",h=>h(e,n,i||Je.empty,l))){n.preventDefault();return}if(!i)return;n.preventDefault();let a=i?b0e(e.state.doc,s.pos,i):s.pos;a==null&&(a=s.pos);let u=e.state.tr;if(l){let{node:h}=o;h?h.replace(u):u.deleteSelection()}let c=u.mapping.map(a),d=i.openStart==0&&i.openEnd==0&&i.content.childCount==1,f=u.doc;if(d?u.replaceRangeWith(c,c,i.content.firstChild):u.replaceRange(c,c,i),u.doc.eq(f))return;let p=u.doc.resolve(c);if(d&&mt.isSelectable(i.content.firstChild)&&p.nodeAfter&&p.nodeAfter.sameMarkup(i.content.firstChild))u.setSelection(new mt(p));else{let h=u.mapping.map(a);u.mapping.maps[u.mapping.maps.length-1].forEach((m,y,v,k)=>h=k),u.setSelection(CC(e,p,u.doc.resolve(h)))}e.focus(),e.dispatch(u.setMeta("uiEvent","drop"))};No.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())&&Ii(e)},20))};No.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)};No.beforeinput=(e,t)=>{if(mo&&ss&&t.inputType=="deleteContentBackward"){e.domObserver.flushSoon();let{domChangeCount:o}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=o||(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",s=>s(e,Oa(8,"Backspace")))))return;let{$cursor:r}=e.state.selection;r&&r.pos>0&&e.dispatch(e.state.tr.delete(r.pos-1,r.pos).scrollIntoView())},50)}};for(let e in Po)No[e]=Po[e];function qp(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 e0{constructor(t,n){this.toDOM=t,this.spec=n||Ja,this.side=this.spec.side||0}map(t,n,o,r){let{pos:s,deleted:i}=t.mapResult(n.from+r,this.side<0?-1:1);return i?null:new Un(s-o,s-o,this)}valid(){return!0}eq(t){return this==t||t instanceof e0&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&qp(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class Fl{constructor(t,n){this.attrs=t,this.spec=n||Ja}map(t,n,o,r){let s=t.map(n.from+r,this.spec.inclusiveStart?-1:1)-o,i=t.map(n.to+r,this.spec.inclusiveEnd?1:-1)-o;return s>=i?null:new Un(s,i,this)}valid(t,n){return n.from<n.to}eq(t){return this==t||t instanceof Fl&&qp(this.attrs,t.attrs)&&qp(this.spec,t.spec)}static is(t){return t.type instanceof Fl}destroy(){}}class EC{constructor(t,n){this.attrs=t,this.spec=n||Ja}map(t,n,o,r){let s=t.mapResult(n.from+r,1);if(s.deleted)return null;let i=t.mapResult(n.to+r,-1);return i.deleted||i.pos<=s.pos?null:new Un(s.pos-o,i.pos-o,this)}valid(t,n){let{index:o,offset:r}=t.content.findIndex(n.from),s;return r==n.from&&!(s=t.child(o)).isText&&r+s.nodeSize==n.to}eq(t){return this==t||t instanceof EC&&qp(this.attrs,t.attrs)&&qp(this.spec,t.spec)}destroy(){}}class Un{constructor(t,n,o){this.from=t,this.to=n,this.type=o}copy(t,n){return new Un(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,o){return this.type.map(t,this,n,o)}static widget(t,n,o){return new Un(t,t,new e0(n,o))}static inline(t,n,o,r){return new Un(t,n,new Fl(o,r))}static node(t,n,o,r){return new Un(t,n,new EC(o,r))}get spec(){return this.type.spec}get inline(){return this.type instanceof Fl}get widget(){return this.type instanceof e0}}const Qu=[],Ja={};class an{constructor(t,n){this.local=t.length?t:Qu,this.children=n.length?n:Qu}static create(t,n){return n.length?t0(n,t,0,Ja):fo}find(t,n,o){let r=[];return this.findInner(t??0,n??1e9,r,0,o),r}findInner(t,n,o,r,s){for(let i=0;i<this.local.length;i++){let l=this.local[i];l.from<=n&&l.to>=t&&(!s||s(l.spec))&&o.push(l.copy(l.from+r,l.to+r))}for(let i=0;i<this.children.length;i+=3)if(this.children[i]<n&&this.children[i+1]>t){let l=this.children[i]+1;this.children[i+2].findInner(t-l,n-l,o,r+l,s)}}map(t,n,o){return this==fo||t.maps.length==0?this:this.mapInner(t,n,0,0,o||Ja)}mapInner(t,n,o,r,s){let i;for(let l=0;l<this.local.length;l++){let a=this.local[l].map(t,o,r);a&&a.type.valid(n,a)?(i||(i=[])).push(a):s.onRemove&&s.onRemove(this.local[l].spec)}return this.children.length?Dye(this.children,i||[],t,n,o,r,s):i?new an(i.sort(Xa),Qu):fo}add(t,n){return n.length?this==fo?an.create(t,n):this.addInner(t,n,0):this}addInner(t,n,o){let r,s=0;t.forEach((l,a)=>{let u=a+o,c;if(c=oN(n,l,u)){for(r||(r=this.children.slice());s<r.length&&r[s]<a;)s+=3;r[s]==a?r[s+2]=r[s+2].addInner(l,c,u+1):r.splice(s,0,a,a+l.nodeSize,t0(c,l,u+1,Ja)),s+=3}});let i=nN(s?rN(n):n,-o);for(let l=0;l<i.length;l++)i[l].type.valid(t,i[l])||i.splice(l--,1);return new an(i.length?this.local.concat(i).sort(Xa):this.local,r||this.children)}remove(t){return t.length==0||this==fo?this:this.removeInner(t,0)}removeInner(t,n){let o=this.children,r=this.local;for(let s=0;s<o.length;s+=3){let i,l=o[s]+n,a=o[s+1]+n;for(let c=0,d;c<t.length;c++)(d=t[c])&&d.from>l&&d.to<a&&(t[c]=null,(i||(i=[])).push(d));if(!i)continue;o==this.children&&(o=this.children.slice());let u=o[s+2].removeInner(i,l+1);u!=fo?o[s+2]=u:(o.splice(s,3),s-=3)}if(r.length){for(let s=0,i;s<t.length;s++)if(i=t[s])for(let l=0;l<r.length;l++)r[l].eq(i,n)&&(r==this.local&&(r=this.local.slice()),r.splice(l--,1))}return o==this.children&&r==this.local?this:r.length||o.length?new an(r,o):fo}forChild(t,n){if(this==fo)return this;if(n.isLeaf)return an.empty;let o,r;for(let l=0;l<this.children.length;l+=3)if(this.children[l]>=t){this.children[l]==t&&(o=this.children[l+2]);break}let s=t+1,i=s+n.content.size;for(let l=0;l<this.local.length;l++){let a=this.local[l];if(a.from<i&&a.to>s&&a.type instanceof Fl){let u=Math.max(s,a.from)-s,c=Math.min(i,a.to)-s;u<c&&(r||(r=[])).push(a.copy(u,c))}}if(r){let l=new an(r.sort(Xa),Qu);return o?new $l([l,o]):l}return o||fo}eq(t){if(this==t)return!0;if(!(t instanceof an)||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 xC(this.localsInner(t))}localsInner(t){if(this==fo)return Qu;if(t.inlineContent||!this.local.some(Fl.is))return this.local;let n=[];for(let o=0;o<this.local.length;o++)this.local[o].type instanceof Fl||n.push(this.local[o]);return n}forEachSet(t){t(this)}}an.empty=new an([],[]);an.removeOverlap=xC;const fo=an.empty;class $l{constructor(t){this.members=t}map(t,n){const o=this.members.map(r=>r.map(t,n,Ja));return $l.from(o)}forChild(t,n){if(n.isLeaf)return an.empty;let o=[];for(let r=0;r<this.members.length;r++){let s=this.members[r].forChild(t,n);s!=fo&&(s instanceof $l?o=o.concat(s.members):o.push(s))}return $l.from(o)}eq(t){if(!(t instanceof $l)||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,o=!0;for(let r=0;r<this.members.length;r++){let s=this.members[r].localsInner(t);if(s.length)if(!n)n=s;else{o&&(n=n.slice(),o=!1);for(let i=0;i<s.length;i++)n.push(s[i])}}return n?xC(o?n:n.sort(Xa)):Qu}static from(t){switch(t.length){case 0:return fo;case 1:return t[0];default:return new $l(t.every(n=>n instanceof an)?t:t.reduce((n,o)=>n.concat(o instanceof an?o:o.members),[]))}}forEachSet(t){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(t)}}function Dye(e,t,n,o,r,s,i){let l=e.slice();for(let u=0,c=s;u<n.maps.length;u++){let d=0;n.maps[u].forEach((f,p,h,m)=>{let y=m-h-(p-f);for(let v=0;v<l.length;v+=3){let k=l[v+1];if(k<0||f>k+c-d)continue;let b=l[v]+c-d;p>=b?l[v+1]=f<=b?-2:-1:f>=c&&y&&(l[v]+=y,l[v+1]+=y)}d+=y}),c=n.maps[u].map(c,-1)}let a=!1;for(let u=0;u<l.length;u+=3)if(l[u+1]<0){if(l[u+1]==-2){a=!0,l[u+1]=-1;continue}let c=n.map(e[u]+s),d=c-r;if(d<0||d>=o.content.size){a=!0;continue}let f=n.map(e[u+1]+s,-1),p=f-r,{index:h,offset:m}=o.content.findIndex(d),y=o.maybeChild(h);if(y&&m==d&&m+y.nodeSize==p){let v=l[u+2].mapInner(n,y,c+1,e[u]+s+1,i);v!=fo?(l[u]=d,l[u+1]=p,l[u+2]=v):(l[u+1]=-2,a=!0)}else a=!0}if(a){let u=Vye(l,e,t,n,r,s,i),c=t0(u,o,0,i);t=c.local;for(let d=0;d<l.length;d+=3)l[d+1]<0&&(l.splice(d,3),d-=3);for(let d=0,f=0;d<c.children.length;d+=3){let p=c.children[d];for(;f<l.length&&l[f]<p;)f+=3;l.splice(f,0,c.children[d],c.children[d+1],c.children[d+2])}}return new an(t.sort(Xa),l)}function nN(e,t){if(!t||!e.length)return e;let n=[];for(let o=0;o<e.length;o++){let r=e[o];n.push(new Un(r.from+t,r.to+t,r.type))}return n}function Vye(e,t,n,o,r,s,i){function l(a,u){for(let c=0;c<a.local.length;c++){let d=a.local[c].map(o,r,u);d?n.push(d):i.onRemove&&i.onRemove(a.local[c].spec)}for(let c=0;c<a.children.length;c+=3)l(a.children[c+2],a.children[c]+u+1)}for(let a=0;a<e.length;a+=3)e[a+1]==-1&&l(e[a+2],t[a]+s+1);return n}function oN(e,t,n){if(t.isLeaf)return null;let o=n+t.nodeSize,r=null;for(let s=0,i;s<e.length;s++)(i=e[s])&&i.from>n&&i.to<o&&((r||(r=[])).push(i),e[s]=null);return r}function rN(e){let t=[];for(let n=0;n<e.length;n++)e[n]!=null&&t.push(e[n]);return t}function t0(e,t,n,o){let r=[],s=!1;t.forEach((l,a)=>{let u=oN(e,l,a+n);if(u){s=!0;let c=t0(u,l,n+a+1,o);c!=fo&&r.push(a,a+l.nodeSize,c)}});let i=nN(s?rN(e):e,-n).sort(Xa);for(let l=0;l<i.length;l++)i[l].type.valid(t,i[l])||(o.onRemove&&o.onRemove(i[l].spec),i.splice(l--,1));return i.length||r.length?new an(i,r):fo}function Xa(e,t){return e.from-t.from||e.to-t.to}function xC(e){let t=e;for(let n=0;n<t.length-1;n++){let o=t[n];if(o.from!=o.to)for(let r=n+1;r<t.length;r++){let s=t[r];if(s.from==o.from){s.to!=o.to&&(t==e&&(t=e.slice()),t[r]=s.copy(s.from,o.to),h9(t,r+1,s.copy(o.to,s.to)));continue}else{s.from<o.to&&(t==e&&(t=e.slice()),t[n]=o.copy(o.from,s.from),h9(t,r,o.copy(s.from,o.to)));break}}}return t}function h9(e,t,n){for(;t<e.length&&Xa(n,e[t])>0;)t++;e.splice(t,0,n)}function Hy(e){let t=[];return e.someProp("decorations",n=>{let o=n(e.state);o&&o!=fo&&t.push(o)}),e.cursorWrapper&&t.push(an.create(e.state.doc,[e.cursorWrapper.deco])),$l.from(t)}const Fye={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Bye=Go&&Dl<=11;class zye{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset}}class jye{constructor(t,n){this.view=t,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new zye,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(o=>{for(let r=0;r<o.length;r++)this.queue.push(o[r]);Go&&Dl<=11&&o.some(r=>r.type=="childList"&&r.removedNodes.length||r.type=="characterData"&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():this.flush()}),Bye&&(this.onCharData=o=>{this.queue.push({target:o.target,type:"characterData",oldValue:o.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,Fye)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let t=this.observer.takeRecords();if(t.length){for(let n=0;n<t.length;n++)this.queue.push(t[n]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(i9(this.view)){if(this.suppressingSelectionUpdates)return Ii(this.view);if(Go&&Dl<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&mu(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(t){if(!t.focusNode)return!0;let n=new Set,o;for(let s=t.focusNode;s;s=Up(s))n.add(s);for(let s=t.anchorNode;s;s=Up(s))if(n.has(s)){o=s;break}let r=o&&this.view.docView.nearestDesc(o);if(r&&r.ignoreMutation({type:"selection",target:o.nodeType==3?o.parentNode:o}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}flush(){let{view:t}=this;if(!t.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let o=t.domSelectionRange(),r=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(o)&&i9(t)&&!this.ignoreSelectionChange(o),s=-1,i=-1,l=!1,a=[];if(t.editable)for(let c=0;c<n.length;c++){let d=this.registerMutation(n[c],a);d&&(s=s<0?d.from:Math.min(d.from,s),i=i<0?d.to:Math.max(d.to,i),d.typeOver&&(l=!0))}if(_s&&a.length){let c=a.filter(d=>d.nodeName=="BR");if(c.length==2){let[d,f]=c;d.parentNode&&d.parentNode.parentNode==f.parentNode?f.remove():d.remove()}else{let{focusNode:d}=this.currentSelection;for(let f of c){let p=f.parentNode;p&&p.nodeName=="LI"&&(!d||Wye(t,d)!=p)&&f.remove()}}}let u=null;s<0&&r&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)<Date.now()-300&&vv(o)&&(u=wC(t))&&u.eq(bt.near(t.state.doc.resolve(0),1))?(t.input.lastFocus=0,Ii(t),this.currentSelection.set(o),t.scrollToSelection()):(s>-1||r)&&(s>-1&&(t.docView.markDirty(s,i),Hye(t)),this.handleDOMChange(s,i,l,a),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(o)||Ii(t),this.currentSelection.set(o))}registerMutation(t,n){if(n.indexOf(t.target)>-1)return null;let o=this.view.docView.nearestDesc(t.target);if(t.type=="attributes"&&(o==this.view.docView||t.attributeName=="contenteditable"||t.attributeName=="style"&&!t.oldValue&&!t.target.getAttribute("style"))||!o||o.ignoreMutation(t))return null;if(t.type=="childList"){for(let c=0;c<t.addedNodes.length;c++){let d=t.addedNodes[c];n.push(d),d.nodeType==3&&(this.lastChangedTextNode=d)}if(o.contentDOM&&o.contentDOM!=o.dom&&!o.contentDOM.contains(t.target))return{from:o.posBefore,to:o.posAfter};let r=t.previousSibling,s=t.nextSibling;if(Go&&Dl<=11&&t.addedNodes.length)for(let c=0;c<t.addedNodes.length;c++){let{previousSibling:d,nextSibling:f}=t.addedNodes[c];(!d||Array.prototype.indexOf.call(t.addedNodes,d)<0)&&(r=d),(!f||Array.prototype.indexOf.call(t.addedNodes,f)<0)&&(s=f)}let i=r&&r.parentNode==t.target?so(r)+1:0,l=o.localPosFromDOM(t.target,i,-1),a=s&&s.parentNode==t.target?so(s):t.target.childNodes.length,u=o.localPosFromDOM(t.target,a,1);return{from:l,to:u}}else return t.type=="attributes"?{from:o.posAtStart-o.border,to:o.posAtEnd+o.border}:(this.lastChangedTextNode=t.target,{from:o.posAtStart,to:o.posAtEnd,typeOver:t.target.nodeValue==t.oldValue})}}let m9=new WeakMap,g9=!1;function Hye(e){if(!m9.has(e)&&(m9.set(e,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(e.dom).whiteSpace)!==-1)){if(e.requiresGeckoHackNode=_s,g9)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),g9=!0}}function v9(e,t){let n=t.startContainer,o=t.startOffset,r=t.endContainer,s=t.endOffset,i=e.domAtPos(e.state.selection.anchor);return mu(i.node,i.offset,r,s)&&([n,o,r,s]=[r,s,n,o]),{anchorNode:n,anchorOffset:o,focusNode:r,focusOffset:s}}function Uye(e,t){if(t.getComposedRanges){let r=t.getComposedRanges(e.root)[0];if(r)return v9(e,r)}let n;function o(r){r.preventDefault(),r.stopImmediatePropagation(),n=r.getTargetRanges()[0]}return e.dom.addEventListener("beforeinput",o,!0),document.execCommand("indent"),e.dom.removeEventListener("beforeinput",o,!0),n?v9(e,n):null}function Wye(e,t){for(let n=t.parentNode;n&&n!=e.dom;n=n.parentNode){let o=e.docView.nearestDesc(n,!0);if(o&&o.node.isBlock)return n}return null}function Kye(e,t,n){let{node:o,fromOffset:r,toOffset:s,from:i,to:l}=e.docView.parseRange(t,n),a=e.domSelectionRange(),u,c=a.anchorNode;if(c&&e.dom.contains(c.nodeType==1?c:c.parentNode)&&(u=[{node:c,offset:a.anchorOffset}],vv(a)||u.push({node:a.focusNode,offset:a.focusOffset})),mo&&e.input.lastKeyCode===8)for(let y=s;y>r;y--){let v=o.childNodes[y-1],k=v.pmViewDesc;if(v.nodeName=="BR"&&!k){s=y;break}if(!k||k.size)break}let d=e.state.doc,f=e.someProp("domParser")||pu.fromSchema(e.state.schema),p=d.resolve(i),h=null,m=f.parse(o,{topNode:p.parent,topMatch:p.parent.contentMatchAt(p.index()),topOpen:!0,from:r,to:s,preserveWhitespace:p.parent.type.whitespace=="pre"?"full":!0,findPositions:u,ruleFromNode:qye,context:p});if(u&&u[0].pos!=null){let y=u[0].pos,v=u[1]&&u[1].pos;v==null&&(v=y),h={anchor:y+i,head:v+i}}return{doc:m,sel:h,from:i,to:l}}function qye(e){let t=e.pmViewDesc;if(t)return t.parseRule();if(e.nodeName=="BR"&&e.parentNode){if(Ao&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(e.parentNode.lastChild==e||Ao&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if(e.nodeName=="IMG"&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}const Gye=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function Yye(e,t,n,o,r){let s=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let P=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,I=wC(e,P);if(I&&!e.state.selection.eq(I)){if(mo&&ss&&e.input.lastKeyCode===13&&Date.now()-100<e.input.lastKeyCodeTime&&e.someProp("handleKeyDown",F=>F(e,Oa(13,"Enter"))))return;let V=e.state.tr.setSelection(I);P=="pointer"?V.setMeta("pointer",!0):P=="key"&&V.scrollIntoView(),s&&V.setMeta("composition",s),e.dispatch(V)}return}let i=e.state.doc.resolve(t),l=i.sharedDepth(n);t=i.before(l+1),n=e.state.doc.resolve(n).after(l+1);let a=e.state.selection,u=Kye(e,t,n),c=e.state.doc,d=c.slice(u.from,u.to),f,p;e.input.lastKeyCode===8&&Date.now()-100<e.input.lastKeyCodeTime?(f=e.state.selection.to,p="end"):(f=e.state.selection.from,p="start"),e.input.lastKeyCode=null;let h=Xye(d.content,u.doc.content,u.from,f,p);if((pd&&e.input.lastIOSEnter>Date.now()-225||ss)&&r.some(P=>P.nodeType==1&&!Gye.test(P.nodeName))&&(!h||h.endA>=h.endB)&&e.someProp("handleKeyDown",P=>P(e,Oa(13,"Enter")))){e.input.lastIOSEnter=0;return}if(!h)if(o&&a instanceof ht&&!a.empty&&a.$head.sameParent(a.$anchor)&&!e.composing&&!(u.sel&&u.sel.anchor!=u.sel.head))h={start:a.from,endA:a.to,endB:a.to};else{if(u.sel){let P=y9(e,e.state.doc,u.sel);if(P&&!P.eq(e.state.selection)){let I=e.state.tr.setSelection(P);s&&I.setMeta("composition",s),e.dispatch(I)}}return}e.input.domChangeCount++,e.state.selection.from<e.state.selection.to&&h.start==h.endB&&e.state.selection instanceof ht&&(h.start>e.state.selection.from&&h.start<=e.state.selection.from+2&&e.state.selection.from>=u.from?h.start=e.state.selection.from:h.endA<e.state.selection.to&&h.endA>=e.state.selection.to-2&&e.state.selection.to<=u.to&&(h.endB+=e.state.selection.to-h.endA,h.endA=e.state.selection.to)),Go&&Dl<=11&&h.endB==h.start+1&&h.endA==h.start&&h.start>u.from&&u.doc.textBetween(h.start-u.from-1,h.start-u.from+1)==" "&&(h.start--,h.endA--,h.endB--);let m=u.doc.resolveNoCache(h.start-u.from),y=u.doc.resolveNoCache(h.endB-u.from),v=c.resolve(h.start),k=m.sameParent(y)&&m.parent.inlineContent&&v.end()>=h.endA,b;if((pd&&e.input.lastIOSEnter>Date.now()-225&&(!k||r.some(P=>P.nodeName=="DIV"||P.nodeName=="P"))||!k&&m.pos<u.doc.content.size&&!m.sameParent(y)&&(b=bt.findFrom(u.doc.resolve(m.pos+1),1,!0))&&b.head==y.pos)&&e.someProp("handleKeyDown",P=>P(e,Oa(13,"Enter")))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>h.start&&Jye(c,h.start,h.endA,m,y)&&e.someProp("handleKeyDown",P=>P(e,Oa(8,"Backspace")))){ss&&mo&&e.domObserver.suppressSelectionUpdates();return}mo&&ss&&h.endB==h.start&&(e.input.lastAndroidDelete=Date.now()),ss&&!k&&m.start()!=y.start()&&y.parentOffset==0&&m.depth==y.depth&&u.sel&&u.sel.anchor==u.sel.head&&u.sel.head==h.endA&&(h.endB-=2,y=u.doc.resolveNoCache(h.endB-u.from),setTimeout(()=>{e.someProp("handleKeyDown",function(P){return P(e,Oa(13,"Enter"))})},20));let $=h.start,x=h.endA,E,M,N;if(k){if(m.pos==y.pos)Go&&Dl<=11&&m.parentOffset==0&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>Ii(e),20)),E=e.state.tr.delete($,x),M=c.resolve(h.start).marksAcross(c.resolve(h.endA));else if(h.endA==h.endB&&(N=Zye(m.parent.content.cut(m.parentOffset,y.parentOffset),v.parent.content.cut(v.parentOffset,h.endA-v.start()))))E=e.state.tr,N.type=="add"?E.addMark($,x,N.mark):E.removeMark($,x,N.mark);else if(m.parent.child(m.index()).isText&&m.index()==y.index()-(y.textOffset?0:1)){let P=m.parent.textBetween(m.parentOffset,y.parentOffset);if(e.someProp("handleTextInput",I=>I(e,$,x,P)))return;E=e.state.tr.insertText(P,$,x)}}if(E||(E=e.state.tr.replace($,x,u.doc.slice(h.start-u.from,h.endB-u.from))),u.sel){let P=y9(e,E.doc,u.sel);P&&!(mo&&ss&&e.composing&&P.empty&&(h.start!=h.endB||e.input.lastAndroidDelete<Date.now()-100)&&(P.head==$||P.head==E.mapping.map(x)-1)||Go&&P.empty&&P.head==$)&&E.setSelection(P)}M&&E.ensureMarks(M),s&&E.setMeta("composition",s),e.dispatch(E.scrollIntoView())}function y9(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:CC(e,t.resolve(n.anchor),t.resolve(n.head))}function Zye(e,t){let n=e.firstChild.marks,o=t.firstChild.marks,r=n,s=o,i,l,a;for(let c=0;c<o.length;c++)r=o[c].removeFromSet(r);for(let c=0;c<n.length;c++)s=n[c].removeFromSet(s);if(r.length==1&&s.length==0)l=r[0],i="add",a=c=>c.mark(l.addToSet(c.marks));else if(r.length==0&&s.length==1)l=s[0],i="remove",a=c=>c.mark(l.removeFromSet(c.marks));else return null;let u=[];for(let c=0;c<t.childCount;c++)u.push(a(t.child(c)));if(We.from(u).eq(e))return{mark:l,type:i}}function Jye(e,t,n,o,r){if(n-t<=r.pos-o.pos||Uy(o,!0,!1)<r.pos)return!1;let s=e.resolve(t);if(!o.parent.isTextblock){let l=s.nodeAfter;return l!=null&&n==t+l.nodeSize}if(s.parentOffset<s.parent.content.size||!s.parent.isTextblock)return!1;let i=e.resolve(Uy(s,!0,!0));return!i.parent.isTextblock||i.pos>n||Uy(i,!0,!1)<n?!1:o.parent.content.cut(o.parentOffset).eq(i.parent.content)}function Uy(e,t,n){let o=e.depth,r=t?e.end():e.pos;for(;o>0&&(t||e.indexAfter(o)==e.node(o).childCount);)o--,r++,t=!1;if(n){let s=e.node(o).maybeChild(e.indexAfter(o));for(;s&&!s.isLeaf;)s=s.firstChild,r++}return r}function Xye(e,t,n,o,r){let s=e.findDiffStart(t,n);if(s==null)return null;let{a:i,b:l}=e.findDiffEnd(t,n+e.size,n+t.size);if(r=="end"){let a=Math.max(0,s-Math.min(i,l));o-=i+a-s}if(i<s&&e.size<t.size){let a=o<=s&&o>=i?s-o:0;s-=a,s&&s<t.size&&_9(t.textBetween(s-1,s+1))&&(s+=a?1:-1),l=s+(l-i),i=s}else if(l<s){let a=o<=s&&o>=l?s-o:0;s-=a,s&&s<e.size&&_9(e.textBetween(s-1,s+1))&&(s+=a?1:-1),i=s+(i-l),l=s}return{start:s,endA:i,endB:l}}function _9(e){if(e.length!=2)return!1;let t=e.charCodeAt(0),n=e.charCodeAt(1);return t>=56320&&t<=57343&&n>=55296&&n<=56319}class Qye{constructor(t,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new yye,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(S9),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):typeof t=="function"?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=C9(this),w9(this),this.nodeViews=k9(this),this.docView=e9(this.state.doc,b9(this),Hy(this),this.dom,this),this.domObserver=new jye(this,(o,r,s,i)=>Yye(this,o,r,s,i)),this.domObserver.start(),_ye(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let t=this._props;this._props={};for(let n in t)this._props[n]=t[n];this._props.state=this.state}return this._props}update(t){t.handleDOMEvents!=this._props.handleDOMEvents&&f2(this);let n=this._props;this._props=t,t.plugins&&(t.plugins.forEach(S9),this.directPlugins=t.plugins),this.updateStateInner(t.state,n)}setProps(t){let n={};for(let o in this._props)n[o]=this._props[o];n.state=this.state;for(let o in t)n[o]=t[o];this.update(n)}updateState(t){this.updateStateInner(t,this._props)}updateStateInner(t,n){var o;let r=this.state,s=!1,i=!1;t.storedMarks&&this.composing&&(XA(this),i=!0),this.state=t;let l=r.plugins!=t.plugins||this._props.plugins!=n.plugins;if(l||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let p=k9(this);t_e(p,this.nodeViews)&&(this.nodeViews=p,s=!0)}(l||n.handleDOMEvents!=this._props.handleDOMEvents)&&f2(this),this.editable=C9(this),w9(this);let a=Hy(this),u=b9(this),c=r.plugins!=t.plugins&&!r.doc.eq(t.doc)?"reset":t.scrollToSelection>r.scrollToSelection?"to selection":"preserve",d=s||!this.docView.matchesNode(t.doc,u,a);(d||!t.selection.eq(r.selection))&&(i=!0);let f=c=="preserve"&&i&&this.dom.style.overflowAnchor==null&&Pve(this);if(i){this.domObserver.stop();let p=d&&(Go||mo)&&!this.composing&&!r.selection.empty&&!t.selection.empty&&e_e(r.selection,t.selection);if(d){let h=mo?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=Aye(this)),(s||!this.docView.update(t.doc,u,a,this))&&(this.docView.updateOuterDeco(u),this.docView.destroy(),this.docView=e9(t.doc,u,a,this.dom,this)),h&&!this.trackWrites&&(p=!0)}p||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&rye(this))?Ii(this,p):(FA(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(r),!((o=this.dragging)===null||o===void 0)&&o.node&&!r.doc.eq(t.doc)&&this.updateDraggedNode(this.dragging,r),c=="reset"?this.dom.scrollTop=0:c=="to selection"?this.scrollToSelection():f&&Lve(f)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof mt){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&GS(this,n.getBoundingClientRect(),t)}else GS(this,this.coordsAtPos(this.state.selection.head,1),t)}destroyPluginViews(){let t;for(;t=this.pluginViews.pop();)t.destroy&&t.destroy()}updatePluginViews(t){if(!t||t.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n<this.directPlugins.length;n++){let o=this.directPlugins[n];o.spec.view&&this.pluginViews.push(o.spec.view(this))}for(let n=0;n<this.state.plugins.length;n++){let o=this.state.plugins[n];o.spec.view&&this.pluginViews.push(o.spec.view(this))}}else for(let n=0;n<this.pluginViews.length;n++){let o=this.pluginViews[n];o.update&&o.update(this,t)}}updateDraggedNode(t,n){let o=t.node,r=-1;if(this.state.doc.nodeAt(o.from)==o.node)r=o.from;else{let s=o.from+(this.state.doc.content.size-n.doc.content.size);(s>0&&this.state.doc.nodeAt(s))==o.node&&(r=s)}this.dragging=new eN(t.slice,t.move,r<0?void 0:mt.create(this.state.doc,r))}someProp(t,n){let o=this._props&&this._props[t],r;if(o!=null&&(r=n?n(o):o))return r;for(let i=0;i<this.directPlugins.length;i++){let l=this.directPlugins[i].props[t];if(l!=null&&(r=n?n(l):l))return r}let s=this.state.plugins;if(s)for(let i=0;i<s.length;i++){let l=s[i].props[t];if(l!=null&&(r=n?n(l):l))return r}}hasFocus(){if(Go){let t=this.root.activeElement;if(t==this.dom)return!0;if(!t||!this.dom.contains(t))return!1;for(;t&&this.dom!=t&&this.dom.contains(t);){if(t.contentEditable=="false")return!1;t=t.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&Rve(this.dom),Ii(this),this.domObserver.start()}get root(){let t=this._root;if(t==null){for(let n=this.dom.parentNode;n;n=n.parentNode)if(n.nodeType==9||n.nodeType==11&&n.host)return n.getSelection||(Object.getPrototypeOf(n).getSelection=()=>n.ownerDocument.getSelection()),this._root=n}return t||document}updateRoot(){this._root=null}posAtCoords(t){return zve(this,t)}coordsAtPos(t,n=1){return IA(this,t,n)}domAtPos(t,n=0){return this.docView.domFromPos(t,n)}nodeDOM(t){let n=this.docView.descAt(t);return n?n.nodeDOM:null}posAtDOM(t,n,o=-1){let r=this.docView.posFromDOM(t,n,o);if(r==null)throw new RangeError("DOM position not inside the editor");return r}endOfTextblock(t,n){return Kve(this,n||this.state,t)}pasteHTML(t,n){return Kp(this,"",t,!1,n||new ClipboardEvent("paste"))}pasteText(t,n){return Kp(this,t,null,!0,n||new ClipboardEvent("paste"))}destroy(){this.docView&&(bye(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Hy(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,kve())}get isDestroyed(){return this.docView==null}dispatchEvent(t){return Cye(this,t)}dispatch(t){let n=this._props.dispatchTransaction;n?n.call(this,t):this.updateState(this.state.apply(t))}domSelectionRange(){let t=this.domSelection();return t?Ao&&this.root.nodeType===11&&Tve(this.dom.ownerDocument)==this.dom&&Uye(this,t)||t:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function b9(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(e.state)),n)for(let o in n)o=="class"?t.class+=" "+n[o]:o=="style"?t.style=(t.style?t.style+";":"")+n[o]:!t[o]&&o!="contenteditable"&&o!="nodeName"&&(t[o]=String(n[o]))}),t.translate||(t.translate="no"),[Un.node(0,e.state.doc.content.size,t)]}function w9(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:Un.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function C9(e){return!e.someProp("editable",t=>t(e.state)===!1)}function e_e(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}function k9(e){let t=Object.create(null);function n(o){for(let r in o)Object.prototype.hasOwnProperty.call(t,r)||(t[r]=o[r])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function t_e(e,t){let n=0,o=0;for(let r in e){if(e[r]!=t[r])return!0;n++}for(let r in t)o++;return n!=o}function S9(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var sN=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},dt=(e,t,n)=>(sN(e,t,"read from private field"),n?n.call(e):t.get(e)),Qn=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},_n=(e,t,n,o)=>(sN(e,t,"write to private field"),o?o.call(e,n):t.set(e,n),n);function aa(e,t){return e.meta={package:"@milkdown/core",group:"System",...t},e}const iN={strong:(e,t,n,o)=>{const r=e.marker||n.options.strong||"*",s=n.enter("strong"),i=n.createTracker(o);let l=i.move(r+r);return l+=i.move(n.containerPhrasing(e,{before:l,after:r,...i.current()})),l+=i.move(r+r),s(),l},emphasis:(e,t,n,o)=>{const r=e.marker||n.options.emphasis||"*",s=n.enter("emphasis"),i=n.createTracker(o);let l=i.move(r);return l+=i.move(n.containerPhrasing(e,{before:l,after:r,...i.current()})),l+=i.move(r),s(),l}},bn=jt({},"editorView"),yf=jt({},"editorState"),Wy=jt([],"initTimer"),$9=jt({},"editor"),Gp=jt([],"inputRules"),bs=jt([],"prosePlugins"),Yp=jt([],"remarkPlugins"),p2=jt([],"nodeView"),h2=jt([],"markView"),Qa=jt(qb().use(Bb).use(Ub),"remark"),sp=jt({handlers:iN},"remarkStringifyOptions"),T1=oa("ConfigReady");function n_e(e){const t=n=>(n.record(T1),async()=>(await e(n),n.done(T1),()=>{n.clearTimer(T1)}));return aa(t,{displayName:"Config"}),t}const eu=oa("InitReady");function o_e(e){const t=n=>(n.inject($9,e).inject(bs,[]).inject(Yp,[]).inject(Gp,[]).inject(p2,[]).inject(h2,[]).inject(sp,{handlers:iN}).inject(Qa,qb().use(Bb).use(Ub)).inject(Wy,[T1]).record(eu),async()=>{await n.waitTimers(Wy);const o=n.get(sp);return n.set(Qa,qb().use(Bb).use(Ub,o)),n.done(eu),()=>{n.remove($9).remove(bs).remove(Yp).remove(Gp).remove(p2).remove(h2).remove(sp).remove(Qa).remove(Wy).clearTimer(eu)}});return aa(t,{displayName:"Init"}),t}const qs=oa("SchemaReady"),Ky=jt([],"schemaTimer"),fs=jt({},"schema"),Mc=jt([],"nodes"),Oc=jt([],"marks");function E9(e){var t;return{...e,parseDOM:(t=e.parseDOM)==null?void 0:t.map(n=>({priority:e.priority,...n}))}}const lN=e=>(e.inject(fs,{}).inject(Mc,[]).inject(Oc,[]).inject(Ky,[eu]).record(qs),async()=>{await e.waitTimers(Ky);const t=e.get(Qa),n=e.get(Yp).reduce((i,l)=>i.use(l.plugin,l.options),t);e.set(Qa,n);const o=Object.fromEntries(e.get(Mc).map(([i,l])=>[i,E9(l)])),r=Object.fromEntries(e.get(Oc).map(([i,l])=>[i,E9(l)])),s=new _he({nodes:o,marks:r});return e.set(fs,s),e.done(qs),()=>{e.remove(fs).remove(Mc).remove(Oc).remove(Ky).clearTimer(qs)}});aa(lN,{displayName:"Schema"});var ec,Sa;let aN=class{constructor(){Qn(this,ec,void 0),Qn(this,Sa,void 0),_n(this,ec,new ZO),_n(this,Sa,null),this.setCtx=t=>{_n(this,Sa,t)}}get ctx(){return dt(this,Sa)}create(t,n){const o=t.create(dt(this,ec).sliceMap);return o.set(n),o}get(t){return dt(this,ec).get(t).get()}remove(t){return dt(this,ec).remove(t)}call(t,n){if(dt(this,Sa)==null)throw qpe();const o=this.get(t)(n),r=dt(this,Sa).get(bn);return o(r.state,r.dispatch,r)}};ec=new WeakMap,Sa=new WeakMap;function r_e(e="cmdKey"){return jt(()=>()=>!1,e)}const Vt=jt(new aN,"commands"),qy=jt([qs],"commandsTimer"),ip=oa("CommandsReady"),uN=e=>{const t=new aN;return t.setCtx(e),e.inject(Vt,t).inject(qy,[qs]).record(ip),async()=>(await e.waitTimers(qy),e.done(ip),()=>{e.remove(Vt).remove(qy).clearTimer(ip)})};aa(uN,{displayName:"Commands"});const M1=oa("ParserReady"),cN=()=>{throw nC()},Ic=jt(cN,"parser"),Gy=jt([],"parserTimer"),dN=e=>(e.inject(Ic,cN).inject(Gy,[qs]).record(M1),async()=>{await e.waitTimers(Gy);const t=e.get(Qa),n=e.get(fs);return e.set(Ic,Qge.create(n,t)),e.done(M1),()=>{e.remove(Ic).remove(Gy).clearTimer(M1)}});aa(dN,{displayName:"Parser"});const lp=oa("SerializerReady"),Yy=jt([],"serializerTimer"),fN=()=>{throw nC()},Ac=jt(fN,"serializer"),pN=e=>(e.inject(Ac,fN).inject(Yy,[qs]).record(lp),async()=>{await e.waitTimers(Yy);const t=e.get(Qa),n=e.get(fs);return e.set(Ac,t0e.create(n,t)),e.done(lp),()=>{e.remove(Ac).remove(Yy).clearTimer(lp)}});aa(pN,{displayName:"Serializer"});const O1=jt("","defaultValue"),I1=jt(e=>e,"stateOptions"),Zy=jt([],"editorStateTimer"),A1=oa("EditorStateReady");function s_e(e,t,n){if(typeof e=="string")return t(e);if(e.type==="html")return pu.fromSchema(n).parse(e.dom);if(e.type==="json")return Rl.fromJSON(n,e.value);throw Bpe(e)}const i_e=new wn("MILKDOWN_STATE_TRACKER");function l_e(e){const t=gv(I0e,vC,gA,vA);return e.Backspace=t,e}const hN=e=>(e.inject(O1,"").inject(yf,{}).inject(I1,t=>t).inject(Zy,[M1,lp,ip]).record(A1),async()=>{await e.waitTimers(Zy);const t=e.get(fs),n=e.get(Ic),o=e.get(Gp),r=e.get(I1),s=e.get(bs),i=e.get(O1),l=s_e(i,n,t),a=[...s,new On({key:i_e,state:{init:()=>{},apply:(d,f,p,h)=>{e.set(yf,h)}}}),B0e({rules:o}),kA(l_e(gve))];e.set(bs,a);const u=r({schema:t,doc:l,plugins:a}),c=Va.create(u);return e.set(yf,c),e.done(A1),()=>{e.remove(O1).remove(yf).remove(I1).remove(Zy).clearTimer(A1)}});aa(hN,{displayName:"EditorState"});const N1=oa("EditorViewReady"),Jy=jt([],"editorViewTimer"),ap=jt({},"editorViewOptions"),P1=jt(null,"root"),m2=jt(null,"rootDOM"),g2=jt({},"rootAttrs");function a_e(e,t){const n=document.createElement("div");n.className="milkdown",e.appendChild(n),t.set(m2,n);const o=t.get(g2);return Object.entries(o).forEach(([r,s])=>n.setAttribute(r,s)),n}function u_e(e){e.classList.add("editor"),e.setAttribute("role","textbox")}const c_e=new wn("MILKDOWN_VIEW_CLEAR"),mN=e=>(e.inject(P1,document.body).inject(bn,{}).inject(ap,{}).inject(m2,null).inject(g2,{}).inject(Jy,[A1]).record(N1),async()=>{await e.wait(eu);const t=e.get(P1)||document.body,n=typeof t=="string"?document.querySelector(t):t;e.update(bs,a=>[new On({key:c_e,view:u=>{const c=n?a_e(n,e):void 0;return(()=>{if(c&&n){const d=u.dom;n.replaceChild(c,d),c.appendChild(d)}})(),{destroy:()=>{c!=null&&c.parentNode&&(c==null||c.parentNode.replaceChild(u.dom,c)),c==null||c.remove()}}}}),...a]),await e.waitTimers(Jy);const o=e.get(yf),r=e.get(ap),s=Object.fromEntries(e.get(p2)),i=Object.fromEntries(e.get(h2)),l=new Qye(n,{state:o,nodeViews:s,markViews:i,...r});return u_e(l.dom),e.set(bn,l),e.done(N1),()=>{l==null||l.destroy(),e.remove(P1).remove(bn).remove(ap).remove(m2).remove(g2).remove(Jy).clearTimer(N1)}});aa(mN,{displayName:"EditorView"});var tc,$r,ul,_f,L1,R1,rr,cl,nc,D1,oc,bf,V1,$a,wf;const d_e=class gN{constructor(){Qn(this,tc,void 0),Qn(this,$r,void 0),Qn(this,ul,void 0),Qn(this,_f,void 0),Qn(this,L1,void 0),Qn(this,R1,void 0),Qn(this,rr,void 0),Qn(this,cl,void 0),Qn(this,nc,void 0),Qn(this,D1,void 0),Qn(this,oc,void 0),Qn(this,bf,void 0),Qn(this,V1,void 0),Qn(this,$a,void 0),Qn(this,wf,void 0),_n(this,tc,!1),_n(this,$r,"Idle"),_n(this,ul,[]),_n(this,_f,()=>{}),_n(this,L1,new ZO),_n(this,R1,new ehe),_n(this,rr,new Map),_n(this,cl,new Map),_n(this,nc,new Qpe(dt(this,L1),dt(this,R1))),_n(this,D1,()=>{const t=n_e(async o=>{await Promise.all(dt(this,ul).map(r=>r(o)))}),n=[lN,dN,pN,uN,hN,mN,o_e(this),t];dt(this,oc).call(this,n,dt(this,cl))}),_n(this,oc,(t,n)=>{t.forEach(o=>{const r=dt(this,nc).produce(dt(this,tc)?o.meta:void 0),s=o(r);n.set(o,{ctx:r,handler:s,cleanup:void 0})})}),_n(this,bf,(t,n=!1)=>Promise.all([t].flat().map(o=>{const r=dt(this,rr).get(o),s=r==null?void 0:r.cleanup;return n?dt(this,rr).delete(o):dt(this,rr).set(o,{ctx:void 0,handler:void 0,cleanup:void 0}),typeof s=="function"?s():s}))),_n(this,V1,async()=>{await Promise.all([...dt(this,cl).entries()].map(([t,{cleanup:n}])=>typeof n=="function"?n():n)),dt(this,cl).clear()}),_n(this,$a,t=>{_n(this,$r,t),dt(this,_f).call(this,t)}),_n(this,wf,t=>[...t.entries()].map(async([n,o])=>{const{ctx:r,handler:s}=o;if(!s)return;const i=await s();t.set(n,{ctx:r,handler:s,cleanup:i})})),this.enableInspector=(t=!0)=>(_n(this,tc,t),this),this.onStatusChange=t=>(_n(this,_f,t),this),this.config=t=>(dt(this,ul).push(t),this),this.removeConfig=t=>(_n(this,ul,dt(this,ul).filter(n=>n!==t)),this),this.use=t=>{const n=[t].flat();return n.flat().forEach(o=>{dt(this,rr).set(o,{ctx:void 0,handler:void 0,cleanup:void 0})}),dt(this,$r)==="Created"&&dt(this,oc).call(this,n,dt(this,rr)),this},this.remove=async t=>dt(this,$r)==="OnCreate"?(console.warn("[Milkdown]: You are trying to remove plugins when the editor is creating, this is not recommended, please check your code."),new Promise(n=>{setTimeout(()=>{n(this.remove(t))},50)})):(await dt(this,bf).call(this,[t].flat(),!0),this),this.create=async()=>dt(this,$r)==="OnCreate"?this:(dt(this,$r)==="Created"&&await this.destroy(),dt(this,$a).call(this,"OnCreate"),dt(this,D1).call(this),dt(this,oc).call(this,[...dt(this,rr).keys()],dt(this,rr)),await Promise.all([dt(this,wf).call(this,dt(this,cl)),dt(this,wf).call(this,dt(this,rr))].flat()),dt(this,$a).call(this,"Created"),this),this.destroy=async(t=!1)=>dt(this,$r)==="Destroyed"||dt(this,$r)==="OnDestroy"?this:dt(this,$r)==="OnCreate"?new Promise(n=>{setTimeout(()=>{n(this.destroy(t))},50)}):(t&&_n(this,ul,[]),dt(this,$a).call(this,"OnDestroy"),await dt(this,bf).call(this,[...dt(this,rr).keys()],t),await dt(this,V1).call(this),dt(this,$a).call(this,"Destroyed"),this),this.action=t=>t(dt(this,nc)),this.inspect=()=>dt(this,tc)?[...dt(this,cl).values(),...dt(this,rr).values()].map(({ctx:t})=>{var n;return(n=t==null?void 0:t.inspector)==null?void 0:n.read()}).filter(t=>!!t):(console.warn("[Milkdown]: You are trying to collect inspection when inspector is disabled, please enable inspector by `editor.enableInspector()` first."),[])}static make(){return new gN}get ctx(){return dt(this,nc)}get status(){return dt(this,$r)}};tc=new WeakMap,$r=new WeakMap,ul=new WeakMap,_f=new WeakMap,L1=new WeakMap,R1=new WeakMap,rr=new WeakMap,cl=new WeakMap,nc=new WeakMap,D1=new WeakMap,oc=new WeakMap,bf=new WeakMap,V1=new WeakMap,$a=new WeakMap,wf=new WeakMap;let f_e=d_e,p_e=e=>crypto.getRandomValues(new Uint8Array(e)),h_e=(e,t,n)=>{let o=(2<<Math.log(e.length-1)/Math.LN2)-1,r=-~(1.6*o*t/e.length);return(s=t)=>{let i="";for(;;){let l=n(r),a=r;for(;a--;)if(i+=e[l[a]&o]||"",i.length===s)return i}}},m_e=(e,t=21)=>h_e(e,t,p_e);m_e("abcedfghicklmn",10);function It(e,t){const n=r_e(e),o=r=>async()=>{o.key=n,await r.wait(ip);const s=t(r);return r.get(Vt).create(n,s),o.run=i=>r.get(Vt).call(e,i),()=>{r.get(Vt).remove(n)}};return o}function er(e){const t=n=>async()=>{await n.wait(qs);const o=e(n);return n.update(Gp,r=>[...r,o]),t.inputRule=o,()=>{n.update(Gp,r=>r.filter(s=>s!==o))}};return t}function g_e(e,t){const n=o=>async()=>{const r=t(o);return o.update(Oc,s=>[...s.filter(i=>i[0]!==e),[e,r]]),n.id=e,n.schema=r,()=>{o.update(Oc,s=>s.filter(([i])=>i!==e))}};return n.type=o=>{const r=o.get(fs).marks[e];if(!r)throw Gpe(e);return r},n}function TC(e,t){const n=o=>async()=>{const r=t(o);return o.update(Mc,s=>[...s.filter(i=>i[0]!==e),[e,r]]),n.id=e,n.schema=r,()=>{o.update(Mc,s=>s.filter(([i])=>i!==e))}};return n.type=o=>{const r=o.get(fs).nodes[e];if(!r)throw GO(e);return r},n}function ao(e){let t;const n=o=>async()=>(await o.wait(qs),t=e(o),o.update(bs,r=>[...r,t]),()=>{o.update(bs,r=>r.filter(s=>s!==t))});return n.plugin=()=>t,n.key=()=>t.spec.key,n}function v_e(e){const t=n=>async()=>{await n.wait(qs);const o=e(n),r=kA(o);return n.update(bs,s=>[...s,r]),t.keymap=o,()=>{n.update(bs,s=>s.filter(i=>i!==r))}};return t}function Pn(e,t){const n=jt(e,t),o=r=>(r.inject(n),()=>()=>{r.remove(n)});return o.key=n,o}function Xn(e,t){const n=Pn(t,e),o=TC(e,s=>s.get(n.key)(s)),r=[n,o];return r.id=o.id,r.node=o,r.type=s=>o.type(s),r.schema=o.schema,r.ctx=n,r.key=n.key,r.extendSchema=s=>i=>()=>{const l=i.get(n.key),a=s(l)(i);i.update(Mc,u=>[...u.filter(c=>c[0]!==e),[e,a]]),r.schema=a},r}function Ah(e,t){const n=Pn(t,e),o=g_e(e,s=>s.get(n.key)(s)),r=[n,o];return r.id=o.id,r.mark=o,r.type=o.type,r.schema=o.schema,r.ctx=n,r.key=n.key,r.extendSchema=s=>i=>()=>{const l=i.get(n.key),a=s(l)(i);i.update(Oc,u=>[...u.filter(c=>c[0]!==e),[e,a]]),r.schema=a},r}function tr(e,t){const n=Object.fromEntries(Object.entries(t).map(([i,{shortcuts:l}])=>[i,l])),o=Pn(n,`${e}Keymap`),r=v_e(i=>{const l=i.get(o.key),a=Object.entries(t).flatMap(([u,{command:c}])=>[l[u]].flat().map(d=>[d,c(i)]));return Object.fromEntries(a)}),s=[o,r];return s.ctx=o,s.shortcuts=r,s.key=o.key,s.keymap=r.keymap,s}const Ts=(e,t=()=>({}))=>Pn(t,`${e}Attr`),Nh=(e,t=()=>({}))=>Pn(t,`${e}Attr`);function Id(e,t,n){const o=Pn(n??{},e),r=i=>async()=>{await i.wait(eu);const l={plugin:t(i),options:i.get(o.key)};return i.update(Yp,a=>[...a,l]),()=>{i.update(Yp,a=>a.filter(u=>u!==l))}},s=[o,r];return s.id=e,s.plugin=r,s.options=o,s}function y_e(){return e=>{const t=e.get(bn);return e.get(Ac)(t.state.doc)}}function __e(e,t=!1){return n=>{const o=n.get(bn),r=n.get(Ic)(e);if(!r)return;if(!t){const{state:u}=o;return o.dispatch(u.tr.replace(0,u.doc.content.size,new Je(r.content,0,0)))}const s=n.get(fs),i=n.get(I1),l=n.get(bs),a=Va.create({schema:s,doc:r,plugins:l,...i});o.updateState(a)}}function bv(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const b_e=[["ß","ss"],["ẞ","Ss"],["ä","ae"],["Ä","Ae"],["ö","oe"],["Ö","Oe"],["ü","ue"],["Ü","Ue"],["À","A"],["Á","A"],["Â","A"],["Ã","A"],["Ä","Ae"],["Å","A"],["Æ","AE"],["Ç","C"],["È","E"],["É","E"],["Ê","E"],["Ë","E"],["Ì","I"],["Í","I"],["Î","I"],["Ï","I"],["Ð","D"],["Ñ","N"],["Ò","O"],["Ó","O"],["Ô","O"],["Õ","O"],["Ö","Oe"],["Ő","O"],["Ø","O"],["Ù","U"],["Ú","U"],["Û","U"],["Ü","Ue"],["Ű","U"],["Ý","Y"],["Þ","TH"],["ß","ss"],["à","a"],["á","a"],["â","a"],["ã","a"],["ä","ae"],["å","a"],["æ","ae"],["ç","c"],["è","e"],["é","e"],["ê","e"],["ë","e"],["ì","i"],["í","i"],["î","i"],["ï","i"],["ð","d"],["ñ","n"],["ò","o"],["ó","o"],["ô","o"],["õ","o"],["ö","oe"],["ő","o"],["ø","o"],["ù","u"],["ú","u"],["û","u"],["ü","ue"],["ű","u"],["ý","y"],["þ","th"],["ÿ","y"],["ẞ","SS"],["à","a"],["À","A"],["á","a"],["Á","A"],["â","a"],["Â","A"],["ã","a"],["Ã","A"],["è","e"],["È","E"],["é","e"],["É","E"],["ê","e"],["Ê","E"],["ì","i"],["Ì","I"],["í","i"],["Í","I"],["ò","o"],["Ò","O"],["ó","o"],["Ó","O"],["ô","o"],["Ô","O"],["õ","o"],["Õ","O"],["ù","u"],["Ù","U"],["ú","u"],["Ú","U"],["ý","y"],["Ý","Y"],["ă","a"],["Ă","A"],["Đ","D"],["đ","d"],["ĩ","i"],["Ĩ","I"],["ũ","u"],["Ũ","U"],["ơ","o"],["Ơ","O"],["ư","u"],["Ư","U"],["ạ","a"],["Ạ","A"],["ả","a"],["Ả","A"],["ấ","a"],["Ấ","A"],["ầ","a"],["Ầ","A"],["ẩ","a"],["Ẩ","A"],["ẫ","a"],["Ẫ","A"],["ậ","a"],["Ậ","A"],["ắ","a"],["Ắ","A"],["ằ","a"],["Ằ","A"],["ẳ","a"],["Ẳ","A"],["ẵ","a"],["Ẵ","A"],["ặ","a"],["Ặ","A"],["ẹ","e"],["Ẹ","E"],["ẻ","e"],["Ẻ","E"],["ẽ","e"],["Ẽ","E"],["ế","e"],["Ế","E"],["ề","e"],["Ề","E"],["ể","e"],["Ể","E"],["ễ","e"],["Ễ","E"],["ệ","e"],["Ệ","E"],["ỉ","i"],["Ỉ","I"],["ị","i"],["Ị","I"],["ọ","o"],["Ọ","O"],["ỏ","o"],["Ỏ","O"],["ố","o"],["Ố","O"],["ồ","o"],["Ồ","O"],["ổ","o"],["Ổ","O"],["ỗ","o"],["Ỗ","O"],["ộ","o"],["Ộ","O"],["ớ","o"],["Ớ","O"],["ờ","o"],["Ờ","O"],["ở","o"],["Ở","O"],["ỡ","o"],["Ỡ","O"],["ợ","o"],["Ợ","O"],["ụ","u"],["Ụ","U"],["ủ","u"],["Ủ","U"],["ứ","u"],["Ứ","U"],["ừ","u"],["Ừ","U"],["ử","u"],["Ử","U"],["ữ","u"],["Ữ","U"],["ự","u"],["Ự","U"],["ỳ","y"],["Ỳ","Y"],["ỵ","y"],["Ỵ","Y"],["ỷ","y"],["Ỷ","Y"],["ỹ","y"],["Ỹ","Y"],["ء","e"],["آ","a"],["أ","a"],["ؤ","w"],["إ","i"],["ئ","y"],["ا","a"],["ب","b"],["ة","t"],["ت","t"],["ث","th"],["ج","j"],["ح","h"],["خ","kh"],["د","d"],["ذ","dh"],["ر","r"],["ز","z"],["س","s"],["ش","sh"],["ص","s"],["ض","d"],["ط","t"],["ظ","z"],["ع","e"],["غ","gh"],["ـ","_"],["ف","f"],["ق","q"],["ك","k"],["ل","l"],["م","m"],["ن","n"],["ه","h"],["و","w"],["ى","a"],["ي","y"],["َ","a"],["ُ","u"],["ِ","i"],["٠","0"],["١","1"],["٢","2"],["٣","3"],["٤","4"],["٥","5"],["٦","6"],["٧","7"],["٨","8"],["٩","9"],["چ","ch"],["ک","k"],["گ","g"],["پ","p"],["ژ","zh"],["ی","y"],["۰","0"],["۱","1"],["۲","2"],["۳","3"],["۴","4"],["۵","5"],["۶","6"],["۷","7"],["۸","8"],["۹","9"],["ټ","p"],["ځ","z"],["څ","c"],["ډ","d"],["ﺫ","d"],["ﺭ","r"],["ړ","r"],["ﺯ","z"],["ږ","g"],["ښ","x"],["ګ","g"],["ڼ","n"],["ۀ","e"],["ې","e"],["ۍ","ai"],["ٹ","t"],["ڈ","d"],["ڑ","r"],["ں","n"],["ہ","h"],["ھ","h"],["ے","e"],["А","A"],["а","a"],["Б","B"],["б","b"],["В","V"],["в","v"],["Г","G"],["г","g"],["Д","D"],["д","d"],["ъе","ye"],["Ъе","Ye"],["ъЕ","yE"],["ЪЕ","YE"],["Е","E"],["е","e"],["Ё","Yo"],["ё","yo"],["Ж","Zh"],["ж","zh"],["З","Z"],["з","z"],["И","I"],["и","i"],["ый","iy"],["Ый","Iy"],["ЫЙ","IY"],["ыЙ","iY"],["Й","Y"],["й","y"],["К","K"],["к","k"],["Л","L"],["л","l"],["М","M"],["м","m"],["Н","N"],["н","n"],["О","O"],["о","o"],["П","P"],["п","p"],["Р","R"],["р","r"],["С","S"],["с","s"],["Т","T"],["т","t"],["У","U"],["у","u"],["Ф","F"],["ф","f"],["Х","Kh"],["х","kh"],["Ц","Ts"],["ц","ts"],["Ч","Ch"],["ч","ch"],["Ш","Sh"],["ш","sh"],["Щ","Sch"],["щ","sch"],["Ъ",""],["ъ",""],["Ы","Y"],["ы","y"],["Ь",""],["ь",""],["Э","E"],["э","e"],["Ю","Yu"],["ю","yu"],["Я","Ya"],["я","ya"],["ă","a"],["Ă","A"],["ș","s"],["Ș","S"],["ț","t"],["Ț","T"],["ţ","t"],["Ţ","T"],["ş","s"],["Ş","S"],["ç","c"],["Ç","C"],["ğ","g"],["Ğ","G"],["ı","i"],["İ","I"],["ա","a"],["Ա","A"],["բ","b"],["Բ","B"],["գ","g"],["Գ","G"],["դ","d"],["Դ","D"],["ե","ye"],["Ե","Ye"],["զ","z"],["Զ","Z"],["է","e"],["Է","E"],["ը","y"],["Ը","Y"],["թ","t"],["Թ","T"],["ժ","zh"],["Ժ","Zh"],["ի","i"],["Ի","I"],["լ","l"],["Լ","L"],["խ","kh"],["Խ","Kh"],["ծ","ts"],["Ծ","Ts"],["կ","k"],["Կ","K"],["հ","h"],["Հ","H"],["ձ","dz"],["Ձ","Dz"],["ղ","gh"],["Ղ","Gh"],["ճ","tch"],["Ճ","Tch"],["մ","m"],["Մ","M"],["յ","y"],["Յ","Y"],["ն","n"],["Ն","N"],["շ","sh"],["Շ","Sh"],["ո","vo"],["Ո","Vo"],["չ","ch"],["Չ","Ch"],["պ","p"],["Պ","P"],["ջ","j"],["Ջ","J"],["ռ","r"],["Ռ","R"],["ս","s"],["Ս","S"],["վ","v"],["Վ","V"],["տ","t"],["Տ","T"],["ր","r"],["Ր","R"],["ց","c"],["Ց","C"],["ու","u"],["ՈՒ","U"],["Ու","U"],["փ","p"],["Փ","P"],["ք","q"],["Ք","Q"],["օ","o"],["Օ","O"],["ֆ","f"],["Ֆ","F"],["և","yev"],["ა","a"],["ბ","b"],["გ","g"],["დ","d"],["ე","e"],["ვ","v"],["ზ","z"],["თ","t"],["ი","i"],["კ","k"],["ლ","l"],["მ","m"],["ნ","n"],["ო","o"],["პ","p"],["ჟ","zh"],["რ","r"],["ს","s"],["ტ","t"],["უ","u"],["ფ","ph"],["ქ","q"],["ღ","gh"],["ყ","k"],["შ","sh"],["ჩ","ch"],["ც","ts"],["ძ","dz"],["წ","ts"],["ჭ","tch"],["ხ","kh"],["ჯ","j"],["ჰ","h"],["č","c"],["ď","d"],["ě","e"],["ň","n"],["ř","r"],["š","s"],["ť","t"],["ů","u"],["ž","z"],["Č","C"],["Ď","D"],["Ě","E"],["Ň","N"],["Ř","R"],["Š","S"],["Ť","T"],["Ů","U"],["Ž","Z"],["ހ","h"],["ށ","sh"],["ނ","n"],["ރ","r"],["ބ","b"],["ޅ","lh"],["ކ","k"],["އ","a"],["ވ","v"],["މ","m"],["ފ","f"],["ދ","dh"],["ތ","th"],["ލ","l"],["ގ","g"],["ޏ","gn"],["ސ","s"],["ޑ","d"],["ޒ","z"],["ޓ","t"],["ޔ","y"],["ޕ","p"],["ޖ","j"],["ޗ","ch"],["ޘ","tt"],["ޙ","hh"],["ޚ","kh"],["ޛ","th"],["ޜ","z"],["ޝ","sh"],["ޞ","s"],["ޟ","d"],["ޠ","t"],["ޡ","z"],["ޢ","a"],["ޣ","gh"],["ޤ","q"],["ޥ","w"],["ަ","a"],["ާ","aa"],["ި","i"],["ީ","ee"],["ު","u"],["ޫ","oo"],["ެ","e"],["ޭ","ey"],["ޮ","o"],["ޯ","oa"],["ް",""],["α","a"],["β","v"],["γ","g"],["δ","d"],["ε","e"],["ζ","z"],["η","i"],["θ","th"],["ι","i"],["κ","k"],["λ","l"],["μ","m"],["ν","n"],["ξ","ks"],["ο","o"],["π","p"],["ρ","r"],["σ","s"],["τ","t"],["υ","y"],["φ","f"],["χ","x"],["ψ","ps"],["ω","o"],["ά","a"],["έ","e"],["ί","i"],["ό","o"],["ύ","y"],["ή","i"],["ώ","o"],["ς","s"],["ϊ","i"],["ΰ","y"],["ϋ","y"],["ΐ","i"],["Α","A"],["Β","B"],["Γ","G"],["Δ","D"],["Ε","E"],["Ζ","Z"],["Η","I"],["Θ","TH"],["Ι","I"],["Κ","K"],["Λ","L"],["Μ","M"],["Ν","N"],["Ξ","KS"],["Ο","O"],["Π","P"],["Ρ","R"],["Σ","S"],["Τ","T"],["Υ","Y"],["Φ","F"],["Χ","X"],["Ψ","PS"],["Ω","O"],["Ά","A"],["Έ","E"],["Ί","I"],["Ό","O"],["Ύ","Y"],["Ή","I"],["Ώ","O"],["Ϊ","I"],["Ϋ","Y"],["ā","a"],["ē","e"],["ģ","g"],["ī","i"],["ķ","k"],["ļ","l"],["ņ","n"],["ū","u"],["Ā","A"],["Ē","E"],["Ģ","G"],["Ī","I"],["Ķ","K"],["Ļ","L"],["Ņ","N"],["Ū","U"],["č","c"],["š","s"],["ž","z"],["Č","C"],["Š","S"],["Ž","Z"],["ą","a"],["č","c"],["ę","e"],["ė","e"],["į","i"],["š","s"],["ų","u"],["ū","u"],["ž","z"],["Ą","A"],["Č","C"],["Ę","E"],["Ė","E"],["Į","I"],["Š","S"],["Ų","U"],["Ū","U"],["Ќ","Kj"],["ќ","kj"],["Љ","Lj"],["љ","lj"],["Њ","Nj"],["њ","nj"],["Тс","Ts"],["тс","ts"],["ą","a"],["ć","c"],["ę","e"],["ł","l"],["ń","n"],["ś","s"],["ź","z"],["ż","z"],["Ą","A"],["Ć","C"],["Ę","E"],["Ł","L"],["Ń","N"],["Ś","S"],["Ź","Z"],["Ż","Z"],["Є","Ye"],["І","I"],["Ї","Yi"],["Ґ","G"],["є","ye"],["і","i"],["ї","yi"],["ґ","g"],["IJ","IJ"],["ij","ij"],["¢","c"],["¥","Y"],["߿","b"],["৳","t"],["૱","Bo"],["฿","B"],["₠","CE"],["₡","C"],["₢","Cr"],["₣","F"],["₥","m"],["₦","N"],["₧","Pt"],["₨","Rs"],["₩","W"],["₫","s"],["€","E"],["₭","K"],["₮","T"],["₯","Dp"],["₰","S"],["₱","P"],["₲","G"],["₳","A"],["₴","S"],["₵","C"],["₶","tt"],["₷","S"],["₸","T"],["₹","R"],["₺","L"],["₽","P"],["₿","B"],["﹩","$"],["¢","c"],["¥","Y"],["₩","W"],["𝐀","A"],["𝐁","B"],["𝐂","C"],["𝐃","D"],["𝐄","E"],["𝐅","F"],["𝐆","G"],["𝐇","H"],["𝐈","I"],["𝐉","J"],["𝐊","K"],["𝐋","L"],["𝐌","M"],["𝐍","N"],["𝐎","O"],["𝐏","P"],["𝐐","Q"],["𝐑","R"],["𝐒","S"],["𝐓","T"],["𝐔","U"],["𝐕","V"],["𝐖","W"],["𝐗","X"],["𝐘","Y"],["𝐙","Z"],["𝐚","a"],["𝐛","b"],["𝐜","c"],["𝐝","d"],["𝐞","e"],["𝐟","f"],["𝐠","g"],["𝐡","h"],["𝐢","i"],["𝐣","j"],["𝐤","k"],["𝐥","l"],["𝐦","m"],["𝐧","n"],["𝐨","o"],["𝐩","p"],["𝐪","q"],["𝐫","r"],["𝐬","s"],["𝐭","t"],["𝐮","u"],["𝐯","v"],["𝐰","w"],["𝐱","x"],["𝐲","y"],["𝐳","z"],["𝐴","A"],["𝐵","B"],["𝐶","C"],["𝐷","D"],["𝐸","E"],["𝐹","F"],["𝐺","G"],["𝐻","H"],["𝐼","I"],["𝐽","J"],["𝐾","K"],["𝐿","L"],["𝑀","M"],["𝑁","N"],["𝑂","O"],["𝑃","P"],["𝑄","Q"],["𝑅","R"],["𝑆","S"],["𝑇","T"],["𝑈","U"],["𝑉","V"],["𝑊","W"],["𝑋","X"],["𝑌","Y"],["𝑍","Z"],["𝑎","a"],["𝑏","b"],["𝑐","c"],["𝑑","d"],["𝑒","e"],["𝑓","f"],["𝑔","g"],["𝑖","i"],["𝑗","j"],["𝑘","k"],["𝑙","l"],["𝑚","m"],["𝑛","n"],["𝑜","o"],["𝑝","p"],["𝑞","q"],["𝑟","r"],["𝑠","s"],["𝑡","t"],["𝑢","u"],["𝑣","v"],["𝑤","w"],["𝑥","x"],["𝑦","y"],["𝑧","z"],["𝑨","A"],["𝑩","B"],["𝑪","C"],["𝑫","D"],["𝑬","E"],["𝑭","F"],["𝑮","G"],["𝑯","H"],["𝑰","I"],["𝑱","J"],["𝑲","K"],["𝑳","L"],["𝑴","M"],["𝑵","N"],["𝑶","O"],["𝑷","P"],["𝑸","Q"],["𝑹","R"],["𝑺","S"],["𝑻","T"],["𝑼","U"],["𝑽","V"],["𝑾","W"],["𝑿","X"],["𝒀","Y"],["𝒁","Z"],["𝒂","a"],["𝒃","b"],["𝒄","c"],["𝒅","d"],["𝒆","e"],["𝒇","f"],["𝒈","g"],["𝒉","h"],["𝒊","i"],["𝒋","j"],["𝒌","k"],["𝒍","l"],["𝒎","m"],["𝒏","n"],["𝒐","o"],["𝒑","p"],["𝒒","q"],["𝒓","r"],["𝒔","s"],["𝒕","t"],["𝒖","u"],["𝒗","v"],["𝒘","w"],["𝒙","x"],["𝒚","y"],["𝒛","z"],["𝒜","A"],["𝒞","C"],["𝒟","D"],["𝒢","g"],["𝒥","J"],["𝒦","K"],["𝒩","N"],["𝒪","O"],["𝒫","P"],["𝒬","Q"],["𝒮","S"],["𝒯","T"],["𝒰","U"],["𝒱","V"],["𝒲","W"],["𝒳","X"],["𝒴","Y"],["𝒵","Z"],["𝒶","a"],["𝒷","b"],["𝒸","c"],["𝒹","d"],["𝒻","f"],["𝒽","h"],["𝒾","i"],["𝒿","j"],["𝓀","h"],["𝓁","l"],["𝓂","m"],["𝓃","n"],["𝓅","p"],["𝓆","q"],["𝓇","r"],["𝓈","s"],["𝓉","t"],["𝓊","u"],["𝓋","v"],["𝓌","w"],["𝓍","x"],["𝓎","y"],["𝓏","z"],["𝓐","A"],["𝓑","B"],["𝓒","C"],["𝓓","D"],["𝓔","E"],["𝓕","F"],["𝓖","G"],["𝓗","H"],["𝓘","I"],["𝓙","J"],["𝓚","K"],["𝓛","L"],["𝓜","M"],["𝓝","N"],["𝓞","O"],["𝓟","P"],["𝓠","Q"],["𝓡","R"],["𝓢","S"],["𝓣","T"],["𝓤","U"],["𝓥","V"],["𝓦","W"],["𝓧","X"],["𝓨","Y"],["𝓩","Z"],["𝓪","a"],["𝓫","b"],["𝓬","c"],["𝓭","d"],["𝓮","e"],["𝓯","f"],["𝓰","g"],["𝓱","h"],["𝓲","i"],["𝓳","j"],["𝓴","k"],["𝓵","l"],["𝓶","m"],["𝓷","n"],["𝓸","o"],["𝓹","p"],["𝓺","q"],["𝓻","r"],["𝓼","s"],["𝓽","t"],["𝓾","u"],["𝓿","v"],["𝔀","w"],["𝔁","x"],["𝔂","y"],["𝔃","z"],["𝔄","A"],["𝔅","B"],["𝔇","D"],["𝔈","E"],["𝔉","F"],["𝔊","G"],["𝔍","J"],["𝔎","K"],["𝔏","L"],["𝔐","M"],["𝔑","N"],["𝔒","O"],["𝔓","P"],["𝔔","Q"],["𝔖","S"],["𝔗","T"],["𝔘","U"],["𝔙","V"],["𝔚","W"],["𝔛","X"],["𝔜","Y"],["𝔞","a"],["𝔟","b"],["𝔠","c"],["𝔡","d"],["𝔢","e"],["𝔣","f"],["𝔤","g"],["𝔥","h"],["𝔦","i"],["𝔧","j"],["𝔨","k"],["𝔩","l"],["𝔪","m"],["𝔫","n"],["𝔬","o"],["𝔭","p"],["𝔮","q"],["𝔯","r"],["𝔰","s"],["𝔱","t"],["𝔲","u"],["𝔳","v"],["𝔴","w"],["𝔵","x"],["𝔶","y"],["𝔷","z"],["𝔸","A"],["𝔹","B"],["𝔻","D"],["𝔼","E"],["𝔽","F"],["𝔾","G"],["𝕀","I"],["𝕁","J"],["𝕂","K"],["𝕃","L"],["𝕄","M"],["𝕆","N"],["𝕊","S"],["𝕋","T"],["𝕌","U"],["𝕍","V"],["𝕎","W"],["𝕏","X"],["𝕐","Y"],["𝕒","a"],["𝕓","b"],["𝕔","c"],["𝕕","d"],["𝕖","e"],["𝕗","f"],["𝕘","g"],["𝕙","h"],["𝕚","i"],["𝕛","j"],["𝕜","k"],["𝕝","l"],["𝕞","m"],["𝕟","n"],["𝕠","o"],["𝕡","p"],["𝕢","q"],["𝕣","r"],["𝕤","s"],["𝕥","t"],["𝕦","u"],["𝕧","v"],["𝕨","w"],["𝕩","x"],["𝕪","y"],["𝕫","z"],["𝕬","A"],["𝕭","B"],["𝕮","C"],["𝕯","D"],["𝕰","E"],["𝕱","F"],["𝕲","G"],["𝕳","H"],["𝕴","I"],["𝕵","J"],["𝕶","K"],["𝕷","L"],["𝕸","M"],["𝕹","N"],["𝕺","O"],["𝕻","P"],["𝕼","Q"],["𝕽","R"],["𝕾","S"],["𝕿","T"],["𝖀","U"],["𝖁","V"],["𝖂","W"],["𝖃","X"],["𝖄","Y"],["𝖅","Z"],["𝖆","a"],["𝖇","b"],["𝖈","c"],["𝖉","d"],["𝖊","e"],["𝖋","f"],["𝖌","g"],["𝖍","h"],["𝖎","i"],["𝖏","j"],["𝖐","k"],["𝖑","l"],["𝖒","m"],["𝖓","n"],["𝖔","o"],["𝖕","p"],["𝖖","q"],["𝖗","r"],["𝖘","s"],["𝖙","t"],["𝖚","u"],["𝖛","v"],["𝖜","w"],["𝖝","x"],["𝖞","y"],["𝖟","z"],["𝖠","A"],["𝖡","B"],["𝖢","C"],["𝖣","D"],["𝖤","E"],["𝖥","F"],["𝖦","G"],["𝖧","H"],["𝖨","I"],["𝖩","J"],["𝖪","K"],["𝖫","L"],["𝖬","M"],["𝖭","N"],["𝖮","O"],["𝖯","P"],["𝖰","Q"],["𝖱","R"],["𝖲","S"],["𝖳","T"],["𝖴","U"],["𝖵","V"],["𝖶","W"],["𝖷","X"],["𝖸","Y"],["𝖹","Z"],["𝖺","a"],["𝖻","b"],["𝖼","c"],["𝖽","d"],["𝖾","e"],["𝖿","f"],["𝗀","g"],["𝗁","h"],["𝗂","i"],["𝗃","j"],["𝗄","k"],["𝗅","l"],["𝗆","m"],["𝗇","n"],["𝗈","o"],["𝗉","p"],["𝗊","q"],["𝗋","r"],["𝗌","s"],["𝗍","t"],["𝗎","u"],["𝗏","v"],["𝗐","w"],["𝗑","x"],["𝗒","y"],["𝗓","z"],["𝗔","A"],["𝗕","B"],["𝗖","C"],["𝗗","D"],["𝗘","E"],["𝗙","F"],["𝗚","G"],["𝗛","H"],["𝗜","I"],["𝗝","J"],["𝗞","K"],["𝗟","L"],["𝗠","M"],["𝗡","N"],["𝗢","O"],["𝗣","P"],["𝗤","Q"],["𝗥","R"],["𝗦","S"],["𝗧","T"],["𝗨","U"],["𝗩","V"],["𝗪","W"],["𝗫","X"],["𝗬","Y"],["𝗭","Z"],["𝗮","a"],["𝗯","b"],["𝗰","c"],["𝗱","d"],["𝗲","e"],["𝗳","f"],["𝗴","g"],["𝗵","h"],["𝗶","i"],["𝗷","j"],["𝗸","k"],["𝗹","l"],["𝗺","m"],["𝗻","n"],["𝗼","o"],["𝗽","p"],["𝗾","q"],["𝗿","r"],["𝘀","s"],["𝘁","t"],["𝘂","u"],["𝘃","v"],["𝘄","w"],["𝘅","x"],["𝘆","y"],["𝘇","z"],["𝘈","A"],["𝘉","B"],["𝘊","C"],["𝘋","D"],["𝘌","E"],["𝘍","F"],["𝘎","G"],["𝘏","H"],["𝘐","I"],["𝘑","J"],["𝘒","K"],["𝘓","L"],["𝘔","M"],["𝘕","N"],["𝘖","O"],["𝘗","P"],["𝘘","Q"],["𝘙","R"],["𝘚","S"],["𝘛","T"],["𝘜","U"],["𝘝","V"],["𝘞","W"],["𝘟","X"],["𝘠","Y"],["𝘡","Z"],["𝘢","a"],["𝘣","b"],["𝘤","c"],["𝘥","d"],["𝘦","e"],["𝘧","f"],["𝘨","g"],["𝘩","h"],["𝘪","i"],["𝘫","j"],["𝘬","k"],["𝘭","l"],["𝘮","m"],["𝘯","n"],["𝘰","o"],["𝘱","p"],["𝘲","q"],["𝘳","r"],["𝘴","s"],["𝘵","t"],["𝘶","u"],["𝘷","v"],["𝘸","w"],["𝘹","x"],["𝘺","y"],["𝘻","z"],["𝘼","A"],["𝘽","B"],["𝘾","C"],["𝘿","D"],["𝙀","E"],["𝙁","F"],["𝙂","G"],["𝙃","H"],["𝙄","I"],["𝙅","J"],["𝙆","K"],["𝙇","L"],["𝙈","M"],["𝙉","N"],["𝙊","O"],["𝙋","P"],["𝙌","Q"],["𝙍","R"],["𝙎","S"],["𝙏","T"],["𝙐","U"],["𝙑","V"],["𝙒","W"],["𝙓","X"],["𝙔","Y"],["𝙕","Z"],["𝙖","a"],["𝙗","b"],["𝙘","c"],["𝙙","d"],["𝙚","e"],["𝙛","f"],["𝙜","g"],["𝙝","h"],["𝙞","i"],["𝙟","j"],["𝙠","k"],["𝙡","l"],["𝙢","m"],["𝙣","n"],["𝙤","o"],["𝙥","p"],["𝙦","q"],["𝙧","r"],["𝙨","s"],["𝙩","t"],["𝙪","u"],["𝙫","v"],["𝙬","w"],["𝙭","x"],["𝙮","y"],["𝙯","z"],["𝙰","A"],["𝙱","B"],["𝙲","C"],["𝙳","D"],["𝙴","E"],["𝙵","F"],["𝙶","G"],["𝙷","H"],["𝙸","I"],["𝙹","J"],["𝙺","K"],["𝙻","L"],["𝙼","M"],["𝙽","N"],["𝙾","O"],["𝙿","P"],["𝚀","Q"],["𝚁","R"],["𝚂","S"],["𝚃","T"],["𝚄","U"],["𝚅","V"],["𝚆","W"],["𝚇","X"],["𝚈","Y"],["𝚉","Z"],["𝚊","a"],["𝚋","b"],["𝚌","c"],["𝚍","d"],["𝚎","e"],["𝚏","f"],["𝚐","g"],["𝚑","h"],["𝚒","i"],["𝚓","j"],["𝚔","k"],["𝚕","l"],["𝚖","m"],["𝚗","n"],["𝚘","o"],["𝚙","p"],["𝚚","q"],["𝚛","r"],["𝚜","s"],["𝚝","t"],["𝚞","u"],["𝚟","v"],["𝚠","w"],["𝚡","x"],["𝚢","y"],["𝚣","z"],["𝚤","l"],["𝚥","j"],["𝛢","A"],["𝛣","B"],["𝛤","G"],["𝛥","D"],["𝛦","E"],["𝛧","Z"],["𝛨","I"],["𝛩","TH"],["𝛪","I"],["𝛫","K"],["𝛬","L"],["𝛭","M"],["𝛮","N"],["𝛯","KS"],["𝛰","O"],["𝛱","P"],["𝛲","R"],["𝛳","TH"],["𝛴","S"],["𝛵","T"],["𝛶","Y"],["𝛷","F"],["𝛸","x"],["𝛹","PS"],["𝛺","O"],["𝛻","D"],["𝛼","a"],["𝛽","b"],["𝛾","g"],["𝛿","d"],["𝜀","e"],["𝜁","z"],["𝜂","i"],["𝜃","th"],["𝜄","i"],["𝜅","k"],["𝜆","l"],["𝜇","m"],["𝜈","n"],["𝜉","ks"],["𝜊","o"],["𝜋","p"],["𝜌","r"],["𝜍","s"],["𝜎","s"],["𝜏","t"],["𝜐","y"],["𝜑","f"],["𝜒","x"],["𝜓","ps"],["𝜔","o"],["𝜕","d"],["𝜖","E"],["𝜗","TH"],["𝜘","K"],["𝜙","f"],["𝜚","r"],["𝜛","p"],["𝜜","A"],["𝜝","V"],["𝜞","G"],["𝜟","D"],["𝜠","E"],["𝜡","Z"],["𝜢","I"],["𝜣","TH"],["𝜤","I"],["𝜥","K"],["𝜦","L"],["𝜧","M"],["𝜨","N"],["𝜩","KS"],["𝜪","O"],["𝜫","P"],["𝜬","S"],["𝜭","TH"],["𝜮","S"],["𝜯","T"],["𝜰","Y"],["𝜱","F"],["𝜲","X"],["𝜳","PS"],["𝜴","O"],["𝜵","D"],["𝜶","a"],["𝜷","v"],["𝜸","g"],["𝜹","d"],["𝜺","e"],["𝜻","z"],["𝜼","i"],["𝜽","th"],["𝜾","i"],["𝜿","k"],["𝝀","l"],["𝝁","m"],["𝝂","n"],["𝝃","ks"],["𝝄","o"],["𝝅","p"],["𝝆","r"],["𝝇","s"],["𝝈","s"],["𝝉","t"],["𝝊","y"],["𝝋","f"],["𝝌","x"],["𝝍","ps"],["𝝎","o"],["𝝏","a"],["𝝐","e"],["𝝑","i"],["𝝒","k"],["𝝓","f"],["𝝔","r"],["𝝕","p"],["𝝖","A"],["𝝗","B"],["𝝘","G"],["𝝙","D"],["𝝚","E"],["𝝛","Z"],["𝝜","I"],["𝝝","TH"],["𝝞","I"],["𝝟","K"],["𝝠","L"],["𝝡","M"],["𝝢","N"],["𝝣","KS"],["𝝤","O"],["𝝥","P"],["𝝦","R"],["𝝧","TH"],["𝝨","S"],["𝝩","T"],["𝝪","Y"],["𝝫","F"],["𝝬","X"],["𝝭","PS"],["𝝮","O"],["𝝯","D"],["𝝰","a"],["𝝱","v"],["𝝲","g"],["𝝳","d"],["𝝴","e"],["𝝵","z"],["𝝶","i"],["𝝷","th"],["𝝸","i"],["𝝹","k"],["𝝺","l"],["𝝻","m"],["𝝼","n"],["𝝽","ks"],["𝝾","o"],["𝝿","p"],["𝞀","r"],["𝞁","s"],["𝞂","s"],["𝞃","t"],["𝞄","y"],["𝞅","f"],["𝞆","x"],["𝞇","ps"],["𝞈","o"],["𝞉","a"],["𝞊","e"],["𝞋","i"],["𝞌","k"],["𝞍","f"],["𝞎","r"],["𝞏","p"],["𝞐","A"],["𝞑","V"],["𝞒","G"],["𝞓","D"],["𝞔","E"],["𝞕","Z"],["𝞖","I"],["𝞗","TH"],["𝞘","I"],["𝞙","K"],["𝞚","L"],["𝞛","M"],["𝞜","N"],["𝞝","KS"],["𝞞","O"],["𝞟","P"],["𝞠","S"],["𝞡","TH"],["𝞢","S"],["𝞣","T"],["𝞤","Y"],["𝞥","F"],["𝞦","X"],["𝞧","PS"],["𝞨","O"],["𝞩","D"],["𝞪","av"],["𝞫","g"],["𝞬","d"],["𝞭","e"],["𝞮","z"],["𝞯","i"],["𝞰","i"],["𝞱","th"],["𝞲","i"],["𝞳","k"],["𝞴","l"],["𝞵","m"],["𝞶","n"],["𝞷","ks"],["𝞸","o"],["𝞹","p"],["𝞺","r"],["𝞻","s"],["𝞼","s"],["𝞽","t"],["𝞾","y"],["𝞿","f"],["𝟀","x"],["𝟁","ps"],["𝟂","o"],["𝟃","a"],["𝟄","e"],["𝟅","i"],["𝟆","k"],["𝟇","f"],["𝟈","r"],["𝟉","p"],["𝟊","F"],["𝟋","f"],["⒜","(a)"],["⒝","(b)"],["⒞","(c)"],["⒟","(d)"],["⒠","(e)"],["⒡","(f)"],["⒢","(g)"],["⒣","(h)"],["⒤","(i)"],["⒥","(j)"],["⒦","(k)"],["⒧","(l)"],["⒨","(m)"],["⒩","(n)"],["⒪","(o)"],["⒫","(p)"],["⒬","(q)"],["⒭","(r)"],["⒮","(s)"],["⒯","(t)"],["⒰","(u)"],["⒱","(v)"],["⒲","(w)"],["⒳","(x)"],["⒴","(y)"],["⒵","(z)"],["Ⓐ","(A)"],["Ⓑ","(B)"],["Ⓒ","(C)"],["Ⓓ","(D)"],["Ⓔ","(E)"],["Ⓕ","(F)"],["Ⓖ","(G)"],["Ⓗ","(H)"],["Ⓘ","(I)"],["Ⓙ","(J)"],["Ⓚ","(K)"],["Ⓛ","(L)"],["Ⓝ","(N)"],["Ⓞ","(O)"],["Ⓟ","(P)"],["Ⓠ","(Q)"],["Ⓡ","(R)"],["Ⓢ","(S)"],["Ⓣ","(T)"],["Ⓤ","(U)"],["Ⓥ","(V)"],["Ⓦ","(W)"],["Ⓧ","(X)"],["Ⓨ","(Y)"],["Ⓩ","(Z)"],["ⓐ","(a)"],["ⓑ","(b)"],["ⓒ","(b)"],["ⓓ","(c)"],["ⓔ","(e)"],["ⓕ","(f)"],["ⓖ","(g)"],["ⓗ","(h)"],["ⓘ","(i)"],["ⓙ","(j)"],["ⓚ","(k)"],["ⓛ","(l)"],["ⓜ","(m)"],["ⓝ","(n)"],["ⓞ","(o)"],["ⓟ","(p)"],["ⓠ","(q)"],["ⓡ","(r)"],["ⓢ","(s)"],["ⓣ","(t)"],["ⓤ","(u)"],["ⓥ","(v)"],["ⓦ","(w)"],["ⓧ","(x)"],["ⓨ","(y)"],["ⓩ","(z)"],["Ċ","C"],["ċ","c"],["Ġ","G"],["ġ","g"],["Ħ","H"],["ħ","h"],["Ż","Z"],["ż","z"],["𝟎","0"],["𝟏","1"],["𝟐","2"],["𝟑","3"],["𝟒","4"],["𝟓","5"],["𝟔","6"],["𝟕","7"],["𝟖","8"],["𝟗","9"],["𝟘","0"],["𝟙","1"],["𝟚","2"],["𝟛","3"],["𝟜","4"],["𝟝","5"],["𝟞","6"],["𝟟","7"],["𝟠","8"],["𝟡","9"],["𝟢","0"],["𝟣","1"],["𝟤","2"],["𝟥","3"],["𝟦","4"],["𝟧","5"],["𝟨","6"],["𝟩","7"],["𝟪","8"],["𝟫","9"],["𝟬","0"],["𝟭","1"],["𝟮","2"],["𝟯","3"],["𝟰","4"],["𝟱","5"],["𝟲","6"],["𝟳","7"],["𝟴","8"],["𝟵","9"],["𝟶","0"],["𝟷","1"],["𝟸","2"],["𝟹","3"],["𝟺","4"],["𝟻","5"],["𝟼","6"],["𝟽","7"],["𝟾","8"],["𝟿","9"],["①","1"],["②","2"],["③","3"],["④","4"],["⑤","5"],["⑥","6"],["⑦","7"],["⑧","8"],["⑨","9"],["⑩","10"],["⑪","11"],["⑫","12"],["⑬","13"],["⑭","14"],["⑮","15"],["⑯","16"],["⑰","17"],["⑱","18"],["⑲","19"],["⑳","20"],["⑴","1"],["⑵","2"],["⑶","3"],["⑷","4"],["⑸","5"],["⑹","6"],["⑺","7"],["⑻","8"],["⑼","9"],["⑽","10"],["⑾","11"],["⑿","12"],["⒀","13"],["⒁","14"],["⒂","15"],["⒃","16"],["⒄","17"],["⒅","18"],["⒆","19"],["⒇","20"],["⒈","1."],["⒉","2."],["⒊","3."],["⒋","4."],["⒌","5."],["⒍","6."],["⒎","7."],["⒏","8."],["⒐","9."],["⒑","10."],["⒒","11."],["⒓","12."],["⒔","13."],["⒕","14."],["⒖","15."],["⒗","16."],["⒘","17."],["⒙","18."],["⒚","19."],["⒛","20."],["⓪","0"],["⓫","11"],["⓬","12"],["⓭","13"],["⓮","14"],["⓯","15"],["⓰","16"],["⓱","17"],["⓲","18"],["⓳","19"],["⓴","20"],["⓵","1"],["⓶","2"],["⓷","3"],["⓸","4"],["⓹","5"],["⓺","6"],["⓻","7"],["⓼","8"],["⓽","9"],["⓾","10"],["⓿","0"],["🙰","&"],["🙱","&"],["🙲","&"],["🙳","&"],["🙴","&"],["🙵","&"],["🙶",'"'],["🙷",'"'],["🙸",'"'],["‽","?!"],["🙹","?!"],["🙺","?!"],["🙻","?!"],["🙼","/"],["🙽","\\"],["🜇","AR"],["🜈","V"],["🜉","V"],["🜆","VR"],["🜅","VF"],["🜩","2"],["🜪","5"],["🝡","f"],["🝢","W"],["🝣","U"],["🝧","V"],["🝨","T"],["🝪","V"],["🝫","MB"],["🝬","VB"],["🝲","3B"],["🝳","3B"],["💯","100"],["🔙","BACK"],["🔚","END"],["🔛","ON!"],["🔜","SOON"],["🔝","TOP"],["🔞","18"],["🔤","abc"],["🔠","ABCD"],["🔡","abcd"],["🔢","1234"],["🔣","T&@%"],["#️⃣","#"],["*️⃣","*"],["0️⃣","0"],["1️⃣","1"],["2️⃣","2"],["3️⃣","3"],["4️⃣","4"],["5️⃣","5"],["6️⃣","6"],["7️⃣","7"],["8️⃣","8"],["9️⃣","9"],["🔟","10"],["🅰️","A"],["🅱️","B"],["🆎","AB"],["🆑","CL"],["🅾️","O"],["🅿","P"],["🆘","SOS"],["🅲","C"],["🅳","D"],["🅴","E"],["🅵","F"],["🅶","G"],["🅷","H"],["🅸","I"],["🅹","J"],["🅺","K"],["🅻","L"],["🅼","M"],["🅽","N"],["🆀","Q"],["🆁","R"],["🆂","S"],["🆃","T"],["🆄","U"],["🆅","V"],["🆆","W"],["🆇","X"],["🆈","Y"],["🆉","Z"]],w_e=(e,t)=>{for(const[n,o]of t)e=e.replace(new RegExp(bv(n),"g"),o);return e};function C_e(e,t){if(typeof e!="string")throw new TypeError(`Expected a string, got \`${typeof e}\``);t={customReplacements:[],...t};const n=new Map([...b_e,...t.customReplacements]);return e=e.normalize(),e=w_e(e,n),e=e.normalize("NFD").replace(/\p{Diacritic}/gu,"").normalize(),e}const k_e=[["&"," and "],["🦄"," unicorn "],["♥"," love "]],S_e=e=>e.replace(/([A-Z]{2,})(\d+)/g,"$1 $2").replace(/([a-z\d]+)([A-Z]{2,})/g,"$1 $2").replace(/([a-z\d])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-rt-z\d]+)/g,"$1 $2"),$_e=(e,t)=>{const n=bv(t);return e.replace(new RegExp(`${n}{2,}`,"g"),t).replace(new RegExp(`^${n}|${n}$`,"g"),"")},E_e=e=>{let t="a-z\\d";if(t+=e.lowercase?"":"A-Z",e.preserveCharacters.length>0)for(const n of e.preserveCharacters){if(n===e.separator)throw new Error(`The separator character \`${e.separator}\` cannot be included in preserved characters: ${e.preserveCharacters}`);t+=bv(n)}return new RegExp(`[^${t}]+`,"g")};function x_e(e,t){if(typeof e!="string")throw new TypeError(`Expected a string, got \`${typeof e}\``);t={separator:"-",lowercase:!0,decamelize:!0,customReplacements:[],preserveLeadingUnderscore:!1,preserveTrailingDash:!1,preserveCharacters:[],...t};const n=t.preserveLeadingUnderscore&&e.startsWith("_"),o=t.preserveTrailingDash&&e.endsWith("-"),r=new Map([...k_e,...t.customReplacements]);e=C_e(e,{customReplacements:r}),t.decamelize&&(e=S_e(e));const s=E_e(t);return t.lowercase&&(e=e.toLowerCase()),e=e.replace(/([a-zA-Z\d]+)'([ts])(\s|$)/g,"$1$2$3"),e=e.replace(s,t.separator),e=e.replace(/\\/g,""),t.separator&&(e=$_e(e,t.separator)),n&&(e=`_${e}`),o&&(e=`${e}-`),e}function T_e(e,t){return function(n,o){let{$from:r,$to:s,node:i}=n.selection;if(i&&i.isBlock||r.depth<2||!r.sameParent(s))return!1;let l=r.node(-1);if(l.type!=e)return!1;if(r.parent.content.size==0&&r.node(-1).childCount==r.indexAfter(-1)){if(r.depth==3||r.node(-3).type!=e||r.index(-2)!=r.node(-2).childCount-1)return!1;if(o){let d=We.empty,f=r.index(-1)?1:r.index(-2)?2:3;for(let v=r.depth-f;v>=r.depth-3;v--)d=We.from(r.node(v).copy(d));let p=r.indexAfter(-1)<r.node(-2).childCount?1:r.indexAfter(-2)<r.node(-3).childCount?2:3;d=d.append(We.from(e.createAndFill()));let h=r.before(r.depth-(f-1)),m=n.tr.replace(h,r.after(-p),new Je(d,4-f,0)),y=-1;m.doc.nodesBetween(h,m.doc.content.size,(v,k)=>{if(y>-1)return!1;v.isTextblock&&v.content.size==0&&(y=k+1)}),y>-1&&m.setSelection(bt.near(m.doc.resolve(y))),o(m.scrollIntoView())}return!0}let a=s.pos==r.end()?l.contentMatchAt(0).defaultType:null,u=n.tr.delete(r.pos,s.pos),c=a?[t?{type:e,attrs:t}:null,{type:a}]:void 0;return np(u.doc,r.pos,2,c)?(o&&o(u.split(r.pos,2,c).scrollIntoView()),!0):!1}}function vN(e){return function(t,n){let{$from:o,$to:r}=t.selection,s=o.blockRange(r,i=>i.childCount>0&&i.firstChild.type==e);return s?n?o.node(s.depth-1).type==e?M_e(t,n,e,s):O_e(t,n,s):!0:!1}}function M_e(e,t,n,o){let r=e.tr,s=o.end,i=o.$to.end(o.depth);s<i&&(r.step(new vo(s-1,i,s,i,new Je(We.from(n.create(null,o.parent.copy())),1,0),1,!0)),o=new sI(r.doc.resolve(o.$from.pos),r.doc.resolve(i),o.depth));const l=uv(o);if(l==null)return!1;r.lift(o,l);let a=r.mapping.map(s,-1)-1;return cv(r.doc,a)&&r.join(a),t(r.scrollIntoView()),!0}function O_e(e,t,n){let o=e.tr,r=n.parent;for(let p=n.end,h=n.endIndex-1,m=n.startIndex;h>m;h--)p-=r.child(h).nodeSize,o.delete(p-1,p+1);let s=o.doc.resolve(n.start),i=s.nodeAfter;if(o.mapping.map(n.end)!=n.start+s.nodeAfter.nodeSize)return!1;let l=n.startIndex==0,a=n.endIndex==r.childCount,u=s.node(-1),c=s.index(-1);if(!u.canReplace(c+(l?0:1),c+1,i.content.append(a?We.empty:We.from(r))))return!1;let d=s.pos,f=d+i.nodeSize;return o.step(new vo(d-(l?1:0),f+(a?1:0),d+1,f-1,new Je((l?We.empty:We.from(r.copy(We.empty))).append(a?We.empty:We.from(r.copy(We.empty))),l?0:1,a?0:1),l?0:1)),t(o.scrollIntoView()),!0}function I_e(e){return function(t,n){let{$from:o,$to:r}=t.selection,s=o.blockRange(r,u=>u.childCount>0&&u.firstChild.type==e);if(!s)return!1;let i=s.startIndex;if(i==0)return!1;let l=s.parent,a=l.child(i-1);if(a.type!=e)return!1;if(n){let u=a.lastChild&&a.lastChild.type==l.type,c=We.from(u?e.create():null),d=new Je(We.from(e.create(null,We.from(l.type.create(null,c)))),u?3:1,0),f=s.start,p=s.end;n(t.tr.step(new vo(f-(u?3:1),p,f,p,d,1,!0)).scrollIntoView())}return!0}}function A_e(e){const t=new Map;if(!e||!e.type)throw new Error("mdast-util-definitions expected node");return Od(e,"definition",function(o){const r=x9(o.identifier);r&&!t.get(r)&&t.set(r,o)}),n;function n(o){const r=x9(o);return t.get(r)}}function x9(e){return String(e||"").toUpperCase()}function N_e(){return function(e){const t=A_e(e);Od(e,function(n,o,r){if(n.type==="definition"&&r!==void 0&&typeof o=="number")return r.children.splice(o,1),[Hb,o];if(n.type==="imageReference"||n.type==="linkReference"){const s=t(n.identifier);if(s&&r&&typeof o=="number")return r.children[o]=n.type==="imageReference"?{type:"image",url:s.url,title:s.title,alt:n.alt}:{type:"link",url:s.url,title:s.title,children:n.children},[Hb,o]}})}}function yN(e,t){var n;if(!(t.childCount>=1&&((n=t.lastChild)==null?void 0:n.type.name)==="hardbreak")){e.next(t.content);return}const o=[];t.content.forEach((r,s,i)=>{i!==t.childCount-1&&o.push(r)}),e.next(We.fromArray(o))}function ke(e,t){return Object.assign(e,{meta:{package:"@milkdown/preset-commonmark",...t}}),e}const MC=Nh("emphasis");ke(MC,{displayName:"Attr<emphasis>",group:"Emphasis"});const xu=Ah("emphasis",e=>({attrs:{marker:{default:e.get(sp).emphasis||"*"}},parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style",getAttrs:t=>t==="italic"}],toDOM:t=>["em",e.get(MC.key)(t)],parseMarkdown:{match:t=>t.type==="emphasis",runner:(t,n,o)=>{t.openMark(o,{marker:n.marker}),t.next(n.children),t.closeMark(o)}},toMarkdown:{match:t=>t.type.name==="emphasis",runner:(t,n)=>{t.withMark(n,"emphasis",void 0,{marker:n.attrs.marker})}}}));ke(xu.mark,{displayName:"MarkSchema<emphasis>",group:"Emphasis"});ke(xu.ctx,{displayName:"MarkSchemaCtx<emphasis>",group:"Emphasis"});const wv=It("ToggleEmphasis",e=>()=>mv(xu.type(e)));ke(wv,{displayName:"Command<toggleEmphasisCommand>",group:"Emphasis"});const _N=er(e=>Th(/(?:^|[^*])\*([^*]+)\*$/,xu.type(e),{getAttr:()=>({marker:"*"}),updateCaptured:({fullMatch:t,start:n})=>t.startsWith("*")?{}:{fullMatch:t.slice(1),start:n+1}}));ke(_N,{displayName:"InputRule<emphasis>|Star",group:"Emphasis"});const bN=er(e=>Th(/(?:^|[^_])_([^_]+)_$/,xu.type(e),{getAttr:()=>({marker:"_"}),updateCaptured:({fullMatch:t,start:n})=>t.startsWith("_")?{}:{fullMatch:t.slice(1),start:n+1}}));ke(bN,{displayName:"InputRule<emphasis>|Underscore",group:"Emphasis"});const OC=tr("emphasisKeymap",{ToggleEmphasis:{shortcuts:"Mod-i",command:e=>{const t=e.get(Vt);return()=>t.call(wv.key)}}});ke(OC.ctx,{displayName:"KeymapCtx<emphasis>",group:"Emphasis"});ke(OC.shortcuts,{displayName:"Keymap<emphasis>",group:"Emphasis"});const IC=Nh("strong");ke(IC,{displayName:"Attr<strong>",group:"Strong"});const Ad=Ah("strong",e=>({attrs:{marker:{default:e.get(sp).strong||"*"}},parseDOM:[{tag:"b"},{tag:"strong"},{style:"font-style",getAttrs:t=>t==="bold"}],toDOM:t=>["strong",e.get(IC.key)(t)],parseMarkdown:{match:t=>t.type==="strong",runner:(t,n,o)=>{t.openMark(o,{marker:n.marker}),t.next(n.children),t.closeMark(o)}},toMarkdown:{match:t=>t.type.name==="strong",runner:(t,n)=>{t.withMark(n,"strong",void 0,{marker:n.attrs.marker})}}}));ke(Ad.mark,{displayName:"MarkSchema<strong>",group:"Strong"});ke(Ad.ctx,{displayName:"MarkSchemaCtx<strong>",group:"Strong"});const Cv=It("ToggleStrong",e=>()=>mv(Ad.type(e)));ke(Cv,{displayName:"Command<toggleStrongCommand>",group:"Strong"});const wN=er(e=>Th(/(?:\*\*|__)([^*_]+)(?:\*\*|__)$/,Ad.type(e),{getAttr:t=>({marker:t[0].startsWith("*")?"*":"_"})}));ke(wN,{displayName:"InputRule<strong>",group:"Strong"});const AC=tr("strongKeymap",{ToggleBold:{shortcuts:["Mod-b"],command:e=>{const t=e.get(Vt);return()=>t.call(Cv.key)}}});ke(AC.ctx,{displayName:"KeymapCtx<strong>",group:"Strong"});ke(AC.shortcuts,{displayName:"Keymap<strong>",group:"Strong"});const NC=Nh("inlineCode");ke(NC,{displayName:"Attr<inlineCode>",group:"InlineCode"});const Ei=Ah("inlineCode",e=>({priority:100,code:!0,inclusive:!1,parseDOM:[{tag:"code"}],toDOM:t=>["code",e.get(NC.key)(t)],parseMarkdown:{match:t=>t.type==="inlineCode",runner:(t,n,o)=>{t.openMark(o),t.addText(n.value),t.closeMark(o)}},toMarkdown:{match:t=>t.type.name==="inlineCode",runner:(t,n,o)=>{t.withMark(n,"inlineCode",o.text||"")}}}));ke(Ei.mark,{displayName:"MarkSchema<inlineCode>",group:"InlineCode"});ke(Ei.ctx,{displayName:"MarkSchemaCtx<inlineCode>",group:"InlineCode"});const kv=It("ToggleInlineCode",e=>()=>(t,n)=>{const{selection:o,tr:r}=t;if(o.empty)return!1;const{from:s,to:i}=o;return t.doc.rangeHasMark(s,i,Ei.type(e))?(n==null||n(r.removeMark(s,i,Ei.type(e))),!0):(Object.keys(t.schema.marks).filter(l=>l!==Ei.type.name).map(l=>t.schema.marks[l]).forEach(l=>{r.removeMark(s,i,l)}),n==null||n(r.addMark(s,i,Ei.type(e).create())),!0)});ke(kv,{displayName:"Command<toggleInlineCodeCommand>",group:"InlineCode"});const CN=er(e=>Th(/(?:\`)([^\`]+)(?:\`)$/,Ei.type(e)));ke(CN,{displayName:"InputRule<inlineCodeInputRule>",group:"InlineCode"});const PC=tr("inlineCodeKeymap",{ToggleInlineCode:{shortcuts:"Mod-e",command:e=>{const t=e.get(Vt);return()=>t.call(kv.key)}}});ke(PC.ctx,{displayName:"KeymapCtx<inlineCode>",group:"InlineCode"});ke(PC.shortcuts,{displayName:"Keymap<inlineCode>",group:"InlineCode"});const LC=Nh("link");ke(LC,{displayName:"Attr<link>",group:"Link"});const ps=Ah("link",e=>({attrs:{href:{},title:{default:null}},parseDOM:[{tag:"a[href]",getAttrs:t=>{if(!(t instanceof HTMLElement))throw li(t);return{href:t.getAttribute("href"),title:t.getAttribute("title")}}}],toDOM:t=>["a",{...e.get(LC.key)(t),...t.attrs}],parseMarkdown:{match:t=>t.type==="link",runner:(t,n,o)=>{const r=n.url,s=n.title;t.openMark(o,{href:r,title:s}),t.next(n.children),t.closeMark(o)}},toMarkdown:{match:t=>t.type.name==="link",runner:(t,n)=>{t.withMark(n,"link",void 0,{title:n.attrs.title,url:n.attrs.href})}}}));ke(ps.mark,{displayName:"MarkSchema<link>",group:"Link"});const kN=It("ToggleLink",e=>(t={})=>mv(ps.type(e),t));ke(kN,{displayName:"Command<toggleLinkCommand>",group:"Link"});const SN=It("UpdateLink",e=>(t={})=>(n,o)=>{if(!o)return!1;let r,s=-1;const{selection:i}=n,{from:l,to:a}=i;if(n.doc.nodesBetween(l,l===a?a+1:a,(h,m)=>{if(ps.type(e).isInSet(h.marks))return r=h,s=m,!1}),!r)return!1;const u=r.marks.find(({type:h})=>h===ps.type(e));if(!u)return!1;const c=s,d=s+r.nodeSize,{tr:f}=n,p=ps.type(e).create({...u.attrs,...t});return p?(o(f.removeMark(c,d,u).addMark(c,d,p).setSelection(new ht(f.selection.$anchor)).scrollIntoView()),!0):!1});ke(SN,{displayName:"Command<updateLinkCommand>",group:"Link"});const $N=TC("doc",()=>({content:"block+",parseMarkdown:{match:({type:e})=>e==="root",runner:(e,t,n)=>{e.injectRoot(t,n)}},toMarkdown:{match:e=>e.type.name==="doc",runner:(e,t)=>{e.openNode("root"),e.next(t.content)}}}));ke($N,{displayName:"NodeSchema<doc>",group:"Doc"});const RC=Ts("paragraph");ke(RC,{displayName:"Attr<paragraph>",group:"Paragraph"});const Hi=Xn("paragraph",e=>({content:"inline*",group:"block",parseDOM:[{tag:"p"}],toDOM:t=>["p",e.get(RC.key)(t),0],parseMarkdown:{match:t=>t.type==="paragraph",runner:(t,n,o)=>{t.openNode(o),n.children?t.next(n.children):t.addText(n.value||""),t.closeNode()}},toMarkdown:{match:t=>t.type.name==="paragraph",runner:(t,n)=>{t.openNode("paragraph"),yN(t,n),t.closeNode()}}}));ke(Hi.node,{displayName:"NodeSchema<paragraph>",group:"Paragraph"});ke(Hi.ctx,{displayName:"NodeSchemaCtx<paragraph>",group:"Paragraph"});const DC=It("TurnIntoText",e=>()=>Hp(Hi.type(e)));ke(DC,{displayName:"Command<turnIntoTextCommand>",group:"Paragraph"});const VC=tr("paragraphKeymap",{TurnIntoText:{shortcuts:"Mod-Alt-0",command:e=>{const t=e.get(Vt);return()=>t.call(DC.key)}}});ke(VC.ctx,{displayName:"KeymapCtx<paragraph>",group:"Paragraph"});ke(VC.shortcuts,{displayName:"Keymap<paragraph>",group:"Paragraph"});const P_e=Array(6).fill(0).map((e,t)=>t+1);function L_e(e){return x_e(e.textContent)}const Sv=Pn(L_e,"headingIdGenerator");ke(Sv,{displayName:"Ctx<HeadingIdGenerator>",group:"Heading"});const FC=Ts("heading");ke(FC,{displayName:"Attr<heading>",group:"Heading"});const Gs=Xn("heading",e=>{const t=e.get(Sv.key);return{content:"inline*",group:"block",defining:!0,attrs:{id:{default:""},level:{default:1}},parseDOM:P_e.map(n=>({tag:`h${n}`,getAttrs:o=>{if(!(o instanceof HTMLElement))throw li(o);return{level:n,id:o.id}}})),toDOM:n=>[`h${n.attrs.level}`,{...e.get(FC.key)(n),id:n.attrs.id||t(n)},0],parseMarkdown:{match:({type:n})=>n==="heading",runner:(n,o,r)=>{const s=o.depth;n.openNode(r,{level:s}),n.next(o.children),n.closeNode()}},toMarkdown:{match:n=>n.type.name==="heading",runner:(n,o)=>{n.openNode("heading",void 0,{depth:o.attrs.level}),yN(n,o),n.closeNode()}}}});ke(Gs.node,{displayName:"NodeSchema<heading>",group:"Heading"});ke(Gs.ctx,{displayName:"NodeSchemaCtx<heading>",group:"Heading"});const EN=er(e=>cA(/^(?<hashes>#+)\s$/,Gs.type(e),t=>{var n,o;const r=((o=(n=t.groups)==null?void 0:n.hashes)==null?void 0:o.length)||0,s=e.get(bn),{$from:i}=s.state.selection,l=i.node();if(l.type.name==="heading"){let a=Number(l.attrs.level)+Number(r);return a>6&&(a=6),{level:a}}return{level:r}}));ke(EN,{displayName:"InputRule<wrapInHeadingInputRule>",group:"Heading"});const wl=It("WrapInHeading",e=>t=>(t??(t=1),t<1?Hp(Hi.type(e)):Hp(Gs.type(e),{level:t})));ke(wl,{displayName:"Command<wrapInHeadingCommand>",group:"Heading"});const BC=It("DowngradeHeading",e=>()=>(t,n,o)=>{const{$from:r}=t.selection,s=r.node();if(s.type!==Gs.type(e)||!t.selection.empty||r.parentOffset!==0)return!1;const i=s.attrs.level-1;return i?(n==null||n(t.tr.setNodeMarkup(t.selection.$from.before(),void 0,{...s.attrs,level:i})),!0):Hp(Hi.type(e))(t,n,o)});ke(BC,{displayName:"Command<downgradeHeadingCommand>",group:"Heading"});const zC=tr("headingKeymap",{TurnIntoH1:{shortcuts:"Mod-Alt-1",command:e=>{const t=e.get(Vt);return()=>t.call(wl.key,1)}},TurnIntoH2:{shortcuts:"Mod-Alt-2",command:e=>{const t=e.get(Vt);return()=>t.call(wl.key,2)}},TurnIntoH3:{shortcuts:"Mod-Alt-3",command:e=>{const t=e.get(Vt);return()=>t.call(wl.key,3)}},TurnIntoH4:{shortcuts:"Mod-Alt-4",command:e=>{const t=e.get(Vt);return()=>t.call(wl.key,4)}},TurnIntoH5:{shortcuts:"Mod-Alt-5",command:e=>{const t=e.get(Vt);return()=>t.call(wl.key,5)}},TurnIntoH6:{shortcuts:"Mod-Alt-6",command:e=>{const t=e.get(Vt);return()=>t.call(wl.key,6)}},DowngradeHeading:{shortcuts:["Delete","Backspace"],command:e=>{const t=e.get(Vt);return()=>t.call(BC.key)}}});ke(zC.ctx,{displayName:"KeymapCtx<heading>",group:"Heading"});ke(zC.shortcuts,{displayName:"Keymap<heading>",group:"Heading"});const jC=Ts("blockquote");ke(jC,{displayName:"Attr<blockquote>",group:"Blockquote"});const Nd=Xn("blockquote",e=>({content:"block+",group:"block",defining:!0,parseDOM:[{tag:"blockquote"}],toDOM:t=>["blockquote",e.get(jC.key)(t),0],parseMarkdown:{match:({type:t})=>t==="blockquote",runner:(t,n,o)=>{t.openNode(o).next(n.children).closeNode()}},toMarkdown:{match:t=>t.type.name==="blockquote",runner:(t,n)=>{t.openNode("blockquote").next(n.content).closeNode()}}}));ke(Nd.node,{displayName:"NodeSchema<blockquote>",group:"Blockquote"});ke(Nd.ctx,{displayName:"NodeSchemaCtx<blockquote>",group:"Blockquote"});const xN=er(e=>hC(/^\s*>\s$/,Nd.type(e)));ke(xN,{displayName:"InputRule<wrapInBlockquoteInputRule>",group:"Blockquote"});const HC=It("WrapInBlockquote",e=>()=>_C(Nd.type(e)));ke(HC,{displayName:"Command<wrapInBlockquoteCommand>",group:"Blockquote"});const UC=tr("blockquoteKeymap",{WrapInBlockquote:{shortcuts:"Mod-Shift-b",command:e=>{const t=e.get(Vt);return()=>t.call(HC.key)}}});ke(UC.ctx,{displayName:"KeymapCtx<blockquote>",group:"Blockquote"});ke(UC.shortcuts,{displayName:"Keymap<blockquote>",group:"Blockquote"});const WC=Ts("codeBlock",()=>({pre:{},code:{}}));ke(WC,{displayName:"Attr<codeBlock>",group:"CodeBlock"});const Pd=Xn("code_block",e=>({content:"text*",group:"block",marks:"",defining:!0,code:!0,attrs:{language:{default:""}},parseDOM:[{tag:"pre",preserveWhitespace:"full",getAttrs:t=>{if(!(t instanceof HTMLElement))throw li(t);return{language:t.dataset.language}}}],toDOM:t=>{const n=e.get(WC.key)(t);return["pre",{...n.pre,"data-language":t.attrs.language},["code",n.code,0]]},parseMarkdown:{match:({type:t})=>t==="code",runner:(t,n,o)=>{const r=n.lang,s=n.value;t.openNode(o,{language:r}),s&&t.addText(s),t.closeNode()}},toMarkdown:{match:t=>t.type.name==="code_block",runner:(t,n)=>{var o;t.addNode("code",void 0,((o=n.content.firstChild)==null?void 0:o.text)||"",{lang:n.attrs.language})}}}));ke(Pd.node,{displayName:"NodeSchema<codeBlock>",group:"CodeBlock"});ke(Pd.ctx,{displayName:"NodeSchemaCtx<codeBlock>",group:"CodeBlock"});const TN=er(e=>cA(/^```(?<language>[a-z]*)?[\s\n]$/,Pd.type(e),t=>{var n;return{language:((n=t.groups)==null?void 0:n.language)??""}}));ke(TN,{displayName:"InputRule<createCodeBlockInputRule>",group:"CodeBlock"});const KC=It("CreateCodeBlock",e=>(t="")=>Hp(Pd.type(e),{language:t}));ke(KC,{displayName:"Command<createCodeBlockCommand>",group:"CodeBlock"});const R_e=It("UpdateCodeBlockLanguage",()=>({pos:e,language:t}={pos:-1,language:""})=>(n,o)=>e>=0?(o==null||o(n.tr.setNodeAttribute(e,"language",t)),!0):!1);ke(R_e,{displayName:"Command<updateCodeBlockLanguageCommand>",group:"CodeBlock"});const qC=tr("codeBlockKeymap",{CreateCodeBlock:{shortcuts:"Mod-Alt-c",command:e=>{const t=e.get(Vt);return()=>t.call(KC.key)}}});ke(qC.ctx,{displayName:"KeymapCtx<codeBlock>",group:"CodeBlock"});ke(qC.shortcuts,{displayName:"Keymap<codeBlock>",group:"CodeBlock"});const GC=Ts("image");ke(GC,{displayName:"Attr<image>",group:"Image"});const Ld=Xn("image",e=>({inline:!0,group:"inline",selectable:!0,draggable:!0,marks:"",atom:!0,defining:!0,isolating:!0,attrs:{src:{default:""},alt:{default:""},title:{default:""}},parseDOM:[{tag:"img[src]",getAttrs:t=>{if(!(t instanceof HTMLElement))throw li(t);return{src:t.getAttribute("src")||"",alt:t.getAttribute("alt")||"",title:t.getAttribute("title")||t.getAttribute("alt")||""}}}],toDOM:t=>["img",{...e.get(GC.key)(t),...t.attrs}],parseMarkdown:{match:({type:t})=>t==="image",runner:(t,n,o)=>{const r=n.url,s=n.alt,i=n.title;t.addNode(o,{src:r,alt:s,title:i})}},toMarkdown:{match:t=>t.type.name==="image",runner:(t,n)=>{t.addNode("image",void 0,void 0,{title:n.attrs.title,url:n.attrs.src,alt:n.attrs.alt})}}}));ke(Ld.node,{displayName:"NodeSchema<image>",group:"Image"});ke(Ld.ctx,{displayName:"NodeSchemaCtx<image>",group:"Image"});const MN=It("InsertImage",e=>(t={})=>(n,o)=>{if(!o)return!0;const{src:r="",alt:s="",title:i=""}=t,l=Ld.type(e).create({src:r,alt:s,title:i});return l&&o(n.tr.replaceSelectionWith(l).scrollIntoView()),!0});ke(MN,{displayName:"Command<insertImageCommand>",group:"Image"});const ON=It("UpdateImage",e=>(t={})=>(n,o)=>{const r=X0e(n.selection,Ld.type(e));if(!r)return!1;const{node:s,pos:i}=r,l={...s.attrs},{src:a,alt:u,title:c}=t;return a!==void 0&&(l.src=a),u!==void 0&&(l.alt=u),c!==void 0&&(l.title=c),o==null||o(n.tr.setNodeMarkup(i,void 0,l).scrollIntoView()),!0});ke(ON,{displayName:"Command<updateImageCommand>",group:"Image"});const D_e=er(e=>new Cr(/!\[(?<alt>.*?)]\((?<filename>.*?)\s*(?="|\))"?(?<title>[^"]+)?"?\)/,(t,n,o,r)=>{const[s,i,l="",a]=n;return s?t.tr.replaceWith(o,r,Ld.type(e).create({src:l,alt:i,title:a})):null}));ke(D_e,{displayName:"InputRule<insertImageInputRule>",group:"Image"});const n0=Ts("hardbreak",e=>({"data-type":"hardbreak","data-is-inline":e.attrs.isInline}));ke(n0,{displayName:"Attr<hardbreak>",group:"Hardbreak"});const tu=Xn("hardbreak",e=>({inline:!0,group:"inline",attrs:{isInline:{default:!1}},selectable:!1,parseDOM:[{tag:"br"},{tag:'span[data-type="hardbreak"]',getAttrs:()=>({isInline:!0})}],toDOM:t=>t.attrs.isInline?["span",e.get(n0.key)(t)," "]:["br",e.get(n0.key)(t)],parseMarkdown:{match:({type:t})=>t==="break",runner:(t,n,o)=>{var r;t.addNode(o,{isInline:!!((r=n.data)!=null&&r.isInline)})}},leafText:()=>` |
| 119 |
`,toMarkdown:{match:t=>t.type.name==="hardbreak",runner:(t,n)=>{n.attrs.isInline?t.addNode("text",void 0,` |
| 120 |
`):t.addNode("break")}}}));ke(tu.node,{displayName:"NodeSchema<hardbreak>",group:"Hardbreak"});ke(tu.ctx,{displayName:"NodeSchemaCtx<hardbreak>",group:"Hardbreak"});const YC=It("InsertHardbreak",e=>()=>(t,n)=>{var o;const{selection:r,tr:s}=t;if(!(r instanceof ht))return!1;if(r.empty){const i=r.$from.node();if(i.childCount>0&&((o=i.lastChild)==null?void 0:o.type.name)==="hardbreak")return n==null||n(s.replaceRangeWith(r.to-1,r.to,t.schema.node("paragraph")).setSelection(bt.near(s.doc.resolve(r.to))).scrollIntoView()),!0}return n==null||n(s.setMeta("hardbreak",!0).replaceSelectionWith(tu.type(e).create()).scrollIntoView()),!0});ke(YC,{displayName:"Command<insertHardbreakCommand>",group:"Hardbreak"});const ZC=tr("hardbreakKeymap",{InsertHardbreak:{shortcuts:"Shift-Enter",command:e=>{const t=e.get(Vt);return()=>t.call(YC.key)}}});ke(ZC.ctx,{displayName:"KeymapCtx<hardbreak>",group:"Hardbreak"});ke(ZC.shortcuts,{displayName:"Keymap<hardbreak>",group:"Hardbreak"});const JC=Ts("hr");ke(JC,{displayName:"Attr<hr>",group:"Hr"});const Ph=Xn("hr",e=>({group:"block",parseDOM:[{tag:"hr"}],toDOM:t=>["hr",e.get(JC.key)(t)],parseMarkdown:{match:({type:t})=>t==="thematicBreak",runner:(t,n,o)=>{t.addNode(o)}},toMarkdown:{match:t=>t.type.name==="hr",runner:t=>{t.addNode("thematicBreak")}}}));ke(Ph.node,{displayName:"NodeSchema<hr>",group:"Hr"});ke(Ph.ctx,{displayName:"NodeSchemaCtx<hr>",group:"Hr"});const IN=er(e=>new Cr(/^(?:---|___\s|\*\*\*\s)$/,(t,n,o,r)=>{const{tr:s}=t;return n[0]&&s.replaceWith(o-1,r,Ph.type(e).create()),s}));ke(IN,{displayName:"InputRule<insertHrInputRule>",group:"Hr"});const AN=It("InsertHr",e=>()=>(t,n)=>{if(!n)return!0;const o=Hi.node.type(e).create(),{tr:r,selection:s}=t,{from:i}=s,l=Ph.type(e).create();if(!l)return!0;const a=r.replaceSelectionWith(l).insert(i,o),u=bt.findFrom(a.doc.resolve(i),1,!0);return u&&n(a.setSelection(u).scrollIntoView()),!0});ke(AN,{displayName:"Command<insertHrCommand>",group:"Hr"});const XC=Ts("bulletList");ke(XC,{displayName:"Attr<bulletList>",group:"BulletList"});const Tu=Xn("bullet_list",e=>({content:"listItem+",group:"block",attrs:{spread:{default:!1}},parseDOM:[{tag:"ul",getAttrs:t=>{if(!(t instanceof HTMLElement))throw li(t);return{spread:t.dataset.spread}}}],toDOM:t=>["ul",{...e.get(XC.key)(t),"data-spread":t.attrs.spread},0],parseMarkdown:{match:({type:t,ordered:n})=>t==="list"&&!n,runner:(t,n,o)=>{const r=n.spread!=null?`${n.spread}`:"false";t.openNode(o,{spread:r}).next(n.children).closeNode()}},toMarkdown:{match:t=>t.type.name==="bullet_list",runner:(t,n)=>{t.openNode("list",void 0,{ordered:!1,spread:n.attrs.spread==="true"}).next(n.content).closeNode()}}}));ke(Tu.node,{displayName:"NodeSchema<bulletList>",group:"BulletList"});ke(Tu.ctx,{displayName:"NodeSchemaCtx<bulletList>",group:"BulletList"});const NN=er(e=>hC(/^\s*([-+*])\s$/,Tu.type(e)));ke(NN,{displayName:"InputRule<wrapInBulletListInputRule>",group:"BulletList"});const QC=It("WrapInBulletList",e=>()=>_C(Tu.type(e)));ke(QC,{displayName:"Command<wrapInBulletListCommand>",group:"BulletList"});const ek=tr("bulletListKeymap",{WrapInBulletList:{shortcuts:"Mod-Alt-8",command:e=>{const t=e.get(Vt);return()=>t.call(QC.key)}}});ke(ek.ctx,{displayName:"KeymapCtx<bulletListKeymap>",group:"BulletList"});ke(ek.shortcuts,{displayName:"Keymap<bulletListKeymap>",group:"BulletList"});const tk=Ts("orderedList");ke(tk,{displayName:"Attr<orderedList>",group:"OrderedList"});const Mu=Xn("ordered_list",e=>({content:"listItem+",group:"block",attrs:{order:{default:1},spread:{default:!1}},parseDOM:[{tag:"ol",getAttrs:t=>{if(!(t instanceof HTMLElement))throw li(t);return{spread:t.dataset.spread,order:t.hasAttribute("start")?Number(t.getAttribute("start")):1}}}],toDOM:t=>["ol",{...e.get(tk.key)(t),...t.attrs.order===1?{}:t.attrs.order,"data-spread":t.attrs.spread},0],parseMarkdown:{match:({type:t,ordered:n})=>t==="list"&&!!n,runner:(t,n,o)=>{const r=n.spread!=null?`${n.spread}`:"true";t.openNode(o,{spread:r}).next(n.children).closeNode()}},toMarkdown:{match:t=>t.type.name==="ordered_list",runner:(t,n)=>{t.openNode("list",void 0,{ordered:!0,start:1,spread:n.attrs.spread==="true"}),t.next(n.content),t.closeNode()}}}));ke(Mu.node,{displayName:"NodeSchema<orderedList>",group:"OrderedList"});ke(Mu.ctx,{displayName:"NodeSchemaCtx<orderedList>",group:"OrderedList"});const PN=er(e=>hC(/^\s*(\d+)\.\s$/,Mu.type(e),t=>({order:Number(t[1])}),(t,n)=>n.childCount+n.attrs.order===Number(t[1])));ke(PN,{displayName:"InputRule<wrapInOrderedListInputRule>",group:"OrderedList"});const nk=It("WrapInOrderedList",e=>()=>_C(Mu.type(e)));ke(nk,{displayName:"Command<wrapInOrderedListCommand>",group:"OrderedList"});const ok=tr("orderedListKeymap",{WrapInOrderedList:{shortcuts:"Mod-Alt-7",command:e=>{const t=e.get(Vt);return()=>t.call(nk.key)}}});ke(ok.ctx,{displayName:"KeymapCtx<orderedList>",group:"OrderedList"});ke(ok.shortcuts,{displayName:"Keymap<orderedList>",group:"OrderedList"});const rk=Ts("listItem");ke(rk,{displayName:"Attr<listItem>",group:"ListItem"});const ni=Xn("list_item",e=>({group:"listItem",content:"(paragraph|blockquote) block*",attrs:{label:{default:"•"},listType:{default:"bullet"},spread:{default:"true"}},defining:!0,parseDOM:[{tag:"li",getAttrs:t=>{if(!(t instanceof HTMLElement))throw li(t);return{label:t.dataset.label,listType:t.dataset.listType,spread:t.dataset.spread}}}],toDOM:t=>["li",{...e.get(rk.key)(t),"data-label":t.attrs.label,"data-list-type":t.attrs.listType,"data-spread":t.attrs.spread},0],parseMarkdown:{match:({type:t})=>t==="listItem",runner:(t,n,o)=>{const r=n.label!=null?`${n.label}.`:"•",s=n.label!=null?"ordered":"bullet",i=n.spread!=null?`${n.spread}`:"true";t.openNode(o,{label:r,listType:s,spread:i}),t.next(n.children),t.closeNode()}},toMarkdown:{match:t=>t.type.name==="list_item",runner:(t,n)=>{t.openNode("listItem",void 0,{spread:n.attrs.spread==="true"}),t.next(n.content),t.closeNode()}}}));ke(ni.node,{displayName:"NodeSchema<listItem>",group:"ListItem"});ke(ni.ctx,{displayName:"NodeSchemaCtx<listItem>",group:"ListItem"});const sk=It("SinkListItem",e=>()=>I_e(ni.type(e)));ke(sk,{displayName:"Command<sinkListItemCommand>",group:"ListItem"});const ik=It("LiftListItem",e=>()=>vN(ni.type(e)));ke(ik,{displayName:"Command<liftListItemCommand>",group:"ListItem"});const lk=It("SplitListItem",e=>()=>T_e(ni.type(e)));ke(lk,{displayName:"Command<splitListItemCommand>",group:"ListItem"});function V_e(e){return(t,n,o)=>{const{selection:r}=t;if(!(r instanceof ht))return!1;const{empty:s,$from:i}=r;if(!s||i.parentOffset!==0)return!1;const l=i.node(-1);return l.type!==ni.type(e)||l.firstChild!==i.node()||i.node(-2).childCount>1?!1:vN(ni.type(e))(t,n,o)}}const ak=It("LiftFirstListItem",e=>()=>V_e(e));ke(ak,{displayName:"Command<liftFirstListItemCommand>",group:"ListItem"});const uk=tr("listItemKeymap",{NextListItem:{shortcuts:"Enter",command:e=>{const t=e.get(Vt);return()=>t.call(lk.key)}},SinkListItem:{shortcuts:["Tab","Mod-]"],command:e=>{const t=e.get(Vt);return()=>t.call(sk.key)}},LiftListItem:{shortcuts:["Shift-Tab","Mod-["],command:e=>{const t=e.get(Vt);return()=>t.call(ik.key)}},LiftFirstListItem:{shortcuts:["Backspace","Delete"],command:e=>{const t=e.get(Vt);return()=>t.call(ak.key)}}});ke(uk.ctx,{displayName:"KeymapCtx<listItem>",group:"ListItem"});ke(uk.shortcuts,{displayName:"Keymap<listItem>",group:"ListItem"});const LN=TC("text",()=>({group:"inline",parseMarkdown:{match:({type:e})=>e==="text",runner:(e,t)=>{e.addText(t.value)}},toMarkdown:{match:e=>e.type.name==="text",runner:(e,t)=>{e.addNode("text",void 0,t.text)}}}));ke(LN,{displayName:"NodeSchema<text>",group:"Text"});const ck=Ts("html");ke(ck,{displayName:"Attr<html>",group:"Html"});const dk=Xn("html",e=>({atom:!0,group:"inline",inline:!0,attrs:{value:{default:""}},toDOM:t=>{const n=document.createElement("span"),o={...e.get(ck.key)(t),"data-value":t.attrs.value,"data-type":"html"};return n.textContent=t.attrs.value,["span",o,t.attrs.value]},parseDOM:[{tag:'span[data-type="html"]',getAttrs:t=>({value:t.dataset.value??""})}],parseMarkdown:{match:({type:t})=>t==="html",runner:(t,n,o)=>{t.addNode(o,{value:n.value})}},toMarkdown:{match:t=>t.type.name==="html",runner:(t,n)=>{t.addNode("html",void 0,n.attrs.value)}}}));ke(dk.node,{displayName:"NodeSchema<html>",group:"Html"});ke(dk.ctx,{displayName:"NodeSchemaCtx<html>",group:"Html"});const F_e=[$N,RC,Hi,Sv,FC,Gs,n0,tu,jC,Nd,WC,Pd,JC,Ph,GC,Ld,XC,Tu,tk,Mu,rk,ni,MC,xu,IC,Ad,NC,Ei,LC,ps,ck,dk,LN].flat(),B_e=[xN,NN,PN,TN,IN,EN].flat(),z_e=[_N,bN,CN,wN],j_e=[DC,HC,wl,BC,KC,YC,AN,MN,ON,nk,QC,sk,lk,ik,ak,wv,kv,Cv,kN,SN],H_e=[UC,qC,ZC,zC,uk,ok,ek,VC,OC,PC,AC].flat(),fk=Id("remarkAddOrderInList",()=>()=>e=>{Od(e,"list",t=>{if(t.ordered){const n=t.start??1;t.children.forEach((o,r)=>{o.label=r+n})}})});ke(fk.plugin,{displayName:"Remark<remarkAddOrderInListPlugin>",group:"Remark"});ke(fk.options,{displayName:"RemarkConfig<remarkAddOrderInListPlugin>",group:"Remark"});const pk=Id("remarkLineBreak",()=>()=>e=>{const t=/[\t ]*(?:\r?\n|\r)/g;Od(e,"text",(n,o,r)=>{if(!n.value||typeof n.value!="string")return;const s=[];let i=0;t.lastIndex=0;let l=t.exec(n.value);for(;l;){const a=l.index;i!==a&&s.push({type:"text",value:n.value.slice(i,a)}),s.push({type:"break",data:{isInline:!0}}),i=a+l[0].length,l=t.exec(n.value)}if(s.length>0&&r&&typeof o=="number")return i<n.value.length&&s.push({type:"text",value:n.value.slice(i)}),r.children.splice(o,1,...s),o+s.length})});ke(pk.plugin,{displayName:"Remark<remarkLineBreak>",group:"Remark"});ke(pk.options,{displayName:"RemarkConfig<remarkLineBreak>",group:"Remark"});const hk=Id("remarkInlineLink",()=>N_e);ke(hk.plugin,{displayName:"Remark<remarkInlineLinkPlugin>",group:"Remark"});ke(hk.options,{displayName:"RemarkConfig<remarkInlineLinkPlugin>",group:"Remark"});const U_e=e=>!!e.children,W_e=e=>e.type==="html";function K_e(e,t){return n(e,0,null)[0];function n(o,r,s){if(U_e(o)){const i=[];for(let l=0,a=o.children.length;l<a;l++){const u=o.children[l];if(u){const c=n(u,l,o);if(c)for(let d=0,f=c.length;d<f;d++){const p=c[d];p&&i.push(p)}}}o.children=i}return t(o,r,s)}}const mk=Id("remarkHTMLTransformer",()=>()=>e=>{K_e(e,(t,n,o)=>W_e(t)?((o==null?void 0:o.type)==="root"&&(t.children=[{...t}],delete t.value,t.type="paragraph"),[t]):[t])});ke(mk.plugin,{displayName:"Remark<remarkHtmlTransformer>",group:"Remark"});ke(mk.options,{displayName:"RemarkConfig<remarkHtmlTransformer>",group:"Remark"});const gk=Id("remarkMarker",()=>()=>(e,t)=>{const n=o=>t.value.charAt(o.position.start.offset);Od(e,o=>["strong","emphasis"].includes(o.type),o=>{o.marker=n(o)})});ke(gk.plugin,{displayName:"Remark<remarkMarker>",group:"Remark"});ke(gk.options,{displayName:"RemarkConfig<remarkMarker>",group:"Remark"});const RN=ao(()=>{let e=!1;const t=new wn("MILKDOWN_INLINE_NODES_CURSOR"),n=new On({key:t,state:{init(){return!1},apply(o){if(!o.selection.empty)return!1;const r=o.selection.$from,s=r.nodeBefore,i=r.nodeAfter;return!!(s&&i&&s.isInline&&!s.isText&&i.isInline&&!i.isText)}},props:{handleDOMEvents:{compositionend:(o,r)=>e?(e=!1,requestAnimationFrame(()=>{if(n.getState(o.state)){const s=o.state.selection.from;r.preventDefault(),o.dispatch(o.state.tr.insertText(r.data||"",s))}}),!0):!1,compositionstart:o=>(n.getState(o.state)&&(e=!0),!1),beforeinput:(o,r)=>{if(n.getState(o.state)&&r instanceof InputEvent&&r.data&&!e){const s=o.state.selection.from;return r.preventDefault(),o.dispatch(o.state.tr.insertText(r.data||"",s)),!0}return!1}},decorations(o){if(n.getState(o)){const r=o.selection.$from.pos,s=document.createElement("span"),i=Un.widget(r,s,{side:-1}),l=document.createElement("span"),a=Un.widget(r,l);return setTimeout(()=>{s.contentEditable="true",l.contentEditable="true"}),an.create(o.doc,[i,a])}return an.empty}}});return n});ke(RN,{displayName:"Prose<inlineNodesCursorPlugin>",group:"Prose"});const DN=ao(e=>new On({key:new wn("MILKDOWN_HARDBREAK_MARKS"),appendTransaction:(t,n,o)=>{if(!t.length)return;const[r]=t;if(!r)return;const[s]=r.steps;if(r.getMeta("hardbreak")){if(!(s instanceof oo))return;const{from:i}=s;return o.tr.setNodeMarkup(i,tu.type(e),void 0,[])}if(s instanceof $i){let i=o.tr;const{from:l,to:a}=s;return o.doc.nodesBetween(l,a,(u,c)=>{u.type===tu.type(e)&&(i=i.setNodeMarkup(c,tu.type(e),void 0,[]))}),i}}}));ke(DN,{displayName:"Prose<hardbreakClearMarkPlugin>",group:"Prose"});const vk=Pn(["table","code_block"],"hardbreakFilterNodes");ke(vk,{displayName:"Ctx<hardbreakFilterNodes>",group:"Prose"});const VN=ao(e=>{const t=e.get(vk.key);return new On({key:new wn("MILKDOWN_HARDBREAK_FILTER"),filterTransaction:(n,o)=>{const r=n.getMeta("hardbreak"),[s]=n.steps;if(r&&s){const{from:i}=s,l=o.doc.resolve(i);let a=l.depth,u=!0;for(;a>0;)t.includes(l.node(a).type.name)&&(u=!1),a--;return u}return!0}})});ke(VN,{displayName:"Prose<hardbreakFilterPlugin>",group:"Prose"});const FN=ao(e=>{const t=new wn("MILKDOWN_HEADING_ID"),n=o=>{if(o.composing)return;const r=e.get(Sv.key),s=o.state.tr.setMeta("addToHistory",!1);let i=!1;o.state.doc.descendants((l,a)=>{if(l.type===Gs.type(e)){if(l.textContent.trim().length===0)return;const u=l.attrs,c=r(l);u.id!==c&&(i=!0,s.setMeta(t,!0).setNodeMarkup(a,void 0,{...u,id:c}))}}),i&&o.dispatch(s)};return new On({key:t,view:o=>(n(o),{update:(r,s)=>{r.state.doc.eq(s.doc)||n(r)}})})});ke(FN,{displayName:"Prose<syncHeadingIdPlugin>",group:"Prose"});const BN=ao(e=>{const t=n=>{if(n.composing||!n.editable)return;const o=Mu.type(e),r=Tu.type(e),s=ni.type(e),i=n.state,l=(c,d)=>{let f=!1;const p=`${d+1}.`;return c.label!==p&&(c.label=p,f=!0),f};let a=i.tr,u=!1;i.doc.descendants((c,d,f,p)=>{if(c.type===r){const h=c.maybeChild(0);(h==null?void 0:h.type)===s&&h.attrs.listType==="ordered"&&(u=!0,a.setNodeMarkup(d,o,{spread:"true"}),c.descendants((m,y,v,k)=>{if(m.type===s){const b={...m.attrs};l(b,k)&&(a=a.setNodeMarkup(y,void 0,b))}return!1}))}else if(c.type===s&&(f==null?void 0:f.type)===o){const h={...c.attrs};let m=!1;h.listType!=="ordered"&&(h.listType="ordered",m=!0),f!=null&&f.maybeChild(0)&&(m=l(h,p)),m&&(a=a.setNodeMarkup(d,void 0,h),u=!0)}}),u&&n.dispatch(a.setMeta("addToHistory",!1))};return new On({key:new wn("MILKDOWN_KEEP_LIST_ORDER"),view:n=>(t(n),{update:o=>{t(o)}})})});ke(BN,{displayName:"Prose<syncListOrderPlugin>",group:"Prose"});const q_e=[DN,vk,VN,RN,fk,hk,pk,mk,gk,FN,BN].flat(),G_e=[F_e,B_e,z_e,j_e,H_e,q_e].flat();var v2,y2;if(typeof WeakMap<"u"){let e=new WeakMap;v2=t=>e.get(t),y2=(t,n)=>(e.set(t,n),n)}else{const e=[];let n=0;v2=o=>{for(let r=0;r<e.length;r+=2)if(e[r]==o)return e[r+1]},y2=(o,r)=>(n==10&&(n=0),e[n++]=o,e[n++]=r)}var Xt=class{constructor(e,t,n,o){this.width=e,this.height=t,this.map=n,this.problems=o}findCell(e){for(let t=0;t<this.map.length;t++){const n=this.map[t];if(n!=e)continue;const o=t%this.width,r=t/this.width|0;let s=o+1,i=r+1;for(let l=1;s<this.width&&this.map[t+l]==n;l++)s++;for(let l=1;i<this.height&&this.map[t+this.width*l]==n;l++)i++;return{left:o,top:r,right:s,bottom:i}}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:o,right:r,top:s,bottom:i}=this.findCell(e);return t=="horiz"?(n<0?o==0:r==this.width)?null:this.map[s*this.width+(n<0?o-1:r)]:(n<0?s==0:i==this.height)?null:this.map[o+this.width*(n<0?s-1:i)]}rectBetween(e,t){const{left:n,right:o,top:r,bottom:s}=this.findCell(e),{left:i,right:l,top:a,bottom:u}=this.findCell(t);return{left:Math.min(n,i),top:Math.min(r,a),right:Math.max(o,l),bottom:Math.max(s,u)}}cellsInRect(e){const t=[],n={};for(let o=e.top;o<e.bottom;o++)for(let r=e.left;r<e.right;r++){const s=o*this.width+r,i=this.map[s];n[i]||(n[i]=!0,!(r==e.left&&r&&this.map[s-1]==i||o==e.top&&o&&this.map[s-this.width]==i)&&t.push(i))}return t}positionAt(e,t,n){for(let o=0,r=0;;o++){const s=r+n.child(o).nodeSize;if(o==e){let i=t+e*this.width;const l=(e+1)*this.width;for(;i<l&&this.map[i]<r;)i++;return i==l?s-1:this.map[i]}r=s}}static get(e){return v2(e)||y2(e,Y_e(e))}};function Y_e(e){if(e.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+e.type.name);const t=Z_e(e),n=e.childCount,o=[];let r=0,s=null;const i=[];for(let u=0,c=t*n;u<c;u++)o[u]=0;for(let u=0,c=0;u<n;u++){const d=e.child(u);c++;for(let h=0;;h++){for(;r<o.length&&o[r]!=0;)r++;if(h==d.childCount)break;const m=d.child(h),{colspan:y,rowspan:v,colwidth:k}=m.attrs;for(let b=0;b<v;b++){if(b+u>=n){(s||(s=[])).push({type:"overlong_rowspan",pos:c,n:v-b});break}const $=r+b*t;for(let x=0;x<y;x++){o[$+x]==0?o[$+x]=c:(s||(s=[])).push({type:"collision",row:u,pos:c,n:y-x});const E=k&&k[x];if(E){const M=($+x)%t*2,N=i[M];N==null||N!=E&&i[M+1]==1?(i[M]=E,i[M+1]=1):N==E&&i[M+1]++}}}r+=y,c+=m.nodeSize}const f=(u+1)*t;let p=0;for(;r<f;)o[r++]==0&&p++;p&&(s||(s=[])).push({type:"missing",row:u,n:p}),c++}const l=new Xt(t,n,o,s);let a=!1;for(let u=0;!a&&u<i.length;u+=2)i[u]!=null&&i[u+1]<n&&(a=!0);return a&&J_e(l,i,e),l}function Z_e(e){let t=-1,n=!1;for(let o=0;o<e.childCount;o++){const r=e.child(o);let s=0;if(n)for(let i=0;i<o;i++){const l=e.child(i);for(let a=0;a<l.childCount;a++){const u=l.child(a);i+u.attrs.rowspan>o&&(s+=u.attrs.colspan)}}for(let i=0;i<r.childCount;i++){const l=r.child(i);s+=l.attrs.colspan,l.attrs.rowspan>1&&(n=!0)}t==-1?t=s:t!=s&&(t=Math.max(t,s))}return t}function J_e(e,t,n){e.problems||(e.problems=[]);const o={};for(let r=0;r<e.map.length;r++){const s=e.map[r];if(o[s])continue;o[s]=!0;const i=n.nodeAt(s);if(!i)throw new RangeError(`No cell with offset ${s} found`);let l=null;const a=i.attrs;for(let u=0;u<a.colspan;u++){const c=(r+u)%e.width,d=t[c*2];d!=null&&(!a.colwidth||a.colwidth[u]!=d)&&((l||(l=X_e(a)))[u]=d)}l&&e.problems.unshift({type:"colwidth mismatch",pos:s,colwidth:l})}}function X_e(e){if(e.colwidth)return e.colwidth.slice();const t=[];for(let n=0;n<e.colspan;n++)t.push(0);return t}function T9(e,t){if(typeof e=="string")return{};const n=e.getAttribute("data-colwidth"),o=n&&/^\d+(,\d+)*$/.test(n)?n.split(",").map(i=>Number(i)):null,r=Number(e.getAttribute("colspan")||1),s={colspan:r,rowspan:Number(e.getAttribute("rowspan")||1),colwidth:o&&o.length==r?o:null};for(const i in t){const l=t[i].getFromDOM,a=l&&l(e);a!=null&&(s[i]=a)}return s}function M9(e,t){const n={};e.attrs.colspan!=1&&(n.colspan=e.attrs.colspan),e.attrs.rowspan!=1&&(n.rowspan=e.attrs.rowspan),e.attrs.colwidth&&(n["data-colwidth"]=e.attrs.colwidth.join(","));for(const o in t){const r=t[o].setDOMAttr;r&&r(e.attrs[o],n)}return n}function Q_e(e){const t=e.cellAttributes||{},n={colspan:{default:1},rowspan:{default:1},colwidth:{default:null}};for(const o in t)n[o]={default:t[o].default};return{table:{content:"table_row+",tableRole:"table",isolating:!0,group:e.tableGroup,parseDOM:[{tag:"table"}],toDOM(){return["table",["tbody",0]]}},table_row:{content:"(table_cell | table_header)*",tableRole:"row",parseDOM:[{tag:"tr"}],toDOM(){return["tr",0]}},table_cell:{content:e.cellContent,attrs:n,tableRole:"cell",isolating:!0,parseDOM:[{tag:"td",getAttrs:o=>T9(o,t)}],toDOM(o){return["td",M9(o,t),0]}},table_header:{content:e.cellContent,attrs:n,tableRole:"header_cell",isolating:!0,parseDOM:[{tag:"th",getAttrs:o=>T9(o,t)}],toDOM(o){return["th",M9(o,t),0]}}}}function Wr(e){let t=e.cached.tableNodeTypes;if(!t){t=e.cached.tableNodeTypes={};for(const n in e.nodes){const o=e.nodes[n],r=o.spec.tableRole;r&&(t[r]=o)}}return t}var El=new wn("selectingCells");function Lh(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 Zr(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 $v(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=Lh(t.$head)||ebe(t.$head);if(n)return n;throw new RangeError(`No cell found around position ${t.head}`)}function ebe(e){for(let t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){const o=t.type.spec.tableRole;if(o=="cell"||o=="header_cell")return e.doc.resolve(n)}for(let t=e.nodeBefore,n=e.pos;t;t=t.lastChild,n--){const o=t.type.spec.tableRole;if(o=="cell"||o=="header_cell")return e.doc.resolve(n-t.nodeSize)}}function _2(e){return e.parent.type.spec.tableRole=="row"&&!!e.nodeAfter}function tbe(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function yk(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function zN(e,t,n){const o=e.node(-1),r=Xt.get(o),s=e.start(-1),i=r.nextCell(e.pos-s,t,n);return i==null?null:e.node(0).resolve(s+i)}function vu(e,t,n=1){const o={...e,colspan:e.colspan-n};return o.colwidth&&(o.colwidth=o.colwidth.slice(),o.colwidth.splice(t,n),o.colwidth.some(r=>r>0)||(o.colwidth=null)),o}function nbe(e,t,n=1){const o={...e,colspan:e.colspan+n};if(o.colwidth){o.colwidth=o.colwidth.slice();for(let r=0;r<n;r++)o.colwidth.splice(t,0,0)}return o}function obe(e,t,n){const o=Wr(t.type.schema).header_cell;for(let r=0;r<e.height;r++)if(t.nodeAt(e.map[n+r*e.width]).type!=o)return!1;return!0}var hn=class gi extends bt{constructor(t,n=t){const o=t.node(-1),r=Xt.get(o),s=t.start(-1),i=r.rectBetween(t.pos-s,n.pos-s),l=t.node(0),a=r.cellsInRect(i).filter(c=>c!=n.pos-s);a.unshift(n.pos-s);const u=a.map(c=>{const d=o.nodeAt(c);if(!d)throw RangeError(`No cell with offset ${c} found`);const f=s+c+1;return new Zg(l.resolve(f),l.resolve(f+d.content.size))});super(u[0].$from,u[0].$to,u),this.$anchorCell=t,this.$headCell=n}map(t,n){const o=t.resolve(n.map(this.$anchorCell.pos)),r=t.resolve(n.map(this.$headCell.pos));if(_2(o)&&_2(r)&&yk(o,r)){const s=this.$anchorCell.node(-1)!=o.node(-1);return s&&this.isRowSelection()?gi.rowSelection(o,r):s&&this.isColSelection()?gi.colSelection(o,r):new gi(o,r)}return ht.between(o,r)}content(){const t=this.$anchorCell.node(-1),n=Xt.get(t),o=this.$anchorCell.start(-1),r=n.rectBetween(this.$anchorCell.pos-o,this.$headCell.pos-o),s={},i=[];for(let a=r.top;a<r.bottom;a++){const u=[];for(let c=a*n.width+r.left,d=r.left;d<r.right;d++,c++){const f=n.map[c];if(s[f])continue;s[f]=!0;const p=n.findCell(f);let h=t.nodeAt(f);if(!h)throw RangeError(`No cell with offset ${f} found`);const m=r.left-p.left,y=p.right-r.right;if(m>0||y>0){let v=h.attrs;if(m>0&&(v=vu(v,0,m)),y>0&&(v=vu(v,v.colspan-y,y)),p.left<r.left){if(h=h.type.createAndFill(v),!h)throw RangeError(`Could not create cell with attrs ${JSON.stringify(v)}`)}else h=h.type.create(v,h.content)}if(p.top<r.top||p.bottom>r.bottom){const v={...h.attrs,rowspan:Math.min(p.bottom,r.bottom)-Math.max(p.top,r.top)};p.top<r.top?h=h.type.createAndFill(v):h=h.type.create(v,h.content)}u.push(h)}i.push(t.child(a).copy(We.from(u)))}const l=this.isColSelection()&&this.isRowSelection()?t:i;return new Je(We.from(l),1,1)}replace(t,n=Je.empty){const o=t.steps.length,r=this.ranges;for(let i=0;i<r.length;i++){const{$from:l,$to:a}=r[i],u=t.mapping.slice(o);t.replace(u.map(l.pos),u.map(a.pos),i?Je.empty:n)}const s=bt.findFrom(t.doc.resolve(t.mapping.slice(o).map(this.to)),-1);s&&t.setSelection(s)}replaceWith(t,n){this.replace(t,new Je(We.from(n),0,0))}forEachCell(t){const n=this.$anchorCell.node(-1),o=Xt.get(n),r=this.$anchorCell.start(-1),s=o.cellsInRect(o.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r));for(let i=0;i<s.length;i++)t(n.nodeAt(s[i]),r+s[i])}isColSelection(){const t=this.$anchorCell.index(-1),n=this.$headCell.index(-1);if(Math.min(t,n)>0)return!1;const o=t+this.$anchorCell.nodeAfter.attrs.rowspan,r=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(o,r)==this.$headCell.node(-1).childCount}static colSelection(t,n=t){const o=t.node(-1),r=Xt.get(o),s=t.start(-1),i=r.findCell(t.pos-s),l=r.findCell(n.pos-s),a=t.node(0);return i.top<=l.top?(i.top>0&&(t=a.resolve(s+r.map[i.left])),l.bottom<r.height&&(n=a.resolve(s+r.map[r.width*(r.height-1)+l.right-1]))):(l.top>0&&(n=a.resolve(s+r.map[l.left])),i.bottom<r.height&&(t=a.resolve(s+r.map[r.width*(r.height-1)+i.right-1]))),new gi(t,n)}isRowSelection(){const t=this.$anchorCell.node(-1),n=Xt.get(t),o=this.$anchorCell.start(-1),r=n.colCount(this.$anchorCell.pos-o),s=n.colCount(this.$headCell.pos-o);if(Math.min(r,s)>0)return!1;const i=r+this.$anchorCell.nodeAfter.attrs.colspan,l=s+this.$headCell.nodeAfter.attrs.colspan;return Math.max(i,l)==n.width}eq(t){return t instanceof gi&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,n=t){const o=t.node(-1),r=Xt.get(o),s=t.start(-1),i=r.findCell(t.pos-s),l=r.findCell(n.pos-s),a=t.node(0);return i.left<=l.left?(i.left>0&&(t=a.resolve(s+r.map[i.top*r.width])),l.right<r.width&&(n=a.resolve(s+r.map[r.width*(l.top+1)-1]))):(l.left>0&&(n=a.resolve(s+r.map[l.top*r.width])),i.right<r.width&&(t=a.resolve(s+r.map[r.width*(i.top+1)-1]))),new gi(t,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(t,n){return new gi(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,o=n){return new gi(t.resolve(n),t.resolve(o))}getBookmark(){return new rbe(this.$anchorCell.pos,this.$headCell.pos)}};hn.prototype.visible=!1;bt.jsonID("cell",hn);var rbe=class jN{constructor(t,n){this.anchor=t,this.head=n}map(t){return new jN(t.map(this.anchor),t.map(this.head))}resolve(t){const n=t.resolve(this.anchor),o=t.resolve(this.head);return n.parent.type.spec.tableRole=="row"&&o.parent.type.spec.tableRole=="row"&&n.index()<n.parent.childCount&&o.index()<o.parent.childCount&&yk(n,o)?new hn(n,o):bt.near(o,1)}};function sbe(e){if(!(e.selection instanceof hn))return null;const t=[];return e.selection.forEachCell((n,o)=>{t.push(Un.node(o,o+n.nodeSize,{class:"selectedCell"}))}),an.create(e.doc,t)}function ibe({$from:e,$to:t}){if(e.pos==t.pos||e.pos<e.pos-6)return!1;let n=e.pos,o=t.pos,r=e.depth;for(;r>=0&&!(e.after(r+1)<e.end(r));r--,n++);for(let s=t.depth;s>=0&&!(t.before(s+1)>t.start(s));s--,o--);return n==o&&/row|table/.test(e.node(r).type.spec.tableRole)}function lbe({$from:e,$to:t}){let n,o;for(let r=e.depth;r>0;r--){const s=e.node(r);if(s.type.spec.tableRole==="cell"||s.type.spec.tableRole==="header_cell"){n=s;break}}for(let r=t.depth;r>0;r--){const s=t.node(r);if(s.type.spec.tableRole==="cell"||s.type.spec.tableRole==="header_cell"){o=s;break}}return n!==o&&t.parentOffset===0}function abe(e,t,n){const o=(t||e).selection,r=(t||e).doc;let s,i;if(o instanceof mt&&(i=o.node.type.spec.tableRole)){if(i=="cell"||i=="header_cell")s=hn.create(r,o.from);else if(i=="row"){const l=r.resolve(o.from+1);s=hn.rowSelection(l,l)}else if(!n){const l=Xt.get(o.node),a=o.from+1,u=a+l.map[l.width*l.height-1];s=hn.create(r,a+1,u)}}else o instanceof ht&&ibe(o)?s=ht.create(r,o.from):o instanceof ht&&lbe(o)&&(s=ht.create(r,o.$from.start(),o.$from.end()));return s&&(t||(t=e.tr)).setSelection(s),t}var ube=new wn("fix-tables");function HN(e,t,n,o){const r=e.childCount,s=t.childCount;e:for(let i=0,l=0;i<s;i++){const a=t.child(i);for(let u=l,c=Math.min(r,i+3);u<c;u++)if(e.child(u)==a){l=u+1,n+=a.nodeSize;continue e}o(a,n),l<r&&e.child(l).sameMarkup(a)?HN(e.child(l),a,n+1,o):a.nodesBetween(0,a.content.size,o,n+1),n+=a.nodeSize}}function cbe(e,t){let n;const o=(r,s)=>{r.type.spec.tableRole=="table"&&(n=dbe(e,r,s,n))};return t?t.doc!=e.doc&&HN(t.doc,e.doc,0,o):e.doc.descendants(o),n}function dbe(e,t,n,o){const r=Xt.get(t);if(!r.problems)return o;o||(o=e.tr);const s=[];for(let a=0;a<r.height;a++)s.push(0);for(let a=0;a<r.problems.length;a++){const u=r.problems[a];if(u.type=="collision"){const c=t.nodeAt(u.pos);if(!c)continue;const d=c.attrs;for(let f=0;f<d.rowspan;f++)s[u.row+f]+=u.n;o.setNodeMarkup(o.mapping.map(n+1+u.pos),null,vu(d,d.colspan-u.n,u.n))}else if(u.type=="missing")s[u.row]+=u.n;else if(u.type=="overlong_rowspan"){const c=t.nodeAt(u.pos);if(!c)continue;o.setNodeMarkup(o.mapping.map(n+1+u.pos),null,{...c.attrs,rowspan:c.attrs.rowspan-u.n})}else if(u.type=="colwidth mismatch"){const c=t.nodeAt(u.pos);if(!c)continue;o.setNodeMarkup(o.mapping.map(n+1+u.pos),null,{...c.attrs,colwidth:u.colwidth})}}let i,l;for(let a=0;a<s.length;a++)s[a]&&(i==null&&(i=a),l=a);for(let a=0,u=n+1;a<r.height;a++){const c=t.child(a),d=u+c.nodeSize,f=s[a];if(f>0){let p="cell";c.firstChild&&(p=c.firstChild.type.spec.tableRole);const h=[];for(let y=0;y<f;y++){const v=Wr(e.schema)[p].createAndFill();v&&h.push(v)}const m=(a==0||i==a-1)&&l==a?u+1:d-1;o.insert(o.mapping.map(m),h)}u=d}return o.setMeta(ube,{fixTables:!0})}function ua(e){const t=e.selection,n=$v(e),o=n.node(-1),r=n.start(-1),s=Xt.get(o);return{...t instanceof hn?s.rectBetween(t.$anchorCell.pos-r,t.$headCell.pos-r):s.findCell(n.pos-r),tableStart:r,map:s,table:o}}function UN(e,{map:t,tableStart:n,table:o},r){let s=r>0?-1:0;obe(t,o,r+s)&&(s=r==0||r==t.width?null:0);for(let i=0;i<t.height;i++){const l=i*t.width+r;if(r>0&&r<t.width&&t.map[l-1]==t.map[l]){const a=t.map[l],u=o.nodeAt(a);e.setNodeMarkup(e.mapping.map(n+a),null,nbe(u.attrs,r-t.colCount(a))),i+=u.attrs.rowspan-1}else{const a=s==null?Wr(o.type.schema).cell:o.nodeAt(t.map[l+s]).type,u=t.positionAt(i,r,o);e.insert(e.mapping.map(n+u),a.createAndFill())}}return e}function fbe(e,t){if(!Zr(e))return!1;if(t){const n=ua(e);t(UN(e.tr,n,n.left))}return!0}function pbe(e,t){if(!Zr(e))return!1;if(t){const n=ua(e);t(UN(e.tr,n,n.right))}return!0}function hbe(e,{map:t,table:n,tableStart:o},r){const s=e.mapping.maps.length;for(let i=0;i<t.height;){const l=i*t.width+r,a=t.map[l],u=n.nodeAt(a),c=u.attrs;if(r>0&&t.map[l-1]==a||r<t.width-1&&t.map[l+1]==a)e.setNodeMarkup(e.mapping.slice(s).map(o+a),null,vu(c,r-t.colCount(a)));else{const d=e.mapping.slice(s).map(o+a);e.delete(d,d+u.nodeSize)}i+=c.rowspan}}function mbe(e,t){if(!Zr(e))return!1;if(t){const n=ua(e),o=e.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let r=n.right-1;hbe(o,n,r),r!=n.left;r--){const s=n.tableStart?o.doc.nodeAt(n.tableStart-1):o.doc;if(!s)throw RangeError("No table found");n.table=s,n.map=Xt.get(s)}t(o)}return!0}function gbe(e,{map:t,table:n,tableStart:o},r){let s=0;for(let u=0;u<r;u++)s+=n.child(u).nodeSize;const i=s+n.child(r).nodeSize,l=e.mapping.maps.length;e.delete(s+o,i+o);const a=new Set;for(let u=0,c=r*t.width;u<t.width;u++,c++){const d=t.map[c];if(!a.has(d)){if(a.add(d),r>0&&d==t.map[c-t.width]){const f=n.nodeAt(d).attrs;e.setNodeMarkup(e.mapping.slice(l).map(d+o),null,{...f,rowspan:f.rowspan-1}),u+=f.colspan-1}else if(r<t.height&&d==t.map[c+t.width]){const f=n.nodeAt(d),p=f.attrs,h=f.type.create({...p,rowspan:f.attrs.rowspan-1},f.content),m=t.positionAt(r+1,u,n);e.insert(e.mapping.slice(l).map(o+m),h),u+=p.colspan-1}}}}function vbe(e,t){if(!Zr(e))return!1;if(t){const n=ua(e),o=e.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let r=n.bottom-1;gbe(o,n,r),r!=n.top;r--){const s=n.tableStart?o.doc.nodeAt(n.tableStart-1):o.doc;if(!s)throw RangeError("No table found");n.table=s,n.map=Xt.get(n.table)}t(o)}return!0}function ybe(e,t){return function(n,o){if(!Zr(n))return!1;const r=$v(n);if(r.nodeAfter.attrs[e]===t)return!1;if(o){const s=n.tr;n.selection instanceof hn?n.selection.forEachCell((i,l)=>{i.attrs[e]!==t&&s.setNodeMarkup(l,null,{...i.attrs,[e]:t})}):s.setNodeMarkup(r.pos,null,{...r.nodeAfter.attrs,[e]:t}),o(s)}return!0}}function _be(e){return function(t,n){if(!Zr(t))return!1;if(n){const o=Wr(t.schema),r=ua(t),s=t.tr,i=r.map.cellsInRect(e=="column"?{left:r.left,top:0,right:r.right,bottom:r.map.height}:e=="row"?{left:0,top:r.top,right:r.map.width,bottom:r.bottom}:r),l=i.map(a=>r.table.nodeAt(a));for(let a=0;a<i.length;a++)l[a].type==o.header_cell&&s.setNodeMarkup(r.tableStart+i[a],o.cell,l[a].attrs);if(s.steps.length==0)for(let a=0;a<i.length;a++)s.setNodeMarkup(r.tableStart+i[a],o.header_cell,l[a].attrs);n(s)}return!0}}function O9(e,t,n){const o=t.map.cellsInRect({left:0,top:0,right:e=="row"?t.map.width:1,bottom:e=="column"?t.map.height:1});for(let r=0;r<o.length;r++){const s=t.table.nodeAt(o[r]);if(s&&s.type!==n.header_cell)return!1}return!0}function _k(e,t){return t=t||{useDeprecatedLogic:!1},t.useDeprecatedLogic?_be(e):function(n,o){if(!Zr(n))return!1;if(o){const r=Wr(n.schema),s=ua(n),i=n.tr,l=O9("row",s,r),a=O9("column",s,r),c=(e==="column"?l:e==="row"?a:!1)?1:0,d=e=="column"?{left:0,top:c,right:1,bottom:s.map.height}:e=="row"?{left:c,top:0,right:s.map.width,bottom:1}:s,f=e=="column"?a?r.cell:r.header_cell:e=="row"?l?r.cell:r.header_cell:r.cell;s.map.cellsInRect(d).forEach(p=>{const h=p+s.tableStart,m=i.doc.nodeAt(h);m&&i.setNodeMarkup(h,f,m.attrs)}),o(i)}return!0}}_k("row",{useDeprecatedLogic:!0});_k("column",{useDeprecatedLogic:!0});_k("cell",{useDeprecatedLogic:!0});function bbe(e,t){if(t<0){const n=e.nodeBefore;if(n)return e.pos-n.nodeSize;for(let o=e.index(-1)-1,r=e.before();o>=0;o--){const s=e.node(-1).child(o),i=s.lastChild;if(i)return r-1-i.nodeSize;r-=s.nodeSize}}else{if(e.index()<e.parent.childCount-1)return e.pos+e.nodeAfter.nodeSize;const n=e.node(-1);for(let o=e.indexAfter(-1),r=e.after();o<n.childCount;o++){const s=n.child(o);if(s.childCount)return r+1;r+=s.nodeSize}}return null}function WN(e){return function(t,n){if(!Zr(t))return!1;const o=bbe($v(t),e);if(o==null)return!1;if(n){const r=t.doc.resolve(o);n(t.tr.setSelection(ht.between(r,tbe(r))).scrollIntoView())}return!0}}function wbe(e,t){const n=e.selection.$anchor;for(let o=n.depth;o>0;o--)if(n.node(o).type.spec.tableRole=="table")return t&&t(e.tr.delete(n.before(o),n.after(o)).scrollIntoView()),!0;return!1}function Tm(e,t){const n=e.selection;if(!(n instanceof hn))return!1;if(t){const o=e.tr,r=Wr(e.schema).cell.createAndFill().content;n.forEachCell((s,i)=>{s.content.eq(r)||o.replace(o.mapping.map(i+1),o.mapping.map(i+s.nodeSize-1),new Je(r,0,0))}),o.docChanged&&t(o)}return!0}function Cbe(e){if(!e.size)return null;let{content:t,openStart:n,openEnd:o}=e;for(;t.childCount==1&&(n>0&&o>0||t.child(0).type.spec.tableRole=="table");)n--,o--,t=t.child(0).content;const r=t.child(0),s=r.type.spec.tableRole,i=r.type.schema,l=[];if(s=="row")for(let a=0;a<t.childCount;a++){let u=t.child(a).content;const c=a?0:Math.max(0,n-1),d=a<t.childCount-1?0:Math.max(0,o-1);(c||d)&&(u=b2(Wr(i).row,new Je(u,c,d)).content),l.push(u)}else if(s=="cell"||s=="header_cell")l.push(n||o?b2(Wr(i).row,new Je(t,n,o)).content:t);else return null;return kbe(i,l)}function kbe(e,t){const n=[];for(let r=0;r<t.length;r++){const s=t[r];for(let i=s.childCount-1;i>=0;i--){const{rowspan:l,colspan:a}=s.child(i).attrs;for(let u=r;u<r+l;u++)n[u]=(n[u]||0)+a}}let o=0;for(let r=0;r<n.length;r++)o=Math.max(o,n[r]);for(let r=0;r<n.length;r++)if(r>=t.length&&t.push(We.empty),n[r]<o){const s=Wr(e).cell.createAndFill(),i=[];for(let l=n[r];l<o;l++)i.push(s);t[r]=t[r].append(We.from(i))}return{height:t.length,width:o,rows:t}}function b2(e,t){const n=e.createAndFill();return new lA(n).replace(0,n.content.size,t).doc}function Sbe({width:e,height:t,rows:n},o,r){if(e!=o){const s=[],i=[];for(let l=0;l<n.length;l++){const a=n[l],u=[];for(let c=s[l]||0,d=0;c<o;d++){let f=a.child(d%a.childCount);c+f.attrs.colspan>o&&(f=f.type.createChecked(vu(f.attrs,f.attrs.colspan,c+f.attrs.colspan-o),f.content)),u.push(f),c+=f.attrs.colspan;for(let p=1;p<f.attrs.rowspan;p++)s[l+p]=(s[l+p]||0)+f.attrs.colspan}i.push(We.from(u))}n=i,e=o}if(t!=r){const s=[];for(let i=0,l=0;i<r;i++,l++){const a=[],u=n[l%t];for(let c=0;c<u.childCount;c++){let d=u.child(c);i+d.attrs.rowspan>r&&(d=d.type.create({...d.attrs,rowspan:Math.max(1,r-d.attrs.rowspan)},d.content)),a.push(d)}s.push(We.from(a))}n=s,t=r}return{width:e,height:t,rows:n}}function $be(e,t,n,o,r,s,i){const l=e.doc.type.schema,a=Wr(l);let u,c;if(r>t.width)for(let d=0,f=0;d<t.height;d++){const p=n.child(d);f+=p.nodeSize;const h=[];let m;p.lastChild==null||p.lastChild.type==a.cell?m=u||(u=a.cell.createAndFill()):m=c||(c=a.header_cell.createAndFill());for(let y=t.width;y<r;y++)h.push(m);e.insert(e.mapping.slice(i).map(f-1+o),h)}if(s>t.height){const d=[];for(let h=0,m=(t.height-1)*t.width;h<Math.max(t.width,r);h++){const y=h>=t.width?!1:n.nodeAt(t.map[m+h]).type==a.header_cell;d.push(y?c||(c=a.header_cell.createAndFill()):u||(u=a.cell.createAndFill()))}const f=a.row.create(null,We.from(d)),p=[];for(let h=t.height;h<s;h++)p.push(f);e.insert(e.mapping.slice(i).map(o+n.nodeSize-2),p)}return!!(u||c)}function I9(e,t,n,o,r,s,i,l){if(i==0||i==t.height)return!1;let a=!1;for(let u=r;u<s;u++){const c=i*t.width+u,d=t.map[c];if(t.map[c-t.width]==d){a=!0;const f=n.nodeAt(d),{top:p,left:h}=t.findCell(d);e.setNodeMarkup(e.mapping.slice(l).map(d+o),null,{...f.attrs,rowspan:i-p}),e.insert(e.mapping.slice(l).map(t.positionAt(i,h,n)),f.type.createAndFill({...f.attrs,rowspan:p+f.attrs.rowspan-i})),u+=f.attrs.colspan-1}}return a}function A9(e,t,n,o,r,s,i,l){if(i==0||i==t.width)return!1;let a=!1;for(let u=r;u<s;u++){const c=u*t.width+i,d=t.map[c];if(t.map[c-1]==d){a=!0;const f=n.nodeAt(d),p=t.colCount(d),h=e.mapping.slice(l).map(d+o);e.setNodeMarkup(h,null,vu(f.attrs,i-p,f.attrs.colspan-(i-p))),e.insert(h+f.nodeSize,f.type.createAndFill(vu(f.attrs,0,i-p))),u+=f.attrs.rowspan-1}}return a}function N9(e,t,n,o,r){let s=n?e.doc.nodeAt(n-1):e.doc;if(!s)throw new Error("No table found");let i=Xt.get(s);const{top:l,left:a}=o,u=a+r.width,c=l+r.height,d=e.tr;let f=0;function p(){if(s=n?d.doc.nodeAt(n-1):d.doc,!s)throw new Error("No table found");i=Xt.get(s),f=d.mapping.maps.length}$be(d,i,s,n,u,c,f)&&p(),I9(d,i,s,n,a,u,l,f)&&p(),I9(d,i,s,n,a,u,c,f)&&p(),A9(d,i,s,n,l,c,a,f)&&p(),A9(d,i,s,n,l,c,u,f)&&p();for(let h=l;h<c;h++){const m=i.positionAt(h,a,s),y=i.positionAt(h,u,s);d.replace(d.mapping.slice(f).map(m+n),d.mapping.slice(f).map(y+n),new Je(r.rows[h-l],0,0))}p(),d.setSelection(new hn(d.doc.resolve(n+i.positionAt(l,a,s)),d.doc.resolve(n+i.positionAt(c-1,u-1,s)))),t(d)}var Ebe=SA({ArrowLeft:Mm("horiz",-1),ArrowRight:Mm("horiz",1),ArrowUp:Mm("vert",-1),ArrowDown:Mm("vert",1),"Shift-ArrowLeft":Om("horiz",-1),"Shift-ArrowRight":Om("horiz",1),"Shift-ArrowUp":Om("vert",-1),"Shift-ArrowDown":Om("vert",1),Backspace:Tm,"Mod-Backspace":Tm,Delete:Tm,"Mod-Delete":Tm});function F1(e,t,n){return n.eq(e.selection)?!1:(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function Mm(e,t){return(n,o,r)=>{if(!r)return!1;const s=n.selection;if(s instanceof hn)return F1(n,o,bt.near(s.$headCell,t));if(e!="horiz"&&!s.empty)return!1;const i=KN(r,e,t);if(i==null)return!1;if(e=="horiz")return F1(n,o,bt.near(n.doc.resolve(s.head+t),t));{const l=n.doc.resolve(i),a=zN(l,e,t);let u;return a?u=bt.near(a,1):t<0?u=bt.near(n.doc.resolve(l.before(-1)),-1):u=bt.near(n.doc.resolve(l.after(-1)),1),F1(n,o,u)}}}function Om(e,t){return(n,o,r)=>{if(!r)return!1;const s=n.selection;let i;if(s instanceof hn)i=s;else{const a=KN(r,e,t);if(a==null)return!1;i=new hn(n.doc.resolve(a))}const l=zN(i.$headCell,e,t);return l?F1(n,o,new hn(i.$anchorCell,l)):!1}}function xbe(e,t){const n=e.state.doc,o=Lh(n.resolve(t));return o?(e.dispatch(e.state.tr.setSelection(new hn(o))),!0):!1}function Tbe(e,t,n){if(!Zr(e.state))return!1;let o=Cbe(n);const r=e.state.selection;if(r instanceof hn){o||(o={width:1,height:1,rows:[We.from(b2(Wr(e.state.schema).cell,n))]});const s=r.$anchorCell.node(-1),i=r.$anchorCell.start(-1),l=Xt.get(s).rectBetween(r.$anchorCell.pos-i,r.$headCell.pos-i);return o=Sbe(o,l.right-l.left,l.bottom-l.top),N9(e.state,e.dispatch,i,l,o),!0}else if(o){const s=$v(e.state),i=s.start(-1);return N9(e.state,e.dispatch,i,Xt.get(s.node(-1)).findCell(s.pos-i),o),!0}else return!1}function Mbe(e,t){var n;if(t.ctrlKey||t.metaKey)return;const o=P9(e,t.target);let r;if(t.shiftKey&&e.state.selection instanceof hn)s(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&o&&(r=Lh(e.state.selection.$anchor))!=null&&((n=Xy(e,t))==null?void 0:n.pos)!=r.pos)s(r,t),t.preventDefault();else if(!o)return;function s(a,u){let c=Xy(e,u);const d=El.getState(e.state)==null;if(!c||!yk(a,c))if(d)c=a;else return;const f=new hn(a,c);if(d||!e.state.selection.eq(f)){const p=e.state.tr.setSelection(f);d&&p.setMeta(El,a.pos),e.dispatch(p)}}function i(){e.root.removeEventListener("mouseup",i),e.root.removeEventListener("dragstart",i),e.root.removeEventListener("mousemove",l),El.getState(e.state)!=null&&e.dispatch(e.state.tr.setMeta(El,-1))}function l(a){const u=a,c=El.getState(e.state);let d;if(c!=null)d=e.state.doc.resolve(c);else if(P9(e,u.target)!=o&&(d=Xy(e,t),!d))return i();d&&s(d,u)}e.root.addEventListener("mouseup",i),e.root.addEventListener("dragstart",i),e.root.addEventListener("mousemove",l)}function KN(e,t,n){if(!(e.state.selection instanceof ht))return null;const{$head:o}=e.state.selection;for(let r=o.depth-1;r>=0;r--){const s=o.node(r);if((n<0?o.index(r):o.indexAfter(r))!=(n<0?0:s.childCount))return null;if(s.type.spec.tableRole=="cell"||s.type.spec.tableRole=="header_cell"){const l=o.before(r),a=t=="vert"?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(a)?l:null}}return null}function P9(e,t){for(;t&&t!=e.dom;t=t.parentNode)if(t.nodeName=="TD"||t.nodeName=="TH")return t;return null}function Xy(e,t){const n=e.posAtCoords({left:t.clientX,top:t.clientY});return n&&n?Lh(e.state.doc.resolve(n.pos)):null}var Obe=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")),w2(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,w2(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){return e.type=="attributes"&&(e.target==this.table||this.colgroup.contains(e.target))}};function w2(e,t,n,o,r,s){var i;let l=0,a=!0,u=t.firstChild;const c=e.firstChild;if(c){for(let d=0,f=0;d<c.childCount;d++){const{colspan:p,colwidth:h}=c.child(d).attrs;for(let m=0;m<p;m++,f++){const y=r==f?s:h&&h[m],v=y?y+"px":"";l+=y||o,y||(a=!1),u?(u.style.width!=v&&(u.style.width=v),u=u.nextSibling):t.appendChild(document.createElement("col")).style.width=v}}for(;u;){const d=u.nextSibling;(i=u.parentNode)==null||i.removeChild(u),u=d}a?(n.style.width=l+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=l+"px")}}var Or=new wn("tableColumnResizing");function Ibe({handleWidth:e=5,cellMinWidth:t=25,View:n=Obe,lastColumnResizable:o=!0}={}){const r=new On({key:Or,state:{init(s,i){var l,a;const u=(a=(l=r.spec)==null?void 0:l.props)==null?void 0:a.nodeViews,c=Wr(i.schema).table.name;return n&&u&&(u[c]=(d,f)=>new n(d,t,f)),new Abe(-1,!1)},apply(s,i){return i.apply(s)}},props:{attributes:s=>{const i=Or.getState(s);return i&&i.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(s,i)=>{Nbe(s,i,e,t,o)},mouseleave:s=>{Pbe(s)},mousedown:(s,i)=>{Lbe(s,i,t)}},decorations:s=>{const i=Or.getState(s);if(i&&i.activeHandle>-1)return zbe(s,i.activeHandle)},nodeViews:{}}});return r}var Abe=class B1{constructor(t,n){this.activeHandle=t,this.dragging=n}apply(t){const n=this,o=t.getMeta(Or);if(o&&o.setHandle!=null)return new B1(o.setHandle,!1);if(o&&o.setDragging!==void 0)return new B1(n.activeHandle,o.setDragging);if(n.activeHandle>-1&&t.docChanged){let r=t.mapping.map(n.activeHandle,-1);return _2(t.doc.resolve(r))||(r=-1),new B1(r,n.dragging)}return n}};function Nbe(e,t,n,o,r){const s=Or.getState(e.state);if(s&&!s.dragging){const i=Dbe(t.target);let l=-1;if(i){const{left:a,right:u}=i.getBoundingClientRect();t.clientX-a<=n?l=L9(e,t,"left",n):u-t.clientX<=n&&(l=L9(e,t,"right",n))}if(l!=s.activeHandle){if(!r&&l!==-1){const a=e.state.doc.resolve(l),u=a.node(-1),c=Xt.get(u),d=a.start(-1);if(c.colCount(a.pos-d)+a.nodeAfter.attrs.colspan-1==c.width-1)return}qN(e,l)}}}function Pbe(e){const t=Or.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&qN(e,-1)}function Lbe(e,t,n){var o;const r=(o=e.dom.ownerDocument.defaultView)!=null?o:window,s=Or.getState(e.state);if(!s||s.activeHandle==-1||s.dragging)return!1;const i=e.state.doc.nodeAt(s.activeHandle),l=Rbe(e,s.activeHandle,i.attrs);e.dispatch(e.state.tr.setMeta(Or,{setDragging:{startX:t.clientX,startWidth:l}}));function a(c){r.removeEventListener("mouseup",a),r.removeEventListener("mousemove",u);const d=Or.getState(e.state);d!=null&&d.dragging&&(Vbe(e,d.activeHandle,R9(d.dragging,c,n)),e.dispatch(e.state.tr.setMeta(Or,{setDragging:null})))}function u(c){if(!c.which)return a(c);const d=Or.getState(e.state);if(d&&d.dragging){const f=R9(d.dragging,c,n);Fbe(e,d.activeHandle,f,n)}}return r.addEventListener("mouseup",a),r.addEventListener("mousemove",u),t.preventDefault(),!0}function Rbe(e,t,{colspan:n,colwidth:o}){const r=o&&o[o.length-1];if(r)return r;const s=e.domAtPos(t);let l=s.node.childNodes[s.offset].offsetWidth,a=n;if(o)for(let u=0;u<n;u++)o[u]&&(l-=o[u],a--);return l/a}function Dbe(e){for(;e&&e.nodeName!="TD"&&e.nodeName!="TH";)e=e.classList&&e.classList.contains("ProseMirror")?null:e.parentNode;return e}function L9(e,t,n,o){const r=n=="right"?-o:o,s=e.posAtCoords({left:t.clientX+r,top:t.clientY});if(!s)return-1;const{pos:i}=s,l=Lh(e.state.doc.resolve(i));if(!l)return-1;if(n=="right")return l.pos;const a=Xt.get(l.node(-1)),u=l.start(-1),c=a.map.indexOf(l.pos-u);return c%a.width==0?-1:u+a.map[c-1]}function R9(e,t,n){const o=t.clientX-e.startX;return Math.max(n,e.startWidth+o)}function qN(e,t){e.dispatch(e.state.tr.setMeta(Or,{setHandle:t}))}function Vbe(e,t,n){const o=e.state.doc.resolve(t),r=o.node(-1),s=Xt.get(r),i=o.start(-1),l=s.colCount(o.pos-i)+o.nodeAfter.attrs.colspan-1,a=e.state.tr;for(let u=0;u<s.height;u++){const c=u*s.width+l;if(u&&s.map[c]==s.map[c-s.width])continue;const d=s.map[c],f=r.nodeAt(d).attrs,p=f.colspan==1?0:l-s.colCount(d);if(f.colwidth&&f.colwidth[p]==n)continue;const h=f.colwidth?f.colwidth.slice():Bbe(f.colspan);h[p]=n,a.setNodeMarkup(i+d,null,{...f,colwidth:h})}a.docChanged&&e.dispatch(a)}function Fbe(e,t,n,o){const r=e.state.doc.resolve(t),s=r.node(-1),i=r.start(-1),l=Xt.get(s).colCount(r.pos-i)+r.nodeAfter.attrs.colspan-1;let a=e.domAtPos(r.start(-1)).node;for(;a&&a.nodeName!="TABLE";)a=a.parentNode;a&&w2(s,a.firstChild,a,o,l,n)}function Bbe(e){return Array(e).fill(0)}function zbe(e,t){const n=[],o=e.doc.resolve(t),r=o.node(-1);if(!r)return an.empty;const s=Xt.get(r),i=o.start(-1),l=s.colCount(o.pos-i)+o.nodeAfter.attrs.colspan-1;for(let a=0;a<s.height;a++){const u=l+a*s.width;if((l==s.width-1||s.map[u]!=s.map[u+1])&&(a==0||s.map[u]!=s.map[u-s.width])){const c=s.map[u],d=i+c+r.nodeAt(c).nodeSize-1,f=document.createElement("div");f.className="column-resize-handle",n.push(Un.widget(d,f))}}return an.create(e.doc,n)}function jbe({allowTableNodeSelection:e=!1}={}){return new On({key:El,state:{init(){return null},apply(t,n){const o=t.getMeta(El);if(o!=null)return o==-1?null:o;if(n==null||!t.docChanged)return n;const{deleted:r,pos:s}=t.mapping.mapResult(n);return r?null:s}},props:{decorations:sbe,handleDOMEvents:{mousedown:Mbe},createSelectionBetween(t){return El.getState(t.state)!=null?t.state.selection:null},handleTripleClick:xbe,handleKeyDown:Ebe,handlePaste:Tbe},appendTransaction(t,n,o){return abe(o,cbe(o,n),e)}})}var o0=typeof navigator<"u"?navigator:null,bk=o0&&o0.userAgent||"",Hbe=/Edge\/(\d+)/.exec(bk),Ube=/MSIE \d/.exec(bk),Wbe=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(bk),Kbe=!!(Ube||Wbe||Hbe),qbe=!Kbe&&!!o0&&/Apple Computer/.test(o0.vendor),GN=new wn("safari-ime-span"),C2=!1,Gbe={key:GN,props:{decorations:Ybe,handleDOMEvents:{compositionstart:()=>{C2=!0},compositionend:()=>{C2=!1}}}};function Ybe(e){const{$from:t,$to:n,to:o}=e.selection;if(C2&&t.sameParent(n)){const r=Un.widget(o,Zbe,{ignoreSelection:!0,key:"safari-ime-span"});return an.create(e.doc,[r])}}function Zbe(e){const t=e.dom.ownerDocument.createElement("span");return t.className="ProseMirror-safari-ime-span",t}var Jbe=new On(qbe?Gbe:{key:GN});function D9(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let o=0,r=n.indexOf(t);for(;r!==-1;)o++,r=n.indexOf(t,r+t.length);return o}function Xbe(e,t,n){const r=lv((n||{}).ignore||[]),s=Qbe(t);let i=-1;for(;++i<s.length;)LI(e,"text",l);function l(u,c){let d=-1,f;for(;++d<c.length;){const p=c[d],h=f?f.children:void 0;if(r(p,h?h.indexOf(p):void 0,f))return;f=p}if(f)return a(u,c)}function a(u,c){const d=c[c.length-1],f=s[i][0],p=s[i][1];let h=0;const y=d.children.indexOf(u);let v=!1,k=[];f.lastIndex=0;let b=f.exec(u.value);for(;b;){const $=b.index,x={index:b.index,input:b.input,stack:[...c,u]};let E=p(...b,x);if(typeof E=="string"&&(E=E.length>0?{type:"text",value:E}:void 0),E===!1?f.lastIndex=$+1:(h!==$&&k.push({type:"text",value:u.value.slice(h,$)}),Array.isArray(E)?k.push(...E):E&&k.push(E),h=$+b[0].length,v=!0),!f.global)break;b=f.exec(u.value)}return v?(h<u.value.length&&k.push({type:"text",value:u.value.slice(h)}),d.children.splice(y,1,...k)):k=[u],y+k.length}}function Qbe(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let o=-1;for(;++o<n.length;){const r=n[o];t.push([e2e(r[0]),t2e(r[1])])}return t}function e2e(e){return typeof e=="string"?new RegExp(bv(e),"g"):e}function t2e(e){return typeof e=="function"?e:function(){return e}}const Qy="phrasing",e_=["autolink","link","image","label"];function n2e(){return{transforms:[u2e],enter:{literalAutolink:r2e,literalAutolinkEmail:t_,literalAutolinkHttp:t_,literalAutolinkWww:t_},exit:{literalAutolink:a2e,literalAutolinkEmail:l2e,literalAutolinkHttp:s2e,literalAutolinkWww:i2e}}}function o2e(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Qy,notInConstruct:e_},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Qy,notInConstruct:e_},{character:":",before:"[ps]",after:"\\/",inConstruct:Qy,notInConstruct:e_}]}}function r2e(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function t_(e){this.config.enter.autolinkProtocol.call(this,e)}function s2e(e){this.config.exit.autolinkProtocol.call(this,e)}function i2e(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function l2e(e){this.config.exit.autolinkEmail.call(this,e)}function a2e(e){this.exit(e)}function u2e(e){Xbe(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,c2e],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),d2e]],{ignore:["link","linkReference"]})}function c2e(e,t,n,o,r){let s="";if(!YN(r)||(/^w/i.test(t)&&(n=t+n,t="",s="http://"),!f2e(n)))return!1;const i=p2e(n+o);if(!i[0])return!1;const l={type:"link",title:null,url:s+t+i[0],children:[{type:"text",value:t+i[0]}]};return i[1]?[l,{type:"text",value:i[1]}]:l}function d2e(e,t,n,o){return!YN(o,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function f2e(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function p2e(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],o=n.indexOf(")");const r=D9(e,"(");let s=D9(e,")");for(;o!==-1&&r>s;)e+=n.slice(0,o+1),n=n.slice(o+1),o=n.indexOf(")"),s++;return[e,n]}function YN(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||hu(n)||sv(n))&&(!t||n!==47)}ZN.peek=S2e;function h2e(){return{enter:{gfmFootnoteDefinition:g2e,gfmFootnoteDefinitionLabelString:v2e,gfmFootnoteCall:b2e,gfmFootnoteCallString:w2e},exit:{gfmFootnoteDefinition:_2e,gfmFootnoteDefinitionLabelString:y2e,gfmFootnoteCall:k2e,gfmFootnoteCallString:C2e}}}function m2e(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:$2e,footnoteReference:ZN}}}function g2e(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function v2e(){this.buffer()}function y2e(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=ds(this.sliceSerialize(e)).toLowerCase()}function _2e(e){this.exit(e)}function b2e(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function w2e(){this.buffer()}function C2e(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=ds(this.sliceSerialize(e)).toLowerCase()}function k2e(e){this.exit(e)}function ZN(e,t,n,o){const r=n.createTracker(o);let s=r.move("[^");const i=n.enter("footnoteReference"),l=n.enter("reference");return s+=r.move(n.safe(n.associationId(e),{...r.current(),before:s,after:"]"})),l(),i(),s+=r.move("]"),s}function S2e(){return"["}function $2e(e,t,n,o){const r=n.createTracker(o);let s=r.move("[^");const i=n.enter("footnoteDefinition"),l=n.enter("label");return s+=r.move(n.safe(n.associationId(e),{...r.current(),before:s,after:"]"})),l(),s+=r.move("]:"+(e.children&&e.children.length>0?" ":"")),r.shift(4),s+=r.move(n.indentLines(n.containerFlow(e,r.current()),E2e)),i(),s}function E2e(e,t,n){return t===0?e:(n?"":" ")+e}const x2e=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];JN.peek=A2e;function T2e(){return{canContainEols:["delete"],enter:{strikethrough:O2e},exit:{strikethrough:I2e}}}function M2e(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:x2e}],handlers:{delete:JN}}}function O2e(e){this.enter({type:"delete",children:[]},e)}function I2e(e){this.exit(e)}function JN(e,t,n,o){const r=n.createTracker(o),s=n.enter("strikethrough");let i=r.move("~~");return i+=n.containerPhrasing(e,{...r.current(),before:i,after:"~"}),i+=r.move("~~"),s(),i}function A2e(){return"~"}function N2e(e,t={}){const n=(t.align||[]).concat(),o=t.stringLength||L2e,r=[],s=[],i=[],l=[];let a=0,u=-1;for(;++u<e.length;){const h=[],m=[];let y=-1;for(e[u].length>a&&(a=e[u].length);++y<e[u].length;){const v=P2e(e[u][y]);if(t.alignDelimiters!==!1){const k=o(v);m[y]=k,(l[y]===void 0||k>l[y])&&(l[y]=k)}h.push(v)}s[u]=h,i[u]=m}let c=-1;if(typeof n=="object"&&"length"in n)for(;++c<a;)r[c]=V9(n[c]);else{const h=V9(n);for(;++c<a;)r[c]=h}c=-1;const d=[],f=[];for(;++c<a;){const h=r[c];let m="",y="";h===99?(m=":",y=":"):h===108?m=":":h===114&&(y=":");let v=t.alignDelimiters===!1?1:Math.max(1,l[c]-m.length-y.length);const k=m+"-".repeat(v)+y;t.alignDelimiters!==!1&&(v=m.length+v+y.length,v>l[c]&&(l[c]=v),f[c]=v),d[c]=k}s.splice(1,0,d),i.splice(1,0,f),u=-1;const p=[];for(;++u<s.length;){const h=s[u],m=i[u];c=-1;const y=[];for(;++c<a;){const v=h[c]||"";let k="",b="";if(t.alignDelimiters!==!1){const $=l[c]-(m[c]||0),x=r[c];x===114?k=" ".repeat($):x===99?$%2?(k=" ".repeat($/2+.5),b=" ".repeat($/2-.5)):(k=" ".repeat($/2),b=k):b=" ".repeat($)}t.delimiterStart!==!1&&!c&&y.push("|"),t.padding!==!1&&!(t.alignDelimiters===!1&&v==="")&&(t.delimiterStart!==!1||c)&&y.push(" "),t.alignDelimiters!==!1&&y.push(k),y.push(v),t.alignDelimiters!==!1&&y.push(b),t.padding!==!1&&y.push(" "),(t.delimiterEnd!==!1||c!==a-1)&&y.push("|")}p.push(t.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return p.join(` |
| 121 |
`)}function P2e(e){return e==null?"":String(e)}function L2e(e){return e.length}function V9(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function R2e(){return{enter:{table:D2e,tableData:F9,tableHeader:F9,tableRow:F2e},exit:{codeText:B2e,table:V2e,tableData:n_,tableHeader:n_,tableRow:n_}}}function D2e(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function V2e(e){this.exit(e),this.data.inTable=void 0}function F2e(e){this.enter({type:"tableRow",children:[]},e)}function n_(e){this.exit(e)}function F9(e){this.enter({type:"tableCell",children:[]},e)}function B2e(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,z2e));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function z2e(e,t){return t==="|"?t:e}function j2e(e){const t=e||{},n=t.tableCellPadding,o=t.tablePipeAlign,r=t.stringLength,s=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` |
| 122 |
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:f,table:i,tableCell:a,tableRow:l}};function i(p,h,m,y){return u(c(p,m,y),p.align)}function l(p,h,m,y){const v=d(p,m,y),k=u([v]);return k.slice(0,k.indexOf(` |
| 123 |
`))}function a(p,h,m,y){const v=m.enter("tableCell"),k=m.enter("phrasing"),b=m.containerPhrasing(p,{...y,before:s,after:s});return k(),v(),b}function u(p,h){return N2e(p,{align:h,alignDelimiters:o,padding:n,stringLength:r})}function c(p,h,m){const y=p.children;let v=-1;const k=[],b=h.enter("table");for(;++v<y.length;)k[v]=d(y[v],h,m);return b(),k}function d(p,h,m){const y=p.children;let v=-1;const k=[],b=h.enter("tableRow");for(;++v<y.length;)k[v]=a(y[v],p,h,m);return b(),k}function f(p,h,m){let y=aC.inlineCode(p,h,m);return m.stack.includes("tableCell")&&(y=y.replace(/\|/g,"\\$&")),y}}function H2e(){return{exit:{taskListCheckValueChecked:B9,taskListCheckValueUnchecked:B9,paragraph:W2e}}}function U2e(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:K2e}}}function B9(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function W2e(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const o=n.children[0];if(o&&o.type==="text"){const r=t.children;let s=-1,i;for(;++s<r.length;){const l=r[s];if(l.type==="paragraph"){i=l;break}}i===n&&(o.value=o.value.slice(1),o.value.length===0?n.children.shift():n.position&&o.position&&typeof o.position.start.offset=="number"&&(o.position.start.column++,o.position.start.offset++,n.position.start=Object.assign({},o.position.start)))}}this.exit(e)}function K2e(e,t,n,o){const r=e.children[0],s=typeof e.checked=="boolean"&&r&&r.type==="paragraph",i="["+(e.checked?"x":" ")+"] ",l=n.createTracker(o);s&&l.move(i);let a=aC.listItem(e,t,n,{...o,...l.current()});return s&&(a=a.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),a;function u(c){return c+i}}function q2e(){return[n2e(),h2e(),T2e(),R2e(),H2e()]}function G2e(e){return{extensions:[o2e(),m2e(),M2e(),j2e(e),U2e()]}}const Y2e={tokenize:t3e,partial:!0},XN={tokenize:n3e,partial:!0},QN={tokenize:o3e,partial:!0},eP={tokenize:r3e,partial:!0},Z2e={tokenize:s3e,partial:!0},tP={name:"wwwAutolink",tokenize:Q2e,previous:oP},nP={name:"protocolAutolink",tokenize:e3e,previous:rP},Ui={name:"emailAutolink",tokenize:X2e,previous:sP},ai={};function J2e(){return{text:ai}}let ga=48;for(;ga<123;)ai[ga]=Ui,ga++,ga===58?ga=65:ga===91&&(ga=97);ai[43]=Ui;ai[45]=Ui;ai[46]=Ui;ai[95]=Ui;ai[72]=[Ui,nP];ai[104]=[Ui,nP];ai[87]=[Ui,tP];ai[119]=[Ui,tP];function X2e(e,t,n){const o=this;let r,s;return i;function i(d){return!k2(d)||!sP.call(o,o.previous)||wk(o.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(d))}function l(d){return k2(d)?(e.consume(d),l):d===64?(e.consume(d),a):n(d)}function a(d){return d===46?e.check(Z2e,c,u)(d):d===45||d===95||Wo(d)?(s=!0,e.consume(d),a):c(d)}function u(d){return e.consume(d),r=!0,a}function c(d){return s&&r&&xo(o.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function Q2e(e,t,n){const o=this;return r;function r(i){return i!==87&&i!==119||!oP.call(o,o.previous)||wk(o.events)?n(i):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Y2e,e.attempt(XN,e.attempt(QN,s),n),n)(i))}function s(i){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(i)}}function e3e(e,t,n){const o=this;let r="",s=!1;return i;function i(d){return(d===72||d===104)&&rP.call(o,o.previous)&&!wk(o.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),r+=String.fromCodePoint(d),e.consume(d),l):n(d)}function l(d){if(xo(d)&&r.length<5)return r+=String.fromCodePoint(d),e.consume(d),l;if(d===58){const f=r.toLowerCase();if(f==="http"||f==="https")return e.consume(d),a}return n(d)}function a(d){return d===47?(e.consume(d),s?u:(s=!0,a)):n(d)}function u(d){return d===null||Gg(d)||nn(d)||hu(d)||sv(d)?n(d):e.attempt(XN,e.attempt(QN,c),n)(d)}function c(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function t3e(e,t,n){let o=0;return r;function r(i){return(i===87||i===119)&&o<3?(o++,e.consume(i),r):i===46&&o===3?(e.consume(i),s):n(i)}function s(i){return i===null?n(i):t(i)}}function n3e(e,t,n){let o,r,s;return i;function i(u){return u===46||u===95?e.check(eP,a,l)(u):u===null||nn(u)||hu(u)||u!==45&&sv(u)?a(u):(s=!0,e.consume(u),i)}function l(u){return u===95?o=!0:(r=o,o=void 0),e.consume(u),i}function a(u){return r||o||!s?n(u):t(u)}}function o3e(e,t){let n=0,o=0;return r;function r(i){return i===40?(n++,e.consume(i),r):i===41&&o<n?s(i):i===33||i===34||i===38||i===39||i===41||i===42||i===44||i===46||i===58||i===59||i===60||i===63||i===93||i===95||i===126?e.check(eP,t,s)(i):i===null||nn(i)||hu(i)?t(i):(e.consume(i),r)}function s(i){return i===41&&o++,e.consume(i),r}}function r3e(e,t,n){return o;function o(l){return l===33||l===34||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===63||l===95||l===126?(e.consume(l),o):l===38?(e.consume(l),s):l===93?(e.consume(l),r):l===60||l===null||nn(l)||hu(l)?t(l):n(l)}function r(l){return l===null||l===40||l===91||nn(l)||hu(l)?t(l):o(l)}function s(l){return xo(l)?i(l):n(l)}function i(l){return l===59?(e.consume(l),o):xo(l)?(e.consume(l),i):n(l)}}function s3e(e,t,n){return o;function o(s){return e.consume(s),r}function r(s){return Wo(s)?n(s):t(s)}}function oP(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||nn(e)}function rP(e){return!xo(e)}function sP(e){return!(e===47||k2(e))}function k2(e){return e===43||e===45||e===46||e===95||Wo(e)}function wk(e){let t=e.length,n=!1;for(;t--;){const o=e[t][1];if((o.type==="labelLink"||o.type==="labelImage")&&!o._balanced){n=!0;break}if(o._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const i3e={tokenize:h3e,partial:!0};function l3e(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:d3e,continuation:{tokenize:f3e},exit:p3e}},text:{91:{name:"gfmFootnoteCall",tokenize:c3e},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:a3e,resolveTo:u3e}}}}function a3e(e,t,n){const o=this;let r=o.events.length;const s=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let i;for(;r--;){const a=o.events[r][1];if(a.type==="labelImage"){i=a;break}if(a.type==="gfmFootnoteCall"||a.type==="labelLink"||a.type==="label"||a.type==="image"||a.type==="link")break}return l;function l(a){if(!i||!i._balanced)return n(a);const u=ds(o.sliceSerialize({start:i.end,end:o.now()}));return u.codePointAt(0)!==94||!s.includes(u.slice(1))?n(a):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),t(a))}}function u3e(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const o={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},r={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};r.end.column++,r.end.offset++,r.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},r.end),end:Object.assign({},e[e.length-1][1].start)},i={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},l=[e[n+1],e[n+2],["enter",o,t],e[n+3],e[n+4],["enter",r,t],["exit",r,t],["enter",s,t],["enter",i,t],["exit",i,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",o,t]];return e.splice(n,e.length-n+1,...l),e}function c3e(e,t,n){const o=this,r=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let s=0,i;return l;function l(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),a}function a(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(d){if(s>999||d===93&&!i||d===null||d===91||nn(d))return n(d);if(d===93){e.exit("chunkString");const f=e.exit("gfmFootnoteCallString");return r.includes(ds(o.sliceSerialize(f)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return nn(d)||(i=!0),s++,e.consume(d),d===92?c:u}function c(d){return d===91||d===92||d===93?(e.consume(d),s++,u):u(d)}}function d3e(e,t,n){const o=this,r=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let s,i=0,l;return a;function a(h){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(h){return h===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(h)}function c(h){if(i>999||h===93&&!l||h===null||h===91||nn(h))return n(h);if(h===93){e.exit("chunkString");const m=e.exit("gfmFootnoteDefinitionLabelString");return s=ds(o.sliceSerialize(m)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f}return nn(h)||(l=!0),i++,e.consume(h),h===92?d:c}function d(h){return h===91||h===92||h===93?(e.consume(h),i++,c):c(h)}function f(h){return h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),r.includes(s)||r.push(s),Bt(e,p,"gfmFootnoteDefinitionWhitespace")):n(h)}function p(h){return t(h)}}function f3e(e,t,n){return e.check(Eh,t,e.attempt(i3e,t,n))}function p3e(e){e.exit("gfmFootnoteDefinition")}function h3e(e,t,n){const o=this;return Bt(e,r,"gfmFootnoteDefinitionIndent",4+1);function r(s){const i=o.events[o.events.length-1];return i&&i[1].type==="gfmFootnoteDefinitionIndent"&&i[2].sliceSerialize(i[1],!0).length===4?t(s):n(s)}}function m3e(e){let n=(e||{}).singleTilde;const o={name:"strikethrough",tokenize:s,resolveAll:r};return n==null&&(n=!0),{text:{126:o},insideSpan:{null:[o]},attentionMarkers:{null:[126]}};function r(i,l){let a=-1;for(;++a<i.length;)if(i[a][0]==="enter"&&i[a][1].type==="strikethroughSequenceTemporary"&&i[a][1]._close){let u=a;for(;u--;)if(i[u][0]==="exit"&&i[u][1].type==="strikethroughSequenceTemporary"&&i[u][1]._open&&i[a][1].end.offset-i[a][1].start.offset===i[u][1].end.offset-i[u][1].start.offset){i[a][1].type="strikethroughSequence",i[u][1].type="strikethroughSequence";const c={type:"strikethrough",start:Object.assign({},i[u][1].start),end:Object.assign({},i[a][1].end)},d={type:"strikethroughText",start:Object.assign({},i[u][1].end),end:Object.assign({},i[a][1].start)},f=[["enter",c,l],["enter",i[u][1],l],["exit",i[u][1],l],["enter",d,l]],p=l.parser.constructs.insideSpan.null;p&&Rr(f,f.length,0,iv(p,i.slice(u+1,a),l)),Rr(f,f.length,0,[["exit",d,l],["enter",i[a][1],l],["exit",i[a][1],l],["exit",c,l]]),Rr(i,u-1,a-u+3,f),a=u+f.length-2;break}}for(a=-1;++a<i.length;)i[a][1].type==="strikethroughSequenceTemporary"&&(i[a][1].type="data");return i}function s(i,l,a){const u=this.previous,c=this.events;let d=0;return f;function f(h){return u===126&&c[c.length-1][1].type!=="characterEscape"?a(h):(i.enter("strikethroughSequenceTemporary"),p(h))}function p(h){const m=Yg(u);if(h===126)return d>1?a(h):(i.consume(h),d++,p);if(d<2&&!n)return a(h);const y=i.exit("strikethroughSequenceTemporary"),v=Yg(h);return y._open=!v||v===2&&!!m,y._close=!m||m===2&&!!v,l(h)}}}class g3e{constructor(){this.map=[]}add(t,n,o){v3e(this,t,n,o)}consume(t){if(this.map.sort(function(s,i){return s[0]-i[0]}),this.map.length===0)return;let n=this.map.length;const o=[];for(;n>0;)n-=1,o.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];o.push([...t]),t.length=0;let r=o.pop();for(;r;)t.push(...r),r=o.pop();this.map.length=0}}function v3e(e,t,n,o){let r=0;if(!(n===0&&o.length===0)){for(;r<e.map.length;){if(e.map[r][0]===t){e.map[r][1]+=n,e.map[r][2].push(...o);return}r+=1}e.map.push([t,n,o])}}function y3e(e,t){let n=!1;const o=[];for(;t<e.length;){const r=e[t];if(n){if(r[0]==="enter")r[1].type==="tableContent"&&o.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(r[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const s=o.length-1;o[s]=o[s]==="left"?"center":"right"}}else if(r[1].type==="tableDelimiterRow")break}else r[0]==="enter"&&r[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return o}function _3e(){return{flow:{null:{name:"table",tokenize:b3e,resolveAll:w3e}}}}function b3e(e,t,n){const o=this;let r=0,s=0,i;return l;function l(I){let V=o.events.length-1;for(;V>-1;){const Z=o.events[V][1].type;if(Z==="lineEnding"||Z==="linePrefix")V--;else break}const F=V>-1?o.events[V][1].type:null,Y=F==="tableHead"||F==="tableRow"?E:a;return Y===E&&o.parser.lazy[o.now().line]?n(I):Y(I)}function a(I){return e.enter("tableHead"),e.enter("tableRow"),u(I)}function u(I){return I===124||(i=!0,s+=1),c(I)}function c(I){return I===null?n(I):ft(I)?s>1?(s=0,o.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),p):n(I):Lt(I)?Bt(e,c,"whitespace")(I):(s+=1,i&&(i=!1,r+=1),I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),i=!0,c):(e.enter("data"),d(I)))}function d(I){return I===null||I===124||nn(I)?(e.exit("data"),c(I)):(e.consume(I),I===92?f:d)}function f(I){return I===92||I===124?(e.consume(I),d):d(I)}function p(I){return o.interrupt=!1,o.parser.lazy[o.now().line]?n(I):(e.enter("tableDelimiterRow"),i=!1,Lt(I)?Bt(e,h,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):h(I))}function h(I){return I===45||I===58?y(I):I===124?(i=!0,e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),m):x(I)}function m(I){return Lt(I)?Bt(e,y,"whitespace")(I):y(I)}function y(I){return I===58?(s+=1,i=!0,e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),v):I===45?(s+=1,v(I)):I===null||ft(I)?$(I):x(I)}function v(I){return I===45?(e.enter("tableDelimiterFiller"),k(I)):x(I)}function k(I){return I===45?(e.consume(I),k):I===58?(i=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),b):(e.exit("tableDelimiterFiller"),b(I))}function b(I){return Lt(I)?Bt(e,$,"whitespace")(I):$(I)}function $(I){return I===124?h(I):I===null||ft(I)?!i||r!==s?x(I):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(I)):x(I)}function x(I){return n(I)}function E(I){return e.enter("tableRow"),M(I)}function M(I){return I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),M):I===null||ft(I)?(e.exit("tableRow"),t(I)):Lt(I)?Bt(e,M,"whitespace")(I):(e.enter("data"),N(I))}function N(I){return I===null||I===124||nn(I)?(e.exit("data"),M(I)):(e.consume(I),I===92?P:N)}function P(I){return I===92||I===124?(e.consume(I),N):N(I)}}function w3e(e,t){let n=-1,o=!0,r=0,s=[0,0,0,0],i=[0,0,0,0],l=!1,a=0,u,c,d;const f=new g3e;for(;++n<e.length;){const p=e[n],h=p[1];p[0]==="enter"?h.type==="tableHead"?(l=!1,a!==0&&(z9(f,t,a,u,c),c=void 0,a=0),u={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},f.add(n,0,[["enter",u,t]])):h.type==="tableRow"||h.type==="tableDelimiterRow"?(o=!0,d=void 0,s=[0,0,0,0],i=[0,n+1,0,0],l&&(l=!1,c={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},f.add(n,0,[["enter",c,t]])),r=h.type==="tableDelimiterRow"?2:c?3:1):r&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")?(o=!1,i[2]===0&&(s[1]!==0&&(i[0]=i[1],d=Im(f,t,s,r,void 0,d),s=[0,0,0,0]),i[2]=n)):h.type==="tableCellDivider"&&(o?o=!1:(s[1]!==0&&(i[0]=i[1],d=Im(f,t,s,r,void 0,d)),s=i,i=[s[1],n,0,0])):h.type==="tableHead"?(l=!0,a=n):h.type==="tableRow"||h.type==="tableDelimiterRow"?(a=n,s[1]!==0?(i[0]=i[1],d=Im(f,t,s,r,n,d)):i[1]!==0&&(d=Im(f,t,i,r,n,d)),r=0):r&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")&&(i[3]=n)}for(a!==0&&z9(f,t,a,u,c),f.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=y3e(t.events,n))}return e}function Im(e,t,n,o,r,s){const i=o===1?"tableHeader":o===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(s.end=Object.assign({},rc(t.events,n[0])),e.add(n[0],0,[["exit",s,t]]));const a=rc(t.events,n[1]);if(s={type:i,start:Object.assign({},a),end:Object.assign({},a)},e.add(n[1],0,[["enter",s,t]]),n[2]!==0){const u=rc(t.events,n[2]),c=rc(t.events,n[3]),d={type:l,start:Object.assign({},u),end:Object.assign({},c)};if(e.add(n[2],0,[["enter",d,t]]),o!==2){const f=t.events[n[2]],p=t.events[n[3]];if(f[1].end=Object.assign({},p[1].end),f[1].type="chunkText",f[1].contentType="text",n[3]>n[2]+1){const h=n[2]+1,m=n[3]-n[2]-1;e.add(h,m,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return r!==void 0&&(s.end=Object.assign({},rc(t.events,r)),e.add(r,0,[["exit",s,t]]),s=void 0),s}function z9(e,t,n,o,r){const s=[],i=rc(t.events,n);r&&(r.end=Object.assign({},i),s.push(["exit",r,t])),o.end=Object.assign({},i),s.push(["exit",o,t]),e.add(n+1,0,s)}function rc(e,t){const n=e[t],o=n[0]==="enter"?"start":"end";return n[1][o]}const C3e={name:"tasklistCheck",tokenize:S3e};function k3e(){return{text:{91:C3e}}}function S3e(e,t,n){const o=this;return r;function r(a){return o.previous!==null||!o._gfmTasklistFirstContentOfListItem?n(a):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(a),e.exit("taskListCheckMarker"),s)}function s(a){return nn(a)?(e.enter("taskListCheckValueUnchecked"),e.consume(a),e.exit("taskListCheckValueUnchecked"),i):a===88||a===120?(e.enter("taskListCheckValueChecked"),e.consume(a),e.exit("taskListCheckValueChecked"),i):n(a)}function i(a){return a===93?(e.enter("taskListCheckMarker"),e.consume(a),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(a)}function l(a){return ft(a)?t(a):Lt(a)?e.check({tokenize:$3e},t,n)(a):n(a)}}function $3e(e,t,n){return Bt(e,o,"whitespace");function o(r){return r===null?n(r):t(r)}}function E3e(e){return vI([J2e(),l3e(),m3e(e),_3e(),k3e()])}const x3e={};function T3e(e){const t=this,n=e||x3e,o=t.data(),r=o.micromarkExtensions||(o.micromarkExtensions=[]),s=o.fromMarkdownExtensions||(o.fromMarkdownExtensions=[]),i=o.toMarkdownExtensions||(o.toMarkdownExtensions=[]);r.push(E3e(n)),s.push(q2e()),i.push(G2e(n))}function gt(e,t){return Object.assign(e,{meta:{package:"@milkdown/preset-gfm",...t}}),e}const Ck=Nh("strike_through");gt(Ck,{displayName:"Attr<strikethrough>",group:"Strikethrough"});const Rd=Ah("strike_through",e=>({parseDOM:[{tag:"del"},{style:"text-decoration",getAttrs:t=>t==="line-through"}],toDOM:t=>["del",e.get(Ck.key)(t)],parseMarkdown:{match:t=>t.type==="delete",runner:(t,n,o)=>{t.openMark(o),t.next(n.children),t.closeMark(o)}},toMarkdown:{match:t=>t.type.name==="strike_through",runner:(t,n)=>{t.withMark(n,"delete")}}}));gt(Rd.mark,{displayName:"MarkSchema<strikethrough>",group:"Strikethrough"});gt(Rd.ctx,{displayName:"MarkSchemaCtx<strikethrough>",group:"Strikethrough"});const Ev=It("ToggleStrikeThrough",e=>()=>mv(Rd.type(e)));gt(Ev,{displayName:"Command<ToggleStrikethrough>",group:"Strikethrough"});const iP=er(e=>Th(/~([^~]+)~$/,Rd.type(e)));gt(iP,{displayName:"InputRule<strikethrough>",group:"Strikethrough"});const kk=tr("strikeThroughKeymap",{ToggleStrikethrough:{shortcuts:"Mod-Alt-x",command:e=>{const t=e.get(Vt);return()=>t.call(Ev.key)}}});gt(kk.ctx,{displayName:"KeymapCtx<strikethrough>",group:"Strikethrough"});gt(kk.shortcuts,{displayName:"Keymap<strikethrough>",group:"Strikethrough"});const Rh=Q_e({tableGroup:"block",cellContent:"paragraph",cellAttributes:{alignment:{default:"left",getFromDOM:e=>e.style.textAlign||"left",setDOMAttr:(e,t)=>{t.style=`text-align: ${e||"left"}`}}}}),Dd=Xn("table",()=>({...Rh.table,content:"table_header_row table_row+",disableDropCursor:!0,parseMarkdown:{match:e=>e.type==="table",runner:(e,t,n)=>{const o=t.align,r=t.children.map((s,i)=>({...s,align:o,isHeader:i===0}));e.openNode(n),e.next(r),e.closeNode()}},toMarkdown:{match:e=>e.type.name==="table",runner:(e,t)=>{var n;const o=(n=t.content.firstChild)==null?void 0:n.content;if(!o)return;const r=[];o.forEach(s=>{r.push(s.attrs.alignment)}),e.openNode("table",void 0,{align:r}),e.next(t.content),e.closeNode()}}}));gt(Dd.node,{displayName:"NodeSchema<table>",group:"Table"});gt(Dd.ctx,{displayName:"NodeSchemaCtx<table>",group:"Table"});const xv=Xn("table_header_row",()=>({...Rh.table_row,disableDropCursor:!0,content:"(table_header)*",parseDOM:[{tag:"tr[data-is-header]"}],toDOM(){return["tr",{"data-is-header":!0},0]},parseMarkdown:{match:e=>!!(e.type==="tableRow"&&e.isHeader),runner:(e,t,n)=>{const o=t.align,r=t.children.map((s,i)=>({...s,align:o[i],isHeader:t.isHeader}));e.openNode(n),e.next(r),e.closeNode()}},toMarkdown:{match:e=>e.type.name==="table_header_row",runner:(e,t)=>{e.openNode("tableRow",void 0,{isHeader:!0}),e.next(t.content),e.closeNode()}}}));gt(xv.node,{displayName:"NodeSchema<tableHeaderRow>",group:"Table"});gt(xv.ctx,{displayName:"NodeSchemaCtx<tableHeaderRow>",group:"Table"});const Dh=Xn("table_row",()=>({...Rh.table_row,disableDropCursor:!0,content:"(table_cell)*",parseMarkdown:{match:e=>e.type==="tableRow",runner:(e,t,n)=>{const o=t.align,r=t.children.map((s,i)=>({...s,align:o[i]}));e.openNode(n),e.next(r),e.closeNode()}},toMarkdown:{match:e=>e.type.name==="table_row",runner:(e,t)=>{e.openNode("tableRow"),e.next(t.content),e.closeNode()}}}));gt(Dh.node,{displayName:"NodeSchema<tableRow>",group:"Table"});gt(Dh.ctx,{displayName:"NodeSchemaCtx<tableRow>",group:"Table"});const Vh=Xn("table_cell",()=>({...Rh.table_cell,disableDropCursor:!0,parseMarkdown:{match:e=>e.type==="tableCell"&&!e.isHeader,runner:(e,t,n)=>{const o=t.align;e.openNode(n,{alignment:o}).openNode(e.schema.nodes.paragraph).next(t.children).closeNode().closeNode()}},toMarkdown:{match:e=>e.type.name==="table_cell",runner:(e,t)=>{e.openNode("tableCell").next(t.content).closeNode()}}}));gt(Vh.node,{displayName:"NodeSchema<tableCell>",group:"Table"});gt(Vh.ctx,{displayName:"NodeSchemaCtx<tableCell>",group:"Table"});const Tv=Xn("table_header",()=>({...Rh.table_header,disableDropCursor:!0,parseMarkdown:{match:e=>e.type==="tableCell"&&!!e.isHeader,runner:(e,t,n)=>{const o=t.align;e.openNode(n,{alignment:o}),e.openNode(e.schema.nodes.paragraph),e.next(t.children),e.closeNode(),e.closeNode()}},toMarkdown:{match:e=>e.type.name==="table_header",runner:(e,t)=>{e.openNode("tableCell"),e.next(t.content),e.closeNode()}}}));gt(Tv.node,{displayName:"NodeSchema<tableHeader>",group:"Table"});gt(Tv.ctx,{displayName:"NodeSchemaCtx<tableHeader>",group:"Table"});function lP(e,t=3,n=3){const o=Array(n).fill(0).map(()=>Vh.type(e).createAndFill()),r=Array(n).fill(0).map(()=>Tv.type(e).createAndFill()),s=Array(t).fill(0).map((i,l)=>l===0?xv.type(e).create(null,r):Dh.type(e).create(null,o));return Dd.type(e).create(null,s)}function Fh(e){return gC(t=>t.type.spec.tableRole==="table")(e)}function sc(e,t){const n=Fh(t.$from);if(!n)return;const o=Xt.get(n.node);if(!(e<0||e>=o.width))return o.cellsInRect({left:e,right:e+1,top:0,bottom:o.height}).map(r=>{const s=n.node.nodeAt(r);if(!s)return;const i=r+n.start;return{pos:i,start:i+1,node:s}}).filter(r=>r!=null)}function ic(e,t){const n=Fh(t.$from);if(!n)return;const o=Xt.get(n.node);if(!(e<0||e>=o.height))return o.cellsInRect({left:0,right:o.width,top:e,bottom:e+1}).map(r=>{const s=n.node.nodeAt(r);if(!s)return;const i=r+n.start;return{pos:i,start:i+1,node:s}}).filter(r=>r!=null)}function M3e(e){const t=Fh(e.$from);if(!t)return;const n=Xt.get(t.node);return n.cellsInRect({left:0,right:n.width,top:0,bottom:n.height}).map(o=>{const r=t.node.nodeAt(o),s=o+t.start;return{pos:s,start:s+1,node:r}})}function O3e(e){const t=M3e(e.selection);if(t&&t[0]){const n=e.doc.resolve(t[0].pos),o=t[t.length-1];if(o){const r=e.doc.resolve(o.pos);return hv(e.setSelection(new hn(r,n)))}}return e}function aP(e,t,{map:n,tableStart:o,table:r},s){const i=Array(s).fill(0).reduce((a,u,c)=>a+r.child(c).nodeSize,o),l=Array(n.width).fill(0).map((a,u)=>{const c=r.nodeAt(n.map[u]);return Vh.type(e).createAndFill({alignment:c==null?void 0:c.attrs.alignment})});return t.insert(i,Dh.type(e).create(null,l)),t}function uP(e){return(t,n)=>o=>{n=n??o.selection.from;const r=o.doc.resolve(n),s=gC(a=>a.type.name==="table")(r),i=s?{node:s.node,from:s.start}:void 0,l=e==="row";if(i){const a=Xt.get(i.node);if(t>=0&&t<(l?a.height:a.width)){const u=a.positionAt(l?t:a.height-1,l?a.width-1:t,i.node),c=o.doc.resolve(i.from+u),d=l?hn.rowSelection:hn.colSelection,f=a.positionAt(l?t:0,l?0:t,i.node),p=o.doc.resolve(i.from+f);return hv(o.setSelection(d(c,p)))}}return o}}const I3e=uP("row"),A3e=uP("col");function j9(e){return e[0].map((t,n)=>e.map(o=>o[n]))}function cP(e,t){const n=[],o=Xt.get(e);for(let r=0;r<o.height;r++){const s=e.child(r),i=[];for(let l=0;l<o.width;l++){if(!t[r][l])continue;const a=o.map[r*o.width+l],u=t[r][l],c=e.nodeAt(a).type.createChecked(Object.assign({},u.attrs),u.content,u.marks);i.push(c)}n.push(s.type.createChecked(s.attrs,i,s.marks))}return e.type.createChecked(e.attrs,n,e.marks)}function dP(e){const t=Xt.get(e),n=[];for(let o=0;o<t.height;o++){const r=[],s={};for(let i=0;i<t.width;i++){const l=t.map[o*t.width+i],a=e.nodeAt(l),u=t.findCell(l);if(s[l]||u.top!==o){r.push(null);continue}s[l]=!0,r.push(a)}n.push(r)}return n}function fP(e,t,n,o){const r=t[0]>n[0]?-1:1,s=e.splice(t[0],t.length),i=s.length%2===0?1:0;let l;return o===-1&&r===1?l=n[0]-1:o===1&&r===-1?l=n[n.length-1]-i+1:l=r===-1?n[0]:n[n.length-1]-i,e.splice(l,0,...s),e}function N3e(e,t,n,o){let r=j9(dP(e.node));return r=fP(r,t,n,o),r=j9(r),cP(e.node,r)}function P3e(e,t,n,o){let r=dP(e.node);return r=fP(r,t,n,o),cP(e.node,r)}function H9(e,t){let n=e,o=e;for(let c=e;c>=0;c--){const d=sc(c,t.selection);d&&d.forEach(f=>{const p=f.node.attrs.colspan+c-1;p>=n&&(n=c),p>o&&(o=p)})}for(let c=e;c<=o;c++){const d=sc(c,t.selection);d&&d.forEach(f=>{const p=f.node.attrs.colspan+c-1;f.node.attrs.colspan>1&&p>o&&(o=p)})}const r=[];for(let c=n;c<=o;c++){const d=sc(c,t.selection);d&&d.length&&r.push(c)}n=r[0],o=r[r.length-1];const s=sc(n,t.selection),i=ic(0,t.selection),l=t.doc.resolve(s[s.length-1].pos);let a;for(let c=o;c>=n;c--){const d=sc(c,t.selection);if(d&&d.length){for(let f=i.length-1;f>=0;f--)if(i[f].pos===d[0].pos){a=d[0];break}if(a)break}}const u=t.doc.resolve(a.pos);return{$anchor:l,$head:u,indexes:r}}function U9(e,t){let n=e,o=e;for(let c=e;c>=0;c--)ic(c,t.selection).forEach(d=>{const f=d.node.attrs.rowspan+c-1;f>=n&&(n=c),f>o&&(o=f)});for(let c=e;c<=o;c++)ic(c,t.selection).forEach(d=>{const f=d.node.attrs.rowspan+c-1;d.node.attrs.rowspan>1&&f>o&&(o=f)});const r=[];for(let c=n;c<=o;c++){const d=ic(c,t.selection);d&&d.length&&r.push(c)}n=r[0],o=r[r.length-1];const s=ic(n,t.selection),i=sc(0,t.selection),l=t.doc.resolve(s[s.length-1].pos);let a;for(let c=o;c>=n;c--){const d=ic(c,t.selection);if(d&&d.length){for(let f=i.length-1;f>=0;f--)if(i[f].pos===d[0].pos){a=d[0];break}if(a)break}}const u=t.doc.resolve(a.pos);return{$anchor:l,$head:u,indexes:r}}function L3e(e){const{tr:t,origin:n,target:o,select:r=!0,pos:s}=e,i=s!=null?t.doc.resolve(s):t.selection.$from,l=Fh(i);if(!l)return t;const{indexes:a}=H9(n,t),{indexes:u}=H9(o,t);if(a.includes(o))return t;const c=N3e(l,a,u,0),d=hv(t).replaceWith(l.pos,l.pos+l.node.nodeSize,c);if(!r)return d;const f=Xt.get(c),p=l.start,h=o,m=f.positionAt(f.height-1,h,c),y=d.doc.resolve(p+m),v=hn.colSelection,k=f.positionAt(0,h,c),b=d.doc.resolve(p+k);return d.setSelection(v(y,b))}function R3e(e){const{tr:t,origin:n,target:o,select:r=!0,pos:s}=e,i=s!=null?t.doc.resolve(s):t.selection.$from,l=Fh(i);if(!l)return t;const{indexes:a}=U9(n,t),{indexes:u}=U9(o,t);if(a.includes(o))return t;const c=P3e(l,a,u,0),d=hv(t).replaceWith(l.pos,l.pos+l.node.nodeSize,c);if(!r)return d;const f=Xt.get(c),p=l.start,h=o,m=f.positionAt(h,f.width-1,c),y=d.doc.resolve(p+m),v=hn.rowSelection,k=f.positionAt(h,0,c),b=d.doc.resolve(p+k);return d.setSelection(v(y,b))}const Sk=It("GoToPrevTableCell",()=>()=>WN(-1));gt(Sk,{displayName:"Command<goToPrevTableCellCommand>",group:"Table"});const $k=It("GoToNextTableCell",()=>()=>WN(1));gt($k,{displayName:"Command<goToNextTableCellCommand>",group:"Table"});const Ek=It("ExitTable",e=>()=>(t,n)=>{if(!Zr(t))return!1;const{$head:o}=t.selection,r=Y0e(o,Dd.type(e));if(!r)return!1;const{to:s}=r,i=t.tr.replaceWith(s,s,Hi.type(e).createAndFill());return i.setSelection(bt.near(i.doc.resolve(s),1)).scrollIntoView(),n==null||n(i),!0});gt(Ek,{displayName:"Command<breakTableCommand>",group:"Table"});const pP=It("InsertTable",e=>({row:t,col:n}={})=>(o,r)=>{const{selection:s,tr:i}=o,{from:l}=s,a=lP(e,t,n),u=i.replaceSelectionWith(a),c=bt.findFrom(u.doc.resolve(l),1,!0);return c&&u.setSelection(c),r==null||r(u),!0});gt(pP,{displayName:"Command<insertTableCommand>",group:"Table"});const hP=It("MoveRow",()=>({from:e,to:t,pos:n}={})=>(o,r)=>{const{tr:s}=o;return!!(r!=null&&r(R3e({tr:s,origin:e??0,target:t??0,pos:n,select:!0})))});gt(hP,{displayName:"Command<moveRowCommand>",group:"Table"});const mP=It("MoveCol",()=>({from:e,to:t,pos:n}={})=>(o,r)=>{const{tr:s}=o;return!!(r!=null&&r(L3e({tr:s,origin:e??0,target:t??0,pos:n,select:!0})))});gt(mP,{displayName:"Command<moveColCommand>",group:"Table"});const gP=It("SelectRow",()=>(e={index:0})=>(t,n)=>{const{tr:o}=t;return!!(n!=null&&n(I3e(e.index,e.pos)(o)))});gt(gP,{displayName:"Command<selectRowCommand>",group:"Table"});const vP=It("SelectCol",()=>(e={index:0})=>(t,n)=>{const{tr:o}=t;return!!(n!=null&&n(A3e(e.index,e.pos)(o)))});gt(vP,{displayName:"Command<selectColCommand>",group:"Table"});const yP=It("SelectTable",()=>()=>(e,t)=>{const{tr:n}=e;return!!(t!=null&&t(O3e(n)))});gt(yP,{displayName:"Command<selectTableCommand>",group:"Table"});const _P=It("DeleteSelectedCells",()=>()=>(e,t)=>{const{selection:n}=e;if(!(n instanceof hn))return!1;const o=n.isRowSelection(),r=n.isColSelection();return o&&r?wbe(e,t):r?mbe(e,t):vbe(e,t)});gt(_P,{displayName:"Command<deleteSelectedCellsCommand>",group:"Table"});const bP=It("AddColBefore",()=>()=>fbe);gt(bP,{displayName:"Command<addColBeforeCommand>",group:"Table"});const wP=It("AddColAfter",()=>()=>pbe);gt(wP,{displayName:"Command<addColAfterCommand>",group:"Table"});const CP=It("AddRowBefore",e=>()=>(t,n)=>{if(!Zr(t))return!1;if(n){const o=ua(t);n(aP(e,t.tr,o,o.top))}return!0});gt(CP,{displayName:"Command<addRowBeforeCommand>",group:"Table"});const kP=It("AddRowAfter",e=>()=>(t,n)=>{if(!Zr(t))return!1;if(n){const o=ua(t);n(aP(e,t.tr,o,o.bottom))}return!0});gt(kP,{displayName:"Command<addRowAfterCommand>",group:"Table"});const SP=It("SetAlign",()=>(e="left")=>ybe("alignment",e));gt(SP,{displayName:"Command<setAlignCommand>",group:"Table"});const $P=er(e=>new Cr(/^\|(?<col>\d+)[xX](?<row>\d+)\|\s$/,(t,n,o,r)=>{var s,i;const l=t.doc.resolve(o);if(!l.node(-1).canReplaceWith(l.index(-1),l.indexAfter(-1),Dd.type(e)))return null;const a=lP(e,Number((s=n.groups)==null?void 0:s.row),Number((i=n.groups)==null?void 0:i.col)),u=t.tr.replaceRangeWith(o,r,a);return u.setSelection(ht.create(u.doc,o+3)).scrollIntoView()}));gt($P,{displayName:"InputRule<insertTableInputRule>",group:"Table"});const xk=tr("tableKeymap",{NextCell:{shortcuts:["Mod-]","Tab"],command:e=>{const t=e.get(Vt);return()=>t.call($k.key)}},PrevCell:{shortcuts:["Mod-[","Shift-Tab"],command:e=>{const t=e.get(Vt);return()=>t.call(Sk.key)}},ExitTable:{shortcuts:["Mod-Enter"],command:e=>{const t=e.get(Vt);return()=>t.call(Ek.key)}}});gt(xk.ctx,{displayName:"KeymapCtx<table>",group:"Table"});gt(xk.shortcuts,{displayName:"Keymap<table>",group:"Table"});const o_="footnote_definition",W9="footnoteDefinition",Tk=Xn("footnote_definition",()=>({group:"block",content:"block+",defining:!0,attrs:{label:{default:""}},parseDOM:[{tag:`dl[data-type="${o_}"]`,getAttrs:e=>{if(!(e instanceof HTMLElement))throw li(e);return{label:e.dataset.label}},contentElement:"dd"}],toDOM:e=>{const t=e.attrs.label;return["dl",{"data-label":t,"data-type":o_},["dt",t],["dd",0]]},parseMarkdown:{match:({type:e})=>e===W9,runner:(e,t,n)=>{e.openNode(n,{label:t.label}).next(t.children).closeNode()}},toMarkdown:{match:e=>e.type.name===o_,runner:(e,t)=>{e.openNode(W9,void 0,{label:t.attrs.label,identifier:t.attrs.label}).next(t.content).closeNode()}}}));gt(Tk.ctx,{displayName:"NodeSchemaCtx<footnodeDef>",group:"footnote"});gt(Tk.node,{displayName:"NodeSchema<footnodeDef>",group:"footnote"});const r_="footnote_reference",Mk=Xn("footnote_reference",()=>({group:"inline",inline:!0,atom:!0,attrs:{label:{default:""}},parseDOM:[{tag:`sup[data-type="${r_}"]`,getAttrs:e=>{if(!(e instanceof HTMLElement))throw li(e);return{label:e.dataset.label}}}],toDOM:e=>{const t=e.attrs.label;return["sup",{"data-label":t,"data-type":r_},t]},parseMarkdown:{match:({type:e})=>e==="footnoteReference",runner:(e,t,n)=>{e.addNode(n,{label:t.label})}},toMarkdown:{match:e=>e.type.name===r_,runner:(e,t)=>{e.addNode("footnoteReference",void 0,void 0,{label:t.attrs.label,identifier:t.attrs.label})}}}));gt(Mk.ctx,{displayName:"NodeSchemaCtx<footnodeRef>",group:"footnote"});gt(Mk.node,{displayName:"NodeSchema<footnodeRef>",group:"footnote"});const EP=ni.extendSchema(e=>t=>{const n=e(t);return{...n,attrs:{...n.attrs,checked:{default:null}},parseDOM:[{tag:'li[data-item-type="task"]',getAttrs:o=>{if(!(o instanceof HTMLElement))throw li(o);return{label:o.dataset.label,listType:o.dataset.listType,spread:o.dataset.spread,checked:o.dataset.checked?o.dataset.checked==="true":null}}},...(n==null?void 0:n.parseDOM)||[]],toDOM:o=>n.toDOM&&o.attrs.checked==null?n.toDOM(o):["li",{"data-item-type":"task","data-label":o.attrs.label,"data-list-type":o.attrs.listType,"data-spread":o.attrs.spread,"data-checked":o.attrs.checked},0],parseMarkdown:{match:({type:o})=>o==="listItem",runner:(o,r,s)=>{if(r.checked==null){n.parseMarkdown.runner(o,r,s);return}const i=r.label!=null?`${r.label}.`:"•",l=r.checked!=null?!!r.checked:null,a=r.label!=null?"ordered":"bullet",u=r.spread!=null?`${r.spread}`:"true";o.openNode(s,{label:i,listType:a,spread:u,checked:l}),o.next(r.children),o.closeNode()}},toMarkdown:{match:o=>o.type.name==="list_item",runner:(o,r)=>{if(r.attrs.checked==null){n.toMarkdown.runner(o,r);return}const s=r.attrs.label,i=r.attrs.listType,l=r.attrs.spread==="true",a=r.attrs.checked;o.openNode("listItem",void 0,{label:s,listType:i,spread:l,checked:a}),o.next(r.content),o.closeNode()}}}});gt(EP,{displayName:"NodeSchema<listItem>",group:"ListItem"});const xP=er(()=>new Cr(/^\[(?<checked>\s|x)\]\s$/,(e,t,n,o)=>{var r;const s=e.doc.resolve(n);let i=0,l=s.node(i);for(;l&&l.type.name!=="list_item";)i--,l=s.node(i);if(!l||l.attrs.checked!=null)return null;const a=((r=t.groups)==null?void 0:r.checked)==="x",u=s.before(i),c=e.tr;return c.deleteRange(n,o).setNodeMarkup(u,void 0,{...l.attrs,checked:a}),c}));gt(xP,{displayName:"InputRule<wrapInTaskListInputRule>",group:"ListItem"});const D3e=[kk,xk].flat(),V3e=[$P,xP],F3e=[iP],TP=ao(()=>Jbe);gt(TP,{displayName:"Prose<autoInsertSpanPlugin>",group:"Prose"});const B3e=ao(()=>Ibe({}));gt(B3e,{displayName:"Prose<columnResizingPlugin>",group:"Prose"});const MP=ao(()=>jbe({allowTableNodeSelection:!0}));gt(MP,{displayName:"Prose<tableEditingPlugin>",group:"Prose"});const Ok=Id("remarkGFM",()=>T3e);gt(Ok.plugin,{displayName:"Remark<remarkGFMPlugin>",group:"Remark"});gt(Ok.options,{displayName:"RemarkConfig<remarkGFMPlugin>",group:"Remark"});const z3e=new wn("MILKDOWN_KEEP_TABLE_ALIGN_PLUGIN");function j3e(e,t){let n=0;return t.forEach((o,r,s)=>{o===e&&(n=s)}),n}const OP=ao(()=>new On({key:z3e,appendTransaction:(e,t,n)=>{let o;const r=(s,i)=>{if(o||(o=n.tr),s.type.name!=="table_cell")return;const l=n.doc.resolve(i),a=l.node(l.depth),u=l.node(l.depth-1).firstChild;if(!u)return;const c=j3e(s,a),d=u.maybeChild(c);if(!d)return;const f=d.attrs.alignment,p=s.attrs.alignment;f!==p&&o.setNodeMarkup(i,void 0,{...s.attrs,alignment:f})};return t.doc!==n.doc&&n.doc.descendants(r),o}}));gt(OP,{displayName:"Prose<keepTableAlignPlugin>",group:"Prose"});const H3e=[OP,TP,Ok,MP].flat(),U3e=[EP,Dd,xv,Dh,Tv,Vh,Tk,Mk,Ck,Rd].flat(),W3e=[$k,Sk,Ek,pP,hP,mP,gP,vP,yP,_P,CP,kP,bP,wP,SP,Ev],K3e=[U3e,V3e,F3e,D3e,W3e,H3e].flat();var r0=200,Zn=function(){};Zn.prototype.append=function(t){return t.length?(t=Zn.from(t),!this.length&&t||t.length<r0&&this.leafAppend(t)||this.length<r0&&t.leafPrepend(this)||this.appendInner(t)):this};Zn.prototype.prepend=function(t){return t.length?Zn.from(t).append(this):this};Zn.prototype.appendInner=function(t){return new q3e(this,t)};Zn.prototype.slice=function(t,n){return t===void 0&&(t=0),n===void 0&&(n=this.length),t>=n?Zn.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,n))};Zn.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)};Zn.prototype.forEach=function(t,n,o){n===void 0&&(n=0),o===void 0&&(o=this.length),n<=o?this.forEachInner(t,n,o,0):this.forEachInvertedInner(t,n,o,0)};Zn.prototype.map=function(t,n,o){n===void 0&&(n=0),o===void 0&&(o=this.length);var r=[];return this.forEach(function(s,i){return r.push(t(s,i))},n,o),r};Zn.from=function(t){return t instanceof Zn?t:t&&t.length?new IP(t):Zn.empty};var IP=function(e){function t(o){e.call(this),this.values=o}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(r,s){return r==0&&s==this.length?this:new t(this.values.slice(r,s))},t.prototype.getInner=function(r){return this.values[r]},t.prototype.forEachInner=function(r,s,i,l){for(var a=s;a<i;a++)if(r(this.values[a],l+a)===!1)return!1},t.prototype.forEachInvertedInner=function(r,s,i,l){for(var a=s-1;a>=i;a--)if(r(this.values[a],l+a)===!1)return!1},t.prototype.leafAppend=function(r){if(this.length+r.length<=r0)return new t(this.values.concat(r.flatten()))},t.prototype.leafPrepend=function(r){if(this.length+r.length<=r0)return new t(r.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(Zn);Zn.empty=new IP([]);var q3e=function(e){function t(n,o){e.call(this),this.left=n,this.right=o,this.length=n.length+o.length,this.depth=Math.max(n.depth,o.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(o){return o<this.left.length?this.left.get(o):this.right.get(o-this.left.length)},t.prototype.forEachInner=function(o,r,s,i){var l=this.left.length;if(r<l&&this.left.forEachInner(o,r,Math.min(s,l),i)===!1||s>l&&this.right.forEachInner(o,Math.max(r-l,0),Math.min(this.length,s)-l,i+l)===!1)return!1},t.prototype.forEachInvertedInner=function(o,r,s,i){var l=this.left.length;if(r>l&&this.right.forEachInvertedInner(o,r-l,Math.max(s,l)-l,i+l)===!1||s<l&&this.left.forEachInvertedInner(o,Math.min(r,l),s,i)===!1)return!1},t.prototype.sliceInner=function(o,r){if(o==0&&r==this.length)return this;var s=this.left.length;return r<=s?this.left.slice(o,r):o>=s?this.right.slice(o-s,r-s):this.left.slice(o,s).append(this.right.slice(0,r-s))},t.prototype.leafAppend=function(o){var r=this.right.leafAppend(o);if(r)return new t(this.left,r)},t.prototype.leafPrepend=function(o){var r=this.left.leafPrepend(o);if(r)return new t(r,this.right)},t.prototype.appendInner=function(o){return this.left.depth>=Math.max(this.right.depth,o.depth)+1?new t(this.left,new t(this.right,o)):new t(this,o)},t}(Zn);const G3e=500;class ls{constructor(t,n){this.items=t,this.eventCount=n}popEvent(t,n){if(this.eventCount==0)return null;let o=this.items.length;for(;;o--)if(this.items.get(o-1).selection){--o;break}let r,s;n&&(r=this.remapping(o,this.items.length),s=r.maps.length);let i=t.tr,l,a,u=[],c=[];return this.items.forEach((d,f)=>{if(!d.step){r||(r=this.remapping(o,f+1),s=r.maps.length),s--,c.push(d);return}if(r){c.push(new Fs(d.map));let p=d.step.map(r.slice(s)),h;p&&i.maybeStep(p).doc&&(h=i.mapping.maps[i.mapping.maps.length-1],u.push(new Fs(h,void 0,void 0,u.length+c.length))),s--,h&&r.appendMap(h,s)}else i.maybeStep(d.step);if(d.selection)return l=r?d.selection.map(r.slice(s)):d.selection,a=new ls(this.items.slice(0,o).append(c.reverse().concat(u)),this.eventCount-1),!1},this.items.length,0),{remaining:a,transform:i,selection:l}}addTransform(t,n,o,r){let s=[],i=this.eventCount,l=this.items,a=!r&&l.length?l.get(l.length-1):null;for(let c=0;c<t.steps.length;c++){let d=t.steps[c].invert(t.docs[c]),f=new Fs(t.mapping.maps[c],d,n),p;(p=a&&a.merge(f))&&(f=p,c?s.pop():l=l.slice(0,l.length-1)),s.push(f),n&&(i++,n=void 0),r||(a=f)}let u=i-o.depth;return u>Z3e&&(l=Y3e(l,u),i-=u),new ls(l.append(s),i)}remapping(t,n){let o=new Ec;return this.items.forEach((r,s)=>{let i=r.mirrorOffset!=null&&s-r.mirrorOffset>=t?o.maps.length-r.mirrorOffset:void 0;o.appendMap(r.map,i)},t,n),o}addMaps(t){return this.eventCount==0?this:new ls(this.items.append(t.map(n=>new Fs(n))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let o=[],r=Math.max(0,this.items.length-n),s=t.mapping,i=t.steps.length,l=this.eventCount;this.items.forEach(f=>{f.selection&&l--},r);let a=n;this.items.forEach(f=>{let p=s.getMirror(--a);if(p==null)return;i=Math.min(i,p);let h=s.maps[p];if(f.step){let m=t.steps[p].invert(t.docs[p]),y=f.selection&&f.selection.map(s.slice(a+1,p));y&&l++,o.push(new Fs(h,m,y))}else o.push(new Fs(h))},r);let u=[];for(let f=n;f<i;f++)u.push(new Fs(s.maps[f]));let c=this.items.slice(0,r).append(u).append(o),d=new ls(c,l);return d.emptyItemCount()>G3e&&(d=d.compress(this.items.length-o.length)),d}emptyItemCount(){let t=0;return this.items.forEach(n=>{n.step||t++}),t}compress(t=this.items.length){let n=this.remapping(0,t),o=n.maps.length,r=[],s=0;return this.items.forEach((i,l)=>{if(l>=t)r.push(i),i.selection&&s++;else if(i.step){let a=i.step.map(n.slice(o)),u=a&&a.getMap();if(o--,u&&n.appendMap(u,o),a){let c=i.selection&&i.selection.map(n.slice(o));c&&s++;let d=new Fs(u.invert(),a,c),f,p=r.length-1;(f=r.length&&r[p].merge(d))?r[p]=f:r.push(d)}}else i.map&&o--},this.items.length,0),new ls(Zn.from(r.reverse()),s)}}ls.empty=new ls(Zn.empty,0);function Y3e(e,t){let n;return e.forEach((o,r)=>{if(o.selection&&t--==0)return n=r,!1}),e.slice(n)}class Fs{constructor(t,n,o,r){this.map=t,this.step=n,this.selection=o,this.mirrorOffset=r}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new Fs(n.getMap().invert(),n,this.selection)}}}class Cl{constructor(t,n,o,r,s){this.done=t,this.undone=n,this.prevRanges=o,this.prevTime=r,this.prevComposition=s}}const Z3e=20;function J3e(e,t,n,o){let r=n.getMeta(nu),s;if(r)return r.historyState;n.getMeta(ewe)&&(e=new Cl(e.done,e.undone,null,0,-1));let i=n.getMeta("appendedTransaction");if(n.steps.length==0)return e;if(i&&i.getMeta(nu))return i.getMeta(nu).redo?new Cl(e.done.addTransform(n,void 0,o,z1(t)),e.undone,K9(n.mapping.maps),e.prevTime,e.prevComposition):new Cl(e.done,e.undone.addTransform(n,void 0,o,z1(t)),null,e.prevTime,e.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(i&&i.getMeta("addToHistory")===!1)){let l=n.getMeta("composition"),a=e.prevTime==0||!i&&e.prevComposition!=l&&(e.prevTime<(n.time||0)-o.newGroupDelay||!X3e(n,e.prevRanges)),u=i?s_(e.prevRanges,n.mapping):K9(n.mapping.maps);return new Cl(e.done.addTransform(n,a?t.selection.getBookmark():void 0,o,z1(t)),ls.empty,u,n.time,l??e.prevComposition)}else return(s=n.getMeta("rebased"))?new Cl(e.done.rebased(n,s),e.undone.rebased(n,s),s_(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new Cl(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),s_(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function X3e(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((o,r)=>{for(let s=0;s<t.length;s+=2)o<=t[s+1]&&r>=t[s]&&(n=!0)}),n}function K9(e){let t=[];for(let n=e.length-1;n>=0&&t.length==0;n--)e[n].forEach((o,r,s,i)=>t.push(s,i));return t}function s_(e,t){if(!e)return null;let n=[];for(let o=0;o<e.length;o+=2){let r=t.map(e[o],1),s=t.map(e[o+1],-1);r<=s&&n.push(r,s)}return n}function Q3e(e,t,n){let o=z1(t),r=nu.get(t).spec.config,s=(n?e.undone:e.done).popEvent(t,o);if(!s)return null;let i=s.selection.resolve(s.transform.doc),l=(n?e.done:e.undone).addTransform(s.transform,t.selection.getBookmark(),r,o),a=new Cl(n?l:s.remaining,n?s.remaining:l,null,0,-1);return s.transform.setSelection(i).setMeta(nu,{redo:n,historyState:a})}let i_=!1,q9=null;function z1(e){let t=e.plugins;if(q9!=t){i_=!1,q9=t;for(let n=0;n<t.length;n++)if(t[n].spec.historyPreserveItems){i_=!0;break}}return i_}const nu=new wn("history"),ewe=new wn("closeHistory");function twe(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new On({key:nu,state:{init(){return new Cl(ls.empty,ls.empty,null,0,-1)},apply(t,n,o){return J3e(n,o,t,e)}},config:e,props:{handleDOMEvents:{beforeinput(t,n){let o=n.inputType,r=o=="historyUndo"?NP:o=="historyRedo"?PP:null;return r?(n.preventDefault(),r(t.state,t.dispatch)):!1}}}})}function AP(e,t){return(n,o)=>{let r=nu.getState(n);if(!r||(e?r.undone:r.done).eventCount==0)return!1;if(o){let s=Q3e(r,n,e);s&&o(t?s.scrollIntoView():s)}return!0}}const NP=AP(!1,!0),PP=AP(!0,!0);function Vd(e,t){return Object.assign(e,{meta:{package:"@milkdown/plugin-history",...t}}),e}const Ik=It("Undo",()=>()=>NP);Vd(Ik,{displayName:"Command<undo>"});const Ak=It("Redo",()=>()=>PP);Vd(Ak,{displayName:"Command<redo>"});const Nk=Pn({},"historyProviderConfig");Vd(Nk,{displayName:"Ctx<historyProviderConfig>"});const LP=ao(e=>twe(e.get(Nk.key)));Vd(LP,{displayName:"Ctx<historyProviderPlugin>"});const Pk=tr("historyKeymap",{Undo:{shortcuts:"Mod-z",command:e=>{const t=e.get(Vt);return()=>t.call(Ik.key)}},Redo:{shortcuts:["Mod-y","Shift-Mod-z"],command:e=>{const t=e.get(Vt);return()=>t.call(Ak.key)}}});Vd(Pk.ctx,{displayName:"KeymapCtx<history>"});Vd(Pk.shortcuts,{displayName:"Keymap<history>"});const nwe=[Nk,LP,Pk,Ik,Ak].flat();function S2(e){if(!e)return!1;if(Array.isArray(e))return e.length>1?!1:S2(e[0]);const t=e.content;return t?S2(t):e.type==="text"}function owe(e){if(e.content.childCount===1){const t=e.content.firstChild;if((t==null?void 0:t.type.name)==="text"&&t.marks.length===0)return t;if((t==null?void 0:t.type.name)==="paragraph"&&t.childCount===1){const n=t.firstChild;if((n==null?void 0:n.type.name)==="text"&&n.marks.length===0)return n}}return!1}const RP=ao(e=>{const t=e.get(fs);e.update(ap,o=>({...o,editable:o.editable??(()=>!0)}));const n=new wn("MILKDOWN_CLIPBOARD");return new On({key:n,props:{handlePaste:(o,r)=>{var s,i;const l=e.get(Ic),a=(i=(s=o.props).editable)==null?void 0:i.call(s,o.state),{clipboardData:u}=r;if(!a||!u||o.state.selection.$from.node().type.spec.code)return!1;const c=u.getData("text/plain"),d=u.getData("vscode-editor-data");if(d){const v=JSON.parse(d),k=v==null?void 0:v.mode;if(c&&k){const{tr:b}=o.state,$=Z0e("code_block",t);return b.replaceSelectionWith($.create({language:k})).setSelection(ht.near(b.doc.resolve(Math.max(0,b.selection.from-2)))).insertText(c.replace(/\r\n?/g,` |
| 124 |
`)),o.dispatch(b),!0}}const f=u.getData("text/html");if(f.length===0&&c.length===0)return!1;const p=pu.fromSchema(t);let h;if(f.length===0){const v=l(c);if(!v||typeof v=="string")return!1;h=ra.fromSchema(t).serializeFragment(v.content)}else{const v=document.createElement("template");v.innerHTML=f,h=v.content.cloneNode(!0),v.remove()}const m=p.parseSlice(h),y=owe(m);return y?(o.dispatch(o.state.tr.replaceSelectionWith(y,!0)),!0):(o.dispatch(o.state.tr.replaceSelection(m)),!0)},clipboardTextSerializer:o=>{const r=e.get(Ac);if(S2(o.content.toJSON()))return o.content.textBetween(0,o.content.size,` |
| 125 |
|
| 126 |
`);const s=t.topNodeType.createAndFill(void 0,o.content);return s?r(s):""}}})});RP.meta={displayName:"Prose<clipboard>",package:"@milkdown/plugin-clipboard"};const Lk=Pn({shouldAppend:e=>!(!e||["heading","paragraph"].includes(e.type.name)),getNode:e=>e.schema.nodes.paragraph.create()},"trailingConfig");Lk.meta={package:"@milkdown/plugin-trailing",displayName:"Ctx<trailingConfig>"};const DP=ao(e=>{const t=new wn("MILKDOWN_TRAILING"),{shouldAppend:n,getNode:o}=e.get(Lk.key),r=new On({key:t,state:{init:(s,i)=>{const l=i.tr.doc.lastChild;return n(l,i)},apply:(s,i,l,a)=>{if(!s.docChanged)return i;const u=s.doc.lastChild;return n(u,a)}},appendTransaction:(s,i,l)=>{const{doc:a,tr:u}=l,c=o==null?void 0:o(l),d=r.getState(l),f=a.content.size;if(!(!d||!c))return u.insert(f,c)}});return r});DP.meta={package:"@milkdown/plugin-trailing",displayName:"Prose<trailing>"};const rwe=[Lk,DP];var VP=(e=>(e.CodeMirror="code-mirror",e.LinkTooltip="link-tooltip",e.Cursor="cursor",e.BlockEdit="block-edit",e.Toolbar="toolbar",e.Placeholder="placeholder",e))(VP||{});const swe={cursor:!0,"link-tooltip":!0,"block-edit":!0,placeholder:!0,toolbar:!0,"code-mirror":!0};async function iwe(e,t,n){switch(e){case"link-tooltip":{const{defineFeature:o}=await Zd(()=>Promise.resolve().then(()=>SFe),void 0);return o(t,n)}case"block-edit":{const{defineFeature:o}=await Zd(()=>Promise.resolve().then(()=>aBe),void 0);return o(t,n)}case"placeholder":{const{defineFeature:o}=await Zd(()=>Promise.resolve().then(()=>fBe),void 0);return o(t,n)}case"toolbar":{const{defineFeature:o}=await Zd(()=>Promise.resolve().then(()=>mBe),void 0);return o(t,n)}}}const lwe=jt([],"FeaturesCtx");function awe(e){return t=>{t.inject(lwe,e)}}var uwe="Expected a function",G9=0/0,cwe="[object Symbol]",dwe=/^\s+|\s+$/g,fwe=/^[-+]0x[0-9a-f]+$/i,pwe=/^0b[01]+$/i,hwe=/^0o[0-7]+$/i,mwe=parseInt,gwe=typeof Nn=="object"&&Nn&&Nn.Object===Object&&Nn,vwe=typeof self=="object"&&self&&self.Object===Object&&self,ywe=gwe||vwe||Function("return this")(),_we=Object.prototype,bwe=_we.toString,wwe=Math.max,Cwe=Math.min,l_=function(){return ywe.Date.now()};function kwe(e,t,n){var o,r,s,i,l,a,u=0,c=!1,d=!1,f=!0;if(typeof e!="function")throw new TypeError(uwe);t=Y9(t)||0,$2(n)&&(c=!!n.leading,d="maxWait"in n,s=d?wwe(Y9(n.maxWait)||0,t):s,f="trailing"in n?!!n.trailing:f);function p(E){var M=o,N=r;return o=r=void 0,u=E,i=e.apply(N,M),i}function h(E){return u=E,l=setTimeout(v,t),c?p(E):i}function m(E){var M=E-a,N=E-u,P=t-M;return d?Cwe(P,s-N):P}function y(E){var M=E-a,N=E-u;return a===void 0||M>=t||M<0||d&&N>=s}function v(){var E=l_();if(y(E))return k(E);l=setTimeout(v,m(E))}function k(E){return l=void 0,f&&o?p(E):(o=r=void 0,i)}function b(){l!==void 0&&clearTimeout(l),u=0,o=a=r=l=void 0}function $(){return l===void 0?i:k(l_())}function x(){var E=l_(),M=y(E);if(o=arguments,r=this,a=E,M){if(l===void 0)return h(a);if(d)return l=setTimeout(v,t),p(a)}return l===void 0&&(l=setTimeout(v,t)),i}return x.cancel=b,x.flush=$,x}function $2(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Swe(e){return!!e&&typeof e=="object"}function $we(e){return typeof e=="symbol"||Swe(e)&&bwe.call(e)==cwe}function Y9(e){if(typeof e=="number")return e;if($we(e))return G9;if($2(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=$2(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(dwe,"");var n=pwe.test(e);return n||hwe.test(e)?mwe(e.slice(2),n?2:8):fwe.test(e)?G9:+e}var Ewe=kwe;const Mv=_o(Ewe);let FP=class{constructor(){this.beforeMountedListeners=[],this.mountedListeners=[],this.updatedListeners=[],this.markdownUpdatedListeners=[],this.blurListeners=[],this.focusListeners=[],this.destroyListeners=[],this.beforeMount=t=>(this.beforeMountedListeners.push(t),this),this.mounted=t=>(this.mountedListeners.push(t),this),this.updated=t=>(this.updatedListeners.push(t),this)}get listeners(){return{beforeMount:this.beforeMountedListeners,mounted:this.mountedListeners,updated:this.updatedListeners,markdownUpdated:this.markdownUpdatedListeners,blur:this.blurListeners,focus:this.focusListeners,destroy:this.destroyListeners}}markdownUpdated(t){return this.markdownUpdatedListeners.push(t),this}blur(t){return this.blurListeners.push(t),this}focus(t){return this.focusListeners.push(t),this}destroy(t){return this.destroyListeners.push(t),this}};const E2=jt(new FP,"listener"),xwe=new wn("MILKDOWN_LISTENER"),BP=e=>(e.inject(E2,new FP),async()=>{await e.wait(eu);const t=e.get(E2),{listeners:n}=t;n.beforeMount.forEach(l=>l(e)),await e.wait(lp);const o=e.get(Ac);let r=null,s=null;const i=new On({key:xwe,view:()=>({destroy:()=>{n.destroy.forEach(l=>l(e))}}),props:{handleDOMEvents:{focus:()=>(n.focus.forEach(l=>l(e)),!1),blur:()=>(n.blur.forEach(l=>l(e)),!1)}},state:{init:(l,a)=>{r=a.doc,s=o(a.doc)},apply:l=>!l.docChanged||l.getMeta("addToHistory")===!1?void 0:Mv(()=>{const{doc:a}=l;if(n.updated.length>0&&r&&!r.eq(a)&&n.updated.forEach(u=>{u(e,a,r)}),n.markdownUpdated.length>0&&r&&!r.eq(a)){const u=o(a);n.markdownUpdated.forEach(c=>{c(e,u,s)}),s=u}r=a},200)()}});e.update(bs,l=>l.concat(i)),await e.wait(N1),n.mounted.forEach(l=>l(e))});BP.meta={package:"@milkdown/plugin-listener",displayName:"Listener"};function Twe(e){return new Promise(t=>{const n=new FileReader;n.addEventListener("load",()=>{t({alt:e.name,src:n.result})},!1),n.readAsDataURL(e)})}const Mwe=async(e,t)=>{const n=[];for(let r=0;r<e.length;r++){const s=e.item(r);s&&s.type.includes("image")&&n.push(s)}const{image:o}=t.nodes;if(!o)throw GO("image");return(await Promise.all(n.map(r=>Twe(r)))).map(({alt:r,src:s})=>o.createAndFill({src:s,alt:r}))},Nc=Pn({uploader:Mwe,enableHtmlFileUploader:!1,uploadWidgetFactory:(e,t)=>{const n=document.createElement("span");return n.textContent="Upload in progress...",Un.widget(e,n,t)}},"uploadConfig");Nc.meta={package:"@milkdown/plugin-upload",displayName:"Ctx<uploadConfig>"};const zP=ao(e=>{const t=new wn("MILKDOWN_UPLOAD"),n=(r,s)=>{var i;const l=t.getState(r);if(!l)return-1;const a=l.find(void 0,void 0,u=>u.id===s);return a.length?((i=a[0])==null?void 0:i.from)??-1:-1},o=(r,s,i)=>{var l;if(!i||i.length<=0)return!1;const a=Symbol("upload symbol"),u=e.get(fs),{tr:c}=r.state,d=s instanceof DragEvent?((l=r.posAtCoords({left:s.clientX,top:s.clientY}))==null?void 0:l.pos)??c.selection.from:c.selection.from;r.dispatch(c.setMeta(t,{add:{id:a,pos:d}}));const{uploader:f}=e.get(Nc.key);return f(i,u).then(p=>{const h=n(r.state,a);h<0||r.dispatch(r.state.tr.replaceWith(h,h,p).setMeta(t,{remove:{id:a}}))}).catch(p=>{console.error(p)}),!0};return new On({key:t,state:{init(){return an.empty},apply(r,s){const i=s.map(r.mapping,r.doc),l=r.getMeta(this);if(!l)return i;if(l.add){const{uploadWidgetFactory:a}=e.get(Nc.key),u=a(l.add.pos,{id:l.add.id});return i.add(r.doc,[u])}if(l.remove){const a=i.find(void 0,void 0,u=>u.id===l.remove.id);return i.remove(a)}return i}},props:{decorations(r){return this.getState(r)},handlePaste:(r,s)=>{var i,l;const{enableHtmlFileUploader:a}=e.get(Nc.key);return!(s instanceof ClipboardEvent)||!a&&(i=s.clipboardData)!=null&&i.getData("text/html")?!1:o(r,s,(l=s.clipboardData)==null?void 0:l.files)},handleDrop:(r,s)=>{var i;return s instanceof DragEvent?o(r,s,(i=s.dataTransfer)==null?void 0:i.files):!1}}})});zP.meta={package:"@milkdown/plugin-upload",displayName:"Prose<upload>"};const Owe=[Nc,zP];var jP=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Is=(e,t,n)=>(jP(e,t,"read from private field"),n?n.call(e):t.get(e)),Am=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Nm=(e,t,n,o)=>(jP(e,t,"write to private field"),o?o.call(e,n):t.set(e,n),n),vi,Cf,j1,H1;class HP{constructor({root:t,features:n={},featureConfigs:o={},defaultValue:r="",onUpdate:s=l=>{},handleCommonActions:i=(l,a)=>{}}){Am(this,vi,void 0),Am(this,Cf,void 0),Am(this,j1,void 0),Am(this,H1,!0);const l=Object.entries({...swe,...n}).filter(([,u])=>u).map(([u])=>u);Nm(this,j1,(typeof t=="string"?document.querySelector(t):t)??document.body),Nm(this,vi,f_e.make().config(awe(l)).config(u=>{u.set(P1,Is(this,j1)),u.set(O1,r),u.set(ap,{editable:()=>Is(this,H1)})}).config(u=>{const c=async(d,f)=>await i("handleFileUpload",{ctx:u,files:d,schema:f});u.update(Nc.key,d=>({...d,uploader:c}))}).config(u=>{const c=u.get(E2);c.markdownUpdated((d,f,p)=>{f!==p&&s(f)}),c.updated((d,f,p)=>{i("editor_updated",d)})}).use(G_e).use(nwe).use(rwe).use(RP).use(BP).use(Owe).use(K3e));const a=[];l.forEach(u=>{const c=o[u];a.push(iwe(u,Is(this,vi),c))}),Nm(this,Cf,Promise.all(a))}async create(){return await Is(this,Cf),Is(this,vi).create()}async destroy(){return await Is(this,Cf),Is(this,vi).destroy()}get editor(){return Is(this,vi)}setReadonly(t){return Nm(this,H1,!t),this}getMarkdown(){return Is(this,vi).action(y_e())}getEditor(){return Is(this,vi)}destroyEditor(){this.destroy()}}vi=new WeakMap;Cf=new WeakMap;j1=new WeakMap;H1=new WeakMap;HP.Feature=VP;const Iwe=Symbol("editorInfoCtxKey"),Awe=Q({name:"MilkdownProvider",setup:(e,{slots:t})=>{const n=q(null),o=q(void 0),r=q(void 0),s=q(!0);return wt(Iwe,{loading:s,dom:n,editor:r,editorFactory:o}),()=>{var i;return w(de,null,[(i=t.default)==null?void 0:i.call(t)])}}});var Nwe=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},UP=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},x2=(e,t,n)=>(Nwe(e,t,"access private method"),n),U1,T2;let Pwe=class{constructor({node:t,view:n,getPos:o,decorations:r,innerDecorations:s,options:i}){UP(this,U1),this.selected=!1,this.selectNode=()=>{var l,a;this.selected=!0,(a=(l=this.options).selectNode)==null||a.call(l)},this.deselectNode=()=>{var l,a;this.selected=!1,(a=(l=this.options).deselectNode)==null||a.call(l)},this.shouldUpdate=l=>!(l.type!==this.node.type||l.sameMarkup(this.node)&&l.content.eq(this.node.content)),this.update=(l,a,u)=>{var c,d;const f=this.options.update;let p;return f&&(p=f(l,a,u)),typeof p!="boolean"&&(p=this.shouldUpdate(l)),this.node=l,this.decorations=a,this.innerDecorations=u,p&&((d=(c=this.options).onUpdate)==null||d.call(c)),p},this.shouldIgnoreMutation=l=>!this.dom||!this.contentDOM||this.node.isLeaf||this.node.isAtom?!0:l.type==="selection"?!1:this.contentDOM===l.target&&l.type==="attributes"?!0:!this.contentDOM.contains(l.target),this.ignoreMutation=l=>{if(!this.dom||!this.contentDOM)return!0;let a;const u=this.options.ignoreMutation;return u&&(a=u(l)),typeof a!="boolean"&&(a=this.shouldIgnoreMutation(l)),a},this.destroy=()=>{var l,a,u;(a=(l=this.options).destroy)==null||a.call(l),this.dom.remove(),(u=this.contentDOM)==null||u.remove()},this.setAttrs=l=>{const{dispatch:a,state:u}=this.view,c=this.getPos();if(typeof c=="number")return a(u.tr.setNodeMarkup(c,void 0,{...this.node.attrs,...l}))},this.node=t,this.view=n,this.getPos=o,this.decorations=r,this.innerDecorations=s,this.options=i,this.dom=this.createDOM(i.as),this.contentDOM=t.isLeaf?null:this.createContentDOM(i.contentAs),this.dom.setAttribute("data-node-view-root","true"),this.contentDOM&&(this.contentDOM.setAttribute("data-node-view-content","true"),this.contentDOM.style.whiteSpace="inherit"),this.setSelection=i.setSelection,this.stopEvent=i.stopEvent}createDOM(t){return x2(this,U1,T2).call(this,t)}createContentDOM(t){return x2(this,U1,T2).call(this,t)}get component(){return this.options.component}};U1=new WeakSet,T2=function(e){const{node:t}=this;return e==null?document.createElement(t.isInline?"span":"div"):e instanceof HTMLElement?e:e instanceof Function?e(t):document.createElement(e)};let Lwe=class{constructor(t){this.view=t.view,this.options=t.options}get component(){return this.options.component}get root(){var t,n;let o=(n=(t=this.options).root)==null?void 0:n.call(t,this.view.dom);return o||(o=this.view.dom.parentElement??document.body),o}update(t,n){var o,r;this.view=t,this.prevState=n,(r=(o=this.options).update)==null||r.call(o,t,n)}destroy(){var t,n;(n=(t=this.options).destroy)==null||n.call(t)}};var M2,WP;let Rwe=class{constructor({pos:t,spec:n,options:o}){UP(this,M2),this.pos=t,this.options=o,this.spec=n,this.dom=x2(this,M2,WP).call(this,o.as),this.dom.setAttribute("data-widget-view-root","true")}bind(t,n){this.view=t,this.getPos=n}get component(){return this.options.component}};M2=new WeakSet,WP=function(e){return e instanceof HTMLElement?e:document.createElement(e)};let Rk=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,n)=>(n&=63,n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n>62?t+="-":t+="_",t),"");var Dwe=Object.defineProperty,Vwe=(e,t,n)=>t in e?Dwe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Nr=(e,t,n)=>(Vwe(e,typeof t!="symbol"?t+"":t,n),n);const Fwe=Symbol("[ProsemirrorAdapter]nodeViewContext"),Bwe=Symbol("[ProsemirrorAdapter]useNodeViewFactory");let zwe=class extends Pwe{constructor(){super(...arguments),Nr(this,"key",Rk()),Nr(this,"context",{contentRef:t=>{t&&t instanceof HTMLElement&&this.contentDOM&&t.firstChild!==this.contentDOM&&t.appendChild(this.contentDOM)},view:this.view,getPos:this.getPos,setAttrs:this.setAttrs,node:An(this.node),selected:An(this.selected),decorations:An(this.decorations),innerDecorations:An(this.innerDecorations)}),Nr(this,"updateContext",()=>{Object.entries({node:this.node,selected:this.selected,decorations:this.decorations,innerDecorations:this.innerDecorations}).forEach(([t,n])=>{const o=this.context[t];o.value!==n&&(o.value=n)})}),Nr(this,"render",()=>{const t=this.component;return Ai(Q({name:"ProsemirrorNodeView",setup:()=>(wt(Fwe,this.context),()=>w(qr,{key:this.key,to:this.dom},{default:()=>[w(t,null,null)]}))}))})}};const jwe=(e,t)=>n=>(o,r,s,i,l)=>{const a=new zwe({node:o,view:r,getPos:s,decorations:i,innerDecorations:l,options:{...n,onUpdate(){var u;(u=n.onUpdate)==null||u.call(n),a.updateContext()},selectNode(){var u;(u=n.selectNode)==null||u.call(n),a.updateContext()},deselectNode(){var u;(u=n.deselectNode)==null||u.call(n),a.updateContext()},destroy(){var u;(u=n.destroy)==null||u.call(n),t(a)}}});return e(a),a},Hwe=Symbol("[ProsemirrorAdapter]nodeViewContext"),Uwe=Symbol("[ProsemirrorAdapter]usePluginViewFactory");let Wwe=class extends Lwe{constructor(){super(...arguments),Nr(this,"key",Rk()),Nr(this,"context",{view:An(this.view),prevState:An(this.prevState)}),Nr(this,"updateContext",()=>{Object.entries({view:this.view,prevState:this.prevState}).forEach(([t,n])=>{const o=this.context[t];if(t==="view"){const r=Object.assign(Object.create(Object.getPrototypeOf(n)),n);o.value=r;return}o.value=n})}),Nr(this,"render",()=>{const t=this.component;return Ai(Q({name:"ProsemirrorNodeView",setup:()=>(wt(Hwe,this.context),()=>w(qr,{key:this.key,to:this.root},{default:()=>[w(t,null,null)]}))}))})}};const Kwe=(e,t)=>n=>o=>{const r=new Wwe({view:o,options:{...n,update:(s,i)=>{var l;(l=n.update)==null||l.call(n,s,i),r.updateContext()},destroy:()=>{var s;(s=n.destroy)==null||s.call(n),t(r)}}});return e(r),r},qwe=()=>{const e=q({}),t=at(),n=Ai({});return yd(()=>{n.updater=()=>{t==null||t.update()}}),ri(()=>{n.updater=void 0}),{portals:e,renderVueRenderer:o=>{var r;e.value[o.key]=o.render(),(r=n.updater)==null||r.call(n)},removeVueRenderer:o=>{delete e.value[o.key]}}},Gwe=Symbol("[ProsemirrorAdapter]widgetViewContext"),Ywe=Symbol("[ProsemirrorAdapter]useWidgetViewFactory");class Zwe extends Rwe{constructor(){super(...arguments),Nr(this,"key",Rk()),Nr(this,"context",{view:this.view,getPos:this.getPos,spec:this.spec}),Nr(this,"updateContext",()=>{Object.assign(this.context,{view:this.view,getPos:this.getPos,spec:this.spec})}),Nr(this,"render",()=>{const t=this.component;return Ai(Q({name:"ProsemirrorWidgetView",setup:()=>(wt(Gwe,this.context),()=>w(qr,{key:this.key,to:this.dom},{default:()=>[w(t,null,null)]}))}))})}}const Jwe=(e,t)=>n=>(o,r={})=>{const s=new Zwe({pos:o,options:n}),i={...r,destroy:l=>{var a;(a=r.destroy)==null||a.call(r,l),t(s)}};return s.spec=i,Un.widget(o,(l,a)=>(s.bind(l,a),s.updateContext(),e(s),s.dom),i)},Xwe=Q({name:"ProsemirrorAdapterProvider",setup:(e,{slots:t})=>{const{portals:n,renderVueRenderer:o,removeVueRenderer:r}=qwe(),s=jwe(o,r),i=Kwe(o,r),l=Jwe(o,r);return wt(Bwe,s),wt(Uwe,i),wt(Ywe,l),()=>{var a;return w(de,null,[(a=t.default)==null?void 0:a.call(t),Object.values(n.value).map(u=>lt(u))])}}}),Qwe={name:"CrepeEditor",emits:["update:modelValue","handleMediaUpload","editorCreated"],props:{modelValue:{type:String,default:""},placeholder:{type:String,default:""},autofocus:{type:Boolean,default:!1},mentionQuery:{type:Object,default:()=>({})},autofocus_changed:{type:Boolean,default:!1},disable_mention:{type:Boolean,default:!1},disable_media:{type:Boolean,default:!1},defaultMentions:{type:Array,default:()=>[]},hasEveyoneMention:{type:Boolean,default:!1}},components:{MilkdownProvider:Awe,ProsemirrorAdapterProvider:Xwe},data(){return{editor:null,currentContent:"",showMentionPop:!1,currentMentionSearch:"",mentionResults:[],justReplaced:!1,searchingMention:!1}},watch:{autofocus_changed(e){e&&this.focusOnEditor()}},methods:{updateContent(e){this.editor.action(t=>{const n=t.get(bn),{state:o}=n,{from:r}=o.selection,s=e,i=o.tr.insertText(s,r),l=r+s.length,a=i.setSelection(ht.create(i.doc,l));n.dispatch(a),n.focus()})},initEditor(){const e=this,t=new HP({root:this.$refs.crepe_editor_vue,defaultValue:this.modelValue,featureConfigs:{placeholder:{text:this.placeholder||this.$t("Type your message here!"),mode:"doc"}},onUpdate(n){e.$emit("update:modelValue",n),e.currentContent=n},async handleCommonActions(n,o){if(n==="editor_updated"){if(e.disable_mention)return!1;e.checkforMention(o)}else if(n="handleFileUpload")return e.disable_media?[]:await e.handleFileUpload(o)}});t.create().then(()=>{this.focusOnEditor(),this.$emit("editorCreated"),this.editor=t.getEditor()})},focusOnEditor(){if(!this.autofocus)return;const e=this.$refs.crepe_editor_vue;if(e.querySelector(".ProseMirror")){let t=e.querySelector(".ProseMirror");if(t.focus(),t.hasChildNodes()){let n=window.getSelection(),o=document.createRange(),r=t.childElementCount>0?t.lastChild:t;o.setStart(r,1),o.setEnd(r,1),n.removeAllRanges(),n.addRange(o)}}},checkforMention(e){if(!this.currentContent.includes("@")||this.justReplaced){this.showMentionPop=!1,this.currentMentionSearch="";return}const n=e.get(bn),{state:o}=n,{selection:r}=o;if(!r)return;const i=o.doc.textBetween(0,r.to," ").match(/@([\w-_]+)$/);if(!i){this.showMentionPop=!1,this.currentMentionSearch="";return}let l=i[1];if(!l||l.length<3){if(this.defaultMentions&&this.defaultMentions.length){let a=l.toLowerCase(),u=this.defaultMentions.filter(c=>c.username.toLowerCase().includes(a)||c.display_name.toLowerCase().includes(a));u.length&&(this.currentMentionSearch=l,this.mentionResults=u,this.showMentionPop=!0)}return}if(this.currentMentionSearch&&(this.currentMentionSearch=l,this.searchingMention))return!1;if(l=="everyone"&&this.isAdmin()){this.mentionResults=[{username:"everyone",display_name:this.$t("Tag Everyone")}],this.showMentionPop=!0;return}this.searchingMention=!0,this.currentMentionSearch=l,this.$get("members",{mention:this.currentMentionSearch,...this.mentionQuery}).then(a=>{this.mentionResults=a.members.data,this.showMentionPop=!0}).finally(()=>{this.searchingMention=!1})},addMention(e){this.disable_mention||(this.currentContent=this.currentContent.replace("@"+this.currentMentionSearch,e+" "),this.editor.action(__e(this.currentContent)),this.focusOnEditor(),this.showMentionPop=!1,this.currentMentionSearch="",this.justReplaced=!0,setTimeout(()=>{this.justReplaced=!1},2e3))},async handleFileUpload(e){const t=e.files;for(let n=0;n<t.length;n++){const o=t.item(n);o&&o.type.includes("image")&&this.$emit("handleMediaUpload",o)}return[]}},mounted(){this.initEditor()},beforeUnmount(){this.editor&&this.editor.destroy()}},eCe={style:{position:"relative"},class:"fcom_md_editor"},tCe={ref:"crepe_editor_vue",class:"crepe-editor feed_md_content fcom_md_seditor_wrapper"},nCe={class:"fcom_mention_pop_wrap"},oCe=_("span",{style:{}},null,-1),rCe={key:0},sCe={key:0},iCe=["onClick"],lCe=["src"],aCe={key:1},uCe={key:0};function cCe(e,t,n,o,r,s){const i=ee("ProsemirrorAdapterProvider"),l=ee("MilkdownProvider"),a=bo;return C(),T(de,null,[w(l,null,{default:S(()=>[w(i,null,{default:S(()=>[_("div",eCe,[_("div",tCe,null,512)])]),_:1})]),_:1}),_("div",nCe,[w(a,{"popper-class":"fcom_mention_pop",ref:"mentionPopoverRef",placement:"bottom",visible:r.showMentionPop,width:300,persistent:!1},{reference:S(()=>[oCe]),default:S(()=>[r.justReplaced?z("",!0):(C(),T("div",rCe,[r.mentionResults.length?(C(),T("ul",sCe,[(C(!0),T(de,null,nt(r.mentionResults,u=>(C(),T("li",{key:u.user_id,onClick:c=>s.addMention("@"+u.username)},[u.avatar?(C(),T("img",{key:0,alt:"",src:u.avatar},null,8,lCe)):z("",!0),_("span",null,O(u.display_name)+" (@"+O(u.username)+")",1)],8,iCe))),128))])):r.searchingMention?z("",!0):(C(),T("div",aCe,[_("p",null,[ne(O(e.$t("No results found. Please search by username"))+" ",1),e.isAdmin()&&n.hasEveyoneMention?(C(),T("span",uCe,O(e.$t("You can use @everyone to tag everyone.")),1)):z("",!0)])]))]))]),_:1},8,["visible"])])],64)}const Dk=Be(Qwe,[["render",cCe]]),dCe={name:"FComColorPicker",components:{InfoFilled:V0},props:["modelValue","label","help_msg"],emits:["update:modelValue","change"],data(){return{color:this.modelValue}},watch:{color(e){this.$emit("update:modelValue",e),this.$emit("change",e)}},methods:{showColorPicker(){this.$refs.colorPicker.show()}}},fCe={class:"fcom_color_item"};function pCe(e,t,n,o,r,s){const i=Z0,l=ee("InfoFilled"),a=Ie,u=ea;return C(),T("div",fCe,[w(i,{predefine:e.appVars.suggestedColors,ref:"colorPicker",onActiveChange:t[0]||(t[0]=c=>{r.color=c}),modelValue:r.color,"onUpdate:modelValue":t[1]||(t[1]=c=>r.color=c)},null,8,["predefine","modelValue"]),_("label",{style:{cursor:"pointer"},class:"fcom_color_label",onClick:t[2]||(t[2]=(...c)=>s.showColorPicker&&s.showColorPicker(...c))},O(n.label),1),n.help_msg?(C(),H(u,{key:0,content:n.help_msg,placement:"right"},{default:S(()=>[w(a,{class:"fcom_tip"},{default:S(()=>[w(l)]),_:1})]),_:1},8,["content"])):z("",!0)])}const hCe=Be(dCe,[["render",pCe]]),mCe={name:"AuthMeta",components:{BgImageUpload:KO,CrepeEditor:Dk,FComColorPicker:hCe},props:["currentTab","settings"],data(){return{editing:!1,editTab:"content",editingField:null}},watch:{currentTab(){this.editTab="content",this.editing=!1,this.editingField=null}},computed:{getLabel(){return e=>({banner:this.$t("Banner"),form:this.$t("Form")})[e]||this.$t("Banner")},getFieldIcon(){return e=>({banner:"Picture",form:"Memo",fields:"Tickets"})[e.type]||"Picture"},sortedFields(){return Object.values(this.settings).sort((e,t)=>e.position==="left"?-1:t.position==="left"?1:0)},isBannerField(){return this.editingField.type=="banner"},isFormField(){return this.editingField.type=="form"}},methods:{toggleHidden(e){e.hidden=!e.hidden},updateField(e){this.editing=!0,this.editingField=e},backToFields(){this.editing=!1,this.editingField=null},togglePosition(){var t,n;const e=(t=this.settings.banner)==null?void 0:t.position;this.settings.banner.position=(n=this.settings.form)==null?void 0:n.position,this.settings.form.position=e},handlePhotoUpload(e){this.editingField.background_image=e}}},gCe={key:0,class:"fcom_lockscreen_meta"},vCe={class:"fcom_meta_section lockscreen_meta"},yCe={key:0,class:"fcom_description"},_Ce={key:1,class:"fcom_description"},bCe={class:"fcom_meta_section lockscreen_meta"},wCe={key:0,class:"fcom_meta_label"},CCe={key:1,class:"fcom_meta_label"},kCe={class:"fcom_meta_content"},SCe={class:"fcom_meta_block"},$Ce={class:"fcom_block_label"},ECe={class:"fcom_meta_sorting"},xCe={class:"fcom_block_action"},TCe={key:1,class:"fcom_lockscreen_meta"},MCe={class:"fcom_edit_title"},OCe={class:"fcom_edit_content"};function ICe(e,t,n,o,r,s){const i=Ie,l=ee("Top"),a=ee("Bottom"),u=ee("EditPen"),c=ee("Hide"),d=ee("View"),f=ee("Back"),p=ee("BgImageUpload"),h=Mn,m=$t,y=ee("crepe-editor"),v=Tn,k=tC,b=ee("FComColorPicker"),$=eC;return r.editing?(C(),T("div",TCe,[_("div",MCe,[w(i,{onClick:s.backToFields},{default:S(()=>[w(f)]),_:1},8,["onClick"]),_("p",null,O(r.editingField.label),1)]),_("div",OCe,[s.isBannerField||s.isFormField?(C(),H($,{key:0,modelValue:r.editTab,"onUpdate:modelValue":t[12]||(t[12]=x=>r.editTab=x)},{default:S(()=>[w(k,{label:e.$t("Content"),name:"content"},{default:S(()=>[w(v,{onSubmit:t[4]||(t[4]=Ze(x=>e.doNothing(),["prevent"])),"label-position":"top",class:"fcom_form_container"},{default:S(()=>[s.isBannerField?(C(),H(h,{key:0,label:e.$t("Logo"),class:"fcom_bg_image"},{default:S(()=>[w(p,{modelValue:r.editingField.logo,"onUpdate:modelValue":t[0]||(t[0]=x=>r.editingField.logo=x),can_remove:!0},null,8,["modelValue"])]),_:1},8,["label"])):z("",!0),w(h,{label:e.$t("Title")},{default:S(()=>[w(m,{modelValue:r.editingField.title,"onUpdate:modelValue":t[1]||(t[1]=x=>r.editingField.title=x),placeholder:e.$t("Title")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),w(h,{label:e.$t("Description")},{default:S(()=>[w(y,{modelValue:r.editingField.description,"onUpdate:modelValue":t[2]||(t[2]=x=>r.editingField.description=x)},null,8,["modelValue"])]),_:1},8,["label"]),s.isFormField?(C(),H(h,{key:1,label:e.$t("Button Label")},{default:S(()=>[w(m,{modelValue:r.editingField.button_label,"onUpdate:modelValue":t[3]||(t[3]=x=>r.editingField.button_label=x),placeholder:e.$t("Button Label")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])):z("",!0)]),_:1})]),_:1},8,["label"]),w(k,{label:e.$t("Design"),name:"design"},{default:S(()=>[w(v,{onSubmit:t[11]||(t[11]=Ze(x=>e.doNothing(),["prevent"])),"label-position":"top",class:"fcom_form_container"},{default:S(()=>[w(h,{label:e.$t("Background Image"),class:"fcom_bg_image"},{default:S(()=>[w(p,{modelValue:r.editingField.background_image,"onUpdate:modelValue":t[5]||(t[5]=x=>r.editingField.background_image=x),can_remove:!0},null,8,["modelValue"])]),_:1},8,["label"]),w(b,{help_msg:e.$t("The main background color of the form"),label:e.$t("Background Color"),modelValue:r.editingField.background_color,"onUpdate:modelValue":t[6]||(t[6]=x=>r.editingField.background_color=x)},null,8,["help_msg","label","modelValue"]),w(b,{help_msg:e.$t("The title color of the form"),label:e.$t("Title Color"),modelValue:r.editingField.title_color,"onUpdate:modelValue":t[7]||(t[7]=x=>r.editingField.title_color=x)},null,8,["help_msg","label","modelValue"]),w(b,{help_msg:e.$t("The text color of the form"),label:e.$t("Text Color"),modelValue:r.editingField.text_color,"onUpdate:modelValue":t[8]||(t[8]=x=>r.editingField.text_color=x)},null,8,["help_msg","label","modelValue"]),s.isFormField?(C(),H(b,{key:0,help_msg:e.$t("The button text color of the form"),label:e.$t("Button Text Color"),modelValue:r.editingField.button_label_color,"onUpdate:modelValue":t[9]||(t[9]=x=>r.editingField.button_label_color=x)},null,8,["help_msg","label","modelValue"])):z("",!0),s.isFormField?(C(),H(b,{key:1,help_msg:e.$t("The button background color of the form"),label:e.$t("Button Background"),modelValue:r.editingField.button_color,"onUpdate:modelValue":t[10]||(t[10]=x=>r.editingField.button_color=x)},null,8,["help_msg","label","modelValue"])):z("",!0)]),_:1})]),_:1},8,["label"])]),_:1},8,["modelValue"])):z("",!0)])])):(C(),T("div",gCe,[_("div",vCe,[n.currentTab=="login"?(C(),T("div",yCe,[_("p",null,O(e.$t("Configure the appearance and behavior of your login form.")),1)])):z("",!0),n.currentTab=="signup"?(C(),T("div",_Ce,[_("p",null,O(e.$t("Configure the appearance and behavior of your signup form.")),1)])):z("",!0)]),_("div",bCe,[n.currentTab=="login"?(C(),T("div",wCe,O(e.$t("Customize Login")),1)):z("",!0),n.currentTab=="signup"?(C(),T("div",CCe,O(e.$t("Customize Sign Up")),1)):z("",!0),_("div",kCe,[_("ul",SCe,[(C(!0),T(de,null,nt(s.sortedFields,x=>(C(),T("li",{class:D(["fcom_block_list",{block_hidden:x.hidden}])},[_("div",$Ce,[w(i,{class:"fcom_el_icon"},{default:S(()=>[(C(),H(Pt(s.getFieldIcon(x))))]),_:2},1024),_("p",null,O(s.getLabel(x.type)),1)]),_("div",ECe,[w(i,{onClick:s.togglePosition},{default:S(()=>[w(l)]),_:1},8,["onClick"]),w(i,{onClick:s.togglePosition},{default:S(()=>[w(a)]),_:1},8,["onClick"])]),_("div",xCe,[w(i,{onClick:E=>s.updateField(x)},{default:S(()=>[w(u)]),_:2},1032,["onClick"]),x.type=="banner"?(C(),T(de,{key:0},[x.hidden?(C(),H(i,{key:0,onClick:E=>s.toggleHidden(x)},{default:S(()=>[w(c)]),_:2},1032,["onClick"])):(C(),H(i,{key:1,onClick:E=>s.toggleHidden(x)},{default:S(()=>[w(d)]),_:2},1032,["onClick"]))],64)):z("",!0)])],2))),256))])])])]))}const ACe=Be(mCe,[["render",ICe]]),NCe={name:"AuthEditor",props:["currentTab","savingCount","authSettings"],components:{AuthMeta:ACe},data(){return{settings:this.authSettings[this.currentTab]}},watch:{currentTab(){this.settings=this.authSettings[this.currentTab]},savingCount(){this.saveSettings()}},computed:{contentStyles(){var e;return{flexDirection:((e=this.settings.banner)==null?void 0:e.position)=="left"?"row":"row-reverse"}},backgroundStyles(){return e=>({backgroundSize:"cover",backgroundImage:`url(${e==null?void 0:e.background_image})`,backgroundColor:e==null?void 0:e.background_color})},titleStyles(){return e=>({color:e==null?void 0:e.title_color})},descriptionStyles(){return e=>({color:e==null?void 0:e.text_color})},buttonStyles(){return e=>({backgroundColor:e==null?void 0:e.button_color,color:e==null?void 0:e.button_label_color})}},methods:{updateTitle(e,t){t.title=e.target.innerText},updateButtonLabel(e,t){t.button_label=e.target.innerText},saveSettings(){this.saving=!0,this.$post("admin/auth-settings",{settings:this.authSettings}).then(e=>{this.$notify.success(e.message)}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})}}},PCe={class:"fcom_auth_content"},LCe={key:0,class:"fcom_auth_image"},RCe=["src","alt"],DCe={class:"fcom_auth_title"},VCe={key:1,class:"fcom_auth_description"},FCe=["innerHTML"],BCe={class:"fcom_auth_content form_content"},zCe={class:"fcom_auth_form_header"},jCe={class:"fcom_auth_title"},HCe={key:0,class:"fcom_auth_description"},UCe=["innerHTML"];function WCe(e,t,n,o,r,s){const i=ee("auth-meta"),l=J0,a=$t,u=Mn,c=En,d=Tn,f=ut,p=Ed;return C(),T(de,null,[w(l,{class:"fcom_full_editor_side lockscreen_editor auth_editor",width:"300px"},{default:S(()=>[he(e.$slots,"before_meta"),w(i,{currentTab:n.currentTab,settings:r.settings},null,8,["currentTab","settings"])]),_:3}),w(p,{class:"fcom_full_editor_main lockscreen_editor auth_editor"},{default:S(()=>{var h,m,y,v,k,b,$,x,E;return[_("div",{class:"fcom_editor_content",style:Ye(s.contentStyles)},[(h=r.settings.banner)!=null&&h.hidden?z("",!0):(C(),T("div",{key:0,class:"fcom_auth_wrap",style:Ye(s.backgroundStyles(r.settings.banner))},[_("div",PCe,[(m=r.settings.banner)!=null&&m.logo?(C(),T("div",LCe,[_("img",{src:(y=r.settings.banner)==null?void 0:y.logo,alt:(v=r.settings.banner)==null?void 0:v.title},null,8,RCe)])):z("",!0),_("div",DCe,[_("h2",{style:Ye(s.titleStyles(r.settings.banner)),contenteditable:"true",onInput:t[0]||(t[0]=M=>s.updateTitle(M,r.settings.banner))},O((k=r.settings.banner)==null?void 0:k.title),37)]),(b=r.settings.banner)!=null&&b.description?(C(),T("div",VCe,[_("p",{innerHTML:r.settings.banner.description},null,8,FCe)])):z("",!0)])],4)),_("div",{class:"fcom_auth_wrap",style:Ye(s.backgroundStyles(r.settings.form))},[_("div",BCe,[_("div",zCe,[_("div",jCe,[_("h2",{style:Ye(s.titleStyles(r.settings.form)),contenteditable:"true",onInput:t[1]||(t[1]=M=>s.updateTitle(M,r.settings.form))},O(($=r.settings.form)==null?void 0:$.title),37)]),(x=r.settings.form)!=null&&x.description?(C(),T("div",HCe,[_("p",{innerHTML:r.settings.form.description},null,8,UCe)])):z("",!0)]),(E=r.settings.form)!=null&&E.fields?(C(),H(d,{key:0,"label-position":"top",class:"fcom_auth_form"},{default:S(()=>[(C(!0),T(de,null,nt(r.settings.form.fields,M=>(C(),T("div",{key:M.name},[["text","email","number","textarea","password"].includes(M.type)?(C(),H(u,{key:0,label:M.label},{default:S(()=>[w(a,{type:M.type,placeholder:M.placeholder},null,8,["type","placeholder"])]),_:2},1032,["label"])):z("",!0),M.type=="inline_checkbox"?(C(),H(u,{key:1},{default:S(()=>[w(c,null,{default:S(()=>[ne(O(M.inline_label),1)]),_:2},1024)]),_:2},1024)):z("",!0)]))),128))]),_:1})):z("",!0),w(f,{style:Ye(s.buttonStyles(r.settings.form)),contenteditable:"true",onInput:t[2]||(t[2]=M=>s.updateButtonLabel(M,r.settings.form))},{default:S(()=>{var M;return[ne(O((M=r.settings.form)==null?void 0:M.button_label),1)]}),_:1},8,["style"])])],4)],4)]}),_:1})],64)}const KCe=Be(NCe,[["render",WCe]]),qCe={name:"AuthSettings",emits:["completed"],components:{AuthEditor:KCe},data(){return{saving:!1,loading:!1,currentTab:"login",savingCount:0,authSettings:{login:[],signup:[]}}},methods:{getSettings(){this.loading=!0,this.$get("admin/auth-settings").then(e=>{this.authSettings=e.settings}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})},saveSettings(){this.savingCount++}},mounted(){this.getSettings()}},GCe={class:"fcom_full_editor"},YCe={class:"fcom_full_editor_header"},ZCe={class:"fcom_editor_menu object_menu"},JCe={class:"fcom_space_menu_ul"},XCe={class:"full_editor_actions"};function QCe(e,t,n,o,r,s){const i=ee("ArrowLeft"),l=Ie,a=ut,u=zw,c=ee("auth-editor"),d=Kn,f=J0,p=Ed,h=Bw,m=Rt("loading");return C(),T("div",GCe,[w(h,null,{default:S(()=>[w(u,{class:"fcom_full_editor_header_wrap"},{default:S(()=>[_("div",YCe,[_("div",{onClick:t[0]||(t[0]=y=>e.$emit("completed")),class:"fcom_back_header"},[w(l,null,{default:S(()=>[w(i)]),_:1}),ne(" "+O(e.$t("General Settings")),1)]),_("div",ZCe,[_("ul",JCe,[_("li",{onClick:t[1]||(t[1]=y=>r.currentTab="login")},[_("a",{class:D({"router-link-exact-active":r.currentTab=="login"}),href:"#"},O(e.$t("Login")),3)]),_("li",{onClick:t[2]||(t[2]=y=>r.currentTab="signup")},[_("a",{class:D({"router-link-exact-active":r.currentTab=="signup"}),href:"#"},O(e.$t("Sign Up")),3)])])]),_("div",XCe,[Fe((C(),H(a,{class:"fcom_primary_button",disabled:r.saving,onClick:s.saveSettings},{default:S(()=>[ne(O(e.$t("Save Changes")),1)]),_:1},8,["disabled","onClick"])),[[m,r.saving]])])])]),_:1}),w(h,{class:"fcom_full_editor_container"},{default:S(()=>[r.loading?(C(),T(de,{key:1},[w(f,{class:"fcom_full_editor_side lockscreen_editor"},{default:S(()=>[w(d,{animated:!0,rows:5})]),_:1}),w(p,{class:"fcom_full_editor_main lockscreen_editor"},{default:S(()=>[w(d,{animated:!0,rows:10})]),_:1})],64)):(C(),H(c,{key:0,currentTab:r.currentTab,savingCount:r.savingCount,"auth-settings":r.authSettings},null,8,["currentTab","savingCount","auth-settings"]))]),_:1})]),_:1})])}const eke=Be(qCe,[["render",QCe]]),tke={name:"GeneralSettings",components:{ImageUploader:Md,Layout:Es,AppLayout:xs,CopyDocument:rZ,AuthSettings:eke},data(){return{settings:null,user_roles:{},loading:!1,saving:!1,users_can_register:!0,user_registration_enable_url:"",showCustomLoginForm:!1}},computed:{loginUrl(){return this.appVars.urls.portal_base+"?fcom_action=auth"},signupUrl(){return this.appVars.urls.portal_base+"?fcom_action=auth&form=register"},isRoleBase(){var e,t;return((t=(e=this.settings)==null?void 0:e.access)==null?void 0:t.acess_level)==="role_based"},isPublic(){var e,t;return((t=(e=this.settings)==null?void 0:e.access)==null?void 0:t.acess_level)==="public"},isDefaultLogin(){var e;return((e=this.settings)==null?void 0:e.auth_form_type)==="default"},isCustomLogin(){var e;return((e=this.settings)==null?void 0:e.auth_form_type)==="custom"}},methods:{openLoginCustomizeForm(){this.showCustomLoginForm=!0},copyToClipboard(e){navigator.clipboard.writeText(e).then(()=>{this.$notify.success(this.$t("Link copied to clipboard"))}).catch(t=>{this.$notify.error("Failed to copy")})},getSettings(){this.loading=!0,this.$get("admin/general").then(e=>{this.settings=e.settings,this.user_roles=e.user_roles,this.users_can_register=e.users_can_register,this.user_registration_enable_url=e.user_registration_enable_url}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})},saveSettings(){this.saving=!0,this.$post("admin/general",{settings:this.settings}).then(e=>{this.$notify.success(e.message)}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})}},mounted(){this.getSettings(),this.changeTitle(this.$t("General Settings"))}},nke={class:"settings_router"},oke={class:"fhr_content_layout_body"},rke={class:"setting_body"},ske={class:"settings_title"},ike={class:"settings_subtitle"},lke={class:"settings_title"},ake={class:"settings_subtitle"},uke=["src"],cke={class:"settings_title"},dke={class:"settings_subtitle"},fke=["src"],pke={class:"settings_title"},hke={class:"settings_subtitle"},mke=["src"],gke={class:"settings_title"},vke={class:"settings_subtitle"},yke={class:"fcom_help_text"},_ke={class:"settings_title"},bke={class:"settings_subtitle"},wke={class:"settings_title"},Cke={class:"settings_subtitle"},kke={class:"help_text"},Ske={class:"settings_title"},$ke={class:"settings_subtitle"},Eke={class:"settings_title"},xke={class:"settings_subtitle"},Tke={class:"fcom_help_text"},Mke={class:"settings_title"},Oke={class:"settings_subtitle"},Ike={key:0,class:"fcom_help_text"},Ake=["href"],Nke={class:"settings_title"},Pke={class:"settings_subtitle"},Lke={key:0};function Rke(e,t,n,o,r,s){const i=ut,l=_h,a=$t,u=Mn,c=yh,d=ee("image-uploader"),f=En,p=gh,h=ta,m=$s,y=vr,v=Y0,k=ee("CopyDocument"),b=Ie,$=Tn,x=Kn,E=ee("auth-settings"),M=ee("layout"),N=ee("app-layout");return C(),H(N,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:S(()=>[w(M,{wrapper_class:"no_bg_layout",title:e.$t("General Settings")},{actions:S(()=>[w(i,{class:"fcom_primary_button",disabled:r.saving||r.loading,onClick:s.saveSettings},{default:S(()=>[_("span",null,O(e.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])]),default:S(()=>[_("div",nke,[_("div",oke,[_("div",rke,[r.settings?(C(),H($,{key:0,onSubmit:t[13]||(t[13]=Ze(P=>e.doNothing(),["prevent"])),"label-position":"top","label-width":"120px"},{default:S(()=>[w(c,{gutter:20,class:"setting_row"},{default:S(()=>[w(l,{sm:12},{default:S(()=>[_("p",ske,O(e.$t("Community Title")),1),_("span",ike,O(e.$t("This title will be used for the meta title and email notification references. It should match your site title.")),1)]),_:1}),w(l,{sm:12},{default:S(()=>[w(u,null,{default:S(()=>[w(a,{placeholder:e.$t("Community title"),type:"text",modelValue:r.settings.site_title,"onUpdate:modelValue":t[0]||(t[0]=P=>r.settings.site_title=P)},null,8,["placeholder","modelValue"])]),_:1})]),_:1})]),_:1}),w(c,{gutter:20,class:"setting_row"},{default:S(()=>[w(l,{sm:12},{default:S(()=>[_("p",lke,O(e.$t("Site Logo (For Light Background)")),1),_("span",ake,O(e.$t("Recommended dimensions: 480 x 120, 4:1 aspect ratio.")),1)]),_:1}),w(l,{sm:12},{default:S(()=>[w(u,null,{default:S(()=>[r.settings.logo?(C(),T("img",{key:0,alt:"",class:"settings_img",src:r.settings.logo},null,8,uke)):z("",!0),w(d,{additionalData:{resize:!1,max_width:500,skip_convert:"yes"},button_text:r.settings.logo?e.$t("Change"):e.$t("Upload Logo"),can_remove:!!r.settings.logo,className:"setting_img_upload",isTextBtn:!1,removeIcon:!1,onUploaded:t[1]||(t[1]=P=>{r.settings.logo=P})},null,8,["button_text","can_remove"])]),_:1})]),_:1})]),_:1}),w(c,{gutter:30,class:"setting_row"},{default:S(()=>[w(l,{sm:12},{default:S(()=>[_("p",cke,O(e.$t("Site Logo (For Dark Mode)")),1),_("span",dke,O(e.$t("Recommended dimensions: 480 x 120, 4:1 aspect ratio.")),1)]),_:1}),w(l,{sm:12},{default:S(()=>[w(u,null,{default:S(()=>[r.settings.white_logo?(C(),T("img",{key:0,alt:"",class:"settings_img",src:r.settings.white_logo},null,8,fke)):z("",!0),w(d,{additionalData:{resize:!1,max_width:500,skip_convert:"yes"},button_text:r.settings.white_logo?e.$t("Change"):e.$t("Set Logo"),can_remove:!!r.settings.white_logo,className:"setting_img_upload",isTextBtn:!1,removeIcon:!1,onUploaded:t[2]||(t[2]=P=>{r.settings.white_logo=P})},null,8,["button_text","can_remove"])]),_:1})]),_:1})]),_:1}),w(c,{gutter:30,class:"setting_row"},{default:S(()=>[w(l,{sm:12},{default:S(()=>[_("p",pke,O(e.$t("Default Open Graph Image")),1),_("span",hke,O(e.$t("This image will be used on social sharing preview. Recommended size: 1200 x 630 px")),1)]),_:1}),w(l,{sm:12},{default:S(()=>[w(u,null,{default:S(()=>[r.settings.featured_image?(C(),T("img",{key:0,alt:"",style:{"max-height":"100px"},class:"settings_img",src:r.settings.featured_image},null,8,mke)):z("",!0),w(d,{additionalData:{resize:!1,max_width:1600,skip_convert:"yes"},button_text:r.settings.featured_image?e.$t("Change"):e.$t("Set Open Graph Image"),can_remove:!!r.settings.featured_image,className:"setting_img_upload",isTextBtn:!1,removeIcon:!1,onUploaded:t[3]||(t[3]=P=>{r.settings.featured_image=P})},null,8,["button_text","can_remove"])]),_:1})]),_:1})]),_:1}),w(c,{gutter:30,class:"setting_row"},{default:S(()=>[w(l,{sm:12},{default:S(()=>[_("p",gke,O(e.$t("Global Post Status")),1),_("span",vke,O(e.$t("Enable/disable Post Status")),1)]),_:1}),w(l,{sm:12},{default:S(()=>[w(u,null,{default:S(()=>[w(f,{"true-value":"no","false-value":"yes",modelValue:r.settings.disable_global_posts,"onUpdate:modelValue":t[4]||(t[4]=P=>r.settings.disable_global_posts=P)},{default:S(()=>[ne(O(e.$t("Enable Global Posts Status Form")),1)]),_:1},8,["modelValue"]),_("div",yke,[_("p",null,O(e.$t("If you enable this, then users can post globally without selecting a space, which will be available for everyone.")),1)])]),_:1})]),_:1})]),_:1}),w(c,{gutter:30,class:"setting_row"},{default:S(()=>[w(l,{sm:12},{default:S(()=>[_("p",_ke,O(e.$t("Portal Access Settings")),1),_("span",bke,O(e.$t("Who can access the portal.")),1)]),_:1}),w(l,{sm:12},{default:S(()=>[w(u,null,{default:S(()=>[w(h,{modelValue:r.settings.access.acess_level,"onUpdate:modelValue":t[5]||(t[5]=P=>r.settings.access.acess_level=P)},{default:S(()=>[w(p,{value:"public"},{default:S(()=>[ne(O(e.$t("Everyone")),1)]),_:1}),w(p,{value:"logged_in"},{default:S(()=>[ne(O(e.$t("Only Logged In Users")),1)]),_:1}),w(p,{value:"role_based"},{default:S(()=>[ne(O(e.$t("Only Selected User Roles")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),s.isRoleBase?(C(),T(de,{key:0},[w(c,{gutter:30,class:"setting_row"},{default:S(()=>[w(l,{sm:12},{default:S(()=>[_("p",wke,O(e.$t("User Roles")),1),_("span",Cke,O(e.$t("Select user roles who can access the portal.")),1)]),_:1}),w(l,{sm:12},{default:S(()=>[w(u,null,{default:S(()=>[w(y,{placeholder:e.$t("Select Access Roles"),modelValue:r.settings.access.access_roles,"onUpdate:modelValue":t[6]||(t[6]=P=>r.settings.access.access_roles=P),multiple:""},{default:S(()=>[(C(!0),T(de,null,nt(r.user_roles,(P,I)=>(C(),H(m,{key:I,label:P,value:I},null,8,["label","value"]))),128))]),_:1},8,["placeholder","modelValue"]),_("span",kke,O(e.$t("__ALL_ADMIN_ACCESS_DESC")),1)]),_:1})]),_:1})]),_:1}),w(c,{gutter:30,class:"setting_row"},{default:S(()=>[w(l,{sm:12},{default:S(()=>[_("p",Ske,O(e.$t("Not Matched User Roles")),1),_("span",$ke,O(e.$t("Message to show for users without matching roles.")),1)]),_:1}),w(l,{sm:12},{default:S(()=>[w(u,null,{default:S(()=>[w(a,{type:"textarea",rows:3,modelValue:r.settings.restricted_role_content,"onUpdate:modelValue":t[7]||(t[7]=P=>r.settings.restricted_role_content=P)},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})],64)):z("",!0),s.isPublic?(C(),H(c,{key:1,gutter:30,class:"setting_row"},{default:S(()=>[w(l,{sm:12},{default:S(()=>[_("p",Eke,O(e.$t("Redirect URL")),1),_("span",xke,O(e.$t("Redirect URL for Public Users")),1)]),_:1}),w(l,{sm:12},{default:S(()=>[w(u,null,{default:S(()=>[w(a,{modelValue:r.settings.auth_url,"onUpdate:modelValue":t[8]||(t[8]=P=>r.settings.auth_url=P)},null,8,["modelValue"]),_("div",Tke,[_("p",null,O(e.$t("Do not use your community portal URL here. Maybe you can use your login/signup URL")),1)])]),_:1})]),_:1})]),_:1})):z("",!0),w(c,{gutter:30,class:"setting_row"},{default:S(()=>[w(l,{sm:12},{default:S(()=>[_("p",Mke,O(e.$t("Login / Registration URLs")),1),_("span",Oke,O(e.$t("Find the default Login/Registration Urls")),1)]),_:1}),w(l,{sm:12},{default:S(()=>[w(u,{label:e.$t("Login/Signup Form Type")},{default:S(()=>[w(h,{style:{"flex-direction":"row"},modelValue:r.settings.auth_form_type,"onUpdate:modelValue":t[9]||(t[9]=P=>r.settings.auth_form_type=P)},{default:S(()=>[w(v,{value:"default"},{default:S(()=>[ne(O(e.$t("Use Default")),1)]),_:1}),w(v,{value:"custom"},{default:S(()=>[ne(O(e.$t("Use Custom Login Page")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),s.isCustomLogin?(C(),H(u,{key:0,style:{"margin-top":"20px"},label:e.$t("Please provide your custom Authentication Url")},{default:S(()=>[w(a,{type:"url",placeholder:e.$t("Custom Auth URL"),modelValue:r.settings.cutsom_auth_url,"onUpdate:modelValue":t[10]||(t[10]=P=>r.settings.cutsom_auth_url=P)},null,8,["placeholder","modelValue"])]),_:1},8,["label"])):z("",!0),w(u,{style:{"margin-top":"20px"},label:e.$t("Default Login URL")},{default:S(()=>[w(a,{disabled:"",value:s.loginUrl,placeholder:e.$t("Login URL for public Users")},{append:S(()=>[w(i,{onClick:t[11]||(t[11]=P=>s.copyToClipboard(s.loginUrl)),text:""},{default:S(()=>[w(b,null,{default:S(()=>[w(k)]),_:1}),_("span",null,O(e.$t("Copy")),1)]),_:1})]),_:1},8,["value","placeholder"])]),_:1},8,["label"]),w(u,{style:{"margin-top":"20px"},label:e.$t("Default Signup URL")},{default:S(()=>[w(a,{disabled:"",value:s.signupUrl,placeholder:e.$t("Registration URL for public Users")},{append:S(()=>[w(i,{onClick:t[12]||(t[12]=P=>s.copyToClipboard(s.signupUrl)),text:""},{default:S(()=>[w(b,null,{default:S(()=>[w(k)]),_:1}),_("span",null,O(e.$t("Copy")),1)]),_:1})]),_:1},8,["value","placeholder"]),r.users_can_register?z("",!0):(C(),T("div",Ike,[_("p",null,[ne(O(e.$t("User registration is disabled for your site. Please enable from General Setting."))+" ",1),_("a",{target:"_blank",rel:"noopener",href:r.user_registration_enable_url},O(e.$t("Go to General Settings.")),9,Ake)])]))]),_:1},8,["label"])]),_:1})]),_:1}),s.isDefaultLogin?(C(),H(c,{key:2,gutter:30,class:"setting_row"},{default:S(()=>[w(l,{sm:12},{default:S(()=>[_("p",Nke,O(e.$t("Customize Login/Signup Form")),1),_("span",Pke,O(e.$t("Customize your login and registration form settings")),1)]),_:1}),w(l,{sm:12},{default:S(()=>[w(i,{class:"fcom_secondary_button",onClick:s.openLoginCustomizeForm},{default:S(()=>[ne(O(e.$t("Customize")),1)]),_:1},8,["onClick"])]),_:1})]),_:1})):z("",!0),w(c,{gutter:30},{default:S(()=>[w(i,{class:"fcom_primary_button",disabled:r.saving||r.loading,onClick:s.saveSettings},{default:S(()=>[_("span",null,O(e.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])]),_:1})]),_:1})):r.loading?(C(),H(x,{key:1,animated:!0,rows:10})):z("",!0)])])]),r.showCustomLoginForm?(C(),T("div",Lke,[(C(),H(qr,{to:"body"},[w(E,{onCompleted:t[14]||(t[14]=P=>r.showCustomLoginForm=!1)})]))])):z("",!0)]),_:1},8,["title"])]),_:1})}const Dke=Be(tke,[["render",Rke]]),Vke={name:"ManagerForm",props:["modelValue"],emits:["completed"],data(){return{users:[],loading:!1,form:this.modelValue||{user_id:"",roles:[]},adding:!1}},methods:{fetchUsers(e=""){this.loading=!0,this.$get("admin/users",{context:"add_manager",search:e}).then(t=>{this.users=t.users.data}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},addManager(){if(!this.form.user_id||!this.form.roles.length){this.$notify.error(this.$t("Please select a user and role"));return}this.adding=!0,this.$post("admin/managers",{user_id:this.form.user_id,roles:this.form.roles}).then(e=>{this.$notify.success(e.message),this.$emit("completed")}).catch(e=>{this.$handleError(e)}).finally(()=>{this.adding=!1})}},mounted(){this.form.roles||(this.form.roles=[]),this.modelValue.editing_user||this.fetchUsers()}},Fke={style:{float:"left"}},Bke={style:{float:"right",color:"#8492a6","font-size":"13px"}},zke={key:1},jke={class:"dialog_footer"},Hke={key:0},Uke={key:1};function Wke(e,t,n,o,r,s){const i=$s,l=vr,a=Mn,u=En,c=Ioe,d=ut,f=Tn,p=Rt("loading");return C(),H(f,{onSubmit:t[3]||(t[3]=Ze(h=>e.doNothing(),["prevent"])),"label-position":"top",modelValue:r.form,"onUpdate:modelValue":t[4]||(t[4]=h=>r.form=h),size:"large"},{default:S(()=>[r.form.editing_user?(C(),T("p",zke,O(e.$t("Editing manager role for %s",r.form.editing_user.display_name)),1)):(C(),H(a,{key:0,label:e.$t("User")},{default:S(()=>[w(l,{class:"rich_select",filterable:"",remote:"",loading:r.loading,"remote-method":s.fetchUsers,placeholder:e.$t("Select User"),modelValue:r.form.user_id,"onUpdate:modelValue":t[0]||(t[0]=h=>r.form.user_id=h)},{default:S(()=>[(C(!0),T(de,null,nt(r.users,h=>(C(),H(i,{key:h.ID,label:h.display_name+" ("+h.user_email+")",value:h.ID},{default:S(()=>[_("span",Fke,O(h.display_name),1),_("span",Bke,O(h.user_email),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["loading","remote-method","placeholder","modelValue"])]),_:1},8,["label"])),w(a,{label:e.$t("Space Management Roles")},{default:S(()=>[w(c,{modelValue:r.form.roles,"onUpdate:modelValue":t[1]||(t[1]=h=>r.form.roles=h)},{default:S(()=>[w(u,{value:"admin"},{default:S(()=>[ne(O(e.$t("Space Admin (All Access)")),1)]),_:1}),w(u,{disabled:r.form.roles.includes("admin"),value:"moderator"},{default:S(()=>[ne(O(e.$t("Space Moderator")),1)]),_:1},8,["disabled"]),w(u,{disabled:r.form.roles.includes("admin"),value:"course_admin"},{default:S(()=>[ne(O(e.$t("Course Admin")),1)]),_:1},8,["disabled"]),w(u,{disabled:r.form.roles.includes("admin")||r.form.roles.includes("course_admin"),value:"course_creatror"},{default:S(()=>[ne(O(e.$t("Course Creator")),1)]),_:1},8,["disabled"])]),_:1},8,["modelValue"])]),_:1},8,["label"]),_("div",jke,[he(e.$slots,"after_form",{},()=>[Fe((C(),H(d,{class:"fcom_primary_button",disabled:r.adding,onClick:t[2]||(t[2]=h=>s.addManager())},{default:S(()=>[r.form.editing_user?(C(),T("span",Hke,O(e.$t("Update Role")),1)):(C(),T("span",Uke,O(e.$t("Add Manager")),1))]),_:1},8,["disabled"])),[[p,r.adding]])])])]),_:3},8,["modelValue"])}const Kke=Be(Vke,[["render",Wke]]);function qke(e,t){for(var n=-1,o=e==null?0:e.length;++n<o&&t(e[n],n,e)!==!1;);return e}var Gke=qke;function Yke(e){return function(t,n,o){for(var r=-1,s=Object(t),i=o(t),l=i.length;l--;){var a=i[e?l:++r];if(n(s[a],a,s)===!1)break}return t}}var Zke=Yke,Jke=Zke,Xke=Jke(),Qke=Xke;function e4e(e,t){for(var n=-1,o=Array(e);++n<e;)o[n]=t(n);return o}var t4e=e4e,n4e=$h,o4e=ov,r4e="[object Arguments]";function s4e(e){return o4e(e)&&n4e(e)==r4e}var i4e=s4e,Z9=i4e,l4e=ov,KP=Object.prototype,a4e=KP.hasOwnProperty,u4e=KP.propertyIsEnumerable,c4e=Z9(function(){return arguments}())?Z9:function(e){return l4e(e)&&a4e.call(e,"callee")&&!u4e.call(e,"callee")},qP=c4e,d4e=Array.isArray,Vk=d4e,s0={exports:{}};function f4e(){return!1}var p4e=f4e;s0.exports;(function(e,t){var n=ji,o=p4e,r=t&&!t.nodeType&&t,s=r&&!0&&e&&!e.nodeType&&e,i=s&&s.exports===r,l=i?n.Buffer:void 0,a=l?l.isBuffer:void 0,u=a||o;e.exports=u})(s0,s0.exports);var GP=s0.exports,h4e=9007199254740991,m4e=/^(?:0|[1-9]\d*)$/;function g4e(e,t){var n=typeof e;return t=t??h4e,!!t&&(n=="number"||n!="symbol"&&m4e.test(e))&&e>-1&&e%1==0&&e<t}var v4e=g4e,y4e=9007199254740991;function _4e(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=y4e}var YP=_4e,b4e=$h,w4e=YP,C4e=ov,k4e="[object Arguments]",S4e="[object Array]",$4e="[object Boolean]",E4e="[object Date]",x4e="[object Error]",T4e="[object Function]",M4e="[object Map]",O4e="[object Number]",I4e="[object Object]",A4e="[object RegExp]",N4e="[object Set]",P4e="[object String]",L4e="[object WeakMap]",R4e="[object ArrayBuffer]",D4e="[object DataView]",V4e="[object Float32Array]",F4e="[object Float64Array]",B4e="[object Int8Array]",z4e="[object Int16Array]",j4e="[object Int32Array]",H4e="[object Uint8Array]",U4e="[object Uint8ClampedArray]",W4e="[object Uint16Array]",K4e="[object Uint32Array]",fn={};fn[V4e]=fn[F4e]=fn[B4e]=fn[z4e]=fn[j4e]=fn[H4e]=fn[U4e]=fn[W4e]=fn[K4e]=!0;fn[k4e]=fn[S4e]=fn[R4e]=fn[$4e]=fn[D4e]=fn[E4e]=fn[x4e]=fn[T4e]=fn[M4e]=fn[O4e]=fn[I4e]=fn[A4e]=fn[N4e]=fn[P4e]=fn[L4e]=!1;function q4e(e){return C4e(e)&&w4e(e.length)&&!!fn[b4e(e)]}var G4e=q4e;function Y4e(e){return function(t){return e(t)}}var Z4e=Y4e,i0={exports:{}};i0.exports;(function(e,t){var n=jO,o=t&&!t.nodeType&&t,r=o&&!0&&e&&!e.nodeType&&e,s=r&&r.exports===o,i=s&&n.process,l=function(){try{var a=r&&r.require&&r.require("util").types;return a||i&&i.binding&&i.binding("util")}catch{}}();e.exports=l})(i0,i0.exports);var J4e=i0.exports,X4e=G4e,Q4e=Z4e,J9=J4e,X9=J9&&J9.isTypedArray,e6e=X9?Q4e(X9):X4e,ZP=e6e,t6e=t4e,n6e=qP,o6e=Vk,r6e=GP,s6e=v4e,i6e=ZP,l6e=Object.prototype,a6e=l6e.hasOwnProperty;function u6e(e,t){var n=o6e(e),o=!n&&n6e(e),r=!n&&!o&&r6e(e),s=!n&&!o&&!r&&i6e(e),i=n||o||r||s,l=i?t6e(e.length,String):[],a=l.length;for(var u in e)(t||a6e.call(e,u))&&!(i&&(u=="length"||r&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||s6e(u,a)))&&l.push(u);return l}var c6e=u6e,d6e=Object.prototype;function f6e(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||d6e;return e===n}var JP=f6e;function p6e(e,t){return function(n){return e(t(n))}}var h6e=p6e,m6e=h6e,g6e=m6e(Object.keys,Object),v6e=g6e,y6e=JP,_6e=v6e,b6e=Object.prototype,w6e=b6e.hasOwnProperty;function C6e(e){if(!y6e(e))return _6e(e);var t=[];for(var n in Object(e))w6e.call(e,n)&&n!="constructor"&&t.push(n);return t}var XP=C6e,k6e=$h,S6e=Sh,$6e="[object AsyncFunction]",E6e="[object Function]",x6e="[object GeneratorFunction]",T6e="[object Proxy]";function M6e(e){if(!S6e(e))return!1;var t=k6e(e);return t==E6e||t==x6e||t==$6e||t==T6e}var QP=M6e,O6e=QP,I6e=YP;function A6e(e){return e!=null&&I6e(e.length)&&!O6e(e)}var Fk=A6e,N6e=c6e,P6e=XP,L6e=Fk;function R6e(e){return L6e(e)?N6e(e):P6e(e)}var D6e=R6e,V6e=Qke,F6e=D6e;function B6e(e,t){return e&&V6e(e,t,F6e)}var z6e=B6e,j6e=Fk;function H6e(e,t){return function(n,o){if(n==null)return n;if(!j6e(n))return e(n,o);for(var r=n.length,s=t?r:-1,i=Object(n);(t?s--:++s<r)&&o(i[s],s,i)!==!1;);return n}}var U6e=H6e,W6e=z6e,K6e=U6e,q6e=K6e(W6e),G6e=q6e;function Y6e(e){return e}var Z6e=Y6e,J6e=Z6e;function X6e(e){return typeof e=="function"?e:J6e}var Q6e=X6e,e5e=Gke,t5e=G6e,n5e=Q6e,o5e=Vk;function r5e(e,t){var n=o5e(e)?e5e:t5e;return n(e,n5e(t))}var s5e=r5e,i5e=s5e;const yu=_o(i5e);function xt(e){return window.fluentComAdmin.i18n[e]||e}const l5e={public:{label:xt("Public"),description:xt("__PUBLIC_SPACE_DESC"),space_description:xt("__PIBLIC_SPACE_DESC_2")},private:{label:xt("Private"),description:xt("__PRIVATE_SPACE_DESC"),space_description:xt("__PRIVATE_SPACE_DESC_2")},secret:{label:xt("Secret"),description:xt("Only invited members can view and post."),space_description:xt("__SECRET_SPACE_DESC_2")}},a5e={public:{label:xt("Public"),description:xt("Anyone can view and enroll the course for free")},private:{label:xt("Private"),description:xt("__PRIVATE_COURSE_DESC")},secret:{label:xt("Secret"),description:xt("Only invited students can view and enroll the course content.")}},u5e={self_paced:{label:xt("Self Paced"),description:xt("__SELF_PAED_COURSE_DESC")},structured:{label:xt("Structured"),description:xt("__STRUCTURED_COURSE_DESC")},scheduled:{label:xt("Scheduled"),description:xt("Course starts on a specific date. Sections are dripped relative to that date.")}},c5e={leader_board_module:{headerTitle:xt("Leaderboard Settings"),headerDescription:xt("Settings for Leaderboard & Gamification features"),featureImage:"leaderboard_module.png",bodyTitle:xt("Get Leaderboard & Gamification Module"),bodyDescription:xt("Unlock potential by creating new feeds and earning points for likes. Advance in rank based on your total points using this module")},emoji_module:{headerTitle:xt("Emoji Module"),headerDescription:xt("Settings for Emoji & Reaction features"),featureImage:"emoji_module.png",bodyTitle:xt("Get Emoji & Reaction Module"),bodyDescription:xt("Use emojis to add a personal touch and make your new article, post, or comment more expressive")},giphy_module:{headerTitle:xt("Giphy Module"),headerDescription:xt("Customize Your Giphy Module Settings"),featureImage:"giphy_module.png",bodyTitle:xt("Get Giphy Module"),bodyDescription:xt("Want to use awesome GIF, upgrade to pro plan now and enjoy your surfing on Fluent community")},user_badge_module:{headerTitle:xt("User Badge Module"),headerDescription:xt("Add a badge next to user profile name to highlight valued users"),featureImage:"badge_module.png",bodyTitle:xt("Get User Badge Module"),bodyDescription:xt("Show a customized badge on user profiles beside their names to easily recognize your admins or moderators, or to give appreciation to your power users.")},media_module:{headerTitle:xt("Media Module"),headerDescription:xt("Add a badge next to user profile name to highlight valued users"),featureImage:"media_module.png",bodyTitle:xt("Get Media Module"),bodyDescription:xt("Choose where to store your media files. Options include Local File System, Amazon S3, or Cloudflare R2 for storing and serving your media assets")}},lc=e=>{e=parseInt(e);const t=Object.values(window.fluentComAdmin.leaderboard_levels);if(!e)return t[0];for(let n=0;n<t.length;n++)if(e>=t[n].min_points&&e<=t[n].max_points)return t[n];return t[t-1]};var d5e=ji,f5e=d5e["__core-js_shared__"],p5e=f5e,a_=p5e,Q9=function(){var e=/[^.]+$/.exec(a_&&a_.keys&&a_.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function h5e(e){return!!Q9&&Q9 in e}var m5e=h5e,g5e=Function.prototype,v5e=g5e.toString;function y5e(e){if(e!=null){try{return v5e.call(e)}catch{}try{return e+""}catch{}}return""}var eL=y5e,_5e=QP,b5e=m5e,w5e=Sh,C5e=eL,k5e=/[\\^$.*+?()[\]{}|]/g,S5e=/^\[object .+?Constructor\]$/,$5e=Function.prototype,E5e=Object.prototype,x5e=$5e.toString,T5e=E5e.hasOwnProperty,M5e=RegExp("^"+x5e.call(T5e).replace(k5e,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function O5e(e){if(!w5e(e)||b5e(e))return!1;var t=_5e(e)?M5e:S5e;return t.test(C5e(e))}var I5e=O5e;function A5e(e,t){return e==null?void 0:e[t]}var N5e=A5e,P5e=I5e,L5e=N5e;function R5e(e,t){var n=L5e(e,t);return P5e(n)?n:void 0}var Bh=R5e,D5e=Bh,V5e=ji,F5e=D5e(V5e,"DataView"),B5e=F5e,z5e=Bh,j5e=ji,H5e=z5e(j5e,"Map"),U5e=H5e,W5e=Bh,K5e=ji,q5e=W5e(K5e,"Promise"),G5e=q5e,Y5e=Bh,Z5e=ji,J5e=Y5e(Z5e,"Set"),X5e=J5e,Q5e=Bh,e8e=ji,t8e=Q5e(e8e,"WeakMap"),n8e=t8e,O2=B5e,I2=U5e,A2=G5e,N2=X5e,P2=n8e,tL=$h,Fd=eL,e$="[object Map]",o8e="[object Object]",t$="[object Promise]",n$="[object Set]",o$="[object WeakMap]",r$="[object DataView]",r8e=Fd(O2),s8e=Fd(I2),i8e=Fd(A2),l8e=Fd(N2),a8e=Fd(P2),Ea=tL;(O2&&Ea(new O2(new ArrayBuffer(1)))!=r$||I2&&Ea(new I2)!=e$||A2&&Ea(A2.resolve())!=t$||N2&&Ea(new N2)!=n$||P2&&Ea(new P2)!=o$)&&(Ea=function(e){var t=tL(e),n=t==o8e?e.constructor:void 0,o=n?Fd(n):"";if(o)switch(o){case r8e:return r$;case s8e:return e$;case i8e:return t$;case l8e:return n$;case a8e:return o$}return t});var u8e=Ea,c8e=XP,d8e=u8e,f8e=qP,p8e=Vk,h8e=Fk,m8e=GP,g8e=JP,v8e=ZP,y8e="[object Map]",_8e="[object Set]",b8e=Object.prototype,w8e=b8e.hasOwnProperty;function C8e(e){if(e==null)return!0;if(h8e(e)&&(p8e(e)||typeof e=="string"||typeof e.splice=="function"||m8e(e)||v8e(e)||f8e(e)))return!e.length;var t=d8e(e);if(t==y8e||t==_8e)return!e.size;if(g8e(e))return!c8e(e).length;for(var n in e)if(w8e.call(e,n))return!1;return!0}var k8e=C8e;const nL=_o(k8e),S8e={name:"SocialLinks",props:["xprofile","isOwn"],computed:{socialLinks(){var o,r;if(!this.xprofile)return[];const e=[];this.xprofile.website?e.push({title:this.$t("Website"),icon:'<svg viewBox="0 0 40 20" fill="currentColor"><path d="M3.8 10C3.8 6.58 6.58 3.8 10 3.8H18V0H10C4.48 0 0 4.48 0 10C0 15.52 4.48 20 10 20H18V16.2H10C6.58 16.2 3.8 13.42 3.8 10ZM12 12H28V8H12V12ZM30 0H22V3.8H30C33.42 3.8 36.2 6.58 36.2 10C36.2 13.42 33.42 16.2 30 16.2H22V20H30C35.52 20 40 15.52 40 10C40 4.48 35.52 0 30 0Z"></path></svg>',url:this.xprofile.website}):(o=this.xprofile.meta)!=null&&o.website&&e.push({title:this.$t("Website"),icon:'<svg viewBox="0 0 40 20" fill="currentColor"><path d="M3.8 10C3.8 6.58 6.58 3.8 10 3.8H18V0H10C4.48 0 0 4.48 0 10C0 15.52 4.48 20 10 20H18V16.2H10C6.58 16.2 3.8 13.42 3.8 10ZM12 12H28V8H12V12ZM30 0H22V3.8H30C33.42 3.8 36.2 6.58 36.2 10C36.2 13.42 33.42 16.2 30 16.2H22V20H30C35.52 20 40 15.52 40 10C40 4.48 35.52 0 30 0Z"></path></svg>',url:this.xprofile.meta.website});let t=this.xprofile.social_links;if(t||(t=(r=this.xprofile.meta)==null?void 0:r.social_links),nL(t))return e;const n=this.appVars.socialLinkProviders;return n&&this.each(n,(s,i)=>{t[i]&&e.push({title:s.title,icon:s.icon_svg,url:s.domain+t[i]})}),e}}},$8e={class:"fcom_social_links"},E8e=["href","title"];function x8e(e,t,n,o,r,s){const i=Ie,l=ee("router-link");return C(),T("div",$8e,[(C(!0),T(de,null,nt(s.socialLinks,a=>(C(),T("a",{rel:"noopener nofollow",target:"_blank",href:a.url,key:a.title,title:a.title},[w(i,{innerHTML:a.icon},null,8,["innerHTML"])],8,E8e))),128)),n.isOwn&&!s.socialLinks.length?(C(),H(l,{key:0,to:{name:"update_profile",params:{username:n.xprofile.username}}},{default:S(()=>[ne(O("+ "+e.$t("Add social links")),1)]),_:1},8,["to"])):z("",!0)])}const T8e=Be(S8e,[["render",x8e]]),M8e={name:"UserRouteLink",props:{xprofile:{default:()=>({})},show_pop:{type:Boolean,default(){return!0}},show_badge:{type:Boolean,default(){return!1}}},components:{SocialLinks:T8e},data(){return{showingPop:!1,userLevel:null}},methods:{initShow(){this.showingPop=!0,this.has_leaderboard&&!this.userLevel&&(this.userLevel=lc(this.xprofile.total_points))}}},O8e=["href"],I8e=["href"],A8e={key:0,class:"fcom_profile_pop"},N8e={class:"fcom_profile_pop_avatar"},P8e={key:0,class:"fcom_prfile_tagline"},L8e={class:"fcom_level_name"},R8e={style:{display:"block"},class:"fcoml_level_sub meta_line"},D8e={class:"fcom_profile_pop_info"},V8e=["href"],F8e={class:"fcom_user_name"},B8e={key:0,class:"fcom_profile_pop_bio"},z8e={class:"meta_line"},j8e={key:1,class:"meta_line"},H8e={class:"fcom_profile_btns"},U8e=["href"],W8e=["href"];function K8e(e,t,n,o,r,s){const i=ee("verified-sign"),l=ee("UserBadge"),a=ee("UserAvatar"),u=_h,c=ee("SocialLinks"),d=yh,f=bo;return n.show_pop?(C(),H(f,{key:1,width:500,"show-after":500,trigger:"hover",onShow:s.initShow,persistent:!1,"popper-class":"fcom_profile_popper","popper-style":"padding: 20px;"},{reference:S(()=>[he(e.$slots,"default",{},()=>[_("a",{href:e.$getRouteLink("u/:username",{username:n.xprofile.username}),class:"user_route"},[ne(O(n.xprofile.display_name||e.$t("No name"))+" ",1),n.xprofile.is_verified?(C(),H(i,{key:0})):z("",!0),n.show_badge?(C(),H(l,{key:1,profile:n.xprofile},null,8,["profile"])):z("",!0)],8,I8e)])]),default:S(()=>[r.showingPop?(C(),T("div",A8e,[w(d,{gutter:20},{default:S(()=>[w(u,{sm:24,md:8},{default:S(()=>[_("div",N8e,[w(a,{xprofile:n.xprofile},null,8,["xprofile"]),r.userLevel?(C(),T("div",P8e,[_("div",L8e,O(r.userLevel.title),1),_("div",R8e,O(r.userLevel.tagline),1)])):z("",!0)])]),_:1}),w(u,{sm:24,md:16},{default:S(()=>[_("div",D8e,[_("a",{href:e.$getRouteLink("u/:username",{username:n.xprofile.username}),class:"user_route"},[ne(O(n.xprofile.display_name)+" ",1),n.xprofile.is_verified?(C(),H(i,{key:0})):z("",!0),n.show_badge?(C(),H(l,{key:1,profile:n.xprofile},null,8,["profile"])):z("",!0)],8,V8e),_("span",F8e," @"+O(n.xprofile.username),1),n.xprofile.short_description?(C(),T("div",B8e,O(e.getExcerpt(n.xprofile.short_description,160)),1)):z("",!0),_("div",z8e,O(e.$t("Joined: %s",e.humanDateDiff(n.xprofile.created_at))),1),n.xprofile.last_activity?(C(),T("div",j8e,O(e.$t("Last seen: %s",e.humanDateDiff(n.xprofile.last_activity))),1)):z("",!0),_("div",H8e,[_("a",{class:"el-button el-button--primary is-text is-has-bg",href:e.$getRouteLink("u/:username",{username:n.xprofile.username})},O(e.$t("View Profile")),9,U8e),e.appVars.has_chat?(C(),T("a",{key:0,class:"el-button el-button--primary is-text is-has-bg",href:e.$getRouteLink("chat/?user_id=:user_id",{user_id:n.xprofile.user_id})},O(e.$t("Message")),9,W8e)):z("",!0)]),w(c,{style:{"justify-content":"left"},xprofile:n.xprofile,isOwn:!1},null,8,["xprofile"])])]),_:1})]),_:1})])):z("",!0)]),_:3},8,["onShow"])):(C(),T("a",{key:0,href:e.$getRouteLink("u/:username",{username:n.xprofile.username}),class:"user_route"},[he(e.$slots,"default",{},()=>[ne(O(n.xprofile.display_name)+" ",1),n.xprofile.is_verified?(C(),H(i,{key:0})):z("",!0),n.show_badge?(C(),H(l,{key:1,profile:n.xprofile},null,8,["profile"])):z("",!0)])],8,O8e))}const Ov=Be(M8e,[["render",K8e]]),q8e={name:"Avatar",props:{xprofile:{default:()=>({})},with_level:{type:Boolean,default(){return!0}},is_rounded:{type:Boolean,default(){return!0}},with_completion:{type:Boolean,default(){return!1}},is_online:{type:Boolean,default(){return!1}}},computed:{level(){if(!this.with_level||!this.has_leaderboard)return"";const e=lc(this.xprofile.total_points);return e?e.level:0},withCompletion(){var n;if(!this.with_completion||!((n=this.xprofile)!=null&&n.total_points))return!1;const e=lc(this.xprofile.total_points),t=lc(e.max_points+1);return e.level!==t.level},getOutlineStyle(){if(!this.withCompletion)return{};const e=lc(this.xprofile.total_points),t=lc(e.max_points+1),n=this.xprofile.total_points-e.min_points,o=t.min_points-e.min_points,s=n/o*100/100*360;return{backgroundImage:`conic-gradient(rgb(56, 117, 223) ${s}deg, #D9D9D9 ${s}deg)`}}},methods:{setAltImg(e){e.target.src=this.appVars.assets_url+"images/placeholder.png"}}},G8e=["src"],Y8e={key:1,class:"fcom_no_image"},Z8e={key:0,role:"region","aria-label":"User Level",class:"fcom_user_level_mark"};function J8e(e,t,n,o,r,s){return C(),T("div",{class:D([{fcom_avatar_is_rounded:n.is_rounded,is_member_online:n.is_online},"fcom_user_avatar"])},[_("span",{style:Ye(s.getOutlineStyle),class:D({fcom_compilation_avatar:s.withCompletion})},[n.xprofile?(C(),T("img",{key:0,onError:t[0]||(t[0]=(...i)=>s.setAltImg&&s.setAltImg(...i)),src:n.xprofile.avatar,alt:""},null,40,G8e)):(C(),T("span",Y8e))],6),s.level||n.is_online?(C(),T("div",Z8e,[_("span",null,O(s.level),1)])):z("",!0)],2)}const oL=Be(q8e,[["render",J8e]]),X8e={name:"ModeratorSettings",components:{UserAvatar:oL,UserRouteLink:Ov,ManagerForm:Kke,Layout:Es,AppLayout:xs},data(){return{managers:[],loading:!1,paginate:{page:1,per_page:20,total:0},search:"",bulkAction:"",showModal:!1,editing_manager:{user_id:"",roles:[]}}},methods:{applyBulkAction(){this.bulkAction=""},showForm(e){this.editing_manager=e?{user_id:e.ID,roles:e.community_role.value,editing_user:e}:{user_id:"",roles:[]},this.showModal=!0},fetch(){this.loading=!0,this.$get("admin/managers",{page:this.paginate.page,per_page:this.paginate.per_page,search:this.search}).then(e=>{this.managers=e.managers.data,this.paginate.total=e.total}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})},removeManager(e){this.$confirm(this.$t("Are you sure you want to remove this manager?"),this.$t("Warning"),{confirmButtonText:this.$t("Yes, Remove"),cancelButtonText:this.$t("Cancel"),type:"warning"}).then(()=>{this.working=!0,this.$del("admin/managers/"+e.ID).then(t=>{this.$notify.success(t.message),this.fetch()}).catch(t=>{this.$handleError(t)}).finally(()=>{this.working=!1})})},formatRoles(e){let t=[];return this.each(e,n=>{t.push(this.$labelize(n))}),t.join(", ")}},mounted(){this.has_pro&&this.fetch(),this.changeTitle(this.$t("Moderator Settings"))}},Q8e=["href"],eSe={class:"settings_router manager_section"},tSe={class:"fhr_content_layout_body"},nSe={key:0,class:"setting_body"},oSe={class:"fcom_manager_actions"},rSe={class:"bulk_search"},sSe=_("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},[_("path",{d:"M14.5833 14.584L18.3333 18.334",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),_("path",{d:"M16.6667 9.16699C16.6667 5.02486 13.3088 1.66699 9.16666 1.66699C5.02453 1.66699 1.66666 5.02486 1.66666 9.16699C1.66666 13.3091 5.02453 16.667 9.16666 16.667C13.3088 16.667 16.6667 13.3091 16.6667 9.16699Z",stroke:"currentColor","stroke-width":"1.5","stroke-linejoin":"round"})],-1),iSe={class:"fcom_manager_table"},lSe={class:"user_col"},aSe={class:"user_info"},uSe={class:"user_id"},cSe={class:"user_email"},dSe={class:"fcom_table_action_col"},fSe={key:1,class:"setting_body",style:{"text-align":"center"}},pSe=_("p",null,"Add your team members as an Admin/Moderator of this community. This feature is available on the premium version of FluentCommunity. Please upgrade to pro",-1),hSe=["href"],mSe={class:"dialog_header"},gSe={class:"dialog_left"},vSe=_("div",{class:"header_icon"},[_("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},[_("path",{d:"M11.5 11.689V13.2565C10.8212 13.0165 10.0947 12.9429 9.38155 13.0418C8.6684 13.1408 7.9894 13.4094 7.40157 13.8252C6.81375 14.2409 6.33426 14.7916 6.00337 15.4311C5.67249 16.0705 5.49986 16.78 5.5 17.5L4 17.4993C3.99977 16.5834 4.20919 15.6797 4.61222 14.8573C5.01526 14.0349 5.6012 13.3157 6.32516 12.7548C7.04912 12.1939 7.89188 11.8061 8.78887 11.6212C9.68585 11.4364 10.6132 11.4593 11.5 11.6883V11.689ZM10 10.75C7.51375 10.75 5.5 8.73625 5.5 6.25C5.5 3.76375 7.51375 1.75 10 1.75C12.4862 1.75 14.5 3.76375 14.5 6.25C14.5 8.73625 12.4862 10.75 10 10.75ZM10 9.25C11.6575 9.25 13 7.9075 13 6.25C13 4.5925 11.6575 3.25 10 3.25C8.3425 3.25 7 4.5925 7 6.25C7 7.9075 8.3425 9.25 10 9.25ZM14.5 13.75V11.5H16V13.75H18.25V15.25H16V17.5H14.5V15.25H12.25V13.75H14.5Z",fill:"currentColor"})])],-1),ySe={class:"dialog_body"};function _Se(e,t,n,o,r,s){const i=ee("Plus"),l=Ie,a=ut,u=$t,c=nne,d=ee("user-route-link"),f=tv,p=ev,h=ee("layout"),m=ee("app-layout"),y=ee("manager-form"),v=bh,k=Rt("loading");return C(),T(de,null,[w(m,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:S(()=>[w(h,{wrapper_class:"no_bg_layout fcom_setting_route",title:e.$t("Community Managers")},{actions:S(()=>[e.has_pro?(C(),H(a,{key:0,class:"fcom_primary_button",onClick:t[0]||(t[0]=b=>s.showForm(null))},{default:S(()=>[w(l,null,{default:S(()=>[w(i)]),_:1}),_("span",null,O(e.$t("Add Manager")),1)]),_:1})):(C(),T("a",{key:1,target:"_blank",rel:"noopener",href:e.appVars.upgrade_url,class:"el-button el-button--danger"},O(e.$t("Upgrade to Pro")),9,Q8e))]),default:S(()=>[_("div",eSe,[_("div",tSe,[e.has_pro?(C(),T("div",nSe,[_("div",oSe,[_("div",rSe,[w(u,{modelValue:r.search,"onUpdate:modelValue":t[1]||(t[1]=b=>r.search=b),onKeydown:Mt(s.fetch,["enter"]),placeholder:e.$t("Search"),class:"el-input-round"},{prefix:S(()=>[sSe]),_:1},8,["modelValue","onKeydown","placeholder"])])]),_("div",iSe,[Fe((C(),H(p,{data:r.managers},{default:S(()=>[w(f,{label:e.$t("Members"),sortable:"","min-width":"160"},{default:S(b=>[_("div",lSe,[w(c,{src:b.row.xprofile.avatar},null,8,["src"]),_("div",aSe,[_("div",null,[w(d,{xprofile:b.row.xprofile},null,8,["xprofile"]),_("span",uSe,"#"+O(b.row.ID),1)]),_("span",cSe,O(b.row.user_email),1)])])]),_:1},8,["label"]),w(f,{label:e.$t("Role"),sortable:""},{default:S(b=>[_("span",null,O(s.formatRoles(b.row.community_role.value)),1)]),_:1},8,["label"]),w(f,null,{default:S(b=>[_("div",dSe,[w(a,{onClick:$=>s.showForm(b.row),size:"small"},{default:S(()=>[ne(O(e.$t("Edit")),1)]),_:2},1032,["onClick"]),w(a,{onClick:$=>s.removeManager(b.row),type:"danger",plain:"",size:"small"},{default:S(()=>[ne(O(e.$t("Remove")),1)]),_:2},1032,["onClick"])])]),_:1})]),_:1},8,["data"])),[[k,r.loading]])])])):(C(),T("div",fSe,[pSe,_("a",{target:"_blank",rel:"noopener",href:e.appVars.upgrade_url,class:"el-button el-button--danger"},O(e.$t("Upgrade to Pro")),9,hSe)]))])])]),_:1},8,["title"])]),_:1}),w(v,{"modal-class":"fcom_common_dialog",id:"fluent_comminity_body","close-on-click-modal":!1,"append-to-body":!0,width:e.dialogWidth,modelValue:r.showModal,"onUpdate:modelValue":t[4]||(t[4]=b=>r.showModal=b),direction:"rtl"},{header:S(({close:b})=>[_("div",mSe,[_("div",gSe,[vSe,_("div",null,[_("h4",null,O(e.$t(r.editing_manager.editing_user?"Update Role":"Add Manager")),1),_("p",null,O(e.$t("you can edit your role here")),1)])])])]),default:S(()=>[_("div",ySe,[r.showModal?(C(),H(y,{key:0,onCompleted:t[2]||(t[2]=()=>{s.fetch(),r.showModal=!1}),modelValue:r.editing_manager,"onUpdate:modelValue":t[3]||(t[3]=b=>r.editing_manager=b)},null,8,["modelValue"])):z("",!0)])]),_:1},8,["width","modelValue"])],64)}const bSe=Be(X8e,[["render",_Se]]),wSe={name:"EmailNotification",components:{CrepeEditor:Dk,Layout:Es,AppLayout:xs},data(){return{loading:!1,saving:!1,email_settings:null}},methods:{getSettings(){this.loading=!0,this.$get("admin/email-settings").then(e=>{this.email_settings=e.email_settings}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})},save(){this.saving=!0,this.$post("admin/email-settings",{email_settings:this.email_settings}).then(e=>{this.$notify.success(e.message)}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})}},mounted(){this.getSettings(),this.changeTitle(this.$t("Email Notification Settings"))}},CSe={style:{"margin-bottom":"20px"},class:"settings_router"},kSe={key:0,class:"white_loaded"},SSe={key:1,class:"fhr_content_layout_body"},$Se={class:"setting_body"},ESe={style:{"font-size":"18px",margin:"0",padding:"0"}},xSe={style:{margin:"5px 0","font-size":"90%","line-height":"120%"}},TSe=_("hr",null,null,-1),MSe={class:"fcom_help_text"},OSe={class:"fcom_help_text"},ISe={class:"fcom_help_text"},ASe={class:"fcom_help_text"},NSe={class:"fcom_extra_editor"},PSe={class:"fcom_help_text"},LSe=["innerHTML"],RSe=_("hr",null,null,-1),DSe={class:"setting_body"},VSe={style:{"font-size":"18px",margin:"0",padding:"0"}},FSe={style:{margin:"5px 0","font-size":"90%","line-height":"120%"}},BSe=_("hr",null,null,-1),zSe={key:0,class:"fcom_help_text"},jSe={key:0,class:"fcom_help_text"},HSe={key:0,class:"fcom_help_text"},USe={class:"fcom_help_text"},WSe={key:0,class:"fcom_help_text"},KSe={class:"fcom_meta_text"},qSe=_("hr",null,null,-1),GSe={class:"setting_body"},YSe={key:2};function ZSe(e,t,n,o,r,s){const i=ut,l=Kn,a=$t,u=Mn,c=_h,d=yh,f=ee("crepe-editor"),p=En,h=$s,m=vr,y=LO,v=Tn,k=ee("layout"),b=ee("app-layout"),$=Rt("loading");return C(),H(b,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:S(()=>[w(k,{wrapper_class:"no_bg_layout fcom_setting_route",title:e.$t("Email Settings")},{actions:S(()=>[Fe((C(),H(i,{class:"fcom_primary_button",onClick:s.save},{default:S(()=>[_("span",null,O(e.$t("Save Settings")),1)]),_:1},8,["onClick"])),[[$,r.saving]])]),default:S(()=>[_("div",CSe,[r.loading?(C(),T("div",kSe,[w(l,{rows:5,animated:!0})])):r.email_settings?(C(),T("div",SSe,[w(v,{onSubmit:t[12]||(t[12]=Ze(x=>e.doNothing(),["prevent"])),modelValue:r.email_settings,"onUpdate:modelValue":t[13]||(t[13]=x=>r.email_settings=x),"label-position":"top"},{default:S(()=>[_("div",$Se,[_("h3",ESe,O(e.$t("Mailing Settings")),1),_("p",xSe,O(e.$t("Set your from name, email, and email footer. These configurations will be used to send emails from FluentCommunity.")),1),TSe,w(d,{gutter:30},{default:S(()=>[w(c,{sm:24,md:12},{default:S(()=>[w(u,{label:e.$t("From Name")},{default:S(()=>[w(a,{placeholder:e.$t("Email from name"),modelValue:r.email_settings.send_from_name,"onUpdate:modelValue":t[0]||(t[0]=x=>r.email_settings.send_from_name=x)},null,8,["placeholder","modelValue"]),_("div",MSe,[_("p",null,O(e.$t("Name that will be used to send emails")),1)])]),_:1},8,["label"])]),_:1}),w(c,{sm:24,md:12},{default:S(()=>[w(u,{label:e.$t("From Email")},{default:S(()=>[w(a,{placeholder:e.$t("Valid Email address"),modelValue:r.email_settings.send_from_email,"onUpdate:modelValue":t[1]||(t[1]=x=>r.email_settings.send_from_email=x)},null,8,["placeholder","modelValue"]),_("div",OSe,[_("p",null,O(e.$t("Provide Valid Email Address email as per your domain/SMTP settings. This email will be used to send emails like notifications")),1)])]),_:1},8,["label"])]),_:1})]),_:1}),w(d,{gutter:30},{default:S(()=>[w(c,{sm:24,md:12},{default:S(()=>[w(u,{label:e.$t("Reply to name (Optional)")},{default:S(()=>[w(a,{placeholder:e.$t("Optional Reply to email"),modelValue:r.email_settings.reply_to_name,"onUpdate:modelValue":t[2]||(t[2]=x=>r.email_settings.reply_to_name=x)},null,8,["placeholder","modelValue"]),_("div",ISe,[_("p",null,O(e.$t("Name that will be used for replyTo attribute")),1)])]),_:1},8,["label"])]),_:1}),w(c,{sm:24,md:12},{default:S(()=>[w(u,{label:e.$t("Reply to email (optional)")},{default:S(()=>[w(a,{placeholder:e.$t("Optional email"),modelValue:r.email_settings.reply_to_email,"onUpdate:modelValue":t[3]||(t[3]=x=>r.email_settings.reply_to_email=x)},null,8,["placeholder","modelValue"]),_("div",ASe,[_("p",null,O(e.$t("If someone replies to your notification email, this is where you would like to receive it.")),1)])]),_:1},8,["label"])]),_:1})]),_:1}),w(u,{label:e.$t("Email Footer")},{default:S(()=>[_("div",NSe,[w(f,{modelValue:r.email_settings.email_footer,"onUpdate:modelValue":t[4]||(t[4]=x=>r.email_settings.email_footer=x),height:200},null,8,["modelValue"])]),_("div",PSe,[_("p",null,O(e.$t("This email footer will be used for all emails sent from FluentCommunity. It's highly recommended to use your business name and address in the footer for compliance.")),1),_("p",{innerHTML:e.$t("Use %1s tag to insert dynamic notification settings URL. Other Smartcode: %2s for Site Name with permalink","{{manage_email_notification_url|Manage Your Email Notifications Preference}}","{{site_name_with_url}}")},null,8,LSe)])]),_:1},8,["label"]),e.has_pro?(C(),H(u,{key:0},{default:S(()=>[w(p,{modelValue:r.email_settings.disable_powered_by,"onUpdate:modelValue":t[5]||(t[5]=x=>r.email_settings.disable_powered_by=x),"true-label":"yes","false-label":"no"},{default:S(()=>[ne(O(e.$t("Disable powered by FluentCommunity in the email footer")),1)]),_:1},8,["modelValue"])]),_:1})):z("",!0)]),RSe,_("div",DSe,[_("h3",VSe,O(e.$t("Email Notification Settings")),1),_("p",FSe,O(e.$t("This is the default settings that will be applied to all the community members. Individual members can over-write the settings for their own preference")),1),BSe,w(u,{label:e.$t("Email on new comment")},{default:S(()=>[w(p,{modelValue:r.email_settings.com_my_post_mail,"onUpdate:modelValue":t[6]||(t[6]=x=>r.email_settings.com_my_post_mail=x),"true-value":"yes","false-value":"no"},{default:S(()=>[ne(O(e.$t("Send an email to the author when a new comment is added to a post.")),1)]),_:1},8,["modelValue"]),r.email_settings.com_my_post_mail!="yes"?(C(),T("div",zSe,[_("p",null,O(e.$t("You should enable this. Currently disabled.")),1)])):z("",!0)]),_:1},8,["label"]),w(u,{label:e.$t("Email on comment reply")},{default:S(()=>[w(p,{modelValue:r.email_settings.reply_my_com_mail,"onUpdate:modelValue":t[7]||(t[7]=x=>r.email_settings.reply_my_com_mail=x),"true-value":"yes","false-value":"no"},{default:S(()=>[ne(O(e.$t("Email authors when someone replies to their comments.")),1)]),_:1},8,["modelValue"]),r.email_settings.reply_my_com_mail!="yes"?(C(),T("div",jSe,[_("p",null,O(e.$t("You should enable this. Currently disabled.")),1)])):z("",!0)]),_:1},8,["label"]),w(u,{label:e.$t("Email on Tagging / Mentioning")},{default:S(()=>[w(p,{modelValue:r.email_settings.mention_mail,"onUpdate:modelValue":t[8]||(t[8]=x=>r.email_settings.mention_mail=x),"true-value":"yes","false-value":"no"},{default:S(()=>[ne(O(e.$t("Send an email when an admin or moderator tags (@everyone) on a post or tags someone in a post or comment.")),1)]),_:1},8,["modelValue"]),r.email_settings.mention_mail!="yes"?(C(),T("div",HSe,[_("p",null,O(e.$t("You should enable this. Currently disabled.")),1)])):z("",!0)]),_:1},8,["label"]),w(u,null,{default:S(()=>[w(p,{"true-value":"yes","false-value":"no",modelValue:r.email_settings.digest_email_status,"onUpdate:modelValue":t[9]||(t[9]=x=>r.email_settings.digest_email_status=x)},{default:S(()=>[ne(O(e.$t("Enable Weekly Digest Email for community members")),1)]),_:1},8,["modelValue"]),_("div",USe,[_("p",null,O(e.$t("Members can enable/disable their own digest status")),1)])]),_:1}),w(d,{gutter:30},{default:S(()=>[w(c,{sm:24,md:12},{default:S(()=>[w(u,{label:e.$t("In which day, the digest email will be sent")},{default:S(()=>[w(m,{modelValue:r.email_settings.digest_mail_day,"onUpdate:modelValue":t[10]||(t[10]=x=>r.email_settings.digest_mail_day=x),placeholder:e.$t("Select Digest Email Day")},{default:S(()=>[w(h,{value:"mon",label:e.$t("Every Monday")},null,8,["label"]),w(h,{value:"tue",label:e.$t("Every Tuesday")},null,8,["label"]),w(h,{value:"wed",label:e.$t("Every Wednesday")},null,8,["label"]),w(h,{value:"thu",label:e.$t("Every Thursday")},null,8,["label"]),w(h,{value:"fri",label:e.$t("Every Friday")},null,8,["label"]),w(h,{value:"sat",label:e.$t("Every Saturday")},null,8,["label"]),w(h,{value:"sun",label:e.$t("Every Sunday")},null,8,["label"])]),_:1},8,["modelValue","placeholder"]),r.email_settings.digest_email_status=="yes"?(C(),T("div",WSe,[_("p",null,O(e.$t("Email will be sent if there are any unread notifications for the user from the last email sent.")),1)])):z("",!0)]),_:1},8,["label"])]),_:1}),w(c,{sm:24,md:12},{default:S(()=>[w(u,{label:e.$t("Time to send the digest email")},{default:S(()=>[w(y,{step:"00:10",start:"00:10",end:"23:59",modelValue:r.email_settings.daily_digest_time,"onUpdate:modelValue":t[11]||(t[11]=x=>r.email_settings.daily_digest_time=x)},null,8,["modelValue"]),_("p",KSe,O(e.$t("Approximate time when the digest emails will start sending for the members")),1)]),_:1},8,["label"])]),_:1})]),_:1})]),qSe,_("div",GSe,[Fe((C(),H(i,{onClick:s.save,disabled:r.saving,class:"fcom_primary_button"},{default:S(()=>[ne(O(e.$t("Save Settings")),1)]),_:1},8,["onClick","disabled"])),[[$,r.saving]])])]),_:1},8,["modelValue"])])):(C(),T("div",YSe,[_("p",null,O(e.$t("Settings could not be loaded")),1)]))])]),_:1},8,["title"])]),_:1})}const JSe=Be(wSe,[["render",ZSe]]),XSe={name:"CustomizationSettings",components:{Layout:Es,AppLayout:xs},data(){return{loading:!1,saving:!1,settings:null}},methods:{getSettings(){this.loading=!0,this.$get("settings/customization-settings").then(e=>{this.settings=e.settings}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})},save(){this.saving=!0,this.$post("settings/customization-settings",{settings:this.settings}).then(e=>{this.$notify.success(e.message),window.location.reload()}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})}},mounted(){this.getSettings(),this.changeTitle(this.$t("Customization Settings"))}},QSe={class:"settings_router"},e9e={key:0,class:"white_loaded"},t9e={key:1,class:"fhr_content_layout_body"},n9e={class:"setting_body"},o9e={class:"fcom_input_wrap"},r9e={class:"fcom_input_wrap"},s9e={class:"fcom_input_wrap"},i9e={key:0,class:"fcom_input_wrap"},l9e=["innerHTML"],a9e={key:1,style:{cursor:"pointer","font-weight":"bold"}},u9e={class:"fcom_input_wrap"},c9e={style:{"font-weight":"bold"}},d9e={class:"fcom_help_text"},f9e={target:"_blank",rel:"noopener",href:"https://wpmanageninja.com/affiliate/"},p9e={class:"fcom_input_wrap"},h9e={class:"fcom_input_wrap"},m9e={key:0},g9e={class:"fcom_help_text"},v9e={class:"fcom_input_wrap"},y9e={class:"fcom_help_text"},_9e={style:{"margin-top":"50px"},class:"fcom_input_wrap"},b9e={key:2};function w9e(e,t,n,o,r,s){const i=ut,l=Kn,a=aO,u=En,c=$t,d=bo,f=gh,p=ta,h=Mn,m=Tn,y=ee("layout"),v=ee("app-layout"),k=Rt("loading");return C(),H(v,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:S(()=>[w(y,{wrapper_class:"no_bg_layout fcom_setting_route",title:e.$t("Customize your portal")},{actions:S(()=>[Fe((C(),H(i,{class:"fcom_primary_button",onClick:s.save},{default:S(()=>[_("span",null,O(e.$t("Save Settings")),1)]),_:1},8,["onClick"])),[[k,r.saving]])]),default:S(()=>[_("div",QSe,[r.loading?(C(),T("div",e9e,[w(l,{rows:5,animated:!0})])):r.settings?(C(),T("div",t9e,[_("div",n9e,[_("p",null,O(e.$t("Customize the UI features of the portal.")),1),w(a),w(m,{onSubmit:t[9]||(t[9]=Ze(b=>e.doNothing(),["prevent"])),modelValue:r.settings,"onUpdate:modelValue":t[10]||(t[10]=b=>r.settings=b),"label-position":"top"},{default:S(()=>[_("div",o9e,[w(u,{"true-value":"yes","false-value":"no",modelValue:r.settings.dark_mode,"onUpdate:modelValue":t[0]||(t[0]=b=>r.settings.dark_mode=b)},{default:S(()=>[ne(O(e.$t("Enable Dark Mode")),1)]),_:1},8,["modelValue"]),_("p",null,O(e.$t("Enables switching between dark and light interface themes, accommodating different lighting conditions and user preferences.")),1)]),_("div",r9e,[w(u,{"true-value":"yes","false-value":"no",modelValue:r.settings.fixed_page_header,"onUpdate:modelValue":t[1]||(t[1]=b=>r.settings.fixed_page_header=b)},{default:S(()=>[ne(O(e.$t("Enable Sticky Page headers across portal")),1)]),_:1},8,["modelValue"]),_("p",null,O(e.$t("When enabled, the page header will remain visible at the top of the screen as users scroll down the page.")),1)]),_("div",s9e,[w(u,{"true-value":"yes","false-value":"no",modelValue:r.settings.feed_link_on_sidebar,"onUpdate:modelValue":t[2]||(t[2]=b=>r.settings.feed_link_on_sidebar=b)},{default:S(()=>[ne(O(e.$t("Show Default Feed link on left sidebar")),1)]),_:1},8,["modelValue"]),_("p",null,O(e.$t("Adds the default Feed link in the sidebar, providing an extra access point to the all feeds page")),1)]),e.has_pro?(C(),T("div",i9e,[w(u,{"true-value":"yes","false-value":"no",modelValue:r.settings.show_powered_by,"onUpdate:modelValue":t[3]||(t[3]=b=>r.settings.show_powered_by=b)},{default:S(()=>[ne(O(e.$t("Show powered by text")),1)]),_:1},8,["modelValue"]),_("p",null,[ne(O(e.$t("Displays a 'Powered by FluentCommunity' link, showing support for the platform and increasing its visibility."))+" ",1),w(d,{persistent:!1,placement:"bottom",width:400,trigger:"click"},{reference:S(()=>[r.settings.affiliate_id?(C(),T("span",a9e,O(e.$t("Affiliate ID: %s",r.settings.affiliate_id)),1)):(C(),T("span",{key:0,style:{cursor:"pointer"},innerHTML:e.$t("%1sClick here%2s to add affiliate ID","<b>","</b>")},null,8,l9e))]),default:S(()=>[_("div",u9e,[_("label",c9e,O(e.$t("Your affiliate ID")),1),w(c,{style:{margin:"20px 0"},placeholder:e.$t("Affiliate ID"),type:"number",modelValue:r.settings.affiliate_id,"onUpdate:modelValue":t[4]||(t[4]=b=>r.settings.affiliate_id=b)},null,8,["placeholder","modelValue"]),Fe((C(),H(i,{onClick:s.save,disabled:r.saving,class:"fcom_primary_button"},{default:S(()=>[ne(O(e.$t("Save")),1)]),_:1},8,["onClick","disabled"])),[[k,r.saving]])]),_("div",d9e,[_("p",null,[ne(O(e.$t("Don't have an affiliate account?"))+" ",1),_("a",f9e,O(e.$t("Click here"))+".",1)])])]),_:1})])])):z("",!0),_("div",p9e,[w(u,{"true-value":"yes","false-value":"no",modelValue:r.settings.icon_on_header_menu,"onUpdate:modelValue":t[5]||(t[5]=b=>r.settings.icon_on_header_menu=b)},{default:S(()=>[ne(O(e.$t("Show icon on header menu items")),1)]),_:1},8,["modelValue"]),_("p",null,O(e.$t("Adds icons next to text in header menu items, enhancing visual appeal and improving navigation clarity.")),1)]),z("",!0),_("div",h9e,[w(h,{label:e.$t("Rich Media Post Layout")},{default:S(()=>[w(p,{modelValue:r.settings.rich_post_layout,"onUpdate:modelValue":t[7]||(t[7]=b=>r.settings.rich_post_layout=b)},{default:S(()=>[w(f,{value:"classic"},{default:S(()=>[ne(O(e.$t("Classic")),1)]),_:1}),w(f,{disabled:!e.has_pro,value:"modern"},{default:S(()=>[ne(O(e.$t("Modern"))+" ",1),e.has_pro?z("",!0):(C(),T("span",m9e,"("+O(e.$t("Available on Pro"))+")",1))]),_:1},8,["disabled"])]),_:1},8,["modelValue"]),_("div",g9e,[_("p",null,O(e.$t("Classic: Image/Video after the content. Modern: Image/Video at first")),1)])]),_:1},8,["label"])]),_("div",v9e,[w(h,{label:e.$t("Post Title Requirements")},{default:S(()=>[w(p,{modelValue:r.settings.post_title_pref,"onUpdate:modelValue":t[8]||(t[8]=b=>r.settings.post_title_pref=b)},{default:S(()=>[w(f,{value:"optional"},{default:S(()=>[ne(O(e.$t("Optional")),1)]),_:1}),w(f,{value:"required"},{default:S(()=>[ne(O(e.$t("Required")),1)]),_:1}),w(f,{value:"disabled"},{default:S(()=>[ne(O(e.$t("Disabled")),1)]),_:1})]),_:1},8,["modelValue"]),_("div",y9e,[_("p",null,O(e.$t("When creating a new post, check if the post title is required or not")),1)])]),_:1},8,["label"])]),_("div",_9e,[Fe((C(),H(i,{onClick:s.save,disabled:r.saving,class:"fcom_primary_button"},{default:S(()=>[ne(O(e.$t("Save Settings")),1)]),_:1},8,["onClick","disabled"])),[[k,r.saving]])])]),_:1},8,["modelValue"])])])):(C(),T("div",b9e,[_("p",null,O(e.$t("Settings could not be loaded")),1)]))])]),_:1},8,["title"])]),_:1})}const C9e=Be(XSe,[["render",w9e]]),k9e={name:"PrivacySettings",components:{Layout:Es,AppLayout:xs},data(){return{loading:!1,saving:!1,settings:null}},methods:{getSettings(){this.loading=!0,this.$get("settings/privacy-settings").then(e=>{this.settings=e.settings}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})},save(){this.saving=!0,this.$post("settings/privacy-settings",{settings:this.settings}).then(e=>{this.$notify.success(e.message)}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})}},mounted(){this.getSettings(),this.changeTitle(this.$t("Privacy Settings"))}},S9e={class:"settings_router"},$9e={key:0,class:"white_loaded"},E9e={key:1,class:"fhr_content_layout_body"},x9e={class:"setting_body"},T9e={style:{"margin-top":"10px"},class:"fcom_help_text"},M9e={style:{"margin-top":"10px"},class:"fcom_help_text"},O9e={class:"fcom_input_wrap"},I9e={key:0},A9e={class:"fcom_input_wrap"},N9e={key:0},P9e={style:{"margin-top":"50px"},class:"fcom_input_wrap"},L9e={key:2};function R9e(e,t,n,o,r,s){const i=ut,l=Kn,a=aO,u=gh,c=ta,d=Mn,f=En,p=Tn,h=ee("layout"),m=ee("app-layout"),y=Rt("loading");return C(),H(m,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:S(()=>[w(h,{wrapper_class:"no_bg_layout fcom_setting_route",title:e.$t("Privacy Settings")},{actions:S(()=>[Fe((C(),H(i,{class:"fcom_primary_button",onClick:s.save},{default:S(()=>[_("span",null,O(e.$t("Save Settings")),1)]),_:1},8,["onClick"])),[[y,r.saving]])]),default:S(()=>[_("div",S9e,[r.loading?(C(),T("div",$9e,[w(l,{rows:5,animated:!0})])):r.settings?(C(),T("div",E9e,[_("div",x9e,[_("p",null,O(e.$t("Customize the privacy and compliance settings as per your needs.")),1),w(a),w(p,{onSubmit:t[5]||(t[5]=Ze(v=>e.doNothing(),["prevent"])),modelValue:r.settings,"onUpdate:modelValue":t[6]||(t[6]=v=>r.settings=v),"label-position":"top"},{default:S(()=>[w(d,{label:e.$t("Who can view all members page")},{default:S(()=>[w(c,{modelValue:r.settings.members_page_status,"onUpdate:modelValue":t[0]||(t[0]=v=>r.settings.members_page_status=v)},{default:S(()=>[w(u,{border:"",value:"everybody"},{default:S(()=>[ne(O(e.$t("Everybody")),1)]),_:1}),w(u,{border:"",value:"logged_in"},{default:S(()=>[ne(O(e.$t("Only logged-in members")),1)]),_:1}),w(u,{border:"",value:"admin_only"},{default:S(()=>[ne(O(e.$t("Only Admin/Moderators")),1)]),_:1})]),_:1},8,["modelValue"]),_("div",T9e,[_("p",null,O(e.$t("Choose whether the all-members page should be public, private, or admin/moderator only.")),1)])]),_:1},8,["label"]),w(d,{label:e.$t("Who can view membership spaces on the user profile page.")},{default:S(()=>[w(c,{modelValue:r.settings.user_space_visibility,"onUpdate:modelValue":t[1]||(t[1]=v=>r.settings.user_space_visibility=v)},{default:S(()=>[w(u,{border:"",value:"everybody"},{default:S(()=>[ne(O(e.$t("Everybody")),1)]),_:1}),w(u,{border:"",value:"logged_in"},{default:S(()=>[ne(O(e.$t("Only logged-in members")),1)]),_:1}),w(u,{border:"",value:"admin_only"},{default:S(()=>[ne(O(e.$t("Only Admin/Moderators")),1)]),_:1})]),_:1},8,["modelValue"]),_("div",M9e,[_("p",null,O(e.$t("Choose the privacy settings for spaces page of a member profile.")),1)])]),_:1},8,["label"]),_("div",O9e,[w(f,{disabled:!e.has_pro,"true-value":"yes","false-value":"no",modelValue:r.settings.can_customize_username,"onUpdate:modelValue":t[2]||(t[2]=v=>r.settings.can_customize_username=v)},{default:S(()=>[ne(O(e.$t("Users can change their community username"))+" ",1),e.has_pro?z("",!0):(C(),T("span",I9e,"("+O(e.$t("This feature is available on the pro version of FluentCommunity"))+")",1))]),_:1},8,["disabled","modelValue"]),_("p",null,O(e.$t("When enabled, members can change their username on their own. Otherwise, an admin or moderator can change the username.")),1)]),_("div",A9e,[w(f,{disabled:!e.has_pro,"true-value":"yes","false-value":"no",modelValue:r.settings.email_auto_login,"onUpdate:modelValue":t[3]||(t[3]=v=>r.settings.email_auto_login=v)},{default:S(()=>[ne(O(e.$t("Automtically login the user to the portal (secure with signed URL) from email notification links"))+" ",1),e.has_pro?z("",!0):(C(),T("span",N9e,"("+O(e.$t("This feature is available on the pro version of FluentCommunity"))+")",1))]),_:1},8,["disabled","modelValue"]),_("p",null,O(e.$t("When enabled, users will be automatically logged in to the portal when they click on the email notification links. This feature is secure and uses signed URLs.")),1)]),z("",!0),_("div",P9e,[Fe((C(),H(i,{onClick:s.save,disabled:r.saving,class:"fcom_primary_button"},{default:S(()=>[ne(O(e.$t("Save Settings")),1)]),_:1},8,["onClick","disabled"])),[[y,r.saving]])])]),_:1},8,["modelValue"])])])):(C(),T("div",L9e,[_("p",null,O(e.$t("Settings could not be loaded")),1)]))])]),_:1},8,["title"])]),_:1})}const D9e=Be(k9e,[["render",R9e]]),V9e={name:"UpgradeToProModal",props:{showModal:{type:Boolean,default:!0},upgrade_module:{type:String,required:!0}},data(){return{openModal:this.showModal,upgradeModule:c5e[this.upgrade_module]||{}}},watch:{openModal:function(){this.$emit("closeModal")}}},F9e={class:"fcom_upgrade_header"},B9e={class:"dialog_body"},z9e={class:"fcom_upgrade_banner"},j9e=["href"],H9e={class:"fcom_upgrade_content"},U9e={class:"fcom_feature_image"},W9e=["src","alt"],K9e={class:"fcom_upgrade_body"},q9e={class:"fcom_upgrade_description"},G9e=["href"];function Y9e(e,t,n,o,r,s){const i=na;return C(),H(i,{"modal-class":"fcom_upgrade_dialog","close-on-click-modal":!1,"append-to-body":!0,size:"50%",modelValue:r.openModal,"onUpdate:modelValue":t[0]||(t[0]=l=>r.openModal=l),direction:"rtl"},{header:S(()=>[_("div",F9e,[_("h4",null,O(r.upgradeModule.headerTitle),1),_("p",null,O(r.upgradeModule.headerDescription),1)])]),default:S(()=>[_("div",B9e,[_("div",z9e,[_("p",null," 🎉 "+O(e.$t("Discover exciting new features now!")),1),_("a",{href:e.appVars.upgrade_url,target:"_blank"},O(e.$t("Upgrade Now")),9,j9e)]),_("div",H9e,[_("div",U9e,[_("img",{src:e.appVars.assets_url+"images/upgrades/"+r.upgradeModule.featureImage,alt:r.upgradeModule.headerTitle},null,8,W9e)]),_("div",K9e,[_("h4",null,O(r.upgradeModule.bodyTitle),1),_("p",q9e,O(r.upgradeModule.bodyDescription),1),_("a",{class:"el-button fcom_primary_button",href:e.appVars.upgrade_url,target:"_blank"},O(e.$t("Upgrade to Pro")),9,G9e)])])])]),_:1},8,["modelValue"])}const Iv=Be(V9e,[["render",Y9e]]),Z9e={name:"StorageSettings",props:["features"],components:{UpgradeToProModal:Iv},data(){return{openUpgradeModal:!1,storageConfig:!1,showSettings:!1,fetching:!1,saving:!1,s3Locations:{}}},methods:{fetchSettings(){this.fetching=!0,this.$get("admin/storage-settings").then(e=>{this.storageConfig=e.config,this.s3Locations=e.s3_locations}).catch(e=>{this.$handleError(e)}).finally(()=>{this.fetching=!1})},openSettings(){if(!this.has_pro){this.openUpgradeModal=!0;return}this.showSettings=!0},saveSettings(){this.saving=!0,this.$post("admin/storage-settings",{config:this.storageConfig}).then(e=>{this.$notify.success(e.message)}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})},maybeResetConfig(){let e=this.storageConfig.driver;this.storageConfig={driver:e}}},mounted(){this.has_pro&&this.fetchSettings()}},J9e={class:"fcom_storage_settings"},X9e={class:"dialog_header"},Q9e={class:"dialog_left"},e$e={key:0,class:"white_loaded"},t$e={key:1,class:"dialog_body"},n$e={key:0},o$e=_("p",null,[ne(" Please "),_("a",{target:"_blank",rel:"noopener",href:"https://github.com/WPManageNinja/fluent-community-docs/blob/master/configure-cloudflare-r2.md"},"Read the documentation first "),ne(" to configure Cloudflare R2. ")],-1),r$e=_("hr",null,null,-1),s$e={class:"fcom_cloudflare_settings"},i$e=_("p",null,[ne(" Please "),_("a",{target:"_blank",rel:"noopener",href:"https://github.com/WPManageNinja/fluent-community-docs/blob/master/configure-amazon-s3.md"},"Read the documentation first "),ne(" to configure Amazon S3. ")],-1),l$e=_("hr",null,null,-1),a$e={class:"fcom_s3_settings"},u$e={key:2},c$e={class:"dialog_footer"},d$e={key:2};function f$e(e,t,n,o,r,s){const i=ut,l=Kn,a=Y0,u=ta,c=Mn,d=$t,f=$s,p=vr,h=Tn,m=bh,y=ee("UpgradeToProModal"),v=Rt("loading");return C(),T(de,null,[_("div",J9e,[w(i,{class:"fcom_secondary_button",onClick:t[0]||(t[0]=k=>s.openSettings())},{default:S(()=>{var k;return[ne(O(e.$t("Configure"))+" ("+O((k=r.storageConfig)==null?void 0:k.driver)+") ",1)]}),_:1})]),w(m,{"modal-class":"fcom_common_dialog",id:"fluent_comminity_body","close-on-click-modal":!1,"append-to-body":!0,width:e.dialogWidth,modelValue:r.showSettings,"onUpdate:modelValue":t[15]||(t[15]=k=>r.showSettings=k),direction:"rtl"},{header:S(({close:k})=>[_("div",X9e,[_("div",Q9e,[_("div",null,[_("h4",null,O(e.$t("Configure Media Storage")),1)])])])]),default:S(()=>[r.fetching?(C(),T("div",e$e,[w(l,{rows:5,animated:!0})])):r.storageConfig?(C(),T("div",t$e,[r.storageConfig.is_defined?(C(),T("p",n$e,O(e.$t("__CLOUD_STORAGE_CONFIGURED")),1)):(C(),T(de,{key:1},[w(h,{onSubmit:t[14]||(t[14]=Ze(k=>e.doNothing(),["prevent"])),"label-position":"top"},{default:S(()=>[w(c,{label:e.$t("Storage Location")},{default:S(()=>[w(u,{class:"fcom_radio_group",onChange:t[1]||(t[1]=k=>s.maybeResetConfig()),modelValue:r.storageConfig.driver,"onUpdate:modelValue":t[2]||(t[2]=k=>r.storageConfig.driver=k)},{default:S(()=>[w(a,{type:"primary",value:"local"},{default:S(()=>[ne(O(e.$t("Server Storage")),1)]),_:1}),w(a,{value:"cloudflare_r2"},{default:S(()=>[ne(O(e.$t("Cloudflare R2 (Recommended)")),1)]),_:1}),w(a,{value:"amazon_s3"},{default:S(()=>[ne(O(e.$t("Amazon S3")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),r.storageConfig.driver==="cloudflare_r2"?(C(),T(de,{key:0},[o$e,r$e,_("div",s$e,[w(c,{label:e.$t("Cloudflare Account ID")},{default:S(()=>[w(d,{placeholder:"eg: 1718cb5a51e65c8f19e8eec44a012hd32",modelValue:r.storageConfig.account_id,"onUpdate:modelValue":t[3]||(t[3]=k=>r.storageConfig.account_id=k)},null,8,["modelValue"])]),_:1},8,["label"]),w(c,{label:e.$t("Cloudflare Access Key")},{default:S(()=>[w(d,{type:"password",modelValue:r.storageConfig.access_key,"onUpdate:modelValue":t[4]||(t[4]=k=>r.storageConfig.access_key=k)},null,8,["modelValue"])]),_:1},8,["label"]),w(c,{label:e.$t("Cloudflare Secret Key")},{default:S(()=>[w(d,{type:"password",modelValue:r.storageConfig.secret_key,"onUpdate:modelValue":t[5]||(t[5]=k=>r.storageConfig.secret_key=k)},null,8,["modelValue"])]),_:1},8,["label"]),w(c,{label:e.$t("Cloudflare Bucket Name")},{default:S(()=>[w(d,{modelValue:r.storageConfig.bucket,"onUpdate:modelValue":t[6]||(t[6]=k=>r.storageConfig.bucket=k)},null,8,["modelValue"])]),_:1},8,["label"]),w(c,{label:e.$t("Cloudflare Bucket Public URL")},{default:S(()=>[w(d,{modelValue:r.storageConfig.public_url,"onUpdate:modelValue":t[7]||(t[7]=k=>r.storageConfig.public_url=k)},null,8,["modelValue"])]),_:1},8,["label"]),w(c,{label:e.$t("Bucket Sub-Folder (Optional)")},{default:S(()=>[w(d,{placeholder:e.$t("If you want to store files in a folder within the bucket."),modelValue:r.storageConfig.sub_folder,"onUpdate:modelValue":t[8]||(t[8]=k=>r.storageConfig.sub_folder=k)},null,8,["placeholder","modelValue"])]),_:1},8,["label"])])],64)):r.storageConfig.driver==="amazon_s3"?(C(),T(de,{key:1},[i$e,l$e,_("div",a$e,[w(c,{label:e.$t("Amazon S3 Access Key")},{default:S(()=>[w(d,{type:"password",modelValue:r.storageConfig.access_key,"onUpdate:modelValue":t[9]||(t[9]=k=>r.storageConfig.access_key=k)},null,8,["modelValue"])]),_:1},8,["label"]),w(c,{label:e.$t("Amazon S3 Secret Key")},{default:S(()=>[w(d,{type:"password",modelValue:r.storageConfig.secret_key,"onUpdate:modelValue":t[10]||(t[10]=k=>r.storageConfig.secret_key=k)},null,8,["modelValue"])]),_:1},8,["label"]),w(c,{label:e.$t("Amazon S3 Bucket Name")},{default:S(()=>[w(d,{modelValue:r.storageConfig.bucket,"onUpdate:modelValue":t[11]||(t[11]=k=>r.storageConfig.bucket=k)},null,8,["modelValue"])]),_:1},8,["label"]),w(c,{label:e.$t("Amazon S3 Location")},{default:S(()=>[w(p,{modelValue:r.storageConfig.s3_endpoint,"onUpdate:modelValue":t[12]||(t[12]=k=>r.storageConfig.s3_endpoint=k),placeholder:e.$t("Select S3 Location")},{default:S(()=>[(C(!0),T(de,null,nt(r.s3Locations,(k,b)=>(C(),H(f,{label:k,value:b},null,8,["label","value"]))),256))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),w(c,{label:e.$t("Bucket Sub-Folder (Optional)")},{default:S(()=>[w(d,{placeholder:e.$t("If you want to store files in a folder within the bucket."),modelValue:r.storageConfig.sub_folder,"onUpdate:modelValue":t[13]||(t[13]=k=>r.storageConfig.sub_folder=k)},null,8,["placeholder","modelValue"])]),_:1},8,["label"])])],64)):(C(),T("p",u$e,O(e.$t("Your files will be stored in the default Uploads folder")),1))]),_:1}),_("div",c$e,[Fe((C(),H(i,{class:"fcom_primary_button",disabled:r.saving,onClick:s.saveSettings},{default:S(()=>[ne(O(e.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[v,r.saving]])])],64))])):(C(),T("div",d$e,[_("p",null,O(e.$t("Config could not be loaded")),1)]))]),_:1},8,["width","modelValue"]),r.openUpgradeModal?(C(),H(y,{key:0,showModal:r.openUpgradeModal,onCloseModal:t[16]||(t[16]=k=>r.openUpgradeModal=!1),upgrade_module:"media_module"},null,8,["showModal"])):z("",!0)],64)}const p$e=Be(Z9e,[["render",f$e]]),h$e={name:"LeaderBoardConfig",props:["features"],emits:["saveSettings"],data(){return{levels:null,showSettings:!1,fetching:!1,saving:!1,openUpgradeModal:!1}},components:{UpgradeToProModal:Iv},methods:{openSettings(){if(!this.has_pro){this.openUpgradeModal=!0;return}this.fetchSettings(),this.showSettings=!0},fetchSettings(){this.fetching=!0,this.$get("admin/leaderboards/levels").then(e=>{this.levels=e.levels}).catch(e=>{this.$handleError(e)}).finally(()=>{this.fetching=!1})},saveSettings(){let e=this.features.leader_board_module=="yes";this.$emit("saveSettings",!e),e&&this.saveLevelSettings()},saveLevelSettings(){this.saving=!0,this.$post("admin/leaderboards/levels",{levels:this.levels}).then(e=>{this.$notify.success(e.message),this.$emit("saveSettings",!0)}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})}}},m$e={class:"fcom_storage_settings"},g$e={key:0,class:"white_loaded"},v$e={key:1,class:"dialog_body"},y$e={class:"fcom_level_table"},_$e={class:"fcom_level_table_row fcom_header_row"},b$e=_("div",{class:"fcom_lavel_num"}," # ",-1),w$e={class:"fcom_lavel_desc"},C$e={class:"fcom_lavel_actions"},k$e={class:"fcom_lavel_num"},S$e={class:"fcom_lavel_desc"},$$e={class:"fcom_lavel_actions"},E$e={class:"dialog_footer"},x$e={key:2};function T$e(e,t,n,o,r,s){const i=ut,l=Kn,a=En,u=Mn,c=$t,d=Tn,f=na,p=ee("UpgradeToProModal"),h=Rt("loading");return C(),T(de,null,[_("div",m$e,[w(i,{class:"fcom_secondary_button",onClick:t[0]||(t[0]=m=>s.openSettings())},{default:S(()=>[ne(O(e.$t("Settings")),1)]),_:1})]),w(f,{"modal-class":"fcom_common_dialog",id:"fluent_comminity_body","close-on-click-modal":!1,"append-to-body":!0,size:e.dialogWidth,modelValue:r.showSettings,"onUpdate:modelValue":t[3]||(t[3]=m=>r.showSettings=m),direction:"rtl"},{header:S(({close:m})=>[_("h4",null,O(e.$t("Leaderboard / Gamification Settings")),1)]),default:S(()=>[r.fetching?(C(),T("div",g$e,[w(l,{rows:5,animated:!0})])):r.levels?(C(),T("div",v$e,[w(d,{onSubmit:t[2]||(t[2]=Ze(m=>e.doNothing(),["prevent"])),"label-position":"top"},{default:S(()=>[w(u,null,{default:S(()=>[w(a,{modelValue:n.features.leader_board_module,"onUpdate:modelValue":t[1]||(t[1]=m=>n.features.leader_board_module=m),"true-label":"yes","false-label":"no",label:e.$t("Enable Leaderboards Module")},null,8,["modelValue","label"])]),_:1}),n.features.leader_board_module==="yes"?(C(),T(de,{key:0},[_("h5",null,O(e.$t("Leaderboard Levels")),1),_("div",y$e,[_("div",_$e,[b$e,_("div",w$e,O(e.$t("Title & Description")),1),_("div",C$e,O(e.$t("Minimum Points")),1)]),(C(!0),T(de,null,nt(r.levels,(m,y,v)=>(C(),T("div",{class:"fcom_level_table_row",key:y},[_("div",k$e,O(v+1),1),_("div",S$e,[w(c,{class:"fcom_bold_input",type:"text",modelValue:m.title,"onUpdate:modelValue":k=>m.title=k,placeholder:e.$t("Level Title")},null,8,["modelValue","onUpdate:modelValue","placeholder"]),w(c,{type:"text",modelValue:m.tagline,"onUpdate:modelValue":k=>m.tagline=k,placeholder:e.$t("Level Tagline")},null,8,["modelValue","onUpdate:modelValue","placeholder"])]),_("div",$$e,[w(u,{label:""},{default:S(()=>[w(c,{min:0,max:999999999,disabled:y==="level_1",type:"number",modelValue:m.min_points,"onUpdate:modelValue":k=>m.min_points=k,placeholder:e.$t("Minimum Points")},null,8,["disabled","modelValue","onUpdate:modelValue","placeholder"])]),_:2},1024)])]))),128))])],64)):z("",!0)]),_:1}),_("div",E$e,[Fe((C(),H(i,{class:"fcom_primary_button",disabled:r.saving,onClick:s.saveSettings},{default:S(()=>[ne(O(e.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[h,r.saving]])])])):(C(),T("div",x$e,[_("p",null,O(e.$t("Config could not be loaded")),1)]))]),_:1},8,["size","modelValue"]),r.openUpgradeModal?(C(),H(p,{key:0,showModal:r.openUpgradeModal,onCloseModal:t[4]||(t[4]=m=>r.openUpgradeModal=!1),upgrade_module:"leader_board_module"},null,8,["showModal"])):z("",!0)],64)}const M$e=Be(h$e,[["render",T$e]]),O$e={name:"SvgShapeGenerator",emits:["update"],data(){return{currentColor:"",selectedShape:"circle"}},computed:{svgShapes(){return{circle:`<svg class="fcom_shape fcom_shape_circle" viewBox="0 0 24 24" fill="${this.currentColor}" width="24px" height="24px"><path d="M0 0h24v24H0z" fill="none"/><circle cx="12" cy="12" r="12"/></svg>`,square:`<svg class="fcom_shape fcom_shape_square" viewBox="0 0 24 24" fill="${this.currentColor}" width="24px" height="24px"><path d="M0 0h24v24H0z" fill="none"/><rect x="0" y="0" width="24" height="24"/></svg>`,triangle:`<svg class="fcom_shape fcom_shape_triangle" viewBox="0 0 24 24" fill="${this.currentColor}" width="24px" height="24px"><path d="M0 0h24v24H0z" fill="none"/><path d="M21 12L2 2v20z"/></svg>`,star:`<svg class="fcom_shape fcom_shape_star" viewBox="0 0 24 24" width="24" height="24"><polygon points="12,2.4 14.6,8.4 21.6,8.4 15.6,13.2 18,19.6 12,15.6 6,19.6 8.4,13.2 2.4,8.4 9.4,8.4" fill="${this.currentColor}"/></svg>`,heart:`<svg class="fcom_shape fcom_shape_heart" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z" fill="${this.currentColor}"/></svg>`,diamond:`<svg class="fcom_shape fcom_shape_diamond" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><polygon points="12,2 22,12 12,22 2,12" fill="${this.currentColor}"/></svg>`}}},methods:{selectShape(e){this.selectedShape=e,this.$emit("update",this.svgShapes[e])},colorChanged(e){this.currentColor=e,this.$emit("update",this.svgShapes[this.selectedShape])}}},I$e={class:"fcom_svg_generator"},A$e={class:"fcom_form_item"},N$e={class:"fcom_form_item"},P$e=["innerHTML"];function L$e(e,t,n,o,r,s){const i=Z0,l=Y0,a=ta;return C(),T("div",I$e,[_("div",A$e,[_("label",null,O(e.$t("Select Shape Color:")),1),w(i,{predefine:e.appVars.suggestedColors,modelValue:r.currentColor,"onUpdate:modelValue":t[0]||(t[0]=u=>r.currentColor=u),onActiveChange:s.colorChanged,size:"large","show-alpha":""},null,8,["predefine","modelValue","onActiveChange"])]),_("div",N$e,[_("label",null,O(e.$t("Select Shape:")),1),w(a,{onChange:t[1]||(t[1]=u=>s.selectShape(r.selectedShape)),modelValue:r.selectedShape,"onUpdate:modelValue":t[2]||(t[2]=u=>r.selectedShape=u)},{default:S(()=>[(C(!0),T(de,null,nt(s.svgShapes,(u,c)=>(C(),H(l,{key:c,value:c},{default:S(()=>[_("div",{innerHTML:u},null,8,P$e)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])])])}const R$e=Be(O$e,[["render",L$e]]);var Bk="emoji-mart";const D$e=JSON;var rL=typeof window<"u"&&"localStorage"in window;let L2,R2;function V$e(e){e||(e={}),L2=e.getter,R2=e.setter}function F$e(e){Bk=e}function B$e(e){for(let t in e){let n=e[t];sL(t,n)}}function sL(e,t){if(R2)R2(e,t);else{if(!rL)return;try{window.localStorage[`${Bk}.${e}`]=D$e.stringify(t)}catch{}}}function z$e(e){if(L2)return L2(e);if(!rL)return;try{var t=window.localStorage[`${Bk}.${e}`]}catch{return}if(t)return JSON.parse(t)}const hd={update:B$e,set:sL,get:z$e,setNamespace:F$e,setHandlers:V$e},u_={name:"a",unified:"b",non_qualified:"c",has_img_apple:"d",has_img_google:"e",has_img_twitter:"f",has_img_facebook:"h",keywords:"j",sheet:"k",emoticons:"l",text:"m",short_names:"n",added_in:"o"},iL=e=>{const t=[];var n=(o,r)=>{o&&(Array.isArray(o)?o:[o]).forEach(s=>{(r?s.split(/[-|_|\s]+/):[s]).forEach(i=>{i=i.toLowerCase(),t.indexOf(i)==-1&&t.push(i)})})};return n(e.short_names,!0),n(e.name,!0),n(e.keywords,!1),n(e.emoticons,!1),t.join(",")};function lL(e){var t=Object.getOwnPropertyNames(e);for(let n of t){let o=e[n];e[n]=o&&typeof o=="object"?lL(o):o}return Object.freeze(e)}const j$e=e=>{if(!e.compressed)return e;e.compressed=!1;for(let t in e.emojis){let n=e.emojis[t];for(let o in u_)n[o]=n[u_[o]],delete n[u_[o]];n.short_names||(n.short_names=[]),n.short_names.unshift(t),n.sheet_x=n.sheet[0],n.sheet_y=n.sheet[1],delete n.sheet,n.text||(n.text=""),n.added_in||(n.added_in=6),n.added_in=n.added_in.toFixed(1),n.search=iL(n)}return e=lL(e),e},c_=["+1","grinning","kissing_heart","heart_eyes","laughing","stuck_out_tongue_winking_eye","sweat_smile","joy","scream","disappointed","unamused","weary","sob","sunglasses","heart","hankey"];let Tr,zk,D2={};function aL(){zk=!0,Tr=hd.get("frequently")}function H$e(e){zk||aL();var{id:t}=e;Tr||(Tr=D2),Tr[t]||(Tr[t]=0),Tr[t]+=1,hd.set("last",t),hd.set("frequently",Tr)}function U$e(e){if(zk||aL(),!Tr){D2={};const i=[];let l=Math.min(e,c_.length);for(let a=0;a<l;a++)D2[c_[a]]=parseInt((l-a)/4,10)+1,i.push(c_[a]);return i}const t=e,n=[];for(let i in Tr)Tr.hasOwnProperty(i)&&n.push(i);const r=n.sort((i,l)=>Tr[i]-Tr[l]).reverse().slice(0,t),s=hd.get("last");return s&&r.indexOf(s)==-1&&(r.pop(),r.push(s)),r}const V2={add:H$e,get:U$e},W$e={activity:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M12 0C5.373 0 0 5.372 0 12c0 6.627 5.373 12 12 12 6.628 0 12-5.373 12-12 0-6.628-5.372-12-12-12m9.949 11H17.05c.224-2.527 1.232-4.773 1.968-6.113A9.966 9.966 0 0 1 21.949 11M13 11V2.051a9.945 9.945 0 0 1 4.432 1.564c-.858 1.491-2.156 4.22-2.392 7.385H13zm-2 0H8.961c-.238-3.165-1.536-5.894-2.393-7.385A9.95 9.95 0 0 1 11 2.051V11zm0 2v8.949a9.937 9.937 0 0 1-4.432-1.564c.857-1.492 2.155-4.221 2.393-7.385H11zm4.04 0c.236 3.164 1.534 5.893 2.392 7.385A9.92 9.92 0 0 1 13 21.949V13h2.04zM4.982 4.887C5.718 6.227 6.726 8.473 6.951 11h-4.9a9.977 9.977 0 0 1 2.931-6.113M2.051 13h4.9c-.226 2.527-1.233 4.771-1.969 6.113A9.972 9.972 0 0 1 2.051 13m16.967 6.113c-.735-1.342-1.744-3.586-1.968-6.113h4.899a9.961 9.961 0 0 1-2.931 6.113"/></svg>',custom:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><g transform="translate(2.000000, 1.000000)"><rect id="Rectangle" x="8" y="0" width="3" height="21" rx="1.5"></rect><rect id="Rectangle" transform="translate(9.843, 10.549) rotate(60) translate(-9.843, -10.549) " x="8.343" y="0.049" width="3" height="21" rx="1.5"></rect><rect id="Rectangle" transform="translate(9.843, 10.549) rotate(-60) translate(-9.843, -10.549) " x="8.343" y="0.049" width="3" height="21" rx="1.5"></rect></g></svg>',flags:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M0 0l6.084 24H8L1.916 0zM21 5h-4l-1-4H4l3 12h3l1 4h13L21 5zM6.563 3h7.875l2 8H8.563l-2-8zm8.832 10l-2.856 1.904L12.063 13h3.332zM19 13l-1.5-6h1.938l2 8H16l3-2z"/></svg>',foods:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M17 4.978c-1.838 0-2.876.396-3.68.934.513-1.172 1.768-2.934 4.68-2.934a1 1 0 0 0 0-2c-2.921 0-4.629 1.365-5.547 2.512-.064.078-.119.162-.18.244C11.73 1.838 10.798.023 9.207.023 8.579.022 7.85.306 7 .978 5.027 2.54 5.329 3.902 6.492 4.999 3.609 5.222 0 7.352 0 12.969c0 4.582 4.961 11.009 9 11.009 1.975 0 2.371-.486 3-1 .629.514 1.025 1 3 1 4.039 0 9-6.418 9-11 0-5.953-4.055-8-7-8M8.242 2.546c.641-.508.943-.523.965-.523.426.169.975 1.405 1.357 3.055-1.527-.629-2.741-1.352-2.98-1.846.059-.112.241-.356.658-.686M15 21.978c-1.08 0-1.21-.109-1.559-.402l-.176-.146c-.367-.302-.816-.452-1.266-.452s-.898.15-1.266.452l-.176.146c-.347.292-.477.402-1.557.402-2.813 0-7-5.389-7-9.009 0-5.823 4.488-5.991 5-5.991 1.939 0 2.484.471 3.387 1.251l.323.276a1.995 1.995 0 0 0 2.58 0l.323-.276c.902-.78 1.447-1.251 3.387-1.251.512 0 5 .168 5 6 0 3.617-4.187 9-7 9"/></svg>',nature:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M15.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 15.5 8M8.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 8.5 8"/><path d="M18.933 0h-.027c-.97 0-2.138.787-3.018 1.497-1.274-.374-2.612-.51-3.887-.51-1.285 0-2.616.133-3.874.517C7.245.79 6.069 0 5.093 0h-.027C3.352 0 .07 2.67.002 7.026c-.039 2.479.276 4.238 1.04 5.013.254.258.882.677 1.295.882.191 3.177.922 5.238 2.536 6.38.897.637 2.187.949 3.2 1.102C8.04 20.6 8 20.795 8 21c0 1.773 2.35 3 4 3 1.648 0 4-1.227 4-3 0-.201-.038-.393-.072-.586 2.573-.385 5.435-1.877 5.925-7.587.396-.22.887-.568 1.104-.788.763-.774 1.079-2.534 1.04-5.013C23.929 2.67 20.646 0 18.933 0M3.223 9.135c-.237.281-.837 1.155-.884 1.238-.15-.41-.368-1.349-.337-3.291.051-3.281 2.478-4.972 3.091-5.031.256.015.731.27 1.265.646-1.11 1.171-2.275 2.915-2.352 5.125-.133.546-.398.858-.783 1.313M12 22c-.901 0-1.954-.693-2-1 0-.654.475-1.236 1-1.602V20a1 1 0 1 0 2 0v-.602c.524.365 1 .947 1 1.602-.046.307-1.099 1-2 1m3-3.48v.02a4.752 4.752 0 0 0-1.262-1.02c1.092-.516 2.239-1.334 2.239-2.217 0-1.842-1.781-2.195-3.977-2.195-2.196 0-3.978.354-3.978 2.195 0 .883 1.148 1.701 2.238 2.217A4.8 4.8 0 0 0 9 18.539v-.025c-1-.076-2.182-.281-2.973-.842-1.301-.92-1.838-3.045-1.853-6.478l.023-.041c.496-.826 1.49-1.45 1.804-3.102 0-2.047 1.357-3.631 2.362-4.522C9.37 3.178 10.555 3 11.948 3c1.447 0 2.685.192 3.733.57 1 .9 2.316 2.465 2.316 4.48.313 1.651 1.307 2.275 1.803 3.102.035.058.068.117.102.178-.059 5.967-1.949 7.01-4.902 7.19m6.628-8.202c-.037-.065-.074-.13-.113-.195a7.587 7.587 0 0 0-.739-.987c-.385-.455-.648-.768-.782-1.313-.076-2.209-1.241-3.954-2.353-5.124.531-.376 1.004-.63 1.261-.647.636.071 3.044 1.764 3.096 5.031.027 1.81-.347 3.218-.37 3.235"/></svg>',objects:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M12 0a9 9 0 0 0-5 16.482V21s2.035 3 5 3 5-3 5-3v-4.518A9 9 0 0 0 12 0zm0 2c3.86 0 7 3.141 7 7s-3.14 7-7 7-7-3.141-7-7 3.14-7 7-7zM9 17.477c.94.332 1.946.523 3 .523s2.06-.19 3-.523v.834c-.91.436-1.925.689-3 .689a6.924 6.924 0 0 1-3-.69v-.833zm.236 3.07A8.854 8.854 0 0 0 12 21c.965 0 1.888-.167 2.758-.451C14.155 21.173 13.153 22 12 22c-1.102 0-2.117-.789-2.764-1.453z"/><path d="M14.745 12.449h-.004c-.852-.024-1.188-.858-1.577-1.824-.421-1.061-.703-1.561-1.182-1.566h-.009c-.481 0-.783.497-1.235 1.537-.436.982-.801 1.811-1.636 1.791l-.276-.043c-.565-.171-.853-.691-1.284-1.794-.125-.313-.202-.632-.27-.913-.051-.213-.127-.53-.195-.634C7.067 9.004 7.039 9 6.99 9A1 1 0 0 1 7 7h.01c1.662.017 2.015 1.373 2.198 2.134.486-.981 1.304-2.058 2.797-2.075 1.531.018 2.28 1.153 2.731 2.141l.002-.008C14.944 8.424 15.327 7 16.979 7h.032A1 1 0 1 1 17 9h-.011c-.149.076-.256.474-.319.709a6.484 6.484 0 0 1-.311.951c-.429.973-.79 1.789-1.614 1.789"/></svg>',smileys:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"/><path d="M8 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 8 7M16 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 16 7M15.232 15c-.693 1.195-1.87 2-3.349 2-1.477 0-2.655-.805-3.347-2H15m3-2H6a6 6 0 1 0 12 0"/></svg>',people:'<svg xmlns:svg="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 24 24"> <path id="path3814" d="m 3.3591089,21.17726 c 0.172036,0.09385 4.265994,2.29837 8.8144451,2.29837 4.927767,0 8.670894,-2.211883 8.82782,-2.306019 0.113079,-0.06785 0.182268,-0.190051 0.182267,-0.321923 0,-3.03119 -0.929494,-5.804936 -2.617196,-7.810712 -1.180603,-1.403134 -2.661918,-2.359516 -4.295699,-2.799791 4.699118,-2.236258 3.102306,-9.28617162 -2.097191,-9.28617162 -5.1994978,0 -6.7963103,7.04991362 -2.097192,9.28617162 -1.6337821,0.440275 -3.1150971,1.396798 -4.2956991,2.799791 -1.687703,2.005776 -2.617196,4.779522 -2.617196,7.810712 1.2e-6,0.137378 0.075039,0.263785 0.195641,0.329572 z M 8.0439319,5.8308783 C 8.0439309,2.151521 12.492107,0.30955811 15.093491,2.9109411 17.694874,5.5123241 15.852911,9.9605006 12.173554,9.9605 9.8938991,9.9579135 8.0465186,8.1105332 8.0439319,5.8308783 Z m -1.688782,7.6894977 c 1.524535,-1.811449 3.5906601,-2.809035 5.8184041,-2.809035 2.227744,0 4.293869,0.997586 5.818404,2.809035 1.533639,1.822571 2.395932,4.339858 2.439152,7.108301 -0.803352,0.434877 -4.141636,2.096112 -8.257556,2.096112 -3.8062921,0 -7.3910861,-1.671043 -8.2573681,-2.104981 0.04505,-2.765017 0.906968,-5.278785 2.438964,-7.099432 z" /> <path id="path3816" d="M 12.173828 0.38867188 C 9.3198513 0.38867187 7.3770988 2.3672285 6.8652344 4.6308594 C 6.4218608 6.5916015 7.1153562 8.7676117 8.9648438 10.126953 C 7.6141249 10.677376 6.3550511 11.480944 5.3496094 12.675781 C 3.5629317 14.799185 2.6015625 17.701475 2.6015625 20.847656 C 2.6015654 21.189861 2.7894276 21.508002 3.0898438 21.671875 C 3.3044068 21.788925 7.4436239 24.039062 12.173828 24.039062 C 17.269918 24.039062 21.083568 21.776786 21.291016 21.652344 C 21.57281 21.483266 21.746097 21.176282 21.746094 20.847656 C 21.746094 17.701475 20.78277 14.799185 18.996094 12.675781 C 17.990455 11.480591 16.733818 10.675362 15.382812 10.125 C 17.231132 8.7655552 17.925675 6.5910701 17.482422 4.6308594 C 16.970557 2.3672285 15.027805 0.38867188 12.173828 0.38867188 z M 12.792969 2.3007812 C 13.466253 2.4161792 14.125113 2.7383941 14.695312 3.3085938 C 15.835712 4.4489931 15.985604 5.9473549 15.46875 7.1953125 C 14.951896 8.4432701 13.786828 9.3984378 12.173828 9.3984375 C 10.197719 9.3961954 8.607711 7.806187 8.6054688 5.8300781 C 8.6054683 4.2170785 9.5606362 3.0520102 10.808594 2.5351562 C 11.432573 2.2767293 12.119685 2.1853833 12.792969 2.3007812 z M 12.173828 11.273438 C 14.233647 11.273438 16.133674 12.185084 17.5625 13.882812 C 18.93069 15.508765 19.698347 17.776969 19.808594 20.283203 C 18.807395 20.800235 15.886157 22.162109 12.173828 22.162109 C 8.7614632 22.162109 5.6245754 20.787069 4.5390625 20.265625 C 4.6525896 17.766717 5.4203315 15.504791 6.7851562 13.882812 C 8.2139827 12.185084 10.11401 11.273438 12.173828 11.273438 z " /> </svg>',places:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M6.5 12C5.122 12 4 13.121 4 14.5S5.122 17 6.5 17 9 15.879 9 14.5 7.878 12 6.5 12m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5M17.5 12c-1.378 0-2.5 1.121-2.5 2.5s1.122 2.5 2.5 2.5 2.5-1.121 2.5-2.5-1.122-2.5-2.5-2.5m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5"/><path d="M22.482 9.494l-1.039-.346L21.4 9h.6c.552 0 1-.439 1-.992 0-.006-.003-.008-.003-.008H23c0-1-.889-2-1.984-2h-.642l-.731-1.717C19.262 3.012 18.091 2 16.764 2H7.236C5.909 2 4.738 3.012 4.357 4.283L3.626 6h-.642C1.889 6 1 7 1 8h.003S1 8.002 1 8.008C1 8.561 1.448 9 2 9h.6l-.043.148-1.039.346a2.001 2.001 0 0 0-1.359 2.097l.751 7.508a1 1 0 0 0 .994.901H3v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h6v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h1.096a.999.999 0 0 0 .994-.901l.751-7.508a2.001 2.001 0 0 0-1.359-2.097M6.273 4.857C6.402 4.43 6.788 4 7.236 4h9.527c.448 0 .834.43.963.857L19.313 9H4.688l1.585-4.143zM7 21H5v-1h2v1zm12 0h-2v-1h2v1zm2.189-3H2.811l-.662-6.607L3 11h18l.852.393L21.189 18z"/></svg>',recent:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M13 4h-2l-.001 7H9v2h2v2h2v-2h4v-2h-4z"/><path d="M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"/></svg>',symbols:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M0 0h11v2H0zM4 11h3V6h4V4H0v2h4zM15.5 17c1.381 0 2.5-1.116 2.5-2.493s-1.119-2.493-2.5-2.493S13 13.13 13 14.507 14.119 17 15.5 17m0-2.986c.276 0 .5.222.5.493 0 .272-.224.493-.5.493s-.5-.221-.5-.493.224-.493.5-.493M21.5 19.014c-1.381 0-2.5 1.116-2.5 2.493S20.119 24 21.5 24s2.5-1.116 2.5-2.493-1.119-2.493-2.5-2.493m0 2.986a.497.497 0 0 1-.5-.493c0-.271.224-.493.5-.493s.5.222.5.493a.497.497 0 0 1-.5.493M22 13l-9 9 1.513 1.5 8.99-9.009zM17 11c2.209 0 4-1.119 4-2.5V2s.985-.161 1.498.949C23.01 4.055 23 6 23 6s1-1.119 1-3.135C24-.02 21 0 21 0h-2v6.347A5.853 5.853 0 0 0 17 6c-2.209 0-4 1.119-4 2.5s1.791 2.5 4 2.5M10.297 20.482l-1.475-1.585a47.54 47.54 0 0 1-1.442 1.129c-.307-.288-.989-1.016-2.045-2.183.902-.836 1.479-1.466 1.729-1.892s.376-.871.376-1.336c0-.592-.273-1.178-.818-1.759-.546-.581-1.329-.871-2.349-.871-1.008 0-1.79.293-2.344.879-.556.587-.832 1.181-.832 1.784 0 .813.419 1.748 1.256 2.805-.847.614-1.444 1.208-1.794 1.784a3.465 3.465 0 0 0-.523 1.833c0 .857.308 1.56.924 2.107.616.549 1.423.823 2.42.823 1.173 0 2.444-.379 3.813-1.137L8.235 24h2.819l-2.09-2.383 1.333-1.135zm-6.736-6.389a1.02 1.02 0 0 1 .73-.286c.31 0 .559.085.747.254a.849.849 0 0 1 .283.659c0 .518-.419 1.112-1.257 1.784-.536-.651-.805-1.231-.805-1.742a.901.901 0 0 1 .302-.669M3.74 22c-.427 0-.778-.116-1.057-.349-.279-.232-.418-.487-.418-.766 0-.594.509-1.288 1.527-2.083.968 1.134 1.717 1.946 2.248 2.438-.921.507-1.686.76-2.3.76"/></svg>'},K$e={props:{i18n:{type:Object,required:!0},color:{type:String},categories:{type:Array,required:!0},activeCategory:{type:Object,default(){return{}}}},emits:["click"],created(){this.svgs=W$e}},q$e={role:"tablist",class:"emoji-mart-anchors"},G$e=["aria-label","aria-selected","data-title","onClick"],Y$e=["innerHTML"];function Z$e(e,t,n,o,r,s){return C(),T("div",q$e,[(C(!0),T(de,null,nt(n.categories,i=>(C(),T("button",{role:"tab",type:"button","aria-label":i.name,"aria-selected":i.id==n.activeCategory.id,key:i.id,class:D({"emoji-mart-anchor":!0,"emoji-mart-anchor-selected":i.id==n.activeCategory.id}),style:Ye({color:i.id==n.activeCategory.id?n.color:""}),"data-title":n.i18n.categories[i.id],onClick:l=>e.$emit("click",i)},[_("div",{"aria-hidden":"true",innerHTML:e.svgs[i.id]},null,8,Y$e),_("span",{"aria-hidden":"true",class:"emoji-mart-anchor-bar",style:Ye({backgroundColor:n.color})},null,4)],14,G$e))),128))])}const J$e=Be(K$e,[["render",Z$e]]),X$e=String,Q$e=X$e.fromCodePoint||function(){var t=16384,n=[],o,r,s=-1,i=arguments.length;if(!i)return"";for(var l="";++s<i;){var a=Number(arguments[s]);if(!isFinite(a)||a<0||a>1114111||Math.floor(a)!=a)throw RangeError("Invalid code point: "+a);a<=65535?n.push(a):(a-=65536,o=(a>>10)+55296,r=a%1024+56320,n.push(o,r)),(s+1===i||n.length>t)&&(l+=String.fromCharCode.apply(null,n),n.length=0)}return l};function eEe(e){var t=e.split("-"),n=t.map(o=>`0x${o}`);return Q$e.apply(null,n)}function s$(e){return e.reduce((t,n)=>(t.indexOf(n)===-1&&t.push(n),t),[])}function tEe(e,t){const n=s$(e),o=s$(t);return n.filter(r=>o.indexOf(r)>=0)}function uL(e,t){var n={};for(let o in e){let r=e[o],s=r;t.hasOwnProperty(o)&&(s=t[o]),typeof s=="object"&&(s=uL(r,s)),n[o]=s}return n}function nEe(){if(typeof document>"u")return 0;const e=document.createElement("div");e.style.width="100px",e.style.height="100px",e.style.overflow="scroll",e.style.position="absolute",e.style.top="-9999px",document.body.appendChild(e);const t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}const oEe=61,rEe=/^(?:\:([^\:]+)\:)(?:\:skin-tone-(\d)\:)?$/,i$=["1F3FA","1F3FB","1F3FC","1F3FD","1F3FE","1F3FF"];class sEe{constructor(t,{emojisToShowFilter:n,include:o,exclude:r,custom:s,recent:i,recentLength:l=20}={}){this._data=j$e(t),this._emojisFilter=n||null,this._include=o||null,this._exclude=r||null,this._custom=s||[],this._recent=i||V2.get(l),this._emojis={},this._nativeEmojis={},this._emoticons={},this._categories=[],this._recentCategory={id:"recent",name:"Recent",emojis:[]},this._customCategory={id:"custom",name:"Custom",emojis:[]},this._searchIndex={},this.buildIndex(),Object.freeze(this)}buildIndex(){let t=this._data.categories;if(this._include&&(t=t.filter(n=>this._include.includes(n.id)),t=t.sort((n,o)=>{const r=this._include.indexOf(n.id),s=this._include.indexOf(o.id);return r<s?-1:r>s?1:0})),t.forEach(n=>{if(!this.isCategoryNeeded(n.id))return;let o={id:n.id,name:n.name,emojis:[]};n.emojis.forEach(r=>{let s=this.addEmoji(r);s&&o.emojis.push(s)}),o.emojis.length&&this._categories.push(o)}),this.isCategoryNeeded("custom")){if(this._custom.length>0)for(let n of this._custom)this.addCustomEmoji(n);this._customCategory.emojis.length&&this._categories.push(this._customCategory)}this.isCategoryNeeded("recent")&&(this._recent.length&&this._recent.map(n=>{for(let o of this._customCategory.emojis)if(o.id===n){this._recentCategory.emojis.push(o);return}this.hasEmoji(n)&&this._recentCategory.emojis.push(this.emoji(n))}),this._recentCategory.emojis.length&&this._categories.unshift(this._recentCategory))}findEmoji(t,n){let o=t.match(rEe);if(o&&(t=o[1],o[2]&&(n=parseInt(o[2],10))),this._data.aliases.hasOwnProperty(t)&&(t=this._data.aliases[t]),this._emojis.hasOwnProperty(t)){let r=this._emojis[t];return n?r.getSkin(n):r}return this._nativeEmojis.hasOwnProperty(t)?this._nativeEmojis[t]:null}categories(){return this._categories}emoji(t){this._data.aliases.hasOwnProperty(t)&&(t=this._data.aliases[t]);let n=this._emojis[t];if(!n)throw new Error("Can not find emoji by id: "+t);return n}firstEmoji(){let t=this._emojis[Object.keys(this._emojis)[0]];if(!t)throw new Error("Can not get first emoji");return t}hasEmoji(t){return this._data.aliases.hasOwnProperty(t)&&(t=this._data.aliases[t]),!!this._emojis[t]}nativeEmoji(t){return this._nativeEmojis.hasOwnProperty(t)?this._nativeEmojis[t]:null}search(t,n){if(n||(n=75),!t.length)return null;if(t=="-"||t=="-1")return[this.emoji("-1")];let o=t.toLowerCase().split(/[\s|,|\-|_]+/),r=[];o.length>2&&(o=[o[0],o[1]]),r=o.map(i=>{let l=this._emojis,a=this._searchIndex,u=0;for(let c=0;c<i.length;c++){const d=i[c];if(u++,a[d]||(a[d]={}),a=a[d],!a.results){let f={};a.results=[],a.emojis={};for(let p in l){let h=l[p],m=h._data.search,y=i.substr(0,u),v=m.indexOf(y);if(v!=-1){let k=v+1;y==p&&(k=0),a.results.push(h),a.emojis[p]=h,f[p]=k}}a.results.sort((p,h)=>{var m=f[p.id],y=f[h.id];return m-y})}l=a.emojis}return a.results}).filter(i=>i);var s=null;return r.length>1?s=tEe.apply(null,r):r.length?s=r[0]:s=[],s&&s.length>n&&(s=s.slice(0,n)),s}addCustomEmoji(t){let n=Object.assign({},t,{id:t.short_names[0],custom:!0});n.search||(n.search=iL(n));let o=new l0(n);return this._emojis[o.id]=o,this._customCategory.emojis.push(o),o}addEmoji(t){let n=this._data.emojis[t];if(!this.isEmojiNeeded(n))return!1;let o=new l0(n);if(this._emojis[t]=o,o.native&&(this._nativeEmojis[o.native]=o),o._skins)for(let r in o._skins){let s=o._skins[r];s.native&&(this._nativeEmojis[s.native]=s)}return o.emoticons&&o.emoticons.forEach(r=>{this._emoticons[r]||(this._emoticons[r]=t)}),o}isCategoryNeeded(t){let n=this._include&&this._include.length?this._include.indexOf(t)>-1:!0,o=this._exclude&&this._exclude.length?this._exclude.indexOf(t)>-1:!1;return!(!n||o)}isEmojiNeeded(t){return this._emojisFilter?this._emojisFilter(t):!0}}class l0{constructor(t){if(this._data=Object.assign({},t),this._skins=null,this._data.skin_variations){this._skins=[];for(var n in i$){let o=i$[n],r=this._data.skin_variations[o],s=Object.assign({},t);for(let i in r)s[i]=r[i];delete s.skin_variations,s.skin_tone=parseInt(n)+1,this._skins.push(new l0(s))}}this._sanitized=iEe(this._data);for(let o in this._sanitized)this[o]=this._sanitized[o];this.short_names=this._data.short_names,this.short_name=this._data.short_names[0],Object.freeze(this)}getSkin(t){return t&&t!="native"&&this._skins?this._skins[t-1]:this}getPosition(){let t=oEe-1,n=+(100/t*this._data.sheet_x).toFixed(2),o=+(100/t*this._data.sheet_y).toFixed(2);return`${n}% ${o}%`}ariaLabel(){return[this.native].concat(this.short_names).filter(Boolean).join(", ")}}class cL{constructor(t,n,o,r,s,i,l){this._emoji=t,this._native=r,this._skin=n,this._set=o,this._fallback=s,this.canRender=this._canRender(),this.cssClass=this._cssClass(),this.cssStyle=this._cssStyle(l),this.content=this._content(),this.title=i===!0?t.short_name:null,this.ariaLabel=t.ariaLabel(),Object.freeze(this)}getEmoji(){return this._emoji.getSkin(this._skin)}_canRender(){return this._isCustom()||this._isNative()||this._hasEmoji()||this._fallback}_cssClass(){return["emoji-set-"+this._set,"emoji-type-"+this._emojiType()]}_cssStyle(t){let n={};return this._isCustom()?n={backgroundImage:"url("+this.getEmoji()._data.imageUrl+")",backgroundSize:"100%",width:t+"px",height:t+"px"}:this._hasEmoji()&&!this._isNative()&&(n={backgroundPosition:this.getEmoji().getPosition()}),t&&(this._isNative()?n=Object.assign(n,{fontSize:Math.round(t*.95*10)/10+"px"}):n=Object.assign(n,{width:t+"px",height:t+"px"})),n}_content(){return this._isCustom()?"":this._isNative()?this.getEmoji().native:this._hasEmoji()?"":this._fallback?this._fallback(this.getEmoji()):null}_isNative(){return this._native}_isCustom(){return this.getEmoji().custom}_hasEmoji(){if(!this.getEmoji()._data)return!1;const t=this.getEmoji()._data["has_img_"+this._set];return t===void 0?!0:t}_emojiType(){return this._isCustom()?"custom":this._isNative()?"native":this._hasEmoji()?"image":"fallback"}}function iEe(e){var{name:t,short_names:n,skin_tone:o,skin_variations:r,emoticons:s,unified:i,custom:l,imageUrl:a}=e,u=e.id||n[0],c=`:${u}:`;return l?{id:u,name:t,colons:c,emoticons:s,custom:l,imageUrl:a}:(o&&(c+=`:skin-tone-${o}:`),{id:u,name:t,colons:c,emoticons:s,unified:i.toLowerCase(),skin:o||(r?1:null),native:eEe(i)})}const lEe={native:{type:Boolean,default:!1},tooltip:{type:Boolean,default:!1},fallback:{type:Function},skin:{type:Number,default:1},set:{type:String,default:"apple"},emoji:{type:[String,Object],required:!0},size:{type:Number,default:null},tag:{type:String,default:"span"}},aEe={perLine:{type:Number,default:9},maxSearchResults:{type:Number,default:75},emojiSize:{type:Number,default:24},title:{type:String,default:"Emoji Mart™"},emoji:{type:String,default:"department_store"},color:{type:String,default:"#ae65c5"},set:{type:String,default:"apple"},skin:{type:Number,default:null},defaultSkin:{type:Number,default:1},native:{type:Boolean,default:!1},emojiTooltip:{type:Boolean,default:!1},autoFocus:{type:Boolean,default:!1},i18n:{type:Object,default(){return{}}},showPreview:{type:Boolean,default:!0},showSearch:{type:Boolean,default:!0},showCategories:{type:Boolean,default:!0},showSkinTones:{type:Boolean,default:!0},infiniteScroll:{type:Boolean,default:!0},pickerStyles:{type:Object,default(){return{}}}},uEe={props:{...lEe,data:{type:Object,required:!0}},emits:["click","mouseenter","mouseleave"],computed:{view(){return new cL(this.emojiObject,this.skin,this.set,this.native,this.fallback,this.tooltip,this.size)},sanitizedData(){return this.emojiObject._sanitized},title(){return this.tooltip?this.emojiObject.short_name:null},emojiObject(){return typeof this.emoji=="string"?this.data.findEmoji(this.emoji):this.emoji}},created(){},methods:{onClick(){this.$emit("click",this.emojiObject)},onMouseEnter(){this.$emit("mouseenter",this.emojiObject)},onMouseLeave(){this.$emit("mouseleave",this.emojiObject)}}};function cEe(e,t,n,o,r,s){return s.view.canRender?(C(),H(Pt(e.tag),{key:0,title:s.view.title,"aria-label":s.view.ariaLabel,"data-title":s.title,class:"emoji-mart-emoji",onMouseenter:s.onMouseEnter,onMouseleave:s.onMouseLeave,onClick:s.onClick},{default:S(()=>[_("span",{class:D(s.view.cssClass),style:Ye(s.view.cssStyle)},O(s.view.content),7)]),_:1},40,["title","aria-label","data-title","onMouseenter","onMouseleave","onClick"])):z("",!0)}const dL=Be(uEe,[["render",cEe]]),dEe={props:{data:{type:Object,required:!0},i18n:{type:Object,required:!0},id:{type:String,required:!0},name:{type:String,required:!0},emojis:{type:Array},emojiProps:{type:Object,required:!0}},methods:{activeClass:function(e){return!this.emojiProps.selectedEmoji||!this.emojiProps.selectedEmojiCategory?"":this.emojiProps.selectedEmoji.id==e.id&&this.emojiProps.selectedEmojiCategory.id==this.id?"emoji-mart-emoji-selected":""}},computed:{isVisible(){return!!this.emojis},isSearch(){return this.name=="Search"},hasResults(){return this.emojis.length>0},emojiObjects(){return this.emojis.map(e=>{let t=e,n=new cL(e,this.emojiProps.skin,this.emojiProps.set,this.emojiProps.native,this.emojiProps.fallback,this.emojiProps.emojiTooltip,this.emojiProps.emojiSize);return{emojiObject:t,emojiView:n}})}},components:{Emoji:dL}},fEe=["aria-label"],pEe={class:"emoji-mart-category-label"},hEe={class:"emoji-mart-category-label"},mEe=["aria-label","data-title","title","onMouseenter","onMouseleave","onClick"],gEe={key:0},vEe={class:"emoji-mart-no-results-label"};function yEe(e,t,n,o,r,s){const i=ee("emoji");return s.isVisible&&(s.isSearch||s.hasResults)?(C(),T("section",{key:0,class:D({"emoji-mart-category":!0,"emoji-mart-no-results":!s.hasResults}),"aria-label":n.i18n.categories[n.id]},[_("div",pEe,[_("h3",hEe,O(n.i18n.categories[n.id]),1)]),(C(!0),T(de,null,nt(s.emojiObjects,({emojiObject:l,emojiView:a})=>(C(),T(de,null,[a.canRender?(C(),T("button",{"aria-label":a.ariaLabel,role:"option","aria-selected":"false","aria-posinset":"1","aria-setsize":"1812",type:"button","data-title":l.short_name,key:l.id,title:a.title,class:D(["emoji-mart-emoji",s.activeClass(l)]),onMouseenter:u=>n.emojiProps.onEnter(a.getEmoji()),onMouseleave:u=>n.emojiProps.onLeave(a.getEmoji()),onClick:u=>n.emojiProps.onClick(a.getEmoji())},[_("span",{class:D(a.cssClass),style:Ye(a.cssStyle)},O(a.content),7)],42,mEe)):z("",!0)],64))),256)),s.hasResults?z("",!0):(C(),T("div",gEe,[w(i,{data:n.data,emoji:"sleuth_or_spy",native:n.emojiProps.native,skin:n.emojiProps.skin,set:n.emojiProps.set},null,8,["data","native","skin","set"]),_("div",vEe,O(n.i18n.notfound),1)]))],10,fEe)):z("",!0)}const _Ee=Be(dEe,[["render",yEe]]),bEe={props:{skin:{type:Number,required:!0}},emits:["change"],data(){return{opened:!1}},methods:{onClick(e){this.opened&&e!=this.skin&&this.$emit("change",e),this.opened=!this.opened}}},wEe=["onClick"];function CEe(e,t,n,o,r,s){return C(),T("div",{class:D({"emoji-mart-skin-swatches":!0,"emoji-mart-skin-swatches-opened":r.opened})},[(C(),T(de,null,nt(6,i=>_("span",{key:i,class:D({"emoji-mart-skin-swatch":!0,"emoji-mart-skin-swatch-selected":n.skin==i})},[_("span",{class:D("emoji-mart-skin emoji-mart-skin-tone-"+i),onClick:l=>s.onClick(i)},null,10,wEe)],2)),64))],2)}const kEe=Be(bEe,[["render",CEe]]),SEe={props:{data:{type:Object,required:!0},title:{type:String,required:!0},emoji:{type:[String,Object]},idleEmoji:{type:[String,Object],required:!0},showSkinTones:{type:Boolean,default:!0},emojiProps:{type:Object,required:!0},skinProps:{type:Object,required:!0},onSkinChange:{type:Function,required:!0}},computed:{emojiData(){return this.emoji?this.emoji:{}},emojiShortNames(){return this.emojiData.short_names},emojiEmoticons(){return this.emojiData.emoticons}},components:{Emoji:dL,Skins:kEe}},$Ee={class:"emoji-mart-preview"},EEe={class:"emoji-mart-preview-emoji"},xEe={class:"emoji-mart-preview-data"},TEe={class:"emoji-mart-preview-name"},MEe={class:"emoji-mart-preview-shortnames"},OEe={class:"emoji-mart-preview-emoticons"},IEe={class:"emoji-mart-preview-emoji"},AEe={class:"emoji-mart-preview-data"},NEe={class:"emoji-mart-title-label"},PEe={key:0,class:"emoji-mart-preview-skins"};function LEe(e,t,n,o,r,s){const i=ee("emoji"),l=ee("skins");return C(),T("div",$Ee,[n.emoji?(C(),T(de,{key:0},[_("div",EEe,[w(i,{data:n.data,emoji:n.emoji,native:n.emojiProps.native,skin:n.emojiProps.skin,set:n.emojiProps.set},null,8,["data","emoji","native","skin","set"])]),_("div",xEe,[_("div",TEe,O(n.emoji.name),1),_("div",MEe,[(C(!0),T(de,null,nt(s.emojiShortNames,a=>(C(),T("span",{key:a,class:"emoji-mart-preview-shortname"},":"+O(a)+":",1))),128))]),_("div",OEe,[(C(!0),T(de,null,nt(s.emojiEmoticons,a=>(C(),T("span",{key:a,class:"emoji-mart-preview-emoticon"},O(a),1))),128))])])],64)):(C(),T(de,{key:1},[_("div",IEe,[w(i,{data:n.data,emoji:n.idleEmoji,native:n.emojiProps.native,skin:n.emojiProps.skin,set:n.emojiProps.set},null,8,["data","emoji","native","skin","set"])]),_("div",AEe,[_("span",NEe,O(n.title),1)]),n.showSkinTones?(C(),T("div",PEe,[w(l,{skin:n.skinProps.skin,onChange:t[0]||(t[0]=a=>n.onSkinChange(a))},null,8,["skin"])])):z("",!0)],64))])}const REe=Be(SEe,[["render",LEe]]),DEe={props:{data:{type:Object,required:!0},i18n:{type:Object,required:!0},autoFocus:{type:Boolean,default:!1},onSearch:{type:Function,required:!0},onArrowLeft:{type:Function,required:!1},onArrowRight:{type:Function,required:!1},onArrowDown:{type:Function,required:!1},onArrowUp:{type:Function,required:!1},onEnter:{type:Function,required:!1}},emits:["search","enter","arrowUp","arrowDown","arrowRight","arrowLeft"],data(){return{value:""}},computed:{emojiIndex(){return this.data}},watch:{value(){this.$emit("search",this.value)}},methods:{clear(){this.value=""}},mounted(){let e=this.$el.querySelector("input");this.autoFocus&&e.focus()}},VEe={class:"emoji-mart-search"},FEe=["placeholder"],BEe=_("span",{class:"hidden",id:"emoji-picker-search-description"},"Use the left, right, up and down arrow keys to navigate the emoji search results.",-1);function zEe(e,t,n,o,r,s){return C(),T("div",VEe,[Fe(_("input",{type:"text",placeholder:n.i18n.search,role:"textbox","aria-autocomplete":"list","aria-owns":"emoji-mart-list","aria-label":"Search for an emoji","aria-describedby":"emoji-mart-search-description",onKeydown:[t[0]||(t[0]=Mt(i=>e.$emit("arrowLeft",i),["left"])),t[1]||(t[1]=Mt(()=>e.$emit("arrowRight"),["right"])),t[2]||(t[2]=Mt(()=>e.$emit("arrowDown"),["down"])),t[3]||(t[3]=Mt(i=>e.$emit("arrowUp",i),["up"])),t[4]||(t[4]=Mt(()=>e.$emit("enter"),["enter"]))],"onUpdate:modelValue":t[5]||(t[5]=i=>r.value=i)},null,40,FEe),[[Bc,r.value]]),BEe])}const jEe=Be(DEe,[["render",zEe]]);var HEe=typeof window<"u";HEe&&function(){for(var e=0,t=["ms","moz","webkit","o"],n=0;n<t.length&&!window.requestAnimationFrame;++n)window.requestAnimationFrame=window[t[n]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[t[n]+"CancelAnimationFrame"]||window[t[n]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(o,r){var s=new Date().getTime(),i=Math.max(0,16-(s-e)),l=window.setTimeout(function(){o(s+i)},i);return e=s+i,l}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(o){clearTimeout(o)})}();class UEe{constructor(t){this._vm=t,this._data=t.data,this._perLine=t.perLine,this._categories=[],this._categories.push(...this._data.categories()),this._categories=this._categories.filter(n=>n.emojis.length>0),this._categories[0].first=!0,Object.freeze(this._categories),this.activeCategory=this._categories[0],this.searchEmojis=null,this.previewEmoji=null,this.previewEmojiCategoryIdx=0,this.previewEmojiIdx=-1}onScroll(){const n=this._vm.$refs.scroll.scrollTop;let o=this.filteredCategories[0];for(let r=0,s=this.filteredCategories.length;r<s;r++){let i=this.filteredCategories[r],l=this._vm.getCategoryComponent(r);if(l&&l.$el.offsetTop-50>n)break;o=i}this.activeCategory=o}get allCategories(){return this._categories}get filteredCategories(){return this.searchEmojis?[{id:"search",name:"Search",emojis:this.searchEmojis}]:this._categories.filter(t=>t.emojis.length>0)}get previewEmojiCategory(){return this.previewEmojiCategoryIdx>=0?this.filteredCategories[this.previewEmojiCategoryIdx]:null}onAnchorClick(t){if(this.searchEmojis)return;let n=this.filteredCategories.indexOf(t),o=this._vm.getCategoryComponent(n),r=()=>{if(o){let s=o.$el.offsetTop;t.first&&(s=0),this._vm.$refs.scroll.scrollTop=s}};this._vm.infiniteScroll?r():this.activeCategory=this.filteredCategories[n]}onSearch(t){let n=this._data.search(t,this.maxSearchResults);this.searchEmojis=n,this.previewEmojiCategoryIdx=0,this.previewEmojiIdx=0,this.updatePreviewEmoji()}onEmojiEnter(t){this.previewEmoji=t,this.previewEmojiIdx=-1,this.previewEmojiCategoryIdx=-1}onEmojiLeave(t){this.previewEmoji=null}onArrowLeft(){this.previewEmojiIdx>0?this.previewEmojiIdx-=1:(this.previewEmojiCategoryIdx-=1,this.previewEmojiCategoryIdx<0?this.previewEmojiCategoryIdx=0:this.previewEmojiIdx=this.filteredCategories[this.previewEmojiCategoryIdx].emojis.length-1),this.updatePreviewEmoji()}onArrowRight(){this.previewEmojiIdx<this.emojisLength(this.previewEmojiCategoryIdx)-1?this.previewEmojiIdx+=1:(this.previewEmojiCategoryIdx+=1,this.previewEmojiCategoryIdx>=this.filteredCategories.length?this.previewEmojiCategoryIdx=this.filteredCategories.length-1:this.previewEmojiIdx=0),this.updatePreviewEmoji()}onArrowDown(){if(this.previewEmojiIdx==-1)return this.onArrowRight();const t=this.filteredCategories[this.previewEmojiCategoryIdx].emojis.length;let n=this._perLine;this.previewEmojiIdx+n>t&&(n=t%this._perLine);for(let o=0;o<n;o++)this.onArrowRight();this.updatePreviewEmoji()}onArrowUp(){let t=this._perLine;this.previewEmojiIdx-t<0&&(this.previewEmojiCategoryIdx>0?t=this.filteredCategories[this.previewEmojiCategoryIdx-1].emojis.length%this._perLine:t=0);for(let n=0;n<t;n++)this.onArrowLeft();this.updatePreviewEmoji()}updatePreviewEmoji(){this.previewEmoji=this.filteredCategories[this.previewEmojiCategoryIdx].emojis[this.previewEmojiIdx],this._vm.$nextTick(()=>{const t=this._vm.$refs.scroll,n=t.querySelector(".emoji-mart-emoji-selected"),o=t.offsetTop-t.offsetHeight;n&&n.offsetTop+n.offsetHeight>o+t.scrollTop&&(t.scrollTop+=n.offsetHeight),n&&n.offsetTop<t.scrollTop&&(t.scrollTop-=n.offsetHeight)})}emojisLength(t){return t==-1?0:this.filteredCategories[t].emojis.length}}const WEe={search:"Search",notfound:"No Emoji Found",categories:{search:"Search Results",recent:"Frequently Used",smileys:"Smileys & Emotion",people:"People & Body",nature:"Animals & Nature",foods:"Food & Drink",activity:"Activity",places:"Travel & Places",objects:"Objects",symbols:"Symbols",flags:"Flags",custom:"Custom"}},KEe={props:{...aEe,data:{type:Object,required:!0}},emits:["select","skin-change"],data(){return{activeSkin:this.skin||hd.get("skin")||this.defaultSkin,view:new UEe(this)}},computed:{customStyles(){return{width:this.calculateWidth+"px",...this.pickerStyles}},emojiProps(){return{native:this.native,skin:this.activeSkin,set:this.set,emojiTooltip:this.emojiTooltip,emojiSize:this.emojiSize,selectedEmoji:this.view.previewEmoji,selectedEmojiCategory:this.view.previewEmojiCategory,onEnter:this.onEmojiEnter.bind(this),onLeave:this.onEmojiLeave.bind(this),onClick:this.onEmojiClick.bind(this)}},skinProps(){return{skin:this.activeSkin}},calculateWidth(){return this.perLine*(this.emojiSize+12)+12+2+nEe()},filteredCategories(){return this.view.filteredCategories},mergedI18n(){return Object.freeze(uL(WEe,this.i18n))},idleEmoji(){try{return this.data.emoji(this.emoji)}catch(e){return console.error("Default preview emoji `"+this.emoji+"` is not available, check the Picker `emoji` property"),console.error(e),this.data.firstEmoji()}}},watch:{skin(){this.onSkinChange(this.skin)}},methods:{onScroll(){this.infiniteScroll&&!this.waitingForPaint&&(this.waitingForPaint=!0,window.requestAnimationFrame(this.onScrollPaint.bind(this)))},onScrollPaint(){this.waitingForPaint=!1,this.view.onScroll()},onAnchorClick(e){this.view.onAnchorClick(e)},onSearch(e){this.view.onSearch(e)},onEmojiEnter(e){this.view.onEmojiEnter(e)},onEmojiLeave(e){this.view.onEmojiLeave(e)},onArrowLeft(e){const t=this.view.previewEmojiIdx;this.view.onArrowLeft(),e&&this.view.previewEmojiIdx!==t&&e.preventDefault()},onArrowRight(){this.view.onArrowRight()},onArrowDown(){this.view.onArrowDown()},onArrowUp(e){this.view.onArrowUp(),e.preventDefault()},onEnter(){this.view.previewEmoji&&(this.$emit("select",this.view.previewEmoji),V2.add(this.view.previewEmoji))},onEmojiClick(e){this.$emit("select",e),V2.add(e)},onTextSelect(e){e.stopPropagation()},onSkinChange(e){this.activeSkin=e,hd.update({skin:e}),this.$emit("skin-change",e)},getCategoryComponent(e){let t=this.$refs["categories_"+e];return t&&"0"in t?t[0]:t}},components:{Anchors:J$e,Category:_Ee,Preview:REe,Search:jEe}},qEe={key:0,class:"emoji-mart-bar emoji-mart-bar-anchors"},GEe={id:"emoji-mart-list",ref:"scrollContent",role:"listbox","aria-expanded":"true"},YEe={key:0,class:"emoji-mart-bar emoji-mart-bar-preview"};function ZEe(e,t,n,o,r,s){const i=ee("anchors"),l=ee("search"),a=ee("category"),u=ee("preview");return C(),T("section",{class:"emoji-mart emoji-mart-static",style:Ye(s.customStyles)},[e.showCategories?(C(),T("div",qEe,[w(i,{data:n.data,i18n:s.mergedI18n,color:e.color,categories:r.view.allCategories,"active-category":r.view.activeCategory,onClick:s.onAnchorClick},null,8,["data","i18n","color","categories","active-category","onClick"])])):z("",!0),he(e.$slots,"searchTemplate",{data:n.data,i18n:e.i18n,autoFocus:e.autoFocus,onSearch:s.onSearch},()=>[e.showSearch?(C(),H(l,{key:0,ref:"search",data:n.data,i18n:s.mergedI18n,"auto-focus":e.autoFocus,"on-search":s.onSearch,onSearch:s.onSearch,onArrowLeft:s.onArrowLeft,onArrowRight:s.onArrowRight,onArrowDown:s.onArrowDown,onArrowUp:s.onArrowUp,onEnter:s.onEnter,onSelect:s.onTextSelect},null,8,["data","i18n","auto-focus","on-search","onSearch","onArrowLeft","onArrowRight","onArrowDown","onArrowUp","onEnter","onSelect"])):z("",!0)]),_("div",{role:"tabpanel",class:"emoji-mart-scroll",ref:"scroll",onScroll:t[0]||(t[0]=(...c)=>s.onScroll&&s.onScroll(...c))},[_("div",GEe,[he(e.$slots,"customCategory"),(C(!0),T(de,null,nt(r.view.filteredCategories,(c,d)=>Fe((C(),H(a,{ref_for:!0,ref:"categories_"+d,key:c.id,data:n.data,i18n:s.mergedI18n,id:c.id,name:c.name,emojis:c.emojis,"emoji-props":s.emojiProps},null,8,["data","i18n","id","name","emojis","emoji-props"])),[[en,e.infiniteScroll||c==r.view.activeCategory]])),128))],512)],544),he(e.$slots,"previewTemplate",{data:n.data,title:e.title,emoji:r.view.previewEmoji,idleEmoji:s.idleEmoji,showSkinTones:e.showSkinTones,emojiProps:s.emojiProps,skinProps:s.skinProps,onSkinChange:s.onSkinChange},()=>[e.showPreview?(C(),T("div",YEe,[w(u,{data:n.data,title:e.title,emoji:r.view.previewEmoji,"idle-emoji":s.idleEmoji,"show-skin-tones":e.showSkinTones,"emoji-props":s.emojiProps,"skin-props":s.skinProps,"on-skin-change":s.onSkinChange},null,8,["data","title","emoji","idle-emoji","show-skin-tones","emoji-props","skin-props","on-skin-change"])])):z("",!0)])],4)}const JEe=Be(KEe,[["render",ZEe]]),XEe={name:"EmojiPicker",components:{Picker:JEe},emits:["emoji-selected"],props:{close_on_select:{type:Boolean,default:!1}},data(){return{isEmojiPickerVisible:!1,emojiIndex:null,imojiLoading:!1,errorMessage:"",isLoading:!1}},methods:{onEmojiSelect(e){this.$emit("emoji-selected",e.native),this.close_on_select&&this.$refs.fcom_emoji_popover.hide()},handleClickOutside(e){if(this.isEmojiPickerVisible){const t=this.$refs.container;t&&!t.contains(e.target)&&(this.isEmojiPickerVisible=!1)}},loadEmojiAssets(){if(this.isLoading)return;this.isLoading=!0,window.fcomEmojiIndex&&(this.emojiIndex=window.fcomEmojiIndex);let e=this.appVars.assets_url+"libs/static/tw_emojis.json";this.imojiLoading=!0,fetch(e).then(t=>t.json()).then(t=>{t?(window.fcomEmojiIndex=new sEe(t),this.emojiIndex=window.fcomEmojiIndex,this.imojiLoading=!1):this.errorMessage="Emoji loading failed"}).catch(t=>{this.errorMessage="Emoji loading failed"}).finally(()=>{this.isLoading=!1})}}},QEe={style:{position:"relative"},ref:"container"},e7e=_("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[_("g",null,[_("circle",{cx:"9.99996",cy:"10.0013",r:"8.33333",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),_("path",{d:"M6.66663 12.5C7.42673 13.512 8.6369 14.1667 9.99996 14.1667C11.363 14.1667 12.5732 13.512 13.3333 12.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),_("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6.6741 7.5L6.66663 7.5Z",fill:"currentColor"}),_("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.3333 7.5L13.3258 7.5Z",fill:"currentColor"}),_("path",{d:"M6.6741 7.5L6.66663 7.5M13.3333 7.5L13.3258 7.5",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})])],-1),t7e={key:0,class:"emoji-mart emoji-mart-static",style:{width:"320px",padding:"10px 20px"}},n7e={key:0},o7e={style:{"text-align":"center","margin-bottom":"20px"}},r7e={key:1,class:"fcom_emoji_holder"};function s7e(e,t,n,o,r,s){const i=Ie,l=ut,a=Kn,u=ee("Picker"),c=bo;return C(),T("div",QEe,[w(c,{placement:"bottom",width:320,trigger:"click",persistent:!1,ref:"fcom_emoji_popover",onShow:s.loadEmojiAssets,"popper-class":"fcom_emoji_popover ffcom_emoji"},{reference:S(()=>[w(l,{"aria-label":"Pick Imoji",text:""},{default:S(()=>[w(i,null,{default:S(()=>[e7e]),_:1})]),_:1})]),default:S(()=>[r.imojiLoading?(C(),T("div",t7e,[r.errorMessage?(C(),T("div",n7e,O(r.errorMessage),1)):(C(),T(de,{key:1},[_("div",o7e,O(e.$t("Loading.....")),1),w(a,{animated:!0,rows:3})],64))])):r.emojiIndex?(C(),T("div",r7e,[w(u,{title:e.$t("Space Emoji"),color:"#66b1ff",showPreview:!1,ref:"picker",data:r.emojiIndex,set:"twitter",onSelect:s.onEmojiSelect,emojiSize:22,sheetSize:32,emojiTooltip:!1},null,8,["title","data","onSelect"])])):z("",!0)]),_:1},8,["onShow"])],512)}const fL=Be(XEe,[["render",s7e]]),i7e={name:"LogoEmojiSelector",components:{EmojiPicker:fL,ImageUploader:Md,SvgShapeGenerator:R$e},props:{config:{type:Object,required:!0,default:()=>({emoji:"",logo:"",shape_svg:""})},fallback_mark:{type:String,default:'<span class="fcom_no_avatar"></span>'},custom_svg:{type:Boolean,default:!1}},data(){return{emoji:this.config.emoji||"",logo:this.config.logo||"",shape_svg:this.config.shape_svg||"",visible:!1,selectedTab:"emoji"}},methods:{setData(e){e=="emoji"?(this.logo="",this.shape_svg=""):e=="shape_svg"?(this.emoji="",this.logo=""):(this.emoji="",this.shape_svg=""),this.$emit("update",{logo:this.logo,emoji:this.emoji,shape_svg:this.shape_svg})},handleLogoPhotoUpload(e){this.logo=e,this.setData("logo")},handleShapeChanged(e){this.shape_svg=e,this.setData("shape_svg")}},computed:{currentMark(){return this.logo?`<img alt="" src="${this.logo}" style="width: 20px; height: 20px; aspect-ratio: 1/1;">`:this.emoji.trim()?`<span style="font-size: 20px">${this.emoji.trim()}</span>`:this.shape_svg?'<i class="fcom_shape el-icon">'+this.shape_svg+"</i>":this.fallback_mark}},mounted(){if(this.logo)this.selectedTab="logo";else if(this.emoji)this.selectedTab="emoji";else if(this.shape_svg){if(this.custom_svg&&!/fcom_shape/.test(this.shape_svg)){this.selectedTab="shape_svg";return}this.selectedTab="shape"}}},l7e=["innerHTML"];function a7e(e,t,n,o,r,s){const i=ut,l=ee("EmojiPicker"),a=$t,u=tC,c=ee("SvgShapeGenerator"),d=xd,f=ee("ImageUploader"),p=eC,h=bo;return C(),H(h,{placement:"bottom",width:450,persistent:!1,style:{padding:"0"},visible:r.visible,ref:"logo_emoji_pop",class:"logo_emoji_pop"},{reference:S(()=>[w(i,{onClick:t[0]||(t[0]=m=>r.visible=!r.visible),text:""},{default:S(()=>[_("span",{class:"logo_emoji_holder",style:{cursor:"pointer"},innerHTML:s.currentMark||""},null,8,l7e)]),_:1})]),default:S(()=>[w(p,{modelValue:r.selectedTab,"onUpdate:modelValue":t[6]||(t[6]=m=>r.selectedTab=m),type:"border-card"},{default:S(()=>[w(u,{name:"emoji",label:e.$t("Emoji")},{default:S(()=>[w(a,{onChange:t[2]||(t[2]=m=>s.setData("emoji")),modelValue:r.emoji,"onUpdate:modelValue":t[3]||(t[3]=m=>r.emoji=m),placeholder:e.$t("Select or paste your emoji here"),style:{width:"100%"}},{append:S(()=>[w(l,{close_on_select:!0,onEmojiSelected:t[1]||(t[1]=m=>{r.emoji=m,s.setData("emoji")})})]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),w(u,{name:"shape",label:e.$t("Shape")},{default:S(()=>[w(c,{onUpdate:s.handleShapeChanged},null,8,["onUpdate"])]),_:1},8,["label"]),n.custom_svg?(C(),H(u,{key:0,name:"shape_svg",label:e.$t("Custom SVG")},{default:S(()=>[w(a,{rows:4,type:"textarea",onChange:t[4]||(t[4]=m=>s.setData("shape_svg")),modelValue:r.shape_svg,"onUpdate:modelValue":t[5]||(t[5]=m=>r.shape_svg=m),placeholder:e.$t("Paste your SVG here"),style:{width:"100%"}},null,8,["modelValue","placeholder"])]),_:1},8,["label"])):z("",!0),w(u,{name:"logo",label:e.$t("Custom Image")},{default:S(()=>[r.logo?(C(),H(d,{key:0,alt:e.$t("Logo"),src:r.logo,style:{"max-width":"100px"}},null,8,["alt","src"])):z("",!0),w(f,{additionalData:{resize:!0,max_width:400},onUploaded:s.handleLogoPhotoUpload},null,8,["onUploaded"])]),_:1},8,["label"])]),_:1},8,["modelValue"]),w(i,{onClick:t[7]||(t[7]=m=>{r.visible=!1}),type:"success",plain:"",style:{"margin-top":"20px"}},{default:S(()=>[ne(O(e.$t("Close")),1)]),_:1})]),_:1},8,["visible"])}const Av=Be(i7e,[["render",a7e]]),u7e={name:"UserBadgesConfig",components:{LogoEmojiSelector:Av,UpgradeToProModal:Iv},props:["features"],emits:["saveSettings"],data(){return{badges:null,showSettings:!1,fetching:!1,saving:!1,editingBadge:null,showEditBagdeModal:!1,openUpgradeModal:!1}},methods:{openSettings(){if(!this.has_pro){this.openUpgradeModal=!0;return}this.fetchSettings(),this.showSettings=!0},fetchSettings(){this.fetching=!0,this.$get("admin/user-badges").then(e=>{this.badges=e.badges}).catch(e=>{this.$handleError(e)}).finally(()=>{this.fetching=!1})},saveSettings(){let e=this.features.user_badge=="yes";this.$emit("saveSettings",!e),e&&this.saveBadgeSettings()},saveBadgeSettings(){this.saving=!0,this.$post("admin/user-badges",{badges:this.badges}).then(e=>{this.$notify.success(e.message),this.$emit("saveSettings",!1);let t=e.badges;this.badges=Object.values(t),this.features.user_badge=="yes"?this.appVars.user_badges=t:this.appVars.user_badges=null}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})},initAddNew(){this.editingBadge={title:"",config:{emoji:"",shape_svg:"",logo:""},show_label:"yes",color:"",background_color:""},this.showEditBagdeModal=!0},initEdit(e){this.editingBadge=e,this.showEditBagdeModal=!0},closeEdit(){this.badges.find(e=>{var t;return e.slug===((t=this.editingBadge)==null?void 0:t.slug)})||this.badges.push(this.editingBadge),this.showEditBagdeModal=!1,this.editingBadge=null,this.saveBadgeSettings()},deleteBadge(e){this.badges=this.badges.filter(t=>t.slug!==e.slug),this.saveBadgeSettings()}}},pL=e=>(rE("data-v-a34d3323"),e=e(),sE(),e),c7e={class:"fcom_storage_settings"},d7e={key:0,class:"white_loaded"},f7e={key:1},p7e={class:"header_user_badge"},h7e={style:{"margin-bottom":"30px"},class:"fcom_user_badges fcom_manager_table"},m7e={class:"fcom_badge_preview"},g7e={class:"fcom_table_action_col",style:{display:"flex",gap:"10px"}},v7e=["onClick"],y7e=pL(()=>_("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"16",viewBox:"0 0 14 16",fill:"none"},[_("path",{d:"M12 3.66602L11.5868 10.3494C11.4813 12.057 11.4285 12.9108 11.0005 13.5246C10.7889 13.8281 10.5164 14.0842 10.2005 14.2767C9.56141 14.666 8.70599 14.666 6.99516 14.666C5.28208 14.666 4.42554 14.666 3.78604 14.276C3.46987 14.0831 3.19733 13.8266 2.98579 13.5226C2.55792 12.9077 2.5063 12.0528 2.40307 10.3428L2 3.66602",stroke:"currentColor","stroke-linecap":"round"}),_("path",{d:"M1 3.66634H13M9.70382 3.66634L9.2487 2.72749C8.94638 2.10385 8.79522 1.79202 8.53448 1.59755C8.47664 1.55441 8.4154 1.51604 8.35135 1.48281C8.06261 1.33301 7.71608 1.33301 7.02302 1.33301C6.31255 1.33301 5.95732 1.33301 5.66379 1.48909C5.59873 1.52368 5.53666 1.5636 5.4782 1.60845C5.21443 1.81081 5.06709 2.13404 4.7724 2.78051L4.36862 3.66634",stroke:"currentColor","stroke-linecap":"round"}),_("path",{d:"M5.33325 11L5.33325 7",stroke:"currentColor","stroke-linecap":"round"}),_("path",{d:"M8.66675 11L8.66675 7",stroke:"currentColor","stroke-linecap":"round"})],-1)),_7e=[y7e],b7e=["onClick"],w7e=pL(()=>_("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none"},[_("path",{d:"M0.666748 7.00033C0.666748 4.01476 0.666748 2.52198 1.59424 1.59449C2.52174 0.666992 4.01452 0.666992 7.00008 0.666992C9.98564 0.666992 11.4784 0.666992 12.4059 1.59449C13.3334 2.52198 13.3334 4.01476 13.3334 7.00033C13.3334 9.98589 13.3334 11.4787 12.4059 12.4062C11.4784 13.3337 9.98564 13.3337 7.00008 13.3337C4.01452 13.3337 2.52174 13.3337 1.59424 12.4062C0.666748 11.4787 0.666748 9.98589 0.666748 7.00033Z",stroke:"currentColor","stroke-linejoin":"round"}),_("path",{d:"M5.66675 9.33398C5.66675 9.88627 5.21903 10.334 4.66675 10.334C4.11446 10.334 3.66675 9.88627 3.66675 9.33398C3.66675 8.7817 4.11446 8.33398 4.66675 8.33398C5.21903 8.33398 5.66675 8.7817 5.66675 9.33398Z",stroke:"currentColor"}),_("path",{d:"M10.3335 4.66699C10.3335 4.11471 9.88578 3.66699 9.3335 3.66699C8.78121 3.66699 8.3335 4.11471 8.3335 4.66699C8.3335 5.21928 8.78121 5.66699 9.3335 5.66699C9.88578 5.66699 10.3335 5.21928 10.3335 4.66699Z",stroke:"currentColor"}),_("path",{d:"M4.66675 8.33366L4.66675 3.66699",stroke:"currentColor","stroke-linecap":"round"}),_("path",{d:"M9.3335 5.66732L9.3335 10.334",stroke:"currentColor","stroke-linecap":"round"})],-1)),C7e=[w7e],k7e={key:2};function S7e(e,t,n,o,r,s){const i=ut,l=Kn,a=En,u=Mn,c=tv,d=ee("UserBadge"),f=ev,p=Tn,h=na,m=ee("logo-emoji-selector"),y=$t,v=Z0,k=_h,b=yh,$=bh,x=ee("UpgradeToProModal"),E=Rt("loading");return C(),T(de,null,[_("div",c7e,[w(i,{class:"fcom_secondary_button",onClick:t[0]||(t[0]=M=>s.openSettings())},{default:S(()=>[ne(O(e.$t("Settings")),1)]),_:1})]),w(h,{"modal-class":"fcom_common_dialog",id:"fluent_comminity_body","close-on-click-modal":!1,"append-to-body":!0,size:e.dialogWidth,modelValue:r.showSettings,"onUpdate:modelValue":t[4]||(t[4]=M=>r.showSettings=M),direction:"rtl"},{header:S(()=>[_("h4",null,O(e.$t("User Badge Settings")),1)]),default:S(()=>[r.fetching?(C(),T("div",d7e,[w(l,{rows:5,animated:!0})])):r.badges?(C(),T("div",f7e,[w(p,{onSubmit:t[3]||(t[3]=Ze(M=>e.doNothing(),["prevent"])),"label-position":"top"},{default:S(()=>[w(u,null,{default:S(()=>[w(a,{"true-label":"yes","false-label":"no",modelValue:n.features.user_badge,"onUpdate:modelValue":t[1]||(t[1]=M=>n.features.user_badge=M),label:e.$t("Enable User Badge Module"),size:"large"},null,8,["modelValue","label"])]),_:1}),n.features.user_badge==="yes"?(C(),T(de,{key:0},[_("div",p7e,[_("h3",null,O(e.$t("User Badges")),1),w(i,{class:"fcom_secondary_button",onClick:t[2]||(t[2]=M=>s.initAddNew()),size:"small"},{default:S(()=>[ne(O(e.$t("Add New")),1)]),_:1})]),_("div",h7e,[w(f,{stripe:"","empty-text":e.$t("No badges have been configured."),data:r.badges},{default:S(()=>[w(c,{prop:"title",label:e.$t("Title"),width:"200px"},null,8,["label"]),w(c,{label:e.$t("Preview")},{default:S(M=>[_("div",m7e,[w(d,{is_preview:!0,badge:M.row},null,8,["badge"])])]),_:1},8,["label"]),w(c,{width:"150px",label:e.$t("Actions")},{default:S(M=>[_("div",g7e,[_("div",{class:"action_item clickable",onClick:N=>s.deleteBadge(M.row)},_7e,8,v7e),_("div",{onClick:N=>s.initEdit(M.row),class:"action_item clickable"},C7e,8,b7e)])]),_:1},8,["label"])]),_:1},8,["empty-text","data"])])],64)):z("",!0),w(u,null,{default:S(()=>[Fe((C(),H(i,{class:"fcom_primary_button",disabled:r.saving,onClick:s.saveSettings},{default:S(()=>[ne(O(e.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[E,r.saving]])]),_:1})]),_:1})])):(C(),T("div",k7e,[_("p",null,O(e.$t("Config could not be loaded")),1)]))]),_:1},8,["size","modelValue"]),w($,{"append-to-body":!0,modelValue:r.showEditBagdeModal,"onUpdate:modelValue":t[14]||(t[14]=M=>r.showEditBagdeModal=M),title:e.$t("Edit Badge"),width:"30%"},{default:S(()=>[r.editingBadge?(C(),H(p,{key:0,onSubmit:t[13]||(t[13]=Ze(M=>e.doNothing(),["prevent"])),"label-position":"top"},{default:S(()=>[w(u,{label:e.$t("Title")},{default:S(()=>[w(y,{modelValue:r.editingBadge.title,"onUpdate:modelValue":t[6]||(t[6]=M=>r.editingBadge.title=M),placeholder:e.$t("Badge Title")},{prepend:S(()=>{var M,N;return[w(m,{fallback_mark:"",custom_svg:!0,onUpdate:t[5]||(t[5]=P=>{r.editingBadge.config.emoji=P.emoji,r.editingBadge.config.logo=P.logo,r.editingBadge.config.shape_svg=P.shape_svg}),config:{logo:r.editingBadge.config.logo,emoji:((M=r.editingBadge.config)==null?void 0:M.emoji)||"",shape_svg:(N=r.editingBadge.config)==null?void 0:N.shape_svg}},null,8,["config"])]}),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),w(u,null,{default:S(()=>[w(a,{modelValue:r.editingBadge.show_label,"onUpdate:modelValue":t[7]||(t[7]=M=>r.editingBadge.show_label=M),"true-value":"yes","false-value":"no"},{default:S(()=>[ne(O(e.$t("Show Label on Badge")),1)]),_:1},8,["modelValue"])]),_:1}),r.editingBadge.show_label=="yes"?(C(),T(de,{key:0},[w(b,{gutter:20},{default:S(()=>[w(k,{span:12},{default:S(()=>[w(u,{label:e.$t("Color")},{default:S(()=>[w(v,{predefine:e.appVars.suggestedColors,onActiveChange:t[8]||(t[8]=M=>{r.editingBadge.color=M}),modelValue:r.editingBadge.color,"onUpdate:modelValue":t[9]||(t[9]=M=>r.editingBadge.color=M)},null,8,["predefine","modelValue"])]),_:1},8,["label"])]),_:1}),w(k,{span:12},{default:S(()=>[w(u,{label:e.$t("Background Color")},{default:S(()=>[w(v,{predefine:e.appVars.suggestedColors,onActiveChange:t[10]||(t[10]=M=>{r.editingBadge.background_color=M}),modelValue:r.editingBadge.background_color,"onUpdate:modelValue":t[11]||(t[11]=M=>r.editingBadge.background_color=M)},null,8,["predefine","modelValue"])]),_:1},8,["label"])]),_:1})]),_:1}),_("p",null,O(e.$t("For best UI, keep the colors empty")),1)],64)):z("",!0),w(u,null,{default:S(()=>[w(i,{class:"fcom_primary_button",onClick:t[12]||(t[12]=M=>s.closeEdit())},{default:S(()=>[ne(O(e.$t("Save")),1)]),_:1})]),_:1})]),_:1})):z("",!0)]),_:1},8,["modelValue","title"]),r.openUpgradeModal?(C(),H(x,{key:0,showModal:r.openUpgradeModal,onCloseModal:t[15]||(t[15]=M=>r.openUpgradeModal=!1),upgrade_module:"user_badge_module"},null,8,["showModal"])):z("",!0)],64)}const $7e=Be(u7e,[["render",S7e],["__scopeId","data-v-a34d3323"]]),E7e={name:"Features",components:{UserBadgesConfig:$7e,LeaderBoardConfig:M$e,StorageSettings:p$e,Layout:Es,AppLayout:xs,UpgradeToProModal:Iv},data(){return{features:null,addOns:{},loading:!1,installing:!1,openGiphyUpgradeModal:!1,openEmojiUpgradeModal:!1}},methods:{saveFeatures(e=!0){if(this.features.giphy_module==="yes"&&nL(this.features.giphy_api_key)){this.$handleError("Giphy API Key is required");return}this.$post("settings/features",{features:this.features}).then(t=>{e&&(this.$notify.success(t.message||this.$t("Settings saved successfully")),location.reload())}).catch(t=>{this.$handleError(t)})},getFeatures(){this.loading=!0,this.$get("settings/features").then(e=>{this.features=e.features,this.addOns=e.addOns}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})},installPlugin(e){this.installing=!0,this.$post("settings/install_plugin",{plugin:e}).then(t=>{t.is_installed?this.$notify.success(t.message):this.$notify.error(this.$t("Sorry, the selected plugins could not be installed")),this.getFeatures()}).catch(t=>{this.$handleError(t)}).finally(()=>{this.installing=!1})}},mounted(){this.getFeatures(),this.changeTitle(this.$t("Features Settings"))}},x7e={class:"settings_router"},T7e={key:0,class:"white_loaded"},M7e=_("hr",null,null,-1),O7e={key:1,style:{"margin-bottom":"30px"}},I7e={class:"fhr_content_layout_body"},A7e={class:"setting_header"},N7e={class:"fcom_advancde_fetaures"},P7e={key:0,class:"setting_body"},L7e={class:"setting_item"},R7e={class:"setting_field_placeholder"},D7e={class:"title"},V7e={class:"info"},F7e={class:"settings_field_data"},B7e={class:"align-right"},z7e={class:"setting_item"},j7e={class:"setting_field_placeholder"},H7e={class:"title"},U7e={class:"info"},W7e={class:"settings_field_data"},K7e={class:"align-right"},q7e={class:"setting_item"},G7e={class:"setting_field_placeholder"},Y7e={class:"title"},Z7e={class:"info"},J7e={class:"settings_field_data"},X7e={class:"align-right"},Q7e={class:"fcom_module_popover_content"},exe={class:"setting_item"},txe={class:"setting_field_placeholder"},nxe={class:"title"},oxe={class:"info"},rxe={class:"settings_field_data"},sxe={class:"align-right"},ixe={key:0,class:"fcom_giphy_api",style:{"margin-bottom":"5px"}},lxe={class:"fcom_module_popover_content"},axe={class:"setting_item"},uxe={class:"setting_field_placeholder"},cxe={class:"title"},dxe={class:"info"},fxe={class:"settings_field_data"},pxe={class:"align-right"},hxe={class:"fcom_module_popover_content"},mxe={class:"setting_item"},gxe={class:"setting_field_placeholder"},vxe={class:"title"},yxe={class:"info"},_xe={class:"settings_field_data"},bxe={class:"align-right"},wxe={class:"fhr_content_layout_body"},Cxe={class:"setting_header"},kxe={class:"fcom_advancde_fetaures"},Sxe={key:0,class:"setting_body"},$xe={class:"setting_field_placeholder"},Exe={class:"title recommend_plugin",style:{display:"flex","align-items":"flex-start"}},xxe={class:"avatar",style:{"margin-right":"15px"}},Txe=["src"],Mxe=["href"],Oxe={class:"info"},Ixe={class:"settings_field_data"},Axe={class:"align-right"},Nxe=["href"];function Pxe(e,t,n,o,r,s){const i=Kn,l=vh,a=ee("LeaderBoardConfig"),u=ee("UserBadgesConfig"),c=En,d=ut,f=bo,p=$t,h=ee("UpgradeToProModal"),m=ee("storage-settings"),y=ee("layout"),v=ee("app-layout");return C(),H(v,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:S(()=>[w(y,{wrapper_class:"no_bg_layout fcom_setting_route",title:e.$t("Advanced Features & Addons")},{default:S(()=>[_("div",x7e,[r.loading?(C(),T("div",T7e,[w(i,{rows:5,animated:!0}),M7e,w(i,{rows:7,animated:!0})])):(C(),T("div",O7e,[_("div",I7e,[_("div",A7e,[_("h2",null,O(e.$t("Advanced Features")),1)]),_("div",N7e,[r.features?(C(),T("div",P7e,[_("div",L7e,[_("div",R7e,[_("div",D7e,[ne(O(e.$t("Leaderboards Module"))+" ",1),e.has_pro?(C(),T(de,{key:0},[r.features.leader_board_module==="no"?(C(),H(l,{key:0,type:"info",size:"small"},{default:S(()=>[ne(O(e.$t("Disabled")),1)]),_:1})):r.features.leader_board_module==="yes"?(C(),H(l,{key:1,type:"success",size:"small",effect:"light"},{default:S(()=>[ne(O(e.$t("Enabled")),1)]),_:1})):z("",!0)],64)):z("",!0)]),_("div",V7e,O(e.$t("__LEADERBOARD_DESC")),1)]),_("div",F7e,[_("div",B7e,[w(a,{onSaveSettings:s.saveFeatures,features:r.features},null,8,["onSaveSettings","features"])])])]),_("div",z7e,[_("div",j7e,[_("div",H7e,[ne(O(e.$t("User Badges"))+" ",1),e.has_pro?(C(),T(de,{key:0},[r.features.user_badge==="no"?(C(),H(l,{key:0,type:"info",size:"small"},{default:S(()=>[ne(O(e.$t("Disabled")),1)]),_:1})):r.features.user_badge==="yes"?(C(),H(l,{key:1,type:"success",size:"small",effect:"light"},{default:S(()=>[ne(O(e.$t("Enabled")),1)]),_:1})):z("",!0)],64)):z("",!0)]),_("div",U7e,O(e.$t("__USER_BADGE_DESC")),1)]),_("div",W7e,[_("div",K7e,[w(u,{onSaveSettings:s.saveFeatures,features:r.features},null,8,["onSaveSettings","features"])])])]),_("div",q7e,[_("div",G7e,[_("div",Y7e,[ne(O(e.$t("Course Module"))+" ",1),r.features.course_module==="no"?(C(),H(l,{key:0,type:"info",size:"small"},{default:S(()=>[ne(O(e.$t("Disabled")),1)]),_:1})):r.features.course_module==="yes"?(C(),H(l,{key:1,type:"success",size:"small",effect:"light"},{default:S(()=>[ne(O(e.$t("Enabled")),1)]),_:1})):z("",!0)]),_("div",Z7e,O(e.$t("__COURSE_STRUCTURED_LESSONS")),1)]),_("div",J7e,[_("div",X7e,[w(f,{persistent:!1,placement:"bottom",title:e.$t("Course Module Settings"),width:400,trigger:"click"},{reference:S(()=>[w(d,{size:"default",class:"fcom_secondary_button"},{default:S(()=>[ne(O(e.$t("Settings")),1)]),_:1})]),default:S(()=>[_("div",Q7e,[w(c,{modelValue:r.features.course_module,"onUpdate:modelValue":t[0]||(t[0]=k=>r.features.course_module=k),"true-label":"yes","false-label":"no",label:e.$t("Enable Course Module"),size:"large"},null,8,["modelValue","label"]),w(d,{class:"fcom_primary_button",size:"default",onClick:s.saveFeatures},{default:S(()=>[ne(O(e.$t("Save")),1)]),_:1},8,["onClick"])])]),_:1},8,["title"])])])]),_("div",exe,[_("div",txe,[_("div",nxe,[ne(O(e.$t("Giphy Module"))+" ",1),e.has_pro?(C(),T(de,{key:0},[r.features.giphy_module==="no"?(C(),H(l,{key:0,type:"info",size:"small",effect:"dark"},{default:S(()=>[ne(O(e.$t("Disabled")),1)]),_:1})):r.features.giphy_module==="yes"?(C(),H(l,{key:1,type:"success",size:"small",effect:"light"},{default:S(()=>[ne(O(e.$t("Enabled")),1)]),_:1})):z("",!0)],64)):z("",!0)]),_("div",oxe,O(e.$t("Unlock potential by using giphy when creating a new article , post or comment")),1)]),_("div",rxe,[_("div",sxe,[r.openGiphyUpgradeModal?z("",!0):(C(),H(f,{key:0,persistent:!1,placement:"bottom",title:e.$t("Giphy Module Settings"),width:400,trigger:"click"},{reference:S(()=>[w(d,{size:"default",class:"fcom_secondary_button",onClick:t[3]||(t[3]=k=>!e.has_pro&&(r.openGiphyUpgradeModal=!0))},{default:S(()=>[ne(O(e.$t("Settings")),1)]),_:1})]),default:S(()=>[r.features.giphy_module==="yes"?(C(),T("div",ixe,[w(p,{modelValue:r.features.giphy_api_key,"onUpdate:modelValue":t[1]||(t[1]=k=>r.features.giphy_api_key=k),placeholder:e.$t("Giphy API Key")},null,8,["modelValue","placeholder"])])):z("",!0),_("div",lxe,[w(c,{"true-value":"yes","false-value":"no",modelValue:r.features.giphy_module,"onUpdate:modelValue":t[2]||(t[2]=k=>r.features.giphy_module=k),label:e.$t("Enable Giphy Module"),size:"large"},null,8,["modelValue","label"]),w(d,{class:"fcom_primary_button",size:"default",onClick:s.saveFeatures},{default:S(()=>[ne(O(e.$t("Save")),1)]),_:1},8,["onClick"])])]),_:1},8,["title"])),r.openGiphyUpgradeModal?(C(),H(h,{key:1,showModal:r.openGiphyUpgradeModal,onCloseModal:t[4]||(t[4]=k=>r.openGiphyUpgradeModal=!1),upgrade_module:"giphy_module"},null,8,["showModal"])):z("",!0)])])]),_("div",axe,[_("div",uxe,[_("div",cxe,[ne(O(e.$t("Emoji Module"))+" ",1),e.has_pro?(C(),T(de,{key:0},[r.features.emoji_module==="no"?(C(),H(l,{key:0,type:"info",size:"small",effect:"dark"},{default:S(()=>[ne(O(e.$t("Disabled")),1)]),_:1})):r.features.emoji_module==="yes"?(C(),H(l,{key:1,type:"success",size:"small",effect:"light"},{default:S(()=>[ne(O(e.$t("Enabled")),1)]),_:1})):z("",!0)],64)):z("",!0)]),_("div",dxe,O(e.$t("__EMOJIS_DESC")),1)]),_("div",fxe,[_("div",pxe,[r.openEmojiUpgradeModal?z("",!0):(C(),H(f,{key:0,persistent:!1,placement:"bottom",title:e.$t("Emoji Settings"),width:400,trigger:"click"},{reference:S(()=>[w(d,{size:"default",class:"fcom_secondary_button",onClick:t[6]||(t[6]=k=>!e.has_pro&&(r.openEmojiUpgradeModal=!0))},{default:S(()=>[ne(O(e.$t("Settings")),1)]),_:1})]),default:S(()=>[_("div",hxe,[w(c,{"true-value":"yes","false-value":"no",modelValue:r.features.emoji_module,"onUpdate:modelValue":t[5]||(t[5]=k=>r.features.emoji_module=k),label:e.$t("Enable Emoji"),size:"large"},null,8,["modelValue","label"]),w(d,{class:"fcom_primary_button",size:"default",onClick:s.saveFeatures},{default:S(()=>[ne(O(e.$t("Save")),1)]),_:1},8,["onClick"])])]),_:1},8,["title"])),r.openEmojiUpgradeModal?(C(),H(h,{key:1,showModal:r.openEmojiUpgradeModal,onCloseModal:t[7]||(t[7]=k=>r.openEmojiUpgradeModal=!1),upgrade_module:"emoji_module"},null,8,["showModal"])):z("",!0)])])]),_("div",mxe,[_("div",gxe,[_("div",vxe,[ne(O(e.$t("Media Module"))+" ",1),r.features.cloud_storage==="yes"?(C(),H(l,{key:0,type:"success",size:"small",effect:"light"},{default:S(()=>[ne(O(e.$t("Enabled")),1)]),_:1})):r.features.cloud_storage==="no"?(C(),H(l,{key:1,type:"info",size:"small"},{default:S(()=>[ne(O(e.$t("Local")),1)]),_:1})):z("",!0)]),_("div",yxe,O(e.$t("__CLOUD_STORAGE_DESC")),1)]),_("div",_xe,[_("div",bxe,[w(m,{features:r.features},null,8,["features"])])])])])):z("",!0)])])])),_("div",wxe,[_("div",Cxe,[_("h2",null,O(e.$t("Recommended Plugins and Addons")),1)]),_("div",kxe,[r.features?(C(),T("div",Sxe,[(C(!0),T(de,null,nt(r.addOns,(k,b)=>(C(),T("div",{key:b,class:"setting_item"},[_("div",$xe,[_("div",Exe,[_("div",xxe,[_("img",{alt:"",src:k.logo,style:{width:"60px"}},null,8,Txe)]),_("div",null,[_("a",{target:"_blank",href:k.learn_more_url},O(k.title),9,Mxe),k.is_installed?(C(),H(l,{key:0,type:"success",size:"small",effect:"light",style:{"margin-left":"8px"}},{default:S(()=>[ne(O(e.$t("Installed")),1)]),_:1})):z("",!0),_("div",Oxe,O(k.description),1)])])]),_("div",Ixe,[_("div",Axe,[k.is_installed?(C(),T("a",{key:1,href:k.settings_url,class:"el-button el-button--default fcom_secondary_button"},O(e.$t("View Settings")),9,Nxe)):(C(),H(d,{key:0,class:"fcom_secondary_button",onClick:$=>s.installPlugin(b)},{default:S(()=>[ne(O(k.action_text),1)]),_:2},1032,["onClick"]))])])]))),128))])):z("",!0)])])])]),_:1},8,["title"])]),_:1})}const Lxe=Be(E7e,[["render",Pxe]]),Rxe={name:"FluentDnD",props:{items:{type:Array,required:!0},itemClass:{type:String},itemStyle:{type:String},rowKey:{type:String,default:"id"}},emits:["dragStart","dragEnd","drop"],data(){return{draggingIndex:null,startIndex:null}},methods:{dragStart(e,t){this.draggingIndex=t,this.startIndex=t,e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",""),this.$emit("dragEnd",t)},dragEnd(){this.draggingIndex=null,this.startIndex=null},dragOver(e,t){if(e.preventDefault(),this.draggingIndex===null)return;const n=this.items[this.draggingIndex],o=this.items[t];if(n===o)return;const r=e.currentTarget.getBoundingClientRect(),s=r.top+r.height/2,i=e.clientY;(this.draggingIndex<t&&i>s||this.draggingIndex>t&&i<s)&&(this.reorderItems(this.draggingIndex,t),this.draggingIndex=t)},dropEnd(e,t){this.draggingIndex===null||this.startIndex===t||(this.draggingIndex=null,this.$emit("drop",{index:t,newItems:this.items}))},reorderItems(e,t){const n=this.items.splice(e,1)[0];this.items.splice(t,0,n)}}},Dxe={class:"drag-container"},Vxe=["onDragstart","onDragover","onDrop"];function Fxe(e,t,n,o,r,s){return C(),T("div",Dxe,[w($0,{name:"flip-list",tag:"div",class:"drag-group"},{default:S(()=>[(C(!0),T(de,null,nt(n.items,(i,l)=>(C(),T("div",{key:i[n.rowKey],onDragstart:a=>s.dragStart(a,l),onDragend:t[0]||(t[0]=(...a)=>s.dragEnd&&s.dragEnd(...a)),onDragover:Ze(a=>s.dragOver(a,l),["prevent"]),onDrop:Ze(a=>s.dropEnd(a,l),["prevent"]),draggable:!0,class:D(["drag-item",`${n.itemClass} hello_${l}`,{dragging:r.draggingIndex===l}]),style:Ye(n.itemStyle)},[he(e.$slots,"item",{data:i,index:l},void 0,!0)],46,Vxe))),128))]),_:3})])}const Nv=Be(Rxe,[["render",Fxe],["__scopeId","data-v-51d9f44b"]]),Bxe={name:"MenuGroupSettings",components:{FluentDnD:Nv,LogoEmojiSelector:Av},data(){return{loading:!1,saving:!1,editingItem:null,editLinkModal:!1,isDragging:!1,isSpaceDragging:!1,draggingIndex:null,draggedSpaceIndex:null}},emits:["save"],props:{menuItems:{type:Array,required:!0},title:{type:String,required:!0},has_svg:{type:Boolean,default:!0},use_icon_selector:{type:Boolean,default:!1},has_enable_disable:{type:Boolean,default:!0},custom_svg:{type:Boolean,default:!1}},methods:{initEditLink(e){this.editingItem=e,this.editLinkModal=!0},removeLink(e){this.$confirm(this.$t("Are you sure you want to remove this link?"),this.$t("Warning"),{confirmButtonText:this.$t("Yes"),cancelButtonText:this.$t("Cancel"),type:"warning"}).then(()=>{this.menuItems.splice(e,1),this.saveMenuItems()}).catch(()=>{})},createOrUpdateLink(){this.editingItem.slug||(this.editingItem.slug="fcom_custom_"+this.editingItem.title.toLowerCase().replace(/[^a-z0-9]/g,"_"),this.menuItems.push(this.editingItem)),this.editLinkModal=!1,this.saveMenuItems(),this.editingItem=null},saveMenuItems(){this.$emit("save")},drop({index:e}){this.draggingIndex=null,this.saveMenuItems()}}},zxe={key:0,class:"fcom_section_primary"},jxe={class:"fcom_section_primary_item"},Hxe={class:"fcom_section_primary_item_title"},Uxe={class:"fcom_heading_item"},Wxe={class:"fcom_section_item_actions"},Kxe={class:"fcom_section_items menu-items-container"},qxe={key:0,style:{padding:"1rem"}},Gxe={class:"fcom_section_item_title"},Yxe={class:"fcom_heading_item"},Zxe=_("div",{class:"fcom_drag_handle"}," ⋮⋮ ",-1),Jxe={key:0,class:"community_avatar"},Xxe=["src"],Qxe={key:1,class:"fcom_emoji"},eTe={key:2,class:"fcom_shape"},tTe=["innerHTML"],nTe={class:"fcom_section_item_actions"},oTe={key:0},rTe={key:1},sTe={key:0};function iTe(e,t,n,o,r,s){const i=ut,l=Ie,a=vh,u=ee("FluentDnD"),c=ee("logo-emoji-selector"),d=$t,f=Mn,p=En,h=Tn,m=na;return C(),T(de,null,[n.menuItems?(C(),T("div",zxe,[_("div",jxe,[_("div",Hxe,[_("div",Uxe,[he(e.$slots,"title",{},()=>[_("h4",null,O(n.title),1)])])]),_("div",Wxe,[w(i,{class:"fcom_primary_button",onClick:t[0]||(t[0]=y=>s.initEditLink({enabled:"yes",new_tab:"yes"}))},{default:S(()=>[ne(O(e.$t("Add New Link")),1)]),_:1})])]),_("div",Kxe,[n.menuItems.length?z("",!0):(C(),T("div",qxe,[_("p",null,O(e.$t("No link has been added for this section")),1)])),w(u,{items:n.menuItems,"row-key":"slug",onDrop:s.drop,"item-class":"fcom_section_item","item-style":"padding: 15px 15px 15px 35px"},{item:S(({data:y,index:v})=>[_("div",Gxe,[_("p",Yxe,[n.use_icon_selector?(C(),T(de,{key:0},[Zxe,y.icon_image?(C(),T("div",Jxe,[w(l,null,{default:S(()=>[_("img",{alt:"",style:{"max-width":"16px","max-height":"16px"},src:y.icon_image},null,8,Xxe)]),_:2},1024)])):y.emoji?(C(),T("span",Qxe,O(y.emoji),1)):y.shape_svg?(C(),T("span",eTe,[w(l,{innerHTML:y.shape_svg},null,8,["innerHTML"])])):z("",!0)],64)):y.icon_svg?(C(),H(l,{key:1},{default:S(()=>[_("span",{innerHTML:y.icon_svg},null,8,tTe)]),_:2},1024)):z("",!0),_("span",null,O(y.title),1),y.is_unavailable=="yes"?(C(),H(a,{key:2,type:"danger"},{default:S(()=>[ne(O(e.$t("unavailable")),1)]),_:1})):y.enabled=="yes"?(C(),H(a,{key:3,type:"success"},{default:S(()=>[ne(O(e.$t("enabled")),1)]),_:1})):(C(),H(a,{key:4,type:"info"},{default:S(()=>[ne(O(e.$t("disabled")),1)]),_:1}))])]),_("div",nTe,[_("div",null,[w(i,{onClick:k=>s.initEditLink(y),size:"small"},{default:S(()=>[ne(O(e.$t("Edit")),1)]),_:2},1032,["onClick"]),y.is_system!="yes"?(C(),H(i,{key:0,onClick:k=>s.removeLink(v),type:"danger",plain:"",size:"small"},{default:S(()=>[ne(O(e.$t("Delete")),1)]),_:2},1032,["onClick"])):z("",!0)])])]),_:1},8,["items","onDrop"])])])):z("",!0),w(m,{"modal-class":"fcom_common_dialog",id:"fluent_comminity_body",class:"fcom_high_drawer","close-on-click-modal":!1,size:e.drawerWidth,modelValue:r.editLinkModal,"onUpdate:modelValue":t[9]||(t[9]=y=>r.editLinkModal=y),direction:"rtl"},{header:S(()=>[r.editLinkModal&&r.editLinkModal.slug?(C(),T("h4",oTe,O(e.$t("Edit Link")),1)):(C(),T("h4",rTe,O(e.$t("Add Custom Link")),1))]),default:S(()=>[r.editingItem?(C(),T("div",sTe,[w(h,{onSubmit:t[8]||(t[8]=Ze(y=>e.doNothing(),["prevent"])),"label-position":"top"},{default:S(()=>[w(f,{label:e.$t("Name of the Link")},{default:S(()=>[w(d,{placeholder:e.$t("Public Name of the item"),modelValue:r.editingItem.title,"onUpdate:modelValue":t[2]||(t[2]=y=>r.editingItem.title=y)},ms({_:2},[n.use_icon_selector&&r.editingItem.is_system!="yesw"?{name:"prepend",fn:S(()=>[w(c,{custom_svg:n.custom_svg,fallback_mark:"",onUpdate:t[1]||(t[1]=y=>{r.editingItem.emoji=y.emoji,r.editingItem.icon_image=y.logo,r.editingItem.shape_svg=y.shape_svg}),config:{logo:r.editingItem.icon_image,emoji:r.editingItem.emoji||"",shape_svg:r.editingItem.shape_svg||""}},null,8,["custom_svg","config"])]),key:"0"}:void 0]),1032,["placeholder","modelValue"])]),_:1},8,["label"]),w(f,{label:e.$t("URL")},{default:S(()=>[w(d,{disabled:r.editingItem.is_system,type:"url",placeholder:e.$t("Url of the item"),modelValue:r.editingItem.permalink,"onUpdate:modelValue":t[3]||(t[3]=y=>r.editingItem.permalink=y)},null,8,["disabled","placeholder","modelValue"])]),_:1},8,["label"]),n.has_svg?(C(),H(f,{key:0,label:e.$t("SVG Code for Icon (Simplified SVG Code) / Emoji")},{default:S(()=>[w(d,{placeholder:e.$t("SVG Code. No url please / You can use emoji"),type:"textarea",rows:3,modelValue:r.editingItem.icon_svg,"onUpdate:modelValue":t[4]||(t[4]=y=>r.editingItem.icon_svg=y)},null,8,["placeholder","modelValue"])]),_:1},8,["label"])):z("",!0),n.has_enable_disable?(C(),H(f,{key:1},{default:S(()=>[w(p,{"true-value":"yes","false-value":"no",modelValue:r.editingItem.enabled,"onUpdate:modelValue":t[5]||(t[5]=y=>r.editingItem.enabled=y)},{default:S(()=>[ne(O(e.$t("Enable this link")),1)]),_:1},8,["modelValue"])]),_:1})):z("",!0),r.editingItem.is_system?z("",!0):(C(),H(f,{key:2},{default:S(()=>[w(p,{"true-value":"yes","false-value":"no",modelValue:r.editingItem.new_tab,"onUpdate:modelValue":t[6]||(t[6]=y=>r.editingItem.new_tab=y)},{default:S(()=>[ne(O(e.$t("Open this link in a new tab.")),1)]),_:1},8,["modelValue"])]),_:1})),w(f,null,{default:S(()=>[w(i,{class:"fcom_primary_button",onClick:t[7]||(t[7]=y=>s.createOrUpdateLink())},{default:S(()=>[ne(O(e.$t("Save")),1)]),_:1})]),_:1})]),_:1})])):z("",!0)]),_:1},8,["size","modelValue"])],64)}const hL=Be(Bxe,[["render",iTe]]),lTe={name:"EditableContentInput",$emit:["update:modelValue"],props:{modelValue:{type:String,default:""},placeholder:{type:String,default:"Write something..."},wrapper_class:{type:String,default:""},show_button:{type:Boolean,default:!1}},computed:{listeners(){return{input:this.onInput}}},mounted(){this.$refs.editable.innerText=this.modelValue},methods:{onInput(e){let t=e.target.innerText,n=window.getSelection().getRangeAt(0).startOffset;t&&(t=t.replace(/<br>/g," "),t=t.replace(/<[^>]*>?/gm,""),t=t.replace(/ /g,""),t=t.replace(/\n/g," ")),this.$refs.editable.focus(),this.$refs.editable.innerText=t,this.$emit("update:modelValue",t),this.$nextTick(()=>{this.$refs.editable.innerText=t,this.$refs.editable.focus();let o=document.createRange(),r=window.getSelection();o.selectNodeContents(this.$refs.editable);const s=Math.min(n,t.length);o.setStart(this.$refs.editable.childNodes[0]||this.$refs.editable,s),o.collapse(!0),r.removeAllRanges(),r.addRange(o)})},onClickInput(e){this.$refs.editable.innerText||(this.$refs.editable.focus(),window.getSelection().selectAllChildren(this.$refs.editable),window.getSelection().collapseToEnd())}}},aTe=["data-ph"];function uTe(e,t,n,o,r,s){return C(),T("div",un({class:[n.wrapper_class,"fcom_editable_input"],ref:"editable",onClick:t[0]||(t[0]=(...i)=>s.onClickInput&&s.onClickInput(...i)),contenteditable:"","data-ph":n.placeholder},SE(s.listeners,!0)),null,16,aTe)}const cTe=Be(lTe,[["render",uTe]]),dTe={name:"MenuSettings",components:{EditableContentInput:cTe,MenuGroupSettings:hL,Layout:Es,AppLayout:xs},data(){return{menuSettings:null,loading:!1,saving:!1}},methods:{fetchMenuItems(){this.loading=!0,this.$get("settings/menu-settings").then(e=>{this.menuSettings=e.menuSettings}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})},saveMenuItems(){this.saving=!0,this.$post("settings/menu-settings",{menuSettings:this.menuSettings}).then(e=>{this.$notify.success(e.message),this.$eventBus.emit("reloadMenu")}).catch(e=>{this.$handleError(e),this.fetchMenuItems()}).finally(()=>{this.saving=!1})},addFooterGroup(){this.menuSettings.afterCommunityLinkGroups.push({title:"",items:[]})}},mounted(){this.fetchMenuItems()}},fTe={class:"settings_router"},pTe={key:0},hTe={class:"fcom_card_sections"},mTe={class:"fcom_card_sections"},gTe={class:"fcom_card_sections"},vTe={key:0,class:"fcom_card_sections"},yTe={class:"fcom_section_primary_item"},_Te={class:"fcom_section_primary_item_title"},bTe={class:"fcom_heading_item"},wTe={style:{"justify-content":"center"},class:"fcom_section_primary_item"},CTe={key:1,class:"white_loaded"};function kTe(e,t,n,o,r,s){const i=ut,l=ee("menu-group-settings"),a=$t,u=Kn,c=ee("layout"),d=ee("app-layout");return C(),H(d,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:S(()=>[w(c,{wrapper_class:"no_bg_layout",title:e.$t("Menu Settings")},{actions:S(()=>[w(i,{class:"fcom_primary_button",disabled:r.saving||r.loading,onClick:s.saveMenuItems},{default:S(()=>[_("span",null,O(e.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])]),default:S(()=>[_("div",fTe,[r.menuSettings?(C(),T("div",pTe,[_("div",hTe,[r.menuSettings.mainMenuItems?(C(),H(l,{key:0,custom_svg:!0,use_icon_selector:!0,has_svg:!1,onSave:t[0]||(t[0]=f=>s.saveMenuItems()),title:e.$t("Primary Menu Items"),menuItems:r.menuSettings.mainMenuItems},null,8,["title","menuItems"])):z("",!0)]),_("div",mTe,[r.menuSettings.profileDropdownItems?(C(),H(l,{key:0,custom_svg:!0,use_icon_selector:!0,has_svg:!1,onSave:t[1]||(t[1]=f=>s.saveMenuItems()),title:e.$t("Profile Dropdown Items"),menuItems:r.menuSettings.profileDropdownItems},null,8,["title","menuItems"])):z("",!0)]),_("div",gTe,[r.menuSettings.beforeCommunityMenuItems?(C(),H(l,{key:0,custom_svg:!0,use_icon_selector:!0,has_svg:!1,onSave:t[2]||(t[2]=f=>s.saveMenuItems()),title:e.$t("Top Links (At Sidebar)"),menuItems:r.menuSettings.beforeCommunityMenuItems},null,8,["title","menuItems"])):z("",!0)]),r.menuSettings.afterCommunityLinkGroups?(C(),T("div",vTe,[_("div",yTe,[_("div",_Te,[_("div",bTe,[_("h4",null,O(e.$t("Sidebar Bottom Link Groups")),1)])])]),(C(!0),T(de,null,nt(r.menuSettings.afterCommunityLinkGroups,f=>(C(),T("div",null,[w(l,{custom_svg:!0,has_svg:!1,use_icon_selector:!0,onSave:t[3]||(t[3]=p=>s.saveMenuItems()),title:e.$t("Sidebar Bottom Link Groups"),menuItems:f.items},{title:S(()=>[w(a,{modelValue:f.title,"onUpdate:modelValue":p=>f.title=p,placeholder:e.$t("Group Title")},{append:S(()=>[w(i,{onClick:s.saveMenuItems,text:""},{default:S(()=>[ne(O(e.$t("save")),1)]),_:1},8,["onClick"])]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder"])]),_:2},1032,["title","menuItems"])]))),256)),_("div",wTe,[w(i,{onClick:t[4]||(t[4]=f=>s.addFooterGroup())},{default:S(()=>[ne(O(e.$t("Add Another Group")),1)]),_:1})])])):z("",!0)])):(C(),T("div",CTe,[w(u,{animated:!0,rows:10})]))])]),_:1},8,["title"])]),_:1})}const STe=Be(dTe,[["render",kTe]]),$Te={name:"SlugInput",emits:["update:modelValue"],props:{modelValue:{type:String,default:""},placeholder:{type:String,default:""},disabled:{type:Boolean,default:!1},is_inital_inactive:{type:Boolean,default:!1},edit_notice:{type:String,default:""},popMessage:{type:String,default:""},prefix:{type:String,default:""}},data(){return{model:this.modelValue,showEdit:this.is_inital_inactive}},methods:{updateSlug(){this.model=this.model.replace(/\s/g,"-"),this.model=this.model.replace(/[^a-zA-Z0-9-_]/g,""),this.$emit("update:modelValue",this.model)},confirmEditInit(){this.$messageBox.confirm(this.popMessage,this.$t("Warning"),{confirmButtonText:this.$t("Yes"),cancelButtonText:this.$t("No"),type:"warning"}).then(()=>{this.showEdit=!1,this.$refs.input.focus()})}}},ETe={key:0,class:"fcom_slug_input_info"},xTe=["innerHTML"];function TTe(e,t,n,o,r,s){const i=ut,l=$t;return C(),T(de,null,[w(l,{disabled:n.disabled,readonly:r.showEdit,modelValue:r.model,"onUpdate:modelValue":t[1]||(t[1]=a=>r.model=a),ref:"input",placeholder:n.placeholder,onInput:s.updateSlug},ms({_:2},[n.prefix?{name:"prepend",fn:S(()=>[_("span",null,O(n.prefix),1)]),key:"0"}:void 0,r.showEdit?{name:"append",fn:S(()=>[w(i,{onClick:t[0]||(t[0]=a=>s.confirmEditInit()),text:"",type:"info"},{default:S(()=>[ne(O(e.$t("change")),1)]),_:1})]),key:"1"}:void 0]),1032,["disabled","readonly","modelValue","placeholder","onInput"]),!r.showEdit&&n.edit_notice?(C(),T("div",ETe,[_("p",{innerHTML:n.edit_notice},null,8,xTe)])):z("",!0)],64)}const zh=Be($Te,[["render",TTe]]),MTe={name:"TopicSelector",props:["modelValue","creatable"],emits:["update:modelValue"],components:{SlugInput:zh},data(){return{topics:[],selected:this.modelValue,loading:!1,creatingTopic:!1,newTopic:{title:"OK"}}},methods:{initCreatetopic(){this.newTopic={title:"",description:"",slug:""}},fetchTopics(){this.loading=!0,this.$get("admin/topics",{optionsOnly:!0}).then(e=>{this.topics=e.topics}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})},createTopic(){if(!this.newTopic.title||this.newTopic.title.length<2){this.$notify.error(this.$t("Title must be at least 2 characters long"));return}this.creatingTopic=!0;let e={title:this.newTopic.title,description:this.newTopic.description,slug:this.newTopic.slug,is_inline:!0};this.$post("admin/topics",e).then(t=>{this.$notify.success(t.message),this.fetchTopics(),this.selected.push(t.topic.id),this.$refs.creating_topic_ref.hide()}).catch(t=>{this.$handleError(t)}).finally(()=>{this.creatingTopic=!1})}},watch:{selected(){this.$emit("update:modelValue",this.selected)}},mounted(){this.fetchTopics()}},OTe={class:"fcom_topic_selector"};function ITe(e,t,n,o,r,s){const i=$s,l=vr,a=ee("Plus"),u=Ie,c=ut,d=$t,f=Mn,p=ee("slug-input"),h=Tn,m=bo,y=Rt("loading");return C(),T("div",OTe,[Fe((C(),H(l,{style:{width:"100%"},"multiple-limit":20,modelValue:r.selected,"onUpdate:modelValue":t[0]||(t[0]=v=>r.selected=v),filterable:!0,multiple:!0,clearable:"",placeholder:e.$t("Choose up to 20 topics")},{default:S(()=>[(C(!0),T(de,null,nt(r.topics,v=>(C(),H(i,{key:v.slug,label:v.title,value:v.id},{default:S(()=>[_("span",null,O(v.title),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])),[[y,r.loading]]),n.creatable?(C(),H(m,{key:0,ref:"creating_topic_ref",onShow:s.initCreatetopic,placement:"bottom",width:400,trigger:"click"},{reference:S(()=>[w(c,{class:"fcom_secondary_button"},{default:S(()=>[w(u,null,{default:S(()=>[w(a)]),_:1}),_("span",null,O(e.$t("New")),1)]),_:1})]),default:S(()=>[w(h,{modelValue:r.newTopic,"onUpdate:modelValue":t[5]||(t[5]=v=>r.newTopic=v),"label-position":"top"},{default:S(()=>[w(f,{label:e.$t("Title")},{default:S(()=>[w(d,{modelValue:r.newTopic.title,"onUpdate:modelValue":t[1]||(t[1]=v=>r.newTopic.title=v),placeholder:e.$t("Title of the topic")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),w(f,{label:e.$t("Slug (optional)")},{default:S(()=>[w(p,{modelValue:r.newTopic.slug,"onUpdate:modelValue":t[2]||(t[2]=v=>r.newTopic.slug=v),placeholder:e.$t("Slug of the topic")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),w(f,{label:e.$t("Description (optional)")},{default:S(()=>[w(d,{modelValue:r.newTopic.description,"onUpdate:modelValue":t[3]||(t[3]=v=>r.newTopic.description=v),type:"textarea",rows:3,placeholder:e.$t("Description of the topic")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),w(f,null,{default:S(()=>[w(c,{type:"primary",onClick:t[4]||(t[4]=v=>s.createTopic()),loading:r.creatingTopic},{default:S(()=>[ne(O(e.$t("Create")),1)]),_:1},8,["loading"])]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["onShow"])):z("",!0)])}const mL=Be(MTe,[["render",ITe]]),ATe={name:"ListViewIcon"},NTe={width:"160",height:"158",viewBox:"0 0 160 158",fill:"none",xmlns:"http://www.w3.org/2000/svg"},PTe=C0('<rect x="0.5" y="0.5" width="159" height="157" rx="5.5" fill="transparent"></rect><rect x="0.5" y="0.5" width="159" height="157" rx="5.5" stroke="var(--fcom-primary-border)"></rect><rect x="12.5" y="12.5" width="135" height="27" rx="3.5" fill="transparent"></rect><rect x="12.5" y="12.5" width="135" height="27" rx="3.5" stroke="var(--fcom-primary-border)"></rect><path d="M20 26C20 21.5817 23.5817 18 28 18C32.4183 18 36 21.5817 36 26C36 30.4183 32.4183 34 28 34C23.5817 34 20 30.4183 20 26Z" fill="var(--fcom-active-bg)"></path><g clip-path="url(#clip0_3601_59265)"><ellipse cx="27.9996" cy="33.6" rx="6.4" ry="4.8" fill="var(--fcom-primary-bg)" fill-opacity="0.72"></ellipse><circle opacity="0.9" cx="27.9998" cy="24.4" r="3.2" fill="var(--fcom-primary-bg)"></circle></g><path d="M44 26C44 24.3431 45.3431 23 47 23H137C138.657 23 140 24.3431 140 26C140 27.6569 138.657 29 137 29H47C45.3431 29 44 27.6569 44 26Z" fill="var(--fcom-active-bg)"></path><rect x="12.5" y="48.5" width="135" height="27" rx="3.5" fill="transparent"></rect><rect x="12.5" y="48.5" width="135" height="27" rx="3.5" stroke="var(--fcom-primary-border)"></rect><path d="M20 62C20 57.5817 23.5817 54 28 54C32.4183 54 36 57.5817 36 62C36 66.4183 32.4183 70 28 70C23.5817 70 20 66.4183 20 62Z" fill="var(--fcom-active-bg)"></path><g clip-path="url(#clip1_3601_59265)"><ellipse cx="27.9996" cy="69.6001" rx="6.4" ry="4.8" fill="var(--fcom-primary-bg)" fill-opacity="0.72"></ellipse><circle opacity="0.9" cx="27.9998" cy="60.4" r="3.2" fill="var(--fcom-primary-bg)"></circle></g><path d="M44 62C44 60.3431 45.3431 59 47 59H137C138.657 59 140 60.3431 140 62C140 63.6569 138.657 65 137 65H47C45.3431 65 44 63.6569 44 62Z" fill="var(--fcom-active-bg)"></path><rect x="12.5" y="84.5" width="135" height="27" rx="3.5" fill="transparent"></rect><rect x="12.5" y="84.5" width="135" height="27" rx="3.5" stroke="var(--fcom-primary-border)"></rect><path d="M20 98C20 93.5817 23.5817 90 28 90C32.4183 90 36 93.5817 36 98C36 102.418 32.4183 106 28 106C23.5817 106 20 102.418 20 98Z" fill="var(--fcom-active-bg)"></path><g clip-path="url(#clip2_3601_59265)"><ellipse cx="27.9996" cy="105.6" rx="6.4" ry="4.8" fill="var(--fcom-primary-bg)" fill-opacity="0.72"></ellipse><circle opacity="0.9" cx="27.9998" cy="96.3999" r="3.2" fill="var(--fcom-primary-bg)"></circle></g><path d="M44 98C44 96.3431 45.3431 95 47 95H137C138.657 95 140 96.3431 140 98C140 99.6569 138.657 101 137 101H47C45.3431 101 44 99.6569 44 98Z" fill="var(--fcom-active-bg)"></path><rect x="12.5" y="120.5" width="135" height="27" rx="3.5" fill="transparent"></rect><rect x="12.5" y="120.5" width="135" height="27" rx="3.5" stroke="var(--fcom-primary-border)"></rect><path d="M20 134C20 129.582 23.5817 126 28 126C32.4183 126 36 129.582 36 134C36 138.418 32.4183 142 28 142C23.5817 142 20 138.418 20 134Z" fill="var(--fcom-active-bg)"></path><g clip-path="url(#clip3_3601_59265)"><ellipse cx="27.9996" cy="141.6" rx="6.4" ry="4.8" fill="var(--fcom-primary-bg)" fill-opacity="0.72"></ellipse><circle opacity="0.9" cx="27.9998" cy="132.4" r="3.2" fill="var(--fcom-primary-bg)"></circle></g><path d="M44 134C44 132.343 45.3431 131 47 131H137C138.657 131 140 132.343 140 134C140 135.657 138.657 137 137 137H47C45.3431 137 44 135.657 44 134Z" fill="var(--fcom-active-bg)"></path><defs><clipPath id="clip0_3601_59265"><rect x="20" y="18" width="16" height="16" rx="8" fill="transparent"></rect></clipPath><clipPath id="clip1_3601_59265"><rect x="20" y="54" width="16" height="16" rx="8" fill="transparent"></rect></clipPath><clipPath id="clip2_3601_59265"><rect x="20" y="90" width="16" height="16" rx="8" fill="transparent"></rect></clipPath><clipPath id="clip3_3601_59265"><rect x="20" y="126" width="16" height="16" rx="8" fill="transparent"></rect></clipPath></defs>',23),LTe=[PTe];function RTe(e,t,n,o,r,s){return C(),T("svg",NTe,LTe)}const DTe=Be(ATe,[["render",RTe]]),VTe={name:"TimelineViewIcon"},FTe={width:"160",height:"158",viewBox:"0 0 160 158",fill:"none",xmlns:"http://www.w3.org/2000/svg"},BTe=C0('<rect x="0.5" y="0.5" width="159" height="157" rx="5.5" fill="transparent"></rect><rect x="0.5" y="0.5" width="159" height="157" rx="5.5" stroke="var(--fcom-primary-border)"></rect><rect x="12.5" y="12.5" width="135" height="60" rx="3.5" fill="transparent"></rect><rect x="12.5" y="12.5" width="135" height="60" rx="3.5" stroke="var(--fcom-primary-border)"></rect><path d="M20 24C20 21.7909 21.7909 20 24 20H136C138.209 20 140 21.7909 140 24C140 26.2091 138.209 28 136 28H24C21.7909 28 20 26.2091 20 24Z" fill="var(--fcom-active-bg)"></path><path d="M20 37C20 34.7909 21.7909 33 24 33H130.286C132.495 33 134.286 34.7909 134.286 37C134.286 39.2091 132.495 41 130.286 41H24C21.7909 41 20 39.2091 20 37Z" fill="var(--fcom-active-bg)"></path><path d="M20 57C20 52.5817 23.5817 49 28 49C32.4183 49 36 52.5817 36 57C36 61.4183 32.4183 65 28 65C23.5817 65 20 61.4183 20 57Z" fill="var(--fcom-active-bg)"></path><g clip-path="url(#clip0_3601_59186)"><ellipse cx="27.9996" cy="64.6001" rx="6.4" ry="4.8" fill="var(--fcom-primary-bg)" fill-opacity="0.72"></ellipse><circle opacity="0.9" cx="27.9998" cy="55.4" r="3.2" fill="var(--fcom-primary-bg)"></circle></g><path d="M44 53C44 51.3431 45.3431 50 47 50H81C82.6569 50 84 51.3431 84 53C84 54.6569 82.6569 56 81 56H47C45.3431 56 44 54.6569 44 53Z" fill="var(--fcom-active-bg)"></path><path d="M44 62C44 60.8954 44.8954 60 46 60H66C67.1046 60 68 60.8954 68 62C68 63.1046 67.1046 64 66 64H46C44.8954 64 44 63.1046 44 62Z" fill="var(--fcom-active-bg)"></path><rect x="12.5" y="85.5" width="135" height="60" rx="3.5" fill="transparent"></rect><rect x="12.5" y="85.5" width="135" height="60" rx="3.5" stroke="var(--fcom-primary-border)"></rect><path d="M20 97C20 94.7909 21.7909 93 24 93H136C138.209 93 140 94.7909 140 97C140 99.2091 138.209 101 136 101H24C21.7909 101 20 99.2091 20 97Z" fill="var(--fcom-active-bg)"></path><path d="M20 110C20 107.791 21.7909 106 24 106H130.286C132.495 106 134.286 107.791 134.286 110C134.286 112.209 132.495 114 130.286 114H24C21.7909 114 20 112.209 20 110Z" fill="var(--fcom-active-bg)"></path><path d="M20 130C20 125.582 23.5817 122 28 122C32.4183 122 36 125.582 36 130C36 134.418 32.4183 138 28 138C23.5817 138 20 134.418 20 130Z" fill="var(--fcom-active-bg)"></path><g clip-path="url(#clip1_3601_59186)"><ellipse cx="27.9996" cy="137.6" rx="6.4" ry="4.8" fill="var(--fcom-primary-bg)" fill-opacity="0.72"></ellipse><circle opacity="0.9" cx="27.9998" cy="128.4" r="3.2" fill="var(--fcom-primary-bg)"></circle></g><path d="M44 126C44 124.343 45.3431 123 47 123H81C82.6569 123 84 124.343 84 126C84 127.657 82.6569 129 81 129H47C45.3431 129 44 127.657 44 126Z" fill="var(--fcom-active-bg)"></path><path d="M44 135C44 133.895 44.8954 133 46 133H66C67.1046 133 68 133.895 68 135C68 136.105 67.1046 137 66 137H46C44.8954 137 44 136.105 44 135Z" fill="var(--fcom-active-bg)"></path><defs><clipPath id="clip0_3601_59186"><rect x="20" y="49" width="16" height="16" rx="8" fill="transparent"></rect></clipPath><clipPath id="clip1_3601_59186"><rect x="20" y="122" width="16" height="16" rx="8" fill="transparent"></rect></clipPath></defs>',19),zTe=[BTe];function jTe(e,t,n,o,r,s){return C(),T("svg",FTe,zTe)}const HTe=Be(VTe,[["render",jTe]]),UTe={name:"CreateSpaceForm",emits:["completed"],components:{SlugInput:zh,ImageUploader:Md,LogoEmojiSelector:Av,TopicSelector:mL,ListViewIcon:DTe,TimelineViewIcon:HTe},props:{community:{required:!1,default:null},parent_id:{required:!1,default:null},savingCount:{required:!1,default:0}},data(){return{saving:!1,privacies:l5e,form:{title:"",slug:"",privacy:"private",parent_id:"",description:"",settings:{custom_lock_screen:"no",restricted_post_only:"no",emoji:"🚀",shape_svg:"",can_request_join:"yes",layout_style:"timeline",show_sidebar:"yes",members_page_status:"members_only"},topic_ids:[]},dataLoaded:!1,showingSections:["basic"]}},watch:{savingCount(){this.submit()}},methods:{submit(){this.saving=!0;let e="spaces",t={space:this.form},n=this.$post;this.form.id&&(e+="/"+this.form.slug+"/by-slug",t={data:{title:this.form.title,privacy:this.form.privacy,description:this.form.description,group_chat_support:this.form.group_chat_support,settings:this.form.settings,logo:this.form.logo,parent_id:this.form.parent_id,cover_photo:this.form.cover_photo,topic_ids:this.form.topic_ids}},n=this.$put),n(e,t).then(o=>{if(this.$eventBus.emit("reloadMenu"),!this.form.id){let r=this.$router.resolve({name:"space_feeds",params:{space:o.space.slug}}).href;window.location.href=r;return}this.$notify.success(o.message),this.$emit("completed",o.space)}).catch(o=>{this.form.id||(this.showingSections=["basic"]),this.$handleError(o)}).finally(()=>{this.saving=!1})},handleCoverPhotoUpload(e){this.form.cover_photo=e},handleLogoPhotoUpload(e){this.form.logo=e}},mounted(){if(this.community&&this.community.id){this.community.chat_thread_id&&(this.community.group_chat_support="yes"),this.form=this.community;let e=[];this.community.topics&&this.each(this.community.topics,t=>{e.push(t.id)}),this.form.topic_ids=e}else this.parent_id?(this.form.parent_id=this.parent_id,this.$route.query.parent_id):this.$route.query.parent_id&&(this.form.parent_id=this.$route.query.parent_id);this.form.id&&(this.showingSections=["basic","customization"]),this.dataLoaded=!0}},WTe={key:0},KTe={style:{"font-weight":"bold"}},qTe=["innerHTML"],GTe={key:0},YTe={class:"fcom_lined_checkboxes"},ZTe={class:"fcom_svg_radio_item"},JTe={class:"svg_radio_label"},XTe={class:"fcom_svg_radio_item"},QTe={class:"svg_radio_label"},eMe={class:"fcom_help_text"},tMe={class:"fcom_help_text"},nMe=["href"],oMe={class:"fcom_image_uploader_wrapper"},rMe={class:"fcom_help_text"},sMe={class:"fcom_image_uploader_wrapper"},iMe={class:"fcom_help_text"},lMe={key:0},aMe={key:1},uMe={class:"fcom_space_form_bottom"};function cMe(e,t,n,o,r,s){const i=ee("logo-emoji-selector"),l=$t,a=Mn,u=ee("SlugInput"),c=$s,d=vr,f=gh,p=ta,h=En,m=ee("TimelineViewIcon"),y=ee("ListViewIcon"),v=ee("topic-selector"),k=xd,b=ee("EditPen"),$=Ie,x=ut,E=ee("Delete"),M=ee("ImageUploader"),N=Tn,P=Rt("loading");return C(),H(N,{onSubmit:t[19]||(t[19]=Ze(I=>e.doNothing(),["prevent"])),modelValue:r.form,"onUpdate:modelValue":t[20]||(t[20]=I=>r.form=I),"label-position":"top",class:"fcom_space_form"},{default:S(()=>[r.showingSections.indexOf("basic")!==-1?(C(),T(de,{key:0},[r.form.id?z("",!0):(C(),T("h4",WTe,O(e.$t("Basic Info")),1)),w(a,{label:e.$t("Space Title")},{default:S(()=>[w(l,{type:"text",placeholder:e.$t("Your Space Title"),modelValue:r.form.title,"onUpdate:modelValue":t[1]||(t[1]=I=>r.form.title=I)},{prepend:S(()=>{var I,V;return[r.dataLoaded?(C(),H(i,{key:0,custom_svg:!0,onUpdate:t[0]||(t[0]=F=>{r.form.settings.emoji=F.emoji,r.form.logo=F.logo,r.form.settings.shape_svg=F.shape_svg}),config:{logo:r.form.logo,emoji:((I=r.form.settings)==null?void 0:I.emoji)||"",shape_svg:(V=r.form.settings)==null?void 0:V.shape_svg}},null,8,["config"])):z("",!0)]}),_:1},8,["placeholder","modelValue"])]),_:1},8,["label"]),r.dataLoaded?(C(),H(a,{key:1,label:e.$t("Slug (optional)")},{default:S(()=>[w(u,{disabled:!!r.form.id,modelValue:r.form.slug,"onUpdate:modelValue":t[2]||(t[2]=I=>r.form.slug=I),placeholder:e.$t("Space Slug (no space or special chars)")},null,8,["disabled","modelValue","placeholder"])]),_:1},8,["label"])):z("",!0),w(a,{label:e.$t("Description")},{default:S(()=>[w(l,{type:"textarea",rows:3,placeholder:e.$t("Space Description"),modelValue:r.form.description,"onUpdate:modelValue":t[3]||(t[3]=I=>r.form.description=I)},null,8,["placeholder","modelValue"])]),_:1},8,["label"]),w(a,{label:e.$t("Privacy")},{default:S(()=>[w(d,{"popper-class":"rich_select",modelValue:r.form.privacy,"onUpdate:modelValue":t[4]||(t[4]=I=>r.form.privacy=I),placeholder:e.$t("Select Privacy")},{default:S(()=>[(C(!0),T(de,null,nt(r.privacies,(I,V)=>(C(),H(c,{key:V,label:I.label,value:V},{default:S(()=>[_("span",KTe,O(e.$labelize(I.label)),1),_("p",{innerHTML:I.description},null,8,qTe)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),r.form.privacy=="private"?(C(),H(a,{key:2,label:e.$t("Lock Screen Type")},{default:S(()=>[w(p,{modelValue:r.form.settings.custom_lock_screen,"onUpdate:modelValue":t[5]||(t[5]=I=>r.form.settings.custom_lock_screen=I),class:"fcom_radio_group"},{default:S(()=>[w(f,{value:"yes"},{default:S(()=>[ne(O(e.$t("Custom Lock Screen")),1)]),_:1}),w(f,{value:"no"},{default:S(()=>[ne(O(e.$t("Default Lock Screen")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"])):z("",!0),r.form.settings.custom_lock_screen=="no"&&r.form.privacy!="secret"?(C(),H(a,{key:3},{default:S(()=>[w(h,{"true-value":"yes","false-value":"no",modelValue:r.form.settings.can_request_join,"onUpdate:modelValue":t[6]||(t[6]=I=>r.form.settings.can_request_join=I)},{default:S(()=>[ne(O(e.$t("Allow users to request to join this Space")),1)]),_:1},8,["modelValue"])]),_:1})):z("",!0),w(a,{label:e.$t("Menu Group")},{default:S(()=>[w(d,{modelValue:r.form.parent_id,"onUpdate:modelValue":t[7]||(t[7]=I=>r.form.parent_id=I)},{default:S(()=>[(C(!0),T(de,null,nt(e.appVars.space_groups,I=>(C(),H(c,{key:I.id,value:I.id.toString(),label:I.title},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]),w(a,{label:e.$t("Who can view space members")},{default:S(()=>[w(d,{modelValue:r.form.settings.members_page_status,"onUpdate:modelValue":t[8]||(t[8]=I=>r.form.settings.members_page_status=I)},{default:S(()=>[w(c,{value:"members_only",label:e.$t("Members Only")},null,8,["label"]),w(c,{value:"admin_only",label:e.$t("Admin/Moderators Only")},null,8,["label"]),w(c,{value:"logged_in",label:e.$t("Any Logged in users")},null,8,["label"]),w(c,{value:"everybody",label:e.$t("Anyone")},null,8,["label"])]),_:1},8,["modelValue"])]),_:1},8,["label"])],64)):z("",!0),r.showingSections.indexOf("customization")!==-1?(C(),T(de,{key:1},[r.form.id?z("",!0):(C(),T("h4",GTe,O(e.$t("Customization")),1)),r.form.settings?(C(),H(a,{key:1,label:e.$t("Features Customizations")},{default:S(()=>[_("div",YTe,[w(h,{"true-value":"yes","false-value":"no",modelValue:r.form.settings.restricted_post_only,"onUpdate:modelValue":t[9]||(t[9]=I=>r.form.settings.restricted_post_only=I)},{default:S(()=>[ne(O(e.$t("Only admin or moderators can create post")),1)]),_:1},8,["modelValue"]),w(h,{"true-value":"yes","false-value":"no",modelValue:r.form.settings.show_sidebar,"onUpdate:modelValue":t[10]||(t[10]=I=>r.form.settings.show_sidebar=I)},{default:S(()=>[ne(O(e.$t("Show Right Sidebar on Space")),1)]),_:1},8,["modelValue"]),w(h,{"true-value":"yes","false-value":"no",modelValue:r.form.settings.hide_members_count,"onUpdate:modelValue":t[11]||(t[11]=I=>r.form.settings.hide_members_count=I)},{default:S(()=>[ne(O(e.$t("Hide Members count from spaces page (when members' page access unavailable)")),1)]),_:1},8,["modelValue"])])]),_:1},8,["label"])):z("",!0),w(a,{label:e.$t("Default Layout Styles")},{default:S(()=>[w(p,{modelValue:r.form.settings.layout_style,"onUpdate:modelValue":t[12]||(t[12]=I=>r.form.settings.layout_style=I),class:"fcom_svg_radio_group"},{default:S(()=>[_("div",ZTe,[w(f,{value:"timeline"},{default:S(()=>[w(m),_("p",JTe,O(e.$t("Timeline")),1)]),_:1})]),_("div",XTe,[w(f,{value:"list"},{default:S(()=>[w(y),_("p",QTe,O(e.$t("List")),1)]),_:1})])]),_:1},8,["modelValue"]),_("div",eMe,[_("p",null,O(e.$t("User can change the layout style to their own preference.")),1)])]),_:1},8,["label"]),e.has_pro&&r.form.id?(C(),H(a,{key:2,label:e.$t("Topic navigation")},{default:S(()=>[w(v,{creatable:!0,space_id:r.form.id,modelValue:r.form.topic_ids,"onUpdate:modelValue":t[13]||(t[13]=I=>r.form.topic_ids=I)},null,8,["space_id","modelValue"]),_("div",tMe,[_("p",null,[ne(O(e.$t("Categorize your posts and allow members to filter spaces with the topic navigation bar. You can define up to 20 topics per space."))+" ",1),_("a",{target:"_blank",rel:"noopener",href:e.$getRouteLink("admin/settings/topics-settings")},O(e.$t("Manage all topics.")),9,nMe)])])]),_:1},8,["label"])):z("",!0),e.appVars.has_chat?(C(),H(a,{key:3,label:e.$t("Group Chat?")},{default:S(()=>[w(h,{"true-value":"yes","false-value":"no",modelValue:r.form.group_chat_support,"onUpdate:modelValue":t[14]||(t[14]=I=>r.form.group_chat_support=I)},{default:S(()=>[ne(O(e.$t("Enable group chat for this space members")),1)]),_:1},8,["modelValue"])]),_:1},8,["label"])):z("",!0),w(a,{label:e.$t("Thumbnail / Open Graph Image (Recommended Size: 1200 x 630)")},{default:S(()=>[r.form.settings.og_image?(C(),H(k,{key:0,alt:e.$t("Thumbnail / Open Graph Image"),src:r.form.settings.og_image,style:{"max-width":"100px",height:"auto"}},null,8,["alt","src"])):z("",!0),_("div",oMe,[w(M,{isTextBtn:!1,removeIcon:!0,can_remove:!!r.form.settings.og_image,additionalData:{resize:!0,max_width:1200,max_height:630},onUploaded:t[15]||(t[15]=I=>{r.form.settings.og_image=I})},ms({remove:S(()=>[w($,null,{default:S(()=>[w(E)]),_:1})]),_:2},[r.form.settings.og_image?{name:"trigger",fn:S(()=>[w(x,{class:"fcom_plain_button"},{default:S(()=>[w($,null,{default:S(()=>[w(b)]),_:1})]),_:1})]),key:"0"}:void 0]),1032,["can_remove"])]),_("div",rMe,[_("p",null,O(e.$t("Will be used on card preview and social sharing preview.")),1)])]),_:1},8,["label"]),w(a,{label:e.$t("Featured Image (Recommended size: 1600x500) - Optional")},{default:S(()=>[r.form.cover_photo?(C(),H(k,{key:0,alt:e.$t("Featured Image Preview"),src:r.form.cover_photo,style:{"max-width":"100px",height:"auto"}},null,8,["alt","src"])):z("",!0),_("div",sMe,[w(M,{isTextBtn:!1,removeIcon:!0,can_remove:!!r.form.cover_photo,additionalData:{resize:!0,max_width:1600},onUploaded:s.handleCoverPhotoUpload},ms({remove:S(()=>[w($,null,{default:S(()=>[w(E)]),_:1})]),_:2},[r.form.cover_photo?{name:"trigger",fn:S(()=>[w(x,{class:"fcom_plain_button"},{default:S(()=>[w($,null,{default:S(()=>[w(b)]),_:1})]),_:1})]),key:"0"}:void 0]),1032,["can_remove","onUploaded"])]),_("div",iMe,[_("p",null,O(e.$t("If you add this image, it will be shown on the space homepage")),1)])]),_:1},8,["label"]),w(a,{style:{"margin-top":"45px"}},{default:S(()=>[r.showingSections.indexOf("basic")===-1?(C(),H(x,{key:0,class:"plain_button",text:"",onClick:t[16]||(t[16]=()=>{r.showingSections=["basic"]})},{default:S(()=>[_("span",null,O(e.$t("Go Back")),1)]),_:1})):z("",!0),Fe((C(),H(x,{class:"fcom_primary_button",disabled:r.saving,onClick:t[17]||(t[17]=I=>s.submit())},{default:S(()=>[r.form.id?(C(),T("span",lMe,O(e.$t("Update Info")),1)):(C(),T("span",aMe,O(e.$t("Create")),1))]),_:1},8,["disabled"])),[[P,r.saving]])]),_:1})],64)):(C(),H(a,{key:2},{default:S(()=>[_("div",uMe,[w(x,{onClick:t[18]||(t[18]=()=>{r.showingSections=["customization"]}),class:"fcom_primary_button"},{default:S(()=>[_("span",null,O(e.$t("Continue")),1)]),_:1})])]),_:1}))]),_:1},8,["modelValue"])}const dMe=Be(UTe,[["render",cMe]]),fMe={name:"CreateGroupForm",emits:["completed"],components:{ImageUploader:Md},props:{group:{required:!1,default:{title:"",slug:"",description:"",settings:{always_show_spaces:"yes"}}}},data(){return{saving:!1,form:{}}},methods:{submit(){this.saving=!0;let e="spaces/space_groups",t={title:this.form.title,description:this.form.description,settings:this.form.settings,slug:this.form.slug},n=this.$post;this.form.id&&(e+="/"+this.form.id,n=this.$put),n(e,t).then(o=>{this.$eventBus.emit("reloadMenu"),this.form={},this.$notify.success(o.message),this.$emit("completed",o.group)}).catch(o=>{this.$handleError(o)}).finally(()=>{this.saving=!1})}},mounted(){this.group&&this.group.id?this.form=this.group:this.form={title:"",slug:"",description:"",settings:{always_show_spaces:"yes"}}}},pMe=_("span",null,"#",-1),hMe={key:0},mMe={key:1};function gMe(e,t,n,o,r,s){const i=$t,l=Mn,a=En,u=ut,c=Tn,d=Rt("loading");return C(),H(c,{onSubmit:t[5]||(t[5]=Ze(f=>e.doNothing(),["prevent"])),modelValue:r.form,"onUpdate:modelValue":t[6]||(t[6]=f=>r.form=f),"label-position":"top"},{default:S(()=>[w(l,{label:e.$t("Group Title")},{default:S(()=>[w(i,{type:"text",placeholder:e.$t("Your Group Title"),modelValue:r.form.title,"onUpdate:modelValue":t[0]||(t[0]=f=>r.form.title=f)},null,8,["placeholder","modelValue"])]),_:1},8,["label"]),w(l,{label:e.$t("Slug")},{default:S(()=>[w(i,{disabled:!!r.form.id,type:"text",placeholder:e.$t("Group Slug (no spaces or special characters)"),modelValue:r.form.slug,"onUpdate:modelValue":t[1]||(t[1]=f=>r.form.slug=f)},{prefix:S(()=>[pMe]),_:1},8,["disabled","placeholder","modelValue"])]),_:1},8,["label"]),w(l,{label:e.$t("Description")},{default:S(()=>[w(i,{type:"textarea",rows:3,placeholder:e.$t("Group Description"),modelValue:r.form.description,"onUpdate:modelValue":t[2]||(t[2]=f=>r.form.description=f)},null,8,["placeholder","modelValue"])]),_:1},8,["label"]),r.form.settings?(C(),H(l,{key:0,label:e.$t("Appearance")},{default:S(()=>[w(a,{"true-value":"yes","false-value":"no",modelValue:r.form.settings.always_show_spaces,"onUpdate:modelValue":t[3]||(t[3]=f=>r.form.settings.always_show_spaces=f)},{default:S(()=>[ne(O(e.$t("Show Spaces even if the user is not a member of any space")),1)]),_:1},8,["modelValue"])]),_:1},8,["label"])):z("",!0),w(l,null,{default:S(()=>[Fe((C(),H(u,{class:"fcom_primary_button",disabled:r.saving,onClick:t[4]||(t[4]=f=>s.submit())},{default:S(()=>[r.form.id?(C(),T("span",hMe,O(e.$t("Update Info")),1)):(C(),T("span",mMe,O(e.$t("Create")),1))]),_:1},8,["disabled"])),[[d,r.saving]])]),_:1})]),_:1},8,["modelValue"])}const vMe=Be(fMe,[["render",gMe]]),yMe={name:"MoveGroupPopup",props:{groups:{type:Array,default:()=>[]},currentSpace:{type:[Array,Object],default:null},openedSpaceId:{type:[String,Number],default:null}},data(){var e;return{isVisible:!1,selectedGroupId:null,currentGroupId:(e=this.currentSpace)==null?void 0:e.parent_id,working:!1}},watch:{openedSpaceId(e){this.isVisible=e==this.currentSpace.id}},computed:{filteredGroups(){return this.groups.filter(e=>e.id!=this.currentGroupId)}},methods:{togglePopover(){this.$emit("togglePopover",this.currentSpace.id)},moveSpace(){this.working=!0,this.$patch("spaces/space_groups/move-space",{space_id:this.currentSpace.id,group_id:this.selectedGroupId}).then(e=>{this.$notify.success(e.message),this.$emit("moved")}).catch(e=>{this.$handleError(e)}).finally(()=>{this.working=!1})}}};function _Me(e,t,n,o,r,s){const i=ee("MoreFilled"),l=Ie,a=ut,u=$s,c=vr,d=Mn,f=Tn,p=bo,h=Rt("loading");return C(),H(p,{persistent:!1,placement:"bottom",width:350,visible:r.isVisible,onHide:t[2]||(t[2]=m=>r.isVisible=!1)},{reference:S(()=>[w(a,{"aria-label":e.$t("View actions"),onClick:s.togglePopover,class:"fcom_dot_menu edit_action",size:"small",text:""},{default:S(()=>[w(l,null,{default:S(()=>[w(i)]),_:1})]),_:1},8,["aria-label","onClick"])]),default:S(()=>[w(f,{onSubmit:t[1]||(t[1]=Ze(m=>e.doNothing(),["prevent"])),"label-position":"top"},{default:S(()=>[w(d,{label:e.$t("Select Group")},{default:S(()=>[w(c,{modelValue:r.selectedGroupId,"onUpdate:modelValue":t[0]||(t[0]=m=>r.selectedGroupId=m)},{default:S(()=>[(C(!0),T(de,null,nt(s.filteredGroups,m=>(C(),H(u,{key:m.id,label:m.title,value:m.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]),w(d,null,{default:S(()=>[Fe((C(),H(a,{disabled:!r.selectedGroupId||r.working,onClick:s.moveSpace,class:"fcom_primary_button"},{default:S(()=>[ne(O(e.$t("Move Space")),1)]),_:1},8,["disabled","onClick"])),[[h,r.working]])]),_:1})]),_:1})]),_:1},8,["visible"])}const bMe=Be(yMe,[["render",_Me]]),wMe={name:"AllCommunities",components:{FluentDnD:Nv,CreateSpaceForm:dMe,CreateGroupForm:vMe,Layout:Es,AppLayout:xs,MoveGroupPopup:bMe},data(){return{groups:[],loading:!0,joining:!1,openedSpaceId:null,createSpaceModal:!1,createGroupModal:!1,editingGroup:null,draggingIndexGroup:null,draggingIndexSpace:null}},computed:{communityCounts(){return this.groups.reduce((e,t)=>{var n;return e+(((n=t.spaces)==null?void 0:n.length)||0)},0)}},methods:{handleTogglePopover(e){this.openedSpaceId=this.openedSpaceId==e?null:e},getGroups(){this.loading=!0,this.editingGroup=null,this.$get("spaces/space_groups").then(e=>{this.groups=e.groups;const t=[];this.groups.forEach(n=>{t.push({id:n.id,title:n.title})}),this.appVars.space_groups=t}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})},initEditGroup(e){this.editingGroup=e,this.createGroupModal=!0},resetGroupsIndexes(){const e={};yu(this.groups,(t,n)=>{e[t.id]=n+1}),this.$patch("spaces/space_groups/re-index",{indexes:e}).catch(t=>{this.$handleError(t)}).finally(()=>{this.$eventBus.emit("reloadMenu")})},resetSpaceIndexes(e){this.$patch("spaces/space_groups/re-index-spaces",{indexes:e}).then(t=>{this.$notify.success(t.message)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.$eventBus.emit("reloadMenu")})},removeGroup(e){if(e&&e.spaces.length){this.$messageBox({title:this.$t("Cannot be deleted"),message:this.$t("You can not delete a group with spaces. Please move the spaces to a different group first."),type:"warning",confirmButtonText:this.$t("Got it!")});return}this.$confirm(this.$t("Are you sure you want to remove this group?"),this.$t("Warning"),{confirmButtonText:this.$t("Yes, Delete this group"),cancelButtonText:this.$t("Cancel"),type:"warning"}).then(()=>{this.$del("spaces/space_groups/"+e.id).then(()=>{this.getGroups(),this.$eventBus.emit("reloadMenu")}).catch(t=>{this.$handleError(t)})})},getTypeTitle(e){return e=="community"?this.$labelize("space").toLowerCase():this.$labelize(e).toLowerCase()},dropGroup({index:e}){const t=this.groups.splice(e,1)[0];this.groups.splice(e,0,t),this.resetGroupsIndexes(),this.draggingIndexGroup=null},dropSpace({newItems:e,index:t}){const n=e[0].parent_id;let o=this.groups.find(i=>Number(i.id)===Number(n)).spaces||[];const r=o.splice(t,1)[0];o.splice(t,0,r);let s=[];yu(o,(i,l)=>{s.push(i.id)}),this.resetSpaceIndexes(s),this.draggingIndexSpace=null}},mounted(){this.getGroups()}},CMe={class:"settings_router"},kMe={class:"fcom_communities"},SMe={class:"fcom_card_sections"},$Me={class:"fcom_card_section_heading"},EMe={class:"fcom_section_primary_item"},xMe={class:"fcom_section_primary_item_title"},TMe=_("div",{class:"fcom_drag_handle"}," ⋮⋮ ",-1),MMe={class:"fcom_heading_item"},OMe={class:"fcom_section_item_actions"},IMe={class:"fcom_section_items"},AMe={class:"fcom_section_item_title"},NMe=_("div",{class:"fcom_drag_handle"}," ⋮⋮ ",-1),PMe={class:"fcom_heading_item"},LMe={class:"fcom_section_item_actions"},RMe=["href"];function DMe(e,t,n,o,r,s){const i=ut,l=Kn,a=vh,u=ee("MoveGroupPopup"),c=ee("FluentDnD"),d=ee("layout"),f=ee("app-layout"),p=ee("create-group-form"),h=na,m=Rt("loading");return C(),T(de,null,[w(f,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:S(()=>[w(d,{wrapper_class:"no_bg_layout",title:e.$t("All Space Groups")},{actions:S(()=>[w(i,{class:"fcom_primary_button",onClick:t[0]||(t[0]=y=>r.createGroupModal=!0)},{default:S(()=>[ne(O(e.$t("Create New Group")),1)]),_:1})]),default:S(()=>[_("div",CMe,[Fe((C(),T("div",kMe,[_("div",SMe,[Fe((C(),T("div",$Me,[_("h3",null,O(e.$_n("%d Group","%d Groups",r.groups.length))+" • "+O(e.$_n("%d Space","%d Spaces",s.communityCounts)),1)])),[[m,r.loading]]),r.loading?(C(),H(l,{key:0,animated:!0,row:5})):z("",!0),w(c,{items:r.groups,onDrop:s.dropGroup},{item:S(({data:y})=>[_("div",EMe,[_("div",xMe,[TMe,_("div",MMe,[_("h4",null,O(e.$t("Group:"))+" "+O(y.title),1)])]),_("div",OMe,[w(i,{class:"fcom_secondary_button",onClick:v=>s.initEditGroup(y)},{default:S(()=>[ne(O(e.$t("Edit Info")),1)]),_:2},1032,["onClick"]),w(i,{onClick:v=>s.removeGroup(y),type:"danger",plain:""},{default:S(()=>[ne(O(e.$t("Delete")),1)]),_:2},1032,["onClick"])])]),_("div",IMe,[w(c,{items:y.spaces,"item-class":"fcom_section_item","item-style":"padding: 15px 15px 15px 35px",onDrop:s.dropSpace},{item:S(({data:v,index:k})=>[_("div",AMe,[NMe,_("p",PMe,[ne(O(v.title)+" ",1),v.status!="published"?(C(),H(a,{key:0,type:"info"},{default:S(()=>[ne(O(e.$labelize(v.status)),1)]),_:2},1024)):z("",!0),w(a,null,{default:S(()=>[ne(O(s.getTypeTitle(v.type)),1)]),_:2},1024)])]),_("div",LMe,[_("a",{class:"el-button el-button--small el-button--secondary",href:v.permalink},O(e.$t("View")),9,RMe),w(u,{groups:r.groups,currentSpace:v,openedSpaceId:r.openedSpaceId,onTogglePopover:s.handleTogglePopover,onMoved:t[1]||(t[1]=b=>s.getGroups())},null,8,["groups","currentSpace","openedSpaceId","onTogglePopover"])])]),_:2},1032,["items","onDrop"])])]),_:1},8,["items","onDrop"])])])),[[m,r.loading]])])]),_:1},8,["title"])]),_:1}),w(h,{"modal-class":"fcom_common_dialog",id:"fluent_comminity_body","close-on-click-modal":!1,"append-to-body":!0,size:e.dialogWidth,modelValue:r.createGroupModal,"onUpdate:modelValue":t[3]||(t[3]=y=>r.createGroupModal=y),direction:"rtl"},{header:S(()=>[_("h4",null,O(e.$t("Create a new Group")),1)]),default:S(()=>[r.createGroupModal?(C(),H(p,{key:0,group:r.editingGroup,onCompleted:t[2]||(t[2]=y=>{r.createGroupModal=!1,s.getGroups()})},null,8,["group"])):z("",!0)]),_:1},8,["size","modelValue"])],64)}const VMe=Be(wMe,[["render",DMe]]),FMe={name:"CreateSpaceForm",components:{TopicSelector:mL,SlugInput:zh,ImageUploader:Md,LogoEmojiSelector:Av},emits:["completed","close"],props:{course:{required:!1,default:{title:"",description:"",privacy:"public",course_type:"self_paced",cover_photo:"",parent_id:"",status:"draft",category_ids:[],settings:{emoji:"",custom_lock_screen:"no",shape_svg:""}}},savingCount:{required:!1,default:0},parent_id:{required:!1,default:null}},data(){return{saving:!1,privacies:a5e,form:{slug:"",title:"",description:"",privacy:"public",course_type:"self_paced",cover_photo:"",parent_id:"",status:"draft",category_ids:[],settings:{emoji:"",custom_lock_screen:"no",shape_svg:""}},courseTypes:u5e,dataLoaded:!1}},watch:{savingCount(){this.submit(!0)}},methods:{submit(e=!1){this.saving=!0;let t="admin/courses",n=this.form,o=this.$post;this.form.id&&(t+="/"+this.form.id,n={title:this.form.title,privacy:this.form.privacy,course_type:this.form.course_type,description:this.form.description,status:this.form.status,logo:this.form.logo,cover_photo:this.form.cover_photo,parent_id:this.form.parent_id,settings:this.form.settings,category_ids:this.form.category_ids},o=this.$put),o(t,n).then(r=>{if(!this.form.id){let s=this.$getRouteLink("admin/manage-courses/edit/"+r.course.id+"/lessons");window.location.href=s,this.form={};return}this.$eventBus.emit("reloadMenu"),this.$notify.success(r.message),this.$emit("completed",r.course),e&&this.$emit("close")}).catch(r=>{this.$handleError(r)}).finally(()=>{this.saving=!1})},handlePhotoUpload(e){this.form.cover_photo=e}},mounted(){this.course.id?this.form=this.course:this.parent_id&&(this.form.parent_id=this.parent_id),this.dataLoaded=!0}},BMe={style:{"font-weight":"bold"}},zMe={style:{"font-weight":"bold"}},jMe={class:"fcom_help_text"},HMe=["href"],UMe={class:"fcom_image_uploader_wrapper"},WMe={class:"fcom_help_text"},KMe={key:0},qMe={key:1},GMe={key:1},YMe=["href"];function ZMe(e,t,n,o,r,s){const i=ee("logo-emoji-selector"),l=$t,a=Mn,u=ee("SlugInput"),c=$s,d=vr,f=gh,p=ta,h=ee("topic-selector"),m=xd,y=ee("EditPen"),v=Ie,k=ut,b=ee("Delete"),$=ee("ImageUploader"),x=Tn,E=Rt("loading");return e.hasFeature("has_course")?(C(),H(x,{key:0,onSubmit:t[11]||(t[11]=Ze(M=>e.doNothing(),["prevent"])),modelValue:r.form,"onUpdate:modelValue":t[12]||(t[12]=M=>r.form=M),"label-position":"top"},{default:S(()=>[w(a,{label:e.$t("Course Title")},{default:S(()=>[w(l,{type:"text",placeholder:e.$t("Your Course Title"),modelValue:r.form.title,"onUpdate:modelValue":t[1]||(t[1]=M=>r.form.title=M)},{prepend:S(()=>{var M,N;return[r.dataLoaded?(C(),H(i,{key:0,custom_svg:!0,onUpdate:t[0]||(t[0]=P=>{r.form.settings.emoji=P.emoji,r.form.logo=P.logo,r.form.settings.shape_svg=P.shape_svg}),config:{logo:r.form.logo,emoji:(M=r.form.settings)==null?void 0:M.emoji,shape_svg:((N=r.form.settings)==null?void 0:N.shape_svg)||""}},null,8,["config"])):z("",!0)]}),_:1},8,["placeholder","modelValue"])]),_:1},8,["label"]),w(a,{label:e.$t("Slug (optional)")},{default:S(()=>[w(u,{disabled:!!r.form.id,modelValue:r.form.slug,"onUpdate:modelValue":t[2]||(t[2]=M=>r.form.slug=M),placeholder:e.$t("Course Slug (no spaces or special characters)")},null,8,["disabled","modelValue","placeholder"]),_("pre",null,O(r.form.slug),1)]),_:1},8,["label"]),w(a,{label:e.$t("Short Description")},{default:S(()=>[w(l,{type:"textarea",rows:3,placeholder:e.$t("Course Description"),modelValue:r.form.description,"onUpdate:modelValue":t[3]||(t[3]=M=>r.form.description=M)},null,8,["placeholder","modelValue"])]),_:1},8,["label"]),w(a,{label:e.$t("Privacy")},{default:S(()=>[w(d,{"popper-class":"rich_select",modelValue:r.form.privacy,"onUpdate:modelValue":t[4]||(t[4]=M=>r.form.privacy=M),placeholder:e.$t("Select Privacy")},{default:S(()=>[(C(!0),T(de,null,nt(r.privacies,(M,N)=>(C(),H(c,{key:N,label:M.label,value:N},{default:S(()=>[_("span",BMe,O(M.label),1),_("p",null,O(M.description),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),r.form.privacy!="public"?(C(),H(a,{key:0,label:e.$t("Lock Screen Type")},{default:S(()=>[w(p,{modelValue:r.form.settings.custom_lock_screen,"onUpdate:modelValue":t[5]||(t[5]=M=>r.form.settings.custom_lock_screen=M)},{default:S(()=>[w(f,{value:"yes"},{default:S(()=>[ne(O(e.$t("Custom")),1)]),_:1}),w(f,{value:"no"},{default:S(()=>[ne(O(e.$t("Default")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"])):z("",!0),w(a,{label:e.$t("Menu Group")},{default:S(()=>[w(d,{modelValue:r.form.parent_id,"onUpdate:modelValue":t[6]||(t[6]=M=>r.form.parent_id=M)},{default:S(()=>[(C(!0),T(de,null,nt(e.appVars.space_groups,M=>(C(),H(c,{key:M.id,value:M.id.toString(),label:M.title},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]),w(a,{label:e.$t("Enrollment Type")},{default:S(()=>[w(d,{"popper-class":"rich_select",modelValue:r.form.course_type,"onUpdate:modelValue":t[7]||(t[7]=M=>r.form.course_type=M),placeholder:e.$t("Select Type")},{default:S(()=>[(C(!0),T(de,null,nt(r.courseTypes,(M,N)=>(C(),H(c,{key:N,label:M.label,value:N},{default:S(()=>[_("span",zMe,O(M.label),1),_("p",null,O(M.description),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),w(a,{label:e.$t("Status")},{default:S(()=>[w(p,{modelValue:r.form.status,"onUpdate:modelValue":t[8]||(t[8]=M=>r.form.status=M)},{default:S(()=>[w(f,{value:"published"},{default:S(()=>[ne(O(e.$t("Published")),1)]),_:1}),w(f,{value:"draft"},{default:S(()=>[ne(O(e.$t("Draft")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.has_pro&&r.form.id?(C(),H(a,{key:1,label:e.$t("Topic navigation")},{default:S(()=>[w(h,{modelValue:r.form.category_ids,"onUpdate:modelValue":t[9]||(t[9]=M=>r.form.category_ids=M)},null,8,["modelValue"]),_("div",jMe,[_("p",null,[ne(O(e.$t("Categorize your course and allow members to filter courses with the topic navigation bar in the courses directory. You can define up to 20 topics per course."))+" ",1),_("a",{target:"_blank",rel:"noopener",href:e.$getRouteLink("admin/settings/topics-settings")},O(e.$t("Manage all topics.")),9,HMe)])])]),_:1},8,["label"])):z("",!0),w(a,{label:e.$t("Thumbnail / Open Graph Image (Recommended Size: 1200 x 630)")},{default:S(()=>[r.form.cover_photo?(C(),H(m,{key:0,alt:e.$t("Cover Photo"),src:r.form.cover_photo,style:{"max-width":"100px",height:"auto"}},null,8,["alt","src"])):z("",!0),_("div",UMe,[w($,{isTextBtn:!1,can_remove:!!r.form.cover_photo,additionalData:{resize:!0,max_width:1200,max_height:630},onUploaded:s.handlePhotoUpload},ms({remove:S(()=>[w(v,null,{default:S(()=>[w(b)]),_:1})]),_:2},[r.form.cover_photo?{name:"trigger",fn:S(()=>[w(k,{class:"fcom_plain_button"},{default:S(()=>[w(v,null,{default:S(()=>[w(y)]),_:1})]),_:1})]),key:"0"}:void 0]),1032,["can_remove","onUploaded"])]),_("div",WMe,[_("p",null,O(e.$t("Will be used on course card preview and social sharing preview.")),1)])]),_:1},8,["label"]),w(a,null,{default:S(()=>[Fe((C(),H(k,{class:"fcom_primary_button",disabled:r.saving,onClick:t[10]||(t[10]=M=>s.submit())},{default:S(()=>[r.form.id?(C(),T("span",KMe,O(e.$t("Update Info")),1)):(C(),T("span",qMe,O(e.$t("Create")),1))]),_:1},8,["disabled"])),[[E,r.saving]])]),_:1})]),_:1},8,["modelValue"])):(C(),T("div",GMe,[_("p",null,O(e.$t("Course Module is disabled. Please enable the course module first")),1),_("a",{class:"el-button el-button--default fcom_primary_button",href:e.$getRouteLink("admin/settings/features")},O(e.$t("Go to features settings")),9,YMe)]))}const gL=Be(FMe,[["render",ZMe]]),JMe={name:"GroupIcon"},XMe={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},QMe=_("path",{d:"M13.8494 12C14.3489 12 14.7462 11.6856 15.103 11.2461C15.8333 10.3463 14.6342 9.62723 14.1769 9.27507C13.712 8.91708 13.1929 8.71428 12.6667 8.66667M12 7.33333C12.9205 7.33333 13.6667 6.58714 13.6667 5.66667C13.6667 4.74619 12.9205 4 12 4",stroke:"currentColor","stroke-linecap":"round"},null,-1),eOe=_("path",{d:"M2.15096 12C1.65143 12 1.2541 11.6856 0.897356 11.2461C0.167051 10.3463 1.36611 9.62723 1.82342 9.27507C2.28831 8.91708 2.80738 8.71428 3.33366 8.66667M3.66699 7.33333C2.74652 7.33333 2.00033 6.58714 2.00033 5.66667C2.00033 4.74619 2.74652 4 3.66699 4",stroke:"currentColor","stroke-linecap":"round"},null,-1),tOe=_("path",{d:"M5.38953 10.0738C4.70834 10.495 2.92232 11.3551 4.01013 12.4313C4.54151 12.957 5.13334 13.333 5.87741 13.333H10.1232C10.8673 13.333 11.4591 12.957 11.9905 12.4313C13.0783 11.3551 11.2923 10.495 10.6111 10.0738C9.01375 9.08608 6.9869 9.08608 5.38953 10.0738Z",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),nOe=_("path",{d:"M10.3337 4.99984C10.3337 6.2885 9.28899 7.33317 8.00033 7.33317C6.71166 7.33317 5.66699 6.2885 5.66699 4.99984C5.66699 3.71117 6.71166 2.6665 8.00033 2.6665C9.28899 2.6665 10.3337 3.71117 10.3337 4.99984Z",stroke:"currentColor"},null,-1),oOe=[QMe,eOe,tOe,nOe];function rOe(e,t,n,o,r,s){return C(),T("svg",XMe,oOe)}const sOe=Be(JMe,[["render",rOe]]),iOe={name:"ManageCourses",components:{CreateCourseForm:gL,AppLayout:xs,Layout:Es,GroupIcon:sOe},data(){return{courses:[],loading:!0,pagination:{current_page:1,per_page:50,total:0},type:"all",newCourseModal:!1,is_admin:!1}},methods:{fetchCourses(){this.loading=!0,this.$get("admin/courses",{page:this.pagination.current_page,per_page:this.pagination.per_page,type:this.type}).then(e=>{this.courses=e.courses.data,this.is_admin=e.is_admin,this.pagination.total=e.courses.total}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})},getExcerpt(e,t=200){if(!e)return"";let n=e.replace(/(<([^>]+)>)/ig,"");return n.length>t&&(n=n.substring(0,t)+"..."),n},navigateToEditLessons(e){this.$router.push({name:"edit_lessons",params:{course_id:e}})}},mounted(){this.fetchCourses()}},lOe={class:"fcom_courses"},aOe={class:"fcom_box_card_list"},uOe=["onClick"],cOe=["src"],dOe={key:1,class:"fcom_no_image"},fOe={class:"fcom_box_card_info"},pOe={class:"fcom_box_card_name"},hOe={class:"fcom_box_card_by"},mOe={class:"fcom_box_card_details"},gOe={class:"inline_details"},vOe=_("span",{class:"fcom_inline_separator"},null,-1),yOe={class:"inline_details"},_Oe={key:0,class:"fcom_box_card_description"},bOe={class:"fcom_box_card_action"},wOe=["onClick"];function COe(e,t,n,o,r,s){const i=ut,l=vh,a=ee("router-link"),u=ee("GroupIcon"),c=Ie,d=ee("layout"),f=ee("app-layout"),p=ee("create-course-form"),h=na,m=Rt("loading");return C(),T(de,null,[w(f,{wrapper_class:"fcom_single_layout fcom_max_layout"},{default:S(()=>[w(d,{wrapper_class:"no_bg_layout",title:e.$t("Manage Courses")},{actions:S(()=>[w(i,{class:"fcom_primary_button",onClick:t[0]||(t[0]=y=>r.newCourseModal=!0)},{default:S(()=>[ne(O(e.$t("Add Course")),1)]),_:1})]),default:S(()=>[Fe((C(),T("div",lOe,[_("div",aOe,[(C(!0),T(de,null,nt(r.courses,y=>(C(),T("div",{key:y.id,class:"fcom_each_box_card"},[_("div",{class:"fcom_box_card_avatar",onClick:v=>s.navigateToEditLessons(y.id)},[y.cover_photo?(C(),T("img",{key:0,src:y.cover_photo,alt:""},null,8,cOe)):(C(),T("div",dOe))],8,uOe),_("div",fOe,[_("div",pOe,[w(a,{class:"course_route",to:{name:"edit_lessons",params:{course_id:y.id}}},{default:S(()=>[ne(O(s.getExcerpt(y.title,20))+" ",1),y.status=="draft"?(C(),H(l,{key:0,type:"info"},{default:S(()=>[ne(O(y.status),1)]),_:2},1024)):z("",!0)]),_:2},1032,["to"]),_("span",hOe,O(e.$t("by %s",y==null?void 0:y.owner.display_name)),1)]),_("div",mOe,[_("div",gOe,[_("span",null,O(e.$_n("%d Section","%d Sections",y.sectionsCount)),1),vOe,_("span",null,O(e.$_n("%d Lesson","%d Lessons",y.lessonsCount)),1)]),_("div",yOe,[w(c,null,{default:S(()=>[w(u)]),_:1}),ne(" "+O(e.$_n("%d student","%d students",y.students_count||0)),1)])]),y.description?(C(),T("div",_Oe,O(s.getExcerpt(y.description,40)),1)):z("",!0),_("div",bOe,[_("button",{class:"fcom_card_button",onClick:v=>s.navigateToEditLessons(y.id)},O(e.$t("Manage")),9,wOe)])])]))),128))])])),[[m,r.loading]])]),_:1},8,["title"])]),_:1}),w(h,{"close-on-click-modal":!1,"append-to-body":!0,size:e.drawerWidth,modelValue:r.newCourseModal,"onUpdate:modelValue":t[2]||(t[2]=y=>r.newCourseModal=y),direction:"rtl"},{header:S(()=>[_("h4",null,O(e.$t("Create a new course")),1)]),default:S(()=>[r.newCourseModal?(C(),H(p,{key:0,onCompleted:t[1]||(t[1]=y=>{r.newCourseModal=!1})})):z("",!0)]),_:1},8,["size","modelValue"])],64)}const kOe=Be(iOe,[["render",COe]]),SOe={name:"LockscreenMeta",components:{BgImageUpload:KO},props:["lockscreen"],emits:["editField"],data(){return{editing:!1,editTab:"content",editingField:null}},computed:{lockscreenFields(){return this.lockscreen},getFieldIcon(){return e=>{const t={image:"Picture",block:"Tickets",lesson:"Memo"};return e.name=="action"?"Iphone":t[e.type]}}},methods:{toggleHidden(e){e.hidden=!e.hidden},updateField(e){this.editing=!0,this.editingField=e;const t=e.type=="block"?e:null;this.$emit("editField",t)},backToFields(){this.editing=!1,this.editingField=null,this.$emit("editField",null)},moveUp(e){if(e==0)return;const t=this.lockscreen[e],n=this.lockscreen[e-1];this.lockscreen.splice(e-1,2,t,n)},moveDown(e){if(e==this.lockscreen.length-1)return;const t=this.lockscreen[e],n=this.lockscreen[e+1];this.lockscreen.splice(e,2,n,t)},handlePhotoUpload(e){this.editingField.background_image=e}}},$Oe={key:0,class:"fcom_lockscreen_meta"},EOe={class:"fcom_meta_section lockscreen_meta"},xOe={class:"fcom_description"},TOe={class:"fcom_meta_section lockscreen_meta"},MOe={class:"fcom_meta_label"},OOe={class:"fcom_meta_content"},IOe={class:"fcom_meta_block"},AOe={class:"fcom_block_label"},NOe={class:"fcom_meta_sorting"},POe={class:"fcom_block_action"},LOe={key:1,class:"fcom_lockscreen_meta"},ROe={class:"fcom_edit_title"},DOe={class:"fcom_edit_content"},VOe={class:"fcom_color_input_wrap"},FOe={class:"fcom_color_input_wrap"},BOe={class:"fcom_color_input_wrap"},zOe={class:"fcom_color_input_wrap"},jOe={class:"fcom_color_input_wrap"},HOe={key:1,class:"fcom_description"};function UOe(e,t,n,o,r,s){const i=Ie,l=ee("Top"),a=ee("Bottom"),u=ee("EditPen"),c=ee("Hide"),d=ee("View"),f=ee("Back"),p=$t,h=Mn,m=Tn,y=tC,v=ee("BgImageUpload"),k=Z0,b=eC;return r.editing?(C(),T("div",LOe,[_("div",ROe,[w(i,{onClick:s.backToFields},{default:S(()=>[w(f)]),_:1},8,["onClick"]),_("p",null,O(r.editingField.label),1)]),_("div",DOe,[r.editingField.type=="image"?(C(),H(b,{key:0,modelValue:r.editTab,"onUpdate:modelValue":t[17]||(t[17]=$=>r.editTab=$)},{default:S(()=>[w(y,{label:e.$t("Content"),name:"content"},{default:S(()=>[w(m,{onSubmit:t[4]||(t[4]=Ze($=>e.doNothing(),["prevent"])),model:r.editingField,"label-position":"top",class:"fcom_form_container"},{default:S(()=>[w(h,{label:e.$t("Heading")},{default:S(()=>[w(p,{modelValue:r.editingField.heading,"onUpdate:modelValue":t[0]||(t[0]=$=>r.editingField.heading=$),placeholder:e.$t("Heading")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),w(h,{label:e.$t("Description")},{default:S(()=>[w(p,{modelValue:r.editingField.description,"onUpdate:modelValue":t[1]||(t[1]=$=>r.editingField.description=$),type:"textarea",placeholder:e.$t("Description")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),w(h,{label:e.$t("Button Label")},{default:S(()=>[w(p,{modelValue:r.editingField.button_text,"onUpdate:modelValue":t[2]||(t[2]=$=>r.editingField.button_text=$),placeholder:e.$t("Button Label")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),w(h,{label:e.$t("Button Link")},{default:S(()=>[w(p,{modelValue:r.editingField.button_link,"onUpdate:modelValue":t[3]||(t[3]=$=>r.editingField.button_link=$)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1},8,["model"])]),_:1},8,["label"]),w(y,{label:e.$t("Design"),name:"design"},{default:S(()=>[w(m,{onSubmit:t[16]||(t[16]=Ze($=>e.doNothing(),["prevent"])),model:r.editingField,"label-position":"top",class:"fcom_form_container"},{default:S(()=>[w(h,{label:e.$t("Background Image"),class:"fcom_bg_image"},{default:S(()=>[w(v,{modelValue:r.editingField.background_image,"onUpdate:modelValue":t[5]||(t[5]=$=>r.editingField.background_image=$),can_remove:!0},null,8,["modelValue"])]),_:1},8,["label"]),w(h,{label:e.$t("Overlay Color")},{default:S(()=>[_("div",VOe,[w(k,{predefine:e.appVars.suggestedColors,modelValue:r.editingField.overlay_color,"onUpdate:modelValue":t[6]||(t[6]=$=>r.editingField.overlay_color=$)},null,8,["predefine","modelValue"]),w(p,{modelValue:r.editingField.overlay_color,"onUpdate:modelValue":t[7]||(t[7]=$=>r.editingField.overlay_color=$)},null,8,["modelValue"])])]),_:1},8,["label"]),w(h,{label:e.$t("Heading Color")},{default:S(()=>[_("div",FOe,[w(k,{predefine:e.appVars.suggestedColors,modelValue:r.editingField.heading_color,"onUpdate:modelValue":t[8]||(t[8]=$=>r.editingField.heading_color=$)},null,8,["predefine","modelValue"]),w(p,{modelValue:r.editingField.heading_color,"onUpdate:modelValue":t[9]||(t[9]=$=>r.editingField.heading_color=$)},null,8,["modelValue"])])]),_:1},8,["label"]),w(h,{label:e.$t("Text Color")},{default:S(()=>[_("div",BOe,[w(k,{predefine:e.appVars.suggestedColors,modelValue:r.editingField.text_color,"onUpdate:modelValue":t[10]||(t[10]=$=>r.editingField.text_color=$)},null,8,["predefine","modelValue"]),w(p,{modelValue:r.editingField.text_color,"onUpdate:modelValue":t[11]||(t[11]=$=>r.editingField.text_color=$)},null,8,["modelValue"])])]),_:1},8,["label"]),w(h,{label:e.$t("Button Label")},{default:S(()=>[_("div",zOe,[w(k,{predefine:e.appVars.suggestedColors,modelValue:r.editingField.button_text_color,"onUpdate:modelValue":t[12]||(t[12]=$=>r.editingField.button_text_color=$)},null,8,["predefine","modelValue"]),w(p,{modelValue:r.editingField.button_text_color,"onUpdate:modelValue":t[13]||(t[13]=$=>r.editingField.button_text_color=$)},null,8,["modelValue"])])]),_:1},8,["label"]),w(h,{label:e.$t("Button Background")},{default:S(()=>[_("div",jOe,[w(k,{predefine:e.appVars.suggestedColors,modelValue:r.editingField.button_color,"onUpdate:modelValue":t[14]||(t[14]=$=>r.editingField.button_color=$),"show-alpha":""},null,8,["predefine","modelValue"]),w(p,{modelValue:r.editingField.button_color,"onUpdate:modelValue":t[15]||(t[15]=$=>r.editingField.button_color=$)},null,8,["modelValue"])])]),_:1},8,["label"])]),_:1},8,["model"])]),_:1},8,["label"])]),_:1},8,["modelValue"])):r.editingField.type=="block"?(C(),T("div",HOe,O(e.$t("Edit the field from block editor ")),1)):z("",!0)])])):(C(),T("div",$Oe,[_("div",EOe,[_("div",xOe,[_("p",null,O(e.$t("This page is only visible to non-members viewing a private space.")),1)])]),_("div",TOe,[_("div",MOe,O(e.$t("Page Blocks")),1),_("div",OOe,[_("ul",IOe,[(C(!0),T(de,null,nt(s.lockscreenFields,($,x)=>(C(),T("li",{class:D(["fcom_block_list",{block_hidden:$.hidden}])},[_("div",AOe,[w(i,{class:"fcom_el_icon"},{default:S(()=>[(C(),H(Pt(s.getFieldIcon($))))]),_:2},1024),_("p",null,O($.label),1)]),_("div",NOe,[w(i,{onClick:E=>s.moveUp(x)},{default:S(()=>[w(l)]),_:2},1032,["onClick"]),w(i,{onClick:E=>s.moveDown(x)},{default:S(()=>[w(a)]),_:2},1032,["onClick"])]),_("div",POe,[w(i,{onClick:E=>s.updateField($)},{default:S(()=>[w(u)]),_:2},1032,["onClick"]),$.hidden?(C(),H(i,{key:0,onClick:E=>s.toggleHidden($)},{default:S(()=>[w(c)]),_:2},1032,["onClick"])):(C(),H(i,{key:1,onClick:E=>s.toggleHidden($)},{default:S(()=>[w(d)]),_:2},1032,["onClick"]))])],2))),256))])])])]))}const WOe=Be(SOe,[["render",UOe]]),KOe={name:"BlockEditor",emits:["update:modelValue"],props:{modelValue:{type:String,required:!1}},data(){return{loading:!0,has_error:!1,all_loaded:!1,html:this.modelValue}},methods:{attach(){const e=this.$refs.block_editor;this.loading=!1,this.all_loaded=!0,window.wp.attachEditor(e,{iso:{toolbar:{undo:!0,navigation:!0,documentInspector:null},blocks:{allowBlocks:["core/button","core/buttons","core/code","core/column","core/columns","core/embed","core/group","core/heading","core/image","core/list","core/list-item","core/missing","core/paragraph","core/preformatted","core/pullquote","core/quote","core/separator","core/spacer","core/table","core/verse"]},__experimentalOnChange:function(t){console.log(t)},sidebar:{inserter:!1,inspector:!0}},editor:{__experimentalOnChange:function(t){console.log(t)},__experimentalOnInput(t){console.log(t)},__experimentalOnSelection(t){console.log(t)},onSaveContent:function(t){console.log(t)}}}),e.addEventListener("change",t=>{this.html=t.target.value,this.$emit("update:modelValue",t.target.value)})},loadScript(e){return new Promise((t,n)=>{const o=document.createElement("script");o.src=e,o.onload=t,o.onerror=n,document.head.append(o)})},async loadScripts(){const e=this.appVars.block_editor_assets.scripts;for(const t in e)try{await this.loadScript(e[t]),console.log(`${t} JS loaded`)}catch(n){this.has_error=!0,console.error(`Failed to load js ${t}:`,n)}this.attach()},loadCSSFile(e){return new Promise((t,n)=>{const o=document.createElement("link");o.rel="stylesheet",o.href=e,o.onload=t,o.onerror=n,document.head.append(o)})},async loadCSSFiles(){const t=this.appVars.block_editor_assets.styles.map(this.loadCSSFile);try{await Promise.all(t),console.log("All CSS files loaded")}catch(n){console.error("Failed to load some CSS files:",n)}}},mounted(){window.fl_block_editor_loaded?this.attach():(this.loadCSSFiles(),this.loadScripts(),window.fl_block_editor_loaded=!0)},beforeUnmount(){window.wp.detachEditor(this.$refs.block_editor)}},qOe={class:"fcom_block_editor"};function GOe(e,t,n,o,r,s){const i=Kn;return C(),T("div",qOe,[Fe(_("div",null,[_("textarea",{ref:"block_editor",id:"fcom_block_editor",name:"block_editor"},O(r.html),513)],512),[[en,r.all_loaded]]),r.all_loaded?z("",!0):(C(),H(i,{key:0,class:"white_loaded",rows:7,animated:!0}))])}const vL=Be(KOe,[["render",GOe]]),YOe={name:"MediaPreview",components:{Postcard:qZ},props:["feed","media_item"],computed:{media(){return this.feed?this.feed.meta.media_preview:this.media_item}},data(){return{is_error:!1}},methods:{getDomainName(e){return e?e.split("/")[2].replace("www.",""):""},getAspectRatio(e,t){if(e&&t){let n=e/t;return n<1?16/9:n}return 16/9},handleImageError(){this.is_error=!0}}},ZOe={key:0},JOe=["innerHTML"],XOe=["href"],QOe={key:0,class:"feed_media_image"},eIe=_("span",null,null,-1),tIe={key:1,class:"feed_media_content"},nIe={class:"media_domain"},oIe={class:"feed_media_title"},rIe={key:0,class:"feed_media_description"},sIe={class:"feed_meta_desc"};function iIe(e,t,n,o,r,s){const i=Kn,l=xd;return C(),T("div",{class:D(["feed_media","feed_media_"+s.media.type])},[s.media.type=="oembed"||s.media.type=="iframe_html"?(C(),T(de,{key:0},[s.media.content_type=="video"?(C(),T("div",ZOe,[_("div",{class:"feed_media_ext_video",innerHTML:s.media.html},null,8,JOe)])):z("",!0)],64)):s.media.type=="image"||s.media.is_uploaded?(C(),T("div",{key:1,class:D(["feed_media_provider_"+s.media.provider,"feed_media_image feed_custom_uploaded"])},[s.media.image&&!r.is_error?(C(),H(l,{key:0,alt:"",style:Ye({width:"100%",aspectRatio:s.getAspectRatio(s.media.width,s.media.height)}),src:s.media.image,lazy:!0,previewSrcList:[s.media.image],loading:"lazy",onError:s.handleImageError,"zoom-rate":1.2,"max-scale":7,"preview-teleported":!0,"min-scale":.2,"initial-index":1,class:D("fcom_media_provider_"+s.media.provider),fit:"scale-down"},{placeholder:S(()=>[w(i,{animated:!0})]),_:1},8,["style","src","previewSrcList","onError","class"])):z("",!0)],2)):(C(),T("a",{key:2,href:s.media.url,target:"_blank",rel:"noopener",class:"feed_media_link"},[s.media.image&&!r.is_error?(C(),T("div",QOe,[w(l,{onError:t[0]||(t[0]=a=>s.handleImageError()),style:{width:"100%"},src:s.media.image},{error:S(()=>[eIe]),_:1},8,["src"])])):z("",!0),s.media.title?(C(),T("div",tIe,[_("div",nIe,O(s.getDomainName(s.media.url)),1),_("div",oIe,O(e.getExcerpt(s.media.title,88)),1),s.media.description?(C(),T("div",rIe,[_("div",sIe,O(e.getExcerpt(s.media.description,160)),1)])):z("",!0)])):z("",!0)],8,XOe))],2)}const Pv=Be(YOe,[["render",iIe]]),lIe={name:"MediaEmbeder",emits:["embeded"],props:{media:{type:Object,default:()=>({type:"oembed",url:"",inner_html:"",content_type:"video"})},box_title:{type:String,default:""},box_description:{type:String,default:""},has_iframe:{type:Boolean,default:!0}},components:{MediaPreview:Pv},computed:{showPreview(){return this.media.html&&!this.showInput}},data(){return{appReady:!1,showInput:!1,fetching:!1}},methods:{fetchData(){this.media.url&&(this.fetching=!0,this.$get("feeds/oembed",{url:this.media.url}).then(e=>{this.media.html=e.oembed.html,this.media.provider=e.oembed.provider,this.media.title=e.oembed.title,this.media.author_name=e.oembed.author_name,this.media.type=e.oembed.type,this.media.content_type="video",this.$emit("embeded",this.media),this.showInput=!1}).catch(e=>{this.$handleError(e)}).finally(()=>{this.fetching=!1}))}},mounted(){typeof this.media!="object"&&(this.media={type:"oembed",url:"",inner_html:""}),this.appReady=!0,this.media.html||this.fetchData()}},aIe={key:0},uIe={key:0,class:"fcom_media_editor_actions"},cIe={key:1,class:"fcom_media_editor fcom_media_embeder"},dIe={key:2,class:"fcom_course_media"};function fIe(e,t,n,o,r,s){const i=ut,l=Y0,a=ta,u=$t,c=ee("media-preview"),d=Rt("loading");return r.appReady?Fe((C(),T("div",aIe,[n.has_iframe?(C(),T("div",uIe,[s.showPreview?(C(),H(i,{key:0,onClick:t[0]||(t[0]=f=>r.showInput=!0),type:"danger",size:"small",text:""},{default:S(()=>[ne(O(e.$t("Edit media")),1)]),_:1})):(C(),H(a,{key:1,onChange:t[1]||(t[1]=f=>{n.media.html="",n.media.url=""}),size:"small",modelValue:n.media.type,"onUpdate:modelValue":t[2]||(t[2]=f=>n.media.type=f)},{default:S(()=>[w(l,{label:e.$t("Oembed"),value:"oembed"},null,8,["label"]),w(l,{label:e.$t("Custom HTML Code"),value:"iframe_html"},null,8,["label"])]),_:1},8,["modelValue"]))])):z("",!0),s.showPreview?(C(),T("div",dIe,[w(c,{media_item:n.media},null,8,["media_item"])])):(C(),T("div",cIe,[n.media.type=="iframe_html"&&n.has_iframe?(C(),T(de,{key:0},[_("h3",null,O(e.$t("Add Video from custom HTML Code")),1),w(u,{rows:5,modelValue:n.media.html,"onUpdate:modelValue":t[3]||(t[3]=f=>n.media.html=f),type:"textarea",placeholder:e.$t("Paste an iframe code")},null,8,["modelValue","placeholder"]),w(i,{style:{"margin-top":"20px"},onClick:t[4]||(t[4]=f=>r.showInput=!1),class:"fcom_secondary_button"},{default:S(()=>[ne(O(e.$t("Embed")),1)]),_:1})],64)):(C(),T(de,{key:1},[_("h3",null,O(n.box_title||e.$t("Featured media")),1),_("p",null,O(n.box_description||e.$t("Embed from Vimeo, YouTube, Wistia and more")),1),w(u,{onKeydown:Mt(s.fetchData,["enter"]),size:"large",modelValue:n.media.url,"onUpdate:modelValue":t[5]||(t[5]=f=>n.media.url=f),type:"url",placeholder:e.$t("Paste a URL to embed")},{append:S(()=>[w(i,{onClick:s.fetchData,class:"fcom_primary_button"},{default:S(()=>[ne(O(e.$t("Embed")),1)]),_:1},8,["onClick"])]),_:1},8,["onKeydown","modelValue","placeholder"])],64))]))])),[[d,r.fetching]]):z("",!0)}const jk=Be(lIe,[["render",fIe]]),pIe={name:"_LessonEditor",props:["sections"],computed:{lessonsCount(){return this.sections.reduce((e,t)=>e+t.lessons.length,0)},sectionsCount(){return this.sections.reduce((e,t)=>e+(t.lessons.length?1:0),0)}}},hIe={class:"fcom_course_sections"},mIe={class:"fcom_course_intro"},gIe={class:"fcom_course_labels"},vIe={class:"fcom_course_info"},yIe=_("span",null," • ",-1),_Ie={class:"fcom_card_sections"},bIe={class:"fcom_section_items"},wIe={key:0,class:"fcom_section_primary_item"},CIe={class:"fcom_section_primary_item_title"},kIe={class:"fcom_section_primary_item_actions"},SIe={class:"fcom_meta_text"},$Ie={class:"fcom_section_item_title"},EIe={class:"fcom_heading_item clickable"};function xIe(e,t,n,o,r,s){const i=ee("ArrowRight"),l=ee("ArrowDown"),a=Ie,u=ee("Lock");return C(),T("div",hIe,[_("div",mIe,[_("div",gIe,[_("h3",null,O(e.$t("Course content")),1),_("p",vIe,[ne(O(e.$t("%s topics",s.sectionsCount))+" ",1),yIe,ne(" "+O(e.$t("%s lessons",s.lessonsCount)),1)])])]),_("div",_Ie,[_("div",bIe,[(C(!0),T(de,null,nt(n.sections,c=>(C(),T("div",{key:c.id,class:"fcom_section_primary"},[c.lessons.length?(C(),T("div",wIe,[_("div",CIe,[w(a,{class:"clickable",onClick:d=>c.is_closed=!c.is_closed},{default:S(()=>[c.is_closed?(C(),H(i,{key:0})):(C(),H(l,{key:1}))]),_:2},1032,["onClick"]),_("h4",null,O(c.title),1)]),_("div",kIe,[_("span",SIe,O(e.$t("%d lessons",c.lessons.length)),1)])])):z("",!0),c.is_closed?z("",!0):(C(!0),T(de,{key:1},nt(c.lessons,d=>(C(),T("div",{key:d.id,class:"fcom_section_item"},[_("div",$Ie,[_("p",EIe,[w(a,null,{default:S(()=>[w(u)]),_:1}),ne(" "+O(d.title),1)])])]))),128))]))),128))])])])}const TIe=Be(pIe,[["render",xIe]]),MIe={name:"LockScreenEditor",props:["title","lockscreen","sections","saving","loading"],emits:["save","close"],components:{LessonEditor:TIe,MediaEmbeder:jk,BlockEditor:vL,LockscreenMeta:WOe},data(){return{editingField:null}},computed:{lockscreenFields(){return this.lockscreen.filter(e=>!e.hidden)},imageStyles(){return e=>({backgroundImage:`url(${e.background_image})`,backgroundColor:e.overlay_color})},headingStyles(){return e=>({color:e.heading_color})},descriptionStyles(){return e=>({color:e.text_color})},buttonStyles(){return e=>({backgroundColor:e.button_color,color:e.button_text_color})}},methods:{updateHeading(e,t){t.heading=e.target.innerText},updateDescription(e,t){t.description=e.target.innerText},updateButtonLabel(e,t){t.button_text=e.target.innerText},visibleBlock(e){this.editingField=e},updateEditField(e){this.editingField=e,(e==null?void 0:e.type)==="block"&&setTimeout(()=>{const t=document.getElementById("fcomBlockContent");t&&t.scrollIntoView({behavior:"smooth"})},300)},saveChanges(){this.editingField=null,this.$emit("save")}}},OIe={class:"fcom_editor_topbar"},IIe={class:"fcom_editor_content"},AIe={class:"fcom_item"},NIe={class:"fcom_content"},PIe=["onInput"],LIe=["onInput"],RIe=["onInput"],DIe={key:1,class:"fcom_content_wrap"},VIe={key:0,id:"fcomBlockContent"},FIe=["onClick","innerHTML"],BIe={key:2,class:"fcom_content_wrap"};function zIe(e,t,n,o,r,s){const i=ee("lockscreen-meta"),l=J0,a=ee("Lock"),u=Ie,c=ee("block-editor"),d=ee("lesson-editor"),f=Kn,p=Ss,h=Ed;return C(),T(de,null,[w(l,{class:"fcom_full_editor_side lockscreen_editor",width:"250px"},{default:S(()=>[he(e.$slots,"before_meta"),w(i,{lockscreen:n.lockscreen,onEditField:s.updateEditField},null,8,["lockscreen","onEditField"])]),_:3}),w(h,{class:"fcom_full_editor_main lockscreen_editor"},{default:S(()=>[w(p,null,{default:S(()=>[_("div",OIe,[w(u,null,{default:S(()=>[w(a)]),_:1}),_("h3",null,O(n.title),1)]),_("div",IIe,[(C(!0),T(de,null,nt(s.lockscreenFields,m=>{var y;return C(),T("div",AIe,[m.type=="image"?(C(),T("div",{key:0,class:"fcom_image_wrap",style:Ye(s.imageStyles(m))},[_("div",NIe,[_("h2",{style:Ye(s.headingStyles(m)),contenteditable:"true",onInput:v=>s.updateHeading(v,m)},O(m.heading),45,PIe),_("p",{style:Ye(s.descriptionStyles(m)),contenteditable:"true",onInput:v=>s.updateDescription(v,m)},O(m.description),45,LIe),_("button",{class:"fcom_btn",style:Ye(s.buttonStyles(m)),contenteditable:"true",onInput:v=>s.updateButtonLabel(v,m)},O(m.button_text),45,RIe)])],4)):z("",!0),m.type=="block"?(C(),T("div",DIe,[((y=r.editingField)==null?void 0:y.type)=="block"?(C(),T("div",VIe,[w(c,{modelValue:m.content,"onUpdate:modelValue":v=>m.content=v},null,8,["modelValue","onUpdate:modelValue"])])):(C(),T("div",{key:1,onClick:v=>s.visibleBlock(m),innerHTML:m.content},null,8,FIe))])):z("",!0),m.type=="lesson"?(C(),T("div",BIe,[n.loading?(C(),H(f,{key:1,rows:5,animated:!0})):(C(),H(d,{key:0,sections:n.sections},null,8,["sections"]))])):z("",!0)])}),256))])]),_:1})]),_:1})],64)}const jIe=Be(MIe,[["render",zIe]]),HIe={name:"CourseLockscreen",props:["spaceProfile","savingCount"],emits:["close"],components:{LockScreenEditor:jIe},data(){return{saving:!1,loading:!1,sections:[],lockscreen:null}},watch:{savingCount(){this.saveChanges(!0)}},methods:{getSections(){this.loading=!0,this.$get("admin/courses/"+this.spaceProfile.id+"/sections",{conditions:["only_published"],with_lock_screen:!0}).then(e=>{this.sections=e.sections,this.lockscreen=e.lockscreen}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})},saveChanges(e=!1){this.lockscreen&&(this.saving=!0,this.$put("admin/courses/"+this.spaceProfile.id+"/lockscreens",{lockscreen:this.lockscreen}).then(t=>{this.$notify.success(t.message),e&&this.$emit("close")}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1}))}},mounted(){this.getSections()}},UIe={key:0,class:"fcom_lockscreen_meta"},WIe={class:"fcom_description"};function KIe(e,t,n,o,r,s){const i=ee("lock-screen-editor");return r.lockscreen?(C(),H(i,{key:0,title:n.spaceProfile.title,lockscreen:r.lockscreen,sections:r.sections,saving:r.saving,loading:r.loading,onSave:s.saveChanges,onClose:t[0]||(t[0]=l=>e.$emit("close"))},{before_meta:S(()=>[n.spaceProfile.settings.custom_lock_screen!="yes"?(C(),T("div",UIe,[_("div",WIe,[_("p",null,O(e.$t("__LOCK_SCRREN_DESC")),1)])])):z("",!0)]),_:1},8,["title","lockscreen","sections","saving","loading","onSave"])):z("",!0)}const qIe=Be(HIe,[["render",KIe]]),GIe={name:"ManageSpaceLinks",components:{MenuGroupSettings:hL},props:["spaceProfile","savingCount"],emits:["close"],data(){return{saving:!1}},watch:{savingCount(){this.saveMenuItems(!0)}},methods:{saveMenuItems(e=!1){this.saving=!0;let t="spaces/"+this.spaceProfile.slug+"/links";this.spaceProfile.type=="course"&&(t="admin/courses/"+this.spaceProfile.id+"/links"),this.$post(t,{links:this.spaceProfile.settings.links}).then(n=>{this.$notify.success(n.message),this.spaceProfile.settings.links=n.links,e&&this.$emit("close")}).catch(n=>{this.$handleError(n)}).finally(()=>{this.saving=!1})}}},YIe={style:{"max-width":"800px",padding:"20px",margin:"0 auto"}},ZIe={class:"fcom_card_sections"};function JIe(e,t,n,o,r,s){const i=ee("menu-group-settings"),l=Ss,a=Ed;return C(),H(a,{class:"fcom_full_editor_main lockscreen_editor"},{default:S(()=>[w(l,null,{default:S(()=>[_("div",YIe,[_("div",ZIe,[w(i,{custom_svg:!0,use_icon_selector:!0,has_svg:!1,onSave:t[0]||(t[0]=u=>s.saveMenuItems()),title:e.$t("Manage Links"),menuItems:n.spaceProfile.settings.links},null,8,["title","menuItems"])])])]),_:1})]),_:1})}const XIe=Be(GIe,[["render",JIe]]),QIe={name:"SpaceCustomizer",props:["course"],emits:["close","completed"],components:{ManageSpaceLinks:XIe,CourseLockscreen:qIe,CreateCourseForm:gL},data(){return{saving:!1,currentTab:"general",savingCount:0}},methods:{saveChanges(){this.savingCount=this.savingCount+1}}},eAe={key:0,class:"fcom_full_editor"},tAe={class:"fcom_full_editor_header"},nAe={class:"fcom_editor_menu object_menu"},oAe={class:"fcom_space_menu_ul"},rAe={class:"full_editor_actions"},sAe={style:{"max-width":"600px",padding:"20px",margin:"0 auto"}};function iAe(e,t,n,o,r,s){const i=ee("ArrowLeft"),l=Ie,a=ut,u=zw,c=ee("create-course-form"),d=Ss,f=Ed,p=ee("course-lockscreen"),h=ee("manage-space-links"),m=Bw,y=Rt("loading");return n.course.id?(C(),T("div",eAe,[w(m,null,{default:S(()=>[w(u,{class:"fcom_full_editor_header_wrap"},{default:S(()=>[_("div",tAe,[_("div",{onClick:t[0]||(t[0]=v=>e.$emit("completed")),class:"fcom_back_header"},[w(l,null,{default:S(()=>[w(i)]),_:1}),ne(" "+O(n.course.title),1)]),_("div",nAe,[_("ul",oAe,[_("li",{onClick:t[1]||(t[1]=v=>r.currentTab="general")},[_("a",{class:D({"router-link-exact-active":r.currentTab==="general"}),href:"#"},O(e.$t("General Settings")),3)]),n.course.privacy=="private"?(C(),T("li",{key:0,onClick:t[2]||(t[2]=v=>r.currentTab="lock_screen")},[_("a",{class:D({"router-link-exact-active":r.currentTab==="lock_screen"}),href:"#"},O(e.$t("Lock Screen")),3)])):z("",!0),_("li",{onClick:t[3]||(t[3]=v=>r.currentTab="manage_links")},[_("a",{class:D({"router-link-exact-active":r.currentTab==="manage_links"}),href:"#"},O(e.$t("Course Links")),3)])])]),_("div",rAe,[Fe((C(),H(a,{class:"fcom_primary_button",disabled:r.saving,onClick:s.saveChanges,bg:""},{default:S(()=>[ne(O(e.$t("Save Changes & Close")),1)]),_:1},8,["disabled","onClick"])),[[y,r.saving]])])])]),_:1}),w(m,{class:"fcom_full_editor_container"},{default:S(()=>[r.currentTab=="general"?(C(),H(f,{key:0,class:"fcom_full_editor_main lockscreen_editor"},{default:S(()=>[w(d,null,{default:S(()=>[_("div",sAe,[w(c,{onClose:t[4]||(t[4]=v=>e.$emit("close")),savingCount:r.savingCount,course:n.course},null,8,["savingCount","course"])])]),_:1})]),_:1})):r.currentTab=="lock_screen"?(C(),H(p,{key:1,savingCount:r.savingCount,spaceProfile:n.course,onClose:t[5]||(t[5]=v=>e.$emit("close"))},null,8,["savingCount","spaceProfile"])):r.currentTab=="manage_links"?(C(),H(h,{key:2,savingCount:r.savingCount,onClose:t[6]||(t[6]=v=>e.$emit("close")),spaceProfile:n.course},null,8,["savingCount","spaceProfile"])):z("",!0)]),_:1})]),_:1})])):z("",!0)}const lAe=Be(QIe,[["render",iAe]]),aAe={name:"EditCourseRoute",components:{CourseCustomizer:lAe,AppLayout:xs,Layout:Es},props:["course_id"],data(){return{course:{},loading:!0,menuItems:[{name:"course_overview",route:"course_overview",title:this.$t("Overview")},{name:"lessons",route:"edit_lessons",title:this.$t("Lessons")},{name:"students",route:"course_students",title:this.$t("Students")}],customizeCourse:!1}},methods:{fetchCourse(){this.loading=!0,this.$get("admin/courses/"+this.course_id).then(e=>{this.course=e.course}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})},initDeleteCourse(){this.$refs.course_actions.hide(),this.$confirm(this.$t("Are you sure you want to delete this course?"),this.$t("Warning"),{confirmButtonText:this.$t("Yes, Delete the course"),cancelButtonText:this.$t("No"),type:"warning"}).then(()=>{this.$promt(this.$t("Please Type %s to confirm. Please note, all the lessons, topics, students progress will be deleted.",'"DELETE"'),this.$t("Delete Course"),{confirmButtonText:this.$t("Confirm Delete"),cancelButtonText:this.$t("Cancel")}).then(e=>{e.value==="DELETE"?this.deleteCourse():this.$notify.error(this.$t("The verification string does not match"))})})},deleteCourse(){this.loading=!0,this.$del("admin/courses/"+this.course.id).then(e=>{this.$notify.success(e.message),this.$router.push({name:"manage_courses"})}).catch(e=>{this.$handleError(e),this.loading=!1})},toViewCourse(){let e=this.$getRouteLink("course/:course_slug/lessons",{course_slug:this.course.slug});window.location.href=e}},mounted(){this.fetchCourse()}},uAe={class:"object_menu"},cAe={class:"fcom_space_menu_ul"},dAe={key:0},fAe={class:"actions_items"},pAe={key:0,class:"white_loaded"},hAe={key:2},mAe={key:0};function gAe(e,t,n,o,r,s){const i=fne,l=dne,a=ee("router-link"),u=ee("MoreFilled"),c=Ie,d=ut,f=bo,p=Kn,h=ee("router-view"),m=ee("layout"),y=ee("app-layout"),v=ee("course-customizer");return C(),T(de,null,[w(y,{wrapper_class:"fcom_single_layout fcom_max_layout"},{default:S(()=>[w(m,{wrapper_class:"no_bg_layout",title:e.$t("Courses")},{title:S(()=>[w(l,null,{default:S(()=>[w(i,{to:{name:"manage_courses"}},{default:S(()=>[ne(O(e.$t("Courses")),1)]),_:1}),r.course.id?(C(),H(i,{key:0},{default:S(()=>[ne(O(r.course.title)+" ",1),e.hasCourseAdminAccess()?(C(),T("span",{key:0,class:"fcom_edit_course fcom_secondary_button clickable",onClick:t[0]||(t[0]=k=>{r.customizeCourse=!0})},O(e.$t("Edit")),1)):z("",!0)]),_:1})):z("",!0)]),_:1})]),actions:S(()=>[_("div",uAe,[_("ul",cAe,[(C(!0),T(de,null,nt(r.menuItems,k=>(C(),T("li",{key:k.name,class:D("course_inner_menu_"+k.name)},[w(a,{to:{name:k.route,params:{course_id:r.course.id}}},{default:S(()=>[ne(O(k.title),1)]),_:2},1032,["to"])],2))),128)),e.hasCourseAdminAccess()?(C(),T("li",dAe,[w(f,{placement:"bottom",ref:"course_actions",persistent:!1,width:200,trigger:"click"},{reference:S(()=>[w(d,{"aria-label":e.$t("View actions"),class:"fcom_dot_menu",size:"small",text:""},{default:S(()=>[w(c,null,{default:S(()=>[w(u)]),_:1})]),_:1},8,["aria-label"])]),default:S(()=>[_("ul",fAe,[_("li",{onClick:t[1]||(t[1]=k=>s.toViewCourse())},O(e.$t("View Course")),1),_("li",{onClick:t[2]||(t[2]=()=>{e.$refs.course_actions.hide(),r.customizeCourse=!0})},O(e.$t("Edit Course")),1),_("li",{onClick:t[3]||(t[3]=(...k)=>s.initDeleteCourse&&s.initDeleteCourse(...k))},O(e.$t("Delete Course")),1)])]),_:1},512)])):z("",!0)])])]),default:S(()=>[r.loading?(C(),T("div",pAe,[w(p,{loading:r.loading,animation:"pulse",row:"10"},null,8,["loading"])])):r.course.id?(C(),H(h,{key:1,course:r.course},null,8,["course"])):(C(),T("div",hAe,[_("h3",null,O(e.$t("Sorry, the course can not be loaded")),1)]))]),_:1},8,["title"])]),_:1}),r.customizeCourse&&r.course.id?(C(),T("div",mAe,[(C(),H(qr,{to:"body"},[w(v,{course:r.course,onClose:t[4]||(t[4]=k=>{r.customizeCourse=null,s.fetchCourse()}),onCompleted:t[5]||(t[5]=k=>{r.customizeCourse=null,s.fetchCourse()})},null,8,["course"])]))])):z("",!0)],64)}const vAe=Be(aAe,[["render",gAe]]),yAe={name:"LengthInput",props:["modelValue"],data(){return{muinutes:0,seconds:0}},methods:{updateLength(){this.$emit("update:modelValue",parseInt(this.muinutes)*60+parseInt(this.seconds))}},mounted(){this.modelValue&&(this.muinutes=Math.floor(this.modelValue/60)||"",this.seconds=this.modelValue%60||"")}},_Ae={class:"fcom_length_input"};function bAe(e,t,n,o,r,s){const i=$t;return C(),T("div",_Ae,[w(i,{type:"number",modelValue:r.muinutes,"onUpdate:modelValue":t[0]||(t[0]=l=>r.muinutes=l),onChange:s.updateLength,min:0,max:1444,size:"small"},{append:S(()=>[ne(O(e.$t("min")),1)]),_:1},8,["modelValue","onChange"]),w(i,{type:"number",modelValue:r.seconds,"onUpdate:modelValue":t[1]||(t[1]=l=>r.seconds=l),onChange:s.updateLength,min:0,max:59,size:"small"},{append:S(()=>[ne(O(e.$t("sec")),1)]),_:1},8,["modelValue","onChange"])])}const wAe=Be(yAe,[["render",bAe]]),CAe={name:"CourseMeta",components:{LengthInput:wAe},props:["lesson"]},kAe={class:"fcom_course_meta"},SAe={class:"fcom_meta_section"},$Ae={class:"fcom_meta_label"},EAe={class:"fcom_meta_content"},xAe={key:0,class:"fcom_meta_section"},TAe={class:"fcom_meta_label"},MAe={class:"fcom_meta_content"};function OAe(e,t,n,o,r,s){const i=En,l=ee("length-input");return C(),T("div",kAe,[_("div",SAe,[_("div",$Ae,O(e.$t("Features Settings")),1),_("div",EAe,[w(i,{modelValue:n.lesson.meta.enable_media,"onUpdate:modelValue":t[0]||(t[0]=a=>n.lesson.meta.enable_media=a),"true-value":"yes","false-value":"no"},{default:S(()=>[ne(O(e.$t("Enable Video Embed")),1)]),_:1},8,["modelValue"]),w(i,{modelValue:n.lesson.meta.enable_comments,"onUpdate:modelValue":t[1]||(t[1]=a=>n.lesson.meta.enable_comments=a),"true-value":"yes","false-value":"no"},{default:S(()=>[ne(O(e.$t("Enable Comments")),1)]),_:1},8,["modelValue"])])]),n.lesson.meta.enable_media=="yes"?(C(),T("div",xAe,[_("div",TAe,O(e.$t("Video length")),1),_("div",MAe,[w(l,{modelValue:n.lesson.meta.video_length,"onUpdate:modelValue":t[2]||(t[2]=a=>n.lesson.meta.video_length=a)},null,8,["modelValue"])])])):z("",!0)])}const IAe=Be(CAe,[["render",OAe]]),AAe={name:"LessonEditor",props:["lesson","section","course","editingIndex"],emits:["saved","close","changeLesson"],components:{BlockEditor:vL,MediaEmbeder:jk,LessonMeta:IAe},data(){return{saving:!1}},methods:{saveData(){this.saving=!0,this.$put("admin/courses/"+this.lesson.space_id+"/lessons/"+this.lesson.id,{lesson:{id:this.lesson.id,parent_id:this.lesson.parent_id,space_id:this.lesson.space_id,title:this.lesson.title,message:this.lesson.message,meta:this.lesson.meta,status:this.lesson.status}}).then(e=>{this.$notify.success(e.message),this.$emit("saved",e.lesson)}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})}},mounted(){document.body.classList.add("fcom-no-scroll")},beforeUnmount(){document.body.classList.remove("fcom-no-scroll")}},NAe={class:"fcom_full_editor"},PAe={class:"fcom_full_editor_header"},LAe={key:0},RAe={class:"full_editor_actions"},DAe={class:"fcom_editor_wrap"},VAe={style:{"margin-bottom":"10px"},class:"fcom_lesson_camp"},FAe={class:"fcom_lesson_nav"},BAe={class:"fcom_lesson_title"},zAe={class:"fcom_lesson_content"};function jAe(e,t,n,o,r,s){const i=ee("ArrowLeft"),l=Ie,a=ee("arrow-down"),u=ut,c=Ch,d=kh,f=wh,p=zw,h=ee("lesson-meta"),m=J0,y=ee("ArrowRight"),v=$t,k=ee("media-embeder"),b=ee("block-editor"),$=Ss,x=Ed,E=Bw,M=Rt("loading");return C(),T("div",NAe,[w(E,null,{default:S(()=>[w(p,{class:"fcom_full_editor_header_wrap"},{default:S(()=>[_("div",PAe,[_("div",{onClick:t[0]||(t[0]=N=>e.$emit("close")),class:"fcom_back_header"},[w(l,null,{default:S(()=>[w(i)]),_:1}),ne(" "+O(e.$t("Back to Lessons"))+" ",1),n.course&&n.course.title?(C(),T("span",LAe,"("+O(n.course.title)+")",1)):z("",!0)]),_("div",RAe,[w(f,{onCommand:t[1]||(t[1]=N=>{n.lesson.status=N}),trigger:"click"},{dropdown:S(()=>[w(d,null,{default:S(()=>[w(c,{command:"draft"},{default:S(()=>[ne(O(e.$t("Draft")),1)]),_:1}),w(c,{command:"published"},{default:S(()=>[ne(O(e.$t("Published")),1)]),_:1})]),_:1})]),default:S(()=>[w(u,{type:n.lesson.status=="published"?"success":"info",bg:"",text:"",class:"el-dropdown-link"},{default:S(()=>[ne(O(e.$labelize(n.lesson.status))+" ",1),w(l,{class:"el-icon--right"},{default:S(()=>[w(a)]),_:1})]),_:1},8,["type"])]),_:1}),Fe((C(),H(u,{style:{"margin-left":"15px"},disabled:r.saving,onClick:s.saveData,class:"fcom_primary_button"},{default:S(()=>[ne(O(e.$t("Save")),1)]),_:1},8,["disabled","onClick"])),[[M,r.saving]])])])]),_:1}),w(E,{class:"fcom_full_editor_container"},{default:S(()=>[w(m,{class:"fcom_full_editor_side",width:"250px"},{default:S(()=>[w(h,{lesson:n.lesson},null,8,["lesson"])]),_:1}),w(x,{class:"fcom_full_editor_main"},{default:S(()=>[w($,null,{default:S(()=>[_("div",DAe,[_("div",VAe,[_("div",null,O(e.$t("Lesson %1s of %2s - %3s",n.editingIndex+1,n.section.lessons.length,n.section.title)),1),_("div",FAe,[w(u,{onClick:t[2]||(t[2]=N=>e.$emit("changeLesson",n.editingIndex-1)),disabled:n.editingIndex===0,size:"small"},{default:S(()=>[w(l,null,{default:S(()=>[w(i)]),_:1})]),_:1},8,["disabled"]),w(u,{onClick:t[3]||(t[3]=N=>e.$emit("changeLesson",n.editingIndex+1)),disabled:n.editingIndex+1===n.section.lessons.length,size:"small"},{default:S(()=>[w(l,null,{default:S(()=>[w(y)]),_:1})]),_:1},8,["disabled"])])]),_("div",BAe,[w(v,{ref:"create_status",type:"text",class:"fcom_input_h1",modelValue:n.lesson.title,"onUpdate:modelValue":t[4]||(t[4]=N=>n.lesson.title=N),size:"large",placeholder:e.$t("Lesson Title")},null,8,["modelValue","placeholder"])]),n.lesson.meta.enable_media=="yes"?(C(),H(k,{key:0,style:{margin:"30px 0"},media:n.lesson.meta.media},null,8,["media"])):z("",!0),_("div",zAe,[w(b,{modelValue:n.lesson.message,"onUpdate:modelValue":t[5]||(t[5]=N=>n.lesson.message=N)},null,8,["modelValue"])])])]),_:1})]),_:1})]),_:1})]),_:1})])}const yL=Be(AAe,[["render",jAe]]),HAe={name:"LessonLine",emits:["showEditor","updated"],props:["lesson"],components:{LessonEditor:yL},data(){return{editing_title:!1,editingLesson:!1}},methods:{updateLessonStatus(e){if(this.lesson.status===e)return!1;this.lesson.status=e,this.$emit("updated",this.lesson,["status"])},updateLessonTitle(){this.editing_title=!1,this.$emit("updated",this.lesson,["title"])},showEditor(){this.editing_title=!0,this.$nextTick(()=>{this.$refs.lesson_title_edit.focus()})},handleLessonAction(e){e==="edit_title"?this.showEditor():e==="delete"?this.$emit("deleteLesson",this.lesson):e==="edit_lesson"&&this.$emit("showEditor",this.lesson)}}},UAe={key:0,class:"fcom_heading_item"},WAe={class:"fcom_section_item_actions"};function KAe(e,t,n,o,r,s){const i=ut,l=$t,a=ee("arrow-down"),u=Ie,c=Ch,d=kh,f=wh,p=ee("MoreFilled");return C(),T(de,null,[_("div",{class:D([{fcom_title_editing:r.editing_title},"fcom_section_item_title fcom_title_editable"])},[he(e.$slots,"before_section_heading"),r.editing_title?(C(),H(l,{key:1,onKeydown:t[1]||(t[1]=Mt(h=>r.editing_title=!1,["esc"])),ref:"lesson_title_edit",onKeyup:Mt(s.updateLessonTitle,["enter"]),modelValue:n.lesson.title,"onUpdate:modelValue":t[2]||(t[2]=h=>n.lesson.title=h)},{append:S(()=>[w(i,{onClick:s.updateLessonTitle},{default:S(()=>[ne(O(e.$t("save")),1)]),_:1},8,["onClick"])]),_:1},8,["onKeyup","modelValue"])):(C(),T("p",UAe,[_("span",{onClick:t[0]||(t[0]=h=>e.$emit("showEditor",n.lesson))},O(n.lesson.title),1)]))],2),_("div",WAe,[w(i,{onClick:t[3]||(t[3]=h=>e.$emit("showEditor",n.lesson)),class:"fcom_show_hover",text:""},{default:S(()=>[ne(O(e.$t("Edit lesson")),1)]),_:1}),w(f,{onCommand:t[4]||(t[4]=h=>{s.updateLessonStatus(h)}),trigger:"click"},{dropdown:S(()=>[w(d,null,{default:S(()=>[w(c,{command:"draft"},{default:S(()=>[ne(O(e.$t("Draft")),1)]),_:1}),w(c,{command:"published"},{default:S(()=>[ne(O(e.$t("Published")),1)]),_:1})]),_:1})]),default:S(()=>[w(i,{class:D(["el-dropdown-link",`fcom_button_${n.lesson.status==="published"?"success":"info"}`]),bg:"",text:""},{default:S(()=>[ne(O(e.$labelize(n.lesson.status))+" ",1),w(u,{class:"el-icon--right"},{default:S(()=>[w(a)]),_:1})]),_:1},8,["class"])]),_:1}),w(f,{onCommand:s.handleLessonAction,trigger:"click"},{dropdown:S(()=>[w(d,null,{default:S(()=>[w(c,{command:"edit_lesson"},{default:S(()=>[ne(O(e.$t("Edit Lesson Content")),1)]),_:1}),w(c,{command:"edit_title"},{default:S(()=>[ne(O(e.$t("Edit Title")),1)]),_:1}),w(c,{command:"delete"},{default:S(()=>[ne(O(e.$t("Delete Lesson")),1)]),_:1})]),_:1})]),default:S(()=>[w(i,{"aria-label":e.$t("View actions"),size:"small",class:"fcom_dot_menu",text:""},{default:S(()=>[w(u,null,{default:S(()=>[w(p)]),_:1})]),_:1},8,["aria-label"])]),_:1},8,["onCommand"])])],64)}const qAe=Be(HAe,[["render",KAe]]),GAe={name:"SectionScheduler",components:{CaretBottom:jY},props:["section","course"],data(){return{saving:!1,show:!1,time:"09:00",date:"",unlock_after:0}},methods:{saveSchedule(){let e=this.date+" "+this.time+":00";if(!dayjs(e).isValid()){this.$notify.error(this.$t("Please select a valid date and time"));return}this.section.scheduled_at=e,this.patchCourse({scheduled_at:e},()=>{this.show=!1})},saveUnlockDays(){this.patchCourse({reactions_count:this.unlock_after},()=>{this.section.reactions_count=this.unlock_after,this.show=!1})},patchCourse(e={},t=null){this.saving=!0,this.$patch("admin/courses/"+this.course.id+"/sections/"+this.section.id,e).then(n=>{this.$notify.success(this.$t("Schedule has been updated")),t&&t(n)}).catch(n=>{this.$handleError(n)}).finally(()=>{this.saving=!1})},initUnlockDay(){if(this.show){this.show=!1;return}this.unlock_after=parseInt(this.section.reactions_count),this.show=!0},initPicker(){if(this.show){this.show=!1;return}let e=this.section.scheduled_at;if(!e){this.show=!0;return}this.date=dayjs(e).format("YYYY-MM-DD"),this.time=dayjs(e).format("HH:mm"),this.show=!0}}},YAe={style:{"padding-left":"10px"},class:"fcom_section_scheduler"},ZAe={class:"fcom_scheduler_form"},JAe={class:"fcom_input_group"},XAe={class:"el_inline_date_picker"},QAe={class:"fcom_input_group"},eNe={class:"fcom_input_group"},tNe={class:"fcom_scheduler_form"},nNe={class:"fcom_input_group"},oNe={class:"fcom_label"},rNe={class:"fcom_input_group"};function sNe(e,t,n,o,r,s){const i=ee("CaretBottom"),l=Ie,a=die,u=LO,c=ut,d=bo,f=vO,p=Rt("loading");return C(),T("div",YAe,[n.course.settings.course_type=="scheduled"?(C(),H(d,{key:0,persistent:!1,placement:"bottom",width:400,visible:r.show},{reference:S(()=>[_("button",{onClick:t[0]||(t[0]=(...h)=>s.initPicker&&s.initPicker(...h)),class:"fcom_input_select_btn"},[_("span",null,O(n.section.scheduled_at?e.smartDate(n.section.scheduled_at,!0,!0):e.$t("Select Drip date")),1),w(l,null,{default:S(()=>[w(i)]),_:1})])]),default:S(()=>[_("div",ZAe,[_("div",JAe,[_("div",XAe,[w(a,{"value-format":"YYYY-MM-DD",format:"YYYY-MM-DD",teleported:!1,"popper-class":"el_inline_date_picker_box",modelValue:r.date,"onUpdate:modelValue":t[1]||(t[1]=h=>r.date=h)},null,8,["modelValue"])])]),_("div",QAe,[w(u,{modelValue:r.time,"onUpdate:modelValue":t[2]||(t[2]=h=>r.time=h),start:"00:00",end:"23:59",steps:15},null,8,["modelValue"])]),_("div",eNe,[Fe((C(),H(c,{disabled:r.saving,type:"success",onClick:s.saveSchedule},{default:S(()=>[ne(O(e.$t("Update Date")),1)]),_:1},8,["disabled","onClick"])),[[p,r.saving]])])])]),_:1},8,["visible"])):z("",!0),n.course.settings.course_type=="structured"?(C(),H(d,{key:1,persistent:!1,placement:"bottom",width:400,visible:r.show},{reference:S(()=>[_("button",{onClick:t[3]||(t[3]=(...h)=>s.initUnlockDay&&s.initUnlockDay(...h)),class:"fcom_input_select_btn"},[_("span",null,O(n.section.reactions_count?e.$t("after %s days of enrollment",n.section.reactions_count):e.$t("Immediately")),1),w(l,null,{default:S(()=>[w(i)]),_:1})])]),default:S(()=>[_("div",tNe,[_("div",nNe,[_("div",oNe,O(e.$t("Unlock section after")),1),w(f,{modelValue:r.unlock_after,"onUpdate:modelValue":t[4]||(t[4]=h=>r.unlock_after=h),min:0,max:1e3,"controls-position":"right",precision:0},null,8,["modelValue"]),ne(" "+O(e.$t("Days")),1)]),_("div",rNe,[Fe((C(),H(c,{disabled:r.saving,type:"success",onClick:s.saveUnlockDays},{default:S(()=>[ne(O(e.$t("Update")),1)]),_:1},8,["disabled","onClick"])),[[p,r.saving]])])])]),_:1},8,["visible"])):z("",!0)])}const iNe=Be(GAe,[["render",sNe]]),lNe={name:"SectionPart",props:["section","course"],emits:["reload"],components:{LessonEditor:yL,LessonLine:qAe,SectionScheduler:iNe,FluentDnD:Nv},data(){return{editing_title:!1,addingLesson:!1,newLesson:{title:""},working:!1,editingLesson:null,editingIndex:0}},computed:{hasSchedule(){return this.course.settings.course_type==="scheduled"||this.course.settings.course_type==="structured"}},methods:{updateLessonStatus(e,t){e.status=t},showTitleEditor(){this.editing_title=!0,this.$nextTick(()=>{this.$refs.fcom_section_title_editor.focus()})},patchSection(e){let t={};e.forEach(n=>{t[n]=this.section[n]}),this.editing_title=!1,this.$patch("admin/courses/"+this.course.id+"/sections/"+this.section.id,t).then(n=>{console.log(n)}).catch(n=>{this.$handleError(n)})},handleLessonUpdated(e,t){let n={};t.forEach(o=>{n[o]=e[o]}),this.editing_title=!1,this.$patch("admin/courses/"+this.course.id+"/lessons/"+e.id,n).then(o=>{this.$notify.success(o.message)}).catch(o=>{this.$handleError(o)})},addLesson(e,t=!1){e&&e.preventDefault(),this.addingLesson=!0,this.$post("admin/courses/"+this.course.id+"/lessons",{...this.newLesson,section_id:parseInt(this.section.id)}).then(n=>{this.section.lessons.push(n.lesson),this.$refs.add_lesson.hide(),this.newLesson.title="",t&&this.$nextTick(()=>{let o=this.section.lessons.length-1;this.editingLesson=this.section.lessons[o],this.editingIndex=o})}).catch(n=>{this.$handleError(n)}).finally(()=>{this.addingLesson=!1})},handleSectionAction(e){if(e=="edit_title"){this.showTitleEditor();return}e=="delete"&&this.$confirm(this.$t("Are you sure you want to delete this section? All the associated lessons and enrollment data will be deleted too."),{confirmButtonText:this.$t("Yes, Delete"),cancelButtonText:this.$t("Cancel"),type:"warning",title:this.$t("Are you sure?"),showInput:!0,dangerouslyUseHTMLString:!0,inputPlaceholder:this.$t("Type %s to confirm","DELETE"),inputValidator(t){return t.toLowerCase()==="delete"?!0:this.$t("You must type %s to confirm","DELETE")},inputErrorMessage:this.$t("You must type %s to confirm","DELETE")}).then(t=>{if(t.value!="DELETE"){this.$notify.error({title:"Error",message:this.$t("You must type %s to confirm","DELETE")});return}this.working=!0,this.$del("admin/courses/"+this.course.id+"/sections/"+this.section.id).then(n=>{this.$emit("reload")}).catch(n=>{this.$handleError(n)}).finally(()=>{this.working=!1})}).catch(()=>{})},handleDeleteLesson(e){this.$confirm(this.$t("Are you sure you want to delete this lesson? All the associated data will be deleted too."),{confirmButtonText:this.$t("Yes, Delete"),cancelButtonText:this.$t("Cancel"),type:"warning",title:this.$t("Are you sure?")}).then(()=>{this.working=!0,this.$del("admin/courses/"+this.course.id+"/lessons/"+e.id).then(t=>{this.$emit("reload")}).catch(t=>{this.$handleError(t)}).finally(()=>{this.working=!1})}).catch(()=>{})},handleChangeLesson(e){this.editingLesson=null,this.editingIndex=0,this.$nextTick(()=>{this.editingLesson=this.section.lessons[e],this.editingIndex=e})},initLessonEditor(e,t){console.log(t),this.editingLesson=e,this.editingIndex=t},dropLesson({index:e}){const t=this.section.lessons.splice(e,1)[0];this.section.lessons.splice(e,0,t),this.resetLessonIndexes()},resetLessonIndexes(){const e={};yu(this.section.lessons,(t,n)=>{e[t.id]=n+1}),this.$patch("admin/courses/"+this.course.id+"/sections/"+this.section.id+"/indexes",{indexes:e}).then(t=>{this.$notify.success(t.message)}).catch(t=>{this.$handleError(t)})}}},aNe={class:"fcom_section_primary"},uNe={class:"fcom_section_primary_item"},cNe={key:0,class:"fcom_heading_item"},dNe={class:"fcom_section_config fcom_label_schedule"},fNe={class:"fcom_section_config fcom_label_email"},pNe={style:{"margin-left":"15px"}},hNe={class:"meta_line"},mNe={class:"fcom_section_primary_item_actions fcom_label_actions"},gNe={key:0,class:"fcom_section_items"},vNe=_("div",{class:"fcom_drag_handle"}," ⋮⋮ ",-1),yNe={key:0};function _Ne(e,t,n,o,r,s){const i=ut,l=$t,a=ee("section-scheduler"),u=Mn,c=Tn,d=bo,f=ee("MoreFilled"),p=Ie,h=Ch,m=kh,y=wh,v=ee("lesson-line"),k=ee("FluentDnD"),b=ee("LessonEditor"),$=Rt("loading");return C(),T(de,null,[Fe((C(),T("div",aNe,[_("div",uNe,[_("div",{class:D(["fcom_section_primary_item_title fcom_title_editable fcom_label_lesson",{fcom_title_editing:r.editing_title}])},[he(e.$slots,"before_section_heading"),r.editing_title?(C(),H(l,{key:1,ref:"fcom_section_title_editor",onKeyup:t[2]||(t[2]=Mt(x=>s.patchSection(["title"]),["enter"])),modelValue:n.section.title,"onUpdate:modelValue":t[3]||(t[3]=x=>n.section.title=x)},{append:S(()=>[w(i,{onClick:t[1]||(t[1]=x=>s.patchSection(["title"]))},{default:S(()=>[ne(O(e.$t("save")),1)]),_:1})]),_:1},8,["modelValue"])):(C(),T("h4",cNe,[_("span",{onClick:t[0]||(t[0]=x=>r.editing_title=!0)},O(n.section.title),1)]))],2),s.hasSchedule?(C(),T(de,{key:0},[_("div",dNe,[w(a,{section:n.section,course:n.course},null,8,["section","course"])]),_("div",fNe,[_("div",pNe,[_("span",hNe,O(e.$t("n/a")),1)])])],64)):z("",!0),_("div",mNe,[w(d,{persistent:!1,ref:"add_lesson",placement:"bottom",width:400,trigger:"click"},{reference:S(()=>[w(i,{class:"fcom_secondary_button"},{default:S(()=>[ne(O(e.$t("Add Lesson")),1)]),_:1})]),default:S(()=>[w(c,{onSubmit:[t[6]||(t[6]=Ze(x=>e.doNothing(),["prevent"])),s.addLesson],"label-position":"top"},{default:S(()=>[w(u,{label:e.$t("Lesson Title")},{default:S(()=>[w(l,{modelValue:r.newLesson.title,"onUpdate:modelValue":t[4]||(t[4]=x=>r.newLesson.title=x),placeholder:e.$t("Enter Lesson title")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),w(u,null,{default:S(()=>[Fe((C(),H(i,{disabled:r.addingLesson,class:"fcom_secondary_button",onClick:s.addLesson},{default:S(()=>[ne(O(e.$t("Add")),1)]),_:1},8,["disabled","onClick"])),[[$,r.addingLesson]]),Fe((C(),H(i,{disabled:r.addingLesson,class:"fcom_primary_button",onClick:t[5]||(t[5]=()=>{s.addLesson(!1,!0)})},{default:S(()=>[ne(O(e.$t("Add & Edit")),1)]),_:1},8,["disabled"])),[[$,r.addingLesson]])]),_:1})]),_:1},8,["onSubmit"])]),_:1},512),w(y,{onCommand:s.handleSectionAction,trigger:"click"},{dropdown:S(()=>[w(m,null,{default:S(()=>[w(h,{command:"edit_title"},{default:S(()=>[ne(O(e.$t("Edit Title")),1)]),_:1}),w(h,{command:"delete"},{default:S(()=>[ne(O(e.$t("Delete section")),1)]),_:1})]),_:1})]),default:S(()=>[w(i,{"aria-label":e.$t("View actions"),size:"small",class:"fcom_dot_menu",style:{"margin-left":"10px"},text:""},{default:S(()=>[w(p,null,{default:S(()=>[w(f)]),_:1})]),_:1},8,["aria-label"])]),_:1},8,["onCommand"])])]),n.section.lessons.length?(C(),T("div",gNe,[w(k,{items:n.section.lessons,onDrop:s.dropLesson,"item-class":"fcom_section_item"},{item:S(({data:x,index:E})=>[(C(),H(v,{onDeleteLesson:s.handleDeleteLesson,onUpdated:s.handleLessonUpdated,key:x.id,onShowEditor:M=>s.initLessonEditor(x,E),lesson:x},{before_section_heading:S(()=>[vNe]),_:2},1032,["onDeleteLesson","onUpdated","onShowEditor","lesson"]))]),_:1},8,["items","onDrop"])])):z("",!0)])),[[$,r.working]]),r.editingLesson?(C(),T("div",yNe,[(C(),H(qr,{to:"body"},[w(b,{course:n.course,onChangeLesson:s.handleChangeLesson,section:n.section,editingIndex:r.editingIndex,onClose:t[7]||(t[7]=x=>{r.editingLesson=null}),lesson:r.editingLesson},null,8,["course","onChangeLesson","section","editingIndex","lesson"])]))])):z("",!0)],64)}const bNe=Be(lNe,[["render",_Ne]]),wNe={name:"EditLessons",props:["course"],components:{SectionPart:bNe,FluentDnD:Nv},data(){return{sections:[],loading:!1,newSection:{title:""},addingSection:!1}},computed:{lessonsCount(){let e=0;return yu(this.sections,t=>{e+=t.lessons.length}),e}},methods:{fetchSections(){this.loading=!0,this.$get("admin/courses/"+this.course.id+"/sections").then(e=>{this.sections=e.sections}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})},dropSection({indx:e}){const t=this.sections.splice(e,1)[0];this.sections.splice(e,0,t),this.resetSectionIndexes()},addSection(){this.addingSection=!0,this.$post("admin/courses/"+this.course.id+"/sections",this.newSection).then(e=>{this.sections.push(e.section),this.$refs.add_section.hide(),this.newSection.title=""}).catch(e=>{this.$handleError(e)}).finally(()=>{this.addingSection=!1})},resetSectionIndexes(){const e={};yu(this.sections,(t,n)=>{e[t.id]=n+1}),this.$patch("admin/courses/"+this.course.id+"/sections/indexes",{indexes:e}).then(t=>{this.$notify.success(t.message)}).catch(t=>{this.$handleError(t)})}},mounted(){this.fetchSections()}},CNe={class:"fcom_course_lessons"},kNe={class:"fcom_settings_header"},SNe={class:"fcom_settings_header_meta"},$Ne={class:"fcom_settings_header_meta_item"},ENe={class:"fcom_card_section_heading"},xNe={class:"fcom_section_labels"},TNe={class:"fcom_lebel fcom_label_lesson"},MNe={class:"fcom_lebel fcom_label_schedule"},ONe={class:"fcom_lebel fcom_label_email"},INe=_("div",{class:"fcom_lebel fcom_label_actions"},null,-1),ANe=_("div",{class:"fcom_drag_handle"}," ⋮⋮ ",-1);function NNe(e,t,n,o,r,s){const i=ut,l=$t,a=Mn,u=Tn,c=bo,d=Kn,f=ee("section-part"),p=ee("FluentDnD"),h=Rt("loading");return C(),T("div",CNe,[_("div",kNe,[_("div",null,[_("h2",null,O(e.$t("Lessons")),1),_("div",SNe,[_("div",$Ne,[_("b",null,O(e.$t("Type:")),1),ne(" "+O(e.$labelize(n.course.settings.course_type))+" • ",1),_("b",null,O(e.$t("Status:")),1),ne(" "+O(e.$labelize(n.course.status))+" • ",1),_("b",null,O(e.$t("Visibility:")),1),ne(" "+O(e.$labelize(n.course.privacy)),1)])])])]),_("div",{class:D(["fcom_card_sections","fcom_course_type_"+n.course.settings.course_type])},[Fe((C(),T("div",ENe,[_("h3",null,O(e.$_n("%d Section","%d Sections",r.sections.length))+" • "+O(e.$_n("%d Lesson","%d Lessons",s.lessonsCount)),1),w(c,{persistent:!1,ref:"add_section",placement:"bottom",width:400,trigger:"click"},{reference:S(()=>[w(i,{class:"fcom_primary_button",bg:""},{default:S(()=>[ne(O(e.$t("+ Add Section")),1)]),_:1})]),default:S(()=>[w(u,{onSubmit:t[1]||(t[1]=Ze(m=>e.doNothing(),["prevent"])),"label-position":"top"},{default:S(()=>[w(a,{label:e.$t("Section Title")},{default:S(()=>[w(l,{onKeydown:Mt(Ze(s.addSection,["prevent"]),["enter"]),modelValue:r.newSection.title,"onUpdate:modelValue":t[0]||(t[0]=m=>r.newSection.title=m),placeholder:e.$t("Enter Section title")},null,8,["onKeydown","modelValue","placeholder"])]),_:1},8,["label"]),w(a,null,{default:S(()=>[Fe((C(),H(i,{disabled:r.addingSection,class:"fcom_primary_button",onClick:s.addSection},{default:S(()=>[ne(O(e.$t("Save")),1)]),_:1},8,["disabled","onClick"])),[[h,r.addingSection]])]),_:1})]),_:1})]),_:1},512)])),[[h,r.loading]]),r.loading?(C(),H(d,{key:0,animated:!0,rows:10})):z("",!0),_("div",xNe,[_("div",TNe,O(e.$t("Lesson name")),1),_("div",MNe,O(e.$t("Schedule")),1),_("div",ONe,O(e.$t("E-mail")),1),INe]),w(p,{items:r.sections,onDrop:s.dropSection,"item-class":"fcom_section_item"},{item:S(({data:m})=>[w(f,{onReload:s.fetchSections,course:n.course,section:m},{before_section_heading:S(()=>[ANe]),_:2},1032,["onReload","course","section"])]),_:1},8,["items","onDrop"])],2)])}const PNe=Be(wNe,[["render",NNe]]),LNe={name:"Pagination",emits:["fetch","per_page_change"],props:{pagination:{required:!0,type:Object},extra_sizes:{required:!1,type:Array,default(){return[]}},hide_on_single:{required:!1,type:Boolean,default(){return!0}}},computed:{page_sizes(){const e=[];this.pagination.per_page<10&&e.push(this.pagination.per_page);const t=[10,20,50,80,100,120,150];return[...e,...t,...this.extra_sizes]},pager_layout(){return this.isMobile?"total, sizes, jumper, prev, next":"total, sizes, jumper , prev, pager, next"}},methods:{changePage(e){this.pagination.page=e,this.$emit("fetch")},changeSize(e){this.pagination.per_page=e,this.$emit("per_page_change",e),this.$emit("fetch")}}},RNe={class:"fcom_pagination_wrap"};function DNe(e,t,n,o,r,s){const i=oue;return C(),T("div",RNe,[w(i,{background:!1,size:"small","pager-count":3,layout:s.pager_layout,onCurrentChange:s.changePage,onSizeChange:s.changeSize,"hide-on-single-page":n.hide_on_single,"current-page":n.pagination.page,"page-sizes":s.page_sizes,"page-size":n.pagination.per_page,total:n.pagination.total},null,8,["layout","onCurrentChange","onSizeChange","hide-on-single-page","current-page","page-sizes","page-size","total"])])}const _L=Be(LNe,[["render",DNe]]),VNe={name:"AddStudentForm",props:["course"],emits:["completed"],data(){return{users:[],loading:!1,saving:!1,userId:null}},methods:{searchUsers(e=""){e&&e.length<3||this.fetchUsers(e)},fetchUsers(e=""){this.loading=!0,this.$get("admin/courses/users/search",{search:e,course_id:this.course.id}).then(t=>{this.users=t.users.data}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},addStudent(){this.saving=!0,this.$post("admin/courses/"+this.course.id+"/students",{user_id:this.userId}).then(e=>{this.$notify.success(e.message),this.$emit("completed")}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})}},mounted(){this.fetchUsers()}},FNe={style:{float:"left"}},BNe={style:{float:"right",color:"#8492a6","font-size":"13px"}};function zNe(e,t,n,o,r,s){const i=$s,l=vr,a=Mn,u=ut,c=Tn,d=Rt("loading");return C(),H(c,{onSubmit:t[2]||(t[2]=Ze(f=>e.doNothing(),["prevent"])),"label-position":"top"},{default:S(()=>[w(a,{label:e.$t("User")},{default:S(()=>[w(l,{class:"rich_select",filterable:"",remote:"",loading:r.loading,"remote-method":s.searchUsers,placeholder:e.$t("Select User"),modelValue:r.userId,"onUpdate:modelValue":t[0]||(t[0]=f=>r.userId=f)},{default:S(()=>[(C(!0),T(de,null,nt(r.users,f=>(C(),H(i,{key:f.ID,label:f.display_name+" ("+f.ID+")",value:f.ID},{default:S(()=>[_("span",FNe,O(f.display_name),1),_("span",BNe,O(f.ID),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["loading","remote-method","placeholder","modelValue"])]),_:1},8,["label"]),he(e.$slots,"after_form",{},()=>[w(a,null,{default:S(()=>[Fe((C(),H(u,{class:"fcom_primary_button",disabled:r.saving,onClick:t[1]||(t[1]=f=>s.addStudent())},{default:S(()=>[ne(O(e.$t("Add Student")),1)]),_:1},8,["disabled"])),[[d,r.saving]])]),_:1})])]),_:3})}const jNe=Be(VNe,[["render",zNe]]),HNe={name:"CourseMembers",props:["course","course_id"],components:{UserRouteLink:Ov,Pagination:_L,AddStudentForm:jNe},data(){return{students:[],search:"",loading:!0,working:!1,isAddStdOpen:!1,SearchIcon:Ai(nJ),pagination:{page:1,per_page:20,total:0}}},methods:{updateStudents(e){this.students=this.students.filter(t=>t.user_id!==e.user_id)},studentAdded(){this.isAddStdOpen=!1,this.fetchStudents()},toSearch(){this.pagination.page=1,this.fetchStudents()},removeStudentPrompt(e){this.$confirm(this.$t("Are you sure you want to remove this student from this course?"),this.$t("Remove Student?"),{confirmButtonText:this.$t("Remove"),cancelButtonText:this.$t("Cancel"),type:"error"}).then(()=>{this.removeStudent(e)})},removeStudent(e){this.$del("admin/courses/"+this.course.id+"/students/"+e.user_id).then(t=>{this.$notify.success(t.message),this.updateStudents(e)}).catch(t=>{this.$handleError(t)})},fetchStudents(){this.loading=!0,this.$get("admin/courses/"+this.course.id+"/students",{page:this.pagination.page,per_page:this.pagination.per_page,search:this.search}).then(e=>{this.students=e.students.data,this.pagination.total=e.students.total,window.scrollTo(0,0)}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})}},mounted(){this.fetchStudents()}},UNe={class:"fcom_course_members"},WNe={class:"fcom_course_member_header"},KNe={class:"fcom_course_member_actions"},qNe={class:"table_user_card"},GNe={class:"card_avatar"},YNe={class:"card_info"},ZNe={class:"card_name"},JNe={class:"meta_line"},XNe={class:"progress_wrap"};function QNe(e,t,n,o,r,s){const i=ut,l=$t,a=ee("UserAvatar"),u=ee("UserRouteLink"),c=tv,d=wO,f=ee("MoreFilled"),p=Ie,h=Ch,m=kh,y=wh,v=ev,k=ee("pagination"),b=ee("add-student-form"),$=na,x=Rt("loading");return C(),T("div",UNe,[_("div",WNe,[_("h3",null,O(e.$t("Course Students")),1),_("div",KNe,[w(l,{onKeyup:t[1]||(t[1]=Mt(E=>s.toSearch(),["enter"])),modelValue:r.search,"onUpdate:modelValue":t[2]||(t[2]=E=>r.search=E),placeholder:e.$t("Search Members...")},{append:S(()=>[w(i,{onClick:t[0]||(t[0]=E=>s.toSearch()),text:"",icon:r.SearchIcon},null,8,["icon"])]),_:1},8,["modelValue","placeholder"]),e.hasCourseAdminAccess()?(C(),H(i,{key:0,class:"fcom_primary_button el-button",onClick:t[3]||(t[3]=E=>r.isAddStdOpen=!0)},{default:S(()=>[ne(O(e.$t("Add Student")),1)]),_:1})):z("",!0)])]),Fe((C(),H(v,{data:r.students,style:{width:"100%","border-radius":"8px"}},{default:S(()=>[w(c,{prop:"ID",label:e.$t("Name"),"min-width":"200"},{default:S(E=>[_("div",qNe,[_("div",GNe,[w(a,{xprofile:E.row},null,8,["xprofile"])]),_("div",YNe,[_("div",ZNe,[w(u,{show_badge:!0,xprofile:E.row},null,8,["xprofile"])]),_("div",JNe,O(e.getExcerpt(E.row.short_description,160)),1)])])]),_:1},8,["label"]),w(c,{width:"160",prop:"progress",label:e.$t("Progress")},{default:S(E=>[_("div",XNe,[w(d,{percentage:parseInt(E.row.progress)},null,8,["percentage"])])]),_:1},8,["label"]),w(c,{width:"160",label:e.$t("Start Date")},{default:S(E=>[ne(O(e.smartDate(E.row.space_pivot.created_at,!0)),1)]),_:1},8,["label"]),w(c,{width:"60"},{default:S(E=>[e.hasCourseAdminAccess()?(C(),H(y,{key:0,trigger:"click"},{dropdown:S(()=>[w(m,null,{default:S(()=>[w(h,{onClick:M=>s.removeStudentPrompt(E.row)},{default:S(()=>[ne(O(e.$t("Remove")),1)]),_:2},1032,["onClick"])]),_:2},1024)]),default:S(()=>[w(i,{"aria-label":e.$t("View actions"),class:"fcom_dot_menu",size:"small",text:""},{default:S(()=>[w(p,null,{default:S(()=>[w(f)]),_:1})]),_:1},8,["aria-label"])]),_:2},1024)):z("",!0)]),_:1})]),_:1},8,["data"])),[[x,r.loading]]),w(k,{hide_on_single:!0,onFetch:s.fetchStudents,pagination:r.pagination},null,8,["onFetch","pagination"]),w($,{modelValue:r.isAddStdOpen,"onUpdate:modelValue":t[4]||(t[4]=E=>r.isAddStdOpen=E),"close-on-click-modal":!1,"append-to-body":!0,size:e.dialogWidth,direction:"rtl"},{header:S(()=>[_("h4",null,O(e.$t("Add Student")),1)]),default:S(()=>[w(b,{onCompleted:s.studentAdded,course:n.course},null,8,["onCompleted","course"])]),_:1},8,["modelValue","size"])])}const ePe=Be(HNe,[["render",QNe]]),tPe={name:"ChatIcon"},nPe={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},oPe=_("path",{d:"M6.66732 11.25H13.334M6.66732 7.08333H10.0007",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),rPe=_("path",{d:"M5.08267 15.833C3.99924 15.7264 3.18762 15.401 2.6433 14.8567C1.66699 13.8804 1.66699 12.309 1.66699 9.16634V8.74967C1.66699 5.60698 1.66699 4.03563 2.6433 3.05932C3.61961 2.08301 5.19096 2.08301 8.33366 2.08301H11.667C14.8097 2.08301 16.381 2.08301 17.3573 3.05932C18.3337 4.03563 18.3337 5.60698 18.3337 8.74967V9.16634C18.3337 12.309 18.3337 13.8804 17.3573 14.8567C16.381 15.833 14.8097 15.833 11.667 15.833C11.1999 15.8434 10.8279 15.879 10.4625 15.9622C9.46385 16.1921 8.5391 16.7031 7.62522 17.1487C6.32307 17.7837 5.67199 18.1012 5.2634 17.8039C4.48174 17.2218 5.24577 15.4179 5.41699 14.583",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"},null,-1),sPe=[oPe,rPe];function iPe(e,t,n,o,r,s){return C(),T("svg",nPe,sPe)}const lPe=Be(tPe,[["render",iPe]]),aPe={name:"HeartIcon",props:{filled:{default:!1}}},uPe={key:0,viewBox:"0 0 24 24","aria-hidden":"true"},cPe=_("g",null,[_("path",{d:"M20.884 13.19c-1.351 2.48-4.001 5.12-8.379 7.67l-.503.3-.504-.3c-4.379-2.55-7.029-5.19-8.382-7.67-1.36-2.5-1.41-4.86-.514-6.67.887-1.79 2.647-2.91 4.601-3.01 1.651-.09 3.368.56 4.798 2.01 1.429-1.45 3.146-2.1 4.796-2.01 1.954.1 3.714 1.22 4.601 3.01.896 1.81.846 4.17-.514 6.67z"})],-1),dPe=[cPe],fPe={key:1,viewBox:"0 0 24 24","aria-hidden":"true"},pPe=_("g",null,[_("path",{d:"M16.697 5.5c-1.222-.06-2.679.51-3.89 2.16l-.805 1.09-.806-1.09C9.984 6.01 8.526 5.44 7.304 5.5c-1.243.07-2.349.78-2.91 1.91-.552 1.12-.633 2.78.479 4.82 1.074 1.97 3.257 4.27 7.129 6.61 3.87-2.34 6.052-4.64 7.126-6.61 1.111-2.04 1.03-3.7.477-4.82-.561-1.13-1.666-1.84-2.908-1.91zm4.187 7.69c-1.351 2.48-4.001 5.12-8.379 7.67l-.503.3-.504-.3c-4.379-2.55-7.029-5.19-8.382-7.67-1.36-2.5-1.41-4.86-.514-6.67.887-1.79 2.647-2.91 4.601-3.01 1.651-.09 3.368.56 4.798 2.01 1.429-1.45 3.146-2.1 4.796-2.01 1.954.1 3.714 1.22 4.601 3.01.896 1.81.846 4.17-.514 6.67z"})],-1),hPe=[pPe];function mPe(e,t,n,o,r,s){return n.filled?(C(),T("svg",uPe,dPe)):(C(),T("svg",fPe,hPe))}const bL=Be(aPe,[["render",mPe]]),gPe={name:"SurveyEditForm",props:["form"],emits:["cancel"],data(){return{}},methods:{addOption(){this.form.options.push({label:"",slug:""})},removeOption(e){this.form.options.splice(e,1)}}},vPe={class:"fcom_compose_app_form"},yPe={class:"fcom_app_header"},_Pe={class:"fcom_app_options"},bPe={class:"fcom_app_pref"},wPe={class:"fcom_app_footer"};function CPe(e,t,n,o,r,s){const i=ut,l=$t,a=ee("Plus"),u=Ie,c=En;return C(),T("div",vPe,[_("div",yPe,[_("h5",null,O(e.$t("Poll Options")),1),_("div",null,[w(i,{onClick:t[0]||(t[0]=d=>e.$emit("cancel")),size:"small",text:""},{default:S(()=>[ne(O(e.$t("cancel")),1)]),_:1})])]),_("div",_Pe,[(C(!0),T(de,null,nt(n.form.options,(d,f)=>(C(),T("div",{class:"fcom_app_option",key:"option_"+f},[w(l,{modelValue:d.label,"onUpdate:modelValue":p=>d.label=p,type:"text",placeholder:e.$t("Your option text")},ms({_:2},[!d.slug&&f!==0?{name:"suffix",fn:S(()=>[w(i,{onClick:p=>s.removeOption(f),text:"",size:"small"},{default:S(()=>[ne("x")]),_:2},1032,["onClick"])]),key:"0"}:void 0]),1032,["modelValue","onUpdate:modelValue","placeholder"])]))),128)),_("div",bPe,[w(i,{onClick:s.addOption,text:"",size:"small"},{default:S(()=>[w(u,null,{default:S(()=>[w(a)]),_:1}),_("span",null,O(e.$t("Add More")),1)]),_:1},8,["onClick"])])]),_("div",wPe,[_("h5",null,O(e.$t("Poll Settings")),1),w(c,{modelValue:n.form.type,"onUpdate:modelValue":t[1]||(t[1]=d=>n.form.type=d),"true-value":"multi_choice","false-value":"single_choice"},{default:S(()=>[ne(O(e.$t("Users can choose multiple options")),1)]),_:1},8,["modelValue"])])])}const kPe=Be(gPe,[["render",CPe]]),SPe={name:"GiphyIcon"},$Pe={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},EPe=C0('<path d="M12.9287 10.09H14.7095" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"></path><path d="M15.0781 8.20333H12.9277V11.98" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"></path><path d="M10.3458 8.19998V11.98" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"></path><path d="M7.74961 8.2H6.48961C5.44549 8.2 4.59961 9.04588 4.59961 10.09V10.09C4.59961 11.1341 5.44549 11.98 6.48961 11.98H7.74961V10.09H6.69961" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"></path><path d="M4.5 19C2.567 19 1 17.433 1 15.5L1 4.49999C1 2.567 2.567 0.999992 4.5 0.999992H15.5C17.433 0.999992 19 2.567 19 4.49999V15.5C19 17.433 17.433 19 15.5 19H4.5Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>',5),xPe=[EPe];function TPe(e,t,n,o,r,s){return C(),T("svg",$Pe,xPe)}const MPe=Be(SPe,[["render",TPe]]),OPe={name:"Giphy",components:{GiphyIcon:MPe},data(){return{gifs:[],searchQuery:"",offset:0,limit:20,loading:!1}},methods:{loadGifs(){var t,n;if(((n=(t=this.$gloablStorage)==null?void 0:t.gifs)==null?void 0:n.length)>0&&!this.searchQuery){this.gifs=this.$gloablStorage.gifs;return}this.loading=!0;const e={limit:this.limit,offset:this.offset,q:this.searchQuery.trim()};this.$get("giphy",e).then(o=>{this.gifs=this.offset===0?o.gifs:this.gifs.concat(o.gifs),!this.searchQuery&&this.offset===0&&(this.$gloablStorage.gifs=this.gifs),this.offset+=this.limit}).catch(o=>{this.$handleError(o)}).finally(()=>{this.loading=!1})},handleGiphyClick(){this.offset=0,this.searchQuery="",this.loadGifs()},handleSearch:kpe(function(){this.offset=0,this.loadGifs()},300),handleScroll(e){e.target.scrollHeight-e.target.scrollTop===e.target.clientHeight&&!this.loading&&this.loadGifs()},selectGiphy(e){this.$emit("selected-giphy",e),this.$refs.popover.hide()}}},IPe={class:"fcom_giphy_composer"},APe={class:"search-container"},NPe=["onLoad","src","alt","onClick"],PPe={key:0,class:"img_loading"},LPe={key:1,class:"no_result"},RPe=_("div",{class:"fcom_giphy_powered_by"},[_("span",{class:"powered_by"},"POWERED BY "),_("span",null,"GIPHY")],-1);function DPe(e,t,n,o,r,s){const i=$t,l=_h,a=yh,u=ee("GiphyIcon"),c=Ie,d=ut,f=bo,p=Rt("loading");return C(),T("div",IPe,[w(f,{placement:"top-end",width:300,persistent:!1,trigger:"click","popper-class":"fcom_giphy_popover",ref:"popover"},{reference:S(()=>[w(d,{"aria-label":"Pick GIF",text:"",onClick:s.handleGiphyClick},{default:S(()=>[w(c,{class:D(["fcom_apps_icon"])},{default:S(()=>[w(u)]),_:1})]),_:1},8,["onClick"])]),default:S(()=>[Fe((C(),T("div",APe,[w(i,{modelValue:r.searchQuery,"onUpdate:modelValue":t[0]||(t[0]=h=>r.searchQuery=h),placeholder:e.$t("Search Gifs"),onInput:s.handleSearch},null,8,["modelValue","placeholder","onInput"]),_("div",{class:"gif_container",onScroll:t[1]||(t[1]=(...h)=>s.handleScroll&&s.handleScroll(...h))},[r.gifs.length>0?(C(),H(a,{key:0,gutter:5},{default:S(()=>[(C(!0),T(de,null,nt(r.gifs,h=>(C(),H(l,{span:12,key:h.id,class:"gif_item"},{default:S(()=>[_("img",{alt:"",onLoad:m=>h.loaded=!0,src:h.images.preview_gif.url,onClick:m=>s.selectGiphy(h)},null,40,NPe),h.loaded?z("",!0):(C(),T("p",PPe))]),_:2},1024))),128))]),_:1})):(C(),T("p",LPe,O(e.$t("No results")),1))],32),RPe])),[[p,r.loading]])]),_:1},512)])}const VPe=Be(OPe,[["render",DPe]]),FPe={name:"VideoIcon"},BPe={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},zPe=_("rect",{x:"1",y:"1",width:"18",height:"18",rx:"3.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),jPe=_("path",{d:"M8.90484 7.14604L12.663 9.3589C13.1383 9.6384 13.1383 10.3237 12.663 10.6032L8.90484 12.816C8.4208 13.1013 7.80896 12.7534 7.80896 12.1934V7.76865C7.80896 7.20869 8.4208 6.86076 8.90484 7.14604Z",fill:"currentColor"},null,-1),HPe=[zPe,jPe];function UPe(e,t,n,o,r,s){return C(),T("svg",BPe,HPe)}const WPe=Be(FPe,[["render",UPe]]),KPe={name:"VideoEmbeder",emits:["embeded"],components:{MediaEmbeder:jk,VideoIcon:WPe},data(){return{videoUrl:"",showVideoPop:!1,media:{type:"oembed",url:"",inner_html:"",content_type:"video"}}},methods:{show(){this.showVideoPop=!0},embeded(e){this.$emit("embeded",e),this.showVideoPop=!1,this.media={type:"oembed",url:"",inner_html:"",content_type:"video"}}}},qPe={class:"fcom_video_embeder"};function GPe(e,t,n,o,r,s){const i=ee("VideoIcon"),l=Ie,a=ut,u=ee("media-embeder"),c=bh;return C(),T("div",qPe,[w(a,{"aria-label":"Add Video",text:"",onClick:s.show},{default:S(()=>[w(l,{class:D(["fcom_apps_icon"])},{default:S(()=>[w(i)]),_:1})]),_:1},8,["onClick"]),r.showVideoPop?(C(),H(c,{key:0,title:e.$t("Attach video"),modelValue:r.showVideoPop,"onUpdate:modelValue":t[0]||(t[0]=d=>r.showVideoPop=d),width:e.dialogWidth,style:{"max-width":"600px"},"append-to-body":!0},{default:S(()=>[w(u,{box_title:e.$t("Add Featured Video for this post"),has_iframe:!1,onEmbeded:s.embeded,media:r.media},null,8,["box_title","onEmbeded","media"])]),_:1},8,["title","modelValue","width"])):z("",!0)])}const YPe=Be(KPe,[["render",GPe]]),ZPe=window.fluentComAdmin.auth,JPe={name:"FeedTextComposer",components:{MediaPreview:Pv,Giphy:VPe,ImageUploader:Md,SurveyEditForm:kPe,MarkdownEditor:Dk,EmojiPicker:fL,VideoEmbeder:YPe},emits:["editorCreated"],props:{placeholder:{type:String,default(){return"What's happening, "+ZPe.first_name}},disabled:{type:Boolean,default(){return!1}},autofocus:{type:Boolean,default(){return!0}},content:{type:Object,default(){return{message:"",media_images:[]}}},mentionQuery:{type:Object,default(){return{}}},autofocus_changed:{type:Boolean,default(){return!1}},multipleMedia:{type:Boolean,default(){return!1}},surveyApp:{type:Boolean,default(){return!1}},videoApp:{type:Boolean,default(){return!1}},defaultMentions:{type:Array,default(){return[]}},hasEveyoneMention:{type:Boolean,default(){return!1}}},computed:{hasActiveApp(){return!!this.content.survey}},data(){return{mentionResults:[],mentionSearch:"",uploading:!1,isEmojiPickerVisible:!1}},methods:{insertEmoji(e){this.$refs.markdownEditor&&this.$refs.markdownEditor.updateContent(e)},checkHasImageForCommentsEdit(e){return e.media&&e.media.media_url},removeImageFromComments(){this.content.media=null},checkForImage(e){for(let t=0;t<e.clipboardData.items.length;++t){let n=e.clipboardData.items[t];if(n.kind=="file"&&n.type.startsWith("image/")){const o=n.getAsFile(),r=e.clipboardData.getData("text")||"clipboard-image.png";this.uploadImage(new File([o],r,{type:o.type}))}}},uploadImage(e){this.uploading=!0;var t=new FormData;t.append("file",e),t.append("max_width",1e3),t.append("resize",!0),this.$uploadFile("feeds/media-upload",t).then(n=>{this.handleMediaUpload(n.media.url)}).catch(n=>{this.$handleError(n)}).finally(()=>{this.uploading=!1})},handleMediaUpload(e,t="uploader"){var n,o;if(this.content.media_images||(this.content.media_images=[]),(o=(n=this.content)==null?void 0:n.meta)!=null&&o.media_preview&&(this.content.meta.media_preview=null),this.multipleMedia||(this.content.media_images=[]),this.content.media_images.length>=this.appVars.features.max_media_per_post){this.$notify.error(this.$t("You can upload a maximum of %s images per post.",this.appVars.features.max_media_per_post));return}this.content.media_images.push({url:e,provider:t,type:"image",height:0,width:0}),this.content.media=null},initSurveyForm(){this.content.survey||(this.content.survey={type:"single_choice",options:[{slug:"",label:this.$t("First choice")},{slug:"",label:""}]})},selectedGiphy(e){var n,o;this.content.meta||(this.content.meta=[]),(n=this.content)!=null&&n.media_images&&(this.content.media_images=[]),(o=this.content)!=null&&o.media&&(this.content.media=null);const t={image:e.images.downsized_medium.url,height:e.images.downsized_medium.height,width:e.images.downsized_medium.width,type:"image",provider:"giphy"};this.content.meta={media_preview:t}},handleVideoAttachment(e){this.content.media_images=[],this.content.meta=[],this.content.media=e}},mounted(){this.autofocus&&this.$nextTick(()=>{this.$refs.create_status&&this.$refs.create_status.focus()})}},XPe={class:"fcom_text_composer"},QPe={class:"fcom_editor status_text_input"},eLe={key:0,style:{position:"relative","text-align":"center"}},tLe={key:1,class:"fcom_media_items"},nLe={key:0,class:"fcom_media_images"},oLe=["src","alt"],rLe={key:1},sLe={class:"fcom_media_images"},iLe=["src","alt"],lLe={key:2,class:"fcrom_media_images"},aLe=["src","alt"],uLe={key:3,class:"fcrom_media_images"},cLe={class:"fcrom_media_image"},dLe=["src","alt"],fLe={class:"fcom_composer_footer"},pLe={class:"fcom_composer_apps"},hLe=_("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},[_("path",{d:"M7.49996 18.3327H12.5C16.6666 18.3327 18.3333 16.666 18.3333 12.4993V7.49935C18.3333 3.33268 16.6666 1.66602 12.5 1.66602H7.49996C3.33329 1.66602 1.66663 3.33268 1.66663 7.49935V12.4993C1.66663 16.666 3.33329 18.3327 7.49996 18.3327Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),_("path",{d:"M7.50004 8.33333C8.42052 8.33333 9.16671 7.58714 9.16671 6.66667C9.16671 5.74619 8.42052 5 7.50004 5C6.57957 5 5.83337 5.74619 5.83337 6.66667C5.83337 7.58714 6.57957 8.33333 7.50004 8.33333Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),_("path",{d:"M2.22498 15.7918L6.33331 13.0335C6.99164 12.5918 7.94164 12.6418 8.53331 13.1501L8.80831 13.3918C9.45831 13.9501 10.5083 13.9501 11.1583 13.3918L14.625 10.4168C15.275 9.85846 16.325 9.85846 16.975 10.4168L18.3333 11.5835",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1),mLe={key:0},gLe=_("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},[_("path",{d:"M1.66663 18.334H18.3333",stroke:"#525866","stroke-width":"1.5","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"}),_("path",{d:"M8.125 3.33268V18.3327H11.875V3.33268C11.875 2.41602 11.5 1.66602 10.375 1.66602H9.625C8.5 1.66602 8.125 2.41602 8.125 3.33268Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),_("path",{d:"M2.5 8.33268V18.3327H5.83333V8.33268C5.83333 7.41602 5.5 6.66602 4.5 6.66602H3.83333C2.83333 6.66602 2.5 7.41602 2.5 8.33268Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),_("path",{d:"M14.1666 12.5007V18.334H17.5V12.5007C17.5 11.584 17.1666 10.834 16.1666 10.834H15.5C14.5 10.834 14.1666 11.584 14.1666 12.5007Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1),vLe={class:"fcom_composer_actions"};function yLe(e,t,n,o,r,s){var y,v,k,b,$,x,E,M,N;const i=ee("MarkdownEditor"),l=ee("SurveyEditForm"),a=ut,u=ee("media-preview"),c=Ie,d=ee("image-uploader"),f=ee("video-embeder"),p=ee("EmojiPicker"),h=ee("Giphy"),m=Rt("loading");return C(),T(de,null,[_("div",XPe,[_("div",QPe,[he(e.$slots,"before_input"),w(i,{ref:"markdownEditor",hasEveyoneMention:n.hasEveyoneMention,placeholder:n.placeholder,onEditorCreated:t[0]||(t[0]=()=>{e.$emit("editorCreated")}),autofocus:n.autofocus,onHandleMediaUpload:s.uploadImage,defaultMentions:n.defaultMentions,mentionQuery:n.mentionQuery,autofocus_changed:n.autofocus_changed,modelValue:n.content.message,"onUpdate:modelValue":t[1]||(t[1]=P=>n.content.message=P)},null,8,["hasEveyoneMention","placeholder","autofocus","onHandleMediaUpload","defaultMentions","mentionQuery","autofocus_changed","modelValue"]),he(e.$slots,"after_input")]),n.content.survey?(C(),H(l,{key:0,onCancel:t[2]||(t[2]=P=>n.content.survey=null),form:n.content.survey},null,8,["form"])):(C(),T(de,{key:1},[(v=(y=n.content)==null?void 0:y.media)!=null&&v.type?(C(),T("div",eLe,[w(a,{onClick:t[3]||(t[3]=P=>{n.content.media=null}),text:"",type:"danger"},{default:S(()=>[ne(O(e.$t("Remove Media")),1)]),_:1}),w(u,{media_item:n.content.media},null,8,["media_item"])])):(k=n.content)!=null&&k.meta?(C(),T("div",tLe,[($=(b=n.content.meta)==null?void 0:b.media_items)!=null&&$.length?(C(!0),T(de,{key:0},nt(n.content.meta.media_items,(P,I)=>(C(),T("div",{key:I},[P.type=="image"?(C(),T("div",nLe,[_("img",{class:"fcom_media_image",src:P.url,alt:e.$t("Media image")},null,8,oLe),w(a,{class:"fcom_media_images_cross_button",link:"",onClick:V=>n.content.meta.media_items.splice(I,1)},{default:S(()=>[ne(" x ")]),_:2},1032,["onClick"])])):z("",!0)]))),128)):((E=(x=n.content.meta)==null?void 0:x.media_preview)==null?void 0:E.type)=="image"||(N=(M=n.content.meta)==null?void 0:M.media_preview)!=null&&N.image?(C(),T("div",rLe,[_("div",sLe,[_("img",{class:"fcom_media_image",src:n.content.meta.media_preview.image,alt:e.$t("Media Preview image")},null,8,iLe),w(a,{class:"fcom_media_images_cross_button",link:"",onClick:t[4]||(t[4]=P=>n.content.meta.media_preview=null)},{default:S(()=>[ne(" x ")]),_:1})])])):z("",!0)])):n.content.media_images&&n.content.media_images.length?(C(),T("div",lLe,[(C(!0),T(de,null,nt(n.content.media_images,(P,I)=>(C(),T("div",{class:"fcrom_media_image",key:I},[_("img",{src:P.url,alt:e.$t("Media image")},null,8,aLe),w(a,{link:"",onClick:V=>n.content.media_images.splice(I,1)},{default:S(()=>[ne(" x ")]),_:2},1032,["onClick"])]))),128))])):s.checkHasImageForCommentsEdit(n.content)?(C(),T("div",uLe,[_("div",cLe,[_("img",{src:n.content.media.media_url,alt:e.$t("Media image")},null,8,dLe),w(a,{link:"",onClick:t[5]||(t[5]=P=>s.removeImageFromComments())},{default:S(()=>[ne(" x ")]),_:1})])])):z("",!0)],64))]),Fe((C(),T("div",fLe,[_("div",pLe,[s.hasActiveApp?z("",!0):(C(),T(de,{key:0},[e.appVars.features.max_media_per_post?(C(),H(d,{key:0,additionalData:{resize:!0,max_width:1e3},isMultiple:n.multipleMedia,onUploading:t[6]||(t[6]=()=>{r.uploading=!0}),onCompleted:t[7]||(t[7]=()=>{r.uploading=!1}),onUploaded:s.handleMediaUpload},{default:S(()=>[Fe((C(),H(a,{"aria-label":"Upload Media",text:""},{default:S(()=>[w(c,{class:"fcom_status_img_icon"},{default:S(()=>[hLe]),_:1}),r.uploading?(C(),T("span",mLe,O(e.$t("Uploading...")),1)):z("",!0)]),_:1})),[[m,r.uploading]])]),_:1},8,["isMultiple","onUploaded"])):z("",!0),n.videoApp&&e.hasFeature("video_embeder")?(C(),H(f,{key:1,onEmbeded:s.handleVideoAttachment},null,8,["onEmbeded"])):z("",!0),n.surveyApp&&e.hasFeature("has_survey_poll")?(C(),H(a,{key:2,"aria-label":"Create Poll",onClick:s.initSurveyForm,text:""},{default:S(()=>[w(c,{class:"fcom_apps_icon"},{default:S(()=>[gLe]),_:1})]),_:1},8,["onClick"])):z("",!0),e.hasFeature("emoji_app")?(C(),H(p,{key:3,onEmojiSelected:s.insertEmoji},null,8,["onEmojiSelected"])):z("",!0),e.hasFeature("giphy_app")?(C(),H(h,{key:4,onSelectedGiphy:s.selectedGiphy},null,8,["onSelectedGiphy"])):z("",!0)],64))]),_("div",vLe,[he(e.$slots,"default")])])),[[m,r.uploading]])],64)}const wL=Be(JPe,[["render",yLe]]),_Le={name:"CommentReacts",components:{UserRouteLink:Ov},data(){return{centerDialogVisible:!1,reactions:null,loading:!1}},props:{comment:{required:!0,default:null}},methods:{getReactions(){this.reactions||(this.loading=!0,this.$get("comments/"+this.comment.id+"/reactions").then(e=>{this.reactions=e.reactions}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1}))}}},bLe={style:{"margin-left":"5px"}},wLe={key:0},CLe={key:1},kLe={class:"fcom_user_lists"},SLe={key:2};function $Le(e,t,n,o,r,s){const i=Kn,l=ee("UserAvatar"),a=ee("UserRouteLink"),u=Ss,c=bo;return C(),H(c,{persistent:!1,placement:"bottom",title:e.$t("Likes"),width:200,trigger:"click",onShow:s.getReactions},{reference:S(()=>[_("span",bLe,O(n.comment.reactions_count),1)]),default:S(()=>[r.loading?(C(),T("div",wLe,[w(i,{animated:!0,rows:1})])):r.reactions?(C(),T("div",CLe,[w(u,{"max-height":"300px"},{default:S(()=>[_("ul",kLe,[(C(!0),T(de,null,nt(r.reactions,d=>(C(),T("li",null,[d.xprofile?(C(),T(de,{key:0},[w(l,{with_level:!1,xprofile:d.xprofile},null,8,["xprofile"]),w(a,{show_badge:!0,xprofile:d.xprofile},null,8,["xprofile"])],64)):z("",!0)]))),256))])]),_:1})])):(C(),T("div",SLe,[_("p",null,O(e.$t("Failed to load the list")),1)]))]),_:1},8,["title","onShow"])}const ELe=Be(_Le,[["render",$Le]]),xLe={name:"SingleComment",components:{FeedTextComposer:wL,MediaPreview:Pv},props:["comment"],emits:["deleted","updated","copyLink"],data(){return{working:!1,isEdit:!1}},methods:{maybeSave(e){(e.metaKey||e.ctrlKey)&&e.keyCode===13&&this.updateComment()},deleteComment(){this.$confirm(this.$t("Are you sure you want to delete this comment and associated data?"),this.$t("Warning"),{confirmButtonText:this.$t("Delete"),cancelButtonText:this.$t("Cancel"),type:"warning"}).then(()=>{this.working=!0,this.$del("feeds/"+this.comment.post_id+"/comments/"+this.comment.id).then(e=>{this.$emit("deleted"),this.$notify.success(e.message)}).catch(e=>{this.$handleError(e)}).finally(()=>{this.working=!1})})},editComment(){this.working=!0,this.$get(`comments/${this.comment.id}`).then(e=>{Object.assign(this.comment,e.comment),this.isEdit=!0}).catch(e=>{this.$handleError(e)}).finally(()=>{this.working=!1,this.$refs.comment_actions.hide()})},updateComment(){this.comment.message&&(this.working=!0,this.isEdit=!0,this.$post(`feeds/${this.comment.post_id}/comments/${this.comment.id}`,{comment:this.comment.message,media_images:this.comment.media_images,meta:this.comment.meta}).then(e=>{this.$notify.success((e==null?void 0:e.message)||this.$t("Comment updated successfully")),Object.assign(this.comment,e.comment),this.comment.media_images=[]}).catch(e=>{this.$handleError(e)}).finally(()=>{this.isEdit=!1,this.working=!1}))},renderedComment(e){const n=/(?:https?:\/\/)?(?:www\.)?youtube\.com\/watch\?v=([a-zA-Z0-9_-]+)/.exec(e);if(n&&n[1]){let s=n[1];if(s){let i=`<div class="feed_media_ext_video"><iframe src="https://www.youtube.com/embed/${s}" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></div>`;e+=i}}let o=window.location.origin,r=new RegExp(o,"g");return e=e.replace(/<a(.*?)href="(.*?)"(.*?)>/g,(s,i,l,a)=>l.match(r)?`<a${i}href="${l}"${a}>`:`<a${i}href="${l}" target="_blank"${a}>`),e},copyCommentLink(e){this.$emit("copyLink",e),this.$refs.comment_actions.hide()}}},TLe={key:0,class:"person_avatar"},MLe={class:"comment_wrap"},OLe={key:0,class:"comment_text"},ILe={class:"comment_text_head"},ALe={class:"comment_text_head_name"},NLe=["title"],PLe={style:{"margin-left":"auto"},class:"comment_actions"},LLe={class:"actions_items"},RLe=["innerHTML"],DLe={key:0,class:"comment_text_media"};function VLe(e,t,n,o,r,s){const i=ee("UserAvatar"),l=ee("UserRouteLink"),a=ee("MoreFilled"),u=Ie,c=ut,d=bo,f=ee("MediaPreview"),p=ee("feed-text-composer"),h=Rt("loading");return C(),T(de,null,[n.comment.xprofile?(C(),T("div",TLe,[w(i,{with_level:!1,xprofile:n.comment.xprofile,is_rounded:!0},null,8,["xprofile"])])):z("",!0),Fe((C(),T("div",MLe,[r.isEdit?(C(),T("div",{key:1,onKeydown:t[6]||(t[6]=Mt((...m)=>s.maybeSave&&s.maybeSave(...m),["enter"])),class:"comment_text"},[w(p,{multipleMedia:!1,content:n.comment,autofocus:!0,onUpdated:t[5]||(t[5]=m=>r.isEdit=!1)},{default:S(()=>[_("div",null,[w(c,{onClick:t[3]||(t[3]=m=>r.isEdit=!1)},{default:S(()=>[ne(O(e.$t("Cancel")),1)]),_:1}),w(c,{type:"primary",onClick:t[4]||(t[4]=m=>s.updateComment(n.comment))},{default:S(()=>[ne(O(e.$t("Update")),1)]),_:1})])]),_:1},8,["content"])],32)):(C(),T("div",OLe,[_("div",ILe,[_("div",ALe,[w(l,{show_badge:!0,xprofile:n.comment.xprofile},null,8,["xprofile"])]),_("div",{title:n.comment.created_at,class:"comment_text_head_time"},O(e.humanDateDiff(n.comment.created_at)),9,NLe),_("div",PLe,[w(d,{persistent:!1,placement:"bottom",ref:"comment_actions",width:200,trigger:"click"},{reference:S(()=>[w(c,{"aria-label":e.$t("View comment actions"),class:"fcom_dot_menu",size:"small",text:""},{default:S(()=>[w(u,null,{default:S(()=>[w(a)]),_:1})]),_:1},8,["aria-label"])]),default:S(()=>[_("ul",LLe,[_("li",{onClick:t[0]||(t[0]=m=>s.copyCommentLink(n.comment))},O(e.$t("Copy Link")),1),e.canEditComment(n.comment)?(C(),T("li",{key:0,onClick:t[1]||(t[1]=m=>s.editComment())},O(e.$t("Edit")),1)):z("",!0),e.canDeleteComment(n.comment)?(C(),T("li",{key:1,onClick:t[2]||(t[2]=m=>s.deleteComment())},O(e.$t("Delete")),1)):z("",!0)])]),_:1},512)])]),_("div",{class:"comment_text_body feed_md_content",innerHTML:s.renderedComment(n.comment.message_rendered)},null,8,RLe),n.comment.meta.media_preview?(C(),T("div",DLe,[w(f,{media_item:n.comment.meta.media_preview},null,8,["media_item"])])):z("",!0)])),he(e.$slots,"after_comment_text")])),[[h,r.working]])],64)}const FLe=Be(xLe,[["render",VLe]]),BLe={name:"IndividualCommentReply",components:{FeedTextComposer:wL,HeartIcon:bL,SingleComment:FLe,CommentReactions:ELe},props:["comment","comments"],data(){return{commenting:!0,replyingComment:{},newComment:{message:"",media_images:[]},saving:!1}},watch:{comment:{handler(){this.updateReplyingComment()},immediate:!0}},methods:{toggleCommentBox(){this.commenting=!this.commenting},toggleLike(e){this.$emit("toggleLike",e)},postComment(){if(!this.newComment.message){this.$notify({title:this.$t("Error"),message:this.$t("Please write a reply first"),type:"error"});return}this.saving=!0,this.$post("feeds/"+this.comment.post_id+"/comments",{comment:this.newComment.message,parent_id:this.comment.id,media_images:this.newComment.media_images}).then(e=>{this.replyingComment.comments||(this.replyingComment.comments=[]),this.replyingComment.comments.push(e.comment),this.newComment={message:"",media_images:[]}}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})},updateReplyingComment(){this.comment.parent_id&&this.comments?(this.replyingComment=this.comments.find(e=>e.id===parseInt(this.comment.parent_id))||this.comment,this.replyingComment.comments=this.comments.filter(e=>parseInt(e.parent_id)===this.replyingComment.id)):this.replyingComment=this.comment}},mounted(){this.updateReplyingComment()}},zLe={class:"fcom_course_comment each_comment"},jLe={key:0,class:"person_avatar"},HLe=["src","alt"],ULe={class:"comment_wrap"},WLe={class:"comment_text"},KLe={class:"comment_text_head"},qLe={class:"comment_text_head_name"},GLe={class:"comment_text_head_time"},YLe=["innerHTML"],ZLe={class:"reply_box"},JLe={class:"fcom_comments_react"},XLe={class:"child_comments"},QLe=["id"],eRe={class:"reply_box"},tRe=["onClick"],nRe={class:"fcom_comments_react fcom_reaction_list"},oRe={key:0,class:"child_reply_wrap"},rRe={class:"feed_commenting"},sRe={class:"person_avatar"},iRe=["src"],lRe={class:"feed_comment_input comment_text"};function aRe(e,t,n,o,r,s){const i=ee("UserRouteLink"),l=ee("HeartIcon"),a=Ie,u=ee("CommentReactions"),c=ee("single-comment"),d=ut,f=ee("FeedTextComposer"),p=Rt("loading");return C(),T("div",zLe,[r.replyingComment.xprofile?(C(),T("div",jLe,[_("img",{src:r.replyingComment.xprofile.avatar,alt:e.$t("avatar")},null,8,HLe)])):z("",!0),_("div",ULe,[_("div",WLe,[_("div",KLe,[_("div",qLe,[w(i,{xprofile:r.replyingComment.xprofile},null,8,["xprofile"])]),_("div",GLe,O(e.humanDateDiff(r.replyingComment.created_at)),1)]),_("div",{class:"comment_text_body",innerHTML:r.replyingComment.message_rendered},null,8,YLe)]),_("div",ZLe,[_("span",{onClick:t[0]||(t[0]=(...h)=>s.toggleCommentBox&&s.toggleCommentBox(...h)),class:"reply_btn"},O(e.$t("Reply")),1),_("span",{style:{"margin-left":"14px"},class:D([{fcom_is_liked:r.replyingComment.liked},"reply_btn"])},[_("div",JLe,[w(a,{class:D({user_reacted:r.replyingComment.liked}),onClick:t[1]||(t[1]=h=>s.toggleLike(n.comment))},{default:S(()=>[w(l,{filled:r.replyingComment.liked},null,8,["filled"])]),_:1},8,["class"]),parseInt(r.replyingComment.reactions_count)?(C(),H(u,{key:0,comment:n.comment},null,8,["comment"])):z("",!0)])],2)]),_("div",XLe,[(C(!0),T(de,null,nt(r.replyingComment.comments,(h,m)=>(C(),T("div",{id:"comment_"+h.id,class:"each_comment"},[w(c,{onDeleted:y=>e.handleCommentDelete(m),comment:h},{after_comment_text:S(()=>[_("div",eRe,[_("span",{onClick:y=>s.toggleCommentBox(h),class:"reply_btn"},O(e.$t("Reply")),9,tRe),_("span",{style:{"margin-left":"14px"},class:D([{fcom_is_liked:h.liked},"reply_btn"])},[_("div",nRe,[w(a,{class:D({user_reacted:h.liked}),onClick:y=>s.toggleLike(h)},{default:S(()=>[w(l,{filled:h.liked},null,8,["filled"])]),_:2},1032,["class","onClick"]),parseInt(h.reactions_count)?(C(),H(u,{key:0,comment:h},null,8,["comment"])):z("",!0)])],2)])]),_:2},1032,["onDeleted","comment"])],8,QLe))),256))]),r.commenting?(C(),T("div",oRe,[_("div",rRe,[_("div",sRe,[_("img",{alt:"",src:e.auth.avatar},null,8,iRe)]),_("div",lRe,[w(f,{mentionQuery:{space_id:r.replyingComment.space_id},autofocus_changed:r.commenting,autofocus:r.commenting,disabled:r.saving,placeholder:e.$t("Write a reply"),content:r.newComment},{default:S(()=>[Fe((C(),H(d,{disabled:r.saving,class:"fcom_primary_button",onClick:t[2]||(t[2]=h=>s.postComment())},{default:S(()=>[ne(O(e.$t("Reply")),1)]),_:1},8,["disabled"])),[[p,r.saving]])]),_:1},8,["mentionQuery","autofocus_changed","autofocus","disabled","placeholder","content"])])])])):z("",!0)])])}const uRe=Be(BLe,[["render",aRe]]),cRe={name:"CourseComments",props:["course"],components:{IndividualCommentReply:uRe,Pagination:_L,ChatIcon:lPe,HeartIcon:bL},data(){return{comments:[],loading:!0,pagination:{page:1,per_page:10,total:0},working:!1,replyingComemnt:null,isReplying:!1}},methods:{fetchComments(){this.loading=!0,this.$get("admin/courses/"+this.course.id+"/comments",{page:this.pagination.page,per_page:this.pagination.per_page}).then(e=>{this.comments=e.comments.data,this.pagination.total=e.comments.total,window.scrollTo(0,0)}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})},toggleLike(e){const t=!e.liked;this.$post("feeds/"+e.post_id+"/comments/"+e.id+"/reactions",{state:t?1:0}).then(n=>{e.liked=n.liked,e.reactions_count=n.reactions_count}).catch(n=>{this.$handleError(n)})},deleteComment(e,t){this.$confirm(this.$t("Are you sure you want to delete this comment and associated data?"),"Warning",{confirmButtonText:this.$t("Delete"),cancelButtonText:this.$t("Cancel"),type:"warning"}).then(()=>{this.working=!0,this.$del("feeds/"+e.post_id+"/comments/"+e.id).then(n=>{this.comments.splice(t,1),this.$notify.success(n.message)}).catch(n=>{this.$handleError(n)}).finally(()=>{this.working=!1})})},initCommentReply(e){this.replyingComemnt=e,this.$nextTick(()=>{this.isReplying=!0})}},mounted(){this.fetchComments()}},dRe={key:0,class:"white_loaded"},fRe={class:"fcom_course_comments_header"},pRe={key:0},hRe={class:"course_comments feed_comments overview_comments"},mRe={key:0,class:"person_avatar"},gRe={class:"comment_wrap"},vRe={class:"comment_text"},yRe={class:"comment_text_head"},_Re={class:"comment_text_head_name"},bRe={class:"comment_text_head_time"},wRe={class:"comment_actions"},CRe={class:"actions_items"},kRe=["onClick"],SRe={class:"comment_text_details"},$Re=["href"],ERe=["innerHTML"],xRe={class:"comment_text_actions"},TRe={key:0},MRe={key:1};function ORe(e,t,n,o,r,s){const i=Kn,l=ee("UserAvatar"),a=ee("UserRouteLink"),u=ee("MoreFilled"),c=Ie,d=ut,f=bo,p=ee("ChatIcon"),h=ee("HeartIcon"),m=ee("pagination"),y=ee("IndividualCommentReply"),v=na,k=Rt("loading");return r.loading?(C(),T("div",dRe,[w(i,{row:5})])):(C(),T(de,{key:1},[_("div",fRe,[r.pagination.total?(C(),T("h5",pRe,O(e.$t("Comments (%s)",r.pagination.total)),1)):z("",!0)]),_("div",hRe,[(C(!0),T(de,null,nt(r.comments,(b,$)=>(C(),T("div",{key:b.id,class:"fcom_course_comment each_comment"},[b.xprofile?(C(),T("div",mRe,[w(l,{with_level:!1,xprofile:b.xprofile},null,8,["xprofile"])])):z("",!0),_("div",gRe,[_("div",vRe,[_("div",yRe,[_("div",_Re,[w(a,{xprofile:b.xprofile},null,8,["xprofile"])]),_("div",bRe,O(e.humanDateDiff(b.created_at)),1),Fe((C(),T("div",wRe,[e.canDeleteComment(b)?(C(),H(f,{key:0,persistent:!1,placement:"bottom",width:200,trigger:"click"},{reference:S(()=>[w(d,{"aria-label":e.$t("View actions"),class:"fcom_dot_menu",text:""},{default:S(()=>[w(c,null,{default:S(()=>[w(u)]),_:1})]),_:1},8,["aria-label"])]),default:S(()=>[_("ul",CRe,[_("li",{onClick:x=>s.deleteComment(b,$)},"Delete",8,kRe)])]),_:2},1024)):z("",!0)])),[[k,r.working]])]),_("div",SRe,[_("a",{href:e.$getRouteLink("course/:course_slug/lessons/:lesson_slug/view?comment_id=:comment_id&show_comments=true",{course_slug:n.course.slug,lesson_slug:b.post.slug,comment_id:b.id})},[ne(O(e.$t("Commented in"))+" ",1),_("b",null,O(e.getExcerpt(b.post.title,60)),1)],8,$Re)]),_("div",{class:"comment_text_body",innerHTML:b.message_rendered},null,8,ERe),_("div",xRe,[w(d,{onClick:x=>s.initCommentReply(b),text:""},{default:S(()=>[w(c,null,{default:S(()=>[w(p)]),_:1}),_("span",null,O(e.$t("Reply")),1)]),_:2},1032,["onClick"]),w(d,{text:""},{default:S(()=>[w(c,{class:D({user_reacted:b.liked}),onClick:x=>s.toggleLike(b)},{default:S(()=>[w(h,{filled:b.liked},null,8,["filled"])]),_:2},1032,["class","onClick"]),_("span",null,O(b.reactions_count||""),1)]),_:2},1024)])])])]))),128)),r.pagination.total?z("",!0):(C(),T("div",TRe,[_("h5",null,O(e.$t("No comments from any lessons yet! Comments from all lessons will be shown here.")),1)]))]),w(m,{pagination:r.pagination,onFetch:s.fetchComments},null,8,["pagination","onFetch"]),w(v,{"append-to-body":!0,modelValue:r.isReplying,"onUpdate:modelValue":t[0]||(t[0]=b=>r.isReplying=b),size:e.dialogWidth},{header:S(()=>{var b;return[_("p",null,[ne(O(e.$t("Replying to"))+" ",1),_("b",null,O((b=r.replyingComemnt)==null?void 0:b.post.title),1)])]}),default:S(()=>[r.replyingComemnt?(C(),H(y,{key:0,comment:r.replyingComemnt,comments:r.comments,onToggleLike:s.toggleLike},null,8,["comment","comments","onToggleLike"])):(C(),T("h3",MRe,O(e.$t("Replying to Let's check this out! Let's do it Replying to Let's check this out! Let's do it")),1))]),_:1},8,["modelValue","size"])],64))}const IRe=Be(cRe,[["render",ORe]]),ARe={name:"CourseOverview",props:["course","course_id"],components:{CourseComments:IRe}},NRe={class:"fcom_cards fcom_cards_2"},PRe={class:"fcom_card"},LRe={class:"fcom_card_body"},RRe={class:"fcom_card"},DRe={class:"fcom_card_body"};function VRe(e,t,n,o,r,s){const i=ee("course-comments");return C(),T(de,null,[_("div",NRe,[_("div",PRe,[_("div",LRe,[_("p",null,O(e.$t("Students")),1),_("h3",null,O(n.course.students_count),1)])]),_("div",RRe,[_("div",DRe,[_("p",null,O(e.$t("Average completion rate")),1),_("h3",null,O(n.course.overAllProgress)+"%",1)])])]),w(i,{course:n.course},null,8,["course"])],64)}const FRe=Be(ARe,[["render",VRe]]),BRe={name:"SpaceIcon",props:["space_profile"]},zRe=["alt","src"],jRe={key:1,class:"fcom_emoji"},HRe={key:2,class:"fcom_shape"},URe={key:3,class:"fcom_no_avatar"};function WRe(e,t,n,o,r,s){var l,a,u,c;const i=Ie;return n.space_profile.logo?(C(),T("img",{key:0,alt:e.$t("Space Logo"),src:n.space_profile.logo},null,8,zRe)):(l=n.space_profile.settings)!=null&&l.emoji?(C(),T("span",jRe,O((a=n.space_profile.settings)==null?void 0:a.emoji),1)):(u=n.space_profile.settings)!=null&&u.shape_svg?(C(),T("span",HRe,[w(i,{innerHTML:(c=n.space_profile.settings)==null?void 0:c.shape_svg},null,8,["innerHTML"])])):(C(),T("span",URe))}const CL=Be(BRe,[["render",WRe]]),KRe={name:"TopicsConfig",emits:["saved"],data(){return{config:this.appVars.topicsConfig,loading:!1}},methods:{update(){this.loading=!0,this.$post("admin/topics/config",{config:this.config}).then(e=>{this.$notify.success(e.message),this.appVars.topicsConfig=e.config,this.$emit("saved")}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})}}};function qRe(e,t,n,o,r,s){const i=vO,l=Mn,a=En,u=ut,c=Tn,d=Rt("loading");return C(),H(c,{onSubmit:t[4]||(t[4]=Ze(f=>e.doNothing(),["prevent"])),"label-position":"top",modelValue:r.config,"onUpdate:modelValue":t[5]||(t[5]=f=>r.config=f)},{default:S(()=>[w(l,{label:e.$t("Maximum Number of Topics a user can select when creating a post")},{default:S(()=>[w(i,{modelValue:r.config.max_topics_per_post,"onUpdate:modelValue":t[0]||(t[0]=f=>r.config.max_topics_per_post=f),min:1,max:20,step:1},null,8,["modelValue"])]),_:1},8,["label"]),w(l,{label:e.$t("Maximum Number of Topics a space may have")},{default:S(()=>[w(i,{modelValue:r.config.max_topics_per_space,"onUpdate:modelValue":t[1]||(t[1]=f=>r.config.max_topics_per_space=f),min:1,max:40,step:1},null,8,["modelValue"])]),_:1},8,["label"]),w(l,{label:e.$t("Show/Hide Topics On post Card")},{default:S(()=>[w(a,{"true-value":"yes","false-value":"no",modelValue:r.config.show_on_post_card,"onUpdate:modelValue":t[2]||(t[2]=f=>r.config.show_on_post_card=f)},{default:S(()=>[ne(O(e.$t("Show Topics on Post Card")),1)]),_:1},8,["modelValue"])]),_:1},8,["label"]),w(l,null,{default:S(()=>[Fe((C(),H(u,{class:"fcom_primary_button",onClick:t[3]||(t[3]=f=>s.update())},{default:S(()=>[ne(O(e.$t("Update")),1)]),_:1})),[[d,r.loading]])]),_:1})]),_:1},8,["modelValue"])}const GRe=Be(KRe,[["render",qRe]]),YRe={name:"TopicCreateForm",components:{SpaceIcon:CL,SlugInput:zh},emits:["saved"],props:{space_id:{type:Number,required:!1},all_spaces:{type:Array,required:!1,default:()=>[]},topic:{type:Object,required:!1,default:{title:"",description:"",slug:"",space_ids:[],admin_only:"no"}}},data(){return{saving:!1,editing_topic:this.topic,formattedSpaceGroups:[]}},methods:{createOrupdateTopic(){this.saving=!0,this.space_id&&(this.editing_topic.space_ids=[this.space_id],this.editing_topic.inline="yes"),this.$post("admin/topics",this.editing_topic).then(e=>{this.$notify.success(e.message),this.$emit("saved",e.topic)}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})},formatSpaceGroups(){if(this.space_id||this.all_spaces.length==0)return;let e=this.all_spaces,t=this.appVars.space_groups,n=[],o=[];this.each(t,r=>{let s=e.filter(i=>{let l=i.parent_id==r.id;return l&&o.push(i.slug),l});s.length&&n.push({label:r.title,spaces:s})}),this.formattedSpaceGroups=n}},mounted(){this.formatSpaceGroups()}},ZRe={class:"fcom_help_text"},JRe={key:0,class:"fcom_space_title"},XRe={key:0},QRe={key:1},eDe={class:"fcom_help_text"};function tDe(e,t,n,o,r,s){const i=$t,l=Mn,a=ee("slug-input"),u=ee("SpaceIcon"),c=$s,d=Mae,f=vr,p=En,h=ut,m=Tn,y=Rt("loading");return C(),H(m,{onSubmit:t[5]||(t[5]=Ze(v=>e.doNothing(),["prevent"])),modelValue:r.editing_topic,"onUpdate:modelValue":t[6]||(t[6]=v=>r.editing_topic=v),"label-position":"top"},{default:S(()=>[w(l,{label:e.$t("Topic Title")},{default:S(()=>[w(i,{placeholder:e.$t("Title of your topic"),modelValue:r.editing_topic.title,"onUpdate:modelValue":t[0]||(t[0]=v=>r.editing_topic.title=v),type:"text"},null,8,["placeholder","modelValue"])]),_:1},8,["label"]),w(l,{label:e.$t("Topic Slug")},{default:S(()=>[w(a,{disabled:!!r.editing_topic.id,modelValue:r.editing_topic.slug,"onUpdate:modelValue":t[1]||(t[1]=v=>r.editing_topic.slug=v),placeholder:e.$t("Slug of your topic")},null,8,["disabled","modelValue","placeholder"])]),_:1},8,["label"]),w(l,{label:e.$t("Topic sub-title")},{default:S(()=>[w(i,{placeholder:e.$t("Sub-title of your topic"),modelValue:r.editing_topic.description,"onUpdate:modelValue":t[2]||(t[2]=v=>r.editing_topic.description=v),type:"text"},null,8,["placeholder","modelValue"]),_("div",ZRe,[_("p",null,O(e.$t("This will be displayed under the title in the topic when selecting in post creation form")),1)])]),_:1},8,["label"]),n.space_id?z("",!0):(C(),H(l,{key:0,label:e.$t("Space visibility")},{default:S(()=>[w(f,{modelValue:r.editing_topic.space_ids,"onUpdate:modelValue":t[3]||(t[3]=v=>r.editing_topic.space_ids=v),multiple:"",placeholder:e.$t("Select Spaces"),style:{width:"100%"}},{default:S(()=>[(C(!0),T(de,null,nt(r.formattedSpaceGroups,v=>(C(),H(d,{key:v.label,label:v.label},{default:S(()=>[(C(!0),T(de,null,nt(v.spaces,k=>(C(),H(c,{key:k.slug,label:k.title,value:k.id.toString()},{default:S(()=>[k.id?(C(),T("span",JRe,[w(u,{space_profile:k},null,8,["space_profile"]),_("span",null,[ne(O(e.getExcerpt(k.title,50))+" ",1),k.type=="course"?(C(),T("span",XRe," ("+O(e.$t("course"))+")",1)):z("",!0)])])):(C(),T("span",QRe,O(e.getExcerpt(k.title,50)),1))]),_:2},1032,["label","value"]))),128))]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue","placeholder"]),_("div",eDe,[_("p",null,O(e.$t("Select spaces where this topic will be visible.")),1)])]),_:1},8,["label"])),w(l,null,{default:S(()=>[w(p,{modelValue:r.editing_topic.admin_only,"onUpdate:modelValue":t[4]||(t[4]=v=>r.editing_topic.admin_only=v),"true-value":"yes","false-value":"no"},{default:S(()=>[ne(O(e.$t("Only admins and moderators can select this topic")),1)]),_:1},8,["modelValue"])]),_:1}),w(l,null,{default:S(()=>[Fe((C(),H(h,{class:"fcom_primary_button",onClick:s.createOrupdateTopic,disabled:r.saving},{default:S(()=>[ne(O(e.$t("Save")),1)]),_:1},8,["onClick","disabled"])),[[y,r.saving]])]),_:1})]),_:1},8,["modelValue"])}const nDe=Be(YRe,[["render",tDe]]),oDe={name:"AllTopics",components:{TopicCreateForm:nDe,SlugInput:zh,SpaceIcon:CL,Layout:Es,AppLayout:xs,TopicsConfig:GRe},data(){return{topics:[],saving:!1,loading:!1,search:"",showModal:!1,editing_topic:{title:"",description:"",slug:"",space_ids:[],admin_only:"no"},all_spaces:[],showConfig:!1}},methods:{showForm(e){this.editing_topic=e||{title:"",slug:"",space_ids:[],admin_only:"no"},this.showModal=!0},fetch(){this.loading=!0,this.$get("admin/topics",{search:this.search}).then(e=>{this.topics=e.topics,this.all_spaces=e.all_spaces}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})},removeTopic(e){this.$confirm(this.$t("Are you sure you want to remove this topic?"),this.$t("Warning"),{confirmButtonText:this.$t("Yes, Remove"),cancelButtonText:this.$t("Cancel"),type:"warning"}).then(()=>{this.saving=!0,this.$del("admin/topics/"+e.id).then(t=>{this.$notify.success(t.message),this.fetch()}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1})})},formatTopics(e){let t=this.all_spaces,n=[];return e.forEach(o=>{let r=t.find(s=>s.id==o);r&&n.push(r.title)}),n.join(", ")}},mounted(){this.has_pro&&this.fetch(),this.changeTitle(this.$t("Topics Settings"))}},rDe=["href"],sDe={class:""},iDe={class:"fhr_content_layout_body"},lDe={key:0},aDe={style:{"margin-bottom":"10px"},class:"fcom_manager_actions"},uDe={class:"bulk_search"},cDe=_("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},[_("path",{d:"M14.5833 14.584L18.3333 18.334",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),_("path",{d:"M16.6667 9.16699C16.6667 5.02486 13.3088 1.66699 9.16666 1.66699C5.02453 1.66699 1.66666 5.02486 1.66666 9.16699C1.66666 13.3091 5.02453 16.667 9.16666 16.667C13.3088 16.667 16.6667 13.3091 16.6667 9.16699Z",stroke:"currentColor","stroke-width":"1.5","stroke-linejoin":"round"})],-1),dDe={style:{margin:"0",padding:"0"}},fDe={class:"fcom_meta_text"},pDe={class:"fcom_table_action_col"},hDe={key:1,class:"setting_body",style:{"text-align":"center"}},mDe=_("p",null,"Create Post Topic and assign to your spaces. Then users can choose one or multiple topic for each post. This feature is available on the premium version of FluentCommunity. Please upgrade to pro",-1),gDe=["href"],vDe={class:"dialog_header"},yDe={class:"dialog_left"},_De=_("div",{class:"header_icon"},[_("svg",{viewBox:"0 0 24 24",width:"20",height:"20",color:"currentColor",fill:"none"},[_("path",{d:"M2.73552 11.6867C1.78253 12.7511 1.76203 14.3569 2.63665 15.4865C4.37226 17.7281 6.2719 19.6277 8.51351 21.3633C9.64313 22.238 11.2489 22.2175 12.3133 21.2645C15.203 18.6771 17.8494 15.9731 20.4033 13.0016C20.6558 12.7078 20.8137 12.3477 20.8492 11.9619C21.0059 10.2561 21.3279 5.34144 19.9932 4.00675C18.6586 2.67207 13.7439 2.99408 12.0381 3.15083C11.6523 3.18627 11.2922 3.34421 10.9984 3.59671C8.02692 6.15064 5.32291 8.797 2.73552 11.6867Z",stroke:"currentColor","stroke-width":"1.5"}),_("path",{opacity:"0.4",d:"M7.5 14.5L9.5 16.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),_("path",{d:"M18 6L22 2",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})])],-1),bDe={key:0,class:"dialog_body"};function wDe(e,t,n,o,r,s){const i=ee("Plus"),l=Ie,a=ut,u=ee("Operation"),c=$t,d=tv,f=ee("DeleteFilled"),p=ev,h=ee("layout"),m=ee("app-layout"),y=ee("TopicCreateForm"),v=bh,k=ee("TopicsConfig"),b=Rt("loading");return C(),T(de,null,[w(m,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:S(()=>[w(h,{wrapper_class:"no_bg_layout fcom_setting_route",title:e.$t("Topics")},{actions:S(()=>[e.has_pro?(C(),T(de,{key:0},[w(a,{class:"fcom_primary_button",onClick:t[0]||(t[0]=$=>s.showForm(null))},{default:S(()=>[w(l,null,{default:S(()=>[w(i)]),_:1}),_("span",null,O(e.$t("New Topic")),1)]),_:1}),w(a,{onClick:t[1]||(t[1]=$=>r.showConfig=!0),class:"fcom_secondary_button"},{default:S(()=>[w(l,null,{default:S(()=>[w(u)]),_:1}),_("span",null,O(e.$t("Settings")),1)]),_:1})],64)):(C(),T("a",{key:1,target:"_blank",rel:"noopener",href:e.appVars.upgrade_url,class:"el-button el-button--danger"},O(e.$t("Upgrade to Pro")),9,rDe))]),default:S(()=>[_("div",sDe,[_("div",iDe,[e.has_pro?(C(),T("div",lDe,[_("p",null,O(e.$t("Categorize your content and allow members to filter posts with the topic navigation bar in spaces.")),1),_("div",aDe,[_("div",uDe,[w(c,{modelValue:r.search,"onUpdate:modelValue":t[2]||(t[2]=$=>r.search=$),onKeydown:Mt(s.fetch,["enter"]),placeholder:e.$t("Search"),class:"el-input-round"},{prefix:S(()=>[cDe]),_:1},8,["modelValue","onKeydown","placeholder"])])]),Fe((C(),H(p,{data:r.topics,style:{"border-radius":"8px"}},{default:S(()=>[w(d,{label:e.$t("Title"),"min-width":"160"},{default:S($=>[_("p",dDe,O($.row.title),1),_("span",fDe,O($.row.description),1)]),_:1},8,["label"]),w(d,{label:e.$t("Spaces"),"min-width":"140"},{default:S($=>[_("span",null,O(s.formatTopics($.row.space_ids)),1)]),_:1},8,["label"]),w(d,{label:e.$t("Admin Only?"),width:"120"},{default:S($=>[_("span",null,O($.row.admin_only=="yes"?e.$t("Yes"):e.$t("No")),1)]),_:1},8,["label"]),w(d,{label:e.$t("Actions"),width:"120"},{default:S($=>[_("div",pDe,[w(a,{onClick:x=>s.showForm($.row),size:"small"},{default:S(()=>[ne(O(e.$t("Edit")),1)]),_:2},1032,["onClick"]),w(a,{onClick:x=>s.removeTopic($.row),type:"danger",plain:"",size:"small"},{default:S(()=>[w(l,null,{default:S(()=>[w(f)]),_:1})]),_:2},1032,["onClick"])])]),_:1},8,["label"])]),_:1},8,["data"])),[[b,r.loading]])])):(C(),T("div",hDe,[mDe,_("a",{target:"_blank",rel:"noopener",href:e.appVars.upgrade_url,class:"el-button el-button--danger"},O(e.$t("Upgrade to Pro")),9,gDe)]))])])]),_:1},8,["title"])]),_:1}),w(v,{"modal-class":"fcom_common_dialog",id:"fluent_comminity_body","close-on-click-modal":!1,"append-to-body":!0,width:e.dialogWidth,modelValue:r.showModal,"onUpdate:modelValue":t[4]||(t[4]=$=>r.showModal=$),direction:"rtl"},{header:S(({close:$})=>[_("div",vDe,[_("div",yDe,[_De,_("div",null,[_("h4",null,O(r.editing_topic.id?e.$t("Update Topic"):e.$t("Add Topic")),1)])])])]),default:S(()=>[r.showModal?(C(),T("div",bDe,[r.showModal?(C(),H(y,{key:0,all_spaces:r.all_spaces,topic:r.editing_topic,onSaved:t[3]||(t[3]=$=>{r.showModal=!1,s.fetch()})},null,8,["all_spaces","topic"])):z("",!0)])):z("",!0)]),_:1},8,["width","modelValue"]),w(v,{"close-on-click-modal":!1,"append-to-body":!0,width:e.dialogWidth,title:e.$t("Topics Settings"),modelValue:r.showConfig,"onUpdate:modelValue":t[6]||(t[6]=$=>r.showConfig=$),direction:"rtl"},{default:S(()=>[r.showConfig?(C(),H(k,{key:0,onSaved:t[5]||(t[5]=$=>{r.showConfig=!1})})):z("",!0)]),_:1},8,["width","title","modelValue"])],64)}const CDe=Be(oDe,[["render",wDe]]),kDe=[{path:"/settings",component:$fe,meta:{active_menu:"settings"},children:[{name:"settings",path:"",component:Dke,meta:{active_menu:"settings"}},{name:"customization",path:"customization",component:C9e,meta:{active_menu:"settings"}},{name:"admin_moderators",path:"moderators",component:bSe,meta:{active_menu:"settings"}},{name:"email_notifications",path:"email-notifications",component:JSe,meta:{active_menu:"settings"}},{name:"features",path:"features",component:Lxe,meta:{active_menu:"settings"}},{name:"menu_settings",path:"menu-settings",component:STe,meta:{active_menu:"settings"}},{path:"space_groups",name:"space_groups",component:VMe,meta:{active_menu:"settings"}},{path:"topics-settings",name:"all_topics",component:CDe,meta:{active_menu:"settings"}},{path:"privacy-settings",name:"privacy_settings",component:D9e,meta:{active_menu:"settings"}}]},{path:"/manage-courses",component:kOe,name:"manage_courses",meta:{active_menu:"manage_courses"}},{path:"/manage-courses/edit/:course_id",component:vAe,props:!0,meta:{active_menu:"manage_courses"},children:[{name:"edit_lessons",path:"lessons",component:PNe,props:!0,meta:{active_menu:"manage_courses"}},{name:"course_students",path:"students",component:ePe,props:!0,meta:{active_menu:"manage_courses"}},{name:"course_overview",path:"overview",component:FRe,props:!0,meta:{active_menu:"manage_courses"}}]}],SDe={name:"VerifiedSign"},$De={class:"fcom_verified"},EDe=_("svg",{viewBox:"0 0 22 22","aria-label":"Verified account",role:"img","data-testid":"icon-verified"},[_("g",null,[_("path",{d:"M20.396 11c-.018-.646-.215-1.275-.57-1.816-.354-.54-.852-.972-1.438-1.246.223-.607.27-1.264.14-1.897-.131-.634-.437-1.218-.882-1.687-.47-.445-1.053-.75-1.687-.882-.633-.13-1.29-.083-1.897.14-.273-.587-.704-1.086-1.245-1.44S11.647 1.62 11 1.604c-.646.017-1.273.213-1.813.568s-.969.854-1.24 1.44c-.608-.223-1.267-.272-1.902-.14-.635.13-1.22.436-1.69.882-.445.47-.749 1.055-.878 1.688-.13.633-.08 1.29.144 1.896-.587.274-1.087.705-1.443 1.245-.356.54-.555 1.17-.574 1.817.02.647.218 1.276.574 1.817.356.54.856.972 1.443 1.245-.224.606-.274 1.263-.144 1.896.13.634.433 1.218.877 1.688.47.443 1.054.747 1.687.878.633.132 1.29.084 1.897-.136.274.586.705 1.084 1.246 1.439.54.354 1.17.551 1.816.569.647-.016 1.276-.213 1.817-.567s.972-.854 1.245-1.44c.604.239 1.266.296 1.903.164.636-.132 1.22-.447 1.68-.907.46-.46.776-1.044.908-1.681s.075-1.299-.165-1.903c.586-.274 1.084-.705 1.439-1.246.354-.54.551-1.17.569-1.816zM9.662 14.85l-3.429-3.428 1.293-1.302 2.072 2.072 4.4-4.794 1.347 1.246z"})])],-1),xDe=[EDe];function TDe(e,t,n,o,r,s){return C(),T("span",$De,xDe)}const MDe=Be(SDe,[["render",TDe]]),ODe={name:"UserBadge",props:["badge","is_preview","profile"],computed:{renderingBadge(){var e;if(!this.appVars.user_badges&&!this.is_preview)return null;if(this.profile){let t=this.profile.badge_slug;return t||(t=(e=this.profile.meta)==null?void 0:e.badge_slug),t?this.appVars.user_badges[t]:null}return this.badge}}},IDe=["title"],ADe=["src"],NDe={key:1,class:"fcom_emoji"},PDe={key:2,class:"fcom_shape"},LDe={key:1};function RDe(e,t,n,o,r,s){const i=Ie;return s.renderingBadge?(C(),T("div",{key:0,class:D([{user_icon_only:s.renderingBadge.show_label!="yes"},"user_badge"])},[_("div",{style:Ye({backgroundColor:s.renderingBadge.background_color,color:s.renderingBadge.color,borderColor:s.renderingBadge.color}),title:s.renderingBadge.title,class:"user_badge_inner"},[s.renderingBadge.config?(C(),T(de,{key:0},[s.renderingBadge.config.logo?(C(),T("img",{key:0,alt:"",src:s.renderingBadge.config.logo},null,8,ADe)):s.renderingBadge.config.emoji?(C(),T("span",NDe,O(s.renderingBadge.config.emoji),1)):s.renderingBadge.config.shape_svg?(C(),T("span",PDe,[w(i,{innerHTML:s.renderingBadge.config.shape_svg},null,8,["innerHTML"])])):z("",!0)],64)):z("",!0),s.renderingBadge.show_label=="yes"?(C(),T("span",LDe,O(s.renderingBadge.title),1)):z("",!0)],12,IDe)],2)):z("",!0)}const DDe=Be(ODe,[["render",RDe]]),VDe={name:"WelcomeBanner",components:{MediaPreview:Pv},data(){return{config:this.appVars.welcome_banner}},computed:{showMedia(){return this.config&&this.config.mediaType=="video"&&this.config.bannerVideo},showCtaButtons(){var e;return this.config&&((e=this.config.ctaButtons)==null?void 0:e.length)&&this.config.ctaButtons.some(t=>t.link&&t.label)},isRemovable(){return this.config&&this.config.allowClose=="yes"},showBanner(){if(!this.isRemovable)return!0;let e=this.Storage.get(this.getCloseKey,!1);return e?new Date().getTime()>e:!0},getCloseKey(){return this.appVars.user_id?"fcom_welcome_banner_closed_auth":"fcom_welcome_banner_closed_guest"}},methods:{closeBanner(){this.config=null;let e=new Date().getTime()+7*24*60*60*1e3;this.Storage.set(this.getCloseKey,e)}}},FDe={key:0,class:"fcom_welcome_box"},BDe={key:2,class:"fcom_welcome_title"},zDe=["innerHTML"],jDe={key:4,class:"fcom_welcome_cta_buttons"},HDe=["href","target"];function UDe(e,t,n,o,r,s){const i=ee("media-preview"),l=xd,a=ee("MoreFilled"),u=Ie,c=ut,d=Ch,f=kh,p=wh;return r.config&&s.showBanner?(C(),T("div",FDe,[s.showMedia?(C(),H(i,{key:0,media_item:r.config.bannerVideo},null,8,["media_item"])):r.config.bannerImage?(C(),H(l,{key:1,class:"feed_media",alt:e.$t("Image Preview"),src:r.config.bannerImage},null,8,["alt","src"])):z("",!0),r.config.title?(C(),T("h2",BDe,O(r.config.title),1)):z("",!0),r.config.description_rendered?(C(),T("div",{key:3,class:"fcom_welcome_sub",innerHTML:r.config.description_rendered},null,8,zDe)):z("",!0),s.showCtaButtons?(C(),T("div",jDe,[(C(!0),T(de,null,nt(r.config.ctaButtons,h=>(C(),T(de,null,[h.link&&h.label?(C(),T("a",{key:0,href:h.link,target:h.newTab=="yes"?"_blank":"",class:D({"el-button fcom_primary_button":h.type=="primary","el-button fcom_secondary_button":h.type=="secondary","el-button is-text":h.type=="text","el-link fcom_link_button":h.type=="link"})},O(h.label),11,HDe)):z("",!0)],64))),256))])):z("",!0),s.isRemovable?(C(),H(p,{key:5,trigger:"click",class:"fcom_welcome_close"},{dropdown:S(()=>[w(f,null,{default:S(()=>[w(d,{onClick:s.closeBanner},{default:S(()=>[ne(O(e.$t("Hide Banner")),1)]),_:1},8,["onClick"])]),_:1})]),default:S(()=>[w(c,{"aria-label":e.$t("Hide Banner"),class:"fcom_dot_menu",size:"small",text:""},{default:S(()=>[w(u,null,{default:S(()=>[w(a)]),_:1})]),_:1},8,["aria-label"])]),_:1})):z("",!0)])):z("",!0)}const WDe=Be(VDe,[["render",UDe]]);Zd(()=>Promise.resolve().then(()=>vBe),void 0);const KDe=[UY,aZ,pZ,UZ,sJ,SZ,MZ,uJ,RY,BY,aT,iT,RZ,AY,IZ,D0,sT,xZ,mw,Ws,lJ,cu,Eu,KY,tb,dJ,mZ,wZ,YZ,OY,QY,BZ,hw,yZ,PY,nZ,VZ,rT,lT,V0];function up(e){const t=[];if(typeof e=="object"&&e.join===void 0)for(const n in e)t.push(up(e[n]));else if(typeof e=="object"&&e.join!==void 0)for(const n in e)t.push(up(e[n]));else typeof e=="function"||typeof e=="string"&&t.push(e);return t.join("<br />")}const Gn=x3(Cfe);Gn.use(Ade);Gn.config.globalProperties.appVars=window.fluentComAdmin;Gn.config.globalProperties.auth=window.fluentComAdmin.auth;Gn.config.globalProperties.has_pro=!!window.fluentComAdmin.pro;let F2="40%",B2="60%";window.innerWidth<600?(B2="95%",F2="90%"):window.innerWidth<800&&(B2="80%",F2="80%");KDe.forEach(e=>{Gn.component(e.name,e)});Gn.component("VerifiedSign",MDe);Gn.component("UserAvatar",oL);Gn.component("UserRouteLink",Ov);Gn.component("WelcomeBanner",WDe);Gn.component("UserBadge",DDe);function l$(){Gn.use(window.FluentCommunityUtil.eventBus);const e=window.FluentCommunityUtil.Rest;Gn.mixin({data(){return{Storage:window.FluentCommunityUtil.Storage,is_rtl:!1,drawerWidth:F2,dialogWidth:B2,feedMonitorCache:{},mounted:!1,isMobile:window.innerWidth<=768,has_leaderboard:this.appVars.features.leaderboard}},methods:{$get:e.get,$post:e.post,$uploadFile:e.uploadFile,$put:e.put,$del:e.delete,$patch:e.patch,changeTitle(r){document.title=r+" - "+this.appVars.site_title},$handleError(r){let s="";typeof r=="string"?s=r:r&&r.message?s=r.message:s=up(r),s||(s="Something is wrong!"),typeof s!="string"&&(s=up(s)),this.$notify({type:"error",title:"Error",message:s,dangerouslyUseHTMLString:!0})},convertToText:up,$t(r){r=window.fluentComAdmin.i18n[r]||r;const s=Array.prototype.slice.call(arguments,1);if(s.length===0)return r;const i=/%(\d*)s|%d/g;let l=0;return r=r.replace(i,(a,u)=>{if(u){const c=parseInt(u,10)-1;return c<s.length?s[c]:a}else return l<s.length?s[l++]:a}),r},$_n(r,s,i){return i>1?this.$t(s,i):this.$t(r,i)},$labelize(r){return r?(r=r.charAt(0).toUpperCase()+r.slice(1),window.fluentComAdmin.i18n[r]?window.fluentComAdmin.i18n[r]:r.replace(/_/g," ").replace(/\b\w/g,s=>s.toUpperCase())):""},dayjs,relativeTimeFromUtc(r){return dayjs.utc(r).local().fromNow()},$storeLocalData(r,s){this.Storage.set(r,s)},$getLocalData(r,s=""){return this.Storage.get(r,s)},ucFirst(r){return r?r.charAt(0).toUpperCase()+r.slice(1):""},ucWords(r){return r?r.replace(/\b[a-z]/g,function(s){return s.toUpperCase()}):""},smartDate(r,s=!1,i=!1){if(!r)return"";let l="D MMM, YYYY";dayjs(r).isSame(new Date,"year")?(l="D MMM",s&&(Math.abs(dayjs(r).diff(new Date,"days"))<=5||i)&&(dayjs(r).minute()==0?l="D MMM, ha":l="D MMM, hh:mma")):s&&i&&(l="D MMM, YYYY, hh:mma");const a=dayjs(r);return a.isValid()?a.format(l):null},hasPermission(r){return this.appVars.permissions[r]},isAdmin(){return!!this.appVars.permissions.community_admin},hasCourseAdminAccess(){return!!this.appVars.permissions.course_admin},hasCourseCreatorAccess(){return!!this.appVars.permissions.course_creator},canDeleteFeed(r){return this.auth.user_id&&(r.user_id==this.auth.user_id||this.hasPermission("delete_any_feed"))},canEditFeed(r){return this.auth.user_id&&(r.user_id==this.auth.user_id||this.hasPermission("edit_any_feed"))},canDeleteComment(r){return this.auth&&(r.user_id==this.auth.user_id||this.hasPermission("delete_any_comment"))},canEditComment(r){return this.auth.user_id&&(r.user_id==this.auth.user_id||this.hasPermission("edit_any_comment"))},hasSpaceAccess(r){return r?this.appVars.user_membership_slugs.indexOf(r)!==-1:!0},hasInPermission(r,s){return!s||typeof s!="object"?!1:s[r]},hasCurrentSpacePermission(r){return window.fcom_current_community?this.hasInPermission(r,window.fcom_current_community.permissions):!1},hasPermissionOrInCurrentSpace(r){return this.hasPermission(r)?!0:this.hasCurrentSpacePermission(r)},humanDateDiff(r){if(!r)return"";const s=dayjs.utc(r,"YYYY-MM-DD HH:mm:ss");if(!s.isValid())return"";const i=s.add(this.appVars.date_offset,"s");return dayjs(i.format("YYYY-MM-DD HH:mm:ss")).from(dayjs(dayjs.utc().format("YYYY-MM-DD HH:mm:ss")))},hasCommentPermission(r){var s;return this.auth.user_id?!r.space_id&&!r.course_id?this.auth.user_id&&(r.user_id==this.auth.user_id||r.privacy=="public"):this.hasSpaceAccess((s=r.space)==null?void 0:s.slug):!1},getExcerpt(r,s=250){if(!r)return"";let i=r.replace(/(<([^>]+)>)/ig,"");return i=i.replace(/(\*\*|__)(.*?)\1/g,"$2"),i=i.replace(/(#+)(.*)/g,"$2"),i=i.replace(/\[(.*?)\]\((.*?)\)/g,"$1"),i.length>s&&(i=i.substring(0,s)+"..."),i},$convertToBoolean(r){return r==="true"||r===!0||r===1||r==="1"||r==="yes"||r==="on"},each:yu,hasFeature(r){return this.appVars.features[r]},isCommunityModerator(){return window.fluentComAdmin.auth.community_roles.some(r=>r==="admin"||r==="moderator")},isSpaceModerator(r){var i,l;return["admin","moderator"].includes((l=(i=r.membership)==null?void 0:i.pivot)==null?void 0:l.role)},getCurrentAuthUrl(){let r=window.location.href,s=this.appVars.auth_url;return s=s.replace(/(\?|&)redirect_to=[^&]+/,""),s.indexOf("?")===-1?s+="?":s+="&",s+"redirect_to="+encodeURIComponent(r)},$formatNumber(r){return r&&r.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")},$getRouteLink(r,s={}){return yu(s,(i,l)=>{r=r.replace(":"+l,i)}),this.appVars.portal_url+r},isOnline(r){if(!r)return!1;const i=dayjs.utc(r,"YYYY-MM-DD HH:mm:ss").add(this.appVars.date_offset,"seconds").diff(dayjs.utc(),"minutes");return i<=5&&i>=0},doNothing(){console.log("OK")}},mounted(){window.fcom_mounted||(window.fcom_mounted=!0,this.isMobile&&dayjs.updateLocale("en",{relativeTime:{future:"in %s",past:"%s",s:"now",m:"1m",mm:"%dm",h:"1 h",hh:"%d h",d:"%dd",dd:"%dd",M:"1 mo",MM:"%d mo",y:"%d y",yy:"%d y"}}))}}),Gn.config.globalProperties.$notify=rfe,Gn.config.globalProperties.$confirm=yy.confirm,Gn.config.globalProperties.$promt=yy.prompt,Gn.config.globalProperties.$messageBox=yy,Gn.config.globalProperties.$gloablStorage={};const t=window.FluentCommunityUtil.hooks.applyFilters("fluent_com_portal_admin_routes",kDe);let n=null;window.fluentComAdmin.routing_system=="hash"?n=$6({routes:t,history:sj()}):n=$6({routes:t,history:fx(window.fluentComAdmin.portal_slug)});const o=window.FluentCommunityUtil.hooks.applyFilters("fluent_com_portal_admin_app",Gn);window.fluentFrameworkApp=o.use(n).mount("#fluent_com_portal"),window.fluentFrameworkAppRouter=n}window.FluentCommunityUtil?l$():document.addEventListener("fluentCommunityUtilReady",function(){l$()});var za,Pc;class qDe{constructor(t){Os(this,za,void 0);Os(this,Pc,new Set);Lo(this,za,t)}get current(){return kt(this,za)}set current(t){kt(this,za)!=t&&(Lo(this,za,t),kt(this,Pc).forEach(n=>n(t)))}on(t){return kt(this,Pc).add(t),()=>kt(this,Pc).delete(t)}}za=new WeakMap,Pc=new WeakMap;const kL=e=>new qDe(e),z2=Symbol.for("atomico.hooks");globalThis[z2]=globalThis[z2]||{};let md=globalThis[z2];const GDe=Symbol.for("Atomico.suspense"),SL=Symbol.for("Atomico.effect"),YDe=Symbol.for("Atomico.layoutEffect"),$L=Symbol.for("Atomico.insertionEffect"),jh=(e,t,n)=>{const{i:o,hooks:r}=md.c,s=r[o]=r[o]||{};return s.value=e(s.value),s.effect=t,s.tag=n,md.c.i++,r[o].value},Hk=e=>jh((t=kL(e))=>t),EL=()=>jh((e=kL(md.c.host))=>e),xL=()=>md.c.update,ZDe=(e,t,n=0)=>{let o={},r=!1;const s=()=>r,i=(u,c)=>{for(const d in o){const f=o[d];f.effect&&f.tag===u&&(f.value=f.effect(f.value,c))}};return{load:u=>{md.c={host:t,hooks:o,update:e,i:0,id:n};let c;try{r=!1,c=u()}catch(d){if(d!==GDe)throw d;r=!0}finally{md.c=null}return c},cleanEffects:u=>(i($L,u),()=>(i(YDe,u),()=>{i(SL,u)})),isSuspense:s}},Hh=Symbol.for;function TL(e,t){const n=e.length;if(n!==t.length)return!1;for(let o=0;o<n;o++){let r=e[o],s=t[o];if(r!==s)return!1}return!0}const ki=e=>typeof e=="function",cp=e=>typeof e=="object",{isArray:JDe}=Array,j2=(e,t)=>(t?e instanceof HTMLStyleElement:!0)&&"hydrate"in((e==null?void 0:e.dataset)||{});function ML(e,t){let n;const o=r=>{let{length:s}=r;for(let i=0;i<s;i++){const l=r[i];if(l&&Array.isArray(l))o(l);else{const a=typeof l;if(l==null||a==="function"||a==="boolean")continue;a==="string"||a==="number"?(n==null&&(n=""),n+=l):(n!=null&&(t(n),n=null),t(l))}}};o(e),n!=null&&t(n)}const OL=(e,t,n)=>(e.addEventListener(t,n),()=>e.removeEventListener(t,n));let IL=class{constructor(t,n,o){this.message=n,this.target=t,this.value=o}};class XDe extends IL{}class QDe extends IL{}const a0="Custom",eVe=null,tVe={true:1,"":1,1:1};function nVe(e,t,n,o,r){const{type:s,reflect:i,event:l,value:a,attr:u=rVe(t)}=(n==null?void 0:n.name)!=a0&&cp(n)&&n!=eVe?n:{type:n},c=(s==null?void 0:s.name)===a0&&s.map,d=a!=null?s==Function||!ki(a)?()=>a:a:null;Object.defineProperty(e,t,{configurable:!0,set(f){const p=this[t];d&&s!=Boolean&&f==null&&(f=d());const{error:h,value:m}=(c?lVe:aVe)(s,f);if(h&&m!=null)throw new XDe(this,`The value defined for prop '${t}' must be of type '${s.name}'`,m);p!=m&&(this._props[t]=m??void 0,this.update(),l&&oVe(this,l),this.updated.then(()=>{i&&(this._ignoreAttr=u,sVe(this,s,u,this[t]),this._ignoreAttr=null)}))},get(){return this._props[t]}}),d&&(r[t]=d()),o[u]={prop:t,type:s}}const oVe=(e,{type:t,base:n=CustomEvent,...o})=>e.dispatchEvent(new n(t,o)),rVe=e=>e.replace(/([A-Z])/g,"-$1").toLowerCase(),sVe=(e,t,n,o)=>o==null||t==Boolean&&!o?e.removeAttribute(n):e.setAttribute(n,(t==null?void 0:t.name)===a0&&(t!=null&&t.serialize)?t==null?void 0:t.serialize(o):cp(o)?JSON.stringify(o):t==Boolean?"":o),iVe=(e,t)=>e==Boolean?!!tVe[t]:e==Number?Number(t):e==String?t:e==Array||e==Object?JSON.parse(t):e.name==a0?t:new e(t),lVe=({map:e},t)=>{try{return{value:e(t),error:!1}}catch{return{value:t,error:!0}}},aVe=(e,t)=>e==null||t==null?{value:t,error:!1}:e!=String&&t===""?{value:void 0,error:!1}:e==Object||e==Array||e==Symbol?{value:t,error:{}.toString.call(t)!==`[object ${e.name}]`}:t instanceof e?{value:t,error:e==Number&&Number.isNaN(t.valueOf())}:e==String||e==Number||e==Boolean?{value:t,error:e==Number?typeof t!="number"?!0:Number.isNaN(t):e==String?typeof t!="string":typeof t!="boolean"}:{value:t,error:!0};let uVe=0;const cVe=e=>{var n;const t=((n=(e==null?void 0:e.dataset)||{})==null?void 0:n.hydrate)||"";return t||"c"+uVe++},Uh=(e,t=HTMLElement)=>{const n={},o={},r="prototype"in t&&t.prototype instanceof Element,s=r?t:"base"in t?t.base:HTMLElement,{props:i,styles:l}=r?e:t;class a extends s{constructor(){super(),this._setup(),this._render=()=>e({...this._props});for(const c in o)this[c]=o[c]}static get styles(){return[super.styles,l]}async _setup(){if(this._props)return;this._props={};let c,d;this.mounted=new Promise(y=>this.mount=()=>{y(),c!=this.parentNode&&(d!=c?this.unmounted.then(this.update):this.update()),c=this.parentNode}),this.unmounted=new Promise(y=>this.unmount=()=>{y(),(c!=this.parentNode||!this.isConnected)&&(f.cleanEffects(!0)()(),d=this.parentNode,c=null)}),this.symbolId=this.symbolId||Symbol(),this.symbolIdParent=Symbol();const f=ZDe(()=>this.update(),this,cVe(this));let p,h=!0;const m=j2(this);this.update=()=>(p||(p=!0,this.updated=(this.updated||this.mounted).then(()=>{try{const y=f.load(this._render),v=f.cleanEffects();return y&&y.render(this,this.symbolId,m),p=!1,h&&!f.isSuspense()&&(h=!1,!m&&dVe(this)),v()}finally{p=!1}}).then(y=>{y&&y()})),this.updated),this.update()}connectedCallback(){this.mount(),super.connectedCallback&&super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback(),this.unmount()}attributeChangedCallback(c,d,f){if(n[c]){if(c===this._ignoreAttr||d===f)return;const{prop:p,type:h}=n[c];try{this[p]=iVe(h,f)}catch{throw new QDe(this,`The value defined as attr '${c}' cannot be parsed by type '${h.name}'`,f)}}else super.attributeChangedCallback(c,d,f)}static get props(){return{...super.props,...i}}static get observedAttributes(){const c=super.observedAttributes||[];for(const d in i)nVe(this.prototype,d,i[d],n,o);return Object.keys(n).concat(c)}}return a};function dVe(e){const{styles:t}=e.constructor,{shadowRoot:n}=e;if(n&&t.length){const o=[];ML(t,r=>{r&&(r instanceof Element?n.appendChild(r.cloneNode(!0)):o.push(r))}),o.length&&(n.adoptedStyleSheets=o)}}const AL=e=>(t,n)=>{jh(([o,r]=[])=>((r||!r)&&(r&&TL(r,n)?o=o||!0:(ki(o)&&o(),o=null)),[o,n]),([o,r],s)=>s?(ki(o)&&o(),[]):[o||t(),r],e)},u0=AL(SL),fVe=AL($L);class pVe extends Array{constructor(t,n){let o=!0;const r=s=>{try{n(s,this,o)}finally{o=!1}};super(void 0,r,n),r(t)}}const NL=e=>{const t=xL();return jh((n=new pVe(e,(o,r,s)=>{o=ki(o)?o(r[0]):o,o!==r[0]&&(r[0]=o,s||t())}))=>n)},H2=(e,t)=>{const[n]=jh(([o,r,s=0]=[])=>((!r||r&&!TL(r,t))&&(o=e()),[o,t,s]));return n},Vu=(e,t)=>H2(()=>e,t),U2=Hh("atomico/options");globalThis[U2]=globalThis[U2]||{sheet:!!document.adoptedStyleSheets};const PL=globalThis[U2];new Promise(e=>{PL.ssr||(document.readyState==="loading"?OL(document,"DOMContentLoaded",e):e())});const hVe={checked:1,value:1,selected:1},mVe={list:1,type:1,size:1,form:1,width:1,height:1,src:1,href:1,slot:1},gVe={shadowDom:1,staticNode:1,cloneNode:1,children:1,key:1},W1={},W2=[];class K2 extends Text{}const vVe=Hh("atomico/id"),dp=Hh("atomico/type"),d_=Hh("atomico/ref"),LL=Hh("atomico/vnode"),yVe=()=>{};function _Ve(e,t,n){return DL(this,e,t,n)}const RL=(e,t,...n)=>{const o=t||W1;let{children:r}=o;if(r=r??(n.length?n:W2),e===yVe)return r;const s=e?e instanceof Node?1:e.prototype instanceof HTMLElement&&2:0;if(s===!1&&e instanceof Function)return e(r!=W2?{children:r,...o}:o);const i=PL.render||_Ve;return{[dp]:LL,type:e,props:o,children:r,key:o.key,shadow:o.shadowDom,static:o.staticNode,raw:s,is:o.is,clone:o.cloneNode,render:i}};function DL(e,t,n=vVe,o,r){let s;if(t&&t[n]&&t[n].vnode==e||e[dp]!=LL)return t;(e||!t)&&(r=r||e.type=="svg",s=e.type!="host"&&(e.raw==1?(t&&e.clone?t[d_]:t)!=e.type:e.raw==2?!(t instanceof e.type):t?t[d_]||t.localName!=e.type:!t),s&&e.type!=null&&(e.raw==1&&e.clone?(o=!0,t=e.type.cloneNode(!0),t[d_]=e.type):t=e.raw==1?e.type:e.raw==2?new e.type:r?document.createElementNS("http://www.w3.org/2000/svg",e.type):document.createElement(e.type,e.is?{is:e.is}:void 0)));const i=t[n]?t[n]:W1,{vnode:l=W1,cycle:a=0}=i;let{fragment:u,handlers:c}=i;const{children:d=W2,props:f=W1}=l;if(c=s?{}:c||{},e.static&&!s)return t;if(e.shadow&&!t.shadowRoot&&t.attachShadow({mode:"open",...e.shadow}),e.props!=f&&CVe(t,f,e.props,c,r),e.children!==d){const p=e.shadow?t.shadowRoot:t;u=wVe(e.children,u,p,n,!a&&o,r&&e.type=="foreignObject"?!1:r)}return t[n]={vnode:e,handlers:c,fragment:u,cycle:a+1},t}function bVe(e,t){const n=new K2(""),o=new K2("");let r;if(e[t?"prepend":"append"](n),t){let{lastElementChild:s}=e;for(;s;){const{previousElementSibling:i}=s;if(j2(s,!0)&&!j2(i,!0)){r=s;break}s=i}}return r?r.before(o):e.append(o),{markStart:n,markEnd:o}}function wVe(e,t,n,o,r,s){e=e==null?null:JDe(e)?e:[e];const i=t||bVe(n,r),{markStart:l,markEnd:a,keyes:u}=i;let c;const d=u&&new Set;let f=l;if(e&&ML(e,p=>{if(typeof p=="object"&&!p[dp])return;const h=p[dp]&&p.key,m=u&&h!=null&&u.get(h);f!=a&&f===m?d.delete(f):f=f==a?a:f.nextSibling;const y=u?m:f;let v=y;if(p[dp])v=DL(p,y,o,r,s);else{const k=p+"";!(v instanceof Text)||v instanceof K2?v=new Text(k):v.data!=k&&(v.data=k)}v!=f&&(u&&d.delete(v),!y||u?(n.insertBefore(v,f),u&&f!=a&&d.add(f)):y==a?n.insertBefore(v,a):(n.replaceChild(v,y),f=v)),h!=null&&(c=c||new Map,c.set(h,v))}),f=f==a?a:f.nextSibling,t&&f!=a)for(;f!=a;){const p=f;f=f.nextSibling,p.remove()}return d&&d.forEach(p=>p.remove()),i.keyes=c,i}function CVe(e,t,n,o,r){for(const s in t)!(s in n)&&a$(e,s,t[s],null,r,o);for(const s in n)a$(e,s,t[s],n[s],r,o)}function a$(e,t,n,o,r,s){if(t=t=="class"&&!r?"className":t,n=n??null,o=o??null,t in e&&hVe[t]&&(n=e[t]),!(o===n||gVe[t]||t[0]=="_"))if(e.localName==="slot"&&t==="assignNode"&&"assign"in e)e.assign(o);else if(t[0]=="o"&&t[1]=="n"&&(ki(o)||ki(n)))kVe(e,t.slice(2),o,s);else if(t=="ref")o&&(ki(o)?o(e):o.current=e);else if(t=="style"){const{style:i}=e;n=n||"",o=o||"";const l=cp(n),a=cp(o);if(l)for(const u in n)if(a)!(u in o)&&u$(i,u,null);else break;if(a)for(const u in o){const c=o[u];l&&n[u]===c||u$(i,u,c)}else i.cssText=o}else{const i=t[0]=="$"?t.slice(1):t;i===t&&(!r&&!mVe[t]&&t in e||ki(o)||ki(n))?e[t]=o??"":o==null?e.removeAttribute(i):e.setAttribute(i,cp(o)?JSON.stringify(o):o)}}function kVe(e,t,n,o){if(o.handleEvent||(o.handleEvent=r=>o[r.type].call(e,r)),n){if(!o[t]){const r=n.capture||n.once||n.passive?Object.assign({},n):null;e.addEventListener(t,o,r)}o[t]=n}else o[t]&&(e.removeEventListener(t,o),delete o[t])}function u$(e,t,n){let o="setProperty";n==null&&(o="removeProperty",n=null),~t.indexOf("-")?e[o](t,n):e[t]=n}const SVe=RL("host",{style:"display: contents"}),$Ve="value",EVe=(e,t)=>{const n=EL(),o=Hk();fVe(()=>OL(n.current,"ConnectContext",r=>{r.composedPath().at(0)!==r.currentTarget&&e===r.detail.id&&(r.stopPropagation(),r.detail.connect(o))}),[e]),o.current=t},xVe=e=>{const t=Uh(({value:n})=>(EVe(t,n),SVe),{props:{value:{type:Object,value:()=>e}}});return t[$Ve]=e,t};xVe({dispatch(e,t){}});const TVe=0,Fu=1,Pm=2,Lm=3,c$=4,kf=5,q2=6,VL=0,MVe=2,FL=3,BL=4,zL=kf,OVe=q2,jL=(e,t,n,o)=>{let r;t[0]=0;for(let s=1;s<t.length;s++){const i=t[s++],l=t[s]?(t[0]|=i?1:2,n[t[s++]]):t[++s];i===FL?o[0]=l:i===BL?o[1]=Object.assign(o[1]||{},l):i===zL?(o[1]=o[1]||{})[t[++s]]=l:i===OVe?o[1][t[++s]]+=l+"":i?(r=e.apply(l,jL(e,l,n,["",null])),o.push(r),l[0]?t[0]|=2:(t[s-2]=VL,t[s]=r)):o.push(l)}return o},IVe=function(e){let t=Fu,n="",o="",r=[0],s,i;const l=a=>{t===Fu&&(a||(n=n.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?r.push(VL,a,n):t===Lm&&(a||n)?(r.push(FL,a,n),t=Pm):t===Pm&&n==="..."&&a?r.push(BL,a,0):t===Pm&&n&&!a?r.push(zL,0,!0,n):t>=kf&&((n||!a&&t===kf)&&(r.push(t,0,n,i),t=q2),a&&(r.push(t,a,0,i),t=q2)),n=""};for(let a=0;a<e.length;a++){a&&(t===Fu&&l(),l(a));for(let u=0;u<e[a].length;u++)s=e[a][u],t===Fu?s==="<"?(l(),r=[r],t=Lm):n+=s:t===c$?n==="--"&&s===">"?(t=Fu,n=""):n=s+n[0]:o?s===o?o="":n+=s:s==='"'||s==="'"?o=s:s===">"?(l(),t=Fu):t&&(s==="="?(t=kf,i=n,n=""):s==="/"&&(t<kf||e[a][u+1]===">")?(l(),t===Lm&&(r=r[0]),t=r,(r=r[0]).push(MVe,0,t),t=TVe):s===" "||s===" "||s===` |
| 127 |
`||s==="\r"?(l(),t=Pm):n+=s),t===Lm&&n==="!--"&&(t=c$,r=r[0])}return l(),r},AVe=new Map;function Et(e){let t=AVe;return t=jL(RL,t.get(e)||(t.set(e,t=IVe(e)),t),arguments,[]),t.length>1?t:t[0]}var Uk=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Bu=(e,t,n)=>(Uk(e,t,"read from private field"),n?n.call(e):t.get(e)),zu=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},ju=(e,t,n,o)=>(Uk(e,t,"write to private field"),o?o.call(e,n):t.set(e,n),n),NVe=(e,t,n)=>(Uk(e,t,"access private method"),n),K1,q1,Sf,$f,G1,G2,HL;let Wk=class{constructor(t){zu(this,G2),zu(this,K1,void 0),zu(this,q1,void 0),zu(this,Sf,void 0),zu(this,$f,void 0),zu(this,G1,void 0),ju(this,Sf,!1),this.onShow=()=>{},this.onHide=()=>{},ju(this,G1,(n,o)=>{var r;const{state:s,composing:i}=n,{selection:l,doc:a}=s,{ranges:u}=l,c=Math.min(...u.map(p=>p.$from.pos)),d=Math.max(...u.map(p=>p.$to.pos)),f=o&&o.doc.eq(a)&&o.selection.eq(l);if(Bu(this,Sf)||((r=n.dom.parentElement)==null||r.appendChild(this.element),ju(this,Sf,!0)),!(i||f)){if(!Bu(this,q1).call(this,n,o)){this.hide();return}lb({getBoundingClientRect:()=>pv(n,c,d)},this.element,{placement:"top",middleware:[ib(),rb(Bu(this,$f))]}).then(({x:p,y:h})=>{Object.assign(this.element.style,{left:`${p}px`,top:`${h}px`})}),this.show()}}),this.update=(n,o)=>{Mv(Bu(this,G1),Bu(this,K1))(n,o)},this.destroy=()=>{},this.show=n=>{this.element.dataset.show="true",n&&lb(n,this.element,{placement:"top",middleware:[ib(),rb(Bu(this,$f))]}).then(({x:o,y:r})=>{Object.assign(this.element.style,{left:`${o}px`,top:`${r}px`})}),this.onShow()},this.hide=()=>{this.element.dataset.show!=="false"&&(this.element.dataset.show="false",this.onHide())},this.element=t.content,ju(this,K1,t.debounce??200),ju(this,q1,t.shouldShow??NVe(this,G2,HL)),ju(this,$f,t.offset),this.element.dataset.show="false"}};K1=new WeakMap,q1=new WeakMap,Sf=new WeakMap,$f=new WeakMap,G1=new WeakMap,G2=new WeakSet,HL=function(e){const{doc:t,selection:n}=e.state,{empty:o,from:r,to:s}=n,i=!t.textBetween(r,s).length&&e.state.selection instanceof ht,l=this.element.contains(document.activeElement),a=!e.hasFocus()&&!l,u=!e.editable;return!(a||o||i||u)};function Kk(e){const t=Pn({},`${e}_TOOLTIP_SPEC`),n=ao(r=>{const s=r.get(t.key);return new On({key:new wn(`${e}_TOOLTIP`),...s})}),o=[t,n];return o.key=t.key,o.pluginKey=n.key,t.meta={package:"@milkdown/plugin-tooltip",displayName:`Ctx<tooltipSpec>|${e}`},n.meta={package:"@milkdown/plugin-tooltip",displayName:`Prose<tooltip>|${e}`},o}function UL(e){var t,n,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=UL(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}function ac(){for(var e,t,n=0,o="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=UL(e))&&(o&&(o+=" "),o+=t);return o}var PVe=Object.defineProperty,d$=Object.getOwnPropertySymbols,LVe=Object.prototype.hasOwnProperty,RVe=Object.prototype.propertyIsEnumerable,f$=(e,t,n)=>t in e?PVe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,DVe=(e,t)=>{for(var n in t||(t={}))LVe.call(t,n)&&f$(e,n,t[n]);if(d$)for(var n of d$(t))RVe.call(t,n)&&f$(e,n,t[n]);return e};function Ou(e,t){return Object.assign(e,{meta:DVe({package:"@milkdown/components"},t)}),e}var VVe=Object.defineProperty,p$=Object.getOwnPropertySymbols,FVe=Object.prototype.hasOwnProperty,BVe=Object.prototype.propertyIsEnumerable,h$=(e,t,n)=>t in e?VVe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,qk=(e,t)=>{for(var n in t||(t={}))FVe.call(t,n)&&h$(e,n,t[n]);if(p$)for(var n of p$(t))BVe.call(t,n)&&h$(e,n,t[n]);return e};const zVe={mode:"preview"},Di=Pn(qk({},zVe),"linkTooltipStateCtx");Ou(Di,{displayName:"State<link-tooltip>",group:"LinkTooltip"});const jVe={addLink:()=>{},editLink:()=>{},removeLink:()=>{}},gd=Pn(qk({},jVe),"linkTooltipAPICtx");Ou(Di,{displayName:"API<link-tooltip>",group:"LinkTooltip"});const HVe={linkIcon:()=>"🔗",editButton:()=>"✎",removeButton:()=>"⌫",confirmButton:()=>Et`Confirm ⏎`,onCopyLink:()=>{},inputPlaceholder:"Paste link..."},Lv=Pn(qk({},HVe),"linkTooltipConfigCtx");Ou(Di,{displayName:"Config<link-tooltip>",group:"LinkTooltip"});const Wh=Kk("LINK_PREVIEW");Ou(Wh[0],{displayName:"PreviewTooltipSpec<link-tooltip>",group:"LinkTooltip"});Ou(Wh[1],{displayName:"PreviewTooltipPlugin<link-tooltip>",group:"LinkTooltip"});const Rv=Kk("LINK_EDIT");Ou(Rv[0],{displayName:"EditTooltipSpec<link-tooltip>",group:"LinkTooltip"});Ou(Rv[1],{displayName:"EditTooltipPlugin<link-tooltip>",group:"LinkTooltip"});function UVe(e,t,n,o,r){let s={start:-1,end:-1};return n.nodesBetween(o,r,(i,l)=>{if(s.start>-1)return!1;s.start===-1&&e.isInSet(i.marks)&&t===i&&(s={start:l,end:l+Math.max(i.textContent.length,1)})}),s}function WVe(e,t,n){const o=t.posAtCoords({left:n.clientX,top:n.clientY});if(!o)return;const{pos:r}=o,s=t.state.doc.nodeAt(r);if(!s)return;const i=s.marks.find(a=>a.type===ps.mark.type(e));if(!(!i||!Wh.pluginKey()))return{show:!0,pos:r,node:s,mark:i}}function WL(e,t){const n=customElements.get(e);if(n==null){customElements.define(e,t);return}n!==t&&console.warn(`Custom element ${e} has been defined before.`)}const KL=({config:e,src:t,onEdit:n,onRemove:o})=>{const r=l=>{l.stopPropagation(),l.preventDefault(),n==null||n()},s=l=>{l.stopPropagation(),l.preventDefault(),o==null||o()};return Et` |
| 128 |
<host> |
| 129 |
<div class="link-preview" onmousedown=${l=>{l.preventDefault(),navigator.clipboard&&t&&navigator.clipboard.writeText(t).then(()=>{e==null||e.onCopyLink(t)}).catch(a=>{throw a})}}> |
| 130 |
<span class="link-icon"> |
| 131 |
${e==null?void 0:e.linkIcon()} |
| 132 |
</span> |
| 133 |
<a href=${t} target="_blank" class="link-display">${t}</a> |
| 134 |
<span class="button link-edit-button" onmousedown=${r}> |
| 135 |
${e==null?void 0:e.editButton()} |
| 136 |
</span> |
| 137 |
<span class="button link-remove-button" onmousedown=${s}> |
| 138 |
${e==null?void 0:e.removeButton()} |
| 139 |
</span> |
| 140 |
</div> |
| 141 |
</host> |
| 142 |
`};KL.props={config:Object,src:String,onEdit:Function,onRemove:Function};const qL=Uh(KL);var GL=e=>{throw TypeError(e)},YL=(e,t,n)=>t.has(e)||GL("Cannot "+n),rn=(e,t,n)=>(YL(e,t,"read from private field"),n?n.call(e):t.get(e)),Qi=(e,t,n)=>t.has(e)?GL("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Rm=(e,t,n,o)=>(YL(e,t,"write to private field"),o?o.call(e,n):t.set(e,n),n),dl,ts,Ef,xf,Y1,Z1,J1,Tf;class KVe{constructor(t,n){this.ctx=t,Qi(this,dl,new qL),Qi(this,ts),Qi(this,Ef,this.ctx.use(Di.key)),Qi(this,xf,!1),Qi(this,Y1,({mode:o})=>{o==="edit"&&rn(this,Tf).call(this)}),Qi(this,Z1,()=>{Rm(this,xf,!0)}),Qi(this,J1,()=>{Rm(this,xf,!1)}),Qi(this,Tf,()=>{rn(this,ts).hide(),rn(this,ts).element.removeEventListener("mouseenter",rn(this,Z1)),rn(this,ts).element.removeEventListener("mouseleave",rn(this,J1))}),this.show=(o,r,s,i)=>{rn(this,dl).config=this.ctx.get(Lv.key),rn(this,dl).src=o.attrs.href,rn(this,dl).onEdit=()=>{this.ctx.get(gd.key).editLink(o,r,s)},rn(this,dl).onRemove=()=>{this.ctx.get(gd.key).removeLink(r,s),rn(this,Tf).call(this)},rn(this,ts).show({getBoundingClientRect:()=>i}),rn(this,ts).element.addEventListener("mouseenter",rn(this,Z1)),rn(this,ts).element.addEventListener("mouseleave",rn(this,J1))},this.hide=()=>{rn(this,xf)||rn(this,Tf).call(this)},this.update=()=>{},this.destroy=()=>{rn(this,Ef).off(rn(this,Y1)),rn(this,ts).destroy(),rn(this,dl).remove()},Rm(this,ts,new Wk({debounce:0,content:rn(this,dl),shouldShow:()=>!1})),rn(this,ts).update(n),Rm(this,Ef,t.use(Di.key)),rn(this,Ef).on(rn(this,Y1))}}dl=new WeakMap;ts=new WeakMap;Ef=new WeakMap;xf=new WeakMap;Y1=new WeakMap;Z1=new WeakMap;J1=new WeakMap;Tf=new WeakMap;WL("milkdown-link-preview",qL);function qVe(e){let t;const o=Mv((s,i)=>{if(!t||!s.hasFocus()||e.get(Di.key).mode==="edit")return;const a=WVe(e,s,i);if(a){const u=s.state.doc.resolve(a.pos),c=UVe(a.mark,a.node,s.state.doc,u.before(),u.after()),d=c.start,f=c.end;t.show(a.mark,d,f,pv(s,d,f));return}t.hide()},200),r=()=>{setTimeout(()=>{t==null||t.hide()},200)};e.set(Wh.key,{props:{handleDOMEvents:{mousemove:o,mouseleave:r}},view:s=>(t=new KVe(e,s),t)})}const ZL=({src:e,onConfirm:t,onCancel:n,config:o})=>{const r=Hk(),[s,i]=NL(e);u0(()=>{i(e??"")},[e]);const l=()=>{var u,c;t==null||t((c=(u=r.current)==null?void 0:u.value)!=null?c:"")},a=u=>{var c,d;u.stopPropagation(),u.key==="Enter"&&(t==null||t((d=(c=r.current)==null?void 0:c.value)!=null?d:""),u.preventDefault()),u.key==="Escape"&&(n==null||n(),u.preventDefault())};return Et` |
| 143 |
<host> |
| 144 |
<div class="link-edit"> |
| 145 |
<input |
| 146 |
class="input-area" |
| 147 |
placeholder=${o==null?void 0:o.inputPlaceholder} |
| 148 |
ref=${r} |
| 149 |
onkeydown=${a} |
| 150 |
oninput=${u=>i(u.target.value)} |
| 151 |
value=${s} |
| 152 |
/> |
| 153 |
<span class=${ac("button confirm",!s&&"hidden")} onclick=${l}> |
| 154 |
${o==null?void 0:o.confirmButton()} |
| 155 |
</span> |
| 156 |
</div> |
| 157 |
</host> |
| 158 |
`};ZL.props={config:Object,src:String,onConfirm:Function,onCancel:Function};const JL=Uh(ZL);var GVe=Object.defineProperty,YVe=Object.defineProperties,ZVe=Object.getOwnPropertyDescriptors,m$=Object.getOwnPropertySymbols,JVe=Object.prototype.hasOwnProperty,XVe=Object.prototype.propertyIsEnumerable,XL=e=>{throw TypeError(e)},g$=(e,t,n)=>t in e?GVe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Dm=(e,t)=>{for(var n in t||(t={}))JVe.call(t,n)&&g$(e,n,t[n]);if(m$)for(var n of m$(t))XVe.call(t,n)&&g$(e,n,t[n]);return e},v$=(e,t)=>YVe(e,ZVe(t)),QL=(e,t,n)=>t.has(e)||XL("Cannot "+n),gn=(e,t,n)=>(QL(e,t,"read from private field"),n?n.call(e):t.get(e)),Hu=(e,t,n)=>t.has(e)?XL("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Vm=(e,t,n,o)=>(QL(e,t,"write to private field"),o?o.call(e,n):t.set(e,n),n),Ls,fl,pl,xa,Y2,X1;const y$={from:-1,to:-1,mark:null};class QVe{constructor(t,n){this.ctx=t,Hu(this,Ls,new JL),Hu(this,fl),Hu(this,pl,Dm({},y$)),Hu(this,xa,()=>{gn(this,fl).hide(),this.ctx.update(Di.key,o=>v$(Dm({},o),{mode:"preview"})),Vm(this,pl,Dm({},y$))}),Hu(this,Y2,o=>{const r=this.ctx.get(bn),{from:s,to:i,mark:l}=gn(this,pl),a=ps.type(this.ctx);if(l&&l.attrs.href===o){gn(this,xa).call(this);return}const u=r.state.tr;l&&u.removeMark(s,i,l),u.addMark(s,i,a.create({href:o})),r.dispatch(u),gn(this,xa).call(this)}),Hu(this,X1,(o,r,s)=>{const i=this.ctx.get(Lv.key);gn(this,Ls).config=i,gn(this,Ls).src=o,this.ctx.update(Di.key,a=>v$(Dm({},a),{mode:"edit"}));const l=this.ctx.get(bn);l.dispatch(l.state.tr.setSelection(ht.create(l.state.doc,r,s))),gn(this,fl).show({getBoundingClientRect:()=>pv(l,r,s)}),requestAnimationFrame(()=>{var a;(a=gn(this,Ls).querySelector("input"))==null||a.focus()})}),this.update=o=>{const{state:r}=o,{selection:s}=r;if(!(s instanceof ht))return;const{from:i,to:l}=s;i===gn(this,pl).from&&l===gn(this,pl).to||gn(this,xa).call(this)},this.destroy=()=>{gn(this,fl).destroy(),gn(this,Ls).remove()},this.addLink=(o,r)=>{Vm(this,pl,{from:o,to:r,mark:null}),gn(this,X1).call(this,"",o,r)},this.editLink=(o,r,s)=>{Vm(this,pl,{from:r,to:s,mark:o}),gn(this,X1).call(this,o.attrs.href,r,s)},this.removeLink=(o,r)=>{const s=this.ctx.get(bn),i=s.state.tr;i.removeMark(o,r,ps.type(this.ctx)),s.dispatch(i),gn(this,xa).call(this)},Vm(this,fl,new Wk({content:gn(this,Ls),debounce:0,shouldShow:()=>!1})),gn(this,fl).onHide=()=>{gn(this,Ls).update().catch(o=>{throw o}),n.dom.focus({preventScroll:!0})},gn(this,fl).update(n),gn(this,Ls).onConfirm=gn(this,Y2),gn(this,Ls).onCancel=gn(this,xa)}}Ls=new WeakMap;fl=new WeakMap;pl=new WeakMap;xa=new WeakMap;Y2=new WeakMap;X1=new WeakMap;var eFe=Object.defineProperty,tFe=Object.defineProperties,nFe=Object.getOwnPropertyDescriptors,_$=Object.getOwnPropertySymbols,oFe=Object.prototype.hasOwnProperty,rFe=Object.prototype.propertyIsEnumerable,b$=(e,t,n)=>t in e?eFe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,sFe=(e,t)=>{for(var n in t||(t={}))oFe.call(t,n)&&b$(e,n,t[n]);if(_$)for(var n of _$(t))rFe.call(t,n)&&b$(e,n,t[n]);return e},iFe=(e,t)=>tFe(e,nFe(t));WL("milkdown-link-edit",JL);function lFe(e){let t;e.update(gd.key,n=>iFe(sFe({},n),{addLink:(o,r)=>{t==null||t.addLink(o,r)},editLink:(o,r,s)=>{t==null||t.editLink(o,r,s)},removeLink:(o,r)=>{t==null||t.removeLink(o,r)}})),e.set(Rv.key,{view:n=>(t=new QVe(e,n),t)})}function aFe(e){qVe(e),lFe(e)}const uFe=[Di,gd,Lv,Wh,Rv].flat();Et` |
| 159 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 160 |
<path d="M4.25 20.5C4.0375 20.5 3.85942 20.4281 3.71575 20.2843C3.57192 20.1404 3.5 19.9622 3.5 19.7498C3.5 19.5371 3.57192 19.359 3.71575 19.2155C3.85942 19.0718 4.0375 19 4.25 19H19.75C19.9625 19 20.1406 19.0719 20.2843 19.2158C20.4281 19.3596 20.5 19.5378 20.5 19.7502C20.5 19.9629 20.4281 20.141 20.2843 20.2845C20.1406 20.4282 19.9625 20.5 19.75 20.5H4.25ZM8.25 16.625C8.0375 16.625 7.85942 16.5531 7.71575 16.4093C7.57192 16.2654 7.5 16.0872 7.5 15.8748C7.5 15.6621 7.57192 15.484 7.71575 15.3405C7.85942 15.1968 8.0375 15.125 8.25 15.125H15.75C15.9625 15.125 16.1406 15.1969 16.2843 15.3408C16.4281 15.4846 16.5 15.6628 16.5 15.8753C16.5 16.0879 16.4281 16.266 16.2843 16.4095C16.1406 16.5532 15.9625 16.625 15.75 16.625H8.25ZM4.25 12.75C4.0375 12.75 3.85942 12.6781 3.71575 12.5343C3.57192 12.3904 3.5 12.2122 3.5 11.9998C3.5 11.7871 3.57192 11.609 3.71575 11.4655C3.85942 11.3218 4.0375 11.25 4.25 11.25H19.75C19.9625 11.25 20.1406 11.3219 20.2843 11.4658C20.4281 11.6096 20.5 11.7878 20.5 12.0003C20.5 12.2129 20.4281 12.391 20.2843 12.5345C20.1406 12.6782 19.9625 12.75 19.75 12.75H4.25ZM8.25 8.875C8.0375 8.875 7.85942 8.80308 7.71575 8.65925C7.57192 8.51542 7.5 8.33725 7.5 8.12475C7.5 7.91208 7.57192 7.734 7.71575 7.5905C7.85942 7.44683 8.0375 7.375 8.25 7.375H15.75C15.9625 7.375 16.1406 7.44692 16.2843 7.59075C16.4281 7.73458 16.5 7.91275 16.5 8.12525C16.5 8.33792 16.4281 8.516 16.2843 8.6595C16.1406 8.80317 15.9625 8.875 15.75 8.875H8.25ZM4.25 5C4.0375 5 3.85942 4.92808 3.71575 4.78425C3.57192 4.64042 3.5 4.46225 3.5 4.24975C3.5 4.03708 3.57192 3.859 3.71575 3.7155C3.85942 3.57183 4.0375 3.5 4.25 3.5H19.75C19.9625 3.5 20.1406 3.57192 20.2843 3.71575C20.4281 3.85958 20.5 4.03775 20.5 4.25025C20.5 4.46292 20.4281 4.641 20.2843 4.7845C20.1406 4.92817 19.9625 5 19.75 5H4.25Z"/> |
| 161 |
</svg> |
| 162 |
`;Et` |
| 163 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 164 |
<path d="M4.25 20.5C4.0375 20.5 3.85942 20.4281 3.71575 20.2843C3.57192 20.1404 3.5 19.9622 3.5 19.7498C3.5 19.5371 3.57192 19.359 3.71575 19.2155C3.85942 19.0718 4.0375 19 4.25 19H19.75C19.9625 19 20.1406 19.0719 20.2843 19.2158C20.4281 19.3596 20.5 19.5378 20.5 19.7502C20.5 19.9629 20.4281 20.141 20.2843 20.2845C20.1406 20.4282 19.9625 20.5 19.75 20.5H4.25ZM4.25 16.625C4.0375 16.625 3.85942 16.5531 3.71575 16.4093C3.57192 16.2654 3.5 16.0872 3.5 15.8748C3.5 15.6621 3.57192 15.484 3.71575 15.3405C3.85942 15.1968 4.0375 15.125 4.25 15.125H13.75C13.9625 15.125 14.1406 15.1969 14.2843 15.3408C14.4281 15.4846 14.5 15.6628 14.5 15.8753C14.5 16.0879 14.4281 16.266 14.2843 16.4095C14.1406 16.5532 13.9625 16.625 13.75 16.625H4.25ZM4.25 12.75C4.0375 12.75 3.85942 12.6781 3.71575 12.5343C3.57192 12.3904 3.5 12.2122 3.5 11.9998C3.5 11.7871 3.57192 11.609 3.71575 11.4655C3.85942 11.3218 4.0375 11.25 4.25 11.25H19.75C19.9625 11.25 20.1406 11.3219 20.2843 11.4658C20.4281 11.6096 20.5 11.7878 20.5 12.0003C20.5 12.2129 20.4281 12.391 20.2843 12.5345C20.1406 12.6782 19.9625 12.75 19.75 12.75H4.25ZM4.25 8.875C4.0375 8.875 3.85942 8.80308 3.71575 8.65925C3.57192 8.51542 3.5 8.33725 3.5 8.12475C3.5 7.91208 3.57192 7.734 3.71575 7.5905C3.85942 7.44683 4.0375 7.375 4.25 7.375H13.75C13.9625 7.375 14.1406 7.44692 14.2843 7.59075C14.4281 7.73458 14.5 7.91275 14.5 8.12525C14.5 8.33792 14.4281 8.516 14.2843 8.6595C14.1406 8.80317 13.9625 8.875 13.75 8.875H4.25ZM4.25 5C4.0375 5 3.85942 4.92808 3.71575 4.78425C3.57192 4.64042 3.5 4.46225 3.5 4.24975C3.5 4.03708 3.57192 3.859 3.71575 3.7155C3.85942 3.57183 4.0375 3.5 4.25 3.5H19.75C19.9625 3.5 20.1406 3.57192 20.2843 3.71575C20.4281 3.85958 20.5 4.03775 20.5 4.25025C20.5 4.46292 20.4281 4.641 20.2843 4.7845C20.1406 4.92817 19.9625 5 19.75 5H4.25Z"/> |
| 165 |
</svg> |
| 166 |
`;Et` |
| 167 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 168 |
<path d="M4.25 5C4.0375 5 3.85942 4.92808 3.71575 4.78425C3.57192 4.64042 3.5 4.46225 3.5 4.24975C3.5 4.03708 3.57192 3.859 3.71575 3.7155C3.85942 3.57183 4.0375 3.5 4.25 3.5H19.75C19.9625 3.5 20.1406 3.57192 20.2843 3.71575C20.4281 3.85958 20.5 4.03775 20.5 4.25025C20.5 4.46292 20.4281 4.641 20.2843 4.7845C20.1406 4.92817 19.9625 5 19.75 5H4.25ZM10.25 8.875C10.0375 8.875 9.85942 8.80308 9.71575 8.65925C9.57192 8.51542 9.5 8.33725 9.5 8.12475C9.5 7.91208 9.57192 7.734 9.71575 7.5905C9.85942 7.44683 10.0375 7.375 10.25 7.375H19.75C19.9625 7.375 20.1406 7.44692 20.2843 7.59075C20.4281 7.73458 20.5 7.91275 20.5 8.12525C20.5 8.33792 20.4281 8.516 20.2843 8.6595C20.1406 8.80317 19.9625 8.875 19.75 8.875H10.25ZM4.25 12.75C4.0375 12.75 3.85942 12.6781 3.71575 12.5343C3.57192 12.3904 3.5 12.2122 3.5 11.9998C3.5 11.7871 3.57192 11.609 3.71575 11.4655C3.85942 11.3218 4.0375 11.25 4.25 11.25H19.75C19.9625 11.25 20.1406 11.3219 20.2843 11.4658C20.4281 11.6096 20.5 11.7878 20.5 12.0003C20.5 12.2129 20.4281 12.391 20.2843 12.5345C20.1406 12.6782 19.9625 12.75 19.75 12.75H4.25ZM10.25 16.625C10.0375 16.625 9.85942 16.5531 9.71575 16.4093C9.57192 16.2654 9.5 16.0872 9.5 15.8748C9.5 15.6621 9.57192 15.484 9.71575 15.3405C9.85942 15.1968 10.0375 15.125 10.25 15.125H19.75C19.9625 15.125 20.1406 15.1969 20.2843 15.3408C20.4281 15.4846 20.5 15.6628 20.5 15.8753C20.5 16.0879 20.4281 16.266 20.2843 16.4095C20.1406 16.5532 19.9625 16.625 19.75 16.625H10.25ZM4.25 20.5C4.0375 20.5 3.85942 20.4281 3.71575 20.2843C3.57192 20.1404 3.5 19.9622 3.5 19.7498C3.5 19.5371 3.57192 19.359 3.71575 19.2155C3.85942 19.0718 4.0375 19 4.25 19H19.75C19.9625 19 20.1406 19.0719 20.2843 19.2158C20.4281 19.3596 20.5 19.5378 20.5 19.7502C20.5 19.9629 20.4281 20.141 20.2843 20.2845C20.1406 20.4282 19.9625 20.5 19.75 20.5H4.25Z"/> |
| 169 |
</svg> |
| 170 |
`;const cFe=Et` |
| 171 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 172 |
<path d="M8.85758 18.625C8.4358 18.625 8.07715 18.4772 7.78163 18.1817C7.48613 17.8862 7.33838 17.5275 7.33838 17.1058V6.8942C7.33838 6.47242 7.48613 6.11377 7.78163 5.81825C8.07715 5.52275 8.4358 5.375 8.85758 5.375H12.1999C13.2191 5.375 14.1406 5.69231 14.9643 6.32693C15.788 6.96154 16.1999 7.81603 16.1999 8.89038C16.1999 9.63779 16.0194 10.2471 15.6585 10.7183C15.2976 11.1894 14.9088 11.5314 14.4922 11.7442C15.005 11.9211 15.4947 12.2708 15.9614 12.7933C16.428 13.3157 16.6614 14.0192 16.6614 14.9038C16.6614 16.182 16.1902 17.1217 15.2479 17.723C14.3056 18.3243 13.3563 18.625 12.3999 18.625H8.85758ZM9.4883 16.6327H12.3191C13.1063 16.6327 13.6627 16.4141 13.9884 15.9769C14.314 15.5397 14.4768 15.1205 14.4768 14.7192C14.4768 14.3179 14.314 13.8987 13.9884 13.4615C13.6627 13.0243 13.0909 12.8057 12.273 12.8057H9.4883V16.6327ZM9.4883 10.875H12.0826C12.6903 10.875 13.172 10.7013 13.5278 10.3539C13.8836 10.0064 14.0615 9.59037 14.0615 9.10575C14.0615 8.59035 13.8733 8.16918 13.497 7.84225C13.1207 7.51533 12.6595 7.35188 12.1133 7.35188H9.4883V10.875Z"/> |
| 173 |
</svg> |
| 174 |
`;Et` |
| 175 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 176 |
<g clip-path="url(#clip0_952_6527)"> |
| 177 |
<circle cx="12" cy="12" r="3"/> |
| 178 |
</g> |
| 179 |
<defs> |
| 180 |
<clipPath id="clip0_952_6527"> |
| 181 |
<rect width="24" height="24"/> |
| 182 |
</clipPath> |
| 183 |
</defs> |
| 184 |
</svg> |
| 185 |
`;const dFe=Et` |
| 186 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 187 |
<g clip-path="url(#clip0_977_8070)"> |
| 188 |
<path d="M4 10.5C3.17 10.5 2.5 11.17 2.5 12C2.5 12.83 3.17 13.5 4 13.5C4.83 13.5 5.5 12.83 5.5 12C5.5 11.17 4.83 10.5 4 10.5ZM4 4.5C3.17 4.5 2.5 5.17 2.5 6C2.5 6.83 3.17 7.5 4 7.5C4.83 7.5 5.5 6.83 5.5 6C5.5 5.17 4.83 4.5 4 4.5ZM4 16.5C3.17 16.5 2.5 17.18 2.5 18C2.5 18.82 3.18 19.5 4 19.5C4.82 19.5 5.5 18.82 5.5 18C5.5 17.18 4.83 16.5 4 16.5ZM8 19H20C20.55 19 21 18.55 21 18C21 17.45 20.55 17 20 17H8C7.45 17 7 17.45 7 18C7 18.55 7.45 19 8 19ZM8 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11H8C7.45 11 7 11.45 7 12C7 12.55 7.45 13 8 13ZM7 6C7 6.55 7.45 7 8 7H20C20.55 7 21 6.55 21 6C21 5.45 20.55 5 20 5H8C7.45 5 7 5.45 7 6Z"/> |
| 189 |
</g> |
| 190 |
<defs> |
| 191 |
<clipPath id="clip0_977_8070"> |
| 192 |
<rect width="24" height="24"/> |
| 193 |
</clipPath> |
| 194 |
</defs> |
| 195 |
</svg> |
| 196 |
`;Et` |
| 197 |
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"> |
| 198 |
<path fill="currentColor" d="M9 22a1 1 0 0 1-1-1v-3H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-6.1l-3.7 3.71c-.2.19-.45.29-.7.29zm1-6v3.08L13.08 16H20V4H4v12z"/> |
| 199 |
</svg> |
| 200 |
`;Et` |
| 201 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 202 |
<g clip-path="url(#clip0_1803_1151)"> |
| 203 |
<path d="M19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM10.71 16.29C10.32 16.68 9.69 16.68 9.3 16.29L5.71 12.7C5.32 12.31 5.32 11.68 5.71 11.29C6.1 10.9 6.73 10.9 7.12 11.29L10 14.17L16.88 7.29C17.27 6.9 17.9 6.9 18.29 7.29C18.68 7.68 18.68 8.31 18.29 8.7L10.71 16.29Z"/> |
| 204 |
</g> |
| 205 |
<defs> |
| 206 |
<clipPath id="clip0_1803_1151"> |
| 207 |
<rect width="24" height="24"/> |
| 208 |
</clipPath> |
| 209 |
</defs> |
| 210 |
</svg> |
| 211 |
`;Et` |
| 212 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 213 |
<g clip-path="url(#clip0_1803_535)"> |
| 214 |
<path d="M18 19H6C5.45 19 5 18.55 5 18V6C5 5.45 5.45 5 6 5H18C18.55 5 19 5.45 19 6V18C19 18.55 18.55 19 18 19ZM19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3Z"/> |
| 215 |
</g> |
| 216 |
<defs> |
| 217 |
<clipPath id="clip0_1803_535"> |
| 218 |
<rect width="24" height="24"/> |
| 219 |
</clipPath> |
| 220 |
</defs> |
| 221 |
</svg> |
| 222 |
`;Et` |
| 223 |
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6"> |
| 224 |
<path stroke-linecap="round" stroke-linejoin="round" d="M19.5 8.25l-7.5 7.5-7.5-7.5" /> |
| 225 |
</svg> |
| 226 |
`;Et` |
| 227 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 228 |
<g clip-path="url(#clip0_1098_15553)"> |
| 229 |
<path d="M18.3007 5.70973C17.9107 5.31973 17.2807 5.31973 16.8907 5.70973L12.0007 10.5897L7.1107 5.69973C6.7207 5.30973 6.0907 5.30973 5.7007 5.69973C5.3107 6.08973 5.3107 6.71973 5.7007 7.10973L10.5907 11.9997L5.7007 16.8897C5.3107 17.2797 5.3107 17.9097 5.7007 18.2997C6.0907 18.6897 6.7207 18.6897 7.1107 18.2997L12.0007 13.4097L16.8907 18.2997C17.2807 18.6897 17.9107 18.6897 18.3007 18.2997C18.6907 17.9097 18.6907 17.2797 18.3007 16.8897L13.4107 11.9997L18.3007 7.10973C18.6807 6.72973 18.6807 6.08973 18.3007 5.70973Z"/> |
| 230 |
</g> |
| 231 |
<defs> |
| 232 |
<clipPath id="clip0_1098_15553"> |
| 233 |
<rect width="24" height="24"/> |
| 234 |
</clipPath> |
| 235 |
</defs> |
| 236 |
</svg> |
| 237 |
`;const eR=Et` |
| 238 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 239 |
<g clip-path="url(#clip0_977_8081)"> |
| 240 |
<path d="M9.4 16.6L4.8 12L9.4 7.4L8 6L2 12L8 18L9.4 16.6ZM14.6 16.6L19.2 12L14.6 7.4L16 6L22 12L16 18L14.6 16.6Z"/> |
| 241 |
</g> |
| 242 |
<defs> |
| 243 |
<clipPath id="clip0_977_8081"> |
| 244 |
<rect width="24" height="24"/> |
| 245 |
</clipPath> |
| 246 |
</defs> |
| 247 |
</svg> |
| 248 |
`,fFe=Et` |
| 249 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"> |
| 250 |
<g clip-path="url(#clip0_1013_1606)"> |
| 251 |
<path d="M9.00012 16.1998L5.50012 12.6998C5.11012 12.3098 4.49012 12.3098 4.10012 12.6998C3.71012 13.0898 3.71012 13.7098 4.10012 14.0998L8.29012 18.2898C8.68012 18.6798 9.31012 18.6798 9.70012 18.2898L20.3001 7.69982C20.6901 7.30982 20.6901 6.68982 20.3001 6.29982C19.9101 5.90982 19.2901 5.90982 18.9001 6.29982L9.00012 16.1998Z" fill="#817567"/> |
| 252 |
</g> |
| 253 |
<defs> |
| 254 |
<clipPath id="clip0_1013_1606"> |
| 255 |
<rect width="24" height="24" /> |
| 256 |
</clipPath> |
| 257 |
</defs> |
| 258 |
</svg> |
| 259 |
`;Et` |
| 260 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 261 |
<g clip-path="url(#clip0_977_7900)"> |
| 262 |
<path fill-rule="evenodd" clip-rule="evenodd" d="M19 13H5C4.45 13 4 12.55 4 12C4 11.45 4.45 11 5 11H19C19.55 11 20 11.45 20 12C20 12.55 19.55 13 19 13Z"/> |
| 263 |
</g> |
| 264 |
<defs> |
| 265 |
<clipPath id="clip0_977_7900"> |
| 266 |
<rect width="24" height="24"/> |
| 267 |
</clipPath> |
| 268 |
</defs> |
| 269 |
</svg> |
| 270 |
`;Et` |
| 271 |
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"> |
| 272 |
<path d="M3.5 9.83366C3.35833 9.83366 3.23961 9.78571 3.14383 9.68983C3.04794 9.59394 3 9.47516 3 9.33349C3 9.19171 3.04794 9.07299 3.14383 8.97733C3.23961 8.88155 3.35833 8.83366 3.5 8.83366H12.5C12.6417 8.83366 12.7604 8.8816 12.8562 8.97749C12.9521 9.07338 13 9.19216 13 9.33383C13 9.4756 12.9521 9.59433 12.8562 9.68999C12.7604 9.78577 12.6417 9.83366 12.5 9.83366H3.5ZM3.5 7.16699C3.35833 7.16699 3.23961 7.11905 3.14383 7.02316C3.04794 6.92727 3 6.80849 3 6.66683C3 6.52505 3.04794 6.40633 3.14383 6.31066C3.23961 6.21488 3.35833 6.16699 3.5 6.16699H12.5C12.6417 6.16699 12.7604 6.21494 12.8562 6.31083C12.9521 6.40671 13 6.52549 13 6.66716C13 6.80894 12.9521 6.92766 12.8562 7.02333C12.7604 7.1191 12.6417 7.16699 12.5 7.16699H3.5Z"/> |
| 273 |
</svg> |
| 274 |
`;const pFe=Et` |
| 275 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 276 |
<g clip-path="url(#clip0_1013_1585)"> |
| 277 |
<path d="M14.06 9.02L14.98 9.94L5.92 19H5V18.08L14.06 9.02ZM17.66 3C17.41 3 17.15 3.1 16.96 3.29L15.13 5.12L18.88 8.87L20.71 7.04C21.1 6.65 21.1 6.02 20.71 5.63L18.37 3.29C18.17 3.09 17.92 3 17.66 3ZM14.06 6.19L3 17.25V21H6.75L17.81 9.94L14.06 6.19Z"/> |
| 278 |
</g> |
| 279 |
<defs> |
| 280 |
<clipPath id="clip0_1013_1585"> |
| 281 |
<rect width="24" height="24"/> |
| 282 |
</clipPath> |
| 283 |
</defs> |
| 284 |
</svg> |
| 285 |
`;Et` |
| 286 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 287 |
<g clip-path="url(#clip0_992_5553)"> |
| 288 |
<path d="M19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM19 19H5V5H19V19ZM12 17H14V7H10V9H12V17Z"/> |
| 289 |
</g> |
| 290 |
<defs> |
| 291 |
<clipPath id="clip0_992_5553"> |
| 292 |
<rect width="24" height="24"/> |
| 293 |
</clipPath> |
| 294 |
</defs> |
| 295 |
</svg> |
| 296 |
`;const hFe=Et` |
| 297 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 298 |
<g clip-path="url(#clip0_992_5559)"> |
| 299 |
<path d="M19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM19 19H5V5H19V19ZM15 15H11V13H13C14.1 13 15 12.11 15 11V9C15 7.89 14.1 7 13 7H9V9H13V11H11C9.9 11 9 11.89 9 13V17H15V15Z"/> |
| 300 |
</g> |
| 301 |
<defs> |
| 302 |
<clipPath id="clip0_992_5559"> |
| 303 |
<rect width="24" height="24"/> |
| 304 |
</clipPath> |
| 305 |
</defs> |
| 306 |
</svg> |
| 307 |
`,mFe=Et` |
| 308 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 309 |
<g clip-path="url(#clip0_992_5565)"> |
| 310 |
<path d="M19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM19 19H5V5H19V19ZM15 15V13.5C15 12.67 14.33 12 13.5 12C14.33 12 15 11.33 15 10.5V9C15 7.89 14.1 7 13 7H9V9H13V11H11V13H13V15H9V17H13C14.1 17 15 16.11 15 15Z"/> |
| 311 |
</g> |
| 312 |
<defs> |
| 313 |
<clipPath id="clip0_992_5565"> |
| 314 |
<rect width="24" height="24"/> |
| 315 |
</clipPath> |
| 316 |
</defs> |
| 317 |
</svg> |
| 318 |
`,gFe=Et` |
| 319 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 320 |
<g clip-path="url(#clip0_977_7757)"> |
| 321 |
<path d="M19.04 3H5.04004C3.94004 3 3.04004 3.9 3.04004 5V19C3.04004 20.1 3.94004 21 5.04004 21H19.04C20.14 21 21.04 20.1 21.04 19V5C21.04 3.9 20.14 3 19.04 3ZM19.04 19H5.04004V5H19.04V19ZM13.04 17H15.04V7H13.04V11H11.04V7H9.04004V13H13.04V17Z"/> |
| 322 |
</g> |
| 323 |
<defs> |
| 324 |
<clipPath id="clip0_977_7757"> |
| 325 |
<rect width="24" height="24"/> |
| 326 |
</clipPath> |
| 327 |
</defs> |
| 328 |
</svg> |
| 329 |
`;Et` |
| 330 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 331 |
<g clip-path="url(#clip0_977_7760)"> |
| 332 |
<path d="M19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM19 19H5V5H19V19ZM15 15V13C15 11.89 14.1 11 13 11H11V9H15V7H9V13H13V15H9V17H13C14.1 17 15 16.11 15 15Z"/> |
| 333 |
</g> |
| 334 |
<defs> |
| 335 |
<clipPath id="clip0_977_7760"> |
| 336 |
<rect width="24" height="24"/> |
| 337 |
</clipPath> |
| 338 |
</defs> |
| 339 |
</svg> |
| 340 |
`;Et` |
| 341 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 342 |
<g clip-path="url(#clip0_977_7763)"> |
| 343 |
<path d="M11 17H13C14.1 17 15 16.11 15 15V13C15 11.89 14.1 11 13 11H11V9H15V7H11C9.9 7 9 7.89 9 9V15C9 16.11 9.9 17 11 17ZM11 13H13V15H11V13ZM19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM19 19H5V5H19V19Z"/> |
| 344 |
</g> |
| 345 |
<defs> |
| 346 |
<clipPath id="clip0_977_7763"> |
| 347 |
<rect width="24" height="24"/> |
| 348 |
</clipPath> |
| 349 |
</defs> |
| 350 |
</svg> |
| 351 |
`;Et` |
| 352 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 353 |
<g clip-path="url(#clip0_977_8075)"> |
| 354 |
<path d="M19 5V19H5V5H19ZM19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM14.14 11.86L11.14 15.73L9 13.14L6 17H18L14.14 11.86Z"/> |
| 355 |
</g> |
| 356 |
<defs> |
| 357 |
<clipPath id="clip0_977_8075"> |
| 358 |
<rect width="24" height="24"/> |
| 359 |
</clipPath> |
| 360 |
</defs> |
| 361 |
</svg> |
| 362 |
`;const vFe=Et` |
| 363 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 364 |
<path d="M6.29811 18.625C6.04505 18.625 5.83115 18.5375 5.65641 18.3626C5.48166 18.1877 5.39429 17.9736 5.39429 17.7203C5.39429 17.467 5.48166 17.2532 5.65641 17.0788C5.83115 16.9045 6.04505 16.8173 6.29811 16.8173H9.21159L12.452 7.18265H9.53851C9.28545 7.18265 9.07155 7.0952 8.89681 6.9203C8.72206 6.7454 8.63469 6.5313 8.63469 6.278C8.63469 6.02472 8.72206 5.81089 8.89681 5.63652C9.07155 5.46217 9.28545 5.375 9.53851 5.375H16.8847C17.1377 5.375 17.3516 5.46245 17.5264 5.63735C17.7011 5.81225 17.7885 6.02634 17.7885 6.27962C17.7885 6.53293 17.7011 6.74676 17.5264 6.92113C17.3516 7.09548 17.1377 7.18265 16.8847 7.18265H14.2789L11.0385 16.8173H13.6443C13.8973 16.8173 14.1112 16.9048 14.286 17.0797C14.4607 17.2546 14.5481 17.4687 14.5481 17.722C14.5481 17.9752 14.4607 18.1891 14.286 18.3634C14.1112 18.5378 13.8973 18.625 13.6443 18.625H6.29811Z"/> |
| 365 |
</svg> |
| 366 |
`,tR=Et` |
| 367 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 368 |
<path d="M17.0385 19.5003V16.5388H14.0769V15.0388H17.0385V12.0773H18.5384V15.0388H21.5V16.5388H18.5384V19.5003H17.0385ZM10.8077 16.5388H7.03845C5.78282 16.5388 4.7125 16.0963 3.8275 15.2114C2.9425 14.3266 2.5 13.2564 2.5 12.0009C2.5 10.7454 2.9425 9.67504 3.8275 8.78979C4.7125 7.90454 5.78282 7.46191 7.03845 7.46191H10.8077V8.96186H7.03845C6.1987 8.96186 5.48235 9.25834 4.8894 9.85129C4.29645 10.4442 3.99998 11.1606 3.99998 12.0003C3.99998 12.8401 4.29645 13.5564 4.8894 14.1494C5.48235 14.7423 6.1987 15.0388 7.03845 15.0388H10.8077V16.5388ZM8.25 12.7503V11.2504H15.75V12.7503H8.25ZM21.5 12.0003H20C20 11.1606 19.7035 10.4442 19.1106 9.85129C18.5176 9.25834 17.8013 8.96186 16.9615 8.96186H13.1923V7.46191H16.9615C18.2171 7.46191 19.2875 7.90441 20.1725 8.78939C21.0575 9.67439 21.5 10.7447 21.5 12.0003Z"/> |
| 369 |
</svg> |
| 370 |
`;Et` |
| 371 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 372 |
<g clip-path="url(#clip0_971_7680)"> |
| 373 |
<path d="M11 18C11 19.1 10.1 20 9 20C7.9 20 7 19.1 7 18C7 16.9 7.9 16 9 16C10.1 16 11 16.9 11 18ZM9 10C7.9 10 7 10.9 7 12C7 13.1 7.9 14 9 14C10.1 14 11 13.1 11 12C11 10.9 10.1 10 9 10ZM9 4C7.9 4 7 4.9 7 6C7 7.1 7.9 8 9 8C10.1 8 11 7.1 11 6C11 4.9 10.1 4 9 4ZM15 8C16.1 8 17 7.1 17 6C17 4.9 16.1 4 15 4C13.9 4 13 4.9 13 6C13 7.1 13.9 8 15 8ZM15 10C13.9 10 13 10.9 13 12C13 13.1 13.9 14 15 14C16.1 14 17 13.1 17 12C17 10.9 16.1 10 15 10ZM15 16C13.9 16 13 16.9 13 18C13 19.1 13.9 20 15 20C16.1 20 17 19.1 17 18C17 16.9 16.1 16 15 16Z" /> |
| 374 |
</g> |
| 375 |
<defs> |
| 376 |
<clipPath id="clip0_971_7680"> |
| 377 |
<rect width="24" height="24"/> |
| 378 |
</clipPath> |
| 379 |
</defs> |
| 380 |
</svg> |
| 381 |
`;const yFe=Et` |
| 382 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 383 |
<g clip-path="url(#clip0_977_8067)"> |
| 384 |
<path d="M8 7H20C20.55 7 21 6.55 21 6C21 5.45 20.55 5 20 5H8C7.45 5 7 5.45 7 6C7 6.55 7.45 7 8 7ZM20 17H8C7.45 17 7 17.45 7 18C7 18.55 7.45 19 8 19H20C20.55 19 21 18.55 21 18C21 17.45 20.55 17 20 17ZM20 11H8C7.45 11 7 11.45 7 12C7 12.55 7.45 13 8 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11ZM4.5 16H2.5C2.22 16 2 16.22 2 16.5C2 16.78 2.22 17 2.5 17H4V17.5H3.5C3.22 17.5 3 17.72 3 18C3 18.28 3.22 18.5 3.5 18.5H4V19H2.5C2.22 19 2 19.22 2 19.5C2 19.78 2.22 20 2.5 20H4.5C4.78 20 5 19.78 5 19.5V16.5C5 16.22 4.78 16 4.5 16ZM2.5 5H3V7.5C3 7.78 3.22 8 3.5 8C3.78 8 4 7.78 4 7.5V4.5C4 4.22 3.78 4 3.5 4H2.5C2.22 4 2 4.22 2 4.5C2 4.78 2.22 5 2.5 5ZM4.5 10H2.5C2.22 10 2 10.22 2 10.5C2 10.78 2.22 11 2.5 11H3.8L2.12 12.96C2.04 13.05 2 13.17 2 13.28V13.5C2 13.78 2.22 14 2.5 14H4.5C4.78 14 5 13.78 5 13.5C5 13.22 4.78 13 4.5 13H3.2L4.88 11.04C4.96 10.95 5 10.83 5 10.72V10.5C5 10.22 4.78 10 4.5 10Z"/> |
| 385 |
</g> |
| 386 |
<defs> |
| 387 |
<clipPath id="clip0_977_8067"> |
| 388 |
<rect width="24" height="24"/> |
| 389 |
</clipPath> |
| 390 |
</defs> |
| 391 |
</svg> |
| 392 |
`;Et` |
| 393 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 394 |
<g clip-path="url(#clip0_971_7676)"> |
| 395 |
<path d="M18 13H13V18C13 18.55 12.55 19 12 19C11.45 19 11 18.55 11 18V13H6C5.45 13 5 12.55 5 12C5 11.45 5.45 11 6 11H11V6C11 5.45 11.45 5 12 5C12.55 5 13 5.45 13 6V11H18C18.55 11 19 11.45 19 12C19 12.55 18.55 13 18 13Z"/> |
| 396 |
</g> |
| 397 |
<defs> |
| 398 |
<clipPath id="clip0_971_7676"> |
| 399 |
<rect width="24" height="24"/> |
| 400 |
</clipPath> |
| 401 |
</defs> |
| 402 |
</svg> |
| 403 |
`;const _Fe=Et` |
| 404 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 405 |
<g clip-path="url(#clip0_977_7897)"> |
| 406 |
<path d="M7.17 17C7.68 17 8.15 16.71 8.37 16.26L9.79 13.42C9.93 13.14 10 12.84 10 12.53V8C10 7.45 9.55 7 9 7H5C4.45 7 4 7.45 4 8V12C4 12.55 4.45 13 5 13H7L5.97 15.06C5.52 15.95 6.17 17 7.17 17ZM17.17 17C17.68 17 18.15 16.71 18.37 16.26L19.79 13.42C19.93 13.14 20 12.84 20 12.53V8C20 7.45 19.55 7 19 7H15C14.45 7 14 7.45 14 8V12C14 12.55 14.45 13 15 13H17L15.97 15.06C15.52 15.95 16.17 17 17.17 17Z"/> |
| 407 |
</g> |
| 408 |
<defs> |
| 409 |
<clipPath id="clip0_977_7897"> |
| 410 |
<rect width="24" height="24"/> |
| 411 |
</clipPath> |
| 412 |
</defs> |
| 413 |
</svg> |
| 414 |
`,bFe=Et` |
| 415 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 416 |
<path d="M7.30775 20.4997C6.81058 20.4997 6.385 20.3227 6.031 19.9687C5.677 19.6147 5.5 19.1892 5.5 18.692V5.99973H5.25C5.0375 5.99973 4.85942 5.92782 4.71575 5.78398C4.57192 5.64015 4.5 5.46198 4.5 5.24948C4.5 5.03682 4.57192 4.85873 4.71575 4.71523C4.85942 4.57157 5.0375 4.49973 5.25 4.49973H9C9 4.2549 9.08625 4.04624 9.25875 3.87374C9.43108 3.7014 9.63967 3.61523 9.8845 3.61523H14.1155C14.3603 3.61523 14.5689 3.7014 14.7413 3.87374C14.9138 4.04624 15 4.2549 15 4.49973H18.75C18.9625 4.49973 19.1406 4.57165 19.2843 4.71548C19.4281 4.85932 19.5 5.03748 19.5 5.24998C19.5 5.46265 19.4281 5.64073 19.2843 5.78423C19.1406 5.9279 18.9625 5.99973 18.75 5.99973H18.5V18.692C18.5 19.1892 18.323 19.6147 17.969 19.9687C17.615 20.3227 17.1894 20.4997 16.6923 20.4997H7.30775ZM17 5.99973H7V18.692C7 18.7818 7.02883 18.8556 7.0865 18.9132C7.14417 18.9709 7.21792 18.9997 7.30775 18.9997H16.6923C16.7821 18.9997 16.8558 18.9709 16.9135 18.9132C16.9712 18.8556 17 18.7818 17 18.692V5.99973ZM10.1543 16.9997C10.3668 16.9997 10.5448 16.9279 10.6885 16.7842C10.832 16.6404 10.9037 16.4622 10.9037 16.2497V8.74973C10.9037 8.53723 10.8318 8.35907 10.688 8.21523C10.5443 8.07157 10.3662 7.99973 10.1535 7.99973C9.941 7.99973 9.76292 8.07157 9.61925 8.21523C9.47575 8.35907 9.404 8.53723 9.404 8.74973V16.2497C9.404 16.4622 9.47583 16.6404 9.6195 16.7842C9.76333 16.9279 9.94158 16.9997 10.1543 16.9997ZM13.8465 16.9997C14.059 16.9997 14.2371 16.9279 14.3807 16.7842C14.5243 16.6404 14.596 16.4622 14.596 16.2497V8.74973C14.596 8.53723 14.5242 8.35907 14.3805 8.21523C14.2367 8.07157 14.0584 7.99973 13.8458 7.99973C13.6333 7.99973 13.4552 8.07157 13.3115 8.21523C13.168 8.35907 13.0962 8.53723 13.0962 8.74973V16.2497C13.0962 16.4622 13.1682 16.6404 13.312 16.7842C13.4557 16.9279 13.6338 16.9997 13.8465 16.9997Z"/> |
| 417 |
</svg> |
| 418 |
`;Et` |
| 419 |
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6"> |
| 420 |
<path stroke-linecap="round" stroke-linejoin="round" d="M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z" /> |
| 421 |
</svg> |
| 422 |
`;const wFe=Et` |
| 423 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 424 |
<path d="M3.25 13.7404C3.0375 13.7404 2.85938 13.6684 2.71563 13.5246C2.57188 13.3808 2.5 13.2026 2.5 12.99C2.5 12.7774 2.57188 12.5993 2.71563 12.4558C2.85938 12.3122 3.0375 12.2404 3.25 12.2404H20.75C20.9625 12.2404 21.1406 12.3123 21.2843 12.4561C21.4281 12.5999 21.5 12.7781 21.5 12.9907C21.5 13.2033 21.4281 13.3814 21.2843 13.525C21.1406 13.6686 20.9625 13.7404 20.75 13.7404H3.25ZM10.9423 10.2596V6.62495H6.5673C6.2735 6.62495 6.02377 6.52201 5.8181 6.31613C5.61245 6.11026 5.50963 5.86027 5.50963 5.56615C5.50963 5.27205 5.61245 5.02083 5.8181 4.8125C6.02377 4.60417 6.2735 4.5 6.5673 4.5H17.4423C17.7361 4.5 17.9858 4.60294 18.1915 4.80883C18.3971 5.01471 18.5 5.2647 18.5 5.5588C18.5 5.85292 18.3971 6.10413 18.1915 6.31245C17.9858 6.52078 17.7361 6.62495 17.4423 6.62495H13.0673V10.2596H10.9423ZM10.9423 15.7211H13.0673V18.4423C13.0673 18.7361 12.9643 18.9858 12.7584 19.1915C12.5526 19.3971 12.3026 19.5 12.0085 19.5C11.7144 19.5 11.4631 19.3962 11.2548 19.1887C11.0465 18.9811 10.9423 18.7291 10.9423 18.4327V15.7211Z"/> |
| 425 |
</svg> |
| 426 |
`;Et` |
| 427 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 428 |
<g clip-path="url(#clip0_977_8078)"> |
| 429 |
<path d="M20 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H20C21.1 21 22 20.1 22 19V5C22 3.9 21.1 3 20 3ZM20 5V8H5V5H20ZM15 19H10V10H15V19ZM5 10H8V19H5V10ZM17 19V10H20V19H17Z"/> |
| 430 |
</g> |
| 431 |
<defs> |
| 432 |
<clipPath id="clip0_977_8078"> |
| 433 |
<rect width="24" height="24"/> |
| 434 |
</clipPath> |
| 435 |
</defs> |
| 436 |
</svg> |
| 437 |
`;const CFe=Et` |
| 438 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 439 |
<g clip-path="url(#clip0_992_5547)"> |
| 440 |
<path d="M5 5.5C5 6.33 5.67 7 6.5 7H10.5V17.5C10.5 18.33 11.17 19 12 19C12.83 19 13.5 18.33 13.5 17.5V7H17.5C18.33 7 19 6.33 19 5.5C19 4.67 18.33 4 17.5 4H6.5C5.67 4 5 4.67 5 5.5Z"/> |
| 441 |
</g> |
| 442 |
<defs> |
| 443 |
<clipPath id="clip0_992_5547"> |
| 444 |
<rect width="24" height="24"/> |
| 445 |
</clipPath> |
| 446 |
</defs> |
| 447 |
</svg> |
| 448 |
`;Et` |
| 449 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 450 |
<path d="M5.66936 16.3389L9.39244 12.6158C9.54115 12.4671 9.71679 12.3937 9.91936 12.3957C10.1219 12.3976 10.2975 12.4761 10.4463 12.6312C10.5847 12.7823 10.654 12.9585 10.654 13.1599C10.654 13.3613 10.5847 13.5363 10.4463 13.6851L6.32704 17.8197C6.14627 18.0004 5.93538 18.0908 5.69436 18.0908C5.45333 18.0908 5.24243 18.0004 5.06166 17.8197L3.01744 15.7754C2.87899 15.637 2.81136 15.4629 2.81456 15.2533C2.81776 15.0437 2.88859 14.8697 3.02706 14.7312C3.16551 14.5928 3.34008 14.5235 3.55076 14.5235C3.76144 14.5235 3.93494 14.5928 4.07126 14.7312L5.66936 16.3389ZM5.66936 8.72359L9.39244 5.00049C9.54115 4.85177 9.71679 4.77838 9.91936 4.78031C10.1219 4.78223 10.2975 4.86075 10.4463 5.01586C10.5847 5.16691 10.654 5.34314 10.654 5.54454C10.654 5.74592 10.5847 5.92097 10.4463 6.06969L6.32704 10.2043C6.14627 10.3851 5.93538 10.4755 5.69436 10.4755C5.45333 10.4755 5.24243 10.3851 5.06166 10.2043L3.01744 8.16009C2.87899 8.02162 2.81136 7.84759 2.81456 7.63799C2.81776 7.42837 2.88859 7.25433 3.02706 7.11586C3.16551 6.97741 3.34008 6.90819 3.55076 6.90819C3.76144 6.90819 3.93494 6.97741 4.07126 7.11586L5.66936 8.72359ZM13.7597 16.5581C13.5472 16.5581 13.3691 16.4862 13.2253 16.3424C13.0816 16.1986 13.0097 16.0204 13.0097 15.8078C13.0097 15.5952 13.0816 15.4171 13.2253 15.2735C13.3691 15.13 13.5472 15.0582 13.7597 15.0582H20.7597C20.9722 15.0582 21.1503 15.1301 21.2941 15.2739C21.4378 15.4177 21.5097 15.5959 21.5097 15.8085C21.5097 16.0211 21.4378 16.1992 21.2941 16.3427C21.1503 16.4863 20.9722 16.5581 20.7597 16.5581H13.7597ZM13.7597 8.94276C13.5472 8.94276 13.3691 8.87085 13.2253 8.72704C13.0816 8.58324 13.0097 8.40504 13.0097 8.19244C13.0097 7.97985 13.0816 7.80177 13.2253 7.65819C13.3691 7.5146 13.5472 7.44281 13.7597 7.44281H20.7597C20.9722 7.44281 21.1503 7.51471 21.2941 7.65851C21.4378 7.80233 21.5097 7.98053 21.5097 8.19311C21.5097 8.40571 21.4378 8.5838 21.2941 8.72739C21.1503 8.87097 20.9722 8.94276 20.7597 8.94276H13.7597Z"/> |
| 451 |
</svg> |
| 452 |
`;const kFe=(e,t)=>{e.config(aFe).config(n=>{n.update(Lv.key,o=>({...o,linkIcon:(t==null?void 0:t.linkIcon)??(()=>tR),editButton:(t==null?void 0:t.editButton)??(()=>pFe),removeButton:(t==null?void 0:t.removeButton)??(()=>bFe),confirmButton:(t==null?void 0:t.confirmButton)??(()=>fFe),inputPlaceholder:(t==null?void 0:t.inputPlaceholder)??"Paste link...",onCopyLink:(t==null?void 0:t.onCopyLink)??(()=>{})}))}).use(uFe)},SFe=Object.freeze(Object.defineProperty({__proto__:null,defineFeature:kFe},Symbol.toStringTag,{value:"Module"}));var nR="Expected a function",w$=0/0,$Fe="[object Symbol]",EFe=/^\s+|\s+$/g,xFe=/^[-+]0x[0-9a-f]+$/i,TFe=/^0b[01]+$/i,MFe=/^0o[0-7]+$/i,OFe=parseInt,IFe=typeof Nn=="object"&&Nn&&Nn.Object===Object&&Nn,AFe=typeof self=="object"&&self&&self.Object===Object&&self,NFe=IFe||AFe||Function("return this")(),PFe=Object.prototype,LFe=PFe.toString,RFe=Math.max,DFe=Math.min,f_=function(){return NFe.Date.now()};function VFe(e,t,n){var o,r,s,i,l,a,u=0,c=!1,d=!1,f=!0;if(typeof e!="function")throw new TypeError(nR);t=C$(t)||0,c0(n)&&(c=!!n.leading,d="maxWait"in n,s=d?RFe(C$(n.maxWait)||0,t):s,f="trailing"in n?!!n.trailing:f);function p(E){var M=o,N=r;return o=r=void 0,u=E,i=e.apply(N,M),i}function h(E){return u=E,l=setTimeout(v,t),c?p(E):i}function m(E){var M=E-a,N=E-u,P=t-M;return d?DFe(P,s-N):P}function y(E){var M=E-a,N=E-u;return a===void 0||M>=t||M<0||d&&N>=s}function v(){var E=f_();if(y(E))return k(E);l=setTimeout(v,m(E))}function k(E){return l=void 0,f&&o?p(E):(o=r=void 0,i)}function b(){l!==void 0&&clearTimeout(l),u=0,o=a=r=l=void 0}function $(){return l===void 0?i:k(f_())}function x(){var E=f_(),M=y(E);if(o=arguments,r=this,a=E,M){if(l===void 0)return h(a);if(d)return l=setTimeout(v,t),p(a)}return l===void 0&&(l=setTimeout(v,t)),i}return x.cancel=b,x.flush=$,x}function FFe(e,t,n){var o=!0,r=!0;if(typeof e!="function")throw new TypeError(nR);return c0(n)&&(o="leading"in n?!!n.leading:o,r="trailing"in n?!!n.trailing:r),VFe(e,t,{leading:o,maxWait:t,trailing:r})}function c0(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function BFe(e){return!!e&&typeof e=="object"}function zFe(e){return typeof e=="symbol"||BFe(e)&&LFe.call(e)==$Fe}function C$(e){if(typeof e=="number")return e;if(zFe(e))return w$;if(c0(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=c0(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(EFe,"");var n=TFe.test(e);return n||MFe.test(e)?OFe(e.slice(2),n?2:8):xFe.test(e)?w$:+e}var jFe=FFe;const HFe=_o(jFe);var oR=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Ht=(e,t,n)=>(oR(e,t,"read from private field"),n?n.call(e):t.get(e)),co=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},sn=(e,t,n,o)=>(oR(e,t,"write to private field"),o?o.call(e,n):t.set(e,n),n);function Dv(e,t){return Object.assign(e,{meta:{package:"@milkdown/plugin-block",...t}}),e}const UFe=e=>!mC(t=>t.type.name==="table")(e),Kh=Pn({filterNodes:UFe},"blockConfig");Dv(Kh,{displayName:"Ctx<blockConfig>"});function WFe(e,t,n){var o;if(!e.dom.parentElement)return null;const r=(o=e.posAtCoords({left:t.x,top:t.y}))==null?void 0:o.inside;if(r==null||r<0)return null;let s=e.state.doc.resolve(r),i=e.state.doc.nodeAt(r),l=e.nodeDOM(r);const a=c=>{const d=s.depth>=1&&s.index(s.depth)===0;if(!(c||d))return;const f=s.before(s.depth);i=e.state.doc.nodeAt(f),l=e.nodeDOM(f),s=e.state.doc.resolve(f),n(s,i)||a(!0)},u=n(s,i);return a(!u),!l||!i?null:{node:i,$pos:s,el:l}}let k$=null;function KFe(){return k$||(k$=document.implementation.createHTMLDocument("title"))}const qFe={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};function GFe(e,t){const n=[];let{openStart:o,openEnd:r,content:s}=t;for(;o>1&&r>1&&s.childCount===1&&s.firstChild.childCount===1;){o-=1,r-=1;const p=s.firstChild;n.push(p.type.name,p.attrs!==p.type.defaultAttrs?p.attrs:null),s=p.content}const i=e.someProp("clipboardSerializer")||ra.fromSchema(e.state.schema),l=KFe(),a=l.createElement("div");a.appendChild(i.serializeFragment(s,{document:l}));let u=a.firstChild,c,d=0;for(;u&&u.nodeType===1&&(c=qFe[u.nodeName.toLowerCase()]);){for(let p=c.length-1;p>=0;p--){const h=l.createElement(c[p]);for(;a.firstChild;)h.appendChild(a.firstChild);a.appendChild(h),d++}u=a.firstChild}u&&u.nodeType===1&&u.setAttribute("data-pm-slice",`${o} ${r}${d?` -${d}`:""} ${JSON.stringify(n)}`);const f=e.someProp("clipboardTextSerializer",p=>p(t,e))||t.content.textBetween(0,t.content.size,` |
| 453 |
|
| 454 |
`);return{dom:a,text:f}}const S$=xm.ie&&xm.ie_version<15||xm.ios&&xm.webkit_version<604,$$=20;var fp,Q1,uc,Rs,Mf,Ds,Z2,rR,cc,Of,dc,fc,eg,If,Af,Nf,tg,pc;class YFe{constructor(){co(this,Z2),co(this,cc),co(this,fp,void 0),co(this,Q1,void 0),co(this,uc,void 0),co(this,Rs,void 0),co(this,Mf,void 0),co(this,Ds,void 0),co(this,dc,void 0),co(this,fc,void 0),co(this,eg,void 0),co(this,If,void 0),co(this,Af,void 0),co(this,Nf,void 0),co(this,tg,void 0),co(this,pc,void 0),sn(this,Q1,()=>{if(!Ht(this,Rs))return null;const t=Ht(this,Rs),n=Ht(this,cc,Of);if(n&&mt.isSelectable(t.node)){const o=mt.create(n.state.doc,t.$pos.pos);return n.dispatch(n.state.tr.setSelection(o)),n.focus(),sn(this,uc,o),o}return null}),sn(this,uc,null),sn(this,Rs,null),sn(this,Mf,void 0),sn(this,Ds,!1),sn(this,fc,()=>{var t;(t=Ht(this,dc))==null||t.call(this,{type:"hide"}),sn(this,Rs,null)}),sn(this,eg,t=>{var n;sn(this,Rs,t),(n=Ht(this,dc))==null||n.call(this,{type:"show",active:t})}),this.bind=(t,n)=>{sn(this,fp,t),sn(this,dc,n)},this.addEvent=t=>{t.addEventListener("mousedown",Ht(this,If)),t.addEventListener("mouseup",Ht(this,Af)),t.addEventListener("dragstart",Ht(this,Nf))},this.removeEvent=t=>{t.removeEventListener("mousedown",Ht(this,If)),t.removeEventListener("mouseup",Ht(this,Af)),t.removeEventListener("dragstart",Ht(this,Nf))},this.unBind=()=>{sn(this,dc,void 0)},sn(this,If,()=>{var t;sn(this,Mf,(t=Ht(this,Rs))==null?void 0:t.el.getBoundingClientRect()),Ht(this,Q1).call(this)}),sn(this,Af,()=>{if(!Ht(this,Ds)){requestAnimationFrame(()=>{var t;Ht(this,Mf)&&((t=Ht(this,cc,Of))==null||t.focus())});return}sn(this,Ds,!1),sn(this,uc,null)}),sn(this,Nf,t=>{var n;sn(this,Ds,!0);const o=Ht(this,cc,Of);if(!o)return;o.dom.dataset.dragging="true";const r=Ht(this,uc);if(t.dataTransfer&&r){const s=r.content();t.dataTransfer.effectAllowed="copyMove";const{dom:i,text:l}=GFe(o,s);t.dataTransfer.clearData(),t.dataTransfer.setData(S$?"Text":"text/html",i.innerHTML),S$||t.dataTransfer.setData("text/plain",l);const a=(n=Ht(this,Rs))==null?void 0:n.el;a&&t.dataTransfer.setDragImage(a,0,0),o.dragging={slice:s,move:!0}}}),this.keydownCallback=t=>(Ht(this,fc).call(this),sn(this,Ds,!1),t.dom.dataset.dragging="false",!1),sn(this,tg,HFe((t,n)=>{if(!t.editable)return;const o=t.dom.getBoundingClientRect(),r=o.left+o.width/2;if(!(t.root.elementFromPoint(r,n.clientY)instanceof Element)){Ht(this,fc).call(this);return}const s=Ht(this,Z2,rR);if(!s)return;const i=WFe(t,{x:r,y:n.clientY},s);if(!i){Ht(this,fc).call(this);return}Ht(this,eg).call(this,i)},200)),this.mousemoveCallback=(t,n)=>(t.composing||!t.editable||Ht(this,tg).call(this,t,n),!1),this.dragoverCallback=(t,n)=>{var o;if(Ht(this,Ds)){const r=(o=Ht(this,cc,Of))==null?void 0:o.dom.parentElement;if(!r)return!1;const s=r.scrollHeight>r.clientHeight,i=r.getBoundingClientRect();if(s){if(r.scrollTop>0&&Math.abs(n.y-i.y)<$$){const a=r.scrollTop>10?r.scrollTop-10:0;return r.scrollTop=a,!1}const l=Math.round(t.dom.getBoundingClientRect().height);if(Math.round(r.scrollTop+i.height)<l&&Math.abs(n.y-(i.height+i.y))<$$){const a=r.scrollTop+10;return r.scrollTop=a,!1}}}return!1},this.dragenterCallback=t=>{t.dragging&&(sn(this,Ds,!0),t.dom.dataset.dragging="true")},this.dragleaveCallback=(t,n)=>{const o=n.clientX,r=n.clientY;(o<0||r<0||o>window.innerWidth||r>window.innerHeight)&&(sn(this,Rs,null),Ht(this,pc).call(this,t))},this.dropCallback=t=>(Ht(this,pc).call(this,t),!1),this.dragendCallback=t=>{Ht(this,pc).call(this,t)},sn(this,pc,t=>{sn(this,Ds,!1),t.dom.dataset.dragging="false"})}}fp=new WeakMap,Q1=new WeakMap,uc=new WeakMap,Rs=new WeakMap,Mf=new WeakMap,Ds=new WeakMap,Z2=new WeakSet,rR=function(){var e;return(e=Ht(this,fp))==null?void 0:e.get(Kh.key).filterNodes},cc=new WeakSet,Of=function(){var e;return(e=Ht(this,fp))==null?void 0:e.get(bn)},dc=new WeakMap,fc=new WeakMap,eg=new WeakMap,If=new WeakMap,Af=new WeakMap,Nf=new WeakMap,tg=new WeakMap,pc=new WeakMap;const sR=Pn(new YFe,"blockService");Dv(Kh,{displayName:"Ctx<blockService>"});const Gk=Pn({},"blockSpec");Dv(Kh,{displayName:"Ctx<blockSpec>"});const Yk=ao(e=>{const t=new wn("MILKDOWN_BLOCK"),n=e.get(sR.key),o=e.get(Gk.key);return new On({key:t,...o,props:{...o.props,handleDOMEvents:{drop:r=>n.dropCallback(r),pointermove:(r,s)=>n.mousemoveCallback(r,s),keydown:r=>n.keydownCallback(r),dragover:(r,s)=>n.dragoverCallback(r,s),dragleave:(r,s)=>n.dragleaveCallback(r,s),dragenter:r=>n.dragenterCallback(r),dragend:r=>n.dragendCallback(r)}}})});Dv(Yk,{displayName:"Prose<block>"});const Zk=[Gk,Kh,sR,Yk];Zk.key=Gk.key;Zk.pluginKey=Yk.key;var Jk=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},xl=(e,t,n)=>(Jk(e,t,"read from private field"),n?n.call(e):t.get(e)),va=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},ya=(e,t,n,o)=>(Jk(e,t,"write to private field"),o?o.call(e,n):t.set(e,n),n),ZFe=(e,t,n)=>(Jk(e,t,"access private method"),n);function JFe(e){const t=Pn({},`${e}_SLASH_SPEC`),n=ao(r=>{const s=r.get(t.key);return new On({key:new wn(`${e}_SLASH`),...s})}),o=[t,n];return o.key=t.key,o.pluginKey=n.key,t.meta={package:"@milkdown/plugin-slash",displayName:`Ctx<slashSpec>|${e}`},n.meta={package:"@milkdown/plugin-slash",displayName:`Prose<slash>|${e}`},o}var Pf,ng,hc,og,rg,sg,J2,iR;class XFe{constructor(t){va(this,J2),va(this,Pf,void 0),va(this,ng,void 0),va(this,hc,void 0),va(this,og,void 0),va(this,rg,void 0),va(this,sg,void 0),ya(this,Pf,!1),this.onShow=()=>{},this.onHide=()=>{},ya(this,sg,(n,o)=>{var r;const{state:s,composing:i}=n,{selection:l,doc:a}=s,{ranges:u}=l,c=Math.min(...u.map(p=>p.$from.pos)),d=Math.max(...u.map(p=>p.$to.pos)),f=o&&o.doc.eq(a)&&o.selection.eq(l);if(xl(this,Pf)||((r=n.dom.parentElement)==null||r.appendChild(this.element),ya(this,Pf,!0)),!(i||f)){if(!xl(this,og).call(this,n,o)){this.hide();return}lb({getBoundingClientRect:()=>pv(n,c,d)},this.element,{placement:"bottom-start",middleware:[ib(),rb(xl(this,rg))]}).then(({x:p,y:h})=>{Object.assign(this.element.style,{left:`${p}px`,top:`${h}px`})}),this.show()}}),this.update=(n,o)=>{Mv(xl(this,sg),xl(this,ng))(n,o)},this.getContent=(n,o=r=>r.type.name==="paragraph")=>{const{selection:r}=n.state,{empty:s,$from:i}=r,l=n.state.selection instanceof ht,a=this.element.contains(document.activeElement),u=!n.hasFocus()&&!a,c=!n.editable,d=!J0e(o)(n.state.selection);if(!(u||c||!s||!l||d))return i.parent.textBetween(Math.max(0,i.parentOffset-500),i.parentOffset,void 0,"")},this.destroy=()=>{},this.show=()=>{this.element.dataset.show="true",this.onShow()},this.hide=()=>{this.element.dataset.show="false",this.onHide()},this.element=t.content,ya(this,ng,t.debounce??200),ya(this,og,t.shouldShow??ZFe(this,J2,iR)),ya(this,hc,t.trigger??"/"),ya(this,rg,t.offset)}}Pf=new WeakMap,ng=new WeakMap,hc=new WeakMap,og=new WeakMap,rg=new WeakMap,sg=new WeakMap,J2=new WeakSet,iR=function(e){const t=this.getContent(e);if(!t)return!1;const n=t.at(-1);return n?Array.isArray(xl(this,hc))?xl(this,hc).includes(n):xl(this,hc)===n:!1};function lR(e){return e.$from.parent.type.name==="code_block"}function aR(e){var n;const t=(n=e.$from.node(e.$from.depth-1))==null?void 0:n.type;return(t==null?void 0:t.name)==="list_item"}function uR(e,t){customElements.get(e)==null&&customElements.define(e,t)}function Xk(e){const{$from:t,$to:n}=e.selection,{pos:o}=t,{pos:r}=n;return e=e.deleteRange(o-t.node().content.size,r),e}function QFe(e,t,n=null){const{from:o,to:r}=e.selection;return e.setBlockType(o,r,t,n)}function eBe(e,t,n=null){const{$from:o,$to:r}=e.selection,s=o.blockRange(r),i=s&&dC(s,t,n);return i?e.wrap(s,i):null}function tBe(e,t,n=null){const o=t.createAndFill(n);return o?e.replaceSelectionWith(o):null}function Fm(e,t=null){return(n,o)=>{if(o){const r=QFe(Xk(n.tr),e,t);o(r.scrollIntoView())}return!0}}function p_(e,t=null){return(n,o)=>{const r=eBe(Xk(n.tr),e,t);return r?(o&&o(r.scrollIntoView()),!0):!1}}function nBe(e,t=null){return(n,o)=>{const r=tBe(Xk(n.tr),e,t);return r?(o&&o(r.scrollIntoView()),!0):!1}}var Tl,Lc;class oBe{constructor(){Os(this,Tl,void 0);Os(this,Lc,void 0);Lo(this,Tl,[]),this.clear=()=>(Lo(this,Tl,[]),this),Lo(this,Lc,t=>{const n={group:t,addItem:(o,r)=>{const s={key:o,...r};return t.items.push(s),n},clear:()=>(t.items=[],n)};return n}),this.addGroup=(t,n)=>{const r={key:t,label:n,items:[]};return kt(this,Tl).push(r),kt(this,Lc).call(this,r)},this.getGroup=t=>{const n=kt(this,Tl).find(o=>o.key===t);if(!n)throw new Error(`Group with key ${t} not found`);return kt(this,Lc).call(this,n)},this.build=()=>kt(this,Tl)}}Tl=new WeakMap,Lc=new WeakMap;function As(e){return window.fluentComAdmin.i18n[e]||e}function rBe(e,t){var s,i,l,a,u,c,d,f,p;const n=new oBe;n.addGroup("text",(t==null?void 0:t.slashMenuTextGroupLabel)??As("Text")).addItem("text",{label:(t==null?void 0:t.slashMenuTextGroupLabel)??As("Text"),icon:((s=t==null?void 0:t.slashMenuTextIcon)==null?void 0:s.call(t))??CFe,onRun:h=>{const m=h.get(bn),{dispatch:y,state:v}=m;Fm(Hi.type(h))(v,y)}}).addItem("h2",{label:(t==null?void 0:t.slashMenuH2Label)??As("Heading 2"),icon:((i=t==null?void 0:t.slashMenuH2Icon)==null?void 0:i.call(t))??hFe,onRun:h=>{const m=h.get(bn),{dispatch:y,state:v}=m;Fm(Gs.type(h),{level:2})(v,y)}}).addItem("h3",{label:(t==null?void 0:t.slashMenuH3Label)??As("Heading 3"),icon:((l=t==null?void 0:t.slashMenuH3Icon)==null?void 0:l.call(t))??mFe,onRun:h=>{const m=h.get(bn),{dispatch:y,state:v}=m;Fm(Gs.type(h),{level:3})(v,y)}}).addItem("h4",{label:(t==null?void 0:t.slashMenuH4Label)??As("Heading 4"),icon:((a=t==null?void 0:t.slashMenuH4Icon)==null?void 0:a.call(t))??gFe,onRun:h=>{const m=h.get(bn),{dispatch:y,state:v}=m;Fm(Gs.type(h),{level:4})(v,y)}}).addItem("quote",{label:(t==null?void 0:t.slashMenuQuoteLabel)??As("Quote"),icon:((u=t==null?void 0:t.slashMenuQuoteIcon)==null?void 0:u.call(t))??_Fe,onRun:h=>{const m=h.get(bn),{dispatch:y,state:v}=m;p_(Nd.type(h))(v,y)}}).addItem("code",{label:(t==null?void 0:t.slashMenuCodeBlockLabel)??As("Code"),icon:((c=t==null?void 0:t.slashMenuCodeBlockIcon)==null?void 0:c.call(t))??eR,onRun:h=>{const m=h.get(bn),{dispatch:y,state:v}=m;nBe(Pd.type(h))(v,y)}}),n.addGroup("list",(t==null?void 0:t.slashMenuListGroupLabel)??As("List")).addItem("bullet-list",{label:(t==null?void 0:t.slashMenuBulletListLabel)??As("Bullet List"),icon:((d=t==null?void 0:t.slashMenuBulletListIcon)==null?void 0:d.call(t))??dFe,onRun:h=>{const m=h.get(bn),{dispatch:y,state:v}=m;p_(Tu.type(h))(v,y)}}).addItem("ordered-list",{label:(t==null?void 0:t.slashMenuOrderedListLabel)??As("Ordered List"),icon:((f=t==null?void 0:t.slashMenuOrderedListIcon)==null?void 0:f.call(t))??yFe,onRun:h=>{const m=h.get(bn),{dispatch:y,state:v}=m;p_(Mu.type(h))(v,y)}}),(p=t==null?void 0:t.buildMenu)==null||p.call(t,n);let o=n.build();e&&(o=o.map(h=>{const m=h.items.filter(y=>y.label.toLowerCase().includes(e.toLowerCase()));return{...h,items:m}}).filter(h=>h.items.length>0));const r=o.flatMap(h=>h.items);return r.forEach((h,m)=>{Object.assign(h,{index:m})}),o.reduce((h,m)=>{const y=h+m.items.length;return Object.assign(m,{range:[h,y]}),y},0),{groups:o,size:r.length}}const cR=({show:e,hide:t,ctx:n,filter:o,config:r})=>{const{groups:s,size:i}=H2(()=>rBe(o,r),[o]),l=EL(),[a,u]=NL(0),c=H2(()=>l.current.getRootNode(),[l]),d=Hk({x:-999,y:-999}),f=Vu(k=>{const b=d.current;if(!b)return;const{x:$,y:x}=k;b.x=$,b.y=x},[]);u0(()=>{i===0&&e&&(t==null||t())},[i,e]);const p=Vu((k,b)=>{u($=>{const x=typeof k=="function"?k($):k;return b==null||b(x),x})},[]),h=Vu(k=>{const b=l.current.querySelector(`[data-index="${k}"]`),$=l.current.querySelector(".menu-groups");!b||!$||($.scrollTop=b.offsetTop-$.offsetTop)},[]),m=Vu(k=>{const b=s.flatMap($=>$.items).at(k);b&&n&&b.onRun(n),t==null||t()},[s]),y=Vu(k=>{if(k.key==="Escape"){k.preventDefault(),t==null||t();return}if(k.key==="ArrowDown")return k.preventDefault(),p(b=>b<i-1?b+1:b,h);if(k.key==="ArrowUp")return k.preventDefault(),p(b=>b<=0?b:b-1,h);if(k.key==="ArrowLeft")return k.preventDefault(),p(b=>{const $=s.find(E=>E.range[0]<=b&&E.range[1]>b);if(!$)return b;const x=s[s.indexOf($)-1];return x?x.range[1]-1:b},h);if(k.key==="ArrowRight")return k.preventDefault(),p(b=>{const $=s.find(E=>E.range[0]<=b&&E.range[1]>b);if(!$)return b;const x=s[s.indexOf($)+1];return x?x.range[0]:b},h);k.key==="Enter"&&(k.preventDefault(),m(a))},[t,s,a]),v=Vu(k=>b=>{const $=d.current;if(!$)return;const{x,y:E}=b;x===$.x&&E===$.y||p(k)},[]);return u0(()=>(e?c.addEventListener("keydown",y,{capture:!0}):c.removeEventListener("keydown",y,{capture:!0}),()=>{c.removeEventListener("keydown",y,{capture:!0})}),[e,y]),Et` |
| 455 |
<host onmousedown=${k=>k.preventDefault()}> |
| 456 |
<div class="menu-groups" onmousemove=${f}> |
| 457 |
${s.map(k=>Et` |
| 458 |
<div key=${k.key} class="menu-group"> |
| 459 |
<ul> |
| 460 |
${k.items.map(b=>Et`<li |
| 461 |
key=${b.key} |
| 462 |
data-index=${b.index} |
| 463 |
class=${a===b.index?"hover":""} |
| 464 |
onmouseenter=${v(b.index)} |
| 465 |
onmousedown=${()=>{var $;($=l.current.querySelector(`[data-index="${b.index}"]`))==null||$.classList.add("active")}} |
| 466 |
onmouseup=${()=>{var $;($=l.current.querySelector(`[data-index="${b.index}"]`))==null||$.classList.remove("active"),m(b.index)}} |
| 467 |
> |
| 468 |
${b.icon} |
| 469 |
<span>${b.label}</span> |
| 470 |
</li>`)} |
| 471 |
</ul> |
| 472 |
</div> |
| 473 |
`)} |
| 474 |
</div> |
| 475 |
</host> |
| 476 |
`};cR.props={ctx:Object,config:Object,show:Boolean,filter:String,hide:Function};const dR=Uh(cR),fR=JFe("CREPE_MENU"),pR=Pn({show:()=>{},hide:()=>{}},"menuAPICtx");uR("milkdown-slash-menu",dR);function sBe(e,t){e.set(fR.key,{view:n=>new iBe(e,n,t)})}var sr,zs,Ml;class iBe{constructor(t,n,o){Os(this,sr,void 0);Os(this,zs,void 0);Os(this,Ml,void 0);Lo(this,Ml,null),this.update=s=>{kt(this,zs).update(s)},this.show=s=>{Lo(this,Ml,s),kt(this,sr).filter="",kt(this,zs).show()},this.hide=()=>{Lo(this,Ml,null),kt(this,zs).hide()},this.destroy=()=>{kt(this,zs).destroy(),kt(this,sr).remove()},Lo(this,sr,new dR),kt(this,sr).hide=this.hide,kt(this,sr).ctx=t,kt(this,sr).config=o;const r=this;Lo(this,zs,new XFe({content:kt(this,sr),debounce:20,shouldShow(s){if(lR(s.state.selection)||aR(s.state.selection))return!1;const i=this.getContent(s,a=>["paragraph","heading"].includes(a.type.name));if(i==null)return!1;const l=kt(r,Ml);return kt(r,sr).filter=i.startsWith("/")?i.slice(1):i,typeof l=="number"?s.state.doc.resolve(l).node()!==s.state.doc.resolve(s.state.selection.from).node()?(Lo(r,Ml,null),!1):!0:!!i.startsWith("/")},offset:10})),kt(this,zs).onShow=()=>{kt(this,sr).show=!0},kt(this,zs).onHide=()=>{kt(this,sr).show=!1},this.update(n),t.set(pR.key,{show:s=>this.show(s),hide:()=>this.hide()})}}sr=new WeakMap,zs=new WeakMap,Ml=new WeakMap;const lBe=(e,t)=>{e.config(n=>sBe(n,t)).use(pR).use(Zk).use(fR)},aBe=Object.freeze(Object.defineProperty({__proto__:null,defineFeature:lBe},Symbol.toStringTag,{value:"Module"}));function uBe(e){var t;return e.childCount<=1&&!((t=e.firstChild)!=null&&t.content.size)}function cBe(e,t){const{selection:n}=e;if(!n.empty)return null;const o=n.$anchor,r=o.parent;if(r.content.size>0||mC(l=>l.type.name==="table")(o))return null;const i=o.before();return Un.node(i,i+r.nodeSize,{class:"crepe-placeholder","data-placeholder":t})}const d0=Pn({text:"Please enter...",mode:"block"},"placeholderConfigCtx"),hR=ao(e=>new On({key:new wn("CREPE_PLACEHOLDER"),props:{decorations:t=>{const n=e.get(d0.key);if(n.mode==="doc"&&!uBe(t.doc)||lR(t.selection)||aR(t.selection))return null;const o=n.text??"Please enter...",r=cBe(t,o);return r?an.create(t.doc,[r]):null}}})),dBe=(e,t)=>{e.config(n=>{t&&n.update(d0.key,o=>({...o,...t}))}).use(hR).use(d0)},fBe=Object.freeze(Object.defineProperty({__proto__:null,defineFeature:dBe,placeholderConfig:d0,placeholderPlugin:hR},Symbol.toStringTag,{value:"Module"})),mR=({ctx:e,hide:t,show:n,config:o})=>{var l,a,u,c,d;const r=xL();u0(()=>{r()},[n]);const s=f=>p=>{p.preventDefault(),e&&f(e),r()},i=f=>{if(!e)return!1;const p=e.get(bn),{state:{doc:h,selection:m}}=p;return h.rangeHasMark(m.from,m.to,f)};return Et`<host> |
| 477 |
<button |
| 478 |
class=${ac("toolbar-item",e&&i(Ad.type(e))&&"active")} |
| 479 |
onmousedown=${s(f=>{f.get(Vt).call(Cv.key)})} |
| 480 |
> |
| 481 |
${((l=o==null?void 0:o.boldIcon)==null?void 0:l.call(o))??cFe} |
| 482 |
</button> |
| 483 |
<button |
| 484 |
class=${ac("toolbar-item",e&&i(xu.type(e))&&"active")} |
| 485 |
onmousedown=${s(f=>{f.get(Vt).call(wv.key)})} |
| 486 |
> |
| 487 |
${((a=o==null?void 0:o.italicIcon)==null?void 0:a.call(o))??vFe} |
| 488 |
</button> |
| 489 |
<button |
| 490 |
class=${ac("toolbar-item",e&&i(Rd.type(e))&&"active")} |
| 491 |
onmousedown=${s(f=>{f.get(Vt).call(Ev.key)})} |
| 492 |
> |
| 493 |
${((u=o==null?void 0:o.strikethroughIcon)==null?void 0:u.call(o))??wFe} |
| 494 |
</button> |
| 495 |
<div class="divider"></div> |
| 496 |
<button |
| 497 |
class=${ac("toolbar-item",e&&i(Ei.type(e))&&"active")} |
| 498 |
onmousedown=${s(f=>{f.get(Vt).call(kv.key)})} |
| 499 |
> |
| 500 |
${((c=o==null?void 0:o.codeIcon)==null?void 0:c.call(o))??eR} |
| 501 |
</button> |
| 502 |
<button |
| 503 |
class=${ac("toolbar-item",e&&i(ps.type(e))&&"active")} |
| 504 |
onmousedown=${s(f=>{const p=f.get(bn),{selection:h}=p.state;if(i(ps.type(f))){f.get(gd.key).removeLink(h.from,h.to);return}f.get(gd.key).addLink(h.from,h.to),t==null||t()})} |
| 505 |
> |
| 506 |
${((d=o==null?void 0:o.linkIcon)==null?void 0:d.call(o))??tR} |
| 507 |
</button> |
| 508 |
</host>`};mR.props={ctx:Object,hide:Function,show:Boolean,config:Object};const gR=Uh(mR),E$=Kk("CREPE_TOOLBAR");var bi,$o;class pBe{constructor(t,n,o){Os(this,bi,void 0);Os(this,$o,void 0);this.update=(s,i)=>{kt(this,bi).update(s,i)},this.destroy=()=>{kt(this,bi).destroy(),kt(this,$o).remove()},this.hide=()=>{kt(this,bi).hide()};const r=new gR;Lo(this,$o,r),kt(this,$o).ctx=t,kt(this,$o).hide=this.hide,kt(this,$o).config=o,Lo(this,bi,new Wk({content:kt(this,$o),debounce:20,offset:10,shouldShow(s){const{doc:i,selection:l}=s.state,{empty:a,from:u,to:c}=l,d=!i.textBetween(u,c).length&&l instanceof ht,f=!(l instanceof ht),p=s.dom.getRootNode().activeElement,h=r.contains(p),m=!s.hasFocus()&&!h,y=!s.editable;return!(m||f||a||d||y)}})),kt(this,bi).onShow=()=>{kt(this,$o).show=!0,setTimeout(()=>{let s=kt(this,$o).style.left;s=parseInt(s),console.log(s),s<0?(kt(this,$o).style.left=0,console.log(kt(this,$o))):s>350&&(kt(this,$o).style.left="350px")},0)},kt(this,bi).onHide=()=>{kt(this,$o).show=!1},this.update(n)}}bi=new WeakMap,$o=new WeakMap;uR("milkdown-toolbar",gR);const hBe=(e,t)=>{e.config(n=>{n.set(E$.key,{view:o=>new pBe(n,o,t)})}).use(E$)},mBe=Object.freeze(Object.defineProperty({__proto__:null,defineFeature:hBe},Symbol.toStringTag,{value:"Module"})),gBe="",vBe=Object.freeze(Object.defineProperty({__proto__:null,default:gBe},Symbol.toStringTag,{value:"Module"}))});export default yBe(); |
| 509 |
|