| 1 |
var UR=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var r4=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var ht=(e,t,n)=>(r4(e,t,"read from private field"),n?n.call(e):t.get(e)),ms=(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)},Eo=(e,t,n,o)=>(r4(e,t,"write to private field"),o?o.call(e,n):t.set(e,n),n);var bYe=UR((nr,or)=>{/** |
| 2 |
* @vue/shared v3.4.23 |
| 3 |
* (c) 2018-present Yuxi (Evan) You and Vue contributors |
| 4 |
* @license MIT |
| 5 |
**//*! #__NO_SIDE_EFFECTS__ */function cr(e,t){const n=new Set(e.split(","));return t?o=>n.has(o.toLowerCase()):o=>n.has(o)}const Dt={},su=[],dt=()=>{},Lm=()=>!1,cc=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Vb=e=>e.startsWith("onUpdate:"),Pt=Object.assign,zb=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},WR=Object.prototype.hasOwnProperty,ut=(e,t)=>WR.call(e,t),Ee=Array.isArray,iu=e=>id(e)==="[object Map]",uc=e=>id(e)==="[object Set]",s4=e=>id(e)==="[object Date]",qR=e=>id(e)==="[object RegExp]",Ue=e=>typeof e=="function",je=e=>typeof e=="string",Or=e=>typeof e=="symbol",it=e=>e!==null&&typeof e=="object",lh=e=>(it(e)||Ue(e))&&Ue(e.then)&&Ue(e.catch),z9=Object.prototype.toString,id=e=>z9.call(e),Rm=e=>id(e).slice(8,-1),X1=e=>id(e)==="[object Object]",jb=e=>je(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Cl=cr(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),KR=cr("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),o0=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},GR=/-(\w)/g,dn=o0(e=>e.replace(GR,(t,n)=>n?n.toUpperCase():"")),YR=/\B([A-Z])/g,Io=o0(e=>e.replace(YR,"-$1").toLowerCase()),Rl=o0(e=>e.charAt(0).toUpperCase()+e.slice(1)),lu=o0(e=>e?`on${Rl(e)}`:""),ts=(e,t)=>!Object.is(e,t),au=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},j9=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},Q1=e=>{const t=parseFloat(e);return isNaN(t)?e:t},eg=e=>{const t=je(e)?Number(e):NaN;return isNaN(t)?e:t};let i4;const H9=()=>i4||(i4=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),JR="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",ZR=cr(JR);function Be(e){if(Ee(e)){const t={};for(let n=0;n<e.length;n++){const o=e[n],r=je(o)?U9(o):Be(o);if(r)for(const s in r)t[s]=r[s]}return t}else if(je(e)||it(e))return e}const XR=/;(?![^(]*\))/g,QR=/:([^]+)/,eF=/\/\*[^]*?\*\//g;function U9(e){const t={};return e.replace(eF,"").split(XR).forEach(n=>{if(n){const o=n.split(QR);o.length>1&&(t[o[0].trim()]=o[1].trim())}}),t}function F(e){let t="";if(je(e))t=e;else if(Ee(e))for(let n=0;n<e.length;n++){const o=F(e[n]);o&&(t+=o+" ")}else if(it(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function Hb(e){if(!e)return null;let{class:t,style:n}=e;return t&&!je(t)&&(e.class=F(t)),n&&(e.style=Be(n)),e}const tF="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",nF="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",oF="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",rF="area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr",sF=cr(tF),iF=cr(nF),lF=cr(oF),aF=cr(rF),cF="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",uF=cr(cF);function W9(e){return!!e||e===""}function dF(e,t){if(e.length!==t.length)return!1;let n=!0;for(let o=0;n&&o<e.length;o++)n=Al(e[o],t[o]);return n}function Al(e,t){if(e===t)return!0;let n=s4(e),o=s4(t);if(n||o)return n&&o?e.getTime()===t.getTime():!1;if(n=Or(e),o=Or(t),n||o)return e===t;if(n=Ee(e),o=Ee(t),n||o)return n&&o?dF(e,t):!1;if(n=it(e),o=it(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||!Al(e[i],t[i]))return!1}}return String(e)===String(t)}function r0(e,t){return e.findIndex(n=>Al(n,t))}const M=e=>je(e)?e:e==null?"":Ee(e)||it(e)&&(e.toString===z9||!Ue(e.toString))?JSON.stringify(e,q9,2):String(e),q9=(e,t)=>t&&t.__v_isRef?q9(e,t.value):iu(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[o,r],s)=>(n[O_(o,s)+" =>"]=r,n),{})}:uc(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>O_(n))}:Or(t)?O_(t):it(t)&&!Ee(t)&&!X1(t)?String(t):t,O_=(e,t="")=>{var n;return Or(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 Jo;class Ub{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=Jo,!t&&Jo&&(this.index=(Jo.scopes||(Jo.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=Jo;try{return Jo=this,t()}finally{Jo=n}}}on(){Jo=this}off(){Jo=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 K9(e){return new Ub(e)}function G9(e,t=Jo){t&&t.active&&t.effects.push(e)}function Wb(){return Jo}function qb(e){Jo&&Jo.cleanups.push(e)}let Oa;class xu{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,G9(this,r)}get dirty(){if(this._dirtyLevel===2||this._dirtyLevel===3){this._dirtyLevel=1,Fl();for(let t=0;t<this._depsLength;t++){const n=this.deps[t];if(n.computed&&(fF(n.computed),this._dirtyLevel>=4))break}this._dirtyLevel===1&&(this._dirtyLevel=0),Dl()}return this._dirtyLevel>=4}set dirty(t){this._dirtyLevel=t?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=Sl,n=Oa;try{return Sl=!0,Oa=this,this._runnings++,l4(this),this.fn()}finally{a4(this),this._runnings--,Oa=n,Sl=t}}stop(){var t;this.active&&(l4(this),a4(this),(t=this.onStop)==null||t.call(this),this.active=!1)}}function fF(e){return e.value}function l4(e){e._trackId++,e._depsLength=0}function a4(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t<e.deps.length;t++)Y9(e.deps[t],e);e.deps.length=e._depsLength}}function Y9(e,t){const n=e.get(t);n!==void 0&&t._trackId!==n&&(e.delete(t),e.size===0&&e.cleanup())}function hF(e,t){e.effect instanceof xu&&(e=e.effect.fn);const n=new xu(e,dt,()=>{n.dirty&&n.run()});t&&(Pt(n,t),t.scope&&G9(n,t.scope)),(!t||!t.lazy)&&n.run();const o=n.run.bind(n);return o.effect=n,o}function pF(e){e.effect.stop()}let Sl=!0,iy=0;const J9=[];function Fl(){J9.push(Sl),Sl=!1}function Dl(){const e=J9.pop();Sl=e===void 0?!0:e}function Kb(){iy++}function Gb(){for(iy--;!iy&&ly.length;)ly.shift()()}function Z9(e,t,n){if(t.get(e)!==e._trackId){t.set(e,e._trackId);const o=e.deps[e._depsLength];o!==t?(o&&Y9(o,e),e.deps[e._depsLength++]=t):e._depsLength++}}const ly=[];function X9(e,t,n){Kb();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&&ly.push(o.scheduler)))}Gb()}const Q9=(e,t)=>{const n=new Map;return n.cleanup=e,n.computed=t,n},tg=new WeakMap,Ia=Symbol(""),ay=Symbol("");function Bo(e,t,n){if(Sl&&Oa){let o=tg.get(e);o||tg.set(e,o=new Map);let r=o.get(n);r||o.set(n,r=Q9(()=>o.delete(n))),Z9(Oa,r)}}function pi(e,t,n,o,r,s){const i=tg.get(e);if(!i)return;let l=[];if(t==="clear")l=[...i.values()];else if(n==="length"&&Ee(e)){const a=Number(o);i.forEach((c,u)=>{(u==="length"||!Or(u)&&u>=a)&&l.push(c)})}else switch(n!==void 0&&l.push(i.get(n)),t){case"add":Ee(e)?jb(n)&&l.push(i.get("length")):(l.push(i.get(Ia)),iu(e)&&l.push(i.get(ay)));break;case"delete":Ee(e)||(l.push(i.get(Ia)),iu(e)&&l.push(i.get(ay)));break;case"set":iu(e)&&l.push(i.get(Ia));break}Kb();for(const a of l)a&&X9(a,4);Gb()}function mF(e,t){var n;return(n=tg.get(e))==null?void 0:n.get(t)}const gF=cr("__proto__,__v_isRef,__isVue"),e7=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Or)),c4=_F();function _F(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const o=Ct(this);for(let s=0,i=this.length;s<i;s++)Bo(o,"get",s+"");const r=o[t](...n);return r===-1||r===!1?o[t](...n.map(Ct)):r}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...n){Fl(),Kb();const o=Ct(this)[t].apply(this,n);return Gb(),Dl(),o}}),e}function vF(e){Or(e)||(e=String(e));const t=Ct(this);return Bo(t,"has",e),t.hasOwnProperty(e)}class t7{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?l7:i7:s?s7:r7).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(o)?t:void 0;const i=Ee(t);if(!r){if(i&&ut(c4,n))return Reflect.get(c4,n,o);if(n==="hasOwnProperty")return vF}const l=Reflect.get(t,n,o);return(Or(n)?e7.has(n):gF(n))||(r||Bo(t,"get",n),s)?l:Yt(l)?i&&jb(n)?l:l.value:it(l)?r?dc(l):jn(l):l}}class n7 extends t7{constructor(t=!1){super(!1,t)}set(t,n,o,r){let s=t[n];if(!this._isShallow){const a=Tu(s);if(!ah(o)&&!Tu(o)&&(s=Ct(s),o=Ct(o)),!Ee(t)&&Yt(s)&&!Yt(o))return a?!1:(s.value=o,!0)}const i=Ee(t)&&jb(n)?Number(n)<t.length:ut(t,n),l=Reflect.set(t,n,o,r);return t===Ct(r)&&(i?ts(o,s)&&pi(t,"set",n,o):pi(t,"add",n,o)),l}deleteProperty(t,n){const o=ut(t,n);t[n];const r=Reflect.deleteProperty(t,n);return r&&o&&pi(t,"delete",n,void 0),r}has(t,n){const o=Reflect.has(t,n);return(!Or(n)||!e7.has(n))&&Bo(t,"has",n),o}ownKeys(t){return Bo(t,"iterate",Ee(t)?"length":Ia),Reflect.ownKeys(t)}}class o7 extends t7{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const yF=new n7,bF=new o7,wF=new n7(!0),kF=new o7(!0),Yb=e=>e,s0=e=>Reflect.getPrototypeOf(e);function Hp(e,t,n=!1,o=!1){e=e.__v_raw;const r=Ct(e),s=Ct(t);n||(ts(t,s)&&Bo(r,"get",t),Bo(r,"get",s));const{has:i}=s0(r),l=o?Yb:n?Xb:ch;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 Up(e,t=!1){const n=this.__v_raw,o=Ct(n),r=Ct(e);return t||(ts(e,r)&&Bo(o,"has",e),Bo(o,"has",r)),e===r?n.has(e):n.has(e)||n.has(r)}function Wp(e,t=!1){return e=e.__v_raw,!t&&Bo(Ct(e),"iterate",Ia),Reflect.get(e,"size",e)}function u4(e){e=Ct(e);const t=Ct(this);return s0(t).has.call(t,e)||(t.add(e),pi(t,"add",e,e)),this}function d4(e,t){t=Ct(t);const n=Ct(this),{has:o,get:r}=s0(n);let s=o.call(n,e);s||(e=Ct(e),s=o.call(n,e));const i=r.call(n,e);return n.set(e,t),s?ts(t,i)&&pi(n,"set",e,t):pi(n,"add",e,t),this}function f4(e){const t=Ct(this),{has:n,get:o}=s0(t);let r=n.call(t,e);r||(e=Ct(e),r=n.call(t,e)),o&&o.call(t,e);const s=t.delete(e);return r&&pi(t,"delete",e,void 0),s}function h4(){const e=Ct(this),t=e.size!==0,n=e.clear();return t&&pi(e,"clear",void 0,void 0),n}function qp(e,t){return function(o,r){const s=this,i=s.__v_raw,l=Ct(i),a=t?Yb:e?Xb:ch;return!e&&Bo(l,"iterate",Ia),i.forEach((c,u)=>o.call(r,a(c),a(u),s))}}function Kp(e,t,n){return function(...o){const r=this.__v_raw,s=Ct(r),i=iu(s),l=e==="entries"||e===Symbol.iterator&&i,a=e==="keys"&&i,c=r[e](...o),u=n?Yb:t?Xb:ch;return!t&&Bo(s,"iterate",a?ay:Ia),{next(){const{value:d,done:f}=c.next();return f?{value:d,done:f}:{value:l?[u(d[0]),u(d[1])]:u(d),done:f}},[Symbol.iterator](){return this}}}}function Ri(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function CF(){const e={get(s){return Hp(this,s)},get size(){return Wp(this)},has:Up,add:u4,set:d4,delete:f4,clear:h4,forEach:qp(!1,!1)},t={get(s){return Hp(this,s,!1,!0)},get size(){return Wp(this)},has:Up,add:u4,set:d4,delete:f4,clear:h4,forEach:qp(!1,!0)},n={get(s){return Hp(this,s,!0)},get size(){return Wp(this,!0)},has(s){return Up.call(this,s,!0)},add:Ri("add"),set:Ri("set"),delete:Ri("delete"),clear:Ri("clear"),forEach:qp(!0,!1)},o={get(s){return Hp(this,s,!0,!0)},get size(){return Wp(this,!0)},has(s){return Up.call(this,s,!0)},add:Ri("add"),set:Ri("set"),delete:Ri("delete"),clear:Ri("clear"),forEach:qp(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(s=>{e[s]=Kp(s,!1,!1),n[s]=Kp(s,!0,!1),t[s]=Kp(s,!1,!0),o[s]=Kp(s,!0,!0)}),[e,n,t,o]}const[SF,$F,EF,xF]=CF();function i0(e,t){const n=t?e?xF:EF:e?$F:SF;return(o,r,s)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?o:Reflect.get(ut(n,r)&&r in o?n:o,r,s)}const TF={get:i0(!1,!1)},MF={get:i0(!1,!0)},AF={get:i0(!0,!1)},OF={get:i0(!0,!0)},r7=new WeakMap,s7=new WeakMap,i7=new WeakMap,l7=new WeakMap;function IF(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function NF(e){return e.__v_skip||!Object.isExtensible(e)?0:IF(Rm(e))}function jn(e){return Tu(e)?e:l0(e,!1,yF,TF,r7)}function Jb(e){return l0(e,!1,wF,MF,s7)}function dc(e){return l0(e,!0,bF,AF,i7)}function PF(e){return l0(e,!0,kF,OF,l7)}function l0(e,t,n,o,r){if(!it(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const s=r.get(e);if(s)return s;const i=NF(e);if(i===0)return e;const l=new Proxy(e,i===2?o:n);return r.set(e,l),l}function cu(e){return Tu(e)?cu(e.__v_raw):!!(e&&e.__v_isReactive)}function Tu(e){return!!(e&&e.__v_isReadonly)}function ah(e){return!!(e&&e.__v_isShallow)}function Zb(e){return e?!!e.__v_raw:!1}function Ct(e){const t=e&&e.__v_raw;return t?Ct(t):e}function ns(e){return Object.isExtensible(e)&&j9(e,"__v_skip",!0),e}const ch=e=>it(e)?jn(e):e,Xb=e=>it(e)?dc(e):e;class a7{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 xu(()=>t(this._value),()=>uu(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=Ct(this);return(!t._cacheable||t.effect.dirty)&&ts(t._value,t._value=t.effect.run())&&uu(t,4),Qb(t),t.effect._dirtyLevel>=2&&uu(t,2),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function c7(e,t,n=!1){let o,r;const s=Ue(e);return s?(o=e,r=dt):(o=e.get,r=e.set),new a7(o,r,s||!r,n)}function Qb(e){var t;Sl&&Oa&&(e=Ct(e),Z9(Oa,(t=e.dep)!=null?t:e.dep=Q9(()=>e.dep=void 0,e instanceof a7?e:void 0)))}function uu(e,t=4,n){e=Ct(e);const o=e.dep;o&&X9(o,t)}function Yt(e){return!!(e&&e.__v_isRef===!0)}function H(e){return u7(e,!1)}function Cn(e){return u7(e,!0)}function u7(e,t){return Yt(e)?e:new LF(e,t)}class LF{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:Ct(t),this._value=n?t:ch(t)}get value(){return Qb(this),this._value}set value(t){const n=this.__v_isShallow||ah(t)||Tu(t);t=n?t:Ct(t),ts(t,this._rawValue)&&(this._rawValue=t,this._value=n?t:ch(t),uu(this,4))}}function RF(e){uu(e,4)}function S(e){return Yt(e)?e.value:e}function FF(e){return Ue(e)?e():S(e)}const DF={get:(e,t,n)=>S(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const r=e[t];return Yt(r)&&!Yt(n)?(r.value=n,!0):Reflect.set(e,t,n,o)}};function ew(e){return cu(e)?e:new Proxy(e,DF)}class BF{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:n,set:o}=t(()=>Qb(this),()=>uu(this));this._get=n,this._set=o}get value(){return this._get()}set value(t){this._set(t)}}function d7(e){return new BF(e)}function Hs(e){const t=Ee(e)?new Array(e.length):{};for(const n in e)t[n]=f7(e,n);return t}class VF{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 mF(Ct(this._object),this._key)}}class zF{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function Nn(e,t,n){return Yt(e)?e:Ue(e)?new zF(e):it(e)&&arguments.length>1?f7(e,t,n):H(e)}function f7(e,t,n){const o=e[t];return Yt(o)?o:new VF(e,t,n)}const jF={GET:"get",HAS:"has",ITERATE:"iterate"},HF={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 UF(e,t){}const WF={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"},qF={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 mi(e,t,n,o){try{return o?e(...o):e()}catch(r){fc(r,t,n)}}function rr(e,t,n,o){if(Ue(e)){const r=mi(e,t,n,o);return r&&lh(r)&&r.catch(s=>{fc(s,t,n)}),r}if(Ee(e)){const r=[];for(let s=0;s<e.length;s++)r.push(rr(e[s],t,n,o));return r}}function fc(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 c=s.ec;if(c){for(let u=0;u<c.length;u++)if(c[u](e,i,l)===!1)return}s=s.parent}const a=t.appContext.config.errorHandler;if(a){Fl(),mi(a,null,10,[e,i,l]),Dl();return}}KF(e,n,r,o)}function KF(e,t,n,o=!0){console.error(e)}let uh=!1,cy=!1;const so=[];let xs=0;const du=[];let rl=null,ma=0;const h7=Promise.resolve();let tw=null;function tt(e){const t=tw||h7;return e?t.then(this?e.bind(this):e):t}function GF(e){let t=xs+1,n=so.length;for(;t<n;){const o=t+n>>>1,r=so[o],s=dh(r);s<e||s===e&&r.pre?t=o+1:n=o}return t}function a0(e){(!so.length||!so.includes(e,uh&&e.allowRecurse?xs+1:xs))&&(e.id==null?so.push(e):so.splice(GF(e.id),0,e),p7())}function p7(){!uh&&!cy&&(cy=!0,tw=h7.then(m7))}function YF(e){const t=so.indexOf(e);t>xs&&so.splice(t,1)}function ng(e){Ee(e)?du.push(...e):(!rl||!rl.includes(e,e.allowRecurse?ma+1:ma))&&du.push(e),p7()}function p4(e,t,n=uh?xs+1:0){for(;n<so.length;n++){const o=so[n];if(o&&o.pre){if(e&&o.id!==e.uid)continue;so.splice(n,1),n--,o()}}}function og(e){if(du.length){const t=[...new Set(du)].sort((n,o)=>dh(n)-dh(o));if(du.length=0,rl){rl.push(...t);return}for(rl=t,ma=0;ma<rl.length;ma++)rl[ma]();rl=null,ma=0}}const dh=e=>e.id==null?1/0:e.id,JF=(e,t)=>{const n=dh(e)-dh(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function m7(e){cy=!1,uh=!0,so.sort(JF);const t=dt;try{for(xs=0;xs<so.length;xs++){const n=so[xs];n&&n.active!==!1&&mi(n,null,14)}}finally{xs=0,so.length=0,og(),uh=!1,tw=null,(so.length||du.length)&&m7()}}let Fc,Gp=[];function g7(e,t){var n,o;Fc=e,Fc?(Fc.enabled=!0,Gp.forEach(({event:r,args:s})=>Fc.emit(r,...s)),Gp=[]):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=>{g7(s,t)}),setTimeout(()=>{Fc||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Gp=[])},3e3)):Gp=[]}function ZF(e,t,...n){if(e.isUnmounted)return;const o=e.vnode.props||Dt;let r=n;const s=t.startsWith("update:"),i=s&&t.slice(7);if(i&&i in o){const u=`${i==="modelValue"?"model":i}Modifiers`,{number:d,trim:f}=o[u]||Dt;f&&(r=n.map(h=>je(h)?h.trim():h)),d&&(r=n.map(Q1))}let l,a=o[l=lu(t)]||o[l=lu(dn(t))];!a&&s&&(a=o[l=lu(Io(t))]),a&&rr(a,e,6,r);const c=o[l+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,rr(c,e,6,r)}}function _7(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(!Ue(e)){const a=c=>{const u=_7(c,t,!0);u&&(l=!0,Pt(i,u))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!s&&!l?(it(e)&&o.set(e,null),null):(Ee(s)?s.forEach(a=>i[a]=null):Pt(i,s),it(e)&&o.set(e,i),i)}function c0(e,t){return!e||!cc(t)?!1:(t=t.slice(2).replace(/Once$/,""),ut(e,t[0].toLowerCase()+t.slice(1))||ut(e,Io(t))||ut(e,t))}let xn=null,u0=null;function fh(e){const t=xn;return xn=e,u0=e&&e.type.__scopeId||null,t}function v7(e){u0=e}function y7(){u0=null}const XF=e=>x;function x(e,t=xn,n){if(!t||e._n)return e;const o=(...r)=>{o._d&&vy(-1);const s=fh(t);let i;try{i=e(...r)}finally{fh(s),o._d&&vy(1)}return i};return o._n=!0,o._c=!0,o._d=!0,o}function Fm(e){const{type:t,vnode:n,proxy:o,withProxy:r,props:s,propsOptions:[i],slots:l,attrs:a,emit:c,render:u,renderCache:d,data:f,setupState:h,ctx:p,inheritAttrs:m}=e;let v,y;const E=fh(e);try{if(n.shapeFlag&4){const C=r||o,T=C;v=Qo(u.call(T,C,d,s,h,f,p)),y=a}else{const C=t;v=Qo(C.length>1?C(s,{attrs:a,slots:l,emit:c}):C(s,null)),y=t.props?a:eD(a)}}catch(C){Of.length=0,fc(C,e,1),v=b(Vn)}let w=v;if(y&&m!==!1){const C=Object.keys(y),{shapeFlag:T}=w;C.length&&T&7&&(i&&C.some(Vb)&&(y=tD(y,i)),w=rs(w,y))}return n.dirs&&(w=rs(w),w.dirs=w.dirs?w.dirs.concat(n.dirs):n.dirs),n.transition&&(w.transition=n.transition),v=w,fh(E),v}function QF(e,t=!0){let n;for(let o=0;o<e.length;o++){const r=e[o];if(uo(r)){if(r.type!==Vn||r.children==="v-if"){if(n)return;n=r}}else return}return n}const eD=e=>{let t;for(const n in e)(n==="class"||n==="style"||cc(n))&&((t||(t={}))[n]=e[n]);return t},tD=(e,t)=>{const n={};for(const o in e)(!Vb(o)||!(o.slice(9)in t))&&(n[o]=e[o]);return n};function nD(e,t,n){const{props:o,children:r,component:s}=e,{props:i,children:l,patchFlag:a}=t,c=s.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&a>=0){if(a&1024)return!0;if(a&16)return o?m4(o,i,c):!!i;if(a&8){const u=t.dynamicProps;for(let d=0;d<u.length;d++){const f=u[d];if(i[f]!==o[f]&&!c0(c,f))return!0}}}else return(r||l)&&(!l||!l.$stable)?!0:o===i?!1:o?i?m4(o,i,c):!0:!!i;return!1}function m4(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]&&!c0(n,s))return!0}return!1}function nw({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 ow="components",oD="directives";function z(e,t){return rw(ow,e,!0,t)||e}const b7=Symbol.for("v-ndc");function xt(e){return je(e)?rw(ow,e,!1)||e:e||b7}function Mt(e){return rw(oD,e)}function rw(e,t,n=!0,o=!1){const r=xn||In;if(r){const s=r.type;if(e===ow){const l=Cy(s,!1);if(l&&(l===t||l===dn(t)||l===Rl(dn(t))))return s}const i=g4(r[e]||s[e],t)||g4(r.appContext[e],t);return!i&&o?s:i}}function g4(e,t){return e&&(e[t]||e[dn(t)]||e[Rl(dn(t))])}const w7=e=>e.__isSuspense;let uy=0;const rD={name:"Suspense",__isSuspense:!0,process(e,t,n,o,r,s,i,l,a,c){if(e==null)iD(t,n,o,r,s,i,l,a,c);else{if(s&&s.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}lD(e,t,n,o,r,i,l,a,c)}},hydrate:aD,create:sw,normalize:cD},sD=rD;function hh(e,t){const n=e.props&&e.props[t];Ue(n)&&n()}function iD(e,t,n,o,r,s,i,l,a){const{p:c,o:{createElement:u}}=a,d=u("div"),f=e.suspense=sw(e,r,o,t,d,n,s,i,l,a);c(null,f.pendingBranch=e.ssContent,d,null,o,f,s,i),f.deps>0?(hh(e,"onPending"),hh(e,"onFallback"),c(null,e.ssFallback,t,n,o,null,s,i),fu(f,e.ssFallback)):f.resolve(!1,!0)}function lD(e,t,n,o,r,s,i,l,{p:a,um:c,o:{createElement:u}}){const d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;const f=t.ssContent,h=t.ssFallback,{activeBranch:p,pendingBranch:m,isInFallback:v,isHydrating:y}=d;if(m)d.pendingBranch=f,Kr(f,m)?(a(m,f,d.hiddenContainer,null,r,d,s,i,l),d.deps<=0?d.resolve():v&&(y||(a(p,h,n,o,r,null,s,i,l),fu(d,h)))):(d.pendingId=uy++,y?(d.isHydrating=!1,d.activeBranch=m):c(m,r,d),d.deps=0,d.effects.length=0,d.hiddenContainer=u("div"),v?(a(null,f,d.hiddenContainer,null,r,d,s,i,l),d.deps<=0?d.resolve():(a(p,h,n,o,r,null,s,i,l),fu(d,h))):p&&Kr(f,p)?(a(p,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(p&&Kr(f,p))a(p,f,n,o,r,d,s,i,l),fu(d,f);else if(hh(t,"onPending"),d.pendingBranch=f,f.shapeFlag&512?d.pendingId=f.component.suspenseId:d.pendingId=uy++,a(null,f,d.hiddenContainer,null,r,d,s,i,l),d.deps<=0)d.resolve();else{const{timeout:E,pendingId:w}=d;E>0?setTimeout(()=>{d.pendingId===w&&d.fallback(h)},E):E===0&&d.fallback(h)}}function sw(e,t,n,o,r,s,i,l,a,c,u=!1){const{p:d,m:f,um:h,n:p,o:{parentNode:m,remove:v}}=c;let y;const E=uD(e);E&&t!=null&&t.pendingBranch&&(y=t.pendingId,t.deps++);const w=e.props?eg(e.props.timeout):void 0,C=s,T={vnode:e,parent:t,parentComponent:n,namespace:i,container:o,hiddenContainer:r,deps:0,pendingId:uy++,timeout:typeof w=="number"?w:-1,activeBranch:null,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve($=!1,A=!1){const{vnode:N,activeBranch:P,pendingBranch:I,pendingId:D,effects:V,parentComponent:G,container:te}=T;let oe=!1;T.isHydrating?T.isHydrating=!1:$||(oe=P&&I.transition&&I.transition.mode==="out-in",oe&&(P.transition.afterLeave=()=>{D===T.pendingId&&(f(I,te,s===C?p(P):s,0),ng(V))}),P&&(m(P.el)!==T.hiddenContainer&&(s=p(P)),h(P,G,T,!0)),oe||f(I,te,s,0)),fu(T,I),T.pendingBranch=null,T.isInFallback=!1;let J=T.parent,q=!1;for(;J;){if(J.pendingBranch){J.effects.push(...V),q=!0;break}J=J.parent}!q&&!oe&&ng(V),T.effects=[],E&&t&&t.pendingBranch&&y===t.pendingId&&(t.deps--,t.deps===0&&!A&&t.resolve()),hh(N,"onResolve")},fallback($){if(!T.pendingBranch)return;const{vnode:A,activeBranch:N,parentComponent:P,container:I,namespace:D}=T;hh(A,"onFallback");const V=p(N),G=()=>{T.isInFallback&&(d(null,$,I,V,P,null,D,l,a),fu(T,$))},te=$.transition&&$.transition.mode==="out-in";te&&(N.transition.afterLeave=G),T.isInFallback=!0,h(N,P,null,!0),te||G()},move($,A,N){T.activeBranch&&f(T.activeBranch,$,A,N),T.container=$},next(){return T.activeBranch&&p(T.activeBranch)},registerDep($,A){const N=!!T.pendingBranch;N&&T.deps++;const P=$.vnode.el;$.asyncDep.catch(I=>{fc(I,$,0)}).then(I=>{if($.isUnmounted||T.isUnmounted||T.pendingId!==$.suspenseId)return;$.asyncResolved=!0;const{vnode:D}=$;wy($,I,!1),P&&(D.el=P);const V=!P&&$.subTree.el;A($,D,m(P||$.subTree.el),P?null:p($.subTree),T,i,a),V&&v(V),nw($,D.el),N&&--T.deps===0&&T.resolve()})},unmount($,A){T.isUnmounted=!0,T.activeBranch&&h(T.activeBranch,n,$,A),T.pendingBranch&&h(T.pendingBranch,n,$,A)}};return T}function aD(e,t,n,o,r,s,i,l,a){const c=t.suspense=sw(t,o,n,e.parentNode,document.createElement("div"),null,r,s,i,l,!0),u=a(e,c.pendingBranch=t.ssContent,n,c,s,i);return c.deps===0&&c.resolve(!1,!0),u}function cD(e){const{shapeFlag:t,children:n}=e,o=t&32;e.ssContent=_4(o?n.default:n),e.ssFallback=o?_4(n.fallback):b(Vn)}function _4(e){let t;if(Ue(e)){const n=Ka&&e._c;n&&(e._d=!1,g()),e=e(),n&&(e._d=!0,t=No,eE())}return Ee(e)&&(e=QF(e)),e=Qo(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function k7(e,t){t&&t.pendingBranch?Ee(e)?t.effects.push(...e):t.effects.push(e):ng(e)}function fu(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,nw(o,r))}function uD(e){var t;return((t=e.props)==null?void 0:t.suspensible)!=null&&e.props.suspensible!==!1}const C7=Symbol.for("v-scx"),S7=()=>Pe(C7);function Yr(e,t){return Wh(e,null,t)}function $7(e,t){return Wh(e,null,{flush:"post"})}function E7(e,t){return Wh(e,null,{flush:"sync"})}const Yp={};function ke(e,t,n){return Wh(e,t,n)}function Wh(e,t,{immediate:n,deep:o,flush:r,once:s,onTrack:i,onTrigger:l}=Dt){if(t&&s){const $=t;t=(...A)=>{$(...A),T()}}const a=In,c=$=>o===!0?$:ba($,o===!1?1:void 0);let u,d=!1,f=!1;if(Yt(e)?(u=()=>e.value,d=ah(e)):cu(e)?(u=()=>c(e),d=!0):Ee(e)?(f=!0,d=e.some($=>cu($)||ah($)),u=()=>e.map($=>{if(Yt($))return $.value;if(cu($))return c($);if(Ue($))return mi($,a,2)})):Ue(e)?t?u=()=>mi(e,a,2):u=()=>(h&&h(),rr(e,a,3,[p])):u=dt,t&&o){const $=u;u=()=>ba($())}let h,p=$=>{h=w.onStop=()=>{mi($,a,4),h=w.onStop=void 0}},m;if(Kh)if(p=dt,t?n&&rr(t,a,3,[u(),f?[]:void 0,p]):u(),r==="sync"){const $=S7();m=$.__watcherHandles||($.__watcherHandles=[])}else return dt;let v=f?new Array(e.length).fill(Yp):Yp;const y=()=>{if(!(!w.active||!w.dirty))if(t){const $=w.run();(o||d||(f?$.some((A,N)=>ts(A,v[N])):ts($,v)))&&(h&&h(),rr(t,a,3,[$,v===Yp?void 0:f&&v[0]===Yp?[]:v,p]),v=$)}else w.run()};y.allowRecurse=!!t;let E;r==="sync"?E=y:r==="post"?E=()=>Gn(y,a&&a.suspense):(y.pre=!0,a&&(y.id=a.uid),E=()=>a0(y));const w=new xu(u,dt,E),C=Wb(),T=()=>{w.stop(),C&&zb(C.effects,w)};return t?n?y():v=w.run():r==="post"?Gn(w.run.bind(w),a&&a.suspense):w.run(),m&&m.push(T),T}function dD(e,t,n){const o=this.proxy,r=je(e)?e.includes(".")?x7(o,e):()=>o[e]:e.bind(o,o);let s;Ue(t)?s=t:(s=t.handler,n=t);const i=Ga(this),l=Wh(r,s.bind(o),n);return i(),l}function x7(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 ba(e,t,n=0,o){if(!it(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),Yt(e))ba(e.value,t,n,o);else if(Ee(e))for(let r=0;r<e.length;r++)ba(e[r],t,n,o);else if(uc(e)||iu(e))e.forEach(r=>{ba(r,t,n,o)});else if(X1(e))for(const r in e)ba(e[r],t,n,o);return e}function Ve(e,t){if(xn===null)return e;const n=p0(xn)||xn.proxy,o=e.dirs||(e.dirs=[]);for(let r=0;r<t.length;r++){let[s,i,l,a=Dt]=t[r];s&&(Ue(s)&&(s={mounted:s,updated:s}),s.deep&&ba(i),o.push({dir:s,instance:n,value:i,oldValue:void 0,arg:l,modifiers:a}))}return e}function $s(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&&(Fl(),rr(a,n,8,[e.el,l,e,t]),Dl())}}const sl=Symbol("_leaveCb"),Jp=Symbol("_enterCb");function iw(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return mt(()=>{e.isMounted=!0}),bn(()=>{e.isUnmounting=!0}),e}const mr=[Function,Array],lw={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:mr,onEnter:mr,onAfterEnter:mr,onEnterCancelled:mr,onBeforeLeave:mr,onLeave:mr,onAfterLeave:mr,onLeaveCancelled:mr,onBeforeAppear:mr,onAppear:mr,onAfterAppear:mr,onAppearCancelled:mr},fD={name:"BaseTransition",props:lw,setup(e,{slots:t}){const n=nt(),o=iw();return()=>{const r=t.default&&d0(t.default(),!0);if(!r||!r.length)return;let s=r[0];if(r.length>1){for(const f of r)if(f.type!==Vn){s=f;break}}const i=Ct(e),{mode:l}=i;if(o.isLeaving)return I_(s);const a=v4(s);if(!a)return I_(s);const c=Mu(a,i,o,n);qa(a,c);const u=n.subTree,d=u&&v4(u);if(d&&d.type!==Vn&&!Kr(a,d)){const f=Mu(d,i,o,n);if(qa(d,f),l==="out-in")return o.isLeaving=!0,f.afterLeave=()=>{o.isLeaving=!1,n.update.active!==!1&&(n.effect.dirty=!0,n.update())},I_(s);l==="in-out"&&a.type!==Vn&&(f.delayLeave=(h,p,m)=>{const v=M7(o,d);v[String(d.key)]=d,h[sl]=()=>{p(),h[sl]=void 0,delete c.delayedLeave},c.delayedLeave=m})}return s}}},T7=fD;function M7(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 Mu(e,t,n,o){const{appear:r,mode:s,persisted:i=!1,onBeforeEnter:l,onEnter:a,onAfterEnter:c,onEnterCancelled:u,onBeforeLeave:d,onLeave:f,onAfterLeave:h,onLeaveCancelled:p,onBeforeAppear:m,onAppear:v,onAfterAppear:y,onAppearCancelled:E}=t,w=String(e.key),C=M7(n,e),T=(N,P)=>{N&&rr(N,o,9,P)},$=(N,P)=>{const I=P[1];T(N,P),Ee(N)?N.every(D=>D.length<=1)&&I():N.length<=1&&I()},A={mode:s,persisted:i,beforeEnter(N){let P=l;if(!n.isMounted)if(r)P=m||l;else return;N[sl]&&N[sl](!0);const I=C[w];I&&Kr(e,I)&&I.el[sl]&&I.el[sl](),T(P,[N])},enter(N){let P=a,I=c,D=u;if(!n.isMounted)if(r)P=v||a,I=y||c,D=E||u;else return;let V=!1;const G=N[Jp]=te=>{V||(V=!0,te?T(D,[N]):T(I,[N]),A.delayedLeave&&A.delayedLeave(),N[Jp]=void 0)};P?$(P,[N,G]):G()},leave(N,P){const I=String(e.key);if(N[Jp]&&N[Jp](!0),n.isUnmounting)return P();T(d,[N]);let D=!1;const V=N[sl]=G=>{D||(D=!0,P(),G?T(p,[N]):T(h,[N]),N[sl]=void 0,C[I]===e&&delete C[I])};C[I]=e,f?$(f,[N,V]):V()},clone(N){return Mu(N,t,n,o)}};return A}function I_(e){if(qh(e))return e=rs(e),e.children=null,e}function v4(e){return qh(e)?e.children?e.children[0]:void 0:e}function qa(e,t){e.shapeFlag&6&&e.component?qa(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 d0(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===Q?(i.patchFlag&128&&r++,o=o.concat(d0(i.children,t,l))):(t||i.type!==Vn)&&o.push(l!=null?rs(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 K(e,t){return Ue(e)?(()=>Pt({name:e.name},t,{setup:e}))():e}const Na=e=>!!e.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function hD(e){Ue(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,c,u=0;const d=()=>(u++,a=null,f()),f=()=>{let h;return a||(h=a=t().catch(p=>{if(p=p instanceof Error?p:new Error(String(p)),l)return new Promise((m,v)=>{l(p,()=>m(d()),()=>v(p),u+1)});throw p}).then(p=>h!==a&&a?a:(p&&(p.__esModule||p[Symbol.toStringTag]==="Module")&&(p=p.default),c=p,p)))};return K({name:"AsyncComponentWrapper",__asyncLoader:f,get __asyncResolved(){return c},setup(){const h=In;if(c)return()=>N_(c,h);const p=E=>{a=null,fc(E,h,13,!o)};if(i&&h.suspense||Kh)return f().then(E=>()=>N_(E,h)).catch(E=>(p(E),()=>o?b(o,{error:E}):null));const m=H(!1),v=H(),y=H(!!r);return r&&setTimeout(()=>{y.value=!1},r),s!=null&&setTimeout(()=>{if(!m.value&&!v.value){const E=new Error(`Async component timed out after ${s}ms.`);p(E),v.value=E}},s),f().then(()=>{m.value=!0,h.parent&&qh(h.parent.vnode)&&(h.parent.effect.dirty=!0,a0(h.parent.update))}).catch(E=>{p(E),v.value=E}),()=>{if(m.value&&c)return N_(c,h);if(v.value&&o)return b(o,{error:v.value});if(n&&!y.value)return b(n)}}})}function N_(e,t){const{ref:n,props:o,children:r,ce:s}=t.vnode,i=b(e,o,r);return i.ref=n,i.ce=s,delete t.vnode.ce,i}const qh=e=>e.type.__isKeepAlive,pD={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=nt(),o=n.ctx;if(!o.renderer)return()=>{const E=t.default&&t.default();return E&&E.length===1?E[0]:E};const r=new Map,s=new Set;let i=null;const l=n.suspense,{renderer:{p:a,m:c,um:u,o:{createElement:d}}}=o,f=d("div");o.activate=(E,w,C,T,$)=>{const A=E.component;c(E,w,C,0,l),a(A.vnode,E,w,C,A,l,T,E.slotScopeIds,$),Gn(()=>{A.isDeactivated=!1,A.a&&au(A.a);const N=E.props&&E.props.onVnodeMounted;N&&Ao(N,A.parent,E)},l)},o.deactivate=E=>{const w=E.component;c(E,f,null,1,l),Gn(()=>{w.da&&au(w.da);const C=E.props&&E.props.onVnodeUnmounted;C&&Ao(C,w.parent,E),w.isDeactivated=!0},l)};function h(E){P_(E),u(E,n,l,!0)}function p(E){r.forEach((w,C)=>{const T=Cy(w.type);T&&(!E||!E(T))&&m(C)})}function m(E){const w=r.get(E);!i||!Kr(w,i)?h(w):i&&P_(i),r.delete(E),s.delete(E)}ke(()=>[e.include,e.exclude],([E,w])=>{E&&p(C=>Wd(E,C)),w&&p(C=>!Wd(w,C))},{flush:"post",deep:!0});let v=null;const y=()=>{v!=null&&r.set(v,L_(n.subTree))};return mt(y),Bl(y),bn(()=>{r.forEach(E=>{const{subTree:w,suspense:C}=n,T=L_(w);if(E.type===T.type&&E.key===T.key){P_(T);const $=T.component.da;$&&Gn($,C);return}h(E)})}),()=>{if(v=null,!t.default)return i=null;const E=t.default(),w=E[0];if(E.length>1)return i=null,E;if(!uo(w)||!(w.shapeFlag&4)&&!(w.shapeFlag&128))return i=null,w;let C=L_(w);const T=C.type,$=Cy(Na(C)?C.type.__asyncResolved||{}:T),{include:A,exclude:N,max:P}=e;if(A&&(!$||!Wd(A,$))||N&&$&&Wd(N,$))return i=C,w;const I=C.key==null?T:C.key,D=r.get(I);return C.el&&(C=rs(C),w.shapeFlag&128&&(w.ssContent=C)),v=I,D?(C.el=D.el,C.component=D.component,C.transition&&qa(C,C.transition),C.shapeFlag|=512,s.delete(I),s.add(I)):(s.add(I),P&&s.size>parseInt(P,10)&&m(s.values().next().value)),C.shapeFlag|=256,i=C,w7(w.type)?w:C}}},mD=pD;function Wd(e,t){return Ee(e)?e.some(n=>Wd(n,t)):je(e)?e.split(",").includes(t):qR(e)?e.test(t):!1}function A7(e,t){O7(e,"a",t)}function aw(e,t){O7(e,"da",t)}function O7(e,t,n=In){const o=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(f0(t,o,n),n){let r=n.parent;for(;r&&r.parent;)qh(r.parent.vnode)&&gD(o,t,n,r),r=r.parent}}function gD(e,t,n,o){const r=f0(t,e,o,!0);Us(()=>{zb(o[t],r)},n)}function P_(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function L_(e){return e.shapeFlag&128?e.ssContent:e}function f0(e,t,n=In,o=!1){if(n){const r=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...i)=>{if(n.isUnmounted)return;Fl();const l=Ga(n),a=rr(t,n,e,i);return l(),Dl(),a});return o?r.unshift(s):r.push(s),s}}const Si=e=>(t,n=In)=>(!Kh||e==="sp")&&f0(e,(...o)=>t(...o),n),ld=Si("bm"),mt=Si("m"),I7=Si("bu"),Bl=Si("u"),bn=Si("bum"),Us=Si("um"),N7=Si("sp"),P7=Si("rtg"),L7=Si("rtc");function R7(e,t=In){f0("ec",e,t)}function Me(e,t,n,o){let r;const s=n&&n[o];if(Ee(e)||je(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(it(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 c=i[l];r[l]=t(e[c],c,l,s&&s[l])}}else r=[];return n&&(n[o]=r),r}function Ps(e,t){for(let n=0;n<t.length;n++){const o=t[n];if(Ee(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 le(e,t,n={},o,r){if(xn.isCE||xn.parent&&Na(xn.parent)&&xn.parent.isCE)return t!=="default"&&(n.name=t),b("slot",n,o&&o());let s=e[t];s&&s._c&&(s._d=!1),g();const i=s&&F7(s(n)),l=L(Q,{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 F7(e){return e.some(t=>uo(t)?!(t.type===Vn||t.type===Q&&!F7(t.children)):!0)?e:null}function _D(e,t){const n={};for(const o in e)n[t&&/[A-Z]/.test(o)?`on:${o}`:lu(o)]=e[o];return n}const dy=e=>e?rE(e)?p0(e)||e.proxy:dy(e.parent):null,Mf=Pt(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=>dy(e.parent),$root:e=>dy(e.root),$emit:e=>e.emit,$options:e=>uw(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,a0(e.update)}),$nextTick:e=>e.n||(e.n=tt.bind(e.proxy)),$watch:e=>dD.bind(e)}),R_=(e,t)=>e!==Dt&&!e.__isScriptSetup&&ut(e,t),fy={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 c;if(t[0]!=="$"){const h=i[t];if(h!==void 0)switch(h){case 1:return o[t];case 2:return r[t];case 4:return n[t];case 3:return s[t]}else{if(R_(o,t))return i[t]=1,o[t];if(r!==Dt&&ut(r,t))return i[t]=2,r[t];if((c=e.propsOptions[0])&&ut(c,t))return i[t]=3,s[t];if(n!==Dt&&ut(n,t))return i[t]=4,n[t];hy&&(i[t]=0)}}const u=Mf[t];let d,f;if(u)return t==="$attrs"&&Bo(e.attrs,"get",""),u(e);if((d=l.__cssModules)&&(d=d[t]))return d;if(n!==Dt&&ut(n,t))return i[t]=4,n[t];if(f=a.config.globalProperties,ut(f,t))return f[t]},set({_:e},t,n){const{data:o,setupState:r,ctx:s}=e;return R_(r,t)?(r[t]=n,!0):o!==Dt&&ut(o,t)?(o[t]=n,!0):ut(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!==Dt&&ut(e,i)||R_(t,i)||(l=s[0])&&ut(l,i)||ut(o,i)||ut(Mf,i)||ut(r.config.globalProperties,i)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:ut(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},vD=Pt({},fy,{get(e,t){if(t!==Symbol.unscopables)return fy.get(e,t,e)},has(e,t){return t[0]!=="_"&&!ZR(t)}});function yD(){return null}function bD(){return null}function wD(e){}function kD(e){}function CD(){return null}function SD(){}function $D(e,t){return null}function Ws(){return D7().slots}function cw(){return D7().attrs}function D7(){const e=nt();return e.setupContext||(e.setupContext=aE(e))}function ph(e){return Ee(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function ED(e,t){const n=ph(e);for(const o in t){if(o.startsWith("__skip"))continue;let r=n[o];r?Ee(r)||Ue(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 xD(e,t){return!e||!t?e||t:Ee(e)&&Ee(t)?e.concat(t):Pt({},ph(e),ph(t))}function TD(e,t){const n={};for(const o in e)t.includes(o)||Object.defineProperty(n,o,{enumerable:!0,get:()=>e[o]});return n}function MD(e){const t=nt();let n=e();return by(),lh(n)&&(n=n.catch(o=>{throw Ga(t),o})),[n,()=>Ga(t)]}let hy=!0;function AD(e){const t=uw(e),n=e.proxy,o=e.ctx;hy=!1,t.beforeCreate&&y4(t.beforeCreate,e,"bc");const{data:r,computed:s,methods:i,watch:l,provide:a,inject:c,created:u,beforeMount:d,mounted:f,beforeUpdate:h,updated:p,activated:m,deactivated:v,beforeDestroy:y,beforeUnmount:E,destroyed:w,unmounted:C,render:T,renderTracked:$,renderTriggered:A,errorCaptured:N,serverPrefetch:P,expose:I,inheritAttrs:D,components:V,directives:G,filters:te}=t;if(c&&OD(c,o,null),i)for(const q in i){const X=i[q];Ue(X)&&(o[q]=X.bind(n))}if(r){const q=r.call(n,n);it(q)&&(e.data=jn(q))}if(hy=!0,s)for(const q in s){const X=s[q],ee=Ue(X)?X.bind(n,n):Ue(X.get)?X.get.bind(n,n):dt,R=!Ue(X)&&Ue(X.set)?X.set.bind(n):dt,ye=B({get:ee,set:R});Object.defineProperty(o,q,{enumerable:!0,configurable:!0,get:()=>ye.value,set:Ce=>ye.value=Ce})}if(l)for(const q in l)B7(l[q],o,n,q);if(a){const q=Ue(a)?a.call(n):a;Reflect.ownKeys(q).forEach(X=>{bt(X,q[X])})}u&&y4(u,e,"c");function J(q,X){Ee(X)?X.forEach(ee=>q(ee.bind(n))):X&&q(X.bind(n))}if(J(ld,d),J(mt,f),J(I7,h),J(Bl,p),J(A7,m),J(aw,v),J(R7,N),J(L7,$),J(P7,A),J(bn,E),J(Us,C),J(N7,P),Ee(I))if(I.length){const q=e.exposed||(e.exposed={});I.forEach(X=>{Object.defineProperty(q,X,{get:()=>n[X],set:ee=>n[X]=ee})})}else e.exposed||(e.exposed={});T&&e.render===dt&&(e.render=T),D!=null&&(e.inheritAttrs=D),V&&(e.components=V),G&&(e.directives=G)}function OD(e,t,n=dt){Ee(e)&&(e=py(e));for(const o in e){const r=e[o];let s;it(r)?"default"in r?s=Pe(r.from||o,r.default,!0):s=Pe(r.from||o):s=Pe(r),Yt(s)?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>s.value,set:i=>s.value=i}):t[o]=s}}function y4(e,t,n){rr(Ee(e)?e.map(o=>o.bind(t.proxy)):e.bind(t.proxy),t,n)}function B7(e,t,n,o){const r=o.includes(".")?x7(n,o):()=>n[o];if(je(e)){const s=t[e];Ue(s)&&ke(r,s)}else if(Ue(e))ke(r,e.bind(n));else if(it(e))if(Ee(e))e.forEach(s=>B7(s,t,n,o));else{const s=Ue(e.handler)?e.handler.bind(n):t[e.handler];Ue(s)&&ke(r,s,e)}}function uw(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(c=>rg(a,c,i,!0)),rg(a,t,i)),it(t)&&s.set(t,a),a}function rg(e,t,n,o=!1){const{mixins:r,extends:s}=t;s&&rg(e,s,n,!0),r&&r.forEach(i=>rg(e,i,n,!0));for(const i in t)if(!(o&&i==="expose")){const l=ID[i]||n&&n[i];e[i]=l?l(e[i],t[i]):t[i]}return e}const ID={data:b4,props:w4,emits:w4,methods:qd,computed:qd,beforeCreate:mo,created:mo,beforeMount:mo,mounted:mo,beforeUpdate:mo,updated:mo,beforeDestroy:mo,beforeUnmount:mo,destroyed:mo,unmounted:mo,activated:mo,deactivated:mo,errorCaptured:mo,serverPrefetch:mo,components:qd,directives:qd,watch:PD,provide:b4,inject:ND};function b4(e,t){return t?e?function(){return Pt(Ue(e)?e.call(this,this):e,Ue(t)?t.call(this,this):t)}:t:e}function ND(e,t){return qd(py(e),py(t))}function py(e){if(Ee(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function mo(e,t){return e?[...new Set([].concat(e,t))]:t}function qd(e,t){return e?Pt(Object.create(null),e,t):t}function w4(e,t){return e?Ee(e)&&Ee(t)?[...new Set([...e,...t])]:Pt(Object.create(null),ph(e),ph(t??{})):t}function PD(e,t){if(!e)return t;if(!t)return e;const n=Pt(Object.create(null),e);for(const o in t)n[o]=mo(e[o],t[o]);return n}function V7(){return{app:null,config:{isNativeTag:Lm,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 LD=0;function RD(e,t){return function(o,r=null){Ue(o)||(o=Pt({},o)),r!=null&&!it(r)&&(r=null);const s=V7(),i=new WeakSet;let l=!1;const a=s.app={_uid:LD++,_component:o,_props:r,_container:null,_context:s,_instance:null,version:uE,get config(){return s.config},set config(c){},use(c,...u){return i.has(c)||(c&&Ue(c.install)?(i.add(c),c.install(a,...u)):Ue(c)&&(i.add(c),c(a,...u))),a},mixin(c){return s.mixins.includes(c)||s.mixins.push(c),a},component(c,u){return u?(s.components[c]=u,a):s.components[c]},directive(c,u){return u?(s.directives[c]=u,a):s.directives[c]},mount(c,u,d){if(!l){const f=b(o,r);return f.appContext=s,d===!0?d="svg":d===!1&&(d=void 0),u&&t?t(f,c):e(f,c,d),l=!0,a._container=c,c.__vue_app__=a,p0(f.component)||f.component.proxy}},unmount(){l&&(e(null,a._container),delete a._container.__vue_app__)},provide(c,u){return s.provides[c]=u,a},runWithContext(c){const u=hu;hu=a;try{return c()}finally{hu=u}}};return a}}let hu=null;function bt(e,t){if(In){let n=In.provides;const o=In.parent&&In.parent.provides;o===n&&(n=In.provides=Object.create(o)),n[e]=t}}function Pe(e,t,n=!1){const o=In||xn;if(o||hu){const r=o?o.parent==null?o.vnode.appContext&&o.vnode.appContext.provides:o.parent.provides:hu._context.provides;if(r&&e in r)return r[e];if(arguments.length>1)return n&&Ue(t)?t.call(o&&o.proxy):t}}function FD(){return!!(In||xn||hu)}const z7=Object.create(null),my=()=>Object.create(z7),j7=e=>Object.getPrototypeOf(e)===z7;function DD(e,t,n,o=!1){const r={},s=my();e.propsDefaults=Object.create(null),H7(e,t,r,s);for(const i in e.propsOptions[0])i in r||(r[i]=void 0);n?e.props=o?r:Jb(r):e.type.props?e.props=r:e.props=s,e.attrs=s}function BD(e,t,n,o){const{props:r,attrs:s,vnode:{patchFlag:i}}=e,l=Ct(r),[a]=e.propsOptions;let c=!1;if((o||i>0)&&!(i&16)){if(i&8){const u=e.vnode.dynamicProps;for(let d=0;d<u.length;d++){let f=u[d];if(c0(e.emitsOptions,f))continue;const h=t[f];if(a)if(ut(s,f))h!==s[f]&&(s[f]=h,c=!0);else{const p=dn(f);r[p]=gy(a,l,p,h,e,!1)}else h!==s[f]&&(s[f]=h,c=!0)}}}else{H7(e,t,r,s)&&(c=!0);let u;for(const d in l)(!t||!ut(t,d)&&((u=Io(d))===d||!ut(t,u)))&&(a?n&&(n[d]!==void 0||n[u]!==void 0)&&(r[d]=gy(a,l,d,void 0,e,!0)):delete r[d]);if(s!==l)for(const d in s)(!t||!ut(t,d))&&(delete s[d],c=!0)}c&&pi(e.attrs,"set","")}function H7(e,t,n,o){const[r,s]=e.propsOptions;let i=!1,l;if(t)for(let a in t){if(Cl(a))continue;const c=t[a];let u;r&&ut(r,u=dn(a))?!s||!s.includes(u)?n[u]=c:(l||(l={}))[u]=c:c0(e.emitsOptions,a)||(!(a in o)||c!==o[a])&&(o[a]=c,i=!0)}if(s){const a=Ct(n),c=l||Dt;for(let u=0;u<s.length;u++){const d=s[u];n[d]=gy(r,a,d,c[d],e,!ut(c,d))}}return i}function gy(e,t,n,o,r,s){const i=e[n];if(i!=null){const l=ut(i,"default");if(l&&o===void 0){const a=i.default;if(i.type!==Function&&!i.skipFactory&&Ue(a)){const{propsDefaults:c}=r;if(n in c)o=c[n];else{const u=Ga(r);o=c[n]=a.call(null,t),u()}}else o=a}i[0]&&(s&&!l?o=!1:i[1]&&(o===""||o===Io(n))&&(o=!0))}return o}function U7(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(!Ue(e)){const u=d=>{a=!0;const[f,h]=U7(d,t,!0);Pt(i,f),h&&l.push(...h)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!s&&!a)return it(e)&&o.set(e,su),su;if(Ee(s))for(let u=0;u<s.length;u++){const d=dn(s[u]);k4(d)&&(i[d]=Dt)}else if(s)for(const u in s){const d=dn(u);if(k4(d)){const f=s[u],h=i[d]=Ee(f)||Ue(f)?{type:f}:Pt({},f);if(h){const p=$4(Boolean,h.type),m=$4(String,h.type);h[0]=p>-1,h[1]=m<0||p<m,(p>-1||ut(h,"default"))&&l.push(d)}}}const c=[i,l];return it(e)&&o.set(e,c),c}function k4(e){return e[0]!=="$"&&!Cl(e)}function C4(e){return e===null?"null":typeof e=="function"?e.name||"":typeof e=="object"&&e.constructor&&e.constructor.name||""}function S4(e,t){return C4(e)===C4(t)}function $4(e,t){return Ee(t)?t.findIndex(n=>S4(n,e)):Ue(t)&&S4(t,e)?0:-1}const W7=e=>e[0]==="_"||e==="$stable",dw=e=>Ee(e)?e.map(Qo):[Qo(e)],VD=(e,t,n)=>{if(t._n)return t;const o=x((...r)=>dw(t(...r)),n);return o._c=!1,o},q7=(e,t,n)=>{const o=e._ctx;for(const r in e){if(W7(r))continue;const s=e[r];if(Ue(s))t[r]=VD(r,s,o);else if(s!=null){const i=dw(s);t[r]=()=>i}}},K7=(e,t)=>{const n=dw(t);e.slots.default=()=>n},zD=(e,t)=>{if(e.vnode.shapeFlag&32){const n=t._;n?(e.slots=Ct(t),j9(e.slots,"_",n)):q7(t,e.slots=my())}else e.slots=my(),t&&K7(e,t)},jD=(e,t,n)=>{const{vnode:o,slots:r}=e;let s=!0,i=Dt;if(o.shapeFlag&32){const l=t._;l?n&&l===1?s=!1:(Pt(r,t),!n&&l===1&&delete r._):(s=!t.$stable,q7(t,r)),i=t}else t&&(K7(e,t),i={default:1});if(s)for(const l in r)!W7(l)&&i[l]==null&&delete r[l]};function sg(e,t,n,o,r=!1){if(Ee(e)){e.forEach((f,h)=>sg(f,t&&(Ee(t)?t[h]:t),n,o,r));return}if(Na(o)&&!r)return;const s=o.shapeFlag&4?p0(o.component)||o.component.proxy:o.el,i=r?null:s,{i:l,r:a}=e,c=t&&t.r,u=l.refs===Dt?l.refs={}:l.refs,d=l.setupState;if(c!=null&&c!==a&&(je(c)?(u[c]=null,ut(d,c)&&(d[c]=null)):Yt(c)&&(c.value=null)),Ue(a))mi(a,l,12,[i,u]);else{const f=je(a),h=Yt(a);if(f||h){const p=()=>{if(e.f){const m=f?ut(d,a)?d[a]:u[a]:a.value;r?Ee(m)&&zb(m,s):Ee(m)?m.includes(s)||m.push(s):f?(u[a]=[s],ut(d,a)&&(d[a]=u[a])):(a.value=[s],e.k&&(u[e.k]=a.value))}else f?(u[a]=i,ut(d,a)&&(d[a]=i)):h&&(a.value=i,e.k&&(u[e.k]=i))};i?(p.id=-1,Gn(p,n)):p()}}}let Fi=!1;const HD=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",UD=e=>e.namespaceURI.includes("MathML"),Zp=e=>{if(HD(e))return"svg";if(UD(e))return"mathml"},Xp=e=>e.nodeType===8;function WD(e){const{mt:t,p:n,o:{patchProp:o,createText:r,nextSibling:s,parentNode:i,remove:l,insert:a,createComment:c}}=e,u=(w,C)=>{if(!C.hasChildNodes()){n(null,w,C),og(),C._vnode=w;return}Fi=!1,d(C.firstChild,w,null,null,null),og(),C._vnode=w,Fi&&console.error("Hydration completed but contains mismatches.")},d=(w,C,T,$,A,N=!1)=>{N=N||!!C.dynamicChildren;const P=Xp(w)&&w.data==="[",I=()=>m(w,C,T,$,A,P),{type:D,ref:V,shapeFlag:G,patchFlag:te}=C;let oe=w.nodeType;C.el=w,te===-2&&(N=!1,C.dynamicChildren=null);let J=null;switch(D){case vi:oe!==3?C.children===""?(a(C.el=r(""),i(w),w),J=w):J=I():(w.data!==C.children&&(Fi=!0,w.data=C.children),J=s(w));break;case Vn:E(w)?(J=s(w),y(C.el=w.content.firstChild,w,T)):oe!==8||P?J=I():J=s(w);break;case Pa:if(P&&(w=s(w),oe=w.nodeType),oe===1||oe===3){J=w;const q=!C.children.length;for(let X=0;X<C.staticCount;X++)q&&(C.children+=J.nodeType===1?J.outerHTML:J.data),X===C.staticCount-1&&(C.anchor=J),J=s(J);return P?s(J):J}else I();break;case Q:P?J=p(w,C,T,$,A,N):J=I();break;default:if(G&1)(oe!==1||C.type.toLowerCase()!==w.tagName.toLowerCase())&&!E(w)?J=I():J=f(w,C,T,$,A,N);else if(G&6){C.slotScopeIds=A;const q=i(w);if(P?J=v(w):Xp(w)&&w.data==="teleport start"?J=v(w,w.data,"teleport end"):J=s(w),t(C,q,null,T,$,Zp(q),N),Na(C)){let X;P?(X=b(Q),X.anchor=J?J.previousSibling:q.lastChild):X=w.nodeType===3?ne(""):b("div"),X.el=w,C.component.subTree=X}}else G&64?oe!==8?J=I():J=C.type.hydrate(w,C,T,$,A,N,e,h):G&128&&(J=C.type.hydrate(w,C,T,$,Zp(i(w)),A,N,e,d))}return V!=null&&sg(V,null,$,C),J},f=(w,C,T,$,A,N)=>{N=N||!!C.dynamicChildren;const{type:P,props:I,patchFlag:D,shapeFlag:V,dirs:G,transition:te}=C,oe=P==="input"||P==="option";if(oe||D!==-1){G&&$s(C,null,T,"created");let J=!1;if(E(w)){J=Z7($,te)&&T&&T.vnode.props&&T.vnode.props.appear;const X=w.content.firstChild;J&&te.beforeEnter(X),y(X,w,T),C.el=w=X}if(V&16&&!(I&&(I.innerHTML||I.textContent))){let X=h(w.firstChild,C,w,T,$,A,N);for(;X;){Fi=!0;const ee=X;X=X.nextSibling,l(ee)}}else V&8&&w.textContent!==C.children&&(Fi=!0,w.textContent=C.children);if(I)if(oe||!N||D&48)for(const X in I)(oe&&(X.endsWith("value")||X==="indeterminate")||cc(X)&&!Cl(X)||X[0]===".")&&o(w,X,null,I[X],void 0,void 0,T);else I.onClick&&o(w,"onClick",null,I.onClick,void 0,void 0,T);let q;(q=I&&I.onVnodeBeforeMount)&&Ao(q,T,C),G&&$s(C,null,T,"beforeMount"),((q=I&&I.onVnodeMounted)||G||J)&&k7(()=>{q&&Ao(q,T,C),J&&te.enter(w),G&&$s(C,null,T,"mounted")},$)}return w.nextSibling},h=(w,C,T,$,A,N,P)=>{P=P||!!C.dynamicChildren;const I=C.children,D=I.length;for(let V=0;V<D;V++){const G=P?I[V]:I[V]=Qo(I[V]);if(w)w=d(w,G,$,A,N,P);else{if(G.type===vi&&!G.children)continue;Fi=!0,n(null,G,T,null,$,A,Zp(T),N)}}return w},p=(w,C,T,$,A,N)=>{const{slotScopeIds:P}=C;P&&(A=A?A.concat(P):P);const I=i(w),D=h(s(w),C,I,T,$,A,N);return D&&Xp(D)&&D.data==="]"?s(C.anchor=D):(Fi=!0,a(C.anchor=c("]"),I,D),D)},m=(w,C,T,$,A,N)=>{if(Fi=!0,C.el=null,N){const D=v(w);for(;;){const V=s(w);if(V&&V!==D)l(V);else break}}const P=s(w),I=i(w);return l(w),n(null,C,I,P,T,$,Zp(I),A),P},v=(w,C="[",T="]")=>{let $=0;for(;w;)if(w=s(w),w&&Xp(w)&&(w.data===C&&$++,w.data===T)){if($===0)return s(w);$--}return w},y=(w,C,T)=>{const $=C.parentNode;$&&$.replaceChild(w,C);let A=T;for(;A;)A.vnode.el===C&&(A.vnode.el=A.subTree.el=w),A=A.parent},E=w=>w.nodeType===1&&w.tagName.toLowerCase()==="template";return[u,d]}const Gn=k7;function G7(e){return J7(e)}function Y7(e){return J7(e,WD)}function J7(e,t){const n=H9();n.__VUE__=!0;const{insert:o,remove:r,patchProp:s,createElement:i,createText:l,createComment:a,setText:c,setElementText:u,parentNode:d,nextSibling:f,setScopeId:h=dt,insertStaticContent:p}=e,m=(j,W,re,he=null,de=null,Se=null,Oe=void 0,be=null,$e=!!W.dynamicChildren)=>{if(j===W)return;j&&!Kr(j,W)&&(he=Z(j),Ce(j,de,Se,!0),j=null),W.patchFlag===-2&&($e=!1,W.dynamicChildren=null);const{type:ge,ref:De,shapeFlag:Ke}=W;switch(ge){case vi:v(j,W,re,he);break;case Vn:y(j,W,re,he);break;case Pa:j==null&&E(W,re,he,Oe);break;case Q:V(j,W,re,he,de,Se,Oe,be,$e);break;default:Ke&1?T(j,W,re,he,de,Se,Oe,be,$e):Ke&6?G(j,W,re,he,de,Se,Oe,be,$e):(Ke&64||Ke&128)&&ge.process(j,W,re,he,de,Se,Oe,be,$e,ie)}De!=null&&de&&sg(De,j&&j.ref,Se,W||j,!W)},v=(j,W,re,he)=>{if(j==null)o(W.el=l(W.children),re,he);else{const de=W.el=j.el;W.children!==j.children&&c(de,W.children)}},y=(j,W,re,he)=>{j==null?o(W.el=a(W.children||""),re,he):W.el=j.el},E=(j,W,re,he)=>{[j.el,j.anchor]=p(j.children,W,re,he,j.el,j.anchor)},w=({el:j,anchor:W},re,he)=>{let de;for(;j&&j!==W;)de=f(j),o(j,re,he),j=de;o(W,re,he)},C=({el:j,anchor:W})=>{let re;for(;j&&j!==W;)re=f(j),r(j),j=re;r(W)},T=(j,W,re,he,de,Se,Oe,be,$e)=>{W.type==="svg"?Oe="svg":W.type==="math"&&(Oe="mathml"),j==null?$(W,re,he,de,Se,Oe,be,$e):P(j,W,de,Se,Oe,be,$e)},$=(j,W,re,he,de,Se,Oe,be)=>{let $e,ge;const{props:De,shapeFlag:Ke,transition:se,dirs:Y}=j;if($e=j.el=i(j.type,Se,De&&De.is,De),Ke&8?u($e,j.children):Ke&16&&N(j.children,$e,null,he,de,F_(j,Se),Oe,be),Y&&$s(j,null,he,"created"),A($e,j,j.scopeId,Oe,he),De){for(const Ie in De)Ie!=="value"&&!Cl(Ie)&&s($e,Ie,null,De[Ie],Se,j.children,he,de,Fe);"value"in De&&s($e,"value",null,De.value,Se),(ge=De.onVnodeBeforeMount)&&Ao(ge,he,j)}Y&&$s(j,null,he,"beforeMount");const ae=Z7(de,se);ae&&se.beforeEnter($e),o($e,W,re),((ge=De&&De.onVnodeMounted)||ae||Y)&&Gn(()=>{ge&&Ao(ge,he,j),ae&&se.enter($e),Y&&$s(j,null,he,"mounted")},de)},A=(j,W,re,he,de)=>{if(re&&h(j,re),he)for(let Se=0;Se<he.length;Se++)h(j,he[Se]);if(de){let Se=de.subTree;if(W===Se){const Oe=de.vnode;A(j,Oe,Oe.scopeId,Oe.slotScopeIds,de.parent)}}},N=(j,W,re,he,de,Se,Oe,be,$e=0)=>{for(let ge=$e;ge<j.length;ge++){const De=j[ge]=be?il(j[ge]):Qo(j[ge]);m(null,De,W,re,he,de,Se,Oe,be)}},P=(j,W,re,he,de,Se,Oe)=>{const be=W.el=j.el;let{patchFlag:$e,dynamicChildren:ge,dirs:De}=W;$e|=j.patchFlag&16;const Ke=j.props||Dt,se=W.props||Dt;let Y;if(re&&Xl(re,!1),(Y=se.onVnodeBeforeUpdate)&&Ao(Y,re,W,j),De&&$s(W,j,re,"beforeUpdate"),re&&Xl(re,!0),ge?I(j.dynamicChildren,ge,be,re,he,F_(W,de),Se):Oe||X(j,W,be,null,re,he,F_(W,de),Se,!1),$e>0){if($e&16)D(be,W,Ke,se,re,he,de);else if($e&2&&Ke.class!==se.class&&s(be,"class",null,se.class,de),$e&4&&s(be,"style",Ke.style,se.style,de),$e&8){const ae=W.dynamicProps;for(let Ie=0;Ie<ae.length;Ie++){const We=ae[Ie],_e=Ke[We],He=se[We];(He!==_e||We==="value")&&s(be,We,_e,He,de,j.children,re,he,Fe)}}$e&1&&j.children!==W.children&&u(be,W.children)}else!Oe&&ge==null&&D(be,W,Ke,se,re,he,de);((Y=se.onVnodeUpdated)||De)&&Gn(()=>{Y&&Ao(Y,re,W,j),De&&$s(W,j,re,"updated")},he)},I=(j,W,re,he,de,Se,Oe)=>{for(let be=0;be<W.length;be++){const $e=j[be],ge=W[be],De=$e.el&&($e.type===Q||!Kr($e,ge)||$e.shapeFlag&70)?d($e.el):re;m($e,ge,De,null,he,de,Se,Oe,!0)}},D=(j,W,re,he,de,Se,Oe)=>{if(re!==he){if(re!==Dt)for(const be in re)!Cl(be)&&!(be in he)&&s(j,be,re[be],null,Oe,W.children,de,Se,Fe);for(const be in he){if(Cl(be))continue;const $e=he[be],ge=re[be];$e!==ge&&be!=="value"&&s(j,be,ge,$e,Oe,W.children,de,Se,Fe)}"value"in he&&s(j,"value",re.value,he.value,Oe)}},V=(j,W,re,he,de,Se,Oe,be,$e)=>{const ge=W.el=j?j.el:l(""),De=W.anchor=j?j.anchor:l("");let{patchFlag:Ke,dynamicChildren:se,slotScopeIds:Y}=W;Y&&(be=be?be.concat(Y):Y),j==null?(o(ge,re,he),o(De,re,he),N(W.children||[],re,De,de,Se,Oe,be,$e)):Ke>0&&Ke&64&&se&&j.dynamicChildren?(I(j.dynamicChildren,se,re,de,Se,Oe,be),(W.key!=null||de&&W===de.subTree)&&fw(j,W,!0)):X(j,W,re,De,de,Se,Oe,be,$e)},G=(j,W,re,he,de,Se,Oe,be,$e)=>{W.slotScopeIds=be,j==null?W.shapeFlag&512?de.ctx.activate(W,re,he,Oe,$e):te(W,re,he,de,Se,Oe,$e):oe(j,W,$e)},te=(j,W,re,he,de,Se,Oe)=>{const be=j.component=oE(j,he,de);if(qh(j)&&(be.ctx.renderer=ie),sE(be),be.asyncDep){if(de&&de.registerDep(be,J),!j.el){const $e=be.subTree=b(Vn);y(null,$e,W,re)}}else J(be,j,W,re,de,Se,Oe)},oe=(j,W,re)=>{const he=W.component=j.component;if(nD(j,W,re))if(he.asyncDep&&!he.asyncResolved){q(he,W,re);return}else he.next=W,YF(he.update),he.effect.dirty=!0,he.update();else W.el=j.el,he.vnode=W},J=(j,W,re,he,de,Se,Oe)=>{const be=()=>{if(j.isMounted){let{next:De,bu:Ke,u:se,parent:Y,vnode:ae}=j;{const rt=X7(j);if(rt){De&&(De.el=ae.el,q(j,De,Oe)),rt.asyncDep.then(()=>{j.isUnmounted||be()});return}}let Ie=De,We;Xl(j,!1),De?(De.el=ae.el,q(j,De,Oe)):De=ae,Ke&&au(Ke),(We=De.props&&De.props.onVnodeBeforeUpdate)&&Ao(We,Y,De,ae),Xl(j,!0);const _e=Fm(j),He=j.subTree;j.subTree=_e,m(He,_e,d(He.el),Z(He),j,de,Se),De.el=_e.el,Ie===null&&nw(j,_e.el),se&&Gn(se,de),(We=De.props&&De.props.onVnodeUpdated)&&Gn(()=>Ao(We,Y,De,ae),de)}else{let De;const{el:Ke,props:se}=W,{bm:Y,m:ae,parent:Ie}=j,We=Na(W);if(Xl(j,!1),Y&&au(Y),!We&&(De=se&&se.onVnodeBeforeMount)&&Ao(De,Ie,W),Xl(j,!0),Ke&&et){const _e=()=>{j.subTree=Fm(j),et(Ke,j.subTree,j,de,null)};We?W.type.__asyncLoader().then(()=>!j.isUnmounted&&_e()):_e()}else{const _e=j.subTree=Fm(j);m(null,_e,re,he,j,de,Se),W.el=_e.el}if(ae&&Gn(ae,de),!We&&(De=se&&se.onVnodeMounted)){const _e=W;Gn(()=>Ao(De,Ie,_e),de)}(W.shapeFlag&256||Ie&&Na(Ie.vnode)&&Ie.vnode.shapeFlag&256)&&j.a&&Gn(j.a,de),j.isMounted=!0,W=re=he=null}},$e=j.effect=new xu(be,dt,()=>a0(ge),j.scope),ge=j.update=()=>{$e.dirty&&$e.run()};ge.id=j.uid,Xl(j,!0),ge()},q=(j,W,re)=>{W.component=j;const he=j.vnode.props;j.vnode=W,j.next=null,BD(j,W.props,he,re),jD(j,W.children,re),Fl(),p4(j),Dl()},X=(j,W,re,he,de,Se,Oe,be,$e=!1)=>{const ge=j&&j.children,De=j?j.shapeFlag:0,Ke=W.children,{patchFlag:se,shapeFlag:Y}=W;if(se>0){if(se&128){R(ge,Ke,re,he,de,Se,Oe,be,$e);return}else if(se&256){ee(ge,Ke,re,he,de,Se,Oe,be,$e);return}}Y&8?(De&16&&Fe(ge,de,Se),Ke!==ge&&u(re,Ke)):De&16?Y&16?R(ge,Ke,re,he,de,Se,Oe,be,$e):Fe(ge,de,Se,!0):(De&8&&u(re,""),Y&16&&N(Ke,re,he,de,Se,Oe,be,$e))},ee=(j,W,re,he,de,Se,Oe,be,$e)=>{j=j||su,W=W||su;const ge=j.length,De=W.length,Ke=Math.min(ge,De);let se;for(se=0;se<Ke;se++){const Y=W[se]=$e?il(W[se]):Qo(W[se]);m(j[se],Y,re,null,de,Se,Oe,be,$e)}ge>De?Fe(j,de,Se,!0,!1,Ke):N(W,re,he,de,Se,Oe,be,$e,Ke)},R=(j,W,re,he,de,Se,Oe,be,$e)=>{let ge=0;const De=W.length;let Ke=j.length-1,se=De-1;for(;ge<=Ke&&ge<=se;){const Y=j[ge],ae=W[ge]=$e?il(W[ge]):Qo(W[ge]);if(Kr(Y,ae))m(Y,ae,re,null,de,Se,Oe,be,$e);else break;ge++}for(;ge<=Ke&&ge<=se;){const Y=j[Ke],ae=W[se]=$e?il(W[se]):Qo(W[se]);if(Kr(Y,ae))m(Y,ae,re,null,de,Se,Oe,be,$e);else break;Ke--,se--}if(ge>Ke){if(ge<=se){const Y=se+1,ae=Y<De?W[Y].el:he;for(;ge<=se;)m(null,W[ge]=$e?il(W[ge]):Qo(W[ge]),re,ae,de,Se,Oe,be,$e),ge++}}else if(ge>se)for(;ge<=Ke;)Ce(j[ge],de,Se,!0),ge++;else{const Y=ge,ae=ge,Ie=new Map;for(ge=ae;ge<=se;ge++){const gt=W[ge]=$e?il(W[ge]):Qo(W[ge]);gt.key!=null&&Ie.set(gt.key,ge)}let We,_e=0;const He=se-ae+1;let rt=!1,Qe=0;const yt=new Array(He);for(ge=0;ge<He;ge++)yt[ge]=0;for(ge=Y;ge<=Ke;ge++){const gt=j[ge];if(_e>=He){Ce(gt,de,Se,!0);continue}let Jt;if(gt.key!=null)Jt=Ie.get(gt.key);else for(We=ae;We<=se;We++)if(yt[We-ae]===0&&Kr(gt,W[We])){Jt=We;break}Jt===void 0?Ce(gt,de,Se,!0):(yt[Jt-ae]=ge+1,Jt>=Qe?Qe=Jt:rt=!0,m(gt,W[Jt],re,null,de,Se,Oe,be,$e),_e++)}const Kt=rt?qD(yt):su;for(We=Kt.length-1,ge=He-1;ge>=0;ge--){const gt=ae+ge,Jt=W[gt],an=gt+1<De?W[gt+1].el:he;yt[ge]===0?m(null,Jt,re,an,de,Se,Oe,be,$e):rt&&(We<0||ge!==Kt[We]?ye(Jt,re,an,2):We--)}}},ye=(j,W,re,he,de=null)=>{const{el:Se,type:Oe,transition:be,children:$e,shapeFlag:ge}=j;if(ge&6){ye(j.component.subTree,W,re,he);return}if(ge&128){j.suspense.move(W,re,he);return}if(ge&64){Oe.move(j,W,re,ie);return}if(Oe===Q){o(Se,W,re);for(let Ke=0;Ke<$e.length;Ke++)ye($e[Ke],W,re,he);o(j.anchor,W,re);return}if(Oe===Pa){w(j,W,re);return}if(he!==2&&ge&1&&be)if(he===0)be.beforeEnter(Se),o(Se,W,re),Gn(()=>be.enter(Se),de);else{const{leave:Ke,delayLeave:se,afterLeave:Y}=be,ae=()=>o(Se,W,re),Ie=()=>{Ke(Se,()=>{ae(),Y&&Y()})};se?se(Se,ae,Ie):Ie()}else o(Se,W,re)},Ce=(j,W,re,he=!1,de=!1)=>{const{type:Se,props:Oe,ref:be,children:$e,dynamicChildren:ge,shapeFlag:De,patchFlag:Ke,dirs:se}=j;if(be!=null&&sg(be,null,re,j,!0),De&256){W.ctx.deactivate(j);return}const Y=De&1&&se,ae=!Na(j);let Ie;if(ae&&(Ie=Oe&&Oe.onVnodeBeforeUnmount)&&Ao(Ie,W,j),De&6)Ye(j.component,re,he);else{if(De&128){j.suspense.unmount(re,he);return}Y&&$s(j,null,W,"beforeUnmount"),De&64?j.type.remove(j,W,re,de,ie,he):ge&&(Se!==Q||Ke>0&&Ke&64)?Fe(ge,W,re,!1,!0):(Se===Q&&Ke&384||!de&&De&16)&&Fe($e,W,re),he&&U(j)}(ae&&(Ie=Oe&&Oe.onVnodeUnmounted)||Y)&&Gn(()=>{Ie&&Ao(Ie,W,j),Y&&$s(j,null,W,"unmounted")},re)},U=j=>{const{type:W,el:re,anchor:he,transition:de}=j;if(W===Q){xe(re,he);return}if(W===Pa){C(j);return}const Se=()=>{r(re),de&&!de.persisted&&de.afterLeave&&de.afterLeave()};if(j.shapeFlag&1&&de&&!de.persisted){const{leave:Oe,delayLeave:be}=de,$e=()=>Oe(re,Se);be?be(j.el,Se,$e):$e()}else Se()},xe=(j,W)=>{let re;for(;j!==W;)re=f(j),r(j),j=re;r(W)},Ye=(j,W,re)=>{const{bum:he,scope:de,update:Se,subTree:Oe,um:be}=j;he&&au(he),de.stop(),Se&&(Se.active=!1,Ce(Oe,j,W,re)),be&&Gn(be,W),Gn(()=>{j.isUnmounted=!0},W),W&&W.pendingBranch&&!W.isUnmounted&&j.asyncDep&&!j.asyncResolved&&j.suspenseId===W.pendingId&&(W.deps--,W.deps===0&&W.resolve())},Fe=(j,W,re,he=!1,de=!1,Se=0)=>{for(let Oe=Se;Oe<j.length;Oe++)Ce(j[Oe],W,re,he,de)},Z=j=>j.shapeFlag&6?Z(j.component.subTree):j.shapeFlag&128?j.suspense.next():f(j.anchor||j.el);let ce=!1;const pe=(j,W,re)=>{j==null?W._vnode&&Ce(W._vnode,null,null,!0):m(W._vnode||null,j,W,null,null,null,re),ce||(ce=!0,p4(),og(),ce=!1),W._vnode=j},ie={p:m,um:Ce,m:ye,r:U,mt:te,mc:N,pc:X,pbc:I,n:Z,o:e};let Le,et;return t&&([Le,et]=t(ie)),{render:pe,hydrate:Le,createApp:RD(pe,Le)}}function F_({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 Xl({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function Z7(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function fw(e,t,n=!1){const o=e.children,r=t.children;if(Ee(o)&&Ee(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]=il(r[s]),l.el=i.el),n||fw(i,l)),l.type===vi&&(l.el=i.el)}}function qD(e){const t=e.slice(),n=[0];let o,r,s,i,l;const a=e.length;for(o=0;o<a;o++){const c=e[o];if(c!==0){if(r=n[n.length-1],e[r]<c){t[o]=r,n.push(o);continue}for(s=0,i=n.length-1;s<i;)l=s+i>>1,e[n[l]]<c?s=l+1:i=l;c<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 X7(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:X7(t)}const KD=e=>e.__isTeleport,Af=e=>e&&(e.disabled||e.disabled===""),E4=e=>typeof SVGElement<"u"&&e instanceof SVGElement,x4=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,_y=(e,t)=>{const n=e&&e.to;return je(n)?t?t(n):null:n},GD={name:"Teleport",__isTeleport:!0,process(e,t,n,o,r,s,i,l,a,c){const{mc:u,pc:d,pbc:f,o:{insert:h,querySelector:p,createText:m,createComment:v}}=c,y=Af(t.props);let{shapeFlag:E,children:w,dynamicChildren:C}=t;if(e==null){const T=t.el=m(""),$=t.anchor=m("");h(T,n,o),h($,n,o);const A=t.target=_y(t.props,p),N=t.targetAnchor=m("");A&&(h(N,A),i==="svg"||E4(A)?i="svg":(i==="mathml"||x4(A))&&(i="mathml"));const P=(I,D)=>{E&16&&u(w,I,D,r,s,i,l,a)};y?P(n,$):A&&P(A,N)}else{t.el=e.el;const T=t.anchor=e.anchor,$=t.target=e.target,A=t.targetAnchor=e.targetAnchor,N=Af(e.props),P=N?n:$,I=N?T:A;if(i==="svg"||E4($)?i="svg":(i==="mathml"||x4($))&&(i="mathml"),C?(f(e.dynamicChildren,C,P,r,s,i,l),fw(e,t,!0)):a||d(e,t,P,I,r,s,i,l,!1),y)N?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Qp(t,n,T,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const D=t.target=_y(t.props,p);D&&Qp(t,D,null,c,0)}else N&&Qp(t,$,A,c,1)}Q7(t)},remove(e,t,n,o,{um:r,o:{remove:s}},i){const{shapeFlag:l,children:a,anchor:c,targetAnchor:u,target:d,props:f}=e;if(d&&s(u),i&&s(c),l&16){const h=i||!Af(f);for(let p=0;p<a.length;p++){const m=a[p];r(m,t,n,h,!!m.dynamicChildren)}}},move:Qp,hydrate:YD};function Qp(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:c,props:u}=e,d=s===2;if(d&&o(i,t,n),(!d||Af(u))&&a&16)for(let f=0;f<c.length;f++)r(c[f],t,n,2);d&&o(l,t,n)}function YD(e,t,n,o,r,s,{o:{nextSibling:i,parentNode:l,querySelector:a}},c){const u=t.target=_y(t.props,a);if(u){const d=u._lpa||u.firstChild;if(t.shapeFlag&16)if(Af(t.props))t.anchor=c(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,u._lpa=t.targetAnchor&&i(t.targetAnchor);break}c(d,t,u,n,o,r,s)}Q7(t)}return t.anchor&&i(t.anchor)}const sr=GD;function Q7(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 Q=Symbol.for("v-fgt"),vi=Symbol.for("v-txt"),Vn=Symbol.for("v-cmt"),Pa=Symbol.for("v-stc"),Of=[];let No=null;function g(e=!1){Of.push(No=e?null:[])}function eE(){Of.pop(),No=Of[Of.length-1]||null}let Ka=1;function vy(e){Ka+=e}function tE(e){return e.dynamicChildren=Ka>0?No||su:null,eE(),Ka>0&&No&&No.push(e),e}function k(e,t,n,o,r,s){return tE(_(e,t,n,o,r,s,!0))}function L(e,t,n,o,r){return tE(b(e,t,n,o,r,!0))}function uo(e){return e?e.__v_isVNode===!0:!1}function Kr(e,t){return e.type===t.type&&e.key===t.key}function JD(e){}const nE=({key:e})=>e??null,Dm=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?je(e)||Yt(e)||Ue(e)?{i:xn,r:e,k:t,f:!!n}:e:null);function _(e,t=null,n=null,o=0,r=null,s=e===Q?0:1,i=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&nE(t),ref:t&&Dm(t),scopeId:u0,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:xn};return l?(pw(a,n),s&128&&e.normalize(a)):n&&(a.shapeFlag|=je(n)?8:16),Ka>0&&!i&&No&&(a.patchFlag>0||s&6)&&a.patchFlag!==32&&No.push(a),a}const b=ZD;function ZD(e,t=null,n=null,o=0,r=null,s=!1){if((!e||e===b7)&&(e=Vn),uo(e)){const l=rs(e,t,!0);return n&&pw(l,n),Ka>0&&!s&&No&&(l.shapeFlag&6?No[No.indexOf(e)]=l:No.push(l)),l.patchFlag|=-2,l}if(oB(e)&&(e=e.__vccOpts),t){t=hw(t);let{class:l,style:a}=t;l&&!je(l)&&(t.class=F(l)),it(a)&&(Zb(a)&&!Ee(a)&&(a=Pt({},a)),t.style=Be(a))}const i=je(e)?1:w7(e)?128:KD(e)?64:it(e)?4:Ue(e)?2:0;return _(e,t,n,o,r,i,s,!0)}function hw(e){return e?Zb(e)||j7(e)?Pt({},e):e:null}function rs(e,t,n=!1){const{props:o,ref:r,patchFlag:s,children:i}=e,l=t?pn(o||{},t):o;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&nE(l),ref:t&&t.ref?n&&r?Ee(r)?r.concat(Dm(t)):[r,Dm(t)]:Dm(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!==Q?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&&rs(e.ssContent),ssFallback:e.ssFallback&&rs(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function ne(e=" ",t=0){return b(vi,null,e,t)}function h0(e,t){const n=b(Pa,null,e);return n.staticCount=t,n}function O(e="",t=!1){return t?(g(),L(Vn,null,e)):b(Vn,null,e)}function Qo(e){return e==null||typeof e=="boolean"?b(Vn):Ee(e)?b(Q,null,e.slice()):typeof e=="object"?il(e):b(vi,null,String(e))}function il(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:rs(e)}function pw(e,t){let n=0;const{shapeFlag:o}=e;if(t==null)t=null;else if(Ee(t))n=16;else if(typeof t=="object")if(o&65){const r=t.default;r&&(r._c&&(r._d=!1),pw(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!j7(t)?t._ctx=xn:r===3&&xn&&(xn.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Ue(t)?(t={default:t,_ctx:xn},n=32):(t=String(t),o&64?(n=16,t=[ne(t)]):n=8);e.children=t,e.shapeFlag|=n}function pn(...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=F([t.class,o.class]));else if(r==="style")t.style=Be([t.style,o.style]);else if(cc(r)){const s=t[r],i=o[r];i&&s!==i&&!(Ee(s)&&s.includes(i))&&(t[r]=s?[].concat(s,i):i)}else r!==""&&(t[r]=o[r])}return t}function Ao(e,t,n,o=null){rr(e,t,7,[n,o])}const XD=V7();let QD=0;function oE(e,t,n){const o=e.type,r=(t?t.appContext:e.appContext)||XD,s={uid:QD++,vnode:e,type:o,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,scope:new Ub(!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:U7(o,r),emitsOptions:_7(o,r),emit:null,emitted:null,propsDefaults:Dt,inheritAttrs:o.inheritAttrs,ctx:Dt,data:Dt,props:Dt,attrs:Dt,slots:Dt,refs:Dt,setupState:Dt,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=ZF.bind(null,s),e.ce&&e.ce(s),s}let In=null;const nt=()=>In||xn;let ig,yy;{const e=H9(),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)}};ig=t("__VUE_INSTANCE_SETTERS__",n=>In=n),yy=t("__VUE_SSR_SETTERS__",n=>Kh=n)}const Ga=e=>{const t=In;return ig(e),e.scope.on(),()=>{e.scope.off(),ig(t)}},by=()=>{In&&In.scope.off(),ig(null)};function rE(e){return e.vnode.shapeFlag&4}let Kh=!1;function sE(e,t=!1){t&&yy(t);const{props:n,children:o}=e.vnode,r=rE(e);DD(e,n,r,t),zD(e,o);const s=r?eB(e,t):void 0;return t&&yy(!1),s}function eB(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,fy);const{setup:o}=n;if(o){const r=e.setupContext=o.length>1?aE(e):null,s=Ga(e);Fl();const i=mi(o,e,0,[e.props,r]);if(Dl(),s(),lh(i)){if(i.then(by,by),t)return i.then(l=>{wy(e,l,t)}).catch(l=>{fc(l,e,0)});e.asyncDep=i}else wy(e,i,t)}else lE(e,t)}function wy(e,t,n){Ue(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:it(t)&&(e.setupState=ew(t)),lE(e,n)}let lg,ky;function iE(e){lg=e,ky=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,vD))}}const tB=()=>!lg;function lE(e,t,n){const o=e.type;if(!e.render){if(!t&&lg&&!o.render){const r=o.template||uw(e).template;if(r){const{isCustomElement:s,compilerOptions:i}=e.appContext.config,{delimiters:l,compilerOptions:a}=o,c=Pt(Pt({isCustomElement:s,delimiters:l},i),a);o.render=lg(r,c)}}e.render=o.render||dt,ky&&ky(e)}{const r=Ga(e);Fl();try{AD(e)}finally{Dl(),r()}}}const nB={get(e,t){return Bo(e,"get",""),e[t]}};function aE(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,nB),slots:e.slots,emit:e.emit,expose:t}}function p0(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(ew(ns(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Mf)return Mf[n](e)},has(t,n){return n in t||n in Mf}}))}function Cy(e,t=!0){return Ue(e)?e.displayName||e.name:e.name||t&&e.__name}function oB(e){return Ue(e)&&"__vccOpts"in e}const B=(e,t)=>c7(e,t,Kh);function rB(e,t,n=Dt){const o=nt(),r=dn(t),s=Io(t),i=d7((a,c)=>{let u;return E7(()=>{const d=e[t];ts(u,d)&&(u=d,c())}),{get(){return a(),n.get?n.get(u):u},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))&&ts(d,u)&&(u=d,c()),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 Xe(e,t,n){const o=arguments.length;return o===2?it(t)&&!Ee(t)?uo(t)?b(e,null,[t]):b(e,t):b(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):o===3&&uo(n)&&(n=[n]),b(e,t,n))}function sB(){}function iB(e,t,n,o){const r=n[o];if(r&&cE(r,e))return r;const s=t();return s.memo=e.slice(),n[o]=s}function cE(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let o=0;o<n.length;o++)if(ts(n[o],t[o]))return!1;return Ka>0&&No&&No.push(e),!0}const uE="3.4.23",dE=dt,lB=qF,aB=Fc,cB=g7,uB={createComponentInstance:oE,setupComponent:sE,renderComponentRoot:Fm,setCurrentRenderingInstance:fh,isVNode:uo,normalizeVNode:Qo},dB=uB,fB=null,hB=null,pB=null;/** |
| 14 |
* @vue/runtime-dom v3.4.23 |
| 15 |
* (c) 2018-present Yuxi (Evan) You and Vue contributors |
| 16 |
* @license MIT |
| 17 |
**/const mB="http://www.w3.org/2000/svg",gB="http://www.w3.org/1998/Math/MathML",ll=typeof document<"u"?document:null,T4=ll&&ll.createElement("template"),_B={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"?ll.createElementNS(mB,e):t==="mathml"?ll.createElementNS(gB,e):ll.createElement(e,n?{is:n}:void 0);return e==="select"&&o&&o.multiple!=null&&r.setAttribute("multiple",o.multiple),r},createText:e=>ll.createTextNode(e),createComment:e=>ll.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ll.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{T4.innerHTML=o==="svg"?`<svg>${e}</svg>`:o==="mathml"?`<math>${e}</math>`:e;const l=T4.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]}},Di="transition",Rd="animation",Au=Symbol("_vtc"),ur=(e,{slots:t})=>Xe(T7,hE(e),t);ur.displayName="Transition";const fE={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},vB=ur.props=Pt({},lw,fE),Ql=(e,t=[])=>{Ee(e)?e.forEach(n=>n(...t)):e&&e(...t)},M4=e=>e?Ee(e)?e.some(t=>t.length>1):e.length>1:!1;function hE(e){const t={};for(const V in e)V in fE||(t[V]=e[V]);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:c=i,appearToClass:u=l,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:h=`${n}-leave-to`}=e,p=yB(r),m=p&&p[0],v=p&&p[1],{onBeforeEnter:y,onEnter:E,onEnterCancelled:w,onLeave:C,onLeaveCancelled:T,onBeforeAppear:$=y,onAppear:A=E,onAppearCancelled:N=w}=t,P=(V,G,te)=>{Ui(V,G?u:l),Ui(V,G?c:i),te&&te()},I=(V,G)=>{V._isLeaving=!1,Ui(V,d),Ui(V,h),Ui(V,f),G&&G()},D=V=>(G,te)=>{const oe=V?A:E,J=()=>P(G,V,te);Ql(oe,[G,J]),A4(()=>{Ui(G,V?a:s),ti(G,V?u:l),M4(oe)||O4(G,o,m,J)})};return Pt(t,{onBeforeEnter(V){Ql(y,[V]),ti(V,s),ti(V,i)},onBeforeAppear(V){Ql($,[V]),ti(V,a),ti(V,c)},onEnter:D(!1),onAppear:D(!0),onLeave(V,G){V._isLeaving=!0;const te=()=>I(V,G);ti(V,d),mE(),ti(V,f),A4(()=>{V._isLeaving&&(Ui(V,d),ti(V,h),M4(C)||O4(V,o,v,te))}),Ql(C,[V,te])},onEnterCancelled(V){P(V,!1),Ql(w,[V])},onAppearCancelled(V){P(V,!0),Ql(N,[V])},onLeaveCancelled(V){I(V),Ql(T,[V])}})}function yB(e){if(e==null)return null;if(it(e))return[D_(e.enter),D_(e.leave)];{const t=D_(e);return[t,t]}}function D_(e){return eg(e)}function ti(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Au]||(e[Au]=new Set)).add(t)}function Ui(e,t){t.split(/\s+/).forEach(o=>o&&e.classList.remove(o));const n=e[Au];n&&(n.delete(t),n.size||(e[Au]=void 0))}function A4(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let bB=0;function O4(e,t,n,o){const r=e._endId=++bB,s=()=>{r===e._endId&&o()};if(n)return setTimeout(s,n);const{type:i,timeout:l,propCount:a}=pE(e,t);if(!i)return o();const c=i+"end";let u=0;const d=()=>{e.removeEventListener(c,f),s()},f=h=>{h.target===e&&++u>=a&&d()};setTimeout(()=>{u<a&&d()},l+1),e.addEventListener(c,f)}function pE(e,t){const n=window.getComputedStyle(e),o=p=>(n[p]||"").split(", "),r=o(`${Di}Delay`),s=o(`${Di}Duration`),i=I4(r,s),l=o(`${Rd}Delay`),a=o(`${Rd}Duration`),c=I4(l,a);let u=null,d=0,f=0;t===Di?i>0&&(u=Di,d=i,f=s.length):t===Rd?c>0&&(u=Rd,d=c,f=a.length):(d=Math.max(i,c),u=d>0?i>c?Di:Rd:null,f=u?u===Di?s.length:a.length:0);const h=u===Di&&/\b(transform|all)(,|$)/.test(o(`${Di}Property`).toString());return{type:u,timeout:d,propCount:f,hasTransform:h}}function I4(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,o)=>N4(n)+N4(e[o])))}function N4(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function mE(){return document.body.offsetHeight}function wB(e,t,n){const o=e[Au];o&&(t=(t?[t,...o]:[...o]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const ag=Symbol("_vod"),gE=Symbol("_vsh"),sn={beforeMount(e,{value:t},{transition:n}){e[ag]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Fd(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),Fd(e,!0),o.enter(e)):o.leave(e,()=>{Fd(e,!1)}):Fd(e,t))},beforeUnmount(e,{value:t}){Fd(e,t)}};function Fd(e,t){e.style.display=t?e[ag]:"none",e[gE]=!t}function kB(){sn.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}const _E=Symbol("");function CB(e){const t=nt();if(!t)return;const n=t.ut=(r=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(s=>$y(s,r))},o=()=>{const r=e(t.proxy);Sy(t.subTree,r),n(r)};mt(()=>{$7(o);const r=new MutationObserver(o);r.observe(t.subTree.el.parentNode,{childList:!0}),Us(()=>r.disconnect())})}function Sy(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{Sy(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)$y(e.el,t);else if(e.type===Q)e.children.forEach(n=>Sy(n,t));else if(e.type===Pa){let{el:n,anchor:o}=e;for(;n&&($y(n,t),n!==o);)n=n.nextSibling}}function $y(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[_E]=o}}const SB=/(^|;)\s*display\s*:/;function $B(e,t,n){const o=e.style,r=je(n);let s=!1;if(n&&!r){if(t)if(je(t))for(const i of t.split(";")){const l=i.slice(0,i.indexOf(":")).trim();n[l]==null&&Bm(o,l,"")}else for(const i in t)n[i]==null&&Bm(o,i,"");for(const i in n)i==="display"&&(s=!0),Bm(o,i,n[i])}else if(r){if(t!==n){const i=o[_E];i&&(n+=";"+i),o.cssText=n,s=SB.test(n)}}else t&&e.removeAttribute("style");ag in e&&(e[ag]=s?o.display:"",e[gE]&&(o.display="none"))}const P4=/\s*!important$/;function Bm(e,t,n){if(Ee(n))n.forEach(o=>Bm(e,t,o));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=EB(e,t);P4.test(n)?e.setProperty(Io(o),n.replace(P4,""),"important"):e[o]=n}}const L4=["Webkit","Moz","ms"],B_={};function EB(e,t){const n=B_[t];if(n)return n;let o=dn(t);if(o!=="filter"&&o in e)return B_[t]=o;o=Rl(o);for(let r=0;r<L4.length;r++){const s=L4[r]+o;if(s in e)return B_[t]=s}return t}const R4="http://www.w3.org/1999/xlink";function xB(e,t,n,o,r){if(o&&t.startsWith("xlink:"))n==null?e.removeAttributeNS(R4,t.slice(6,t.length)):e.setAttributeNS(R4,t,n);else{const s=uF(t);n==null||s&&!W9(n)?e.removeAttribute(t):e.setAttribute(t,s?"":n)}}function TB(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 c=l==="OPTION"?e.getAttribute("value")||"":e.value,u=n??"";(c!==u||!("_value"in e))&&(e.value=u),n==null&&e.removeAttribute(t),e._value=n;return}let a=!1;if(n===""||n==null){const c=typeof e[t];c==="boolean"?n=W9(n):n==null&&c==="string"?(n="",a=!0):c==="number"&&(n=0,a=!0)}try{e[t]=n}catch{}a&&e.removeAttribute(t)}function ci(e,t,n,o){e.addEventListener(t,n,o)}function MB(e,t,n,o){e.removeEventListener(t,n,o)}const F4=Symbol("_vei");function AB(e,t,n,o,r=null){const s=e[F4]||(e[F4]={}),i=s[t];if(o&&i)i.value=o;else{const[l,a]=OB(t);if(o){const c=s[t]=PB(o,r);ci(e,l,c,a)}else i&&(MB(e,l,i,a),s[t]=void 0)}}const D4=/(?:Once|Passive|Capture)$/;function OB(e){let t;if(D4.test(e)){t={};let o;for(;o=e.match(D4);)e=e.slice(0,e.length-o[0].length),t[o[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Io(e.slice(2)),t]}let V_=0;const IB=Promise.resolve(),NB=()=>V_||(IB.then(()=>V_=0),V_=Date.now());function PB(e,t){const n=o=>{if(!o._vts)o._vts=Date.now();else if(o._vts<=n.attached)return;rr(LB(o,n.value),t,5,[o])};return n.value=e,n.attached=NB(),n}function LB(e,t){if(Ee(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 B4=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,RB=(e,t,n,o,r,s,i,l,a)=>{const c=r==="svg";t==="class"?wB(e,o,c):t==="style"?$B(e,n,o):cc(t)?Vb(t)||AB(e,t,n,o,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):FB(e,t,o,c))?TB(e,t,o,s,i,l,a):(t==="true-value"?e._trueValue=o:t==="false-value"&&(e._falseValue=o),xB(e,t,o,c))};function FB(e,t,n,o){if(o)return!!(t==="innerHTML"||t==="textContent"||t in e&&B4(t)&&Ue(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 B4(t)&&je(n)?!1:t in e}/*! #__NO_SIDE_EFFECTS__ */function vE(e,t){const n=K(e);class o extends m0{constructor(s){super(n,s,t)}}return o.def=n,o}/*! #__NO_SIDE_EFFECTS__ */const DB=e=>vE(e,ME),BB=typeof HTMLElement<"u"?HTMLElement:class{};class m0 extends BB{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),tt(()=>{this._connected||(yi(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&&!Ee(s))for(const a in s){const c=s[a];(c===Number||c&&c.type===Number)&&(a in this._props&&(this._props[a]=eg(this._props[a])),(l||(l=Object.create(null)))[dn(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=Ee(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(dn))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=dn(t);this._numberProps&&this._numberProps[o]&&(n=eg(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(Io(t),""):typeof n=="string"||typeof n=="number"?this.setAttribute(Io(t),n+""):n||this.removeAttribute(Io(t))))}_update(){yi(this._createVNode(),this.shadowRoot)}_createVNode(){const t=b(this._def,Pt({},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),Io(s)!==s&&o(Io(s),i)};let r=this;for(;r=r&&(r.parentNode||r.host);)if(r instanceof m0){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 VB(e="$style"){{const t=nt();if(!t)return Dt;const n=t.type.__cssModules;if(!n)return Dt;const o=n[e];return o||Dt}}const yE=new WeakMap,bE=new WeakMap,cg=Symbol("_moveCb"),V4=Symbol("_enterCb"),wE={name:"TransitionGroup",props:Pt({},vB,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=nt(),o=iw();let r,s;return Bl(()=>{if(!r.length)return;const i=e.moveClass||`${e.name||"v"}-move`;if(!WB(r[0].el,n.vnode.el,i))return;r.forEach(jB),r.forEach(HB);const l=r.filter(UB);mE(),l.forEach(a=>{const c=a.el,u=c.style;ti(c,i),u.transform=u.webkitTransform=u.transitionDuration="";const d=c[cg]=f=>{f&&f.target!==c||(!f||/transform$/.test(f.propertyName))&&(c.removeEventListener("transitionend",d),c[cg]=null,Ui(c,i))};c.addEventListener("transitionend",d)})}),()=>{const i=Ct(e),l=hE(i);let a=i.tag||Q;if(r=[],s)for(let c=0;c<s.length;c++){const u=s[c];u.el&&u.el instanceof Element&&(r.push(u),qa(u,Mu(u,l,o,n)),yE.set(u,u.el.getBoundingClientRect()))}s=t.default?d0(t.default()):[];for(let c=0;c<s.length;c++){const u=s[c];u.key!=null&&qa(u,Mu(u,l,o,n))}return b(a,null,s)}}},zB=e=>delete e.mode;wE.props;const g0=wE;function jB(e){const t=e.el;t[cg]&&t[cg](),t[V4]&&t[V4]()}function HB(e){bE.set(e,e.el.getBoundingClientRect())}function UB(e){const t=yE.get(e),n=bE.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 WB(e,t,n){const o=e.cloneNode(),r=e[Au];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}=pE(o);return s.removeChild(o),i}const Ol=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Ee(t)?n=>au(t,n):t};function qB(e){e.target.composing=!0}function z4(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const xr=Symbol("_assign"),Ou={created(e,{modifiers:{lazy:t,trim:n,number:o}},r){e[xr]=Ol(r);const s=o||r.props&&r.props.type==="number";ci(e,t?"change":"input",i=>{if(i.target.composing)return;let l=e.value;n&&(l=l.trim()),s&&(l=Q1(l)),e[xr](l)}),n&&ci(e,"change",()=>{e.value=e.value.trim()}),t||(ci(e,"compositionstart",qB),ci(e,"compositionend",z4),ci(e,"change",z4))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:o,number:r}},s){if(e[xr]=Ol(s),e.composing)return;const i=(r||e.type==="number")&&!/^0\d/.test(e.value)?Q1(e.value):e.value,l=t??"";i!==l&&(document.activeElement===e&&e.type!=="range"&&(n||o&&e.value.trim()===l)||(e.value=l))}},Ya={deep:!0,created(e,t,n){e[xr]=Ol(n),ci(e,"change",()=>{const o=e._modelValue,r=Iu(e),s=e.checked,i=e[xr];if(Ee(o)){const l=r0(o,r),a=l!==-1;if(s&&!a)i(o.concat(r));else if(!s&&a){const c=[...o];c.splice(l,1),i(c)}}else if(uc(o)){const l=new Set(o);s?l.add(r):l.delete(r),i(l)}else i(CE(e,s))})},mounted:j4,beforeUpdate(e,t,n){e[xr]=Ol(n),j4(e,t,n)}};function j4(e,{value:t,oldValue:n},o){e._modelValue=t,Ee(t)?e.checked=r0(t,o.props.value)>-1:uc(t)?e.checked=t.has(o.props.value):t!==n&&(e.checked=Al(t,CE(e,!0)))}const Gh={created(e,{value:t},n){e.checked=Al(t,n.props.value),e[xr]=Ol(n),ci(e,"change",()=>{e[xr](Iu(e))})},beforeUpdate(e,{value:t,oldValue:n},o){e[xr]=Ol(o),t!==n&&(e.checked=Al(t,o.props.value))}},kE={deep:!0,created(e,{value:t,modifiers:{number:n}},o){const r=uc(t);ci(e,"change",()=>{const s=Array.prototype.filter.call(e.options,i=>i.selected).map(i=>n?Q1(Iu(i)):Iu(i));e[xr](e.multiple?r?new Set(s):s:s[0]),e._assigning=!0,tt(()=>{e._assigning=!1})}),e[xr]=Ol(o)},mounted(e,{value:t,modifiers:{number:n}}){H4(e,t)},beforeUpdate(e,t,n){e[xr]=Ol(n)},updated(e,{value:t,modifiers:{number:n}}){e._assigning||H4(e,t)}};function H4(e,t,n){const o=e.multiple,r=Ee(t);if(!(o&&!r&&!uc(t))){for(let s=0,i=e.options.length;s<i;s++){const l=e.options[s],a=Iu(l);if(o)if(r){const c=typeof a;c==="string"||c==="number"?l.selected=t.some(u=>String(u)===String(a)):l.selected=r0(t,a)>-1}else l.selected=t.has(a);else if(Al(Iu(l),t)){e.selectedIndex!==s&&(e.selectedIndex=s);return}}!o&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Iu(e){return"_value"in e?e._value:e.value}function CE(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const SE={created(e,t,n){em(e,t,n,null,"created")},mounted(e,t,n){em(e,t,n,null,"mounted")},beforeUpdate(e,t,n,o){em(e,t,n,o,"beforeUpdate")},updated(e,t,n,o){em(e,t,n,o,"updated")}};function $E(e,t){switch(e){case"SELECT":return kE;case"TEXTAREA":return Ou;default:switch(t){case"checkbox":return Ya;case"radio":return Gh;default:return Ou}}}function em(e,t,n,o,r){const i=$E(e.tagName,n.props&&n.props.type)[r];i&&i(e,t,n,o)}function KB(){Ou.getSSRProps=({value:e})=>({value:e}),Gh.getSSRProps=({value:e},t)=>{if(t.props&&Al(t.props.value,e))return{checked:!0}},Ya.getSSRProps=({value:e},t)=>{if(Ee(e)){if(t.props&&r0(e,t.props.value)>-1)return{checked:!0}}else if(uc(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},SE.getSSRProps=(e,t)=>{if(typeof t.type!="string")return;const n=$E(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)}}const GB=["ctrl","shift","alt","meta"],YB={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)=>GB.some(n=>e[`${n}Key`]&&!t.includes(n))},Ge=(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=YB[t[i]];if(l&&l(r,t))return}return e(r,...s)})},JB={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},rn=(e,t)=>{const n=e._withKeys||(e._withKeys={}),o=t.join(".");return n[o]||(n[o]=r=>{if(!("key"in r))return;const s=Io(r.key);if(t.some(i=>i===s||JB[i]===s))return e(r)})},EE=Pt({patchProp:RB},_B);let If,U4=!1;function xE(){return If||(If=G7(EE))}function TE(){return If=U4?If:Y7(EE),U4=!0,If}const yi=(...e)=>{xE().render(...e)},ME=(...e)=>{TE().hydrate(...e)},mw=(...e)=>{const t=xE().createApp(...e),{mount:n}=t;return t.mount=o=>{const r=OE(o);if(!r)return;const s=t._component;!Ue(s)&&!s.render&&!s.template&&(s.template=r.innerHTML),r.innerHTML="";const i=n(r,!1,AE(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),i},t},ZB=(...e)=>{const t=TE().createApp(...e),{mount:n}=t;return t.mount=o=>{const r=OE(o);if(r)return n(r,!0,AE(r))},t};function AE(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function OE(e){return je(e)?document.querySelector(e):e}let W4=!1;const XB=()=>{W4||(W4=!0,KB(),kB())},QB=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:T7,BaseTransitionPropsValidators:lw,Comment:Vn,DeprecationTypes:pB,EffectScope:Ub,ErrorCodes:WF,ErrorTypeStrings:lB,Fragment:Q,KeepAlive:mD,ReactiveEffect:xu,Static:Pa,Suspense:sD,Teleport:sr,Text:vi,TrackOpTypes:jF,Transition:ur,TransitionGroup:g0,TriggerOpTypes:HF,VueElement:m0,assertNumber:UF,callWithAsyncErrorHandling:rr,callWithErrorHandling:mi,camelize:dn,capitalize:Rl,cloneVNode:rs,compatUtils:hB,computed:B,createApp:mw,createBlock:L,createCommentVNode:O,createElementBlock:k,createElementVNode:_,createHydrationRenderer:Y7,createPropsRestProxy:TD,createRenderer:G7,createSSRApp:ZB,createSlots:Ps,createStaticVNode:h0,createTextVNode:ne,createVNode:b,customRef:d7,defineAsyncComponent:hD,defineComponent:K,defineCustomElement:vE,defineEmits:bD,defineExpose:wD,defineModel:SD,defineOptions:kD,defineProps:yD,defineSSRCustomElement:DB,defineSlots:CD,devtools:aB,effect:hF,effectScope:K9,getCurrentInstance:nt,getCurrentScope:Wb,getTransitionRawChildren:d0,guardReactiveProps:hw,h:Xe,handleError:fc,hasInjectionContext:FD,hydrate:ME,initCustomFormatter:sB,initDirectivesForSSR:XB,inject:Pe,isMemoSame:cE,isProxy:Zb,isReactive:cu,isReadonly:Tu,isRef:Yt,isRuntimeOnly:tB,isShallow:ah,isVNode:uo,markRaw:ns,mergeDefaults:ED,mergeModels:xD,mergeProps:pn,nextTick:tt,normalizeClass:F,normalizeProps:Hb,normalizeStyle:Be,onActivated:A7,onBeforeMount:ld,onBeforeUnmount:bn,onBeforeUpdate:I7,onDeactivated:aw,onErrorCaptured:R7,onMounted:mt,onRenderTracked:L7,onRenderTriggered:P7,onScopeDispose:qb,onServerPrefetch:N7,onUnmounted:Us,onUpdated:Bl,openBlock:g,popScopeId:y7,provide:bt,proxyRefs:ew,pushScopeId:v7,queuePostFlushCb:ng,reactive:jn,readonly:dc,ref:H,registerRuntimeCompiler:iE,render:yi,renderList:Me,renderSlot:le,resolveComponent:z,resolveDirective:Mt,resolveDynamicComponent:xt,resolveFilter:fB,resolveTransitionHooks:Mu,setBlockTracking:vy,setDevtoolsHook:cB,setTransitionHooks:qa,shallowReactive:Jb,shallowReadonly:PF,shallowRef:Cn,ssrContextKey:C7,ssrUtils:dB,stop:pF,toDisplayString:M,toHandlerKey:lu,toHandlers:_D,toRaw:Ct,toRef:Nn,toRefs:Hs,toValue:FF,transformVNodeArgs:JD,triggerRef:RF,unref:S,useAttrs:cw,useCssModule:VB,useCssVars:CB,useModel:rB,useSSRContext:S7,useSlots:Ws,useTransitionState:iw,vModelCheckbox:Ya,vModelDynamic:SE,vModelRadio:Gh,vModelSelect:kE,vModelText:Ou,vShow:sn,version:uE,warn:dE,watch:ke,watchEffect:Yr,watchPostEffect:$7,watchSyncEffect:E7,withAsyncContext:MD,withCtx:x,withDefaults:$D,withDirectives:Ve,withKeys:rn,withMemo:iB,withModifiers:Ge,withScopeId:XF},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 mh=Symbol(""),Nf=Symbol(""),gw=Symbol(""),ug=Symbol(""),IE=Symbol(""),Ja=Symbol(""),NE=Symbol(""),PE=Symbol(""),_w=Symbol(""),vw=Symbol(""),Yh=Symbol(""),yw=Symbol(""),LE=Symbol(""),bw=Symbol(""),ww=Symbol(""),kw=Symbol(""),Cw=Symbol(""),Sw=Symbol(""),$w=Symbol(""),RE=Symbol(""),FE=Symbol(""),_0=Symbol(""),dg=Symbol(""),Ew=Symbol(""),xw=Symbol(""),gh=Symbol(""),Jh=Symbol(""),Tw=Symbol(""),Ey=Symbol(""),eV=Symbol(""),xy=Symbol(""),fg=Symbol(""),tV=Symbol(""),nV=Symbol(""),Mw=Symbol(""),oV=Symbol(""),rV=Symbol(""),Aw=Symbol(""),DE=Symbol(""),Nu={[mh]:"Fragment",[Nf]:"Teleport",[gw]:"Suspense",[ug]:"KeepAlive",[IE]:"BaseTransition",[Ja]:"openBlock",[NE]:"createBlock",[PE]:"createElementBlock",[_w]:"createVNode",[vw]:"createElementVNode",[Yh]:"createCommentVNode",[yw]:"createTextVNode",[LE]:"createStaticVNode",[bw]:"resolveComponent",[ww]:"resolveDynamicComponent",[kw]:"resolveDirective",[Cw]:"resolveFilter",[Sw]:"withDirectives",[$w]:"renderList",[RE]:"renderSlot",[FE]:"createSlots",[_0]:"toDisplayString",[dg]:"mergeProps",[Ew]:"normalizeClass",[xw]:"normalizeStyle",[gh]:"normalizeProps",[Jh]:"guardReactiveProps",[Tw]:"toHandlers",[Ey]:"camelize",[eV]:"capitalize",[xy]:"toHandlerKey",[fg]:"setBlockTracking",[tV]:"pushScopeId",[nV]:"popScopeId",[Mw]:"withCtx",[oV]:"unref",[rV]:"isRef",[Aw]:"withMemo",[DE]:"isMemoSame"};function sV(e){Object.getOwnPropertySymbols(e).forEach(t=>{Nu[t]=e[t]})}const dr={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function iV(e,t=""){return{type:0,source:t,children:e,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:0,temps:0,codegenNode:void 0,loc:dr}}function _h(e,t,n,o,r,s,i,l=!1,a=!1,c=!1,u=dr){return e&&(l?(e.helper(Ja),e.helper(Ru(e.inSSR,c))):e.helper(Lu(e.inSSR,c)),i&&e.helper(Sw)),{type:13,tag:t,props:n,children:o,patchFlag:r,dynamicProps:s,directives:i,isBlock:l,disableTracking:a,isComponent:c,loc:u}}function Zh(e,t=dr){return{type:17,loc:t,elements:e}}function Cr(e,t=dr){return{type:15,loc:t,properties:e}}function yn(e,t){return{type:16,loc:dr,key:je(e)?_t(e,!0):e,value:t}}function _t(e,t=!1,n=dr,o=0){return{type:4,loc:n,content:e,isStatic:t,constType:t?3:o}}function Jr(e,t=dr){return{type:8,loc:t,children:e}}function On(e,t=[],n=dr){return{type:14,loc:n,callee:e,arguments:t}}function Pu(e,t=void 0,n=!1,o=!1,r=dr){return{type:18,params:e,returns:t,newline:n,isSlot:o,loc:r}}function Ty(e,t,n,o=!0){return{type:19,test:e,consequent:t,alternate:n,newline:o,loc:dr}}function lV(e,t,n=!1){return{type:20,index:e,value:t,isVNode:n,loc:dr}}function aV(e){return{type:21,body:e,loc:dr}}function Lu(e,t){return e||t?_w:vw}function Ru(e,t){return e||t?NE:PE}function Ow(e,{helper:t,removeHelper:n,inSSR:o}){e.isBlock||(e.isBlock=!0,n(Lu(o,e.isComponent)),t(Ja),t(Ru(o,e.isComponent)))}const q4=new Uint8Array([123,123]),K4=new Uint8Array([125,125]);function G4(e){return e>=97&&e<=122||e>=65&&e<=90}function Zo(e){return e===32||e===10||e===9||e===12||e===13}function Bi(e){return e===47||e===62||Zo(e)}function hg(e){const t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}const to={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 cV{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=q4,this.delimiterClose=K4,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=q4,this.delimiterClose=K4}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?Bi(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||Zo(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===to.TitleEnd||this.currentSequence===to.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===to.Cdata[this.sequenceIndex]?++this.sequenceIndex===to.Cdata.length&&(this.state=28,this.currentSequence=to.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===to.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):G4(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){Bi(t)&&this.handleTagName(t)}stateInSFCRootTagName(t){if(Bi(t)){const n=this.buffer.slice(this.sectionStart,this.index);n!=="template"&&this.enterRCDATA(hg("</"+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){Zo(t)||(t===62?(this.state=1,this.sectionStart=this.index+1):(this.state=G4(t)?9:27,this.sectionStart=this.index))}stateInClosingTagName(t){(t===62||Zo(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):Zo(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):Zo(t)||(this.state=11,this.stateBeforeAttrName(t))}stateInAttrName(t){(t===61||Bi(t))&&(this.cbs.onattribname(this.sectionStart,this.index),this.handleAttrNameEnd(t))}stateInDirName(t){t===61||Bi(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||Bi(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||Bi(t))&&(this.cbs.ondirarg(this.sectionStart,this.index+1),this.handleAttrNameEnd(t))}stateInDirModifier(t){t===61||Bi(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)):Zo(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):Zo(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){Zo(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=to.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===to.ScriptEnd[3]?this.startSpecial(to.ScriptEnd,4):t===to.StyleEnd[3]?this.startSpecial(to.StyleEnd,4):(this.state=6,this.stateInTagName(t))}stateBeforeSpecialT(t){t===to.TitleEnd[3]?this.startSpecial(to.TitleEnd,4):t===to.TextareaEnd[3]?this.startSpecial(to.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===to.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 Y4(e,{compatConfig:t}){const n=t&&t[e];return e==="MODE"?n||3:n}function La(e,t){const n=Y4("MODE",t),o=Y4(e,t);return n===3?o===!0:o!==!1}function vh(e,t,n,...o){return La(e,t)}function Iw(e){throw e}function BE(e){}function un(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 Po=e=>e.type===4&&e.isStatic;function VE(e){switch(e){case"Teleport":case"teleport":return Nf;case"Suspense":case"suspense":return gw;case"KeepAlive":case"keep-alive":return ug;case"BaseTransition":case"base-transition":return IE}}const uV=/^\d|[^\$\w]/,Nw=e=>!uV.test(e),dV=/[A-Za-z_$\xA0-\uFFFF]/,fV=/[\.\?\w$\xA0-\uFFFF]/,hV=/\s+[.[]\s*|\s*[.[]\s+/g,pV=e=>{e=e.trim().replace(hV,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?dV:fV).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},zE=pV;function Wr(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)&&(je(t)?r.name===t:t.test(r.name)))return r}}function v0(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)&&wa(s.arg,t))return s}}function wa(e,t){return!!(e&&Po(e)&&e.content===t)}function mV(e){return e.props.some(t=>t.type===7&&t.name==="bind"&&(!t.arg||t.arg.type!==4||!t.arg.isStatic))}function z_(e){return e.type===5||e.type===2}function gV(e){return e.type===7&&e.name==="slot"}function pg(e){return e.type===1&&e.tagType===3}function mg(e){return e.type===1&&e.tagType===2}const _V=new Set([gh,Jh]);function jE(e,t=[]){if(e&&!je(e)&&e.type===14){const n=e.callee;if(!je(n)&&_V.has(n))return jE(e.arguments[0],t.concat(e))}return[e,t]}function gg(e,t,n){let o,r=e.type===13?e.props:e.arguments[2],s=[],i;if(r&&!je(r)&&r.type===14){const l=jE(r);r=l[0],s=l[1],i=s[s.length-1]}if(r==null||je(r))o=Cr([t]);else if(r.type===14){const l=r.arguments[0];!je(l)&&l.type===15?J4(t,l)||l.properties.unshift(t):r.callee===Tw?o=On(n.helper(dg),[Cr([t]),r]):r.arguments.unshift(Cr([t])),!o&&(o=r)}else r.type===15?(J4(t,r)||r.properties.unshift(t),o=r):(o=On(n.helper(dg),[Cr([t]),r]),i&&i.callee===Jh&&(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 J4(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 yh(e,t){return`_${t}_${e.replace(/[^\w]/g,(n,o)=>n==="-"?"_":e.charCodeAt(o).toString())}`}function vV(e){return e.type===14&&e.callee===Aw?e.arguments[1].returns:e}const yV=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,HE={parseMode:"base",ns:0,delimiters:["{{","}}"],getNamespace:()=>0,isVoidTag:Lm,isPreTag:Lm,isCustomElement:Lm,onError:Iw,onWarn:BE,comments:!1,prefixIdentifiers:!1};let Bt=HE,bh=null,gi="",ro=null,It=null,To="",ni=-1,ia=-1,_g=0,al=!1,My=null;const gn=[],vn=new cV(gn,{onerr:Zs,ontext(e,t){tm(qn(e,t),e,t)},ontextentity(e,t,n){tm(e,t,n)},oninterpolation(e,t){if(al)return tm(qn(e,t),e,t);let n=e+vn.delimiterOpen.length,o=t-vn.delimiterClose.length;for(;Zo(gi.charCodeAt(n));)n++;for(;Zo(gi.charCodeAt(o-1));)o--;let r=qn(n,o);r.includes("&")&&(r=Bt.decodeEntities(r,!1)),Ay({type:5,content:zm(r,!1,An(n,o)),loc:An(e,t)})},onopentagname(e,t){const n=qn(e,t);ro={type:1,tag:n,ns:Bt.getNamespace(n,gn[0],Bt.ns),tagType:0,props:[],children:[],loc:An(e-1,t),codegenNode:void 0}},onopentagend(e){X4(e)},onclosetag(e,t){const n=qn(e,t);if(!Bt.isVoidTag(n)){let o=!1;for(let r=0;r<gn.length;r++)if(gn[r].tag.toLowerCase()===n.toLowerCase()){o=!0,r>0&&Zs(24,gn[0].loc.start.offset);for(let i=0;i<=r;i++){const l=gn.shift();Vm(l,t,i<r)}break}o||Zs(23,UE(e,60))}},onselfclosingtag(e){var t;const n=ro.tag;ro.isSelfClosing=!0,X4(e),((t=gn[0])==null?void 0:t.tag)===n&&Vm(gn.shift(),e)},onattribname(e,t){It={type:6,name:qn(e,t),nameLoc:An(e,t),value:void 0,loc:An(e)}},ondirname(e,t){const n=qn(e,t),o=n==="."||n===":"?"bind":n==="@"?"on":n==="#"?"slot":n.slice(2);if(!al&&o===""&&Zs(26,e),al||o==="")It={type:6,name:n,nameLoc:An(e,t),value:void 0,loc:An(e)};else if(It={type:7,name:o,rawName:n,exp:void 0,arg:void 0,modifiers:n==="."?["prop"]:[],loc:An(e)},o==="pre"){al=vn.inVPre=!0,My=ro;const r=ro.props;for(let s=0;s<r.length;s++)r[s].type===7&&(r[s]=MV(r[s]))}},ondirarg(e,t){if(e===t)return;const n=qn(e,t);if(al)It.name+=n,ka(It.nameLoc,t);else{const o=n[0]!=="[";It.arg=zm(o?n:n.slice(1,-1),o,An(e,t),o?3:0)}},ondirmodifier(e,t){const n=qn(e,t);if(al)It.name+="."+n,ka(It.nameLoc,t);else if(It.name==="slot"){const o=It.arg;o&&(o.content+="."+n,ka(o.loc,t))}else It.modifiers.push(n)},onattribdata(e,t){To+=qn(e,t),ni<0&&(ni=e),ia=t},onattribentity(e,t,n){To+=e,ni<0&&(ni=t),ia=n},onattribnameend(e){const t=It.loc.start.offset,n=qn(t,e);It.type===7&&(It.rawName=n),ro.props.some(o=>(o.type===7?o.rawName:o.name)===n)&&Zs(2,t)},onattribend(e,t){if(ro&&It){if(ka(It.loc,t),e!==0)if(To.includes("&")&&(To=Bt.decodeEntities(To,!0)),It.type===6)It.name==="class"&&(To=qE(To).trim()),e===1&&!To&&Zs(13,t),It.value={type:2,content:To,loc:e===1?An(ni,ia):An(ni-1,ia+1)},vn.inSFCRoot&&ro.tag==="template"&&It.name==="lang"&&To&&To!=="html"&&vn.enterRCDATA(hg("</template"),0);else{let n=0;It.exp=zm(To,!1,An(ni,ia),0,n),It.name==="for"&&(It.forParseResult=wV(It.exp));let o=-1;It.name==="bind"&&(o=It.modifiers.indexOf("sync"))>-1&&vh("COMPILER_V_BIND_SYNC",Bt,It.loc,It.rawName)&&(It.name="model",It.modifiers.splice(o,1))}(It.type!==7||It.name!=="pre")&&ro.props.push(It)}To="",ni=ia=-1},oncomment(e,t){Bt.comments&&Ay({type:3,content:qn(e,t),loc:An(e-4,t+3)})},onend(){const e=gi.length;for(let t=0;t<gn.length;t++)Vm(gn[t],e-1),Zs(24,gn[t].loc.start.offset)},oncdata(e,t){gn[0].ns!==0?tm(qn(e,t),e,t):Zs(1,e-9)},onprocessinginstruction(e){(gn[0]?gn[0].ns:Bt.ns)===0&&Zs(21,e-1)}}),Z4=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,bV=/^\(|\)$/g;function wV(e){const t=e.loc,n=e.content,o=n.match(yV);if(!o)return;const[,r,s]=o,i=(d,f,h=!1)=>{const p=t.start.offset+f,m=p+d.length;return zm(d,!1,An(p,m),0,h?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(bV,"").trim();const c=r.indexOf(a),u=a.match(Z4);if(u){a=a.replace(Z4,"").trim();const d=u[1].trim();let f;if(d&&(f=n.indexOf(d,c+a.length),l.key=i(d,f,!0)),u[2]){const h=u[2].trim();h&&(l.index=i(h,n.indexOf(h,l.key?f+d.length:c+a.length),!0))}}return a&&(l.value=i(a,c,!0)),l}function qn(e,t){return gi.slice(e,t)}function X4(e){vn.inSFCRoot&&(ro.innerLoc=An(e+1,e+1)),Ay(ro);const{tag:t,ns:n}=ro;n===0&&Bt.isPreTag(t)&&_g++,Bt.isVoidTag(t)?Vm(ro,e):(gn.unshift(ro),(n===1||n===2)&&(vn.inXML=!0)),ro=null}function tm(e,t,n){var o;{const i=(o=gn[0])==null?void 0:o.tag;i!=="script"&&i!=="style"&&e.includes("&")&&(e=Bt.decodeEntities(e,!1))}const r=gn[0]||bh,s=r.children[r.children.length-1];(s==null?void 0:s.type)===2?(s.content+=e,ka(s.loc,n)):r.children.push({type:2,content:e,loc:An(t,n)})}function Vm(e,t,n=!1){n?ka(e.loc,UE(t,60)):ka(e.loc,kV(t,62)+1),vn.inSFCRoot&&(e.children.length?e.innerLoc.end=Pt({},e.children[e.children.length-1].loc.end):e.innerLoc.end=Pt({},e.innerLoc.start),e.innerLoc.source=qn(e.innerLoc.start.offset,e.innerLoc.end.offset));const{tag:o,ns:r}=e;al||(o==="slot"?e.tagType=2:Q4(e)?e.tagType=3:SV(e)&&(e.tagType=1)),vn.inRCDATA||(e.children=WE(e.children,e.tag)),r===0&&Bt.isPreTag(o)&&_g--,My===e&&(al=vn.inVPre=!1,My=null),vn.inXML&&(gn[0]?gn[0].ns:Bt.ns)===0&&(vn.inXML=!1);{const s=e.props;if(!vn.inSFCRoot&&La("COMPILER_NATIVE_TEMPLATE",Bt)&&e.tag==="template"&&!Q4(e)){const l=gn[0]||bh,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&&vh("COMPILER_INLINE_TEMPLATE",Bt,i.loc)&&e.children.length&&(i.value={type:2,content:qn(e.children[0].loc.start.offset,e.children[e.children.length-1].loc.end.offset),loc:i.loc})}}function kV(e,t){let n=e;for(;gi.charCodeAt(n)!==t&&n<gi.length-1;)n++;return n}function UE(e,t){let n=e;for(;gi.charCodeAt(n)!==t&&n>=0;)n--;return n}const CV=new Set(["if","else","else-if","for","slot"]);function Q4({tag:e,props:t}){if(e==="template"){for(let n=0;n<t.length;n++)if(t[n].type===7&&CV.has(t[n].name))return!0}return!1}function SV({tag:e,props:t}){var n;if(Bt.isCustomElement(e))return!1;if(e==="component"||$V(e.charCodeAt(0))||VE(e)||(n=Bt.isBuiltInComponent)!=null&&n.call(Bt,e)||Bt.isNativeTag&&!Bt.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(vh("COMPILER_IS_ON_ELEMENT",Bt,r.loc))return!0}}else if(r.name==="bind"&&wa(r.arg,"is")&&vh("COMPILER_IS_ON_ELEMENT",Bt,r.loc))return!0}return!1}function $V(e){return e>64&&e<91}const EV=/\r\n/g;function WE(e,t){var n,o;const r=Bt.whitespace!=="preserve";let s=!1;for(let i=0;i<e.length;i++){const l=e[i];if(l.type===2)if(_g)l.content=l.content.replace(EV,` |
| 22 |
`);else if(xV(l.content)){const a=(n=e[i-1])==null?void 0:n.type,c=(o=e[i+1])==null?void 0:o.type;!a||!c||r&&(a===3&&(c===3||c===1)||a===1&&(c===3||c===1&&TV(l.content)))?(s=!0,e[i]=null):l.content=" "}else r&&(l.content=qE(l.content))}if(_g&&t&&Bt.isPreTag(t)){const i=e[0];i&&i.type===2&&(i.content=i.content.replace(/^\r?\n/,""))}return s?e.filter(Boolean):e}function xV(e){for(let t=0;t<e.length;t++)if(!Zo(e.charCodeAt(t)))return!1;return!0}function TV(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n===10||n===13)return!0}return!1}function qE(e){let t="",n=!1;for(let o=0;o<e.length;o++)Zo(e.charCodeAt(o))?n||(t+=" ",n=!0):(t+=e[o],n=!1);return t}function Ay(e){(gn[0]||bh).children.push(e)}function An(e,t){return{start:vn.getPos(e),end:t==null?t:vn.getPos(t),source:t==null?t:qn(e,t)}}function ka(e,t){e.end=vn.getPos(t),e.source=qn(e.start.offset,t)}function MV(e){const t={type:6,name:e.rawName,nameLoc:An(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 zm(e,t=!1,n,o=0,r=0){return _t(e,t,n,o)}function Zs(e,t,n){Bt.onError(un(e,An(t,t)))}function AV(){vn.reset(),ro=null,It=null,To="",ni=-1,ia=-1,gn.length=0}function OV(e,t){if(AV(),gi=e,Bt=Pt({},HE),t){let r;for(r in t)t[r]!=null&&(Bt[r]=t[r])}vn.mode=Bt.parseMode==="html"?1:Bt.parseMode==="sfc"?2:0,vn.inXML=Bt.ns===1||Bt.ns===2;const n=t==null?void 0:t.delimiters;n&&(vn.delimiterOpen=hg(n[0]),vn.delimiterClose=hg(n[1]));const o=bh=iV([],e);return vn.parse(gi),o.loc=An(0,e.length),o.children=WE(o.children),bh=null,o}function IV(e,t){jm(e,t,KE(e,e.children[0]))}function KE(e,t){const{children:n}=e;return n.length===1&&t.type===1&&!mg(t)}function jm(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:Sr(l,t);if(a>0){if(a>=2){l.codegenNode.patchFlag="-1",l.codegenNode=t.hoist(l.codegenNode),s++;continue}}else{const c=l.codegenNode;if(c.type===13){const u=ZE(c);if((!u||u===512||u===1)&&YE(l,t)>=2){const d=JE(l);d&&(c.props=t.hoist(d))}c.dynamicProps&&(c.dynamicProps=t.hoist(c.dynamicProps))}}}if(l.type===1){const a=l.tagType===1;a&&t.scopes.vSlot++,jm(l,t),a&&t.scopes.vSlot--}else if(l.type===11)jm(l,t,l.children.length===1);else if(l.type===9)for(let a=0;a<l.branches.length;a++)jm(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&&Ee(e.codegenNode.children)){const i=t.hoist(Zh(e.codegenNode.children));t.hmr&&(i.content=`[...${i.content}]`),e.codegenNode.children=i}}function Sr(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(ZE(r))return n.set(e,0),0;{let l=3;const a=YE(e,t);if(a===0)return n.set(e,0),0;a<l&&(l=a);for(let c=0;c<e.children.length;c++){const u=Sr(e.children[c],t);if(u===0)return n.set(e,0),0;u<l&&(l=u)}if(l>1)for(let c=0;c<e.props.length;c++){const u=e.props[c];if(u.type===7&&u.name==="bind"&&u.exp){const d=Sr(u.exp,t);if(d===0)return n.set(e,0),0;d<l&&(l=d)}}if(r.isBlock){for(let c=0;c<e.props.length;c++)if(e.props[c].type===7)return n.set(e,0),0;t.removeHelper(Ja),t.removeHelper(Ru(t.inSSR,r.isComponent)),r.isBlock=!1,t.helper(Lu(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 Sr(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(je(a)||Or(a))continue;const c=Sr(a,t);if(c===0)return 0;c<i&&(i=c)}return i;default:return 0}}const NV=new Set([Ew,xw,gh,Jh]);function GE(e,t){if(e.type===14&&!je(e.callee)&&NV.has(e.callee)){const n=e.arguments[0];if(n.type===4)return Sr(n,t);if(n.type===14)return GE(n,t)}return 0}function YE(e,t){let n=3;const o=JE(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=Sr(i,t);if(a===0)return a;a<n&&(n=a);let c;if(l.type===4?c=Sr(l,t):l.type===14?c=GE(l,t):c=0,c===0)return c;c<n&&(n=c)}}return n}function JE(e){const t=e.codegenNode;if(t.type===13)return t.props}function ZE(e){const t=e.patchFlag;return t?parseInt(t,10):void 0}function PV(e,{filename:t="",prefixIdentifiers:n=!1,hoistStatic:o=!1,hmr:r=!1,cacheHandlers:s=!1,nodeTransforms:i=[],directiveTransforms:l={},transformHoist:a=null,isBuiltInComponent:c=dt,isCustomElement:u=dt,expressionPlugins:d=[],scopeId:f=null,slotted:h=!0,ssr:p=!1,inSSR:m=!1,ssrCssVars:v="",bindingMetadata:y=Dt,inline:E=!1,isTS:w=!1,onError:C=Iw,onWarn:T=BE,compatConfig:$}){const A=t.replace(/\?.*$/,"").match(/([^/\\]+)\.\w+$/),N={filename:t,selfName:A&&Rl(dn(A[1])),prefixIdentifiers:n,hoistStatic:o,hmr:r,cacheHandlers:s,nodeTransforms:i,directiveTransforms:l,transformHoist:a,isBuiltInComponent:c,isCustomElement:u,expressionPlugins:d,scopeId:f,slotted:h,ssr:p,inSSR:m,ssrCssVars:v,bindingMetadata:y,inline:E,isTS:w,onError:C,onWarn:T,compatConfig:$,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 D=I-1;D?N.helpers.set(P,D):N.helpers.delete(P)}},helperString(P){return`_${Nu[N.helper(P)]}`},replaceNode(P){N.parent.children[N.childIndex]=N.currentNode=P},removeNode(P){const I=N.parent.children,D=P?I.indexOf(P):N.currentNode?N.childIndex:-1;!P||P===N.currentNode?(N.currentNode=null,N.onNodeRemoved()):N.childIndex>D&&(N.childIndex--,N.onNodeRemoved()),N.parent.children.splice(D,1)},onNodeRemoved:dt,addIdentifiers(P){},removeIdentifiers(P){},hoist(P){je(P)&&(P=_t(P)),N.hoists.push(P);const I=_t(`_hoisted_${N.hoists.length}`,!1,P.loc,2);return I.hoisted=P,I},cache(P,I=!1){return lV(N.cached++,P,I)}};return N.filters=new Set,N}function LV(e,t){const n=PV(e,t);y0(e,n),t.hoistStatic&&IV(e,n),t.ssr||RV(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 RV(e,t){const{helper:n}=t,{children:o}=e;if(o.length===1){const r=o[0];if(KE(e,r)&&r.codegenNode){const s=r.codegenNode;s.type===13&&Ow(s,t),e.codegenNode=s}else e.codegenNode=r}else if(o.length>1){let r=64;e.codegenNode=_h(t,n(mh),void 0,e.children,r+"",void 0,void 0,!0,void 0,!1)}}function FV(e,t){let n=0;const o=()=>{n--};for(;n<e.children.length;n++){const r=e.children[n];je(r)||(t.parent=e,t.childIndex=n,t.onNodeRemoved=o,y0(r,t))}}function y0(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&&(Ee(i)?o.push(...i):o.push(i)),t.currentNode)e=t.currentNode;else return}switch(e.type){case 3:t.ssr||t.helper(Yh);break;case 5:t.ssr||t.helper(_0);break;case 9:for(let s=0;s<e.branches.length;s++)y0(e.branches[s],t);break;case 10:case 11:case 1:case 0:FV(e,t);break}t.currentNode=e;let r=o.length;for(;r--;)o[r]()}function XE(e,t){const n=je(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(gV))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 c=t(o,a,r);c&&i.push(c)}}return i}}}const b0="/*#__PURE__*/",QE=e=>`${Nu[e]}: _${Nu[e]}`;function DV(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:c="vue/server-renderer",ssr:u=!1,isTS:d=!1,inSSR:f=!1}){const h={mode:t,prefixIdentifiers:n,sourceMap:o,filename:r,scopeId:s,optimizeImports:i,runtimeGlobalName:l,runtimeModuleName:a,ssrRuntimeModuleName:c,ssr:u,isTS:d,inSSR:f,source:e.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper(m){return`_${Nu[m]}`},push(m,v=-2,y){h.code+=m},indent(){p(++h.indentLevel)},deindent(m=!1){m?--h.indentLevel:p(--h.indentLevel)},newline(){p(h.indentLevel)}};function p(m){h.push(` |
| 23 |
`+" ".repeat(m),0)}return h}function BV(e,t={}){const n=DV(e,t);t.onContextCreated&&t.onContextCreated(n);const{mode:o,push:r,prefixIdentifiers:s,indent:i,deindent:l,newline:a,scopeId:c,ssr:u}=n,d=Array.from(e.helpers),f=d.length>0,h=!s&&o!=="module";VV(e,n);const m=u?"ssrRender":"render",y=(u?["_ctx","_push","_parent","_attrs"]:["_ctx","_cache"]).join(", ");if(r(`function ${m}(${y}) {`),i(),h&&(r("with (_ctx) {"),i(),f&&(r(`const { ${d.map(QE).join(", ")} } = _Vue |
| 24 |
`,-1),a())),e.components.length&&(j_(e.components,"component",n),(e.directives.length||e.temps>0)&&a()),e.directives.length&&(j_(e.directives,"directive",n),e.temps>0&&a()),e.filters&&e.filters.length&&(a(),j_(e.filters,"filter",n),a()),e.temps>0){r("let ");for(let E=0;E<e.temps;E++)r(`${E>0?", ":""}_temp${E}`)}return(e.components.length||e.directives.length||e.temps)&&(r(` |
| 25 |
`,0),a()),u||r("return "),e.codegenNode?lo(e.codegenNode,n):r("null"),h&&(l(),r("}")),l(),r("}"),{ast:e,code:n.code,preamble:"",map:n.map?n.map.toJSON():void 0}}function VV(e,t){const{ssr:n,prefixIdentifiers:o,push:r,newline:s,runtimeModuleName:i,runtimeGlobalName:l,ssrRuntimeModuleName:a}=t,c=l,u=Array.from(e.helpers);if(u.length>0&&(r(`const _Vue = ${c} |
| 26 |
`,-1),e.hoists.length)){const d=[_w,vw,Yh,yw,LE].filter(f=>u.includes(f)).map(QE).join(", ");r(`const { ${d} } = _Vue |
| 27 |
`,-1)}zV(e.hoists,t),s(),r("return ")}function j_(e,t,{helper:n,push:o,newline:r,isTS:s}){const i=n(t==="filter"?Cw:t==="component"?bw:kw);for(let l=0;l<e.length;l++){let a=e[l];const c=a.endsWith("__self");c&&(a=a.slice(0,-6)),o(`const ${yh(a,t)} = ${i}(${JSON.stringify(a)}${c?", true":""})${s?"!":""}`),l<e.length-1&&r()}}function zV(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} = `),lo(a,t),o())}t.pure=!1}function Pw(e,t){const n=e.length>3||!1;t.push("["),n&&t.indent(),Xh(e,t,n),n&&t.deindent(),t.push("]")}function Xh(e,t,n=!1,o=!0){const{push:r,newline:s}=t;for(let i=0;i<e.length;i++){const l=e[i];je(l)?r(l,-3):Ee(l)?Pw(l,t):lo(l,t),i<e.length-1&&(n?(o&&r(","),s()):o&&r(", "))}}function lo(e,t){if(je(e)){t.push(e,-3);return}if(Or(e)){t.push(t.helper(e));return}switch(e.type){case 1:case 9:case 11:lo(e.codegenNode,t);break;case 2:jV(e,t);break;case 4:ex(e,t);break;case 5:HV(e,t);break;case 12:lo(e.codegenNode,t);break;case 8:tx(e,t);break;case 3:WV(e,t);break;case 13:qV(e,t);break;case 14:GV(e,t);break;case 15:YV(e,t);break;case 17:JV(e,t);break;case 18:ZV(e,t);break;case 19:XV(e,t);break;case 20:QV(e,t);break;case 21:Xh(e.body,t,!0,!1);break}}function jV(e,t){t.push(JSON.stringify(e.content),-3,e)}function ex(e,t){const{content:n,isStatic:o}=e;t.push(o?JSON.stringify(n):n,-3,e)}function HV(e,t){const{push:n,helper:o,pure:r}=t;r&&n(b0),n(`${o(_0)}(`),lo(e.content,t),n(")")}function tx(e,t){for(let n=0;n<e.children.length;n++){const o=e.children[n];je(o)?t.push(o,-3):lo(o,t)}}function UV(e,t){const{push:n}=t;if(e.type===8)n("["),tx(e,t),n("]");else if(e.isStatic){const o=Nw(e.content)?e.content:JSON.stringify(e.content);n(o,-2,e)}else n(`[${e.content}]`,-3,e)}function WV(e,t){const{push:n,helper:o,pure:r}=t;r&&n(b0),n(`${o(Yh)}(${JSON.stringify(e.content)})`,-3,e)}function qV(e,t){const{push:n,helper:o,pure:r}=t,{tag:s,props:i,children:l,patchFlag:a,dynamicProps:c,directives:u,isBlock:d,disableTracking:f,isComponent:h}=e;u&&n(o(Sw)+"("),d&&n(`(${o(Ja)}(${f?"true":""}), `),r&&n(b0);const p=d?Ru(t.inSSR,h):Lu(t.inSSR,h);n(o(p)+"(",-2,e),Xh(KV([s,i,l,a,c]),t),n(")"),d&&n(")"),u&&(n(", "),lo(u,t),n(")"))}function KV(e){let t=e.length;for(;t--&&e[t]==null;);return e.slice(0,t+1).map(n=>n||"null")}function GV(e,t){const{push:n,helper:o,pure:r}=t,s=je(e.callee)?e.callee:o(e.callee);r&&n(b0),n(s+"(",-2,e),Xh(e.arguments,t),n(")")}function YV(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:c,value:u}=i[a];UV(c,t),n(": "),lo(u,t),a<i.length-1&&(n(","),s())}l&&r(),n(l?"}":" }")}function JV(e,t){Pw(e.elements,t)}function ZV(e,t){const{push:n,indent:o,deindent:r}=t,{params:s,returns:i,body:l,newline:a,isSlot:c}=e;c&&n(`_${Nu[Mw]}(`),n("(",-2,e),Ee(s)?Xh(s,t):s&&lo(s,t),n(") => "),(a||l)&&(n("{"),o()),i?(a&&n("return "),Ee(i)?Pw(i,t):lo(i,t)):l&&lo(l,t),(a||l)&&(r(),n("}")),c&&(e.isNonScopedSlot&&n(", undefined, true"),n(")"))}function XV(e,t){const{test:n,consequent:o,alternate:r,newline:s}=e,{push:i,indent:l,deindent:a,newline:c}=t;if(n.type===4){const d=!Nw(n.content);d&&i("("),ex(n,t),d&&i(")")}else i("("),lo(n,t),i(")");s&&l(),t.indentLevel++,s||i(" "),i("? "),lo(o,t),t.indentLevel--,s&&c(),s||i(" "),i(": ");const u=r.type===19;u||t.indentLevel++,lo(r,t),u||t.indentLevel--,s&&a(!0)}function QV(e,t){const{push:n,helper:o,indent:r,deindent:s,newline:i}=t;n(`_cache[${e.index}] || (`),e.isVNode&&(r(),n(`${o(fg)}(-1),`),i()),n(`_cache[${e.index}] = `),lo(e.value,t),e.isVNode&&(n(","),i(),n(`${o(fg)}(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 ez=XE(/^(if|else|else-if)$/,(e,t,n)=>tz(e,t,n,(o,r,s)=>{const i=n.parent.children;let l=i.indexOf(o),a=0;for(;l-->=0;){const c=i[l];c&&c.type===9&&(a+=c.branches.length)}return()=>{if(s)o.codegenNode=t5(r,a,n);else{const c=nz(o.codegenNode);c.alternate=t5(r,a+o.branches.length-1,n)}}}));function tz(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(un(28,t.loc)),t.exp=_t("true",!1,r)}if(t.name==="if"){const r=e5(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(un(30,e.loc)),n.removeNode();const l=e5(e,t);i.branches.push(l);const a=o&&o(i,l,!1);y0(l,n),a&&a(),n.currentNode=null}else n.onError(un(30,e.loc));break}}}function e5(e,t){const n=e.tagType===3;return{type:10,loc:e.loc,condition:t.name==="else"?void 0:t.exp,children:n&&!Wr(e,"for")?e.children:[e],userKey:v0(e,"key"),isTemplateIf:n}}function t5(e,t,n){return e.condition?Ty(e.condition,n5(e,t,n),On(n.helper(Yh),['""',"true"])):n5(e,t,n)}function n5(e,t,n){const{helper:o}=n,r=yn("key",_t(`${t}`,!1,dr,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 gg(a,r,n),a}else{let a=64;return _h(n,o(mh),Cr([r]),s,a+"",void 0,void 0,!0,!1,!1,e.loc)}else{const a=i.codegenNode,c=vV(a);return c.type===13&&Ow(c,n),gg(c,r,n),a}}function nz(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 oz=XE("for",(e,t,n)=>{const{helper:o,removeHelper:r}=n;return rz(e,t,n,s=>{const i=On(o($w),[s.source]),l=pg(e),a=Wr(e,"memo"),c=v0(e,"key"),u=c&&(c.type===6?_t(c.value.content,!0):c.exp),d=c?yn("key",u):null,f=s.source.type===4&&s.source.constType>0,h=f?64:c?128:256;return s.codegenNode=_h(n,o(mh),void 0,i,h+"",void 0,void 0,!0,!f,!1,e.loc),()=>{let p;const{children:m}=s,v=m.length!==1||m[0].type!==1,y=mg(e)?e:l&&e.children.length===1&&mg(e.children[0])?e.children[0]:null;if(y?(p=y.codegenNode,l&&d&&gg(p,d,n)):v?p=_h(n,o(mh),d?Cr([d]):void 0,e.children,"64",void 0,void 0,!0,void 0,!1):(p=m[0].codegenNode,l&&d&&gg(p,d,n),p.isBlock!==!f&&(p.isBlock?(r(Ja),r(Ru(n.inSSR,p.isComponent))):r(Lu(n.inSSR,p.isComponent))),p.isBlock=!f,p.isBlock?(o(Ja),o(Ru(n.inSSR,p.isComponent))):o(Lu(n.inSSR,p.isComponent))),a){const E=Pu(Oy(s.parseResult,[_t("_cached")]));E.body=aV([Jr(["const _memo = (",a.exp,")"]),Jr(["if (_cached",...u?[" && _cached.key === ",u]:[],` && ${n.helperString(DE)}(_cached, _memo)) return _cached`]),Jr(["const _item = ",p]),_t("_item.memo = _memo"),_t("return _item")]),i.arguments.push(E,_t("_cache"),_t(String(n.cached++)))}else i.arguments.push(Pu(Oy(s.parseResult),p,!0))}})});function rz(e,t,n,o){if(!t.exp){n.onError(un(31,t.loc));return}const r=t.forParseResult;if(!r){n.onError(un(32,t.loc));return}nx(r);const{addIdentifiers:s,removeIdentifiers:i,scopes:l}=n,{source:a,value:c,key:u,index:d}=r,f={type:11,loc:t.loc,source:a,valueAlias:c,keyAlias:u,objectIndexAlias:d,parseResult:r,children:pg(e)?e.children:[e]};n.replaceNode(f),l.vFor++;const h=o&&o(f);return()=>{l.vFor--,h&&h()}}function nx(e,t){e.finalized||(e.finalized=!0)}function Oy({value:e,key:t,index:n},o=[]){return sz([e,t,n,...o])}function sz(e){let t=e.length;for(;t--&&!e[t];);return e.slice(0,t+1).map((n,o)=>n||_t("_".repeat(o+1),!1))}const o5=_t("undefined",!1),iz=(e,t)=>{if(e.type===1&&(e.tagType===1||e.tagType===3)){const n=Wr(e,"slot");if(n)return n.exp,t.scopes.vSlot++,()=>{t.scopes.vSlot--}}},lz=(e,t,n,o)=>Pu(e,n,!1,!0,n.length?n[0].loc:o);function az(e,t,n=lz){t.helper(Mw);const{children:o,loc:r}=e,s=[],i=[];let l=t.scopes.vSlot>0||t.scopes.vFor>0;const a=Wr(e,"slot",!0);if(a){const{arg:v,exp:y}=a;v&&!Po(v)&&(l=!0),s.push(yn(v||_t("default",!0),n(y,void 0,o,r)))}let c=!1,u=!1;const d=[],f=new Set;let h=0;for(let v=0;v<o.length;v++){const y=o[v];let E;if(!pg(y)||!(E=Wr(y,"slot",!0))){y.type!==3&&d.push(y);continue}if(a){t.onError(un(37,E.loc));break}c=!0;const{children:w,loc:C}=y,{arg:T=_t("default",!0),exp:$,loc:A}=E;let N;Po(T)?N=T?T.content:"default":l=!0;const P=Wr(y,"for"),I=n($,P,w,C);let D,V;if(D=Wr(y,"if"))l=!0,i.push(Ty(D.exp,nm(T,I,h++),o5));else if(V=Wr(y,/^else(-if)?$/,!0)){let G=v,te;for(;G--&&(te=o[G],te.type===3););if(te&&pg(te)&&Wr(te,"if")){o.splice(v,1),v--;let oe=i[i.length-1];for(;oe.alternate.type===19;)oe=oe.alternate;oe.alternate=V.exp?Ty(V.exp,nm(T,I,h++),o5):nm(T,I,h++)}else t.onError(un(30,V.loc))}else if(P){l=!0;const G=P.forParseResult;G?(nx(G),i.push(On(t.helper($w),[G.source,Pu(Oy(G),nm(T,I),!0)]))):t.onError(un(32,P.loc))}else{if(N){if(f.has(N)){t.onError(un(38,A));continue}f.add(N),N==="default"&&(u=!0)}s.push(yn(T,I))}}if(!a){const v=(y,E)=>{const w=n(y,void 0,E,r);return t.compatConfig&&(w.isNonScopedSlot=!0),yn("default",w)};c?d.length&&d.some(y=>ox(y))&&(u?t.onError(un(39,d[0].loc)):s.push(v(void 0,d))):s.push(v(void 0,o))}const p=l?2:Hm(e.children)?3:1;let m=Cr(s.concat(yn("_",_t(p+"",!1))),r);return i.length&&(m=On(t.helper(FE),[m,Zh(i)])),{slots:m,hasDynamicSlots:l}}function nm(e,t,n){const o=[yn("name",e),yn("fn",t)];return n!=null&&o.push(yn("key",_t(String(n),!0))),Cr(o)}function Hm(e){for(let t=0;t<e.length;t++){const n=e[t];switch(n.type){case 1:if(n.tagType===2||Hm(n.children))return!0;break;case 9:if(Hm(n.branches))return!0;break;case 10:case 11:if(Hm(n.children))return!0;break}}return!1}function ox(e){return e.type!==2&&e.type!==12?!0:e.type===2?!!e.content.trim():ox(e.content)}const rx=new WeakMap,cz=(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?uz(e,t):`"${o}"`;const l=it(i)&&i.callee===ww;let a,c,u,d=0,f,h,p,m=l||i===Nf||i===gw||!s&&(o==="svg"||o==="foreignObject");if(r.length>0){const v=sx(e,t,void 0,s,l);a=v.props,d=v.patchFlag,h=v.dynamicPropNames;const y=v.directives;p=y&&y.length?Zh(y.map(E=>fz(E,t))):void 0,v.shouldUseBlock&&(m=!0)}if(e.children.length>0)if(i===ug&&(m=!0,d|=1024),s&&i!==Nf&&i!==ug){const{slots:y,hasDynamicSlots:E}=az(e,t);c=y,E&&(d|=1024)}else if(e.children.length===1&&i!==Nf){const y=e.children[0],E=y.type,w=E===5||E===8;w&&Sr(y,t)===0&&(d|=1),w||E===2?c=y:c=e.children}else c=e.children;d!==0&&(u=String(d),h&&h.length&&(f=hz(h))),e.codegenNode=_h(t,i,a,c,u,f,p,!!m,!1,s,e.loc)};function uz(e,t,n=!1){let{tag:o}=e;const r=Iy(o),s=v0(e,"is",!1,!0);if(s)if(r||La("COMPILER_IS_ON_ELEMENT",t)){let l;if(s.type===6?l=s.value&&_t(s.value.content,!0):(l=s.exp,l||(l=_t("is",!1,s.loc))),l)return On(t.helper(ww),[l])}else s.type===6&&s.value.content.startsWith("vue:")&&(o=s.value.content.slice(4));const i=VE(o)||t.isBuiltInComponent(o);return i?(n||t.helper(i),i):(t.helper(bw),t.components.add(o),yh(o,"component"))}function sx(e,t,n=e.props,o,r,s=!1){const{tag:i,loc:l,children:a}=e;let c=[];const u=[],d=[],f=a.length>0;let h=!1,p=0,m=!1,v=!1,y=!1,E=!1,w=!1,C=!1;const T=[],$=P=>{c.length&&(u.push(Cr(r5(c),l)),c=[]),P&&u.push(P)},A=({key:P,value:I})=>{if(Po(P)){const D=P.content,V=cc(D);if(V&&(!o||r)&&D.toLowerCase()!=="onclick"&&D!=="onUpdate:modelValue"&&!Cl(D)&&(E=!0),V&&Cl(D)&&(C=!0),V&&I.type===14&&(I=I.arguments[0]),I.type===20||(I.type===4||I.type===8)&&Sr(I,t)>0)return;D==="ref"?m=!0:D==="class"?v=!0:D==="style"?y=!0:D!=="key"&&!T.includes(D)&&T.push(D),o&&(D==="class"||D==="style")&&!T.includes(D)&&T.push(D)}else w=!0};for(let P=0;P<n.length;P++){const I=n[P];if(I.type===6){const{loc:D,name:V,nameLoc:G,value:te}=I;let oe=!0;if(V==="ref"&&(m=!0,t.scopes.vFor>0&&c.push(yn(_t("ref_for",!0),_t("true")))),V==="is"&&(Iy(i)||te&&te.content.startsWith("vue:")||La("COMPILER_IS_ON_ELEMENT",t)))continue;c.push(yn(_t(V,!0,G),_t(te?te.content:"",oe,te?te.loc:D)))}else{const{name:D,arg:V,exp:G,loc:te,modifiers:oe}=I,J=D==="bind",q=D==="on";if(D==="slot"){o||t.onError(un(40,te));continue}if(D==="once"||D==="memo"||D==="is"||J&&wa(V,"is")&&(Iy(i)||La("COMPILER_IS_ON_ELEMENT",t))||q&&s)continue;if((J&&wa(V,"key")||q&&f&&wa(V,"vue:before-update"))&&(h=!0),J&&wa(V,"ref")&&t.scopes.vFor>0&&c.push(yn(_t("ref_for",!0),_t("true"))),!V&&(J||q)){if(w=!0,G)if(J){if($(),La("COMPILER_V_BIND_OBJECT_ORDER",t)){u.unshift(G);continue}u.push(G)}else $({type:14,loc:te,callee:t.helper(Tw),arguments:o?[G]:[G,"true"]});else t.onError(un(J?34:35,te));continue}J&&oe.includes("prop")&&(p|=32);const X=t.directiveTransforms[D];if(X){const{props:ee,needRuntime:R}=X(I,e,t);!s&&ee.forEach(A),q&&V&&!Po(V)?$(Cr(ee,l)):c.push(...ee),R&&(d.push(I),Or(R)&&rx.set(I,R))}else KR(D)||(d.push(I),f&&(h=!0))}}let N;if(u.length?($(),u.length>1?N=On(t.helper(dg),u,l):N=u[0]):c.length&&(N=Cr(r5(c),l)),w?p|=16:(v&&!o&&(p|=2),y&&!o&&(p|=4),T.length&&(p|=8),E&&(p|=32)),!h&&(p===0||p===32)&&(m||C||d.length>0)&&(p|=512),!t.inSSR&&N)switch(N.type){case 15:let P=-1,I=-1,D=!1;for(let te=0;te<N.properties.length;te++){const oe=N.properties[te].key;Po(oe)?oe.content==="class"?P=te:oe.content==="style"&&(I=te):oe.isHandlerKey||(D=!0)}const V=N.properties[P],G=N.properties[I];D?N=On(t.helper(gh),[N]):(V&&!Po(V.value)&&(V.value=On(t.helper(Ew),[V.value])),G&&(y||G.value.type===4&&G.value.content.trim()[0]==="["||G.value.type===17)&&(G.value=On(t.helper(xw),[G.value])));break;case 14:break;default:N=On(t.helper(gh),[On(t.helper(Jh),[N])]);break}return{props:N,directives:d,patchFlag:p,dynamicPropNames:T,shouldUseBlock:h}}function r5(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"||cc(s))&&dz(i,r):(t.set(s,r),n.push(r))}return n}function dz(e,t){e.value.type===17?e.value.elements.push(t.value):e.value=Zh([e.value,t.value],e.loc)}function fz(e,t){const n=[],o=rx.get(e);o?n.push(t.helperString(o)):(t.helper(kw),t.directives.add(e.name),n.push(yh(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=_t("true",!1,r);n.push(Cr(e.modifiers.map(i=>yn(i,s)),r))}return Zh(n,e.loc)}function hz(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 Iy(e){return e==="component"||e==="Component"}const pz=(e,t)=>{if(mg(e)){const{children:n,loc:o}=e,{slotName:r,slotProps:s}=mz(e,t),i=[t.prefixIdentifiers?"_ctx.$slots":"$slots",r,"{}","undefined","true"];let l=2;s&&(i[2]=s,l=3),n.length&&(i[3]=Pu([],n,!1,!1,o),l=4),t.scopeId&&!t.slotted&&(l=5),i.splice(l),e.codegenNode=On(t.helper(RE),i,o)}};function mz(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=dn(i.name),r.push(i)));else if(i.name==="bind"&&wa(i.arg,"name")){if(i.exp)n=i.exp;else if(i.arg&&i.arg.type===4){const l=dn(i.arg.content);n=i.exp=_t(l,!1,i.arg.loc)}}else i.name==="bind"&&i.arg&&Po(i.arg)&&(i.arg.content=dn(i.arg.content)),r.push(i)}if(r.length>0){const{props:s,directives:i}=sx(e,t,r,!1,!1);o=s,i.length&&t.onError(un(36,i[0].loc))}return{slotName:n,slotProps:o}}const gz=/^\s*([\w$_]+|(async\s*)?\([^)]*?\))\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/,ix=(e,t,n,o)=>{const{loc:r,modifiers:s,arg:i}=e;!e.exp&&!s.length&&n.onError(un(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)?lu(dn(d)):`on:${d}`;l=_t(f,!0,i.loc)}else l=Jr([`${n.helperString(xy)}(`,i,")"]);else l=i,l.children.unshift(`${n.helperString(xy)}(`),l.children.push(")");let a=e.exp;a&&!a.content.trim()&&(a=void 0);let c=n.cacheHandlers&&!a&&!n.inVOnce;if(a){const d=zE(a.content),f=!(d||gz.test(a.content)),h=a.content.includes(";");(f||c&&d)&&(a=Jr([`${f?"$event":"(...args)"} => ${h?"{":"("}`,a,h?"}":")"]))}let u={props:[yn(l,a||_t("() => {}",!1,r))]};return o&&(u=o(u)),c&&(u.props[0].value=n.cache(u.props[0].value)),u.props.forEach(d=>d.key.isHandlerKey=!0),u},_z=(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(un(52,s.loc)),{props:[yn(s,_t("",!0,r))]};const l=dn(s.content);i=e.exp=_t(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=dn(s.content):s.content=`${n.helperString(Ey)}(${s.content})`:(s.children.unshift(`${n.helperString(Ey)}(`),s.children.push(")"))),n.inSSR||(o.includes("prop")&&s5(s,"."),o.includes("attr")&&s5(s,"^")),{props:[yn(s,i)]}},s5=(e,t)=>{e.type===4?e.isStatic?e.content=t+e.content:e.content=`\`${t}\${${e.content}}\``:(e.children.unshift(`'${t}' + (`),e.children.push(")"))},vz=(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(z_(i)){r=!0;for(let l=s+1;l<n.length;l++){const a=n[l];if(z_(a))o||(o=n[s]=Jr([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(z_(i)||i.type===8){const l=[];(i.type!==2||i.content!==" ")&&l.push(i),!t.ssr&&Sr(i,t)===0&&l.push("1"),n[s]={type:12,content:i,loc:i.loc,codegenNode:On(t.helper(yw),l)}}}}},i5=new WeakSet,yz=(e,t)=>{if(e.type===1&&Wr(e,"once",!0))return i5.has(e)||t.inVOnce||t.inSSR?void 0:(i5.add(e),t.inVOnce=!0,t.helper(fg),()=>{t.inVOnce=!1;const n=t.currentNode;n.codegenNode&&(n.codegenNode=t.cache(n.codegenNode,!0))})},lx=(e,t,n)=>{const{exp:o,arg:r}=e;if(!o)return n.onError(un(41,e.loc)),om();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(un(44,o.loc)),om();const a=!1;if(!i.trim()||!zE(i)&&!a)return n.onError(un(42,o.loc)),om();const c=r||_t("modelValue",!0),u=r?Po(r)?`onUpdate:${dn(r.content)}`:Jr(['"onUpdate:" + ',r]):"onUpdate:modelValue";let d;const f=n.isTS?"($event: any)":"$event";d=Jr([`${f} => ((`,o,") = $event)"]);const h=[yn(c,e.exp),yn(u,d)];if(e.modifiers.length&&t.tagType===1){const p=e.modifiers.map(v=>(Nw(v)?v:JSON.stringify(v))+": true").join(", "),m=r?Po(r)?`${r.content}Modifiers`:Jr([r,' + "Modifiers"']):"modelModifiers";h.push(yn(m,_t(`{ ${p} }`,!1,e.loc,2)))}return om(h)};function om(e=[]){return{props:e}}const bz=/[\w).+\-_$\]]/,wz=(e,t)=>{La("COMPILER_FILTERS",t)&&(e.type===5&&vg(e.content,t),e.type===1&&e.props.forEach(n=>{n.type===7&&n.name!=="for"&&n.exp&&vg(n.exp,t)}))};function vg(e,t){if(e.type===4)l5(e,t);else for(let n=0;n<e.children.length;n++){const o=e.children[n];typeof o=="object"&&(o.type===4?l5(o,t):o.type===8?vg(e,t):o.type===5&&vg(o.content,t))}}function l5(e,t){const n=e.content;let o=!1,r=!1,s=!1,i=!1,l=0,a=0,c=0,u=0,d,f,h,p,m=[];for(h=0;h<n.length;h++)if(f=d,d=n.charCodeAt(h),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(h+1)!==124&&n.charCodeAt(h-1)!==124&&!l&&!a&&!c)p===void 0?(u=h+1,p=n.slice(0,h).trim()):v();else{switch(d){case 34:r=!0;break;case 39:o=!0;break;case 96:s=!0;break;case 40:c++;break;case 41:c--;break;case 91:a++;break;case 93:a--;break;case 123:l++;break;case 125:l--;break}if(d===47){let y=h-1,E;for(;y>=0&&(E=n.charAt(y),E===" ");y--);(!E||!bz.test(E))&&(i=!0)}}p===void 0?p=n.slice(0,h).trim():u!==0&&v();function v(){m.push(n.slice(u,h).trim()),u=h+1}if(m.length){for(h=0;h<m.length;h++)p=kz(p,m[h],t);e.content=p}}function kz(e,t,n){n.helper(Cw);const o=t.indexOf("(");if(o<0)return n.filters.add(t),`${yh(t,"filter")}(${e})`;{const r=t.slice(0,o),s=t.slice(o+1);return n.filters.add(r),`${yh(r,"filter")}(${e}${s!==")"?","+s:s}`}}const a5=new WeakSet,Cz=(e,t)=>{if(e.type===1){const n=Wr(e,"memo");return!n||a5.has(e)?void 0:(a5.add(e),()=>{const o=e.codegenNode||t.currentNode.codegenNode;o&&o.type===13&&(e.tagType!==1&&Ow(o,t),e.codegenNode=On(t.helper(Aw),[n.exp,Pu(void 0,o),"_cache",String(t.cached++)]))})}};function Sz(e){return[[yz,ez,Cz,oz,wz,pz,cz,iz,vz],{on:ix,bind:_z,model:lx}]}function $z(e,t={}){const n=t.onError||Iw,o=t.mode==="module";t.prefixIdentifiers===!0?n(un(47)):o&&n(un(48));const r=!1;t.cacheHandlers&&n(un(49)),t.scopeId&&!o&&n(un(50));const s=Pt({},t,{prefixIdentifiers:r}),i=je(e)?OV(e,s):e,[l,a]=Sz();return LV(i,Pt({},s,{nodeTransforms:[...l,...t.nodeTransforms||[]],directiveTransforms:Pt({},a,t.directiveTransforms||{})})),BV(i,s)}const Ez=()=>({props:[]});/** |
| 28 |
* @vue/compiler-dom v3.4.23 |
| 29 |
* (c) 2018-present Yuxi (Evan) You and Vue contributors |
| 30 |
* @license MIT |
| 31 |
**/const ax=Symbol(""),cx=Symbol(""),ux=Symbol(""),dx=Symbol(""),Ny=Symbol(""),fx=Symbol(""),hx=Symbol(""),px=Symbol(""),mx=Symbol(""),gx=Symbol("");sV({[ax]:"vModelRadio",[cx]:"vModelCheckbox",[ux]:"vModelText",[dx]:"vModelSelect",[Ny]:"vModelDynamic",[fx]:"withModifiers",[hx]:"withKeys",[px]:"vShow",[mx]:"Transition",[gx]:"TransitionGroup"});let $c;function xz(e,t=!1){return $c||($c=document.createElement("div")),t?($c.innerHTML=`<div foo="${e.replace(/"/g,""")}">`,$c.children[0].getAttribute("foo")):($c.innerHTML=e,$c.textContent)}const Tz={parseMode:"html",isVoidTag:aF,isNativeTag:e=>sF(e)||iF(e)||lF(e),isPreTag:e=>e==="pre",decodeEntities:xz,isBuiltInComponent:e=>{if(e==="Transition"||e==="transition")return mx;if(e==="TransitionGroup"||e==="transition-group")return gx},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}},Mz=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:_t("style",!0,t.loc),exp:Az(t.value.content,t.loc),modifiers:[],loc:t.loc})})},Az=(e,t)=>{const n=U9(e);return _t(JSON.stringify(n),!1,t,3)};function $l(e,t){return un(e,t)}const Oz=(e,t,n)=>{const{exp:o,loc:r}=e;return o||n.onError($l(53,r)),t.children.length&&(n.onError($l(54,r)),t.children.length=0),{props:[yn(_t("innerHTML",!0,r),o||_t("",!0))]}},Iz=(e,t,n)=>{const{exp:o,loc:r}=e;return o||n.onError($l(55,r)),t.children.length&&(n.onError($l(56,r)),t.children.length=0),{props:[yn(_t("textContent",!0),o?Sr(o,n)>0?o:On(n.helperString(_0),[o],r):_t("",!0))]}},Nz=(e,t,n)=>{const o=lx(e,t,n);if(!o.props.length||t.tagType===1)return o;e.arg&&n.onError($l(58,e.arg.loc));const{tag:r}=t,s=n.isCustomElement(r);if(r==="input"||r==="textarea"||r==="select"||s){let i=ux,l=!1;if(r==="input"||s){const a=v0(t,"type");if(a){if(a.type===7)i=Ny;else if(a.value)switch(a.value.content){case"radio":i=ax;break;case"checkbox":i=cx;break;case"file":l=!0,n.onError($l(59,e.loc));break}}else mV(t)&&(i=Ny)}else r==="select"&&(i=dx);l||(o.needRuntime=n.helper(i))}else n.onError($l(57,e.loc));return o.props=o.props.filter(i=>!(i.key.type===4&&i.key.content==="modelValue")),o},Pz=cr("passive,once,capture"),Lz=cr("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),Rz=cr("left,right"),_x=cr("onkeyup,onkeydown,onkeypress",!0),Fz=(e,t,n,o)=>{const r=[],s=[],i=[];for(let l=0;l<t.length;l++){const a=t[l];a==="native"&&vh("COMPILER_V_ON_NATIVE",n)||Pz(a)?i.push(a):Rz(a)?Po(e)?_x(e.content)?r.push(a):s.push(a):(r.push(a),s.push(a)):Lz(a)?s.push(a):r.push(a)}return{keyModifiers:r,nonKeyModifiers:s,eventOptionModifiers:i}},c5=(e,t)=>Po(e)&&e.content.toLowerCase()==="onclick"?_t(t,!0):e.type!==4?Jr(["(",e,`) === "onClick" ? "${t}" : (`,e,")"]):e,Dz=(e,t,n)=>ix(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:c}=Fz(s,r,n,e.loc);if(a.includes("right")&&(s=c5(s,"onContextmenu")),a.includes("middle")&&(s=c5(s,"onMouseup")),a.length&&(i=On(n.helper(fx),[i,JSON.stringify(a)])),l.length&&(!Po(s)||_x(s.content))&&(i=On(n.helper(hx),[i,JSON.stringify(l)])),c.length){const u=c.map(Rl).join("");s=Po(s)?_t(`${s.content}${u}`,!0):Jr(["(",s,`) + "${u}"`])}return{props:[yn(s,i)]}}),Bz=(e,t,n)=>{const{exp:o,loc:r}=e;return o||n.onError($l(61,r)),{props:[],needRuntime:n.helper(px)}},Vz=(e,t)=>{e.type===1&&e.tagType===0&&(e.tag==="script"||e.tag==="style")&&t.removeNode()},zz=[Mz],jz={cloak:Ez,html:Oz,text:Iz,model:Nz,on:Dz,show:Bz};function Hz(e,t={}){return $z(e,Pt({},Tz,t,{nodeTransforms:[Vz,...zz,...t.nodeTransforms||[]],directiveTransforms:Pt({},jz,t.directiveTransforms||{}),transformHoist:null}))}/** |
| 32 |
* vue v3.4.23 |
| 33 |
* (c) 2018-present Yuxi (Evan) You and Vue contributors |
| 34 |
* @license MIT |
| 35 |
**/const u5=new WeakMap;function Uz(e){let t=u5.get(e??Dt);return t||(t=Object.create(null),u5.set(e??Dt,t)),t}function Wz(e,t){if(!je(e))if(e.nodeType)e=e.innerHTML;else return dt;const n=e,o=Uz(t),r=o[n];if(r)return r;if(e[0]==="#"){const a=document.querySelector(e);e=a?a.innerHTML:""}const s=Pt({hoistStatic:!0,onError:void 0,onWarn:dt},t);!s.isCustomElement&&typeof customElements<"u"&&(s.isCustomElement=a=>!!customElements.get(a));const{code:i}=Hz(e,s),l=new Function("Vue",i)(QB);return l._rc=!0,o[n]=l}iE(Wz);/*! |
| 36 |
* vue-router v4.3.2 |
| 37 |
* (c) 2024 Eduardo San Martin Morote |
| 38 |
* @license MIT |
| 39 |
*/const Dc=typeof document<"u";function qz(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const Ht=Object.assign;function H_(e,t){const n={};for(const o in t){const r=t[o];n[o]=ss(r)?r.map(e):e(r)}return n}const Pf=()=>{},ss=Array.isArray,vx=/#/g,Kz=/&/g,Gz=/\//g,Yz=/=/g,Jz=/\?/g,yx=/\+/g,Zz=/%5B/g,Xz=/%5D/g,bx=/%5E/g,Qz=/%60/g,wx=/%7B/g,ej=/%7C/g,kx=/%7D/g,tj=/%20/g;function Lw(e){return encodeURI(""+e).replace(ej,"|").replace(Zz,"[").replace(Xz,"]")}function nj(e){return Lw(e).replace(wx,"{").replace(kx,"}").replace(bx,"^")}function Py(e){return Lw(e).replace(yx,"%2B").replace(tj,"+").replace(vx,"%23").replace(Kz,"%26").replace(Qz,"`").replace(wx,"{").replace(kx,"}").replace(bx,"^")}function oj(e){return Py(e).replace(Yz,"%3D")}function rj(e){return Lw(e).replace(vx,"%23").replace(Jz,"%3F")}function sj(e){return e==null?"":rj(e).replace(Gz,"%2F")}function wh(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const ij=/\/$/,lj=e=>e.replace(ij,"");function U_(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=dj(o??t,n),{fullPath:o+(s&&"?")+s+i,path:o,query:r,hash:wh(i)}}function aj(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function d5(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function cj(e,t,n){const o=t.matched.length-1,r=n.matched.length-1;return o>-1&&o===r&&Fu(t.matched[o],n.matched[r])&&Cx(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Fu(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(!uj(e[n],t[n]))return!1;return!0}function uj(e,t){return ss(e)?f5(e,t):ss(t)?f5(t,e):e===t}function f5(e,t){return ss(t)?e.length===t.length&&e.every((n,o)=>n===t[o]):e.length===1&&e[0]===t}function dj(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 kh;(function(e){e.pop="pop",e.push="push"})(kh||(kh={}));var Lf;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Lf||(Lf={}));function fj(e){if(!e)if(Dc){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),lj(e)}const hj=/^[^#]+#/;function pj(e,t){return e.replace(hj,"#")+t}function mj(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 w0=()=>({left:window.scrollX,top:window.scrollY});function gj(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=mj(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 h5(e,t){return(history.state?history.state.position-t:-1)+e}const Ly=new Map;function _j(e,t){Ly.set(e,t)}function vj(e){const t=Ly.get(e);return Ly.delete(e),t}let yj=()=>location.protocol+"//"+location.host;function Sx(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),d5(a,"")}return d5(n,e)+o+r}function bj(e,t,n,o){let r=[],s=[],i=null;const l=({state:f})=>{const h=Sx(e,location),p=n.value,m=t.value;let v=0;if(f){if(n.value=h,t.value=f,i&&i===p){i=null;return}v=m?f.position-m.position:0}else o(h);r.forEach(y=>{y(n.value,p,{delta:v,type:kh.pop,direction:v?v>0?Lf.forward:Lf.back:Lf.unknown})})};function a(){i=n.value}function c(f){r.push(f);const h=()=>{const p=r.indexOf(f);p>-1&&r.splice(p,1)};return s.push(h),h}function u(){const{history:f}=window;f.state&&f.replaceState(Ht({},f.state,{scroll:w0()}),"")}function d(){for(const f of s)f();s=[],window.removeEventListener("popstate",l),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",l),window.addEventListener("beforeunload",u,{passive:!0}),{pauseListeners:a,listen:c,destroy:d}}function p5(e,t,n,o=!1,r=!1){return{back:e,current:t,forward:n,replaced:o,position:window.history.length,scroll:r?w0():null}}function wj(e){const{history:t,location:n}=window,o={value:Sx(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,c,u){const d=e.indexOf("#"),f=d>-1?(n.host&&document.querySelector("base")?e:e.slice(d))+a:yj()+e+a;try{t[u?"replaceState":"pushState"](c,"",f),r.value=c}catch(h){console.error(h),n[u?"replace":"assign"](f)}}function i(a,c){const u=Ht({},t.state,p5(r.value.back,a,r.value.forward,!0),c,{position:r.value.position});s(a,u,!0),o.value=a}function l(a,c){const u=Ht({},r.value,t.state,{forward:a,scroll:w0()});s(u.current,u,!0);const d=Ht({},p5(o.value,a,null),{position:u.position+1},c);s(a,d,!1),o.value=a}return{location:o,state:r,push:l,replace:i}}function $x(e){e=fj(e);const t=wj(e),n=bj(e,t.state,t.location,t.replace);function o(s,i=!0){i||n.pauseListeners(),history.go(s)}const r=Ht({location:"",base:e,go:o,createHref:pj.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 kj(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),$x(e)}function Cj(e){return typeof e=="string"||e&&typeof e=="object"}function Ex(e){return typeof e=="string"||typeof e=="symbol"}const Vi={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},xx=Symbol("");var m5;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(m5||(m5={}));function Du(e,t){return Ht(new Error,{type:e,[xx]:!0},t)}function Xs(e,t){return e instanceof Error&&xx in e&&(t==null||!!(e.type&t))}const g5="[^/]+?",Sj={sensitive:!1,strict:!1,start:!0,end:!0},$j=/[.+*?^${}()[\]/\\]/g;function Ej(e,t){const n=Ht({},Sj,t),o=[];let r=n.start?"^":"";const s=[];for(const c of e){const u=c.length?[]:[90];n.strict&&!c.length&&(r+="/");for(let d=0;d<c.length;d++){const f=c[d];let h=40+(n.sensitive?.25:0);if(f.type===0)d||(r+="/"),r+=f.value.replace($j,"\\$&"),h+=40;else if(f.type===1){const{value:p,repeatable:m,optional:v,regexp:y}=f;s.push({name:p,repeatable:m,optional:v});const E=y||g5;if(E!==g5){h+=10;try{new RegExp(`(${E})`)}catch(C){throw new Error(`Invalid custom RegExp for param "${p}" (${E}): `+C.message)}}let w=m?`((?:${E})(?:/(?:${E}))*)`:`(${E})`;d||(w=v&&c.length<2?`(?:/${w})`:"/"+w),v&&(w+="?"),r+=w,h+=20,v&&(h+=-8),m&&(h+=-20),E===".*"&&(h+=-50)}u.push(h)}o.push(u)}if(n.strict&&n.end){const c=o.length-1;o[c][o[c].length-1]+=.7000000000000001}n.strict||(r+="/?"),n.end?r+="$":n.strict&&(r+="(?:/|$)");const i=new RegExp(r,n.sensitive?"":"i");function l(c){const u=c.match(i),d={};if(!u)return null;for(let f=1;f<u.length;f++){const h=u[f]||"",p=s[f-1];d[p.name]=h&&p.repeatable?h.split("/"):h}return d}function a(c){let u="",d=!1;for(const f of e){(!d||!u.endsWith("/"))&&(u+="/"),d=!1;for(const h of f)if(h.type===0)u+=h.value;else if(h.type===1){const{value:p,repeatable:m,optional:v}=h,y=p in c?c[p]:"";if(ss(y)&&!m)throw new Error(`Provided param "${p}" is an array but it is not repeatable (* or + modifiers)`);const E=ss(y)?y.join("/"):y;if(!E)if(v)f.length<2&&(u.endsWith("/")?u=u.slice(0,-1):d=!0);else throw new Error(`Missing required param "${p}"`);u+=E}}return u||"/"}return{re:i,score:o,keys:s,parse:l,stringify:a}}function xj(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 Tj(e,t){let n=0;const o=e.score,r=t.score;for(;n<o.length&&n<r.length;){const s=xj(o[n],r[n]);if(s)return s;n++}if(Math.abs(r.length-o.length)===1){if(_5(o))return 1;if(_5(r))return-1}return r.length-o.length}function _5(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const Mj={type:0,value:""},Aj=/[a-zA-Z0-9_]/;function Oj(e){if(!e)return[[]];if(e==="/")return[[Mj]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(h){throw new Error(`ERR (${n})/"${c}": ${h}`)}let n=0,o=n;const r=[];let s;function i(){s&&r.push(s),s=[]}let l=0,a,c="",u="";function d(){c&&(n===0?s.push({type:0,value:c}):n===1||n===2||n===3?(s.length>1&&(a==="*"||a==="+")&&t(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),s.push({type:1,value:c,regexp:u,repeatable:a==="*"||a==="+",optional:a==="*"||a==="?"})):t("Invalid state to consume buffer"),c="")}function f(){c+=a}for(;l<e.length;){if(a=e[l++],a==="\\"&&n!==2){o=n,n=4;continue}switch(n){case 0:a==="/"?(c&&d(),i()):a===":"?(d(),n=1):f();break;case 4:f(),n=o;break;case 1:a==="("?n=2:Aj.test(a)?f():(d(),n=0,a!=="*"&&a!=="?"&&a!=="+"&&l--);break;case 2:a===")"?u[u.length-1]=="\\"?u=u.slice(0,-1)+a:n=3:u+=a;break;case 3:d(),n=0,a!=="*"&&a!=="?"&&a!=="+"&&l--,u="";break;default:t("Unknown state");break}}return n===2&&t(`Unfinished custom RegExp for param "${c}"`),d(),i(),r}function Ij(e,t,n){const o=Ej(Oj(e.path),n),r=Ht(o,{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function Nj(e,t){const n=[],o=new Map;t=b5({strict:!1,end:!0,sensitive:!1},t);function r(u){return o.get(u)}function s(u,d,f){const h=!f,p=Pj(u);p.aliasOf=f&&f.record;const m=b5(t,u),v=[p];if("alias"in u){const w=typeof u.alias=="string"?[u.alias]:u.alias;for(const C of w)v.push(Ht({},p,{components:f?f.record.components:p.components,path:C,aliasOf:f?f.record:p}))}let y,E;for(const w of v){const{path:C}=w;if(d&&C[0]!=="/"){const T=d.record.path,$=T[T.length-1]==="/"?"":"/";w.path=d.record.path+(C&&$+C)}if(y=Ij(w,d,m),f?f.alias.push(y):(E=E||y,E!==y&&E.alias.push(y),h&&u.name&&!y5(y)&&i(u.name)),p.children){const T=p.children;for(let $=0;$<T.length;$++)s(T[$],y,f&&f.children[$])}f=f||y,(y.record.components&&Object.keys(y.record.components).length||y.record.name||y.record.redirect)&&a(y)}return E?()=>{i(E)}:Pf}function i(u){if(Ex(u)){const d=o.get(u);d&&(o.delete(u),n.splice(n.indexOf(d),1),d.children.forEach(i),d.alias.forEach(i))}else{const d=n.indexOf(u);d>-1&&(n.splice(d,1),u.record.name&&o.delete(u.record.name),u.children.forEach(i),u.alias.forEach(i))}}function l(){return n}function a(u){let d=0;for(;d<n.length&&Tj(u,n[d])>=0&&(u.record.path!==n[d].record.path||!Tx(u,n[d]));)d++;n.splice(d,0,u),u.record.name&&!y5(u)&&o.set(u.record.name,u)}function c(u,d){let f,h={},p,m;if("name"in u&&u.name){if(f=o.get(u.name),!f)throw Du(1,{location:u});m=f.record.name,h=Ht(v5(d.params,f.keys.filter(E=>!E.optional).concat(f.parent?f.parent.keys.filter(E=>E.optional):[]).map(E=>E.name)),u.params&&v5(u.params,f.keys.map(E=>E.name))),p=f.stringify(h)}else if(u.path!=null)p=u.path,f=n.find(E=>E.re.test(p)),f&&(h=f.parse(p),m=f.record.name);else{if(f=d.name?o.get(d.name):n.find(E=>E.re.test(d.path)),!f)throw Du(1,{location:u,currentLocation:d});m=f.record.name,h=Ht({},d.params,u.params),p=f.stringify(h)}const v=[];let y=f;for(;y;)v.unshift(y.record),y=y.parent;return{name:m,path:p,params:h,matched:v,meta:Rj(v)}}return e.forEach(u=>s(u)),{addRoute:s,resolve:c,removeRoute:i,getRoutes:l,getRecordMatcher:r}}function v5(e,t){const n={};for(const o of t)o in e&&(n[o]=e[o]);return n}function Pj(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:Lj(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 Lj(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 y5(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Rj(e){return e.reduce((t,n)=>Ht(t,n.meta),{})}function b5(e,t){const n={};for(const o in e)n[o]=o in t?t[o]:e[o];return n}function Tx(e,t){return t.children.some(n=>n===e||Tx(e,n))}function Fj(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(yx," "),i=s.indexOf("="),l=wh(i<0?s:s.slice(0,i)),a=i<0?null:wh(s.slice(i+1));if(l in t){let c=t[l];ss(c)||(c=t[l]=[c]),c.push(a)}else t[l]=a}return t}function w5(e){let t="";for(let n in e){const o=e[n];if(n=oj(n),o==null){o!==void 0&&(t+=(t.length?"&":"")+n);continue}(ss(o)?o.map(s=>s&&Py(s)):[o&&Py(o)]).forEach(s=>{s!==void 0&&(t+=(t.length?"&":"")+n,s!=null&&(t+="="+s))})}return t}function Dj(e){const t={};for(const n in e){const o=e[n];o!==void 0&&(t[n]=ss(o)?o.map(r=>r==null?null:""+r):o==null?o:""+o)}return t}const Bj=Symbol(""),k5=Symbol(""),Rw=Symbol(""),Mx=Symbol(""),Ry=Symbol("");function Dd(){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 cl(e,t,n,o,r,s=i=>i()){const i=o&&(o.enterCallbacks[r]=o.enterCallbacks[r]||[]);return()=>new Promise((l,a)=>{const c=f=>{f===!1?a(Du(4,{from:n,to:t})):f instanceof Error?a(f):Cj(f)?a(Du(2,{from:t,to:f})):(i&&o.enterCallbacks[r]===i&&typeof f=="function"&&i.push(f),l())},u=s(()=>e.call(o&&o.instances[r],t,n,c));let d=Promise.resolve(u);e.length<3&&(d=d.then(c)),d.catch(f=>a(f))})}function W_(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(Vj(a)){const u=(a.__vccOpts||a)[t];u&&s.push(cl(u,n,o,i,l,r))}else{let c=a();s.push(()=>c.then(u=>{if(!u)return Promise.reject(new Error(`Couldn't resolve component "${l}" at "${i.path}"`));const d=qz(u)?u.default:u;i.components[l]=d;const h=(d.__vccOpts||d)[t];return h&&cl(h,n,o,i,l,r)()}))}}return s}function Vj(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function C5(e){const t=Pe(Rw),n=Pe(Mx),o=B(()=>{const a=S(e.to);return t.resolve(a)}),r=B(()=>{const{matched:a}=o.value,{length:c}=a,u=a[c-1],d=n.matched;if(!u||!d.length)return-1;const f=d.findIndex(Fu.bind(null,u));if(f>-1)return f;const h=S5(a[c-2]);return c>1&&S5(u)===h&&d[d.length-1].path!==h?d.findIndex(Fu.bind(null,a[c-2])):f}),s=B(()=>r.value>-1&&Uj(n.params,o.value.params)),i=B(()=>r.value>-1&&r.value===n.matched.length-1&&Cx(n.params,o.value.params));function l(a={}){return Hj(a)?t[S(e.replace)?"replace":"push"](S(e.to)).catch(Pf):Promise.resolve()}return{route:o,href:B(()=>o.value.href),isActive:s,isExactActive:i,navigate:l}}const zj=K({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:C5,setup(e,{slots:t}){const n=jn(C5(e)),{options:o}=Pe(Rw),r=B(()=>({[$5(e.activeClass,o.linkActiveClass,"router-link-active")]:n.isActive,[$5(e.exactActiveClass,o.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const s=t.default&&t.default(n);return e.custom?s:Xe("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},s)}}}),jj=zj;function Hj(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 Uj(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(!ss(r)||r.length!==o.length||o.some((s,i)=>s!==r[i]))return!1}return!0}function S5(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const $5=(e,t,n)=>e??t??n,Wj=K({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const o=Pe(Ry),r=B(()=>e.route||o.value),s=Pe(k5,0),i=B(()=>{let c=S(s);const{matched:u}=r.value;let d;for(;(d=u[c])&&!d.components;)c++;return c}),l=B(()=>r.value.matched[i.value]);bt(k5,B(()=>i.value+1)),bt(Bj,l),bt(Ry,r);const a=H();return ke(()=>[a.value,l.value,e.name],([c,u,d],[f,h,p])=>{u&&(u.instances[d]=c,h&&h!==u&&c&&c===f&&(u.leaveGuards.size||(u.leaveGuards=h.leaveGuards),u.updateGuards.size||(u.updateGuards=h.updateGuards))),c&&u&&(!h||!Fu(u,h)||!f)&&(u.enterCallbacks[d]||[]).forEach(m=>m(c))},{flush:"post"}),()=>{const c=r.value,u=e.name,d=l.value,f=d&&d.components[u];if(!f)return E5(n.default,{Component:f,route:c});const h=d.props[u],p=h?h===!0?c.params:typeof h=="function"?h(c):h:null,v=Xe(f,Ht({},p,t,{onVnodeUnmounted:y=>{y.component.isUnmounted&&(d.instances[u]=null)},ref:a}));return E5(n.default,{Component:v,route:c})||v}}});function E5(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const qj=Wj;function x5(e){const t=Nj(e.routes,e),n=e.parseQuery||Fj,o=e.stringifyQuery||w5,r=e.history,s=Dd(),i=Dd(),l=Dd(),a=Cn(Vi);let c=Vi;Dc&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=H_.bind(null,Z=>""+Z),d=H_.bind(null,sj),f=H_.bind(null,wh);function h(Z,ce){let pe,ie;return Ex(Z)?(pe=t.getRecordMatcher(Z),ie=ce):ie=Z,t.addRoute(ie,pe)}function p(Z){const ce=t.getRecordMatcher(Z);ce&&t.removeRoute(ce)}function m(){return t.getRoutes().map(Z=>Z.record)}function v(Z){return!!t.getRecordMatcher(Z)}function y(Z,ce){if(ce=Ht({},ce||a.value),typeof Z=="string"){const W=U_(n,Z,ce.path),re=t.resolve({path:W.path},ce),he=r.createHref(W.fullPath);return Ht(W,re,{params:f(re.params),hash:wh(W.hash),redirectedFrom:void 0,href:he})}let pe;if(Z.path!=null)pe=Ht({},Z,{path:U_(n,Z.path,ce.path).path});else{const W=Ht({},Z.params);for(const re in W)W[re]==null&&delete W[re];pe=Ht({},Z,{params:d(W)}),ce.params=d(ce.params)}const ie=t.resolve(pe,ce),Le=Z.hash||"";ie.params=u(f(ie.params));const et=aj(o,Ht({},Z,{hash:nj(Le),path:ie.path})),j=r.createHref(et);return Ht({fullPath:et,hash:Le,query:o===w5?Dj(Z.query):Z.query||{}},ie,{redirectedFrom:void 0,href:j})}function E(Z){return typeof Z=="string"?U_(n,Z,a.value.path):Ht({},Z)}function w(Z,ce){if(c!==Z)return Du(8,{from:ce,to:Z})}function C(Z){return A(Z)}function T(Z){return C(Ht(E(Z),{replace:!0}))}function $(Z){const ce=Z.matched[Z.matched.length-1];if(ce&&ce.redirect){const{redirect:pe}=ce;let ie=typeof pe=="function"?pe(Z):pe;return typeof ie=="string"&&(ie=ie.includes("?")||ie.includes("#")?ie=E(ie):{path:ie},ie.params={}),Ht({query:Z.query,hash:Z.hash,params:ie.path!=null?{}:Z.params},ie)}}function A(Z,ce){const pe=c=y(Z),ie=a.value,Le=Z.state,et=Z.force,j=Z.replace===!0,W=$(pe);if(W)return A(Ht(E(W),{state:typeof W=="object"?Ht({},Le,W.state):Le,force:et,replace:j}),ce||pe);const re=pe;re.redirectedFrom=ce;let he;return!et&&cj(o,ie,pe)&&(he=Du(16,{to:re,from:ie}),ye(ie,ie,!0,!1)),(he?Promise.resolve(he):I(re,ie)).catch(de=>Xs(de)?Xs(de,2)?de:R(de):X(de,re,ie)).then(de=>{if(de){if(Xs(de,2))return A(Ht({replace:j},E(de.to),{state:typeof de.to=="object"?Ht({},Le,de.to.state):Le,force:et}),ce||re)}else de=V(re,ie,!0,j,Le);return D(re,ie,de),de})}function N(Z,ce){const pe=w(Z,ce);return pe?Promise.reject(pe):Promise.resolve()}function P(Z){const ce=xe.values().next().value;return ce&&typeof ce.runWithContext=="function"?ce.runWithContext(Z):Z()}function I(Z,ce){let pe;const[ie,Le,et]=Kj(Z,ce);pe=W_(ie.reverse(),"beforeRouteLeave",Z,ce);for(const W of ie)W.leaveGuards.forEach(re=>{pe.push(cl(re,Z,ce))});const j=N.bind(null,Z,ce);return pe.push(j),Fe(pe).then(()=>{pe=[];for(const W of s.list())pe.push(cl(W,Z,ce));return pe.push(j),Fe(pe)}).then(()=>{pe=W_(Le,"beforeRouteUpdate",Z,ce);for(const W of Le)W.updateGuards.forEach(re=>{pe.push(cl(re,Z,ce))});return pe.push(j),Fe(pe)}).then(()=>{pe=[];for(const W of et)if(W.beforeEnter)if(ss(W.beforeEnter))for(const re of W.beforeEnter)pe.push(cl(re,Z,ce));else pe.push(cl(W.beforeEnter,Z,ce));return pe.push(j),Fe(pe)}).then(()=>(Z.matched.forEach(W=>W.enterCallbacks={}),pe=W_(et,"beforeRouteEnter",Z,ce,P),pe.push(j),Fe(pe))).then(()=>{pe=[];for(const W of i.list())pe.push(cl(W,Z,ce));return pe.push(j),Fe(pe)}).catch(W=>Xs(W,8)?W:Promise.reject(W))}function D(Z,ce,pe){l.list().forEach(ie=>P(()=>ie(Z,ce,pe)))}function V(Z,ce,pe,ie,Le){const et=w(Z,ce);if(et)return et;const j=ce===Vi,W=Dc?history.state:{};pe&&(ie||j?r.replace(Z.fullPath,Ht({scroll:j&&W&&W.scroll},Le)):r.push(Z.fullPath,Le)),a.value=Z,ye(Z,ce,pe,j),R()}let G;function te(){G||(G=r.listen((Z,ce,pe)=>{if(!Ye.listening)return;const ie=y(Z),Le=$(ie);if(Le){A(Ht(Le,{replace:!0}),ie).catch(Pf);return}c=ie;const et=a.value;Dc&&_j(h5(et.fullPath,pe.delta),w0()),I(ie,et).catch(j=>Xs(j,12)?j:Xs(j,2)?(A(j.to,ie).then(W=>{Xs(W,20)&&!pe.delta&&pe.type===kh.pop&&r.go(-1,!1)}).catch(Pf),Promise.reject()):(pe.delta&&r.go(-pe.delta,!1),X(j,ie,et))).then(j=>{j=j||V(ie,et,!1),j&&(pe.delta&&!Xs(j,8)?r.go(-pe.delta,!1):pe.type===kh.pop&&Xs(j,20)&&r.go(-1,!1)),D(ie,et,j)}).catch(Pf)}))}let oe=Dd(),J=Dd(),q;function X(Z,ce,pe){R(Z);const ie=J.list();return ie.length?ie.forEach(Le=>Le(Z,ce,pe)):console.error(Z),Promise.reject(Z)}function ee(){return q&&a.value!==Vi?Promise.resolve():new Promise((Z,ce)=>{oe.add([Z,ce])})}function R(Z){return q||(q=!Z,te(),oe.list().forEach(([ce,pe])=>Z?pe(Z):ce()),oe.reset()),Z}function ye(Z,ce,pe,ie){const{scrollBehavior:Le}=e;if(!Dc||!Le)return Promise.resolve();const et=!pe&&vj(h5(Z.fullPath,0))||(ie||!pe)&&history.state&&history.state.scroll||null;return tt().then(()=>Le(Z,ce,et)).then(j=>j&&gj(j)).catch(j=>X(j,Z,ce))}const Ce=Z=>r.go(Z);let U;const xe=new Set,Ye={currentRoute:a,listening:!0,addRoute:h,removeRoute:p,hasRoute:v,getRoutes:m,resolve:y,options:e,push:C,replace:T,go:Ce,back:()=>Ce(-1),forward:()=>Ce(1),beforeEach:s.add,beforeResolve:i.add,afterEach:l.add,onError:J.add,isReady:ee,install(Z){const ce=this;Z.component("RouterLink",jj),Z.component("RouterView",qj),Z.config.globalProperties.$router=ce,Object.defineProperty(Z.config.globalProperties,"$route",{enumerable:!0,get:()=>S(a)}),Dc&&!U&&a.value===Vi&&(U=!0,C(r.location).catch(Le=>{}));const pe={};for(const Le in Vi)Object.defineProperty(pe,Le,{get:()=>a.value[Le],enumerable:!0});Z.provide(Rw,ce),Z.provide(Mx,Jb(pe)),Z.provide(Ry,a);const ie=Z.unmount;xe.add(Z),Z.unmount=function(){xe.delete(Z),xe.size<1&&(c=Vi,G&&G(),G=null,a.value=Vi,U=!1,q=!1),ie()}}};function Fe(Z){return Z.reduce((ce,pe)=>ce.then(()=>P(pe)),Promise.resolve())}return Ye}function Kj(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(c=>Fu(c,l))?o.push(l):n.push(l));const a=e.matched[i];a&&(t.matched.find(c=>Fu(c,a))||r.push(a))}return[n,o,r]}const Gj='a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])',Yj=e=>getComputedStyle(e).position==="fixed"?!1:e.offsetParent!==null,T5=e=>Array.from(e.querySelectorAll(Gj)).filter(t=>Jj(t)&&Yj(t)),Jj=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}},En=(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)},M5=e=>t=>t.pointerType==="mouse"?e(t):void 0;var Zj=Object.defineProperty,Xj=Object.defineProperties,Qj=Object.getOwnPropertyDescriptors,A5=Object.getOwnPropertySymbols,eH=Object.prototype.hasOwnProperty,tH=Object.prototype.propertyIsEnumerable,O5=(e,t,n)=>t in e?Zj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nH=(e,t)=>{for(var n in t||(t={}))eH.call(t,n)&&O5(e,n,t[n]);if(A5)for(var n of A5(t))tH.call(t,n)&&O5(e,n,t[n]);return e},oH=(e,t)=>Xj(e,Qj(t));function I5(e,t){var n;const o=Cn();return Yr(()=>{o.value=e()},oH(nH({},t),{flush:(n=t==null?void 0:t.flush)!=null?n:"sync"})),dc(o)}var N5;const kt=typeof window<"u",rH=e=>typeof e<"u",sH=e=>typeof e=="function",iH=e=>typeof e=="string",Bu=()=>{},lH=kt&&((N5=window==null?void 0:window.navigator)==null?void 0:N5.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Vu(e){return typeof e=="function"?e():S(e)}function Ax(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 aH(e,t={}){let n,o,r=Bu;const s=l=>{clearTimeout(l),r(),r=Bu};return l=>{const a=Vu(e),c=Vu(t.maxWait);return n&&s(n),a<=0||c!==void 0&&c<=0?(o&&(s(o),o=null),Promise.resolve(l())):new Promise((u,d)=>{r=t.rejectOnCancel?d:u,c&&!o&&(o=setTimeout(()=>{n&&s(n),o=null,u(l())},c)),n=setTimeout(()=>{o&&s(o),o=null,u(l())},a)})}}function cH(e,t=!0,n=!0,o=!1){let r=0,s,i=!0,l=Bu,a;const c=()=>{s&&(clearTimeout(s),s=void 0,l(),l=Bu)};return d=>{const f=Vu(e),h=Date.now()-r,p=()=>a=d();return c(),f<=0?(r=Date.now(),p()):(h>f&&(n||!i)?(r=Date.now(),p()):t&&(a=new Promise((m,v)=>{l=o?v:m,s=setTimeout(()=>{r=Date.now(),i=!0,m(p()),c()},Math.max(0,f-h))})),!n&&!s&&(s=setTimeout(()=>i=!0,f)),i=!1,a)}}function uH(e){return e}function Qh(e){return Wb()?(qb(e),!0):!1}function dH(e,t=200,n={}){return Ax(aH(t,n),e)}function fH(e,t=200,n={}){const o=H(e.value),r=dH(()=>{o.value=e.value},t,n);return ke(e,()=>r()),o}function hH(e,t=200,n=!1,o=!0,r=!1){return Ax(cH(t,n,o,r),e)}function pH(e,t=!0){nt()?mt(e):t?e():tt(e)}function Fy(e,t,n={}){const{immediate:o=!0}=n,r=H(!1);let s=null;function i(){s&&(clearTimeout(s),s=null)}function l(){r.value=!1,i()}function a(...c){i(),r.value=!0,s=setTimeout(()=>{r.value=!1,s=null,e(...c)},Vu(t))}return o&&(r.value=!0,kt&&a()),Qh(l),{isPending:dc(r),start:a,stop:l}}function di(e){var t;const n=Vu(e);return(t=n==null?void 0:n.$el)!=null?t:n}const ep=kt?window:void 0,mH=kt?window.document:void 0;function Tn(...e){let t,n,o,r;if(iH(e[0])||Array.isArray(e[0])?([n,o,r]=e,t=ep):[t,n,o,r]=e,!t)return Bu;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const s=[],i=()=>{s.forEach(u=>u()),s.length=0},l=(u,d,f,h)=>(u.addEventListener(d,f,h),()=>u.removeEventListener(d,f,h)),a=ke(()=>[di(t),Vu(r)],([u,d])=>{i(),u&&s.push(...n.flatMap(f=>o.map(h=>l(u,f,h,d))))},{immediate:!0,flush:"post"}),c=()=>{a(),i()};return Qh(c),c}let P5=!1;function gH(e,t,n={}){const{window:o=ep,ignore:r=[],capture:s=!0,detectIframe:i=!1}=n;if(!o)return;lH&&!P5&&(P5=!0,Array.from(o.document.body.children).forEach(f=>f.addEventListener("click",Bu)));let l=!0;const a=f=>r.some(h=>{if(typeof h=="string")return Array.from(o.document.querySelectorAll(h)).some(p=>p===f.target||f.composedPath().includes(p));{const p=di(h);return p&&(f.target===p||f.composedPath().includes(p))}}),u=[Tn(o,"click",f=>{const h=di(e);if(!(!h||h===f.target||f.composedPath().includes(h))){if(f.detail===0&&(l=!a(f)),!l){l=!0;return}t(f)}},{passive:!0,capture:s}),Tn(o,"pointerdown",f=>{const h=di(e);h&&(l=!f.composedPath().includes(h)&&!a(f))},{passive:!0}),i&&Tn(o,"blur",f=>{var h;const p=di(e);((h=o.document.activeElement)==null?void 0:h.tagName)==="IFRAME"&&!(p!=null&&p.contains(o.document.activeElement))&&t(f)})].filter(Boolean);return()=>u.forEach(f=>f())}function Ox(e,t=!1){const n=H(),o=()=>n.value=!!e();return o(),pH(o,t),n}function _H(e){return JSON.parse(JSON.stringify(e))}const L5=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},R5="__vueuse_ssr_handlers__";L5[R5]=L5[R5]||{};function vH({document:e=mH}={}){if(!e)return H("visible");const t=H(e.visibilityState);return Tn(e,"visibilitychange",()=>{t.value=e.visibilityState}),t}var F5=Object.getOwnPropertySymbols,yH=Object.prototype.hasOwnProperty,bH=Object.prototype.propertyIsEnumerable,wH=(e,t)=>{var n={};for(var o in e)yH.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&F5)for(var o of F5(e))t.indexOf(o)<0&&bH.call(e,o)&&(n[o]=e[o]);return n};function Oo(e,t,n={}){const o=n,{window:r=ep}=o,s=wH(o,["window"]);let i;const l=Ox(()=>r&&"ResizeObserver"in r),a=()=>{i&&(i.disconnect(),i=void 0)},c=ke(()=>di(e),d=>{a(),l.value&&r&&d&&(i=new ResizeObserver(t),i.observe(d,s))},{immediate:!0,flush:"post"}),u=()=>{a(),c()};return Qh(u),{isSupported:l,stop:u}}var D5=Object.getOwnPropertySymbols,kH=Object.prototype.hasOwnProperty,CH=Object.prototype.propertyIsEnumerable,SH=(e,t)=>{var n={};for(var o in e)kH.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&D5)for(var o of D5(e))t.indexOf(o)<0&&CH.call(e,o)&&(n[o]=e[o]);return n};function $H(e,t,n={}){const o=n,{window:r=ep}=o,s=SH(o,["window"]);let i;const l=Ox(()=>r&&"MutationObserver"in r),a=()=>{i&&(i.disconnect(),i=void 0)},c=ke(()=>di(e),d=>{a(),l.value&&r&&d&&(i=new MutationObserver(t),i.observe(d,s))},{immediate:!0}),u=()=>{a(),c()};return Qh(u),{isSupported:l,stop:u}}var B5;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(B5||(B5={}));var EH=Object.defineProperty,V5=Object.getOwnPropertySymbols,xH=Object.prototype.hasOwnProperty,TH=Object.prototype.propertyIsEnumerable,z5=(e,t,n)=>t in e?EH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,MH=(e,t)=>{for(var n in t||(t={}))xH.call(t,n)&&z5(e,n,t[n]);if(V5)for(var n of V5(t))TH.call(t,n)&&z5(e,n,t[n]);return e};const AH={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]};MH({linear:uH},AH);function OH(e,t,n,o={}){var r,s,i;const{clone:l=!1,passive:a=!1,eventName:c,deep:u=!1,defaultValue:d}=o,f=nt(),h=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 p=c;t||(t="modelValue"),p=c||p||`update:${t.toString()}`;const m=y=>l?sH(l)?l(y):_H(y):y,v=()=>rH(e[t])?m(e[t]):d;if(a){const y=v(),E=H(y);return ke(()=>e[t],w=>E.value=m(w)),ke(E,w=>{(w!==e[t]||u)&&h(p,w)},{deep:u}),E}else return B({get(){return v()},set(y){h(p,y)}})}function IH({window:e=ep}={}){if(!e)return H(!1);const t=H(e.document.hasFocus());return Tn(e,"blur",()=>{t.value=!1}),Tn(e,"focus",()=>{t.value=!0}),t}const NH=()=>kt&&/firefox/i.test(window.navigator.userAgent),PH=(e,t)=>{if(!kt||!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},Fw=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 LH=typeof global=="object"&&global&&global.Object===Object&&global;const Ix=LH;var RH=typeof self=="object"&&self&&self.Object===Object&&self,FH=Ix||RH||Function("return this")();const cs=FH;var DH=cs.Symbol;const Ir=DH;var Nx=Object.prototype,BH=Nx.hasOwnProperty,VH=Nx.toString,Bd=Ir?Ir.toStringTag:void 0;function zH(e){var t=BH.call(e,Bd),n=e[Bd];try{e[Bd]=void 0;var o=!0}catch{}var r=VH.call(e);return o&&(t?e[Bd]=n:delete e[Bd]),r}var jH=Object.prototype,HH=jH.toString;function UH(e){return HH.call(e)}var WH="[object Null]",qH="[object Undefined]",j5=Ir?Ir.toStringTag:void 0;function hc(e){return e==null?e===void 0?qH:WH:j5&&j5 in Object(e)?zH(e):UH(e)}function Ls(e){return e!=null&&typeof e=="object"}var KH="[object Symbol]";function k0(e){return typeof e=="symbol"||Ls(e)&&hc(e)==KH}function Px(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 GH=Array.isArray;const bo=GH;var YH=1/0,H5=Ir?Ir.prototype:void 0,U5=H5?H5.toString:void 0;function Lx(e){if(typeof e=="string")return e;if(bo(e))return Px(e,Lx)+"";if(k0(e))return U5?U5.call(e):"";var t=e+"";return t=="0"&&1/e==-YH?"-0":t}var JH=/\s/;function ZH(e){for(var t=e.length;t--&&JH.test(e.charAt(t)););return t}var XH=/^\s+/;function QH(e){return e&&e.slice(0,ZH(e)+1).replace(XH,"")}function wo(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var W5=0/0,eU=/^[-+]0x[0-9a-f]+$/i,tU=/^0b[01]+$/i,nU=/^0o[0-7]+$/i,oU=parseInt;function Dy(e){if(typeof e=="number")return e;if(k0(e))return W5;if(wo(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=wo(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=QH(e);var n=tU.test(e);return n||nU.test(e)?oU(e.slice(2),n?2:8):eU.test(e)?W5:+e}var q5=1/0,rU=17976931348623157e292;function sU(e){if(!e)return e===0?e:0;if(e=Dy(e),e===q5||e===-q5){var t=e<0?-1:1;return t*rU}return e===e?e:0}function iU(e){var t=sU(e),n=t%1;return t===t?n?t-n:t:0}function Dw(e){return e}var lU="[object AsyncFunction]",aU="[object Function]",cU="[object GeneratorFunction]",uU="[object Proxy]";function Bw(e){if(!wo(e))return!1;var t=hc(e);return t==aU||t==cU||t==lU||t==uU}var dU=cs["__core-js_shared__"];const q_=dU;var K5=function(){var e=/[^.]+$/.exec(q_&&q_.keys&&q_.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function fU(e){return!!K5&&K5 in e}var hU=Function.prototype,pU=hU.toString;function pc(e){if(e!=null){try{return pU.call(e)}catch{}try{return e+""}catch{}}return""}var mU=/[\\^$.*+?()[\]{}|]/g,gU=/^\[object .+?Constructor\]$/,_U=Function.prototype,vU=Object.prototype,yU=_U.toString,bU=vU.hasOwnProperty,wU=RegExp("^"+yU.call(bU).replace(mU,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function kU(e){if(!wo(e)||fU(e))return!1;var t=Bw(e)?wU:gU;return t.test(pc(e))}function CU(e,t){return e==null?void 0:e[t]}function mc(e,t){var n=CU(e,t);return kU(n)?n:void 0}var SU=mc(cs,"WeakMap");const By=SU;var G5=Object.create,$U=function(){function e(){}return function(t){if(!wo(t))return{};if(G5)return G5(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const EU=$U;function xU(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 Rx(e,t){var n=-1,o=e.length;for(t||(t=Array(o));++n<o;)t[n]=e[n];return t}var TU=800,MU=16,AU=Date.now;function OU(e){var t=0,n=0;return function(){var o=AU(),r=MU-(o-n);if(n=o,r>0){if(++t>=TU)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function IU(e){return function(){return e}}var NU=function(){try{var e=mc(Object,"defineProperty");return e({},"",{}),e}catch{}}();const yg=NU;var PU=yg?function(e,t){return yg(e,"toString",{configurable:!0,enumerable:!1,value:IU(t),writable:!0})}:Dw;const LU=PU;var RU=OU(LU);const Fx=RU;function FU(e,t){for(var n=-1,o=e==null?0:e.length;++n<o&&t(e[n],n,e)!==!1;);return e}function DU(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 BU=9007199254740991,VU=/^(?:0|[1-9]\d*)$/;function C0(e,t){var n=typeof e;return t=t??BU,!!t&&(n=="number"||n!="symbol"&&VU.test(e))&&e>-1&&e%1==0&&e<t}function Vw(e,t,n){t=="__proto__"&&yg?yg(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function tp(e,t){return e===t||e!==e&&t!==t}var zU=Object.prototype,jU=zU.hasOwnProperty;function zw(e,t,n){var o=e[t];(!(jU.call(e,t)&&tp(o,n))||n===void 0&&!(t in e))&&Vw(e,t,n)}function np(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?Vw(n,l,a):zw(n,l,a)}return n}var Y5=Math.max;function Dx(e,t,n){return t=Y5(t===void 0?e.length-1:t,0),function(){for(var o=arguments,r=-1,s=Y5(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),xU(e,this,l)}}function HU(e,t){return Fx(Dx(e,t,Dw),e+"")}var UU=9007199254740991;function jw(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=UU}function ad(e){return e!=null&&jw(e.length)&&!Bw(e)}function WU(e,t,n){if(!wo(n))return!1;var o=typeof t;return(o=="number"?ad(n)&&C0(t,n.length):o=="string"&&t in n)?tp(n[t],e):!1}function qU(e){return HU(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&&WU(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 KU=Object.prototype;function Hw(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||KU;return e===n}function GU(e,t){for(var n=-1,o=Array(e);++n<e;)o[n]=t(n);return o}var YU="[object Arguments]";function J5(e){return Ls(e)&&hc(e)==YU}var Bx=Object.prototype,JU=Bx.hasOwnProperty,ZU=Bx.propertyIsEnumerable,XU=J5(function(){return arguments}())?J5:function(e){return Ls(e)&&JU.call(e,"callee")&&!ZU.call(e,"callee")};const Ch=XU;function QU(){return!1}var Vx=typeof nr=="object"&&nr&&!nr.nodeType&&nr,Z5=Vx&&typeof or=="object"&&or&&!or.nodeType&&or,eW=Z5&&Z5.exports===Vx,X5=eW?cs.Buffer:void 0,tW=X5?X5.isBuffer:void 0,nW=tW||QU;const Sh=nW;var oW="[object Arguments]",rW="[object Array]",sW="[object Boolean]",iW="[object Date]",lW="[object Error]",aW="[object Function]",cW="[object Map]",uW="[object Number]",dW="[object Object]",fW="[object RegExp]",hW="[object Set]",pW="[object String]",mW="[object WeakMap]",gW="[object ArrayBuffer]",_W="[object DataView]",vW="[object Float32Array]",yW="[object Float64Array]",bW="[object Int8Array]",wW="[object Int16Array]",kW="[object Int32Array]",CW="[object Uint8Array]",SW="[object Uint8ClampedArray]",$W="[object Uint16Array]",EW="[object Uint32Array]",tn={};tn[vW]=tn[yW]=tn[bW]=tn[wW]=tn[kW]=tn[CW]=tn[SW]=tn[$W]=tn[EW]=!0;tn[oW]=tn[rW]=tn[gW]=tn[sW]=tn[_W]=tn[iW]=tn[lW]=tn[aW]=tn[cW]=tn[uW]=tn[dW]=tn[fW]=tn[hW]=tn[pW]=tn[mW]=!1;function xW(e){return Ls(e)&&jw(e.length)&&!!tn[hc(e)]}function Uw(e){return function(t){return e(t)}}var zx=typeof nr=="object"&&nr&&!nr.nodeType&&nr,Rf=zx&&typeof or=="object"&&or&&!or.nodeType&&or,TW=Rf&&Rf.exports===zx,K_=TW&&Ix.process,MW=function(){try{var e=Rf&&Rf.require&&Rf.require("util").types;return e||K_&&K_.binding&&K_.binding("util")}catch{}}();const zu=MW;var Q5=zu&&zu.isTypedArray,AW=Q5?Uw(Q5):xW;const Ww=AW;var OW=Object.prototype,IW=OW.hasOwnProperty;function jx(e,t){var n=bo(e),o=!n&&Ch(e),r=!n&&!o&&Sh(e),s=!n&&!o&&!r&&Ww(e),i=n||o||r||s,l=i?GU(e.length,String):[],a=l.length;for(var c in e)(t||IW.call(e,c))&&!(i&&(c=="length"||r&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||C0(c,a)))&&l.push(c);return l}function Hx(e,t){return function(n){return e(t(n))}}var NW=Hx(Object.keys,Object);const PW=NW;var LW=Object.prototype,RW=LW.hasOwnProperty;function FW(e){if(!Hw(e))return PW(e);var t=[];for(var n in Object(e))RW.call(e,n)&&n!="constructor"&&t.push(n);return t}function op(e){return ad(e)?jx(e):FW(e)}function DW(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var BW=Object.prototype,VW=BW.hasOwnProperty;function zW(e){if(!wo(e))return DW(e);var t=Hw(e),n=[];for(var o in e)o=="constructor"&&(t||!VW.call(e,o))||n.push(o);return n}function rp(e){return ad(e)?jx(e,!0):zW(e)}var jW=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,HW=/^\w*$/;function qw(e,t){if(bo(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||k0(e)?!0:HW.test(e)||!jW.test(e)||t!=null&&e in Object(t)}var UW=mc(Object,"create");const $h=UW;function WW(){this.__data__=$h?$h(null):{},this.size=0}function qW(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var KW="__lodash_hash_undefined__",GW=Object.prototype,YW=GW.hasOwnProperty;function JW(e){var t=this.__data__;if($h){var n=t[e];return n===KW?void 0:n}return YW.call(t,e)?t[e]:void 0}var ZW=Object.prototype,XW=ZW.hasOwnProperty;function QW(e){var t=this.__data__;return $h?t[e]!==void 0:XW.call(t,e)}var eq="__lodash_hash_undefined__";function tq(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=$h&&t===void 0?eq:t,this}function Za(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])}}Za.prototype.clear=WW;Za.prototype.delete=qW;Za.prototype.get=JW;Za.prototype.has=QW;Za.prototype.set=tq;function nq(){this.__data__=[],this.size=0}function S0(e,t){for(var n=e.length;n--;)if(tp(e[n][0],t))return n;return-1}var oq=Array.prototype,rq=oq.splice;function sq(e){var t=this.__data__,n=S0(t,e);if(n<0)return!1;var o=t.length-1;return n==o?t.pop():rq.call(t,n,1),--this.size,!0}function iq(e){var t=this.__data__,n=S0(t,e);return n<0?void 0:t[n][1]}function lq(e){return S0(this.__data__,e)>-1}function aq(e,t){var n=this.__data__,o=S0(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}function $i(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])}}$i.prototype.clear=nq;$i.prototype.delete=sq;$i.prototype.get=iq;$i.prototype.has=lq;$i.prototype.set=aq;var cq=mc(cs,"Map");const Eh=cq;function uq(){this.size=0,this.__data__={hash:new Za,map:new(Eh||$i),string:new Za}}function dq(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function $0(e,t){var n=e.__data__;return dq(t)?n[typeof t=="string"?"string":"hash"]:n.map}function fq(e){var t=$0(this,e).delete(e);return this.size-=t?1:0,t}function hq(e){return $0(this,e).get(e)}function pq(e){return $0(this,e).has(e)}function mq(e,t){var n=$0(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}function Ei(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])}}Ei.prototype.clear=uq;Ei.prototype.delete=fq;Ei.prototype.get=hq;Ei.prototype.has=pq;Ei.prototype.set=mq;var gq="Expected a function";function Kw(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(gq);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(Kw.Cache||Ei),n}Kw.Cache=Ei;var _q=500;function vq(e){var t=Kw(e,function(o){return n.size===_q&&n.clear(),o}),n=t.cache;return t}var yq=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,bq=/\\(\\)?/g,wq=vq(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(yq,function(n,o,r,s){t.push(r?s.replace(bq,"$1"):o||n)}),t});const kq=wq;function Cq(e){return e==null?"":Lx(e)}function E0(e,t){return bo(e)?e:qw(e,t)?[e]:kq(Cq(e))}var Sq=1/0;function sp(e){if(typeof e=="string"||k0(e))return e;var t=e+"";return t=="0"&&1/e==-Sq?"-0":t}function Gw(e,t){t=E0(t,e);for(var n=0,o=t.length;e!=null&&n<o;)e=e[sp(t[n++])];return n&&n==o?e:void 0}function wr(e,t,n){var o=e==null?void 0:Gw(e,t);return o===void 0?n:o}function Yw(e,t){for(var n=-1,o=t.length,r=e.length;++n<o;)e[r+n]=t[n];return e}var e6=Ir?Ir.isConcatSpreadable:void 0;function $q(e){return bo(e)||Ch(e)||!!(e6&&e&&e[e6])}function Jw(e,t,n,o,r){var s=-1,i=e.length;for(n||(n=$q),r||(r=[]);++s<i;){var l=e[s];t>0&&n(l)?t>1?Jw(l,t-1,n,o,r):Yw(r,l):o||(r[r.length]=l)}return r}function Eq(e){var t=e==null?0:e.length;return t?Jw(e,1):[]}function xq(e){return Fx(Dx(e,void 0,Eq),e+"")}var Tq=Hx(Object.getPrototypeOf,Object);const Zw=Tq;var Mq="[object Object]",Aq=Function.prototype,Oq=Object.prototype,Ux=Aq.toString,Iq=Oq.hasOwnProperty,Nq=Ux.call(Object);function Pq(e){if(!Ls(e)||hc(e)!=Mq)return!1;var t=Zw(e);if(t===null)return!0;var n=Iq.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Ux.call(n)==Nq}function bg(){if(!arguments.length)return[];var e=arguments[0];return bo(e)?e:[e]}function Lq(){this.__data__=new $i,this.size=0}function Rq(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Fq(e){return this.__data__.get(e)}function Dq(e){return this.__data__.has(e)}var Bq=200;function Vq(e,t){var n=this.__data__;if(n instanceof $i){var o=n.__data__;if(!Eh||o.length<Bq-1)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ei(o)}return n.set(e,t),this.size=n.size,this}function Zr(e){var t=this.__data__=new $i(e);this.size=t.size}Zr.prototype.clear=Lq;Zr.prototype.delete=Rq;Zr.prototype.get=Fq;Zr.prototype.has=Dq;Zr.prototype.set=Vq;function zq(e,t){return e&&np(t,op(t),e)}function jq(e,t){return e&&np(t,rp(t),e)}var Wx=typeof nr=="object"&&nr&&!nr.nodeType&&nr,t6=Wx&&typeof or=="object"&&or&&!or.nodeType&&or,Hq=t6&&t6.exports===Wx,n6=Hq?cs.Buffer:void 0,o6=n6?n6.allocUnsafe:void 0;function qx(e,t){if(t)return e.slice();var n=e.length,o=o6?o6(n):new e.constructor(n);return e.copy(o),o}function Uq(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 Kx(){return[]}var Wq=Object.prototype,qq=Wq.propertyIsEnumerable,r6=Object.getOwnPropertySymbols,Kq=r6?function(e){return e==null?[]:(e=Object(e),Uq(r6(e),function(t){return qq.call(e,t)}))}:Kx;const Xw=Kq;function Gq(e,t){return np(e,Xw(e),t)}var Yq=Object.getOwnPropertySymbols,Jq=Yq?function(e){for(var t=[];e;)Yw(t,Xw(e)),e=Zw(e);return t}:Kx;const Gx=Jq;function Zq(e,t){return np(e,Gx(e),t)}function Yx(e,t,n){var o=t(e);return bo(e)?o:Yw(o,n(e))}function Vy(e){return Yx(e,op,Xw)}function Xq(e){return Yx(e,rp,Gx)}var Qq=mc(cs,"DataView");const zy=Qq;var eK=mc(cs,"Promise");const jy=eK;var tK=mc(cs,"Set");const Hy=tK;var s6="[object Map]",nK="[object Object]",i6="[object Promise]",l6="[object Set]",a6="[object WeakMap]",c6="[object DataView]",oK=pc(zy),rK=pc(Eh),sK=pc(jy),iK=pc(Hy),lK=pc(By),la=hc;(zy&&la(new zy(new ArrayBuffer(1)))!=c6||Eh&&la(new Eh)!=s6||jy&&la(jy.resolve())!=i6||Hy&&la(new Hy)!=l6||By&&la(new By)!=a6)&&(la=function(e){var t=hc(e),n=t==nK?e.constructor:void 0,o=n?pc(n):"";if(o)switch(o){case oK:return c6;case rK:return s6;case sK:return i6;case iK:return l6;case lK:return a6}return t});const xh=la;var aK=Object.prototype,cK=aK.hasOwnProperty;function uK(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&cK.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var dK=cs.Uint8Array;const wg=dK;function Qw(e){var t=new e.constructor(e.byteLength);return new wg(t).set(new wg(e)),t}function fK(e,t){var n=t?Qw(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var hK=/\w*$/;function pK(e){var t=new e.constructor(e.source,hK.exec(e));return t.lastIndex=e.lastIndex,t}var u6=Ir?Ir.prototype:void 0,d6=u6?u6.valueOf:void 0;function mK(e){return d6?Object(d6.call(e)):{}}function Jx(e,t){var n=t?Qw(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var gK="[object Boolean]",_K="[object Date]",vK="[object Map]",yK="[object Number]",bK="[object RegExp]",wK="[object Set]",kK="[object String]",CK="[object Symbol]",SK="[object ArrayBuffer]",$K="[object DataView]",EK="[object Float32Array]",xK="[object Float64Array]",TK="[object Int8Array]",MK="[object Int16Array]",AK="[object Int32Array]",OK="[object Uint8Array]",IK="[object Uint8ClampedArray]",NK="[object Uint16Array]",PK="[object Uint32Array]";function LK(e,t,n){var o=e.constructor;switch(t){case SK:return Qw(e);case gK:case _K:return new o(+e);case $K:return fK(e,n);case EK:case xK:case TK:case MK:case AK:case OK:case IK:case NK:case PK:return Jx(e,n);case vK:return new o;case yK:case kK:return new o(e);case bK:return pK(e);case wK:return new o;case CK:return mK(e)}}function Zx(e){return typeof e.constructor=="function"&&!Hw(e)?EU(Zw(e)):{}}var RK="[object Map]";function FK(e){return Ls(e)&&xh(e)==RK}var f6=zu&&zu.isMap,DK=f6?Uw(f6):FK;const BK=DK;var VK="[object Set]";function zK(e){return Ls(e)&&xh(e)==VK}var h6=zu&&zu.isSet,jK=h6?Uw(h6):zK;const HK=jK;var UK=1,WK=2,qK=4,Xx="[object Arguments]",KK="[object Array]",GK="[object Boolean]",YK="[object Date]",JK="[object Error]",Qx="[object Function]",ZK="[object GeneratorFunction]",XK="[object Map]",QK="[object Number]",eT="[object Object]",eG="[object RegExp]",tG="[object Set]",nG="[object String]",oG="[object Symbol]",rG="[object WeakMap]",sG="[object ArrayBuffer]",iG="[object DataView]",lG="[object Float32Array]",aG="[object Float64Array]",cG="[object Int8Array]",uG="[object Int16Array]",dG="[object Int32Array]",fG="[object Uint8Array]",hG="[object Uint8ClampedArray]",pG="[object Uint16Array]",mG="[object Uint32Array]",Qt={};Qt[Xx]=Qt[KK]=Qt[sG]=Qt[iG]=Qt[GK]=Qt[YK]=Qt[lG]=Qt[aG]=Qt[cG]=Qt[uG]=Qt[dG]=Qt[XK]=Qt[QK]=Qt[eT]=Qt[eG]=Qt[tG]=Qt[nG]=Qt[oG]=Qt[fG]=Qt[hG]=Qt[pG]=Qt[mG]=!0;Qt[JK]=Qt[Qx]=Qt[rG]=!1;function Ff(e,t,n,o,r,s){var i,l=t&UK,a=t&WK,c=t&qK;if(n&&(i=r?n(e,o,r,s):n(e)),i!==void 0)return i;if(!wo(e))return e;var u=bo(e);if(u){if(i=uK(e),!l)return Rx(e,i)}else{var d=xh(e),f=d==Qx||d==ZK;if(Sh(e))return qx(e,l);if(d==eT||d==Xx||f&&!r){if(i=a||f?{}:Zx(e),!l)return a?Zq(e,jq(i,e)):Gq(e,zq(i,e))}else{if(!Qt[d])return r?e:{};i=LK(e,d,l)}}s||(s=new Zr);var h=s.get(e);if(h)return h;s.set(e,i),HK(e)?e.forEach(function(v){i.add(Ff(v,t,n,v,e,s))}):BK(e)&&e.forEach(function(v,y){i.set(y,Ff(v,t,n,y,e,s))});var p=c?a?Xq:Vy:a?rp:op,m=u?void 0:p(e);return FU(m||e,function(v,y){m&&(y=v,v=e[y]),zw(i,y,Ff(v,t,n,y,e,s))}),i}var gG=4;function p6(e){return Ff(e,gG)}var _G=1,vG=4;function m6(e){return Ff(e,_G|vG)}var yG="__lodash_hash_undefined__";function bG(e){return this.__data__.set(e,yG),this}function wG(e){return this.__data__.has(e)}function kg(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Ei;++t<n;)this.add(e[t])}kg.prototype.add=kg.prototype.push=bG;kg.prototype.has=wG;function kG(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 CG(e,t){return e.has(t)}var SG=1,$G=2;function tT(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 c=s.get(e),u=s.get(t);if(c&&u)return c==t&&u==e;var d=-1,f=!0,h=n&$G?new kg:void 0;for(s.set(e,t),s.set(t,e);++d<l;){var p=e[d],m=t[d];if(o)var v=i?o(m,p,d,t,e,s):o(p,m,d,e,t,s);if(v!==void 0){if(v)continue;f=!1;break}if(h){if(!kG(t,function(y,E){if(!CG(h,E)&&(p===y||r(p,y,n,o,s)))return h.push(E)})){f=!1;break}}else if(!(p===m||r(p,m,n,o,s))){f=!1;break}}return s.delete(e),s.delete(t),f}function EG(e){var t=-1,n=Array(e.size);return e.forEach(function(o,r){n[++t]=[r,o]}),n}function xG(e){var t=-1,n=Array(e.size);return e.forEach(function(o){n[++t]=o}),n}var TG=1,MG=2,AG="[object Boolean]",OG="[object Date]",IG="[object Error]",NG="[object Map]",PG="[object Number]",LG="[object RegExp]",RG="[object Set]",FG="[object String]",DG="[object Symbol]",BG="[object ArrayBuffer]",VG="[object DataView]",g6=Ir?Ir.prototype:void 0,G_=g6?g6.valueOf:void 0;function zG(e,t,n,o,r,s,i){switch(n){case VG: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 wg(e),new wg(t)));case AG:case OG:case PG:return tp(+e,+t);case IG:return e.name==t.name&&e.message==t.message;case LG:case FG:return e==t+"";case NG:var l=EG;case RG:var a=o&TG;if(l||(l=xG),e.size!=t.size&&!a)return!1;var c=i.get(e);if(c)return c==t;o|=MG,i.set(e,t);var u=tT(l(e),l(t),o,r,s,i);return i.delete(e),u;case DG:if(G_)return G_.call(e)==G_.call(t)}return!1}var jG=1,HG=Object.prototype,UG=HG.hasOwnProperty;function WG(e,t,n,o,r,s){var i=n&jG,l=Vy(e),a=l.length,c=Vy(t),u=c.length;if(a!=u&&!i)return!1;for(var d=a;d--;){var f=l[d];if(!(i?f in t:UG.call(t,f)))return!1}var h=s.get(e),p=s.get(t);if(h&&p)return h==t&&p==e;var m=!0;s.set(e,t),s.set(t,e);for(var v=i;++d<a;){f=l[d];var y=e[f],E=t[f];if(o)var w=i?o(E,y,f,t,e,s):o(y,E,f,e,t,s);if(!(w===void 0?y===E||r(y,E,n,o,s):w)){m=!1;break}v||(v=f=="constructor")}if(m&&!v){var C=e.constructor,T=t.constructor;C!=T&&"constructor"in e&&"constructor"in t&&!(typeof C=="function"&&C instanceof C&&typeof T=="function"&&T instanceof T)&&(m=!1)}return s.delete(e),s.delete(t),m}var qG=1,_6="[object Arguments]",v6="[object Array]",rm="[object Object]",KG=Object.prototype,y6=KG.hasOwnProperty;function GG(e,t,n,o,r,s){var i=bo(e),l=bo(t),a=i?v6:xh(e),c=l?v6:xh(t);a=a==_6?rm:a,c=c==_6?rm:c;var u=a==rm,d=c==rm,f=a==c;if(f&&Sh(e)){if(!Sh(t))return!1;i=!0,u=!1}if(f&&!u)return s||(s=new Zr),i||Ww(e)?tT(e,t,n,o,r,s):zG(e,t,a,n,o,r,s);if(!(n&qG)){var h=u&&y6.call(e,"__wrapped__"),p=d&&y6.call(t,"__wrapped__");if(h||p){var m=h?e.value():e,v=p?t.value():t;return s||(s=new Zr),r(m,v,n,o,s)}}return f?(s||(s=new Zr),WG(e,t,n,o,r,s)):!1}function x0(e,t,n,o,r){return e===t?!0:e==null||t==null||!Ls(e)&&!Ls(t)?e!==e&&t!==t:GG(e,t,n,o,x0,r)}var YG=1,JG=2;function ZG(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],c=e[a],u=l[1];if(i&&l[2]){if(c===void 0&&!(a in e))return!1}else{var d=new Zr;if(o)var f=o(c,u,a,e,t,d);if(!(f===void 0?x0(u,c,YG|JG,o,d):f))return!1}}return!0}function nT(e){return e===e&&!wo(e)}function XG(e){for(var t=op(e),n=t.length;n--;){var o=t[n],r=e[o];t[n]=[o,r,nT(r)]}return t}function oT(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function QG(e){var t=XG(e);return t.length==1&&t[0][2]?oT(t[0][0],t[0][1]):function(n){return n===e||ZG(n,e,t)}}function eY(e,t){return e!=null&&t in Object(e)}function tY(e,t,n){t=E0(t,e);for(var o=-1,r=t.length,s=!1;++o<r;){var i=sp(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&&jw(r)&&C0(i,r)&&(bo(e)||Ch(e)))}function rT(e,t){return e!=null&&tY(e,t,eY)}var nY=1,oY=2;function rY(e,t){return qw(e)&&nT(t)?oT(sp(e),t):function(n){var o=wr(n,e);return o===void 0&&o===t?rT(n,e):x0(t,o,nY|oY)}}function sY(e){return function(t){return t==null?void 0:t[e]}}function iY(e){return function(t){return Gw(t,e)}}function lY(e){return qw(e)?sY(sp(e)):iY(e)}function sT(e){return typeof e=="function"?e:e==null?Dw:typeof e=="object"?bo(e)?rY(e[0],e[1]):QG(e):lY(e)}function aY(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 cY=aY();const iT=cY;function uY(e,t){return e&&iT(e,t,op)}function dY(e,t){return function(n,o){if(n==null)return n;if(!ad(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 fY=dY(uY);const hY=fY;var pY=function(){return cs.Date.now()};const Y_=pY;var mY="Expected a function",gY=Math.max,_Y=Math.min;function Xa(e,t,n){var o,r,s,i,l,a,c=0,u=!1,d=!1,f=!0;if(typeof e!="function")throw new TypeError(mY);t=Dy(t)||0,wo(n)&&(u=!!n.leading,d="maxWait"in n,s=d?gY(Dy(n.maxWait)||0,t):s,f="trailing"in n?!!n.trailing:f);function h($){var A=o,N=r;return o=r=void 0,c=$,i=e.apply(N,A),i}function p($){return c=$,l=setTimeout(y,t),u?h($):i}function m($){var A=$-a,N=$-c,P=t-A;return d?_Y(P,s-N):P}function v($){var A=$-a,N=$-c;return a===void 0||A>=t||A<0||d&&N>=s}function y(){var $=Y_();if(v($))return E($);l=setTimeout(y,m($))}function E($){return l=void 0,f&&o?h($):(o=r=void 0,i)}function w(){l!==void 0&&clearTimeout(l),c=0,o=a=r=l=void 0}function C(){return l===void 0?i:E(Y_())}function T(){var $=Y_(),A=v($);if(o=arguments,r=this,a=$,A){if(l===void 0)return p(a);if(d)return clearTimeout(l),l=setTimeout(y,t),h(a)}return l===void 0&&(l=setTimeout(y,t)),i}return T.cancel=w,T.flush=C,T}function Uy(e,t,n){(n!==void 0&&!tp(e[t],n)||n===void 0&&!(t in e))&&Vw(e,t,n)}function vY(e){return Ls(e)&&ad(e)}function Wy(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function yY(e){return np(e,rp(e))}function bY(e,t,n,o,r,s,i){var l=Wy(e,n),a=Wy(t,n),c=i.get(a);if(c){Uy(e,n,c);return}var u=s?s(l,a,n+"",e,t,i):void 0,d=u===void 0;if(d){var f=bo(a),h=!f&&Sh(a),p=!f&&!h&&Ww(a);u=a,f||h||p?bo(l)?u=l:vY(l)?u=Rx(l):h?(d=!1,u=qx(a,!0)):p?(d=!1,u=Jx(a,!0)):u=[]:Pq(a)||Ch(a)?(u=l,Ch(l)?u=yY(l):(!wo(l)||Bw(l))&&(u=Zx(a))):d=!1}d&&(i.set(a,u),r(u,a,o,s,i),i.delete(a)),Uy(e,n,u)}function lT(e,t,n,o,r){e!==t&&iT(t,function(s,i){if(r||(r=new Zr),wo(s))bY(e,t,i,n,lT,o,r);else{var l=o?o(Wy(e,i),s,i+"",e,t,r):void 0;l===void 0&&(l=s),Uy(e,i,l)}},rp)}var wY=Math.max,kY=Math.min;function CY(e,t,n){var o=e==null?0:e.length;if(!o)return-1;var r=o-1;return n!==void 0&&(r=iU(n),r=n<0?wY(o+r,0):kY(r,o-1)),DU(e,sT(t),r,!0)}function SY(e,t){var n=-1,o=ad(e)?Array(e.length):[];return hY(e,function(r,s,i){o[++n]=t(r,s,i)}),o}function $Y(e,t){var n=bo(e)?Px:SY;return n(e,sT(t))}function EY(e,t){return Jw($Y(e,t),1)}function Cg(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 Qa(e,t){return x0(e,t)}function As(e){return e==null}function aT(e){return e===void 0}var xY=qU(function(e,t,n){lT(e,t,n)});const TY=xY;function cT(e,t,n,o){if(!wo(e))return e;t=E0(t,e);for(var r=-1,s=t.length,i=s-1,l=e;l!=null&&++r<s;){var a=sp(t[r]),c=n;if(a==="__proto__"||a==="constructor"||a==="prototype")return e;if(r!=i){var u=l[a];c=o?o(u,a,l):void 0,c===void 0&&(c=wo(u)?u:C0(t[r+1])?[]:{})}zw(l,a,c),l=l[a]}return e}function MY(e,t,n){for(var o=-1,r=t.length,s={};++o<r;){var i=t[o],l=Gw(e,i);n(l,i)&&cT(s,E0(i,e),l)}return s}function AY(e,t){return MY(e,t,function(n,o){return rT(e,o)})}var OY=xq(function(e,t){return e==null?{}:AY(e,t)});const IY=OY;function NY(e,t,n){return e==null?e:cT(e,t,n)}var PY="Expected a function";function J_(e,t,n){var o=!0,r=!0;if(typeof e!="function")throw new TypeError(PY);return wo(n)&&(o="leading"in n?!!n.leading:o,r="trailing"in n?!!n.trailing:r),Xa(e,t,{leading:o,maxWait:t,trailing:r})}const bi=e=>e===void 0,ao=e=>typeof e=="boolean",Et=e=>typeof e=="number",is=e=>typeof Element>"u"?!1:e instanceof Element,Th=e=>As(e),LY=e=>je(e)?!Number.isNaN(Number(e)):!1,RY=e=>kt?window.requestAnimationFrame(e):setTimeout(e,16),FY=(e="")=>e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d"),hl=e=>Rl(e),qy=e=>Object.keys(e),DY=e=>Object.entries(e),Um=(e,t,n)=>({get value(){return wr(e,t,n)},set value(o){NY(e,t,o)}});class BY extends Error{constructor(t){super(t),this.name="ElementPlusError"}}function us(e,t){throw new BY(`[${e}] ${t}`)}const uT=(e="")=>e.split(" ").filter(t=>!!t.trim()),pu=(e,t)=>{if(!e||!t)return!1;if(t.includes(" "))throw new Error("className should not contain space.");return e.classList.contains(t)},ec=(e,t)=>{!e||!t.trim()||e.classList.add(...uT(t))},Rs=(e,t)=>{!e||!t.trim()||e.classList.remove(...uT(t))},ga=(e,t)=>{var n;if(!kt||!e||!t)return"";let o=dn(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 fo(e,t="px"){if(!e)return"";if(Et(e)||LY(e))return`${e}${t}`;if(je(e))return e}const VY=(e,t)=>{if(!kt)return!1;const n={undefined:"overflow",true:"overflow-y",false:"overflow-x"}[String(t)],o=ga(e,n);return["scroll","auto","overlay"].some(r=>o.includes(r))},zY=(e,t)=>{if(!kt)return;let n=e;for(;n;){if([window,document,document.documentElement].includes(n))return window;if(VY(n,t))return n;n=n.parentNode}return n};let sm;const jY=e=>{var t;if(!kt)return 0;if(sm!==void 0)return sm;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),sm=o-s,sm};function HY(e,t){if(!kt)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,c)=>a+c.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 UY=K({name:"ArrowDown",__name:"arrow-down",setup(e){return(t,n)=>(g(),k("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"})]))}}),ip=UY,WY=K({name:"ArrowLeftBold",__name:"arrow-left-bold",setup(e){return(t,n)=>(g(),k("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M685.248 104.704a64 64 0 0 1 0 90.496L368.448 512l316.8 316.8a64 64 0 0 1-90.496 90.496L232.704 557.248a64 64 0 0 1 0-90.496l362.048-362.048a64 64 0 0 1 90.496 0z"})]))}}),qY=WY,KY=K({name:"ArrowLeft",__name:"arrow-left",setup(e){return(t,n)=>(g(),k("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"})]))}}),T0=KY,GY=K({name:"ArrowRight",__name:"arrow-right",setup(e){return(t,n)=>(g(),k("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"})]))}}),cd=GY,YY=K({name:"ArrowUp",__name:"arrow-up",setup(e){return(t,n)=>(g(),k("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"})]))}}),dT=YY,JY=K({name:"Avatar",__name:"avatar",setup(e){return(t,n)=>(g(),k("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"})]))}}),ZY=JY,XY=K({name:"Back",__name:"back",setup(e){return(t,n)=>(g(),k("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"})]))}}),QY=XY,eJ=K({name:"Baseball",__name:"baseball",setup(e){return(t,n)=>(g(),k("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M195.2 828.8a448 448 0 1 1 633.6-633.6 448 448 0 0 1-633.6 633.6zm45.248-45.248a384 384 0 1 0 543.104-543.104 384 384 0 0 0-543.104 543.104"}),_("path",{fill:"currentColor",d:"M497.472 96.896c22.784 4.672 44.416 9.472 64.896 14.528a256.128 256.128 0 0 0 350.208 350.208c5.056 20.48 9.856 42.112 14.528 64.896A320.128 320.128 0 0 1 497.472 96.896zM108.48 491.904a320.128 320.128 0 0 1 423.616 423.68c-23.04-3.648-44.992-7.424-65.728-11.52a256.128 256.128 0 0 0-346.496-346.432 1736.64 1736.64 0 0 1-11.392-65.728z"})]))}}),tJ=eJ,nJ=K({name:"Bell",__name:"bell",setup(e){return(t,n)=>(g(),k("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"})]))}}),oJ=nJ,rJ=K({name:"Bottom",__name:"bottom",setup(e){return(t,n)=>(g(),k("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"})]))}}),sJ=rJ,iJ=K({name:"Calendar",__name:"calendar",setup(e){return(t,n)=>(g(),k("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"})]))}}),lJ=iJ,aJ=K({name:"CameraFilled",__name:"camera-filled",setup(e){return(t,n)=>(g(),k("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"})]))}}),cJ=aJ,uJ=K({name:"ChatDotRound",__name:"chat-dot-round",setup(e){return(t,n)=>(g(),k("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"})]))}}),dJ=uJ,fJ=K({name:"ChatDotSquare",__name:"chat-dot-square",setup(e){return(t,n)=>(g(),k("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"})]))}}),hJ=fJ,pJ=K({name:"Check",__name:"check",setup(e){return(t,n)=>(g(),k("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"})]))}}),e3=pJ,mJ=K({name:"CircleCheck",__name:"circle-check",setup(e){return(t,n)=>(g(),k("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"})]))}}),t3=mJ,gJ=K({name:"CircleCloseFilled",__name:"circle-close-filled",setup(e){return(t,n)=>(g(),k("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"})]))}}),fT=gJ,_J=K({name:"CircleClose",__name:"circle-close",setup(e){return(t,n)=>(g(),k("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"})]))}}),M0=_J,vJ=K({name:"CloseBold",__name:"close-bold",setup(e){return(t,n)=>(g(),k("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"})]))}}),yJ=vJ,bJ=K({name:"Close",__name:"close",setup(e){return(t,n)=>(g(),k("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"})]))}}),Fs=bJ,wJ=K({name:"Comment",__name:"comment",setup(e){return(t,n)=>(g(),k("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"})]))}}),kJ=wJ,CJ=K({name:"DArrowLeft",__name:"d-arrow-left",setup(e){return(t,n)=>(g(),k("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"})]))}}),SJ=CJ,$J=K({name:"DArrowRight",__name:"d-arrow-right",setup(e){return(t,n)=>(g(),k("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"})]))}}),EJ=$J,xJ=K({name:"DeleteFilled",__name:"delete-filled",setup(e){return(t,n)=>(g(),k("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"})]))}}),TJ=xJ,MJ=K({name:"Delete",__name:"delete",setup(e){return(t,n)=>(g(),k("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"})]))}}),hT=MJ,AJ=K({name:"Document",__name:"document",setup(e){return(t,n)=>(g(),k("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"})]))}}),OJ=AJ,IJ=K({name:"EditPen",__name:"edit-pen",setup(e){return(t,n)=>(g(),k("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"})]))}}),NJ=IJ,PJ=K({name:"Expand",__name:"expand",setup(e){return(t,n)=>(g(),k("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"})]))}}),LJ=PJ,RJ=K({name:"FullScreen",__name:"full-screen",setup(e){return(t,n)=>(g(),k("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"})]))}}),pT=RJ,FJ=K({name:"Guide",__name:"guide",setup(e){return(t,n)=>(g(),k("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"})]))}}),DJ=FJ,BJ=K({name:"Hide",__name:"hide",setup(e){return(t,n)=>(g(),k("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"})]))}}),mT=BJ,VJ=K({name:"HomeFilled",__name:"home-filled",setup(e){return(t,n)=>(g(),k("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"})]))}}),zJ=VJ,jJ=K({name:"InfoFilled",__name:"info-filled",setup(e){return(t,n)=>(g(),k("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"})]))}}),lp=jJ,HJ=K({name:"Iphone",__name:"iphone",setup(e){return(t,n)=>(g(),k("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"})]))}}),UJ=HJ,WJ=K({name:"Loading",__name:"loading",setup(e){return(t,n)=>(g(),k("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"})]))}}),A0=WJ,qJ=K({name:"Lock",__name:"lock",setup(e){return(t,n)=>(g(),k("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"})]))}}),KJ=qJ,GJ=K({name:"Memo",__name:"memo",setup(e){return(t,n)=>(g(),k("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"})]))}}),YJ=GJ,JJ=K({name:"Message",__name:"message",setup(e){return(t,n)=>(g(),k("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"})]))}}),ZJ=JJ,XJ=K({name:"MoreFilled",__name:"more-filled",setup(e){return(t,n)=>(g(),k("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"})]))}}),Ky=XJ,QJ=K({name:"More",__name:"more",setup(e){return(t,n)=>(g(),k("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"})]))}}),eZ=QJ,tZ=K({name:"Notebook",__name:"notebook",setup(e){return(t,n)=>(g(),k("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"})]))}}),nZ=tZ,oZ=K({name:"Notification",__name:"notification",setup(e){return(t,n)=>(g(),k("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M512 128v64H256a64 64 0 0 0-64 64v512a64 64 0 0 0 64 64h512a64 64 0 0 0 64-64V512h64v256a128 128 0 0 1-128 128H256a128 128 0 0 1-128-128V256a128 128 0 0 1 128-128z"}),_("path",{fill:"currentColor",d:"M768 384a128 128 0 1 0 0-256 128 128 0 0 0 0 256m0 64a192 192 0 1 1 0-384 192 192 0 0 1 0 384"})]))}}),rZ=oZ,sZ=K({name:"Operation",__name:"operation",setup(e){return(t,n)=>(g(),k("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"})]))}}),iZ=sZ,lZ=K({name:"PictureFilled",__name:"picture-filled",setup(e){return(t,n)=>(g(),k("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"})]))}}),aZ=lZ,cZ=K({name:"Picture",__name:"picture",setup(e){return(t,n)=>(g(),k("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=cZ,dZ=K({name:"Plus",__name:"plus",setup(e){return(t,n)=>(g(),k("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"})]))}}),gT=dZ,fZ=K({name:"Postcard",__name:"postcard",setup(e){return(t,n)=>(g(),k("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"})]))}}),hZ=fZ,pZ=K({name:"Reading",__name:"reading",setup(e){return(t,n)=>(g(),k("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"})]))}}),mZ=pZ,gZ=K({name:"RefreshLeft",__name:"refresh-left",setup(e){return(t,n)=>(g(),k("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"})]))}}),_T=gZ,_Z=K({name:"RefreshRight",__name:"refresh-right",setup(e){return(t,n)=>(g(),k("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"})]))}}),vZ=_Z,yZ=K({name:"ScaleToOriginal",__name:"scale-to-original",setup(e){return(t,n)=>(g(),k("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"})]))}}),bZ=yZ,wZ=K({name:"Search",__name:"search",setup(e){return(t,n)=>(g(),k("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"})]))}}),ju=wZ,kZ=K({name:"SuccessFilled",__name:"success-filled",setup(e){return(t,n)=>(g(),k("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"})]))}}),n3=kZ,CZ=K({name:"Tickets",__name:"tickets",setup(e){return(t,n)=>(g(),k("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"})]))}}),SZ=CZ,$Z=K({name:"Timer",__name:"timer",setup(e){return(t,n)=>(g(),k("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"})]))}}),vT=$Z,EZ=K({name:"Top",__name:"top",setup(e){return(t,n)=>(g(),k("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"})]))}}),xZ=EZ,TZ=K({name:"UploadFilled",__name:"upload-filled",setup(e){return(t,n)=>(g(),k("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"})]))}}),MZ=TZ,AZ=K({name:"User",__name:"user",setup(e){return(t,n)=>(g(),k("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M512 512a192 192 0 1 0 0-384 192 192 0 0 0 0 384m0 64a256 256 0 1 1 0-512 256 256 0 0 1 0 512m320 320v-96a96 96 0 0 0-96-96H288a96 96 0 0 0-96 96v96a32 32 0 1 1-64 0v-96a160 160 0 0 1 160-160h448a160 160 0 0 1 160 160v96a32 32 0 1 1-64 0"})]))}}),OZ=AZ,IZ=K({name:"VideoPlay",__name:"video-play",setup(e){return(t,n)=>(g(),k("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 832a384 384 0 0 0 0-768 384 384 0 0 0 0 768m-48-247.616L668.608 512 464 375.616zm10.624-342.656 249.472 166.336a48 48 0 0 1 0 79.872L474.624 718.272A48 48 0 0 1 400 678.336V345.6a48 48 0 0 1 74.624-39.936z"})]))}}),NZ=IZ,PZ=K({name:"View",__name:"view",setup(e){return(t,n)=>(g(),k("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"})]))}}),yT=PZ,LZ=K({name:"WarningFilled",__name:"warning-filled",setup(e){return(t,n)=>(g(),k("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"})]))}}),o3=LZ,RZ=K({name:"ZoomIn",__name:"zoom-in",setup(e){return(t,n)=>(g(),k("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"})]))}}),bT=RZ,FZ=K({name:"ZoomOut",__name:"zoom-out",setup(e){return(t,n)=>(g(),k("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"})]))}}),DZ=FZ;const wT="__epPropKey",we=e=>e,BZ=e=>it(e)&&!!e[wT],O0=(e,t)=>{if(!it(e)||BZ(e))return e;const{values:n,required:o,default:r,type:s,validator:i}=e,a={type:s,required:!!o,validator:n||i?c=>{let u=!1,d=[];if(n&&(d=Array.from(n),ut(e,"default")&&d.push(r),u||(u=d.includes(c))),i&&(u||(u=i(c))),!u&&d.length>0){const f=[...new Set(d)].map(h=>JSON.stringify(h)).join(", ");dE(`Invalid prop: validation failed${t?` for prop "${t}"`:""}. Expected one of [${f}], got value ${JSON.stringify(c)}.`)}return u}:void 0,[wT]:!0};return ut(e,"default")&&(a.default=r),a},qe=e=>Cg(Object.entries(e).map(([t,n])=>[t,O0(n,t)])),Pn=we([String,Object,Function]),kT={Close:Fs},VZ={Close:Fs,SuccessFilled:n3,InfoFilled:lp,WarningFilled:o3,CircleCloseFilled:fT},Sg={success:n3,warning:o3,error:fT,info:lp},CT={validating:A0,success:t3,error:M0},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},zZ=(e,t)=>(e.install=n=>{e._context=n._context,n.config.globalProperties[t]=e},e),jZ=(e,t)=>(e.install=n=>{n.directive(t,e)},e),Hn=e=>(e.install=dt,e),r3=(...e)=>t=>{e.forEach(n=>{Ue(n)?n(t):n.value=t})},pt={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"},Wt="update:modelValue",tc="change",Gy="input",gc=["","default","small","large"],ST=e=>["",...gc].includes(e);var Wm=(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))(Wm||{});const qm=e=>{const t=Ee(e)?e:[e],n=[];return t.forEach(o=>{var r;Ee(o)?n.push(...qm(o)):uo(o)&&Ee(o.children)?n.push(...qm(o.children)):(n.push(o),uo(o)&&((r=o.component)!=null&&r.subTree)&&n.push(...qm(o.component.subTree)))}),n},$T=e=>/([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e),vo=e=>e,HZ=["class","style"],UZ=/^on[A-Z]/,ET=(e={})=>{const{excludeListeners:t=!1,excludeKeys:n}=e,o=B(()=>((n==null?void 0:n.value)||[]).concat(HZ)),r=nt();return B(r?()=>{var s;return Cg(Object.entries((s=r.proxy)==null?void 0:s.$attrs).filter(([i])=>!o.value.includes(i)&&!(t&&UZ.test(i))))}:()=>({}))},Ra=({from:e,replacement:t,scope:n,version:o,ref:r,type:s="API"},i)=>{ke(()=>S(i),l=>{},{immediate:!0})},xT=(e,t,n,o)=>{let r={offsetX:0,offsetY:0};const s=a=>{const c=a.clientX,u=a.clientY,{offsetX:d,offsetY:f}=r,h=e.value.getBoundingClientRect(),p=h.left,m=h.top,v=h.width,y=h.height,E=document.documentElement.clientWidth,w=document.documentElement.clientHeight,C=-p+d,T=-m+f,$=E-p-v+d,A=w-m-y+f,N=I=>{let D=d+I.clientX-c,V=f+I.clientY-u;o!=null&&o.value||(D=Math.min(Math.max(D,C),$),V=Math.min(Math.max(V,T),A)),r={offsetX:D,offsetY:V},e.value&&(e.value.style.transform=`translate(${fo(D)}, ${fo(V)})`)},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)};mt(()=>{Yr(()=>{n.value?i():l()})}),bn(()=>{l()})};var WZ={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 qZ=e=>(t,n)=>KZ(t,n,S(e)),KZ=(e,t,n)=>wr(n,e,e).replace(/\{(\w+)\}/g,(o,r)=>{var s;return`${(s=t==null?void 0:t[r])!=null?s:`{${r}}`}`}),GZ=e=>{const t=B(()=>S(e).name),n=Yt(e)?e:H(e);return{lang:t,locale:n,t:qZ(e)}},TT=Symbol("localeContextKey"),Fn=e=>{const t=e||Pe(TT,H());return GZ(B(()=>t.value||WZ))},Df="el",YZ="is-",ea=(e,t,n,o,r)=>{let s=`${e}-${t}`;return n&&(s+=`-${n}`),o&&(s+=`__${o}`),r&&(s+=`--${r}`),s},MT=Symbol("namespaceContextKey"),s3=e=>{const t=e||(nt()?Pe(MT,H(Df)):H(Df));return B(()=>S(t)||Df)},Ae=(e,t)=>{const n=s3(t);return{namespace:n,b:(m="")=>ea(n.value,e,m,"",""),e:m=>m?ea(n.value,e,"",m,""):"",m:m=>m?ea(n.value,e,"","",m):"",be:(m,v)=>m&&v?ea(n.value,e,m,v,""):"",em:(m,v)=>m&&v?ea(n.value,e,"",m,v):"",bm:(m,v)=>m&&v?ea(n.value,e,m,"",v):"",bem:(m,v,y)=>m&&v&&y?ea(n.value,e,m,v,y):"",is:(m,...v)=>{const y=v.length>=1?v[0]:!0;return m&&y?`${YZ}${m}`:""},cssVar:m=>{const v={};for(const y in m)m[y]&&(v[`--${n.value}-${y}`]=m[y]);return v},cssVarName:m=>`--${n.value}-${m}`,cssVarBlock:m=>{const v={};for(const y in m)m[y]&&(v[`--${n.value}-${e}-${y}`]=m[y]);return v},cssVarBlockName:m=>`--${n.value}-${e}-${m}`}},AT=(e,t={})=>{Yt(e)||us("[useLockscreen]","You need to pass a ref param to this function");const n=t.ns||Ae("popup"),o=c7(()=>n.bm("parent","hidden"));if(!kt||pu(document.body,o.value))return;let r=0,s=!1,i="0";const l=()=>{setTimeout(()=>{Rs(document==null?void 0:document.body,o.value),s&&document&&(document.body.style.width=i)},200)};ke(e,a=>{if(!a){l();return}s=!pu(document.body,o.value),s&&(i=document.body.style.width),r=jY(n.namespace.value);const c=document.documentElement.clientHeight<document.body.scrollHeight,u=ga(document.body,"overflowY");r>0&&(c||u==="scroll")&&s&&(document.body.style.width=`calc(100% - ${r}px)`),ec(document.body,o.value)}),qb(()=>l())},JZ=O0({type:we(Boolean),default:null}),ZZ=O0({type:we(Function)}),OT=e=>{const t=`update:${e}`,n=`onUpdate:${e}`,o=[t],r={[e]:JZ,[n]:ZZ};return{useModelToggle:({indicator:i,toggleReason:l,shouldHideWhenRouteChanges:a,shouldProceed:c,onShow:u,onHide:d})=>{const f=nt(),{emit:h}=f,p=f.props,m=B(()=>Ue(p[n])),v=B(()=>p[e]===null),y=A=>{i.value!==!0&&(i.value=!0,l&&(l.value=A),Ue(u)&&u(A))},E=A=>{i.value!==!1&&(i.value=!1,l&&(l.value=A),Ue(d)&&d(A))},w=A=>{if(p.disabled===!0||Ue(c)&&!c())return;const N=m.value&&kt;N&&h(t,!0),(v.value||!N)&&y(A)},C=A=>{if(p.disabled===!0||!kt)return;const N=m.value&&kt;N&&h(t,!1),(v.value||!N)&&E(A)},T=A=>{ao(A)&&(p.disabled&&A?m.value&&h(t,!1):i.value!==A&&(A?y():E()))},$=()=>{i.value?C():w()};return ke(()=>p[e],T),a&&f.appContext.config.globalProperties.$route!==void 0&&ke(()=>({...f.proxy.$route}),()=>{a.value&&i.value&&C()}),mt(()=>{T(p[e])}),{hide:C,show:w,toggle:$,hasUpdateHandler:m}},useModelToggleProps:r,useModelToggleEmits:o}};OT("modelValue");const IT=e=>{const t=nt();return B(()=>{var n,o;return(o=(n=t==null?void 0:t.proxy)==null?void 0:n.$props)==null?void 0:o[e]})};var Ro="top",Nr="bottom",Pr="right",Fo="left",i3="auto",ap=[Ro,Nr,Pr,Fo],Hu="start",Mh="end",XZ="clippingParents",NT="viewport",Vd="popper",QZ="reference",b6=ap.reduce(function(e,t){return e.concat([t+"-"+Hu,t+"-"+Mh])},[]),I0=[].concat(ap,[i3]).reduce(function(e,t){return e.concat([t,t+"-"+Hu,t+"-"+Mh])},[]),eX="beforeRead",tX="read",nX="afterRead",oX="beforeMain",rX="main",sX="afterMain",iX="beforeWrite",lX="write",aX="afterWrite",cX=[eX,tX,nX,oX,rX,sX,iX,lX,aX];function Ds(e){return e?(e.nodeName||"").toLowerCase():null}function ds(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Uu(e){var t=ds(e).Element;return e instanceof t||e instanceof Element}function Tr(e){var t=ds(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function l3(e){if(typeof ShadowRoot>"u")return!1;var t=ds(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function uX(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];!Tr(s)||!Ds(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 dX(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,c){return a[c]="",a},{});!Tr(r)||!Ds(r)||(Object.assign(r.style,l),Object.keys(s).forEach(function(a){r.removeAttribute(a)}))})}}var PT={name:"applyStyles",enabled:!0,phase:"write",fn:uX,effect:dX,requires:["computeStyles"]};function Os(e){return e.split("-")[0]}var Fa=Math.max,$g=Math.min,Wu=Math.round;function qu(e,t){t===void 0&&(t=!1);var n=e.getBoundingClientRect(),o=1,r=1;if(Tr(e)&&t){var s=e.offsetHeight,i=e.offsetWidth;i>0&&(o=Wu(n.width)/i||1),s>0&&(r=Wu(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 a3(e){var t=qu(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 LT(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&l3(n)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function wi(e){return ds(e).getComputedStyle(e)}function fX(e){return["table","td","th"].indexOf(Ds(e))>=0}function Vl(e){return((Uu(e)?e.ownerDocument:e.document)||window.document).documentElement}function N0(e){return Ds(e)==="html"?e:e.assignedSlot||e.parentNode||(l3(e)?e.host:null)||Vl(e)}function w6(e){return!Tr(e)||wi(e).position==="fixed"?null:e.offsetParent}function hX(e){var t=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,n=navigator.userAgent.indexOf("Trident")!==-1;if(n&&Tr(e)){var o=wi(e);if(o.position==="fixed")return null}var r=N0(e);for(l3(r)&&(r=r.host);Tr(r)&&["html","body"].indexOf(Ds(r))<0;){var s=wi(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 cp(e){for(var t=ds(e),n=w6(e);n&&fX(n)&&wi(n).position==="static";)n=w6(n);return n&&(Ds(n)==="html"||Ds(n)==="body"&&wi(n).position==="static")?t:n||hX(e)||t}function c3(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Bf(e,t,n){return Fa(e,$g(t,n))}function pX(e,t,n){var o=Bf(e,t,n);return o>n?n:o}function RT(){return{top:0,right:0,bottom:0,left:0}}function FT(e){return Object.assign({},RT(),e)}function DT(e,t){return t.reduce(function(n,o){return n[o]=e,n},{})}var mX=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,FT(typeof e!="number"?e:DT(e,ap))};function gX(e){var t,n=e.state,o=e.name,r=e.options,s=n.elements.arrow,i=n.modifiersData.popperOffsets,l=Os(n.placement),a=c3(l),c=[Fo,Pr].indexOf(l)>=0,u=c?"height":"width";if(!(!s||!i)){var d=mX(r.padding,n),f=a3(s),h=a==="y"?Ro:Fo,p=a==="y"?Nr:Pr,m=n.rects.reference[u]+n.rects.reference[a]-i[a]-n.rects.popper[u],v=i[a]-n.rects.reference[a],y=cp(s),E=y?a==="y"?y.clientHeight||0:y.clientWidth||0:0,w=m/2-v/2,C=d[h],T=E-f[u]-d[p],$=E/2-f[u]/2+w,A=Bf(C,$,T),N=a;n.modifiersData[o]=(t={},t[N]=A,t.centerOffset=A-$,t)}}function _X(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)||!LT(t.elements.popper,r)||(t.elements.arrow=r))}var vX={name:"arrow",enabled:!0,phase:"main",fn:gX,effect:_X,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ku(e){return e.split("-")[1]}var yX={top:"auto",right:"auto",bottom:"auto",left:"auto"};function bX(e){var t=e.x,n=e.y,o=window,r=o.devicePixelRatio||1;return{x:Wu(t*r)/r||0,y:Wu(n*r)/r||0}}function k6(e){var t,n=e.popper,o=e.popperRect,r=e.placement,s=e.variation,i=e.offsets,l=e.position,a=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=i.x,h=f===void 0?0:f,p=i.y,m=p===void 0?0:p,v=typeof u=="function"?u({x:h,y:m}):{x:h,y:m};h=v.x,m=v.y;var y=i.hasOwnProperty("x"),E=i.hasOwnProperty("y"),w=Fo,C=Ro,T=window;if(c){var $=cp(n),A="clientHeight",N="clientWidth";if($===ds(n)&&($=Vl(n),wi($).position!=="static"&&l==="absolute"&&(A="scrollHeight",N="scrollWidth")),$=$,r===Ro||(r===Fo||r===Pr)&&s===Mh){C=Nr;var P=d&&$===T&&T.visualViewport?T.visualViewport.height:$[A];m-=P-o.height,m*=a?1:-1}if(r===Fo||(r===Ro||r===Nr)&&s===Mh){w=Pr;var I=d&&$===T&&T.visualViewport?T.visualViewport.width:$[N];h-=I-o.width,h*=a?1:-1}}var D=Object.assign({position:l},c&&yX),V=u===!0?bX({x:h,y:m}):{x:h,y:m};if(h=V.x,m=V.y,a){var G;return Object.assign({},D,(G={},G[C]=E?"0":"",G[w]=y?"0":"",G.transform=(T.devicePixelRatio||1)<=1?"translate("+h+"px, "+m+"px)":"translate3d("+h+"px, "+m+"px, 0)",G))}return Object.assign({},D,(t={},t[C]=E?m+"px":"",t[w]=y?h+"px":"",t.transform="",t))}function wX(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,c={placement:Os(t.placement),variation:Ku(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,k6(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:i,roundOffsets:a})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,k6(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:a})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var BT={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:wX,data:{}},im={passive:!0};function kX(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=ds(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return s&&c.forEach(function(u){u.addEventListener("scroll",n.update,im)}),l&&a.addEventListener("resize",n.update,im),function(){s&&c.forEach(function(u){u.removeEventListener("scroll",n.update,im)}),l&&a.removeEventListener("resize",n.update,im)}}var VT={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:kX,data:{}},CX={left:"right",right:"left",bottom:"top",top:"bottom"};function Km(e){return e.replace(/left|right|bottom|top/g,function(t){return CX[t]})}var SX={start:"end",end:"start"};function C6(e){return e.replace(/start|end/g,function(t){return SX[t]})}function u3(e){var t=ds(e),n=t.pageXOffset,o=t.pageYOffset;return{scrollLeft:n,scrollTop:o}}function d3(e){return qu(Vl(e)).left+u3(e).scrollLeft}function $X(e){var t=ds(e),n=Vl(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+d3(e),y:l}}function EX(e){var t,n=Vl(e),o=u3(e),r=(t=e.ownerDocument)==null?void 0:t.body,s=Fa(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),i=Fa(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),l=-o.scrollLeft+d3(e),a=-o.scrollTop;return wi(r||n).direction==="rtl"&&(l+=Fa(n.clientWidth,r?r.clientWidth:0)-s),{width:s,height:i,x:l,y:a}}function f3(e){var t=wi(e),n=t.overflow,o=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+o)}function zT(e){return["html","body","#document"].indexOf(Ds(e))>=0?e.ownerDocument.body:Tr(e)&&f3(e)?e:zT(N0(e))}function Vf(e,t){var n;t===void 0&&(t=[]);var o=zT(e),r=o===((n=e.ownerDocument)==null?void 0:n.body),s=ds(o),i=r?[s].concat(s.visualViewport||[],f3(o)?o:[]):o,l=t.concat(i);return r?l:l.concat(Vf(N0(i)))}function Yy(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function xX(e){var t=qu(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 S6(e,t){return t===NT?Yy($X(e)):Uu(t)?xX(t):Yy(EX(Vl(e)))}function TX(e){var t=Vf(N0(e)),n=["absolute","fixed"].indexOf(wi(e).position)>=0,o=n&&Tr(e)?cp(e):e;return Uu(o)?t.filter(function(r){return Uu(r)&<(r,o)&&Ds(r)!=="body"}):[]}function MX(e,t,n){var o=t==="clippingParents"?TX(e):[].concat(t),r=[].concat(o,[n]),s=r[0],i=r.reduce(function(l,a){var c=S6(e,a);return l.top=Fa(c.top,l.top),l.right=$g(c.right,l.right),l.bottom=$g(c.bottom,l.bottom),l.left=Fa(c.left,l.left),l},S6(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 jT(e){var t=e.reference,n=e.element,o=e.placement,r=o?Os(o):null,s=o?Ku(o):null,i=t.x+t.width/2-n.width/2,l=t.y+t.height/2-n.height/2,a;switch(r){case Ro:a={x:i,y:t.y-n.height};break;case Nr:a={x:i,y:t.y+t.height};break;case Pr:a={x:t.x+t.width,y:l};break;case Fo:a={x:t.x-n.width,y:l};break;default:a={x:t.x,y:t.y}}var c=r?c3(r):null;if(c!=null){var u=c==="y"?"height":"width";switch(s){case Hu:a[c]=a[c]-(t[u]/2-n[u]/2);break;case Mh:a[c]=a[c]+(t[u]/2-n[u]/2);break}}return a}function Ah(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?XZ:s,l=n.rootBoundary,a=l===void 0?NT:l,c=n.elementContext,u=c===void 0?Vd:c,d=n.altBoundary,f=d===void 0?!1:d,h=n.padding,p=h===void 0?0:h,m=FT(typeof p!="number"?p:DT(p,ap)),v=u===Vd?QZ:Vd,y=e.rects.popper,E=e.elements[f?v:u],w=MX(Uu(E)?E:E.contextElement||Vl(e.elements.popper),i,a),C=qu(e.elements.reference),T=jT({reference:C,element:y,strategy:"absolute",placement:r}),$=Yy(Object.assign({},y,T)),A=u===Vd?$:C,N={top:w.top-A.top+m.top,bottom:A.bottom-w.bottom+m.bottom,left:w.left-A.left+m.left,right:A.right-w.right+m.right},P=e.modifiersData.offset;if(u===Vd&&P){var I=P[r];Object.keys(N).forEach(function(D){var V=[Pr,Nr].indexOf(D)>=0?1:-1,G=[Ro,Nr].indexOf(D)>=0?"y":"x";N[D]+=I[G]*V})}return N}function AX(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,c=a===void 0?I0:a,u=Ku(o),d=u?l?b6:b6.filter(function(p){return Ku(p)===u}):ap,f=d.filter(function(p){return c.indexOf(p)>=0});f.length===0&&(f=d);var h=f.reduce(function(p,m){return p[m]=Ah(e,{placement:m,boundary:r,rootBoundary:s,padding:i})[Os(m)],p},{});return Object.keys(h).sort(function(p,m){return h[p]-h[m]})}function OX(e){if(Os(e)===i3)return[];var t=Km(e);return[C6(e),t,C6(t)]}function IX(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,c=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,h=n.flipVariations,p=h===void 0?!0:h,m=n.allowedAutoPlacements,v=t.options.placement,y=Os(v),E=y===v,w=a||(E||!p?[Km(v)]:OX(v)),C=[v].concat(w).reduce(function(xe,Ye){return xe.concat(Os(Ye)===i3?AX(t,{placement:Ye,boundary:u,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:m}):Ye)},[]),T=t.rects.reference,$=t.rects.popper,A=new Map,N=!0,P=C[0],I=0;I<C.length;I++){var D=C[I],V=Os(D),G=Ku(D)===Hu,te=[Ro,Nr].indexOf(V)>=0,oe=te?"width":"height",J=Ah(t,{placement:D,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),q=te?G?Pr:Fo:G?Nr:Ro;T[oe]>$[oe]&&(q=Km(q));var X=Km(q),ee=[];if(s&&ee.push(J[V]<=0),l&&ee.push(J[q]<=0,J[X]<=0),ee.every(function(xe){return xe})){P=D,N=!1;break}A.set(D,ee)}if(N)for(var R=p?3:1,ye=function(xe){var Ye=C.find(function(Fe){var Z=A.get(Fe);if(Z)return Z.slice(0,xe).every(function(ce){return ce})});if(Ye)return P=Ye,"break"},Ce=R;Ce>0;Ce--){var U=ye(Ce);if(U==="break")break}t.placement!==P&&(t.modifiersData[o]._skip=!0,t.placement=P,t.reset=!0)}}var NX={name:"flip",enabled:!0,phase:"main",fn:IX,requiresIfExists:["offset"],data:{_skip:!1}};function $6(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 E6(e){return[Ro,Pr,Nr,Fo].some(function(t){return e[t]>=0})}function PX(e){var t=e.state,n=e.name,o=t.rects.reference,r=t.rects.popper,s=t.modifiersData.preventOverflow,i=Ah(t,{elementContext:"reference"}),l=Ah(t,{altBoundary:!0}),a=$6(i,o),c=$6(l,r,s),u=E6(a),d=E6(c);t.modifiersData[n]={referenceClippingOffsets:a,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}var LX={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:PX};function RX(e,t,n){var o=Os(e),r=[Fo,Ro].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,[Fo,Pr].indexOf(o)>=0?{x:l,y:i}:{x:i,y:l}}function FX(e){var t=e.state,n=e.options,o=e.name,r=n.offset,s=r===void 0?[0,0]:r,i=I0.reduce(function(u,d){return u[d]=RX(d,t.rects,s),u},{}),l=i[t.placement],a=l.x,c=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=a,t.modifiersData.popperOffsets.y+=c),t.modifiersData[o]=i}var DX={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:FX};function BX(e){var t=e.state,n=e.name;t.modifiersData[n]=jT({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var HT={name:"popperOffsets",enabled:!0,phase:"read",fn:BX,data:{}};function VX(e){return e==="x"?"y":"x"}function zX(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,c=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,h=f===void 0?!0:f,p=n.tetherOffset,m=p===void 0?0:p,v=Ah(t,{boundary:a,rootBoundary:c,padding:d,altBoundary:u}),y=Os(t.placement),E=Ku(t.placement),w=!E,C=c3(y),T=VX(C),$=t.modifiersData.popperOffsets,A=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),D=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,V={x:0,y:0};if($){if(s){var G,te=C==="y"?Ro:Fo,oe=C==="y"?Nr:Pr,J=C==="y"?"height":"width",q=$[C],X=q+v[te],ee=q-v[oe],R=h?-N[J]/2:0,ye=E===Hu?A[J]:N[J],Ce=E===Hu?-N[J]:-A[J],U=t.elements.arrow,xe=h&&U?a3(U):{width:0,height:0},Ye=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:RT(),Fe=Ye[te],Z=Ye[oe],ce=Bf(0,A[J],xe[J]),pe=w?A[J]/2-R-ce-Fe-I.mainAxis:ye-ce-Fe-I.mainAxis,ie=w?-A[J]/2+R+ce+Z+I.mainAxis:Ce+ce+Z+I.mainAxis,Le=t.elements.arrow&&cp(t.elements.arrow),et=Le?C==="y"?Le.clientTop||0:Le.clientLeft||0:0,j=(G=D==null?void 0:D[C])!=null?G:0,W=q+pe-j-et,re=q+ie-j,he=Bf(h?$g(X,W):X,q,h?Fa(ee,re):ee);$[C]=he,V[C]=he-q}if(l){var de,Se=C==="x"?Ro:Fo,Oe=C==="x"?Nr:Pr,be=$[T],$e=T==="y"?"height":"width",ge=be+v[Se],De=be-v[Oe],Ke=[Ro,Fo].indexOf(y)!==-1,se=(de=D==null?void 0:D[T])!=null?de:0,Y=Ke?ge:be-A[$e]-N[$e]-se+I.altAxis,ae=Ke?be+A[$e]+N[$e]-se-I.altAxis:De,Ie=h&&Ke?pX(Y,be,ae):Bf(h?Y:ge,be,h?ae:De);$[T]=Ie,V[T]=Ie-be}t.modifiersData[o]=V}}var jX={name:"preventOverflow",enabled:!0,phase:"main",fn:zX,requiresIfExists:["offset"]};function HX(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function UX(e){return e===ds(e)||!Tr(e)?u3(e):HX(e)}function WX(e){var t=e.getBoundingClientRect(),n=Wu(t.width)/e.offsetWidth||1,o=Wu(t.height)/e.offsetHeight||1;return n!==1||o!==1}function qX(e,t,n){n===void 0&&(n=!1);var o=Tr(t),r=Tr(t)&&WX(t),s=Vl(t),i=qu(e,r),l={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(o||!o&&!n)&&((Ds(t)!=="body"||f3(s))&&(l=UX(t)),Tr(t)?(a=qu(t,!0),a.x+=t.clientLeft,a.y+=t.clientTop):s&&(a.x=d3(s))),{x:i.left+l.scrollLeft-a.x,y:i.top+l.scrollTop-a.y,width:i.width,height:i.height}}function KX(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 GX(e){var t=KX(e);return cX.reduce(function(n,o){return n.concat(t.filter(function(r){return r.phase===o}))},[])}function YX(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function JX(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 x6={placement:"bottom",modifiers:[],strategy:"absolute"};function T6(){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 h3(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,o=n===void 0?[]:n,r=t.defaultOptions,s=r===void 0?x6:r;return function(i,l,a){a===void 0&&(a=s);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},x6,s),modifiersData:{},elements:{reference:i,popper:l},attributes:{},styles:{}},u=[],d=!1,f={state:c,setOptions:function(m){var v=typeof m=="function"?m(c.options):m;p(),c.options=Object.assign({},s,c.options,v),c.scrollParents={reference:Uu(i)?Vf(i):i.contextElement?Vf(i.contextElement):[],popper:Vf(l)};var y=GX(JX([].concat(o,c.options.modifiers)));return c.orderedModifiers=y.filter(function(E){return E.enabled}),h(),f.update()},forceUpdate:function(){if(!d){var m=c.elements,v=m.reference,y=m.popper;if(T6(v,y)){c.rects={reference:qX(v,cp(y),c.options.strategy==="fixed"),popper:a3(y)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(N){return c.modifiersData[N.name]=Object.assign({},N.data)});for(var E=0;E<c.orderedModifiers.length;E++){if(c.reset===!0){c.reset=!1,E=-1;continue}var w=c.orderedModifiers[E],C=w.fn,T=w.options,$=T===void 0?{}:T,A=w.name;typeof C=="function"&&(c=C({state:c,options:$,name:A,instance:f})||c)}}}},update:YX(function(){return new Promise(function(m){f.forceUpdate(),m(c)})}),destroy:function(){p(),d=!0}};if(!T6(i,l))return f;f.setOptions(a).then(function(m){!d&&a.onFirstUpdate&&a.onFirstUpdate(m)});function h(){c.orderedModifiers.forEach(function(m){var v=m.name,y=m.options,E=y===void 0?{}:y,w=m.effect;if(typeof w=="function"){var C=w({state:c,name:v,instance:f,options:E}),T=function(){};u.push(C||T)}})}function p(){u.forEach(function(m){return m()}),u=[]}return f}}h3();var ZX=[VT,HT,BT,PT];h3({defaultModifiers:ZX});var XX=[VT,HT,BT,PT,DX,NX,jX,vX,LX],QX=h3({defaultModifiers:XX});const eQ=(e,t,n={})=>{const o={name:"updateState",enabled:!0,phase:"write",fn:({state:a})=>{const c=tQ(a);Object.assign(i.value,c)},requires:["computeStyles"]},r=B(()=>{const{onFirstUpdate:a,placement:c,strategy:u,modifiers:d}=S(n);return{onFirstUpdate:a,placement:c||"bottom",strategy:u||"absolute",modifiers:[...d||[],o,{name:"applyStyles",enabled:!1}]}}),s=Cn(),i=H({styles:{popper:{position:S(r).strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),l=()=>{s.value&&(s.value.destroy(),s.value=void 0)};return ke(r,a=>{const c=S(s);c&&c.setOptions(a)},{deep:!0}),ke([e,t],([a,c])=>{l(),!(!a||!c)&&(s.value=QX(a,c,S(r)))}),bn(()=>{l()}),{state:B(()=>{var a;return{...((a=S(s))==null?void 0:a.state)||{}}}),styles:B(()=>S(i).styles),attributes:B(()=>S(i).attributes),update:()=>{var a;return(a=S(s))==null?void 0:a.update()},forceUpdate:()=>{var a;return(a=S(s))==null?void 0:a.forceUpdate()},instanceRef:B(()=>S(s))}};function tQ(e){const t=Object.keys(e.elements),n=Cg(t.map(r=>[r,e.styles[r]||{}])),o=Cg(t.map(r=>[r,e.attributes[r]]));return{styles:n,attributes:o}}const p3=e=>{if(!e)return{onClick:dt,onMousedown:dt,onMouseup:dt};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}}},nQ=(e,t=0)=>{if(t===0)return e;const n=H(!1);let o=0;const r=()=>{o&&clearTimeout(o),o=window.setTimeout(()=>{n.value=e.value},t)};return mt(r),ke(()=>e.value,s=>{s?r():n.value=s}),n};function M6(){let e;const t=(o,r)=>{n(),e=window.setTimeout(o,r)},n=()=>window.clearTimeout(e);return Qh(()=>n()),{registerTimeout:t,cancelTimeout:n}}const A6={prefix:Math.floor(Math.random()*1e4),current:0},oQ=Symbol("elIdInjection"),UT=()=>nt()?Pe(oQ,A6):A6,Lr=e=>{const t=UT(),n=s3();return B(()=>S(e)||`${n.value}-id-${t.prefix}-${t.current++}`)};let Bc=[];const O6=e=>{const t=e;t.key===pt.esc&&Bc.forEach(n=>n(t))},rQ=e=>{mt(()=>{Bc.length===0&&document.addEventListener("keydown",O6),kt&&Bc.push(e)}),bn(()=>{Bc=Bc.filter(t=>t!==e),Bc.length===0&&kt&&document.removeEventListener("keydown",O6)})};let I6;const WT=()=>{const e=s3(),t=UT(),n=B(()=>`${e.value}-popper-container-${t.prefix}`),o=B(()=>`#${n.value}`);return{id:n,selector:o}},sQ=e=>{const t=document.createElement("div");return t.id=e,document.body.appendChild(t),t},iQ=()=>{const{id:e,selector:t}=WT();return ld(()=>{kt&&!I6&&!document.body.querySelector(t.value)&&(I6=sQ(e.value))}),{id:e,selector:t}},lQ=qe({showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0}}),aQ=({showAfter:e,hideAfter:t,autoClose:n,open:o,close:r})=>{const{registerTimeout:s}=M6(),{registerTimeout:i,cancelTimeout:l}=M6();return{onOpen:u=>{s(()=>{o(u);const d=S(n);Et(d)&&d>0&&i(()=>{r(u)},d)},S(e))},onClose:u=>{l(),s(()=>{r(u)},S(t))}}},qT=Symbol("elForwardRef"),cQ=e=>{bt(qT,{setForwardRef:n=>{e.value=n}})},uQ=e=>({mounted(t){e(t)},updated(t){e(t)},unmounted(){e(null)}}),N6={current:0},P6=H(0),KT=2e3,L6=Symbol("elZIndexContextKey"),GT=Symbol("zIndexContextKey"),P0=e=>{const t=nt()?Pe(L6,N6):N6,n=e||(nt()?Pe(GT,void 0):void 0),o=B(()=>{const i=S(n);return Et(i)?i:KT}),r=B(()=>o.value+P6.value),s=()=>(t.current++,P6.value=t.current,r.value);return!kt&&Pe(L6),{initialZIndex:o,currentZIndex:r,nextZIndex:s}},R6=Math.min,zf=Math.max,Eg=Math.round,Il=e=>({x:e,y:e}),dQ={left:"right",right:"left",bottom:"top",top:"bottom"},fQ={start:"end",end:"start"};function m3(e,t){return typeof e=="function"?e(t):e}function Gu(e){return e.split("-")[0]}function L0(e){return e.split("-")[1]}function hQ(e){return e==="x"?"y":"x"}function YT(e){return e==="y"?"height":"width"}function g3(e){return["top","bottom"].includes(Gu(e))?"y":"x"}function JT(e){return hQ(g3(e))}function pQ(e,t,n){n===void 0&&(n=!1);const o=L0(e),r=JT(e),s=YT(r);let i=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=xg(i)),[i,xg(i)]}function mQ(e){const t=xg(e);return[Jy(e),t,Jy(t)]}function Jy(e){return e.replace(/start|end/g,t=>fQ[t])}function gQ(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 _Q(e,t,n,o){const r=L0(e);let s=gQ(Gu(e),n==="start",o);return r&&(s=s.map(i=>i+"-"+r),t&&(s=s.concat(s.map(Jy)))),s}function xg(e){return e.replace(/left|right|bottom|top/g,t=>dQ[t])}function vQ(e){return{top:0,right:0,bottom:0,left:0,...e}}function yQ(e){return typeof e!="number"?vQ(e):{top:e,right:e,bottom:e,left:e}}function Tg(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function F6(e,t,n){let{reference:o,floating:r}=e;const s=g3(t),i=JT(t),l=YT(i),a=Gu(t),c=s==="y",u=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 h;switch(a){case"top":h={x:u,y:o.y-r.height};break;case"bottom":h={x:u,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:d};break;case"left":h={x:o.x-r.width,y:d};break;default:h={x:o.x,y:o.y}}switch(L0(t)){case"start":h[i]-=f*(n&&c?-1:1);break;case"end":h[i]+=f*(n&&c?-1:1);break}return h}const bQ=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 c=await i.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:d}=F6(c,o,a),f=o,h={},p=0;for(let m=0;m<l.length;m++){const{name:v,fn:y}=l[m],{x:E,y:w,data:C,reset:T}=await y({x:u,y:d,initialPlacement:o,placement:f,strategy:r,middlewareData:h,rects:c,platform:i,elements:{reference:e,floating:t}});u=E??u,d=w??d,h={...h,[v]:{...h[v],...C}},T&&p<=50&&(p++,typeof T=="object"&&(T.placement&&(f=T.placement),T.rects&&(c=T.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:r}):T.rects),{x:u,y:d}=F6(c,f,a)),m=-1)}return{x:u,y:d,placement:f,strategy:r,middlewareData:h}};async function wQ(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:s,rects:i,elements:l,strategy:a}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=m3(t,e),p=yQ(h),v=l[f?d==="floating"?"reference":"floating":d],y=Tg(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(v)))==null||n?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:c,rootBoundary:u,strategy:a})),E=d==="floating"?{...i.floating,x:o,y:r}:i.reference,w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),C=await(s.isElement==null?void 0:s.isElement(w))?await(s.getScale==null?void 0:s.getScale(w))||{x:1,y:1}:{x:1,y:1},T=Tg(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:E,offsetParent:w,strategy:a}):E);return{top:(y.top-T.top+p.top)/C.y,bottom:(T.bottom-y.bottom+p.bottom)/C.y,left:(y.left-T.left+p.left)/C.x,right:(T.right-y.right+p.right)/C.x}}const kQ=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:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...v}=m3(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const y=Gu(r),E=Gu(l)===l,w=await(a.isRTL==null?void 0:a.isRTL(c.floating)),C=f||(E||!m?[xg(l)]:mQ(l));!f&&p!=="none"&&C.push(..._Q(l,m,p,w));const T=[l,...C],$=await wQ(t,v),A=[];let N=((o=s.flip)==null?void 0:o.overflows)||[];if(u&&A.push($[y]),d){const V=pQ(r,i,w);A.push($[V[0]],$[V[1]])}if(N=[...N,{placement:r,overflows:A}],!A.every(V=>V<=0)){var P,I;const V=(((P=s.flip)==null?void 0:P.index)||0)+1,G=T[V];if(G)return{data:{index:V,overflows:N},reset:{placement:G}};let te=(I=N.filter(oe=>oe.overflows[0]<=0).sort((oe,J)=>oe.overflows[1]-J.overflows[1])[0])==null?void 0:I.placement;if(!te)switch(h){case"bestFit":{var D;const oe=(D=N.map(J=>[J.placement,J.overflows.filter(q=>q>0).reduce((q,X)=>q+X,0)]).sort((J,q)=>J[1]-q[1])[0])==null?void 0:D[0];oe&&(te=oe);break}case"initialPlacement":te=l;break}if(r!==te)return{reset:{placement:te}}}return{}}}};async function CQ(e,t){const{placement:n,platform:o,elements:r}=e,s=await(o.isRTL==null?void 0:o.isRTL(r.floating)),i=Gu(n),l=L0(n),a=g3(n)==="y",c=["left","top"].includes(i)?-1:1,u=s&&a?-1:1,d=m3(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:p}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return l&&typeof p=="number"&&(h=l==="end"?p*-1:p),a?{x:h*u,y:f*c}:{x:f*c,y:h*u}}const Zy=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 CQ(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 Nl(e){return ZT(e)?(e.nodeName||"").toLowerCase():"#document"}function ir(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function zl(e){var t;return(t=(ZT(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ZT(e){return e instanceof Node||e instanceof ir(e).Node}function ki(e){return e instanceof Element||e instanceof ir(e).Element}function Bs(e){return e instanceof HTMLElement||e instanceof ir(e).HTMLElement}function D6(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ir(e).ShadowRoot}function up(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=Rr(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function SQ(e){return["table","td","th"].includes(Nl(e))}function _3(e){const t=v3(),n=Rr(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 $Q(e){let t=Yu(e);for(;Bs(t)&&!R0(t);){if(_3(t))return t;t=Yu(t)}return null}function v3(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function R0(e){return["html","body","#document"].includes(Nl(e))}function Rr(e){return ir(e).getComputedStyle(e)}function F0(e){return ki(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Yu(e){if(Nl(e)==="html")return e;const t=e.assignedSlot||e.parentNode||D6(e)&&e.host||zl(e);return D6(t)?t.host:t}function XT(e){const t=Yu(e);return R0(t)?e.ownerDocument?e.ownerDocument.body:e.body:Bs(t)&&up(t)?t:XT(t)}function Xy(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=XT(e),s=r===((o=e.ownerDocument)==null?void 0:o.body),i=ir(r);return s?t.concat(i,i.visualViewport||[],up(r)?r:[],i.frameElement&&n?Xy(i.frameElement):[]):t.concat(r,Xy(r,[],n))}function QT(e){const t=Rr(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=Bs(e),s=r?e.offsetWidth:n,i=r?e.offsetHeight:o,l=Eg(n)!==s||Eg(o)!==i;return l&&(n=s,o=i),{width:n,height:o,$:l}}function eM(e){return ki(e)?e:e.contextElement}function mu(e){const t=eM(e);if(!Bs(t))return Il(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:s}=QT(t);let i=(s?Eg(n.width):n.width)/o,l=(s?Eg(n.height):n.height)/r;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const EQ=Il(0);function tM(e){const t=ir(e);return!v3()||!t.visualViewport?EQ:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function xQ(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ir(e)?!1:t}function Oh(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=eM(e);let i=Il(1);t&&(o?ki(o)&&(i=mu(o)):i=mu(e));const l=xQ(s,n,o)?tM(s):Il(0);let a=(r.left+l.x)/i.x,c=(r.top+l.y)/i.y,u=r.width/i.x,d=r.height/i.y;if(s){const f=ir(s),h=o&&ki(o)?ir(o):o;let p=f,m=p.frameElement;for(;m&&o&&h!==p;){const v=mu(m),y=m.getBoundingClientRect(),E=Rr(m),w=y.left+(m.clientLeft+parseFloat(E.paddingLeft))*v.x,C=y.top+(m.clientTop+parseFloat(E.paddingTop))*v.y;a*=v.x,c*=v.y,u*=v.x,d*=v.y,a+=w,c+=C,p=ir(m),m=p.frameElement}}return Tg({width:u,height:d,x:a,y:c})}const TQ=[":popover-open",":modal"];function nM(e){return TQ.some(t=>{try{return e.matches(t)}catch{return!1}})}function MQ(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const s=r==="fixed",i=zl(o),l=t?nM(t.floating):!1;if(o===i||l&&s)return n;let a={scrollLeft:0,scrollTop:0},c=Il(1);const u=Il(0),d=Bs(o);if((d||!d&&!s)&&((Nl(o)!=="body"||up(i))&&(a=F0(o)),Bs(o))){const f=Oh(o);c=mu(o),u.x=f.x+o.clientLeft,u.y=f.y+o.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-a.scrollLeft*c.x+u.x,y:n.y*c.y-a.scrollTop*c.y+u.y}}function AQ(e){return Array.from(e.getClientRects())}function oM(e){return Oh(zl(e)).left+F0(e).scrollLeft}function OQ(e){const t=zl(e),n=F0(e),o=e.ownerDocument.body,r=zf(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),s=zf(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let i=-n.scrollLeft+oM(e);const l=-n.scrollTop;return Rr(o).direction==="rtl"&&(i+=zf(t.clientWidth,o.clientWidth)-r),{width:r,height:s,x:i,y:l}}function IQ(e,t){const n=ir(e),o=zl(e),r=n.visualViewport;let s=o.clientWidth,i=o.clientHeight,l=0,a=0;if(r){s=r.width,i=r.height;const c=v3();(!c||c&&t==="fixed")&&(l=r.offsetLeft,a=r.offsetTop)}return{width:s,height:i,x:l,y:a}}function NQ(e,t){const n=Oh(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,s=Bs(e)?mu(e):Il(1),i=e.clientWidth*s.x,l=e.clientHeight*s.y,a=r*s.x,c=o*s.y;return{width:i,height:l,x:a,y:c}}function B6(e,t,n){let o;if(t==="viewport")o=IQ(e,n);else if(t==="document")o=OQ(zl(e));else if(ki(t))o=NQ(t,n);else{const r=tM(e);o={...t,x:t.x-r.x,y:t.y-r.y}}return Tg(o)}function rM(e,t){const n=Yu(e);return n===t||!ki(n)||R0(n)?!1:Rr(n).position==="fixed"||rM(n,t)}function PQ(e,t){const n=t.get(e);if(n)return n;let o=Xy(e,[],!1).filter(l=>ki(l)&&Nl(l)!=="body"),r=null;const s=Rr(e).position==="fixed";let i=s?Yu(e):e;for(;ki(i)&&!R0(i);){const l=Rr(i),a=_3(i);!a&&l.position==="fixed"&&(r=null),(s?!a&&!r:!a&&l.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||up(i)&&!a&&rM(e,i))?o=o.filter(u=>u!==i):r=l,i=Yu(i)}return t.set(e,o),o}function LQ(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[...n==="clippingAncestors"?PQ(t,this._c):[].concat(n),o],l=i[0],a=i.reduce((c,u)=>{const d=B6(t,u,r);return c.top=zf(d.top,c.top),c.right=R6(d.right,c.right),c.bottom=R6(d.bottom,c.bottom),c.left=zf(d.left,c.left),c},B6(t,l,r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function RQ(e){const{width:t,height:n}=QT(e);return{width:t,height:n}}function FQ(e,t,n){const o=Bs(t),r=zl(t),s=n==="fixed",i=Oh(e,!0,s,t);let l={scrollLeft:0,scrollTop:0};const a=Il(0);if(o||!o&&!s)if((Nl(t)!=="body"||up(r))&&(l=F0(t)),o){const d=Oh(t,!0,s,t);a.x=d.x+t.clientLeft,a.y=d.y+t.clientTop}else r&&(a.x=oM(r));const c=i.left+l.scrollLeft-a.x,u=i.top+l.scrollTop-a.y;return{x:c,y:u,width:i.width,height:i.height}}function V6(e,t){return!Bs(e)||Rr(e).position==="fixed"?null:t?t(e):e.offsetParent}function sM(e,t){const n=ir(e);if(!Bs(e)||nM(e))return n;let o=V6(e,t);for(;o&&SQ(o)&&Rr(o).position==="static";)o=V6(o,t);return o&&(Nl(o)==="html"||Nl(o)==="body"&&Rr(o).position==="static"&&!_3(o))?n:o||$Q(e)||n}const DQ=async function(e){const t=this.getOffsetParent||sM,n=this.getDimensions;return{reference:FQ(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await n(e.floating)}}};function BQ(e){return Rr(e).direction==="rtl"}const VQ={convertOffsetParentRelativeRectToViewportRelativeRect:MQ,getDocumentElement:zl,getClippingRect:LQ,getOffsetParent:sM,getElementRects:DQ,getClientRects:AQ,getDimensions:RQ,getScale:mu,isElement:ki,isRTL:BQ},Qy=kQ,e2=(e,t,n)=>{const o=new Map,r={platform:VQ,...n},s={...r.platform,_c:o};return bQ(e,t,{...r,platform:s})};function zQ(e){const t=H();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 c=s[l-1],u=r.indexOf(c,l-1);u!==-1&&(a=u+1)}e.value.setSelectionRange(a,a)}return[n,o]}const jQ=(e,t,n)=>qm(e.subTree).filter(s=>{var i;return uo(s)&&((i=s.type)==null?void 0:i.name)===t&&!!s.component}).map(s=>s.component.uid).map(s=>n[s]).filter(s=>!!s),HQ=(e,t)=>{const n={},o=Cn([]);return{children:o,addChild:i=>{n[i.uid]=i,o.value=jQ(e,t,n)},removeChild:i=>{delete n[i],o.value=o.value.filter(l=>l.uid!==i)}}},xi=O0({type:String,values:gc,required:!1}),iM=Symbol("size"),UQ=()=>{const e=Pe(iM,{});return B(()=>S(e.size)||"")};function y3(e,{afterFocus:t,beforeBlur:n,afterBlur:o}={}){const r=nt(),{emit:s}=r,i=Cn(),l=H(!1),a=d=>{l.value||(l.value=!0,s("focus",d),t==null||t())},c=d=>{var f;Ue(n)&&n(d)||d.relatedTarget&&((f=i.value)!=null&&f.contains(d.relatedTarget))||(l.value=!1,s("blur",d),o==null||o())},u=()=>{var d;(d=e.value)==null||d.focus()};return ke(i,d=>{d&&d.setAttribute("tabindex","-1")}),Tn(i,"click",u),{wrapperRef:i,isFocused:l,handleFocus:a,handleBlur:c}}const WQ=["",void 0,null],qQ=void 0,KQ=qe({emptyValues:Array,valueOnClear:{type:[String,Number,Boolean,Function],default:void 0,validator:e=>Ue(e)?!e():!e}}),GQ=(e,t)=>{const n=dp();n.value=n.value||{};const o=B(()=>e.emptyValues||n.value.emptyValues||WQ),r=B(()=>Ue(e.valueOnClear)?e.valueOnClear():e.valueOnClear!==void 0?e.valueOnClear:Ue(n.value.valueOnClear)?n.value.valueOnClear():n.value.valueOnClear!==void 0?n.value.valueOnClear:t!==void 0?t:qQ),s=i=>o.value.includes(i);return o.value.includes(r.value),{emptyValues:o,valueOnClear:r,isEmptyValue:s}},lM=Symbol(),Mg=H();function dp(e,t=void 0){const n=nt()?Pe(lM,Mg):Mg;return e?B(()=>{var o,r;return(r=(o=n.value)==null?void 0:o[e])!=null?r:t}):n}function b3(e,t){const n=dp(),o=Ae(e,B(()=>{var l;return((l=n.value)==null?void 0:l.namespace)||Df})),r=Fn(B(()=>{var l;return(l=n.value)==null?void 0:l.locale})),s=P0(B(()=>{var l;return((l=n.value)==null?void 0:l.zIndex)||KT})),i=B(()=>{var l;return S(t)||((l=n.value)==null?void 0:l.size)||""});return YQ(B(()=>S(n)||{})),{ns:o,locale:r,zIndex:s,size:i}}const YQ=(e,t,n=!1)=>{var o;const r=!!nt(),s=r?dp():void 0,i=(o=t==null?void 0:t.provide)!=null?o:r?bt:void 0;if(!i)return;const l=B(()=>{const a=S(e);return s!=null&&s.value?JQ(s.value,a):a});return i(lM,l),i(TT,B(()=>l.value.locale)),i(MT,B(()=>l.value.namespace)),i(GT,B(()=>l.value.zIndex)),i(iM,{size:B(()=>l.value.size||"")}),(n||!Mg.value)&&(Mg.value=l.value),l},JQ=(e,t)=>{const n=[...new Set([...qy(e),...qy(t)])],o={};for(const r of n)o[r]=t[r]!==void 0?t[r]:e[r];return o};var Re=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n};const ZQ=qe({size:{type:we([Number,String])},color:{type:String}}),XQ=K({name:"ElIcon",inheritAttrs:!1}),QQ=K({...XQ,props:ZQ,setup(e){const t=e,n=Ae("icon"),o=B(()=>{const{size:r,color:s}=t;return!r&&!s?{}:{fontSize:bi(r)?void 0:fo(r),"--color":s}});return(r,s)=>(g(),k("i",pn({class:S(n).b(),style:S(o)},r.$attrs),[le(r.$slots,"default")],16))}});var eee=Re(QQ,[["__file","icon.vue"]]);const ve=zt(eee),ud=Symbol("formContextKey"),nc=Symbol("formItemContextKey"),ar=(e,t={})=>{const n=H(void 0),o=t.prop?n:IT("size"),r=t.global?n:UQ(),s=t.form?{size:void 0}:Pe(ud,void 0),i=t.formItem?{size:void 0}:Pe(nc,void 0);return B(()=>o.value||S(e)||(i==null?void 0:i.size)||(s==null?void 0:s.size)||r.value||"")},fs=e=>{const t=IT("disabled"),n=Pe(ud,void 0);return B(()=>t.value||S(e)||(n==null?void 0:n.disabled)||!1)},Ti=()=>{const e=Pe(ud,void 0),t=Pe(nc,void 0);return{form:e,formItem:t}},_c=(e,{formItemContext:t,disableIdGeneration:n,disableIdManagement:o})=>{n||(n=H(!1)),o||(o=H(!1));const r=H();let s;const i=B(()=>{var l;return!!(!e.label&&t&&t.inputIds&&((l=t.inputIds)==null?void 0:l.length)<=1)});return mt(()=>{s=ke([Nn(e,"id"),n],([l,a])=>{const c=l??(a?void 0:Lr().value);c!==r.value&&(t!=null&&t.removeInputId&&(r.value&&t.removeInputId(r.value),!(o!=null&&o.value)&&!a&&c&&t.addInputId(c)),r.value=c)},{immediate:!0})}),Us(()=>{s&&s(),t!=null&&t.removeInputId&&r.value&&t.removeInputId(r.value)}),{isLabeledByFormItem:i,inputId:r}},tee=qe({size:{type:String,values:gc},disabled:Boolean}),nee=qe({...tee,model:Object,rules:{type:we(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]}}),oee={validate:(e,t,n)=>(Ee(e)||je(e))&&ao(t)&&je(n)};function ree(){const e=H([]),t=B(()=>{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 lm=(e,t)=>{const n=bg(t);return n.length>0?e.filter(o=>o.prop&&n.includes(o.prop)):e},see="ElForm",iee=K({name:see}),lee=K({...iee,props:nee,emits:oee,setup(e,{expose:t,emit:n}){const o=e,r=[],s=ar(),i=Ae("form"),l=B(()=>{const{labelPosition:w,inline:C}=o;return[i.b(),i.m(s.value||"default"),{[i.m(`label-${w}`)]:w,[i.m("inline")]:C}]}),a=w=>r.find(C=>C.prop===w),c=w=>{r.push(w)},u=w=>{w.prop&&r.splice(r.indexOf(w),1)},d=(w=[])=>{o.model&&lm(r,w).forEach(C=>C.resetField())},f=(w=[])=>{lm(r,w).forEach(C=>C.clearValidate())},h=B(()=>!!o.model),p=w=>{if(r.length===0)return[];const C=lm(r,w);return C.length?C:[]},m=async w=>y(void 0,w),v=async(w=[])=>{if(!h.value)return!1;const C=p(w);if(C.length===0)return!0;let T={};for(const $ of C)try{await $.validate("")}catch(A){T={...T,...A}}return Object.keys(T).length===0?!0:Promise.reject(T)},y=async(w=[],C)=>{const T=!Ue(C);try{const $=await v(w);return $===!0&&(C==null||C($)),$}catch($){if($ instanceof Error)throw $;const A=$;return o.scrollToError&&E(Object.keys(A)[0]),C==null||C(!1,A),T&&Promise.reject(A)}},E=w=>{var C;const T=lm(r,w)[0];T&&((C=T.$el)==null||C.scrollIntoView(o.scrollIntoViewOptions))};return ke(()=>o.rules,()=>{o.validateOnRuleChange&&m().catch(w=>void 0)},{deep:!0}),bt(ud,jn({...Hs(o),emit:n,resetFields:d,clearValidate:f,validateField:y,getField:a,addField:c,removeField:u,...ree()})),t({validate:m,validateField:y,resetFields:d,clearValidate:f,scrollToField:E}),(w,C)=>(g(),k("form",{class:F(S(l))},[le(w.$slots,"default")],2))}});var aee=Re(lee,[["__file","form.vue"]]);function Ca(){return Ca=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},Ca.apply(this,arguments)}function cee(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Ih(e,t)}function t2(e){return t2=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},t2(e)}function Ih(e,t){return Ih=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,r){return o.__proto__=r,o},Ih(e,t)}function uee(){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 Gm(e,t,n){return uee()?Gm=Reflect.construct.bind():Gm=function(r,s,i){var l=[null];l.push.apply(l,s);var a=Function.bind.apply(r,l),c=new a;return i&&Ih(c,i.prototype),c},Gm.apply(null,arguments)}function dee(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function n2(e){var t=typeof Map=="function"?new Map:void 0;return n2=function(o){if(o===null||!dee(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 Gm(o,arguments,t2(this).constructor)}return r.prototype=Object.create(o.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Ih(r,o)},n2(e)}var fee=/%[sdj%]/g,hee=function(){};typeof process<"u"&&process.env;function o2(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 tr(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(fee,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 pee(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function Rn(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||pee(t)&&typeof e=="string"&&!e)}function mee(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 z6(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 gee(e){var t=[];return Object.keys(e).forEach(function(n){t.push.apply(t,e[n]||[])}),t}var j6=function(e){cee(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}(n2(Error));function _ee(e,t,n,o,r){if(t.first){var s=new Promise(function(f,h){var p=function(y){return o(y),y.length?h(new j6(y,o2(y))):f(r)},m=gee(e);z6(m,n,p)});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,c=0,u=[],d=new Promise(function(f,h){var p=function(v){if(u.push.apply(u,v),c++,c===a)return o(u),u.length?h(new j6(u,o2(u))):f(r)};l.length||(o(u),f(r)),l.forEach(function(m){var v=e[m];i.indexOf(m)!==-1?z6(v,n,p):mee(v,n,p)})});return d.catch(function(f){return f}),d}function vee(e){return!!(e&&e.message!==void 0)}function yee(e,t){for(var n=e,o=0;o<t.length;o++){if(n==null)return n;n=n[t[o]]}return n}function H6(e,t){return function(n){var o;return e.fullFields?o=yee(t,e.fullFields):o=t[n.field||e.fullField],vee(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 U6(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]=Ca({},e[n],o):e[n]=o}}return e}var aM=function(t,n,o,r,s,i){t.required&&(!o.hasOwnProperty(t.field)||Rn(n,i||t.type))&&r.push(tr(s.messages.required,t.fullField))},bee=function(t,n,o,r,s){(/^\s+$/.test(n)||n==="")&&r.push(tr(s.messages.whitespace,t.fullField))},am,wee=function(){if(am)return am;var e="[a-fA-F\\d:]",t=function(C){return C&&C.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(C){return C&&C.exact?s:new RegExp("(?:"+t(C)+n+t(C)+")|(?:"+t(C)+r+t(C)+")","g")};a.v4=function(w){return w&&w.exact?i:new RegExp(""+t(w)+n+t(w),"g")},a.v6=function(w){return w&&w.exact?l:new RegExp(""+t(w)+r+t(w),"g")};var c="(?:(?:[a-z]+:)?//)",u="(?:\\S+(?::\\S*)?@)?",d=a.v4().source,f=a.v6().source,h="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",p="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",m="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",v="(?::\\d{2,5})?",y='(?:[/?#][^\\s"]*)?',E="(?:"+c+"|www\\.)"+u+"(?:localhost|"+d+"|"+f+"|"+h+p+m+")"+v+y;return am=new RegExp("(?:^"+E+"$)","i"),am},W6={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},Kd={integer:function(t){return Kd.number(t)&&parseInt(t,10)===t},float:function(t){return Kd.number(t)&&!Kd.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"&&!Kd.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&t.length<=320&&!!t.match(W6.email)},url:function(t){return typeof t=="string"&&t.length<=2048&&!!t.match(wee())},hex:function(t){return typeof t=="string"&&!!t.match(W6.hex)}},kee=function(t,n,o,r,s){if(t.required&&n===void 0){aM(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?Kd[l](n)||r.push(tr(s.messages.types[l],t.fullField,t.type)):l&&typeof n!==t.type&&r.push(tr(s.messages.types[l],t.fullField,t.type))},Cee=function(t,n,o,r,s){var i=typeof t.len=="number",l=typeof t.min=="number",a=typeof t.max=="number",c=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,u=n,d=null,f=typeof n=="number",h=typeof n=="string",p=Array.isArray(n);if(f?d="number":h?d="string":p&&(d="array"),!d)return!1;p&&(u=n.length),h&&(u=n.replace(c,"_").length),i?u!==t.len&&r.push(tr(s.messages[d].len,t.fullField,t.len)):l&&!a&&u<t.min?r.push(tr(s.messages[d].min,t.fullField,t.min)):a&&!l&&u>t.max?r.push(tr(s.messages[d].max,t.fullField,t.max)):l&&a&&(u<t.min||u>t.max)&&r.push(tr(s.messages[d].range,t.fullField,t.min,t.max))},Ec="enum",See=function(t,n,o,r,s){t[Ec]=Array.isArray(t[Ec])?t[Ec]:[],t[Ec].indexOf(n)===-1&&r.push(tr(s.messages[Ec],t.fullField,t[Ec].join(", ")))},$ee=function(t,n,o,r,s){if(t.pattern){if(t.pattern instanceof RegExp)t.pattern.lastIndex=0,t.pattern.test(n)||r.push(tr(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(tr(s.messages.pattern.mismatch,t.fullField,n,t.pattern))}}},At={required:aM,whitespace:bee,type:kee,range:Cee,enum:See,pattern:$ee},Eee=function(t,n,o,r,s){var i=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(Rn(n,"string")&&!t.required)return o();At.required(t,n,r,i,s,"string"),Rn(n,"string")||(At.type(t,n,r,i,s),At.range(t,n,r,i,s),At.pattern(t,n,r,i,s),t.whitespace===!0&&At.whitespace(t,n,r,i,s))}o(i)},xee=function(t,n,o,r,s){var i=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(Rn(n)&&!t.required)return o();At.required(t,n,r,i,s),n!==void 0&&At.type(t,n,r,i,s)}o(i)},Tee=function(t,n,o,r,s){var i=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(n===""&&(n=void 0),Rn(n)&&!t.required)return o();At.required(t,n,r,i,s),n!==void 0&&(At.type(t,n,r,i,s),At.range(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(Rn(n)&&!t.required)return o();At.required(t,n,r,i,s),n!==void 0&&At.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(Rn(n)&&!t.required)return o();At.required(t,n,r,i,s),Rn(n)||At.type(t,n,r,i,s)}o(i)},Oee=function(t,n,o,r,s){var i=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(Rn(n)&&!t.required)return o();At.required(t,n,r,i,s),n!==void 0&&(At.type(t,n,r,i,s),At.range(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(Rn(n)&&!t.required)return o();At.required(t,n,r,i,s),n!==void 0&&(At.type(t,n,r,i,s),At.range(t,n,r,i,s))}o(i)},Nee=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();At.required(t,n,r,i,s,"array"),n!=null&&(At.type(t,n,r,i,s),At.range(t,n,r,i,s))}o(i)},Pee=function(t,n,o,r,s){var i=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(Rn(n)&&!t.required)return o();At.required(t,n,r,i,s),n!==void 0&&At.type(t,n,r,i,s)}o(i)},Lee="enum",Ree=function(t,n,o,r,s){var i=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(Rn(n)&&!t.required)return o();At.required(t,n,r,i,s),n!==void 0&&At[Lee](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(Rn(n,"string")&&!t.required)return o();At.required(t,n,r,i,s),Rn(n,"string")||At.pattern(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(Rn(n,"date")&&!t.required)return o();if(At.required(t,n,r,i,s),!Rn(n,"date")){var a;n instanceof Date?a=n:a=new Date(n),At.type(t,a,r,i,s),a&&At.range(t,a.getTime(),r,i,s)}}o(i)},Bee=function(t,n,o,r,s){var i=[],l=Array.isArray(n)?"array":typeof n;At.required(t,n,r,i,s,l),o(i)},Z_=function(t,n,o,r,s){var i=t.type,l=[],a=t.required||!t.required&&r.hasOwnProperty(t.field);if(a){if(Rn(n,i)&&!t.required)return o();At.required(t,n,r,l,s,i),Rn(n,i)||At.type(t,n,r,l,s)}o(l)},Vee=function(t,n,o,r,s){var i=[],l=t.required||!t.required&&r.hasOwnProperty(t.field);if(l){if(Rn(n)&&!t.required)return o();At.required(t,n,r,i,s)}o(i)},jf={string:Eee,method:xee,number:Tee,boolean:Mee,regexp:Aee,integer:Oee,float:Iee,array:Nee,object:Pee,enum:Ree,pattern:Fee,date:Dee,url:Z_,hex:Z_,email:Z_,required:Bee,any:Vee};function r2(){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 s2=r2(),fp=function(){function e(n){this.rules=null,this._messages=s2,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=U6(r2(),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,c=s;if(typeof a=="function"&&(c=a,a={}),!this.rules||Object.keys(this.rules).length===0)return c&&c(null,l),Promise.resolve(l);function u(m){var v=[],y={};function E(C){if(Array.isArray(C)){var T;v=(T=v).concat.apply(T,C)}else v.push(C)}for(var w=0;w<m.length;w++)E(m[w]);v.length?(y=o2(v),c(v,y)):c(null,l)}if(a.messages){var d=this.messages();d===s2&&(d=r2()),U6(d,a.messages),a.messages=d}else a.messages=this.messages();var f={},h=a.keys||Object.keys(this.rules);h.forEach(function(m){var v=i.rules[m],y=l[m];v.forEach(function(E){var w=E;typeof w.transform=="function"&&(l===o&&(l=Ca({},l)),y=l[m]=w.transform(y)),typeof w=="function"?w={validator:w}:w=Ca({},w),w.validator=i.getValidationMethod(w),w.validator&&(w.field=m,w.fullField=w.fullField||m,w.type=i.getType(w),f[m]=f[m]||[],f[m].push({rule:w,value:y,source:l,field:m}))})});var p={};return _ee(f,a,function(m,v){var y=m.rule,E=(y.type==="object"||y.type==="array")&&(typeof y.fields=="object"||typeof y.defaultField=="object");E=E&&(y.required||!y.required&&m.value),y.field=m.field;function w($,A){return Ca({},A,{fullField:y.fullField+"."+$,fullFields:y.fullFields?[].concat(y.fullFields,[$]):[$]})}function C($){$===void 0&&($=[]);var A=Array.isArray($)?$:[$];!a.suppressWarning&&A.length&&e.warning("async-validator:",A),A.length&&y.message!==void 0&&(A=[].concat(y.message));var N=A.map(H6(y,l));if(a.first&&N.length)return p[y.field]=1,v(N);if(!E)v(N);else{if(y.required&&!m.value)return y.message!==void 0?N=[].concat(y.message).map(H6(y,l)):a.error&&(N=[a.error(y,tr(a.messages.required,y.field))]),v(N);var P={};y.defaultField&&Object.keys(m.value).map(function(V){P[V]=y.defaultField}),P=Ca({},P,m.rule.fields);var I={};Object.keys(P).forEach(function(V){var G=P[V],te=Array.isArray(G)?G:[G];I[V]=te.map(w.bind(null,V))});var D=new e(I);D.messages(a.messages),m.rule.options&&(m.rule.options.messages=a.messages,m.rule.options.error=a.error),D.validate(m.value,m.rule.options||a,function(V){var G=[];N&&N.length&&G.push.apply(G,N),V&&V.length&&G.push.apply(G,V),v(G.length?G:null)})}}var T;if(y.asyncValidator)T=y.asyncValidator(y,m.value,C,m.source,a);else if(y.validator){try{T=y.validator(y,m.value,C,m.source,a)}catch($){console.error==null||console.error($),a.suppressValidatorError||setTimeout(function(){throw $},0),C($.message)}T===!0?C():T===!1?C(typeof y.message=="function"?y.message(y.fullField||y.field):y.message||(y.fullField||y.field)+" fails"):T instanceof Array?C(T):T instanceof Error&&C(T.message)}T&&T.then&&T.then(function(){return C()},function($){return C($)})},function(m){u(m)},l)},t.getType=function(o){if(o.type===void 0&&o.pattern instanceof RegExp&&(o.type="pattern"),typeof o.validator!="function"&&o.type&&!jf.hasOwnProperty(o.type))throw new Error(tr("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"?jf.required:jf[this.getType(o)]||void 0},e}();fp.register=function(t,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");jf[t]=n};fp.warning=hee;fp.messages=s2;fp.validators=jf;const zee=["","error","validating","success"],jee=qe({label:String,labelWidth:{type:[String,Number],default:""},prop:{type:we([String,Array])},required:{type:Boolean,default:void 0},rules:{type:we([Object,Array])},error:String,validateStatus:{type:String,values:zee},for:String,inlineMessage:{type:[String,Boolean],default:""},showMessage:{type:Boolean,default:!0},size:{type:String,values:gc}}),q6="ElLabelWrap";var Hee=K({name:q6,props:{isAutoWidth:Boolean,updateAll:Boolean},setup(e,{slots:t}){const n=Pe(ud,void 0),o=Pe(nc);o||us(q6,"usage: <el-form-item><label-wrap /></el-form-item>");const r=Ae("form"),s=H(),i=H(0),l=()=>{var u;if((u=s.value)!=null&&u.firstElementChild){const d=window.getComputedStyle(s.value.firstElementChild).width;return Math.ceil(Number.parseFloat(d))}else return 0},a=(u="update")=>{tt(()=>{t.default&&e.isAutoWidth&&(u==="update"?i.value=l():u==="remove"&&(n==null||n.deregisterLabelWidth(i.value)))})},c=()=>a("update");return mt(()=>{c()}),bn(()=>{a("remove")}),Bl(()=>c()),ke(i,(u,d)=>{e.updateAll&&(n==null||n.registerLabelWidth(u,d))}),Oo(B(()=>{var u,d;return(d=(u=s.value)==null?void 0:u.firstElementChild)!=null?d:null}),c),()=>{var u,d;if(!t)return null;const{isAutoWidth:f}=e;if(f){const h=n==null?void 0:n.autoLabelWidth,p=o==null?void 0:o.hasLabel,m={};if(p&&h&&h!=="auto"){const v=Math.max(0,Number.parseInt(h,10)-i.value),y=n.labelPosition==="left"?"marginRight":"marginLeft";v&&(m[y]=`${v}px`)}return b("div",{ref:s,class:[r.be("item","label-wrap")],style:m},[(u=t.default)==null?void 0:u.call(t)])}else return b(Q,{ref:s},[(d=t.default)==null?void 0:d.call(t)])}}});const Uee=["role","aria-labelledby"],Wee=K({name:"ElFormItem"}),qee=K({...Wee,props:jee,setup(e,{expose:t}){const n=e,o=Ws(),r=Pe(ud,void 0),s=Pe(nc,void 0),i=ar(void 0,{formItem:!1}),l=Ae("form-item"),a=Lr().value,c=H([]),u=H(""),d=fH(u,100),f=H(""),h=H();let p,m=!1;const v=B(()=>{if((r==null?void 0:r.labelPosition)==="top")return{};const Z=fo(n.labelWidth||(r==null?void 0:r.labelWidth)||"");return Z?{width:Z}:{}}),y=B(()=>{if((r==null?void 0:r.labelPosition)==="top"||r!=null&&r.inline)return{};if(!n.label&&!n.labelWidth&&P)return{};const Z=fo(n.labelWidth||(r==null?void 0:r.labelWidth)||"");return!n.label&&!o.label?{marginLeft:Z}:{}}),E=B(()=>[l.b(),l.m(i.value),l.is("error",u.value==="error"),l.is("validating",u.value==="validating"),l.is("success",u.value==="success"),l.is("required",te.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}]),w=B(()=>ao(n.inlineMessage)?n.inlineMessage:(r==null?void 0:r.inlineMessage)||!1),C=B(()=>[l.e("error"),{[l.em("error","inline")]:w.value}]),T=B(()=>n.prop?je(n.prop)?n.prop:n.prop.join("."):""),$=B(()=>!!(n.label||o.label)),A=B(()=>n.for||(c.value.length===1?c.value[0]:void 0)),N=B(()=>!A.value&&$.value),P=!!s,I=B(()=>{const Z=r==null?void 0:r.model;if(!(!Z||!n.prop))return Um(Z,n.prop).value}),D=B(()=>{const{required:Z}=n,ce=[];n.rules&&ce.push(...bg(n.rules));const pe=r==null?void 0:r.rules;if(pe&&n.prop){const ie=Um(pe,n.prop).value;ie&&ce.push(...bg(ie))}if(Z!==void 0){const ie=ce.map((Le,et)=>[Le,et]).filter(([Le])=>Object.keys(Le).includes("required"));if(ie.length>0)for(const[Le,et]of ie)Le.required!==Z&&(ce[et]={...Le,required:Z});else ce.push({required:Z})}return ce}),V=B(()=>D.value.length>0),G=Z=>D.value.filter(pe=>!pe.trigger||!Z?!0:Array.isArray(pe.trigger)?pe.trigger.includes(Z):pe.trigger===Z).map(({trigger:pe,...ie})=>ie),te=B(()=>D.value.some(Z=>Z.required)),oe=B(()=>{var Z;return d.value==="error"&&n.showMessage&&((Z=r==null?void 0:r.showMessage)!=null?Z:!0)}),J=B(()=>`${n.label||""}${(r==null?void 0:r.labelSuffix)||""}`),q=Z=>{u.value=Z},X=Z=>{var ce,pe;const{errors:ie,fields:Le}=Z;(!ie||!Le)&&console.error(Z),q("error"),f.value=ie?(pe=(ce=ie==null?void 0:ie[0])==null?void 0:ce.message)!=null?pe:`${n.prop} is required`:"",r==null||r.emit("validate",n.prop,!1,f.value)},ee=()=>{q("success"),r==null||r.emit("validate",n.prop,!0,"")},R=async Z=>{const ce=T.value;return new fp({[ce]:Z}).validate({[ce]:I.value},{firstFields:!0}).then(()=>(ee(),!0)).catch(ie=>(X(ie),Promise.reject(ie)))},ye=async(Z,ce)=>{if(m||!n.prop)return!1;const pe=Ue(ce);if(!V.value)return ce==null||ce(!1),!1;const ie=G(Z);return ie.length===0?(ce==null||ce(!0),!0):(q("validating"),R(ie).then(()=>(ce==null||ce(!0),!0)).catch(Le=>{const{fields:et}=Le;return ce==null||ce(!1,et),pe?!1:Promise.reject(et)}))},Ce=()=>{q(""),f.value="",m=!1},U=async()=>{const Z=r==null?void 0:r.model;if(!Z||!n.prop)return;const ce=Um(Z,n.prop);m=!0,ce.value=p6(p),await tt(),Ce(),m=!1},xe=Z=>{c.value.includes(Z)||c.value.push(Z)},Ye=Z=>{c.value=c.value.filter(ce=>ce!==Z)};ke(()=>n.error,Z=>{f.value=Z||"",q(Z?"error":"")},{immediate:!0}),ke(()=>n.validateStatus,Z=>q(Z||""));const Fe=jn({...Hs(n),$el:h,size:i,validateState:u,labelId:a,inputIds:c,isGroup:N,hasLabel:$,fieldValue:I,addInputId:xe,removeInputId:Ye,resetField:U,clearValidate:Ce,validate:ye});return bt(nc,Fe),mt(()=>{n.prop&&(r==null||r.addField(Fe),p=p6(I.value))}),bn(()=>{r==null||r.removeField(Fe)}),t({size:i,validateMessage:f,validateState:u,validate:ye,clearValidate:Ce,resetField:U}),(Z,ce)=>{var pe;return g(),k("div",{ref_key:"formItemRef",ref:h,class:F(S(E)),role:S(N)?"group":void 0,"aria-labelledby":S(N)?S(a):void 0},[b(S(Hee),{"is-auto-width":S(v).width==="auto","update-all":((pe=S(r))==null?void 0:pe.labelWidth)==="auto"},{default:x(()=>[S($)?(g(),L(xt(S(A)?"label":"div"),{key:0,id:S(a),for:S(A),class:F(S(l).e("label")),style:Be(S(v))},{default:x(()=>[le(Z.$slots,"label",{label:S(J)},()=>[ne(M(S(J)),1)])]),_:3},8,["id","for","class","style"])):O("v-if",!0)]),_:3},8,["is-auto-width","update-all"]),_("div",{class:F(S(l).e("content")),style:Be(S(y))},[le(Z.$slots,"default"),b(g0,{name:`${S(l).namespace.value}-zoom-in-top`},{default:x(()=>[S(oe)?le(Z.$slots,"error",{key:0,error:f.value},()=>[_("div",{class:F(S(C))},M(f.value),3)]):O("v-if",!0)]),_:3},8,["name"])],6)],10,Uee)}}});var cM=Re(qee,[["__file","form-item.vue"]]);const Mi=zt(aee,{FormItem:cM}),Ai=Hn(cM);let zr;const Kee=` |
| 51 |
height:0 !important; |
| 52 |
visibility:hidden !important; |
| 53 |
${NH()?"":"overflow:hidden !important;"} |
| 54 |
position:absolute !important; |
| 55 |
z-index:-1000 !important; |
| 56 |
top:0 !important; |
| 57 |
right:0 !important; |
| 58 |
`,Gee=["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 Yee(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:Gee.map(i=>`${i}:${t.getPropertyValue(i)}`).join(";"),paddingSize:o,borderSize:r,boxSizing:n}}function K6(e,t=1,n){var o;zr||(zr=document.createElement("textarea"),document.body.appendChild(zr));const{paddingSize:r,borderSize:s,boxSizing:i,contextStyle:l}=Yee(e);zr.setAttribute("style",`${l};${Kee}`),zr.value=e.value||e.placeholder||"";let a=zr.scrollHeight;const c={};i==="border-box"?a=a+s:i==="content-box"&&(a=a-r),zr.value="";const u=zr.scrollHeight-r;if(Et(t)){let d=u*t;i==="border-box"&&(d=d+r+s),a=Math.max(d,a),c.minHeight=`${d}px`}if(Et(n)){let d=u*n;i==="border-box"&&(d=d+r+s),a=Math.min(d,a)}return c.height=`${a}px`,(o=zr.parentNode)==null||o.removeChild(zr),zr=void 0,c}const Jee=qe({id:{type:String,default:void 0},size:xi,disabled:Boolean,modelValue:{type:we([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:we([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:Pn},prefixIcon:{type:Pn},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:we([Object,Array,String]),default:()=>vo({})},autofocus:{type:Boolean,default:!1}}),Zee={[Wt]:e=>je(e),input:e=>je(e),change:e=>je(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},Xee=["role"],Qee=["id","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus"],ete=["id","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus"],tte=K({name:"ElInput",inheritAttrs:!1}),nte=K({...tte,props:Jee,emits:Zee,setup(e,{expose:t,emit:n}){const o=e,r=cw(),s=Ws(),i=B(()=>{const se={};return o.containerRole==="combobox"&&(se["aria-haspopup"]=r["aria-haspopup"],se["aria-owns"]=r["aria-owns"],se["aria-expanded"]=r["aria-expanded"]),se}),l=B(()=>[o.type==="textarea"?v.b():m.b(),m.m(h.value),m.is("disabled",p.value),m.is("exceed",xe.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")]:R.value&&ye.value,[m.b("hidden")]:o.type==="hidden"},r.class]),a=B(()=>[m.e("wrapper"),m.is("focus",I.value)]),c=ET({excludeKeys:B(()=>Object.keys(i.value))}),{form:u,formItem:d}=Ti(),{inputId:f}=_c(o,{formItemContext:d}),h=ar(),p=fs(),m=Ae("input"),v=Ae("textarea"),y=Cn(),E=Cn(),w=H(!1),C=H(!1),T=H(!1),$=H(),A=Cn(o.inputStyle),N=B(()=>y.value||E.value),{wrapperRef:P,isFocused:I,handleFocus:D,handleBlur:V}=y3(N,{afterBlur(){var se;o.validateEvent&&((se=d==null?void 0:d.validate)==null||se.call(d,"blur").catch(Y=>void 0))}}),G=B(()=>{var se;return(se=u==null?void 0:u.statusIcon)!=null?se:!1}),te=B(()=>(d==null?void 0:d.validateState)||""),oe=B(()=>te.value&&CT[te.value]),J=B(()=>T.value?yT:mT),q=B(()=>[r.style]),X=B(()=>[o.inputStyle,A.value,{resize:o.resize}]),ee=B(()=>As(o.modelValue)?"":String(o.modelValue)),R=B(()=>o.clearable&&!p.value&&!o.readonly&&!!ee.value&&(I.value||w.value)),ye=B(()=>o.showPassword&&!p.value&&!o.readonly&&!!ee.value&&(!!ee.value||I.value)),Ce=B(()=>o.showWordLimit&&!!o.maxlength&&(o.type==="text"||o.type==="textarea")&&!p.value&&!o.readonly&&!o.showPassword),U=B(()=>ee.value.length),xe=B(()=>!!Ce.value&&U.value>Number(o.maxlength)),Ye=B(()=>!!s.suffix||!!o.suffixIcon||R.value||o.showPassword||Ce.value||!!te.value&&G.value),[Fe,Z]=zQ(y);Oo(E,se=>{if(ie(),!Ce.value||o.resize!=="both")return;const Y=se[0],{width:ae}=Y.contentRect;$.value={right:`calc(100% - ${ae+15+6}px)`}});const ce=()=>{const{type:se,autosize:Y}=o;if(!(!kt||se!=="textarea"||!E.value))if(Y){const ae=it(Y)?Y.minRows:void 0,Ie=it(Y)?Y.maxRows:void 0,We=K6(E.value,ae,Ie);A.value={overflowY:"hidden",...We},tt(()=>{E.value.offsetHeight,A.value=We})}else A.value={minHeight:K6(E.value).minHeight}},ie=(se=>{let Y=!1;return()=>{var ae;if(Y||!o.autosize)return;((ae=E.value)==null?void 0:ae.offsetParent)===null||(se(),Y=!0)}})(ce),Le=()=>{const se=N.value,Y=o.formatter?o.formatter(ee.value):ee.value;!se||se.value===Y||(se.value=Y)},et=async se=>{Fe();let{value:Y}=se.target;if(o.formatter&&(Y=o.parser?o.parser(Y):Y),!C.value){if(Y===ee.value){Le();return}n(Wt,Y),n("input",Y),await tt(),Le(),Z()}},j=se=>{n("change",se.target.value)},W=se=>{n("compositionstart",se),C.value=!0},re=se=>{var Y;n("compositionupdate",se);const ae=(Y=se.target)==null?void 0:Y.value,Ie=ae[ae.length-1]||"";C.value=!$T(Ie)},he=se=>{n("compositionend",se),C.value&&(C.value=!1,et(se))},de=()=>{T.value=!T.value,Se()},Se=async()=>{var se;await tt(),(se=N.value)==null||se.focus()},Oe=()=>{var se;return(se=N.value)==null?void 0:se.blur()},be=se=>{w.value=!1,n("mouseleave",se)},$e=se=>{w.value=!0,n("mouseenter",se)},ge=se=>{n("keydown",se)},De=()=>{var se;(se=N.value)==null||se.select()},Ke=()=>{n(Wt,""),n("change",""),n("clear"),n("input","")};return ke(()=>o.modelValue,()=>{var se;tt(()=>ce()),o.validateEvent&&((se=d==null?void 0:d.validate)==null||se.call(d,"change").catch(Y=>void 0))}),ke(ee,()=>Le()),ke(()=>o.type,async()=>{await tt(),Le(),ce()}),mt(()=>{!o.formatter&&o.parser,Le(),tt(ce)}),t({input:y,textarea:E,ref:N,textareaStyle:X,autosize:Nn(o,"autosize"),focus:Se,blur:Oe,select:De,clear:Ke,resizeTextarea:ce}),(se,Y)=>(g(),k("div",pn(S(i),{class:S(l),style:S(q),role:se.containerRole,onMouseenter:$e,onMouseleave:be}),[O(" input "),se.type!=="textarea"?(g(),k(Q,{key:0},[O(" prepend slot "),se.$slots.prepend?(g(),k("div",{key:0,class:F(S(m).be("group","prepend"))},[le(se.$slots,"prepend")],2)):O("v-if",!0),_("div",{ref_key:"wrapperRef",ref:P,class:F(S(a))},[O(" prefix slot "),se.$slots.prefix||se.prefixIcon?(g(),k("span",{key:0,class:F(S(m).e("prefix"))},[_("span",{class:F(S(m).e("prefix-inner"))},[le(se.$slots,"prefix"),se.prefixIcon?(g(),L(S(ve),{key:0,class:F(S(m).e("icon"))},{default:x(()=>[(g(),L(xt(se.prefixIcon)))]),_:1},8,["class"])):O("v-if",!0)],2)],2)):O("v-if",!0),_("input",pn({id:S(f),ref_key:"input",ref:y,class:S(m).e("inner")},S(c),{minlength:se.minlength,maxlength:se.maxlength,type:se.showPassword?T.value?"text":"password":se.type,disabled:S(p),readonly:se.readonly,autocomplete:se.autocomplete,tabindex:se.tabindex,"aria-label":se.label,placeholder:se.placeholder,style:se.inputStyle,form:se.form,autofocus:se.autofocus,onCompositionstart:W,onCompositionupdate:re,onCompositionend:he,onInput:et,onFocus:Y[0]||(Y[0]=(...ae)=>S(D)&&S(D)(...ae)),onBlur:Y[1]||(Y[1]=(...ae)=>S(V)&&S(V)(...ae)),onChange:j,onKeydown:ge}),null,16,Qee),O(" suffix slot "),S(Ye)?(g(),k("span",{key:1,class:F(S(m).e("suffix"))},[_("span",{class:F(S(m).e("suffix-inner"))},[!S(R)||!S(ye)||!S(Ce)?(g(),k(Q,{key:0},[le(se.$slots,"suffix"),se.suffixIcon?(g(),L(S(ve),{key:0,class:F(S(m).e("icon"))},{default:x(()=>[(g(),L(xt(se.suffixIcon)))]),_:1},8,["class"])):O("v-if",!0)],64)):O("v-if",!0),S(R)?(g(),L(S(ve),{key:1,class:F([S(m).e("icon"),S(m).e("clear")]),onMousedown:Ge(S(dt),["prevent"]),onClick:Ke},{default:x(()=>[b(S(M0))]),_:1},8,["class","onMousedown"])):O("v-if",!0),S(ye)?(g(),L(S(ve),{key:2,class:F([S(m).e("icon"),S(m).e("password")]),onClick:de},{default:x(()=>[(g(),L(xt(S(J))))]),_:1},8,["class"])):O("v-if",!0),S(Ce)?(g(),k("span",{key:3,class:F(S(m).e("count"))},[_("span",{class:F(S(m).e("count-inner"))},M(S(U))+" / "+M(se.maxlength),3)],2)):O("v-if",!0),S(te)&&S(oe)&&S(G)?(g(),L(S(ve),{key:4,class:F([S(m).e("icon"),S(m).e("validateIcon"),S(m).is("loading",S(te)==="validating")])},{default:x(()=>[(g(),L(xt(S(oe))))]),_:1},8,["class"])):O("v-if",!0)],2)],2)):O("v-if",!0)],2),O(" append slot "),se.$slots.append?(g(),k("div",{key:1,class:F(S(m).be("group","append"))},[le(se.$slots,"append")],2)):O("v-if",!0)],64)):(g(),k(Q,{key:1},[O(" textarea "),_("textarea",pn({id:S(f),ref_key:"textarea",ref:E,class:S(v).e("inner")},S(c),{minlength:se.minlength,maxlength:se.maxlength,tabindex:se.tabindex,disabled:S(p),readonly:se.readonly,autocomplete:se.autocomplete,style:S(X),"aria-label":se.label,placeholder:se.placeholder,form:se.form,autofocus:se.autofocus,onCompositionstart:W,onCompositionupdate:re,onCompositionend:he,onInput:et,onFocus:Y[2]||(Y[2]=(...ae)=>S(D)&&S(D)(...ae)),onBlur:Y[3]||(Y[3]=(...ae)=>S(V)&&S(V)(...ae)),onChange:j,onKeydown:ge}),null,16,ete),S(Ce)?(g(),k("span",{key:0,style:Be($.value),class:F(S(m).e("count"))},M(S(U))+" / "+M(se.maxlength),7)):O("v-if",!0)],64))],16,Xee))}});var ote=Re(nte,[["__file","input.vue"]]);const Dn=zt(ote),xc=4,rte={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"}},ste=({move:e,size:t,bar:n})=>({[n.size]:t,transform:`translate${n.axis}(${e}%)`}),w3=Symbol("scrollbarContextKey"),ite=qe({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),lte="Thumb",ate=K({__name:"thumb",props:ite,setup(e){const t=e,n=Pe(w3),o=Ae("scrollbar");n||us(lte,"can not inject scrollbar context");const r=H(),s=H(),i=H({}),l=H(!1);let a=!1,c=!1,u=kt?document.onselectstart:null;const d=B(()=>rte[t.vertical?"vertical":"horizontal"]),f=B(()=>ste({size:t.size,move:t.move,bar:d.value})),h=B(()=>r.value[d.value.offset]**2/n.wrapElement[d.value.scrollSize]/t.ratio/s.value[d.value.offset]),p=$=>{var A;if($.stopPropagation(),$.ctrlKey||[1,2].includes($.button))return;(A=window.getSelection())==null||A.removeAllRanges(),v($);const N=$.currentTarget;N&&(i.value[d.value.axis]=N[d.value.offset]-($[d.value.client]-N.getBoundingClientRect()[d.value.direction]))},m=$=>{if(!s.value||!r.value||!n.wrapElement)return;const A=Math.abs($.target.getBoundingClientRect()[d.value.direction]-$[d.value.client]),N=s.value[d.value.offset]/2,P=(A-N)*100*h.value/r.value[d.value.offset];n.wrapElement[d.value.scroll]=P*n.wrapElement[d.value.scrollSize]/100},v=$=>{$.stopImmediatePropagation(),a=!0,document.addEventListener("mousemove",y),document.addEventListener("mouseup",E),u=document.onselectstart,document.onselectstart=()=>!1},y=$=>{if(!r.value||!s.value||a===!1)return;const A=i.value[d.value.axis];if(!A)return;const N=(r.value.getBoundingClientRect()[d.value.direction]-$[d.value.client])*-1,P=s.value[d.value.offset]-A,I=(N-P)*100*h.value/r.value[d.value.offset];n.wrapElement[d.value.scroll]=I*n.wrapElement[d.value.scrollSize]/100},E=()=>{a=!1,i.value[d.value.axis]=0,document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",E),T(),c&&(l.value=!1)},w=()=>{c=!1,l.value=!!t.size},C=()=>{c=!0,l.value=a};bn(()=>{T(),document.removeEventListener("mouseup",E)});const T=()=>{document.onselectstart!==u&&(document.onselectstart=u)};return Tn(Nn(n,"scrollbarElement"),"mousemove",w),Tn(Nn(n,"scrollbarElement"),"mouseleave",C),($,A)=>(g(),L(ur,{name:S(o).b("fade"),persisted:""},{default:x(()=>[Ve(_("div",{ref_key:"instance",ref:r,class:F([S(o).e("bar"),S(o).is(S(d).key)]),onMousedown:m},[_("div",{ref_key:"thumb",ref:s,class:F(S(o).e("thumb")),style:Be(S(f)),onMousedown:p},null,38)],34),[[sn,$.always||l.value]])]),_:1},8,["name"]))}});var G6=Re(ate,[["__file","thumb.vue"]]);const cte=qe({always:{type:Boolean,default:!0},minSize:{type:Number,required:!0}}),ute=K({__name:"bar",props:cte,setup(e,{expose:t}){const n=e,o=Pe(w3),r=H(0),s=H(0),i=H(""),l=H(""),a=H(1),c=H(1);return t({handleScroll:f=>{if(f){const h=f.offsetHeight-xc,p=f.offsetWidth-xc;s.value=f.scrollTop*100/h*a.value,r.value=f.scrollLeft*100/p*c.value}},update:()=>{const f=o==null?void 0:o.wrapElement;if(!f)return;const h=f.offsetHeight-xc,p=f.offsetWidth-xc,m=h**2/f.scrollHeight,v=p**2/f.scrollWidth,y=Math.max(m,n.minSize),E=Math.max(v,n.minSize);a.value=m/(h-m)/(y/(h-y)),c.value=v/(p-v)/(E/(p-E)),l.value=y+xc<h?`${y}px`:"",i.value=E+xc<p?`${E}px`:""}}),(f,h)=>(g(),k(Q,null,[b(G6,{move:r.value,ratio:c.value,size:i.value,always:f.always},null,8,["move","ratio","size","always"]),b(G6,{move:s.value,ratio:a.value,size:l.value,vertical:"",always:f.always},null,8,["move","ratio","size","always"])],64))}});var dte=Re(ute,[["__file","bar.vue"]]);const fte=qe({height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:{type:Boolean,default:!1},wrapStyle:{type:we([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"]}}),hte={scroll:({scrollTop:e,scrollLeft:t})=>[e,t].every(Et)},pte="ElScrollbar",mte=K({name:pte}),gte=K({...mte,props:fte,emits:hte,setup(e,{expose:t,emit:n}){const o=e,r=Ae("scrollbar");let s,i;const l=H(),a=H(),c=H(),u=H(),d=B(()=>{const w={};return o.height&&(w.height=fo(o.height)),o.maxHeight&&(w.maxHeight=fo(o.maxHeight)),[o.wrapStyle,w]}),f=B(()=>[o.wrapClass,r.e("wrap"),{[r.em("wrap","hidden-default")]:!o.native}]),h=B(()=>[r.e("view"),o.viewClass]),p=()=>{var w;a.value&&((w=u.value)==null||w.handleScroll(a.value),n("scroll",{scrollTop:a.value.scrollTop,scrollLeft:a.value.scrollLeft}))};function m(w,C){it(w)?a.value.scrollTo(w):Et(w)&&Et(C)&&a.value.scrollTo(w,C)}const v=w=>{Et(w)&&(a.value.scrollTop=w)},y=w=>{Et(w)&&(a.value.scrollLeft=w)},E=()=>{var w;(w=u.value)==null||w.update()};return ke(()=>o.noresize,w=>{w?(s==null||s(),i==null||i()):({stop:s}=Oo(c,E),i=Tn("resize",E))},{immediate:!0}),ke(()=>[o.maxHeight,o.height],()=>{o.native||tt(()=>{var w;E(),a.value&&((w=u.value)==null||w.handleScroll(a.value))})}),bt(w3,jn({scrollbarElement:l,wrapElement:a})),mt(()=>{o.native||tt(()=>{E()})}),Bl(()=>E()),t({wrapRef:a,update:E,scrollTo:m,setScrollTop:v,setScrollLeft:y,handleScroll:p}),(w,C)=>(g(),k("div",{ref_key:"scrollbarRef",ref:l,class:F(S(r).b())},[_("div",{ref_key:"wrapRef",ref:a,class:F(S(f)),style:Be(S(d)),onScroll:p},[(g(),L(xt(w.tag),{id:w.id,ref_key:"resizeRef",ref:c,class:F(S(h)),style:Be(w.viewStyle),role:w.role,"aria-label":w.ariaLabel,"aria-orientation":w.ariaOrientation},{default:x(()=>[le(w.$slots,"default")]),_:3},8,["id","class","style","role","aria-label","aria-orientation"]))],38),w.native?O("v-if",!0):(g(),L(dte,{key:0,ref_key:"barRef",ref:u,always:w.always,"min-size":w.minSize},null,8,["always","min-size"]))],2))}});var _te=Re(gte,[["__file","scrollbar.vue"]]);const Vo=zt(_te),k3=Symbol("popper"),uM=Symbol("popperContent"),vte=["dialog","grid","group","listbox","menu","navigation","tooltip","tree"],dM=qe({role:{type:String,values:vte,default:"tooltip"}}),yte=K({name:"ElPopper",inheritAttrs:!1}),bte=K({...yte,props:dM,setup(e,{expose:t}){const n=e,o=H(),r=H(),s=H(),i=H(),l=B(()=>n.role),a={triggerRef:o,popperInstanceRef:r,contentRef:s,referenceRef:i,role:l};return t(a),bt(k3,a),(c,u)=>le(c.$slots,"default")}});var wte=Re(bte,[["__file","popper.vue"]]);const fM=qe({arrowOffset:{type:Number,default:5}}),kte=K({name:"ElPopperArrow",inheritAttrs:!1}),Cte=K({...kte,props:fM,setup(e,{expose:t}){const n=e,o=Ae("popper"),{arrowOffset:r,arrowRef:s,arrowStyle:i}=Pe(uM,void 0);return ke(()=>n.arrowOffset,l=>{r.value=l}),bn(()=>{s.value=void 0}),t({arrowRef:s}),(l,a)=>(g(),k("span",{ref_key:"arrowRef",ref:s,class:F(S(o).e("arrow")),style:Be(S(i)),"data-popper-arrow":""},null,6))}});var Ste=Re(Cte,[["__file","arrow.vue"]]);const $te="ElOnlyChild",hM=K({name:$te,setup(e,{slots:t,attrs:n}){var o;const r=Pe(qT),s=uQ((o=r==null?void 0:r.setForwardRef)!=null?o:dt);return()=>{var i;const l=(i=t.default)==null?void 0:i.call(t,n);if(!l||l.length>1)return null;const a=pM(l);return a?Ve(rs(a,n),[[s]]):null}}});function pM(e){if(!e)return null;const t=e;for(const n of t){if(it(n))switch(n.type){case Vn:continue;case vi:case"svg":return Y6(n);case Q:return pM(n.children);default:return n}return Y6(n)}return null}function Y6(e){const t=Ae("only-child");return b("span",{class:t.e("content")},[e])}const mM=qe({virtualRef:{type:we(Object)},virtualTriggering:Boolean,onMouseenter:{type:we(Function)},onMouseleave:{type:we(Function)},onClick:{type:we(Function)},onKeydown:{type:we(Function)},onFocus:{type:we(Function)},onBlur:{type:we(Function)},onContextmenu:{type:we(Function)},id:String,open:Boolean}),Ete=K({name:"ElPopperTrigger",inheritAttrs:!1}),xte=K({...Ete,props:mM,setup(e,{expose:t}){const n=e,{role:o,triggerRef:r}=Pe(k3,void 0);cQ(r);const s=B(()=>l.value?n.id:void 0),i=B(()=>{if(o&&o.value==="tooltip")return n.open&&n.id?n.id:void 0}),l=B(()=>{if(o&&o.value!=="tooltip")return o.value}),a=B(()=>l.value?`${n.open}`:void 0);let c;return mt(()=>{ke(()=>n.virtualRef,u=>{u&&(r.value=di(u))},{immediate:!0}),ke(r,(u,d)=>{c==null||c(),c=void 0,is(u)&&(["onMouseenter","onMouseleave","onClick","onKeydown","onFocus","onBlur","onContextmenu"].forEach(f=>{var h;const p=n[f];p&&(u.addEventListener(f.slice(2).toLowerCase(),p),(h=d==null?void 0:d.removeEventListener)==null||h.call(d,f.slice(2).toLowerCase(),p))}),c=ke([s,i,l,a],f=>{["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach((h,p)=>{As(f[p])?u.removeAttribute(h):u.setAttribute(h,f[p])})},{immediate:!0})),is(d)&&["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach(f=>d.removeAttribute(f))},{immediate:!0})}),bn(()=>{c==null||c(),c=void 0}),t({triggerRef:r}),(u,d)=>u.virtualTriggering?O("v-if",!0):(g(),L(S(hM),pn({key:0},u.$attrs,{"aria-controls":S(s),"aria-describedby":S(i),"aria-expanded":S(a),"aria-haspopup":S(l)}),{default:x(()=>[le(u.$slots,"default")]),_:3},16,["aria-controls","aria-describedby","aria-expanded","aria-haspopup"]))}});var Tte=Re(xte,[["__file","trigger.vue"]]);const X_="focus-trap.focus-after-trapped",Q_="focus-trap.focus-after-released",Mte="focus-trap.focusout-prevented",J6={cancelable:!0,bubbles:!1},Ate={cancelable:!0,bubbles:!1},Z6="focusAfterTrapped",X6="focusAfterReleased",C3=Symbol("elFocusTrap"),S3=H(),D0=H(0),$3=H(0);let cm=0;const gM=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},Q6=(e,t)=>{for(const n of e)if(!Ote(n,t))return n},Ote=(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},Ite=e=>{const t=gM(e),n=Q6(t,e),o=Q6(t.reverse(),e);return[n,o]},Nte=e=>e instanceof HTMLInputElement&&"select"in e,Wi=(e,t)=>{if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),$3.value=window.performance.now(),e!==n&&Nte(e)&&t&&e.select()}};function e8(e,t){const n=[...e],o=e.indexOf(t);return o!==-1&&n.splice(o,1),n}const Pte=()=>{let e=[];return{push:o=>{const r=e[0];r&&o!==r&&r.pause(),e=e8(e,o),e.unshift(o)},remove:o=>{var r,s;e=e8(e,o),(s=(r=e[0])==null?void 0:r.resume)==null||s.call(r)}}},Lte=(e,t=!1)=>{const n=document.activeElement;for(const o of e)if(Wi(o,t),document.activeElement!==n)return},t8=Pte(),Rte=()=>D0.value>$3.value,um=()=>{S3.value="pointer",D0.value=window.performance.now()},n8=()=>{S3.value="keyboard",D0.value=window.performance.now()},Fte=()=>(mt(()=>{cm===0&&(document.addEventListener("mousedown",um),document.addEventListener("touchstart",um),document.addEventListener("keydown",n8)),cm++}),bn(()=>{cm--,cm<=0&&(document.removeEventListener("mousedown",um),document.removeEventListener("touchstart",um),document.removeEventListener("keydown",n8))}),{focusReason:S3,lastUserFocusTimestamp:D0,lastAutomatedFocusTimestamp:$3}),dm=e=>new CustomEvent(Mte,{...Ate,detail:e}),Dte=K({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[Z6,X6,"focusin","focusout","focusout-prevented","release-requested"],setup(e,{emit:t}){const n=H();let o,r;const{focusReason:s}=Fte();rQ(p=>{e.trapped&&!i.paused&&t("release-requested",p)});const i={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},l=p=>{if(!e.loop&&!e.trapped||i.paused)return;const{key:m,altKey:v,ctrlKey:y,metaKey:E,currentTarget:w,shiftKey:C}=p,{loop:T}=e,$=m===pt.tab&&!v&&!y&&!E,A=document.activeElement;if($&&A){const N=w,[P,I]=Ite(N);if(P&&I){if(!C&&A===I){const V=dm({focusReason:s.value});t("focusout-prevented",V),V.defaultPrevented||(p.preventDefault(),T&&Wi(P,!0))}else if(C&&[P,N].includes(A)){const V=dm({focusReason:s.value});t("focusout-prevented",V),V.defaultPrevented||(p.preventDefault(),T&&Wi(I,!0))}}else if(A===N){const V=dm({focusReason:s.value});t("focusout-prevented",V),V.defaultPrevented||p.preventDefault()}}};bt(C3,{focusTrapRef:n,onKeydown:l}),ke(()=>e.focusTrapEl,p=>{p&&(n.value=p)},{immediate:!0}),ke([n],([p],[m])=>{p&&(p.addEventListener("keydown",l),p.addEventListener("focusin",u),p.addEventListener("focusout",d)),m&&(m.removeEventListener("keydown",l),m.removeEventListener("focusin",u),m.removeEventListener("focusout",d))});const a=p=>{t(Z6,p)},c=p=>t(X6,p),u=p=>{const m=S(n);if(!m)return;const v=p.target,y=p.relatedTarget,E=v&&m.contains(v);e.trapped||y&&m.contains(y)||(o=y),E&&t("focusin",p),!i.paused&&e.trapped&&(E?r=v:Wi(r,!0))},d=p=>{const m=S(n);if(!(i.paused||!m))if(e.trapped){const v=p.relatedTarget;!As(v)&&!m.contains(v)&&setTimeout(()=>{if(!i.paused&&e.trapped){const y=dm({focusReason:s.value});t("focusout-prevented",y),y.defaultPrevented||Wi(r,!0)}},0)}else{const v=p.target;v&&m.contains(v)||t("focusout",p)}};async function f(){await tt();const p=S(n);if(p){t8.push(i);const m=p.contains(document.activeElement)?o:document.activeElement;if(o=m,!p.contains(m)){const y=new Event(X_,J6);p.addEventListener(X_,a),p.dispatchEvent(y),y.defaultPrevented||tt(()=>{let E=e.focusStartEl;je(E)||(Wi(E),document.activeElement!==E&&(E="first")),E==="first"&&Lte(gM(p),!0),(document.activeElement===m||E==="container")&&Wi(p)})}}}function h(){const p=S(n);if(p){p.removeEventListener(X_,a);const m=new CustomEvent(Q_,{...J6,detail:{focusReason:s.value}});p.addEventListener(Q_,c),p.dispatchEvent(m),!m.defaultPrevented&&(s.value=="keyboard"||!Rte()||p.contains(document.activeElement))&&Wi(o??document.body),p.removeEventListener(Q_,c),t8.remove(i)}}return mt(()=>{e.trapped&&f(),ke(()=>e.trapped,p=>{p?f():h()})}),bn(()=>{e.trapped&&h()}),{onKeydown:l}}});function Bte(e,t,n,o,r,s){return le(e.$slots,"default",{handleKeydown:e.onKeydown})}var B0=Re(Dte,[["render",Bte],["__file","focus-trap.vue"]]);const Vte=["fixed","absolute"],zte=qe({boundariesPadding:{type:Number,default:0},fallbackPlacements:{type:we(Array),default:void 0},gpuAcceleration:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:String,values:I0,default:"bottom"},popperOptions:{type:we(Object),default:()=>({})},strategy:{type:String,values:Vte,default:"absolute"}}),_M=qe({...zte,id:String,style:{type:we([String,Array,Object])},className:{type:we([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:we([String,Array,Object])},popperStyle:{type:we([String,Array,Object])},referenceEl:{type:we(Object)},triggerTargetEl:{type:we(Object)},stopPopperMouseEvent:{type:Boolean,default:!0},ariaLabel:{type:String,default:void 0},virtualTriggering:Boolean,zIndex:Number}),jte={mouseenter:e=>e instanceof MouseEvent,mouseleave:e=>e instanceof MouseEvent,focus:()=>!0,blur:()=>!0,close:()=>!0},Hte=(e,t=[])=>{const{placement:n,strategy:o,popperOptions:r}=e,s={placement:n,strategy:o,...r,modifiers:[...Wte(e),...t]};return qte(s,r==null?void 0:r.modifiers),s},Ute=e=>{if(kt)return di(e)};function Wte(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 qte(e,t){t&&(e.modifiers=[...e.modifiers,...t??[]])}const Kte=0,Gte=e=>{const{popperInstanceRef:t,contentRef:n,triggerRef:o,role:r}=Pe(k3,void 0),s=H(),i=H(),l=B(()=>({name:"eventListeners",enabled:!!e.visible})),a=B(()=>{var y;const E=S(s),w=(y=S(i))!=null?y:Kte;return{name:"arrow",enabled:!aT(E),options:{element:E,padding:w}}}),c=B(()=>({onFirstUpdate:()=>{p()},...Hte(e,[S(a),S(l)])})),u=B(()=>Ute(e.referenceEl)||S(o)),{attributes:d,state:f,styles:h,update:p,forceUpdate:m,instanceRef:v}=eQ(u,n,c);return ke(v,y=>t.value=y),mt(()=>{ke(()=>{var y;return(y=S(u))==null?void 0:y.getBoundingClientRect()},()=>{p()})}),{attributes:d,arrowRef:s,contentRef:n,instanceRef:v,state:f,styles:h,role:r,forceUpdate:m,update:p}},Yte=(e,{attributes:t,styles:n,role:o})=>{const{nextZIndex:r}=P0(),s=Ae("popper"),i=B(()=>S(t).popper),l=H(Et(e.zIndex)?e.zIndex:r()),a=B(()=>[s.b(),s.is("pure",e.pure),s.is(e.effect),e.popperClass]),c=B(()=>[{zIndex:S(l)},S(n).popper,e.popperStyle||{}]),u=B(()=>o.value==="dialog"?"false":void 0),d=B(()=>S(n).arrow||{});return{ariaModal:u,arrowStyle:d,contentAttrs:i,contentClass:a,contentStyle:c,contentZIndex:l,updateZIndex:()=>{l.value=Et(e.zIndex)?e.zIndex:r()}}},Jte=(e,t)=>{const n=H(!1),o=H();return{focusStartRef:o,trapped:n,onFocusAfterReleased:c=>{var u;((u=c.detail)==null?void 0:u.focusReason)!=="pointer"&&(o.value="first",t("blur"))},onFocusAfterTrapped:()=>{t("focus")},onFocusInTrap:c=>{e.visible&&!n.value&&(c.target&&(o.value=c.target),n.value=!0)},onFocusoutPrevented:c=>{e.trapping||(c.detail.focusReason==="pointer"&&c.preventDefault(),n.value=!1)},onReleaseRequested:()=>{n.value=!1,t("close")}}},Zte=K({name:"ElPopperContent"}),Xte=K({...Zte,props:_M,emits:jte,setup(e,{expose:t,emit:n}){const o=e,{focusStartRef:r,trapped:s,onFocusAfterReleased:i,onFocusAfterTrapped:l,onFocusInTrap:a,onFocusoutPrevented:c,onReleaseRequested:u}=Jte(o,n),{attributes:d,arrowRef:f,contentRef:h,styles:p,instanceRef:m,role:v,update:y}=Gte(o),{ariaModal:E,arrowStyle:w,contentAttrs:C,contentClass:T,contentStyle:$,updateZIndex:A}=Yte(o,{styles:p,attributes:d,role:v}),N=Pe(nc,void 0),P=H();bt(uM,{arrowStyle:w,arrowRef:f,arrowOffset:P}),N&&(N.addInputId||N.removeInputId)&&bt(nc,{...N,addInputId:dt,removeInputId:dt});let I;const D=(G=!0)=>{y(),G&&A()},V=()=>{D(!1),o.visible&&o.focusOnShow?s.value=!0:o.visible===!1&&(s.value=!1)};return mt(()=>{ke(()=>o.triggerTargetEl,(G,te)=>{I==null||I(),I=void 0;const oe=S(G||h.value),J=S(te||h.value);is(oe)&&(I=ke([v,()=>o.ariaLabel,E,()=>o.id],q=>{["role","aria-label","aria-modal","id"].forEach((X,ee)=>{As(q[ee])?oe.removeAttribute(X):oe.setAttribute(X,q[ee])})},{immediate:!0})),J!==oe&&is(J)&&["role","aria-label","aria-modal","id"].forEach(q=>{J.removeAttribute(q)})},{immediate:!0}),ke(()=>o.visible,V,{immediate:!0})}),bn(()=>{I==null||I(),I=void 0}),t({popperContentRef:h,popperInstanceRef:m,updatePopper:D,contentStyle:$}),(G,te)=>(g(),k("div",pn({ref_key:"contentRef",ref:h},S(C),{style:S($),class:S(T),tabindex:"-1",onMouseenter:te[0]||(te[0]=oe=>G.$emit("mouseenter",oe)),onMouseleave:te[1]||(te[1]=oe=>G.$emit("mouseleave",oe))}),[b(S(B0),{trapped:S(s),"trap-on-focus-in":!0,"focus-trap-el":S(h),"focus-start-el":S(r),onFocusAfterTrapped:S(l),onFocusAfterReleased:S(i),onFocusin:S(a),onFocusoutPrevented:S(c),onReleaseRequested:S(u)},{default:x(()=>[le(G.$slots,"default")]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusin","onFocusoutPrevented","onReleaseRequested"])],16))}});var Qte=Re(Xte,[["__file","content.vue"]]);const ene=zt(wte),E3=Symbol("elTooltip"),Xo=qe({...lQ,..._M,appendTo:{type:we([String,Object])},content:{type:String,default:""},rawContent:{type:Boolean,default:!1},persistent:Boolean,ariaLabel:String,visible:{type:we(Boolean),default:null},transition:String,teleported:{type:Boolean,default:!0},disabled:Boolean}),Nh=qe({...mM,disabled:Boolean,trigger:{type:we([String,Array]),default:"hover"},triggerKeys:{type:we(Array),default:()=>[pt.enter,pt.space]}}),{useModelToggleProps:tne,useModelToggleEmits:nne,useModelToggle:one}=OT("visible"),rne=qe({...dM,...tne,...Xo,...Nh,...fM,showArrow:{type:Boolean,default:!0}}),sne=[...nne,"before-show","before-hide","show","hide","open","close"],ine=(e,t)=>Ee(e)?e.includes(t):e===t,Tc=(e,t,n)=>o=>{ine(S(e),t)&&n(o)},lne=K({name:"ElTooltipTrigger"}),ane=K({...lne,props:Nh,setup(e,{expose:t}){const n=e,o=Ae("tooltip"),{controlled:r,id:s,open:i,onOpen:l,onClose:a,onToggle:c}=Pe(E3,void 0),u=H(null),d=()=>{if(S(r)||n.disabled)return!0},f=Nn(n,"trigger"),h=En(d,Tc(f,"hover",l)),p=En(d,Tc(f,"hover",a)),m=En(d,Tc(f,"click",C=>{C.button===0&&c(C)})),v=En(d,Tc(f,"focus",l)),y=En(d,Tc(f,"focus",a)),E=En(d,Tc(f,"contextmenu",C=>{C.preventDefault(),c(C)})),w=En(d,C=>{const{code:T}=C;n.triggerKeys.includes(T)&&(C.preventDefault(),c(C))});return t({triggerRef:u}),(C,T)=>(g(),L(S(Tte),{id:S(s),"virtual-ref":C.virtualRef,open:S(i),"virtual-triggering":C.virtualTriggering,class:F(S(o).e("trigger")),onBlur:S(y),onClick:S(m),onContextmenu:S(E),onFocus:S(v),onMouseenter:S(h),onMouseleave:S(p),onKeydown:S(w)},{default:x(()=>[le(C.$slots,"default")]),_:3},8,["id","virtual-ref","open","virtual-triggering","class","onBlur","onClick","onContextmenu","onFocus","onMouseenter","onMouseleave","onKeydown"]))}});var cne=Re(ane,[["__file","trigger.vue"]]);const une=K({name:"ElTooltipContent",inheritAttrs:!1}),dne=K({...une,props:Xo,setup(e,{expose:t}){const n=e,{selector:o}=WT(),r=Ae("tooltip"),s=H(null),i=H(!1),{controlled:l,id:a,open:c,trigger:u,onClose:d,onOpen:f,onShow:h,onHide:p,onBeforeShow:m,onBeforeHide:v}=Pe(E3,void 0),y=B(()=>n.transition||`${r.namespace.value}-fade-in-linear`),E=B(()=>n.persistent);bn(()=>{i.value=!0});const w=B(()=>S(E)?!0:S(c)),C=B(()=>n.disabled?!1:S(c)),T=B(()=>n.appendTo||o.value),$=B(()=>{var q;return(q=n.style)!=null?q:{}}),A=B(()=>!S(c)),N=()=>{p()},P=()=>{if(S(l))return!0},I=En(P,()=>{n.enterable&&S(u)==="hover"&&f()}),D=En(P,()=>{S(u)==="hover"&&d()}),V=()=>{var q,X;(X=(q=s.value)==null?void 0:q.updatePopper)==null||X.call(q),m==null||m()},G=()=>{v==null||v()},te=()=>{h(),J=gH(B(()=>{var q;return(q=s.value)==null?void 0:q.popperContentRef}),()=>{if(S(l))return;S(u)!=="hover"&&d()})},oe=()=>{n.virtualTriggering||d()};let J;return ke(()=>S(c),q=>{q||J==null||J()},{flush:"post"}),ke(()=>n.content,()=>{var q,X;(X=(q=s.value)==null?void 0:q.updatePopper)==null||X.call(q)}),t({contentRef:s}),(q,X)=>(g(),L(sr,{disabled:!q.teleported,to:S(T)},[b(ur,{name:S(y),onAfterLeave:N,onBeforeEnter:V,onAfterEnter:te,onBeforeLeave:G},{default:x(()=>[S(w)?Ve((g(),L(S(Qte),pn({key:0,id:S(a),ref_key:"contentRef",ref:s},q.$attrs,{"aria-label":q.ariaLabel,"aria-hidden":S(A),"boundaries-padding":q.boundariesPadding,"fallback-placements":q.fallbackPlacements,"gpu-acceleration":q.gpuAcceleration,offset:q.offset,placement:q.placement,"popper-options":q.popperOptions,strategy:q.strategy,effect:q.effect,enterable:q.enterable,pure:q.pure,"popper-class":q.popperClass,"popper-style":[q.popperStyle,S($)],"reference-el":q.referenceEl,"trigger-target-el":q.triggerTargetEl,visible:S(C),"z-index":q.zIndex,onMouseenter:S(I),onMouseleave:S(D),onBlur:oe,onClose:S(d)}),{default:x(()=>[i.value?O("v-if",!0):le(q.$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"])),[[sn,S(C)]]):O("v-if",!0)]),_:3},8,["name"])],8,["disabled","to"]))}});var fne=Re(dne,[["__file","content.vue"]]);const hne=["innerHTML"],pne={key:1},mne=K({name:"ElTooltip"}),gne=K({...mne,props:rne,emits:sne,setup(e,{expose:t,emit:n}){const o=e;iQ();const r=Lr(),s=H(),i=H(),l=()=>{var y;const E=S(s);E&&((y=E.popperInstanceRef)==null||y.update())},a=H(!1),c=H(),{show:u,hide:d,hasUpdateHandler:f}=one({indicator:a,toggleReason:c}),{onOpen:h,onClose:p}=aQ({showAfter:Nn(o,"showAfter"),hideAfter:Nn(o,"hideAfter"),autoClose:Nn(o,"autoClose"),open:u,close:d}),m=B(()=>ao(o.visible)&&!f.value);bt(E3,{controlled:m,id:r,open:dc(a),trigger:Nn(o,"trigger"),onOpen:y=>{h(y)},onClose:y=>{p(y)},onToggle:y=>{S(a)?p(y):h(y)},onShow:()=>{n("show",c.value)},onHide:()=>{n("hide",c.value)},onBeforeShow:()=>{n("before-show",c.value)},onBeforeHide:()=>{n("before-hide",c.value)},updatePopper:l}),ke(()=>o.disabled,y=>{y&&a.value&&(a.value=!1)});const v=y=>{var E,w;const C=(w=(E=i.value)==null?void 0:E.contentRef)==null?void 0:w.popperContentRef,T=(y==null?void 0:y.relatedTarget)||document.activeElement;return C&&C.contains(T)};return aw(()=>a.value&&d()),t({popperRef:s,contentRef:i,isFocusInsideContent:v,updatePopper:l,onOpen:h,onClose:p,hide:d}),(y,E)=>(g(),L(S(ene),{ref_key:"popperRef",ref:s,role:y.role},{default:x(()=>[b(cne,{disabled:y.disabled,trigger:y.trigger,"trigger-keys":y.triggerKeys,"virtual-ref":y.virtualRef,"virtual-triggering":y.virtualTriggering},{default:x(()=>[y.$slots.default?le(y.$slots,"default",{key:0}):O("v-if",!0)]),_:3},8,["disabled","trigger","trigger-keys","virtual-ref","virtual-triggering"]),b(fne,{ref_key:"contentRef",ref:i,"aria-label":y.ariaLabel,"boundaries-padding":y.boundariesPadding,content:y.content,disabled:y.disabled,effect:y.effect,enterable:y.enterable,"fallback-placements":y.fallbackPlacements,"hide-after":y.hideAfter,"gpu-acceleration":y.gpuAcceleration,offset:y.offset,persistent:y.persistent,"popper-class":y.popperClass,"popper-style":y.popperStyle,placement:y.placement,"popper-options":y.popperOptions,pure:y.pure,"raw-content":y.rawContent,"reference-el":y.referenceEl,"trigger-target-el":y.triggerTargetEl,"show-after":y.showAfter,strategy:y.strategy,teleported:y.teleported,transition:y.transition,"virtual-triggering":y.virtualTriggering,"z-index":y.zIndex,"append-to":y.appendTo},{default:x(()=>[le(y.$slots,"content",{},()=>[y.rawContent?(g(),k("span",{key:0,innerHTML:y.content},null,8,hne)):(g(),k("span",pne,M(y.content),1))]),y.showArrow?(g(),L(S(Ste),{key:0,"arrow-offset":y.arrowOffset},null,8,["arrow-offset"])):O("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 _ne=Re(gne,[["__file","tooltip.vue"]]);const dd=zt(_ne),vne=qe({value:{type:[String,Number],default:""},max:{type:Number,default:99},isDot:Boolean,hidden:Boolean,type:{type:String,values:["primary","success","warning","info","danger"],default:"danger"},showZero:{type:Boolean,default:!0},color:String,dotStyle:{type:we([String,Object,Array])},offset:{type:we(Array),default:[0,0]},dotClass:{type:String}}),yne=["textContent"],bne=K({name:"ElBadge"}),wne=K({...bne,props:vne,setup(e,{expose:t}){const n=e,o=Ae("badge"),r=B(()=>n.isDot?"":Et(n.value)&&Et(n.max)?n.max<n.value?`${n.max}+`:n.value===0&&!n.showZero?"":`${n.value}`:`${n.value}`),s=B(()=>{var i,l,a,c,u;return[{backgroundColor:n.color,marginRight:fo(-((l=(i=n.offset)==null?void 0:i[0])!=null?l:0)),marginTop:fo((c=(a=n.offset)==null?void 0:a[1])!=null?c:0)},(u=n.dotStyle)!=null?u:{}]});return t({content:r}),(i,l)=>(g(),k("div",{class:F(S(o).b())},[le(i.$slots,"default"),b(ur,{name:`${S(o).namespace.value}-zoom-in-center`,persisted:""},{default:x(()=>[Ve(_("sup",{class:F([S(o).e("content"),S(o).em("content",i.type),S(o).is("fixed",!!i.$slots.default),S(o).is("dot",i.isDot),i.dotClass]),style:Be(S(s)),textContent:M(S(r))},null,14,yne),[[sn,!i.hidden&&(S(r)||i.isDot)]])]),_:1},8,["name"])],2))}});var kne=Re(wne,[["__file","badge.vue"]]);const vM=zt(kne),yM=Symbol("breadcrumbKey"),Cne=qe({separator:{type:String,default:"/"},separatorIcon:{type:Pn}}),Sne=["aria-label"],$ne=K({name:"ElBreadcrumb"}),Ene=K({...$ne,props:Cne,setup(e){const t=e,{t:n}=Fn(),o=Ae("breadcrumb"),r=H();return bt(yM,t),mt(()=>{const s=r.value.querySelectorAll(`.${o.e("item")}`);s.length&&s[s.length-1].setAttribute("aria-current","page")}),(s,i)=>(g(),k("div",{ref_key:"breadcrumb",ref:r,class:F(S(o).b()),"aria-label":S(n)("el.breadcrumb.label"),role:"navigation"},[le(s.$slots,"default")],10,Sne))}});var xne=Re(Ene,[["__file","breadcrumb.vue"]]);const Tne=qe({to:{type:we([String,Object]),default:""},replace:{type:Boolean,default:!1}}),Mne=K({name:"ElBreadcrumbItem"}),Ane=K({...Mne,props:Tne,setup(e){const t=e,n=nt(),o=Pe(yM,void 0),r=Ae("breadcrumb"),s=n.appContext.config.globalProperties.$router,i=H(),l=()=>{!t.to||!s||(t.replace?s.replace(t.to):s.push(t.to))};return(a,c)=>{var u,d;return g(),k("span",{class:F(S(r).e("item"))},[_("span",{ref_key:"link",ref:i,class:F([S(r).e("inner"),S(r).is("link",!!a.to)]),role:"link",onClick:l},[le(a.$slots,"default")],2),(u=S(o))!=null&&u.separatorIcon?(g(),L(S(ve),{key:0,class:F(S(r).e("separator"))},{default:x(()=>[(g(),L(xt(S(o).separatorIcon)))]),_:1},8,["class"])):(g(),k("span",{key:1,class:F(S(r).e("separator")),role:"presentation"},M((d=S(o))==null?void 0:d.separator),3))],2)}}});var bM=Re(Ane,[["__file","breadcrumb-item.vue"]]);const x3=zt(xne,{BreadcrumbItem:bM}),T3=Hn(bM),wM=Symbol("buttonGroupContextKey"),One=(e,t)=>{Ra({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},B(()=>e.type==="text"));const n=Pe(wM,void 0),o=dp("button"),{form:r}=Ti(),s=ar(B(()=>n==null?void 0:n.size)),i=fs(),l=H(),a=Ws(),c=B(()=>e.type||(n==null?void 0:n.type)||""),u=B(()=>{var p,m,v;return(v=(m=e.autoInsertSpace)!=null?m:(p=o.value)==null?void 0:p.autoInsertSpace)!=null?v:!1}),d=B(()=>e.tag==="button"?{ariaDisabled:i.value||e.loading,disabled:i.value||e.loading,autofocus:e.autofocus,type:e.nativeType}:{}),f=B(()=>{var p;const m=(p=a.default)==null?void 0:p.call(a);if(u.value&&(m==null?void 0:m.length)===1){const v=m[0];if((v==null?void 0:v.type)===vi){const y=v.children;return/^\p{Unified_Ideograph}{2}$/u.test(y.trim())}}return!1});return{_disabled:i,_size:s,_type:c,_ref:l,_props:d,shouldAddSpace:f,handleClick:p=>{e.nativeType==="reset"&&(r==null||r.resetFields()),t("click",p)}}},Ine=["default","primary","success","warning","info","danger","text",""],Nne=["button","submit","reset"],i2=qe({size:xi,disabled:Boolean,type:{type:String,values:Ine,default:""},icon:{type:Pn},nativeType:{type:String,values:Nne,default:"button"},loading:Boolean,loadingIcon:{type:Pn,default:()=>A0},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:we([String,Object]),default:"button"}}),Pne={click:e=>e instanceof MouseEvent};function Qn(e,t){Lne(e)&&(e="100%");var n=Rne(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 fm(e){return Math.min(1,Math.max(0,e))}function Lne(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Rne(e){return typeof e=="string"&&e.indexOf("%")!==-1}function kM(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function hm(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Sa(e){return e.length===1?"0"+e:String(e)}function Fne(e,t,n){return{r:Qn(e,255)*255,g:Qn(t,255)*255,b:Qn(n,255)*255}}function o8(e,t,n){e=Qn(e,255),t=Qn(t,255),n=Qn(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 ev(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 Dne(e,t,n){var o,r,s;if(e=Qn(e,360),t=Qn(t,100),n=Qn(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=ev(l,i,e+1/3),r=ev(l,i,e),s=ev(l,i,e-1/3)}return{r:o*255,g:r*255,b:s*255}}function r8(e,t,n){e=Qn(e,255),t=Qn(t,255),n=Qn(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 Bne(e,t,n){e=Qn(e,360)*6,t=Qn(t,100),n=Qn(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,c=[n,i,s,s,l,n][a],u=[l,n,n,i,s,s][a],d=[s,s,l,n,n,i][a];return{r:c*255,g:u*255,b:d*255}}function s8(e,t,n,o){var r=[Sa(Math.round(e).toString(16)),Sa(Math.round(t).toString(16)),Sa(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 Vne(e,t,n,o,r){var s=[Sa(Math.round(e).toString(16)),Sa(Math.round(t).toString(16)),Sa(Math.round(n).toString(16)),Sa(zne(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 zne(e){return Math.round(parseFloat(e)*255).toString(16)}function i8(e){return Ko(e)/255}function Ko(e){return parseInt(e,16)}function jne(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var l2={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 Hne(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=qne(e)),typeof e=="object"&&(Qs(e.r)&&Qs(e.g)&&Qs(e.b)?(t=Fne(e.r,e.g,e.b),i=!0,l=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Qs(e.h)&&Qs(e.s)&&Qs(e.v)?(o=hm(e.s),r=hm(e.v),t=Bne(e.h,o,r),i=!0,l="hsv"):Qs(e.h)&&Qs(e.s)&&Qs(e.l)&&(o=hm(e.s),s=hm(e.l),t=Dne(e.h,o,s),i=!0,l="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=kM(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 Une="[-\\+]?\\d+%?",Wne="[-\\+]?\\d*\\.\\d+%?",bl="(?:".concat(Wne,")|(?:").concat(Une,")"),tv="[\\s|\\(]+(".concat(bl,")[,|\\s]+(").concat(bl,")[,|\\s]+(").concat(bl,")\\s*\\)?"),nv="[\\s|\\(]+(".concat(bl,")[,|\\s]+(").concat(bl,")[,|\\s]+(").concat(bl,")[,|\\s]+(").concat(bl,")\\s*\\)?"),jr={CSS_UNIT:new RegExp(bl),rgb:new RegExp("rgb"+tv),rgba:new RegExp("rgba"+nv),hsl:new RegExp("hsl"+tv),hsla:new RegExp("hsla"+nv),hsv:new RegExp("hsv"+tv),hsva:new RegExp("hsva"+nv),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 qne(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(l2[e])e=l2[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=jr.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=jr.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=jr.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=jr.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=jr.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=jr.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=jr.hex8.exec(e),n?{r:Ko(n[1]),g:Ko(n[2]),b:Ko(n[3]),a:i8(n[4]),format:t?"name":"hex8"}:(n=jr.hex6.exec(e),n?{r:Ko(n[1]),g:Ko(n[2]),b:Ko(n[3]),format:t?"name":"hex"}:(n=jr.hex4.exec(e),n?{r:Ko(n[1]+n[1]),g:Ko(n[2]+n[2]),b:Ko(n[3]+n[3]),a:i8(n[4]+n[4]),format:t?"name":"hex8"}:(n=jr.hex3.exec(e),n?{r:Ko(n[1]+n[1]),g:Ko(n[2]+n[2]),b:Ko(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function Qs(e){return!!jr.CSS_UNIT.exec(String(e))}var Kne=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=jne(t)),this.originalInput=t;var r=Hne(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=kM(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=r8(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=r8(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=o8(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=o8(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),s8(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),Vne(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(Qn(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(Qn(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="#"+s8(this.r,this.g,this.b,!1),n=0,o=Object.entries(l2);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=fm(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=fm(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=fm(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=fm(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 zi(e,t=20){return e.mix("#141414",t).toString()}function Gne(e){const t=fs(),n=Ae("button");return B(()=>{let o={};const r=e.color;if(r){const s=new Kne(r),i=e.dark?s.tint(20).toString():zi(s,20);if(e.plain)o=n.cssVarBlock({"bg-color":e.dark?zi(s,90):s.tint(90).toString(),"text-color":r,"border-color":e.dark?zi(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?zi(s,90):s.tint(90).toString(),o[n.cssVarBlockName("disabled-text-color")]=e.dark?zi(s,50):s.tint(50).toString(),o[n.cssVarBlockName("disabled-border-color")]=e.dark?zi(s,80):s.tint(80).toString());else{const l=e.dark?zi(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 c=e.dark?zi(s,50):s.tint(50).toString();o[n.cssVarBlockName("disabled-bg-color")]=c,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")]=c}}}return o})}const Yne=K({name:"ElButton"}),Jne=K({...Yne,props:i2,emits:Pne,setup(e,{expose:t,emit:n}){const o=e,r=Gne(o),s=Ae("button"),{_ref:i,_size:l,_type:a,_disabled:c,_props:u,shouldAddSpace:d,handleClick:f}=One(o,n),h=B(()=>[s.b(),s.m(a.value),s.m(l.value),s.is("disabled",c.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:c,shouldAddSpace:d}),(p,m)=>(g(),L(xt(p.tag),pn({ref_key:"_ref",ref:i},S(u),{class:S(h),style:S(r),onClick:S(f)}),{default:x(()=>[p.loading?(g(),k(Q,{key:0},[p.$slots.loading?le(p.$slots,"loading",{key:0}):(g(),L(S(ve),{key:1,class:F(S(s).is("loading"))},{default:x(()=>[(g(),L(xt(p.loadingIcon)))]),_:1},8,["class"]))],64)):p.icon||p.$slots.icon?(g(),L(S(ve),{key:1},{default:x(()=>[p.icon?(g(),L(xt(p.icon),{key:0})):le(p.$slots,"icon",{key:1})]),_:3})):O("v-if",!0),p.$slots.default?(g(),k("span",{key:2,class:F({[S(s).em("text","expand")]:S(d)})},[le(p.$slots,"default")],2)):O("v-if",!0)]),_:3},16,["class","style","onClick"]))}});var Zne=Re(Jne,[["__file","button.vue"]]);const Xne={size:i2.size,type:i2.type},Qne=K({name:"ElButtonGroup"}),eoe=K({...Qne,props:Xne,setup(e){const t=e;bt(wM,jn({size:Nn(t,"size"),type:Nn(t,"type")}));const n=Ae("button");return(o,r)=>(g(),k("div",{class:F(`${S(n).b("group")}`)},[le(o.$slots,"default")],2))}});var CM=Re(eoe,[["__file","button-group.vue"]]);const Ze=zt(Zne,{ButtonGroup:CM});Hn(CM);var $r=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function jl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}const qi=new Map;let l8;kt&&(document.addEventListener("mousedown",e=>l8=e),document.addEventListener("mouseup",e=>{for(const t of qi.values())for(const{documentHandler:n}of t)n(e,l8)}));function a8(e,t){let n=[];return Array.isArray(t.arg)?n=t.arg:is(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,c=!i||!l,u=e.contains(i)||e.contains(l),d=e===i,f=n.length&&n.some(p=>p==null?void 0:p.contains(i))||n.length&&n.includes(l),h=s&&(s.contains(i)||s.contains(l));a||c||u||d||f||h||t.value(o,r)}}const M3={beforeMount(e,t){qi.has(e)||qi.set(e,[]),qi.get(e).push({documentHandler:a8(e,t),bindingFn:t.value})},updated(e,t){qi.has(e)||qi.set(e,[]);const n=qi.get(e),o=n.findIndex(s=>s.bindingFn===t.oldValue),r={documentHandler:a8(e,t),bindingFn:t.value};o>=0?n.splice(o,1,r):n.push(r)},unmounted(e){qi.delete(e)}},a2="_trap-focus-children",$a=[],c8=e=>{if($a.length===0)return;const t=$a[$a.length-1][a2];if(t.length>0&&e.code===pt.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())}},toe={beforeMount(e){e[a2]=T5(e),$a.push(e),$a.length<=1&&document.addEventListener("keydown",c8)},updated(e){tt(()=>{e[a2]=T5(e)})},unmounted(){$a.shift(),$a.length===0&&document.removeEventListener("keydown",c8)}};var u8=!1,_a,c2,u2,Ym,Jm,SM,Zm,d2,f2,h2,$M,p2,m2,EM,xM;function xo(){if(!u8){u8=!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(p2=/\b(iPhone|iP[ao]d)/.exec(e),m2=/\b(iP[ao]d)/.exec(e),h2=/Android/i.exec(e),EM=/FBAN\/\w+;/i.exec(e),xM=/Mobile/i.exec(e),$M=!!/Win64/.exec(e),t){_a=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN,_a&&document&&document.documentMode&&(_a=document.documentMode);var o=/(?:Trident\/(\d+.\d+))/.exec(e);SM=o?parseFloat(o[1])+4:_a,c2=t[2]?parseFloat(t[2]):NaN,u2=t[3]?parseFloat(t[3]):NaN,Ym=t[4]?parseFloat(t[4]):NaN,Ym?(t=/(?:Chrome\/(\d+\.\d+))/.exec(e),Jm=t&&t[1]?parseFloat(t[1]):NaN):Jm=NaN}else _a=c2=u2=Jm=Ym=NaN;if(n){if(n[1]){var r=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);Zm=r?parseFloat(r[1].replace("_",".")):!0}else Zm=!1;d2=!!n[2],f2=!!n[3]}else Zm=d2=f2=!1}}var g2={ie:function(){return xo()||_a},ieCompatibilityMode:function(){return xo()||SM>_a},ie64:function(){return g2.ie()&&$M},firefox:function(){return xo()||c2},opera:function(){return xo()||u2},webkit:function(){return xo()||Ym},safari:function(){return g2.webkit()},chrome:function(){return xo()||Jm},windows:function(){return xo()||d2},osx:function(){return xo()||Zm},linux:function(){return xo()||f2},iphone:function(){return xo()||p2},mobile:function(){return xo()||p2||m2||h2||xM},nativeApp:function(){return xo()||EM},android:function(){return xo()||h2},ipad:function(){return xo()||m2}},noe=g2,pm=!!(typeof window<"u"&&window.document&&window.document.createElement),ooe={canUseDOM:pm,canUseWorkers:typeof Worker<"u",canUseEventListeners:pm&&!!(window.addEventListener||window.attachEvent),canUseViewport:pm&&!!window.screen,isInWorker:!pm},TM=ooe,MM;TM.canUseDOM&&(MM=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);function roe(e,t){if(!TM.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&&MM&&e==="wheel"&&(o=document.implementation.hasFeature("Events.wheel","3.0")),o}var soe=roe,d8=10,f8=40,h8=800;function AM(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*d8,r=n*d8,"deltaY"in e&&(r=e.deltaY),"deltaX"in e&&(o=e.deltaX),(o||r)&&e.deltaMode&&(e.deltaMode==1?(o*=f8,r*=f8):(o*=h8,r*=h8)),o&&!t&&(t=o<1?-1:1),r&&!n&&(n=r<1?-1:1),{spinX:t,spinY:n,pixelX:o,pixelY:r}}AM.getEventType=function(){return noe.firefox()?"DOMMouseScroll":soe("wheel")?"wheel":"mousewheel"};var ioe=AM;/** |
| 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 loe=function(e,t){if(e&&e.addEventListener){const n=function(o){const r=ioe(o);t&&Reflect.apply(t,this,[o,r])};e.addEventListener("wheel",n,{passive:!0})}},aoe={beforeMount(e,t){loe(e,t.value)}},OM={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:xi,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0}},IM={[Wt]:e=>je(e)||Et(e)||ao(e),change:e=>je(e)||Et(e)||ao(e)},fd=Symbol("checkboxGroupContextKey"),coe=({model:e,isChecked:t})=>{const n=Pe(fd,void 0),o=B(()=>{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!bi(l)&&e.value.length>=l&&!t.value||!bi(a)&&e.value.length<=a&&t.value});return{isDisabled:fs(B(()=>(n==null?void 0:n.disabled.value)||o.value)),isLimitDisabled:o}},uoe=(e,{model:t,isLimitExceeded:n,hasOwnLabel:o,isDisabled:r,isLabeledByFormItem:s})=>{const i=Pe(fd,void 0),{formItem:l}=Ti(),{emit:a}=nt();function c(p){var m,v,y,E;return[!0,e.trueValue,e.trueLabel].includes(p)?(v=(m=e.trueValue)!=null?m:e.trueLabel)!=null?v:!0:(E=(y=e.falseValue)!=null?y:e.falseLabel)!=null?E:!1}function u(p,m){a("change",c(p),m)}function d(p){if(n.value)return;const m=p.target;a("change",c(m.checked),p)}async function f(p){n.value||!o.value&&!r.value&&s.value&&(p.composedPath().some(y=>y.tagName==="LABEL")||(t.value=c([!1,e.falseValue,e.falseLabel].includes(t.value)),await tt(),u(t.value,p)))}const h=B(()=>(i==null?void 0:i.validateEvent)||e.validateEvent);return ke(()=>e.modelValue,()=>{h.value&&(l==null||l.validate("change").catch(p=>void 0))}),{handleChange:d,onClickRoot:f}},doe=e=>{const t=H(!1),{emit:n}=nt(),o=Pe(fd,void 0),r=B(()=>bi(o)===!1),s=H(!1),i=B({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,c;r.value&&Ee(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&&((c=o==null?void 0:o.changeEvent)==null||c.call(o,l))):(n(Wt,l),t.value=l)}});return{model:i,isGroup:r,isLimitExceeded:s}},foe=(e,t,{model:n})=>{const o=Pe(fd,void 0),r=H(!1),s=B(()=>Th(e.value)?e.label:e.value),i=B(()=>{const u=n.value;return ao(u)?u:Ee(u)?it(s.value)?u.map(Ct).some(d=>Qa(d,s.value)):u.map(Ct).includes(s.value):u!=null?u===e.trueValue||u===e.trueLabel:!!u}),l=ar(B(()=>{var u;return(u=o==null?void 0:o.size)==null?void 0:u.value}),{prop:!0}),a=ar(B(()=>{var u;return(u=o==null?void 0:o.size)==null?void 0:u.value})),c=B(()=>!!t.default||!Th(s.value));return{checkboxButtonSize:l,isChecked:i,isFocused:r,checkboxSize:a,hasOwnLabel:c,actualValue:s}},NM=(e,t)=>{const{formItem:n}=Ti(),{model:o,isGroup:r,isLimitExceeded:s}=doe(e),{isFocused:i,isChecked:l,checkboxButtonSize:a,checkboxSize:c,hasOwnLabel:u,actualValue:d}=foe(e,t,{model:o}),{isDisabled:f}=coe({model:o,isChecked:l}),{inputId:h,isLabeledByFormItem:p}=_c(e,{formItemContext:n,disableIdGeneration:u,disableIdManagement:r}),{handleChange:m,onClickRoot:v}=uoe(e,{model:o,isLimitExceeded:s,hasOwnLabel:u,isDisabled:f,isLabeledByFormItem:p});return(()=>{function E(){var w,C;Ee(o.value)&&!o.value.includes(d.value)?o.value.push(d.value):o.value=(C=(w=e.trueValue)!=null?w:e.trueLabel)!=null?C:!0}e.checked&&E()})(),Ra({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},B(()=>r.value&&Th(e.value))),Ra({from:"true-label",replacement:"true-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},B(()=>!!e.trueLabel)),Ra({from:"false-label",replacement:"false-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},B(()=>!!e.falseLabel)),{inputId:h,isLabeledByFormItem:p,isChecked:l,isDisabled:f,isFocused:i,checkboxButtonSize:a,checkboxSize:c,hasOwnLabel:u,model:o,actualValue:d,handleChange:m,onClickRoot:v}},hoe=["id","indeterminate","name","tabindex","disabled","true-value","false-value"],poe=["id","indeterminate","disabled","value","name","tabindex"],moe=K({name:"ElCheckbox"}),goe=K({...moe,props:OM,emits:IM,setup(e){const t=e,n=Ws(),{inputId:o,isLabeledByFormItem:r,isChecked:s,isDisabled:i,isFocused:l,checkboxSize:a,hasOwnLabel:c,model:u,actualValue:d,handleChange:f,onClickRoot:h}=NM(t,n),p=Ae("checkbox"),m=B(()=>[p.b(),p.m(a.value),p.is("disabled",i.value),p.is("bordered",t.border),p.is("checked",s.value)]),v=B(()=>[p.e("input"),p.is("disabled",i.value),p.is("checked",s.value),p.is("indeterminate",t.indeterminate),p.is("focus",l.value)]);return(y,E)=>(g(),L(xt(!S(c)&&S(r)?"span":"label"),{class:F(S(m)),"aria-controls":y.indeterminate?y.controls:null,onClick:S(h)},{default:x(()=>{var w,C;return[_("span",{class:F(S(v))},[y.trueValue||y.falseValue||y.trueLabel||y.falseLabel?Ve((g(),k("input",{key:0,id:S(o),"onUpdate:modelValue":E[0]||(E[0]=T=>Yt(u)?u.value=T:null),class:F(S(p).e("original")),type:"checkbox",indeterminate:y.indeterminate,name:y.name,tabindex:y.tabindex,disabled:S(i),"true-value":(w=y.trueValue)!=null?w:y.trueLabel,"false-value":(C=y.falseValue)!=null?C:y.falseLabel,onChange:E[1]||(E[1]=(...T)=>S(f)&&S(f)(...T)),onFocus:E[2]||(E[2]=T=>l.value=!0),onBlur:E[3]||(E[3]=T=>l.value=!1),onClick:E[4]||(E[4]=Ge(()=>{},["stop"]))},null,42,hoe)),[[Ya,S(u)]]):Ve((g(),k("input",{key:1,id:S(o),"onUpdate:modelValue":E[5]||(E[5]=T=>Yt(u)?u.value=T:null),class:F(S(p).e("original")),type:"checkbox",indeterminate:y.indeterminate,disabled:S(i),value:S(d),name:y.name,tabindex:y.tabindex,onChange:E[6]||(E[6]=(...T)=>S(f)&&S(f)(...T)),onFocus:E[7]||(E[7]=T=>l.value=!0),onBlur:E[8]||(E[8]=T=>l.value=!1),onClick:E[9]||(E[9]=Ge(()=>{},["stop"]))},null,42,poe)),[[Ya,S(u)]]),_("span",{class:F(S(p).e("inner"))},null,2)],2),S(c)?(g(),k("span",{key:0,class:F(S(p).e("label"))},[le(y.$slots,"default"),y.$slots.default?O("v-if",!0):(g(),k(Q,{key:0},[ne(M(y.label),1)],64))],2)):O("v-if",!0)]}),_:3},8,["class","aria-controls","onClick"]))}});var _oe=Re(goe,[["__file","checkbox.vue"]]);const voe=["name","tabindex","disabled","true-value","false-value"],yoe=["name","tabindex","disabled","value"],boe=K({name:"ElCheckboxButton"}),woe=K({...boe,props:OM,emits:IM,setup(e){const t=e,n=Ws(),{isFocused:o,isChecked:r,isDisabled:s,checkboxButtonSize:i,model:l,actualValue:a,handleChange:c}=NM(t,n),u=Pe(fd,void 0),d=Ae("checkbox"),f=B(()=>{var p,m,v,y;const E=(m=(p=u==null?void 0:u.fill)==null?void 0:p.value)!=null?m:"";return{backgroundColor:E,borderColor:E,color:(y=(v=u==null?void 0:u.textColor)==null?void 0:v.value)!=null?y:"",boxShadow:E?`-1px 0 0 0 ${E}`:void 0}}),h=B(()=>[d.b("button"),d.bm("button",i.value),d.is("disabled",s.value),d.is("checked",r.value),d.is("focus",o.value)]);return(p,m)=>{var v,y;return g(),k("label",{class:F(S(h))},[p.trueValue||p.falseValue||p.trueLabel||p.falseLabel?Ve((g(),k("input",{key:0,"onUpdate:modelValue":m[0]||(m[0]=E=>Yt(l)?l.value=E:null),class:F(S(d).be("button","original")),type:"checkbox",name:p.name,tabindex:p.tabindex,disabled:S(s),"true-value":(v=p.trueValue)!=null?v:p.trueLabel,"false-value":(y=p.falseValue)!=null?y:p.falseLabel,onChange:m[1]||(m[1]=(...E)=>S(c)&&S(c)(...E)),onFocus:m[2]||(m[2]=E=>o.value=!0),onBlur:m[3]||(m[3]=E=>o.value=!1),onClick:m[4]||(m[4]=Ge(()=>{},["stop"]))},null,42,voe)),[[Ya,S(l)]]):Ve((g(),k("input",{key:1,"onUpdate:modelValue":m[5]||(m[5]=E=>Yt(l)?l.value=E:null),class:F(S(d).be("button","original")),type:"checkbox",name:p.name,tabindex:p.tabindex,disabled:S(s),value:S(a),onChange:m[6]||(m[6]=(...E)=>S(c)&&S(c)(...E)),onFocus:m[7]||(m[7]=E=>o.value=!0),onBlur:m[8]||(m[8]=E=>o.value=!1),onClick:m[9]||(m[9]=Ge(()=>{},["stop"]))},null,42,yoe)),[[Ya,S(l)]]),p.$slots.default||p.label?(g(),k("span",{key:2,class:F(S(d).be("button","inner")),style:Be(S(r)?S(f):void 0)},[le(p.$slots,"default",{},()=>[ne(M(p.label),1)])],6)):O("v-if",!0)],2)}}});var PM=Re(woe,[["__file","checkbox-button.vue"]]);const koe=qe({modelValue:{type:we(Array),default:()=>[]},disabled:Boolean,min:Number,max:Number,size:xi,label:String,fill:String,textColor:String,tag:{type:String,default:"div"},validateEvent:{type:Boolean,default:!0}}),Coe={[Wt]:e=>Ee(e),change:e=>Ee(e)},Soe=K({name:"ElCheckboxGroup"}),$oe=K({...Soe,props:koe,emits:Coe,setup(e,{emit:t}){const n=e,o=Ae("checkbox"),{formItem:r}=Ti(),{inputId:s,isLabeledByFormItem:i}=_c(n,{formItemContext:r}),l=async c=>{t(Wt,c),await tt(),t("change",c)},a=B({get(){return n.modelValue},set(c){l(c)}});return bt(fd,{...IY(Hs(n),["size","min","max","disabled","validateEvent","fill","textColor"]),modelValue:a,changeEvent:l}),ke(()=>n.modelValue,()=>{n.validateEvent&&(r==null||r.validate("change").catch(c=>void 0))}),(c,u)=>{var d;return g(),L(xt(c.tag),{id:S(s),class:F(S(o).b("group")),role:"group","aria-label":S(i)?void 0:c.label||"checkbox-group","aria-labelledby":S(i)?(d=S(r))==null?void 0:d.labelId:void 0},{default:x(()=>[le(c.$slots,"default")]),_:3},8,["id","class","aria-label","aria-labelledby"])}}});var LM=Re($oe,[["__file","checkbox-group.vue"]]);const Fr=zt(_oe,{CheckboxButton:PM,CheckboxGroup:LM});Hn(PM);Hn(LM);const RM=qe({modelValue:{type:[String,Number,Boolean],default:void 0},size:xi,disabled:Boolean,label:{type:[String,Number,Boolean],default:void 0},value:{type:[String,Number,Boolean],default:void 0},name:{type:String,default:void 0}}),Eoe=qe({...RM,border:Boolean}),FM={[Wt]:e=>je(e)||Et(e)||ao(e),[tc]:e=>je(e)||Et(e)||ao(e)},DM=Symbol("radioGroupKey"),BM=(e,t)=>{const n=H(),o=Pe(DM,void 0),r=B(()=>!!o),s=B(()=>Th(e.value)?e.label:e.value),i=B({get(){return r.value?o.modelValue:e.modelValue},set(d){r.value?o.changeEvent(d):t&&t(Wt,d),n.value.checked=e.modelValue===s.value}}),l=ar(B(()=>o==null?void 0:o.size)),a=fs(B(()=>o==null?void 0:o.disabled)),c=H(!1),u=B(()=>a.value||r.value&&i.value!==s.value?-1:0);return Ra({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-radio",ref:"https://element-plus.org/en-US/component/radio.html"},B(()=>r.value&&Th(e.value))),{radioRef:n,isGroup:r,radioGroup:o,focus:c,size:l,disabled:a,tabIndex:u,modelValue:i,actualValue:s}},xoe=["value","name","disabled"],Toe=K({name:"ElRadio"}),Moe=K({...Toe,props:Eoe,emits:FM,setup(e,{emit:t}){const n=e,o=Ae("radio"),{radioRef:r,radioGroup:s,focus:i,size:l,disabled:a,modelValue:c,actualValue:u}=BM(n,t);function d(){tt(()=>t("change",c.value))}return(f,h)=>{var p;return g(),k("label",{class:F([S(o).b(),S(o).is("disabled",S(a)),S(o).is("focus",S(i)),S(o).is("bordered",f.border),S(o).is("checked",S(c)===S(u)),S(o).m(S(l))])},[_("span",{class:F([S(o).e("input"),S(o).is("disabled",S(a)),S(o).is("checked",S(c)===S(u))])},[Ve(_("input",{ref_key:"radioRef",ref:r,"onUpdate:modelValue":h[0]||(h[0]=m=>Yt(c)?c.value=m:null),class:F(S(o).e("original")),value:S(u),name:f.name||((p=S(s))==null?void 0:p.name),disabled:S(a),type:"radio",onFocus:h[1]||(h[1]=m=>i.value=!0),onBlur:h[2]||(h[2]=m=>i.value=!1),onChange:d,onClick:h[3]||(h[3]=Ge(()=>{},["stop"]))},null,42,xoe),[[Gh,S(c)]]),_("span",{class:F(S(o).e("inner"))},null,2)],2),_("span",{class:F(S(o).e("label")),onKeydown:h[4]||(h[4]=Ge(()=>{},["stop"]))},[le(f.$slots,"default",{},()=>[ne(M(f.label),1)])],34)],2)}}});var Aoe=Re(Moe,[["__file","radio.vue"]]);const Ooe=qe({...RM}),Ioe=["value","name","disabled"],Noe=K({name:"ElRadioButton"}),Poe=K({...Noe,props:Ooe,setup(e){const t=e,n=Ae("radio"),{radioRef:o,focus:r,size:s,disabled:i,modelValue:l,radioGroup:a,actualValue:c}=BM(t),u=B(()=>({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 h;return g(),k("label",{class:F([S(n).b("button"),S(n).is("active",S(l)===S(c)),S(n).is("disabled",S(i)),S(n).is("focus",S(r)),S(n).bm("button",S(s))])},[Ve(_("input",{ref_key:"radioRef",ref:o,"onUpdate:modelValue":f[0]||(f[0]=p=>Yt(l)?l.value=p:null),class:F(S(n).be("button","original-radio")),value:S(c),type:"radio",name:d.name||((h=S(a))==null?void 0:h.name),disabled:S(i),onFocus:f[1]||(f[1]=p=>r.value=!0),onBlur:f[2]||(f[2]=p=>r.value=!1),onClick:f[3]||(f[3]=Ge(()=>{},["stop"]))},null,42,Ioe),[[Gh,S(l)]]),_("span",{class:F(S(n).be("button","inner")),style:Be(S(l)===S(c)?S(u):{}),onKeydown:f[4]||(f[4]=Ge(()=>{},["stop"]))},[le(d.$slots,"default",{},()=>[ne(M(d.label),1)])],38)],2)}}});var VM=Re(Poe,[["__file","radio-button.vue"]]);const Loe=qe({id:{type:String,default:void 0},size:xi,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}}),Roe=FM,Foe=["id","aria-label","aria-labelledby"],Doe=K({name:"ElRadioGroup"}),Boe=K({...Doe,props:Loe,emits:Roe,setup(e,{emit:t}){const n=e,o=Ae("radio"),r=Lr(),s=H(),{formItem:i}=Ti(),{inputId:l,isLabeledByFormItem:a}=_c(n,{formItemContext:i}),c=d=>{t(Wt,d),tt(()=>t("change",d))};mt(()=>{const d=s.value.querySelectorAll("[type=radio]"),f=d[0];!Array.from(d).some(h=>h.checked)&&f&&(f.tabIndex=0)});const u=B(()=>n.name||r.value);return bt(DM,jn({...Hs(n),changeEvent:c,name:u})),ke(()=>n.modelValue,()=>{n.validateEvent&&(i==null||i.validate("change").catch(d=>void 0))}),(d,f)=>(g(),k("div",{id:S(l),ref_key:"radioGroupRef",ref:s,class:F(S(o).b("group")),role:"radiogroup","aria-label":S(a)?void 0:d.label||"radio-group","aria-labelledby":S(a)?S(i).labelId:void 0},[le(d.$slots,"default")],10,Foe))}});var zM=Re(Boe,[["__file","radio-group.vue"]]);const V0=zt(Aoe,{RadioButton:VM,RadioGroup:zM}),Oi=Hn(zM),hp=Hn(VM),jM=qe({type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"},closable:Boolean,disableTransitions:Boolean,hit:Boolean,color:String,size:{type:String,values:gc},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),Voe={close:e=>e instanceof MouseEvent,click:e=>e instanceof MouseEvent},zoe=K({name:"ElTag"}),joe=K({...zoe,props:jM,emits:Voe,setup(e,{emit:t}){const n=e,o=ar(),r=Ae("tag"),s=B(()=>{const{type:a,hit:c,effect:u,closable:d,round:f}=n;return[r.b(),r.is("closable",d),r.m(a||"primary"),r.m(o.value),r.m(u),r.is("hit",c),r.is("round",f)]}),i=a=>{t("close",a)},l=a=>{t("click",a)};return(a,c)=>a.disableTransitions?(g(),k("span",{key:0,class:F(S(s)),style:Be({backgroundColor:a.color}),onClick:l},[_("span",{class:F(S(r).e("content"))},[le(a.$slots,"default")],2),a.closable?(g(),L(S(ve),{key:0,class:F(S(r).e("close")),onClick:Ge(i,["stop"])},{default:x(()=>[b(S(Fs))]),_:1},8,["class","onClick"])):O("v-if",!0)],6)):(g(),L(ur,{key:1,name:`${S(r).namespace.value}-zoom-in-center`,appear:""},{default:x(()=>[_("span",{class:F(S(s)),style:Be({backgroundColor:a.color}),onClick:l},[_("span",{class:F(S(r).e("content"))},[le(a.$slots,"default")],2),a.closable?(g(),L(S(ve),{key:0,class:F(S(r).e("close")),onClick:Ge(i,["stop"])},{default:x(()=>[b(S(Fs))]),_:1},8,["class","onClick"])):O("v-if",!0)],6)]),_:3},8,["name"]))}});var Hoe=Re(joe,[["__file","tag.vue"]]);const pp=zt(Hoe),HM=Symbol("rowContextKey"),Uoe=["start","center","end","space-around","space-between","space-evenly"],Woe=["top","middle","bottom"],qoe=qe({tag:{type:String,default:"div"},gutter:{type:Number,default:0},justify:{type:String,values:Uoe,default:"start"},align:{type:String,values:Woe}}),Koe=K({name:"ElRow"}),Goe=K({...Koe,props:qoe,setup(e){const t=e,n=Ae("row"),o=B(()=>t.gutter);bt(HM,{gutter:o});const r=B(()=>{const i={};return t.gutter&&(i.marginRight=i.marginLeft=`-${t.gutter/2}px`),i}),s=B(()=>[n.b(),n.is(`justify-${t.justify}`,t.justify!=="start"),n.is(`align-${t.align}`,!!t.align)]);return(i,l)=>(g(),L(xt(i.tag),{class:F(S(s)),style:Be(S(r))},{default:x(()=>[le(i.$slots,"default")]),_:3},8,["class","style"]))}});var Yoe=Re(Goe,[["__file","row.vue"]]);const mp=zt(Yoe),Joe=qe({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:we([Number,Object]),default:()=>vo({})},sm:{type:we([Number,Object]),default:()=>vo({})},md:{type:we([Number,Object]),default:()=>vo({})},lg:{type:we([Number,Object]),default:()=>vo({})},xl:{type:we([Number,Object]),default:()=>vo({})}}),Zoe=K({name:"ElCol"}),Xoe=K({...Zoe,props:Joe,setup(e){const t=e,{gutter:n}=Pe(HM,{gutter:B(()=>0)}),o=Ae("col"),r=B(()=>{const i={};return n.value&&(i.paddingLeft=i.paddingRight=`${n.value/2}px`),i}),s=B(()=>{const i=[];return["span","offset","pull","push"].forEach(c=>{const u=t[c];Et(u)&&(c==="span"?i.push(o.b(`${t[c]}`)):u>0&&i.push(o.b(`${c}-${t[c]}`)))}),["xs","sm","md","lg","xl"].forEach(c=>{Et(t[c])?i.push(o.b(`${c}-${t[c]}`)):it(t[c])&&Object.entries(t[c]).forEach(([u,d])=>{i.push(u!=="span"?o.b(`${c}-${u}-${d}`):o.b(`${c}-${d}`))})}),n.value&&i.push(o.is("guttered")),[o.b(),i]});return(i,l)=>(g(),L(xt(i.tag),{class:F(S(s)),style:Be(S(r))},{default:x(()=>[le(i.$slots,"default")]),_:3},8,["class","style"]))}});var Qoe=Re(Xoe,[["__file","col.vue"]]);const gp=zt(Qoe),ere=qe({color:{type:we(Object),required:!0},vertical:{type:Boolean,default:!1}});let ov=!1;function Ph(e,t){if(!kt)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,ov=!1,(i=t.end)==null||i.call(t,s)},r=function(s){var i;ov||(s.preventDefault(),document.onselectstart=()=>!1,document.ondragstart=()=>!1,document.addEventListener("mousemove",n),document.addEventListener("mouseup",o),document.addEventListener("touchmove",n),document.addEventListener("touchend",o),ov=!0,(i=t.start)==null||i.call(t,s))};e.addEventListener("mousedown",r),e.addEventListener("touchstart",r)}const tre=e=>{const t=nt(),n=Cn(),o=Cn();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:c,clientY:u}=Fw(i);if(e.vertical){let d=u-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=c-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}},nre=(e,{bar:t,thumb:n,handleDrag:o})=>{const r=nt(),s=Ae("color-alpha-slider"),i=H(0),l=H(0),a=H();function c(){if(!n.value||e.vertical)return 0;const E=r.vnode.el,w=e.color.get("alpha");return E?Math.round(w*(E.offsetWidth-n.value.offsetWidth/2)/100):0}function u(){if(!n.value)return 0;const E=r.vnode.el;if(!e.vertical)return 0;const w=e.color.get("alpha");return E?Math.round(w*(E.offsetHeight-n.value.offsetHeight/2)/100):0}function d(){if(e.color&&e.color.value){const{r:E,g:w,b:C}=e.color.toRgb();return`linear-gradient(to right, rgba(${E}, ${w}, ${C}, 0) 0%, rgba(${E}, ${w}, ${C}, 1) 100%)`}return""}function f(){i.value=c(),l.value=u(),a.value=d()}mt(()=>{if(!t.value||!n.value)return;const E={drag:w=>{o(w)},end:w=>{o(w)}};Ph(t.value,E),Ph(n.value,E),f()}),ke(()=>e.color.get("alpha"),()=>f()),ke(()=>e.color.value,()=>f());const h=B(()=>[s.b(),s.is("vertical",e.vertical)]),p=B(()=>s.e("bar")),m=B(()=>s.e("thumb")),v=B(()=>({background:a.value})),y=B(()=>({left:fo(i.value),top:fo(l.value)}));return{rootKls:h,barKls:p,barStyle:v,thumbKls:m,thumbStyle:y,update:f}},ore="ElColorAlphaSlider",rre=K({name:ore}),sre=K({...rre,props:ere,setup(e,{expose:t}){const n=e,{bar:o,thumb:r,handleDrag:s,handleClick:i}=tre(n),{rootKls:l,barKls:a,barStyle:c,thumbKls:u,thumbStyle:d,update:f}=nre(n,{bar:o,thumb:r,handleDrag:s});return t({update:f,bar:o,thumb:r}),(h,p)=>(g(),k("div",{class:F(S(l))},[_("div",{ref_key:"bar",ref:o,class:F(S(a)),style:Be(S(c)),onClick:p[0]||(p[0]=(...m)=>S(i)&&S(i)(...m))},null,6),_("div",{ref_key:"thumb",ref:r,class:F(S(u)),style:Be(S(d))},null,6)],2))}});var ire=Re(sre,[["__file","alpha-slider.vue"]]);const lre=K({name:"ElColorHueSlider",props:{color:{type:Object,required:!0},vertical:Boolean},setup(e){const t=Ae("color-hue-slider"),n=nt(),o=H(),r=H(),s=H(0),i=H(0),l=B(()=>e.color.get("hue"));ke(()=>l.value,()=>{f()});function a(h){h.target!==o.value&&c(h)}function c(h){if(!r.value||!o.value)return;const m=n.vnode.el.getBoundingClientRect(),{clientX:v,clientY:y}=Fw(h);let E;if(e.vertical){let w=y-m.top;w=Math.min(w,m.height-o.value.offsetHeight/2),w=Math.max(o.value.offsetHeight/2,w),E=Math.round((w-o.value.offsetHeight/2)/(m.height-o.value.offsetHeight)*360)}else{let w=v-m.left;w=Math.min(w,m.width-o.value.offsetWidth/2),w=Math.max(o.value.offsetWidth/2,w),E=Math.round((w-o.value.offsetWidth/2)/(m.width-o.value.offsetWidth)*360)}e.color.set("hue",E)}function u(){if(!o.value)return 0;const h=n.vnode.el;if(e.vertical)return 0;const p=e.color.get("hue");return h?Math.round(p*(h.offsetWidth-o.value.offsetWidth/2)/360):0}function d(){if(!o.value)return 0;const h=n.vnode.el;if(!e.vertical)return 0;const p=e.color.get("hue");return h?Math.round(p*(h.offsetHeight-o.value.offsetHeight/2)/360):0}function f(){s.value=u(),i.value=d()}return mt(()=>{if(!r.value||!o.value)return;const h={drag:p=>{c(p)},end:p=>{c(p)}};Ph(r.value,h),Ph(o.value,h),f()}),{bar:r,thumb:o,thumbLeft:s,thumbTop:i,hueValue:l,handleClick:a,update:f,ns:t}}});function are(e,t,n,o,r,s){return g(),k("div",{class:F([e.ns.b(),e.ns.is("vertical",e.vertical)])},[_("div",{ref:"bar",class:F(e.ns.e("bar")),onClick:t[0]||(t[0]=(...i)=>e.handleClick&&e.handleClick(...i))},null,2),_("div",{ref:"thumb",class:F(e.ns.e("thumb")),style:Be({left:e.thumbLeft+"px",top:e.thumbTop+"px"})},null,6)],2)}var cre=Re(lre,[["render",are],["__file","hue-slider.vue"]]);const ure=qe({modelValue:String,id:String,showAlpha:Boolean,colorFormat:String,disabled:Boolean,size:xi,popperClass:{type:String,default:""},label:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},predefine:{type:we(Array)},validateEvent:{type:Boolean,default:!0}}),dre={[Wt]:e=>je(e)||As(e),[tc]:e=>je(e)||As(e),activeChange:e=>je(e)||As(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent},UM=Symbol("colorPickerContextKey"),p8=function(e,t,n){return[e,t*n/((e=(2-t)*n)<1?e:2-e)||0,e/2]},fre=function(e){return typeof e=="string"&&e.includes(".")&&Number.parseFloat(e)===1},hre=function(e){return typeof e=="string"&&e.includes("%")},gu=function(e,t){fre(e)&&(e="100%");const n=hre(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)},m8={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},Xm=e=>{e=Math.min(Math.round(e),255);const t=Math.floor(e/16),n=e%16;return`${m8[t]||t}${m8[n]||n}`},g8=function({r:e,g:t,b:n}){return Number.isNaN(+e)||Number.isNaN(+t)||Number.isNaN(+n)?"":`#${Xm(e)}${Xm(t)}${Xm(n)}`},rv={A:10,B:11,C:12,D:13,E:14,F:15},ta=function(e){return e.length===2?(rv[e[0].toUpperCase()]||+e[0])*16+(rv[e[1].toUpperCase()]||+e[1]):rv[e[1].toUpperCase()]||+e[1]},pre=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}},_8=(e,t,n)=>{e=gu(e,255),t=gu(t,255),n=gu(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}},zd=function(e,t,n){e=gu(e,360)*6,t=gu(t,100),n=gu(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,c=[n,i,s,s,l,n][a],u=[l,n,n,i,s,s][a],d=[s,s,l,n,n,i][a];return{r:Math.round(c*255),g:Math.round(u*255),b:Math.round(d*255)}};class Hf{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)ut(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)ut(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 zd(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}=pre(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}=_8(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=ta(o[0]+o[0]),s=ta(o[1]+o[1]),i=ta(o[2]+o[2])):(o.length===6||o.length===8)&&(r=ta(o.slice(0,2)),s=ta(o.slice(2,4)),i=ta(o.slice(4,6))),o.length===8?this._alpha=ta(o.slice(6))/255*100:(o.length===3||o.length===6)&&(this._alpha=100);const{h:l,s:a,v:c}=_8(r,s,i);n(l,a,c)}}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=p8(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=`${g8(zd(t,n,o))}${Xm(r*255/100)}`;break}default:{const{r:i,g:l,b:a}=zd(t,n,o);this.value=`rgba(${i}, ${l}, ${a}, ${this.get("alpha")/100})`}}else switch(s){case"hsl":{const i=p8(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}=zd(t,n,o);this.value=`rgb(${i}, ${l}, ${a})`;break}default:this.value=g8(zd(t,n,o))}}}const mre=K({props:{colors:{type:Array,required:!0},color:{type:Object,required:!0}},setup(e){const t=Ae("color-predefine"),{currentColor:n}=Pe(UM),o=H(s(e.colors,e.color));ke(()=>n.value,i=>{const l=new Hf;l.fromString(i),o.value.forEach(a=>{a.selected=l.compare(a)})}),Yr(()=>{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 c=new Hf;return c.enableAlpha=!0,c.format="rgba",c.fromString(a),c.selected=c.value===l.value,c})}return{rgbaColors:o,handleSelect:r,ns:t}}}),gre=["onClick"];function _re(e,t,n,o,r,s){return g(),k("div",{class:F(e.ns.b())},[_("div",{class:F(e.ns.e("colors"))},[(g(!0),k(Q,null,Me(e.rgbaColors,(i,l)=>(g(),k("div",{key:e.colors[l],class:F([e.ns.e("color-selector"),e.ns.is("alpha",i._alpha<100),{selected:i.selected}]),onClick:a=>e.handleSelect(l)},[_("div",{style:Be({backgroundColor:i.value})},null,4)],10,gre))),128))],2)],2)}var vre=Re(mre,[["render",_re],["__file","predefine.vue"]]);const yre=K({name:"ElSlPanel",props:{color:{type:Object,required:!0}},setup(e){const t=Ae("color-svpanel"),n=nt(),o=H(0),r=H(0),s=H("hsl(0, 100%, 50%)"),i=B(()=>{const c=e.color.get("hue"),u=e.color.get("value");return{hue:c,value:u}});function l(){const c=e.color.get("saturation"),u=e.color.get("value"),d=n.vnode.el,{clientWidth:f,clientHeight:h}=d;r.value=c*f/100,o.value=(100-u)*h/100,s.value=`hsl(${e.color.get("hue")}, 100%, 50%)`}function a(c){const d=n.vnode.el.getBoundingClientRect(),{clientX:f,clientY:h}=Fw(c);let p=f-d.left,m=h-d.top;p=Math.max(0,p),p=Math.min(p,d.width),m=Math.max(0,m),m=Math.min(m,d.height),r.value=p,o.value=m,e.color.set({saturation:p/d.width*100,value:100-m/d.height*100})}return ke(()=>i.value,()=>{l()}),mt(()=>{Ph(n.vnode.el,{drag:c=>{a(c)},end:c=>{a(c)}}),l()}),{cursorTop:o,cursorLeft:r,background:s,colorValue:i,handleDrag:a,update:l,ns:t}}}),bre=_("div",null,null,-1),wre=[bre];function kre(e,t,n,o,r,s){return g(),k("div",{class:F(e.ns.b()),style:Be({backgroundColor:e.background})},[_("div",{class:F(e.ns.e("white"))},null,2),_("div",{class:F(e.ns.e("black"))},null,2),_("div",{class:F(e.ns.e("cursor")),style:Be({top:e.cursorTop+"px",left:e.cursorLeft+"px"})},wre,6)],6)}var Cre=Re(yre,[["render",kre],["__file","sv-panel.vue"]]);const Sre=["onKeydown"],$re=["id","aria-label","aria-labelledby","aria-description","aria-disabled","tabindex"],Ere=K({name:"ElColorPicker"}),xre=K({...Ere,props:ure,emits:dre,setup(e,{expose:t,emit:n}){const o=e,{t:r}=Fn(),s=Ae("color"),{formItem:i}=Ti(),l=ar(),a=fs(),{inputId:c,isLabeledByFormItem:u}=_c(o,{formItemContext:i}),d=H(),f=H(),h=H(),p=H(),m=H(),v=H(),{isFocused:y,handleFocus:E,handleBlur:w}=y3(m,{beforeBlur(ie){var Le;return(Le=p.value)==null?void 0:Le.isFocusInsideContent(ie)},afterBlur(){J(!1),R()}}),C=ie=>{if(a.value)return pe();E(ie)};let T=!0;const $=jn(new Hf({enableAlpha:o.showAlpha,format:o.colorFormat||"",value:o.modelValue})),A=H(!1),N=H(!1),P=H(""),I=B(()=>!o.modelValue&&!N.value?"transparent":oe($,o.showAlpha)),D=B(()=>!o.modelValue&&!N.value?"":$.value),V=B(()=>u.value?void 0:o.label||r("el.colorpicker.defaultLabel")),G=B(()=>u.value?i==null?void 0:i.labelId:void 0),te=B(()=>[s.b("picker"),s.is("disabled",a.value),s.bm("picker",l.value),s.is("focused",y.value)]);function oe(ie,Le){if(!(ie instanceof Hf))throw new TypeError("color should be instance of _color Class");const{r:et,g:j,b:W}=ie.toRgb();return Le?`rgba(${et}, ${j}, ${W}, ${ie.get("alpha")/100})`:`rgb(${et}, ${j}, ${W})`}function J(ie){A.value=ie}const q=Xa(J,100,{leading:!0});function X(){a.value||J(!0)}function ee(){q(!1),R()}function R(){tt(()=>{o.modelValue?$.fromString(o.modelValue):($.value="",tt(()=>{N.value=!1}))})}function ye(){a.value||q(!A.value)}function Ce(){$.fromString(P.value)}function U(){const ie=$.value;n(Wt,ie),n("change",ie),o.validateEvent&&(i==null||i.validate("change").catch(Le=>void 0)),q(!1),tt(()=>{const Le=new Hf({enableAlpha:o.showAlpha,format:o.colorFormat||"",value:o.modelValue});$.compare(Le)||R()})}function xe(){q(!1),n(Wt,null),n("change",null),o.modelValue!==null&&o.validateEvent&&(i==null||i.validate("change").catch(ie=>void 0)),R()}function Ye(ie){if(A.value&&(ee(),y.value)){const Le=new FocusEvent("focus",ie);w(Le)}}function Fe(ie){ie.preventDefault(),ie.stopPropagation(),J(!1),R()}function Z(ie){switch(ie.code){case pt.enter:case pt.space:ie.preventDefault(),ie.stopPropagation(),X(),v.value.focus();break;case pt.esc:Fe(ie);break}}function ce(){m.value.focus()}function pe(){m.value.blur()}return mt(()=>{o.modelValue&&(P.value=D.value)}),ke(()=>o.modelValue,ie=>{ie?ie&&ie!==$.value&&(T=!1,$.fromString(ie)):N.value=!1}),ke(()=>D.value,ie=>{P.value=ie,T&&n("activeChange",ie),T=!0}),ke(()=>$.value,()=>{!o.modelValue&&!N.value&&(N.value=!0)}),ke(()=>A.value,()=>{tt(()=>{var ie,Le,et;(ie=d.value)==null||ie.update(),(Le=f.value)==null||Le.update(),(et=h.value)==null||et.update()})}),bt(UM,{currentColor:D}),t({color:$,show:X,hide:ee,focus:ce,blur:pe}),(ie,Le)=>(g(),L(S(dd),{ref_key:"popper",ref:p,visible:A.value,"show-arrow":!1,"fallback-placements":["bottom","top","right","left"],offset:0,"gpu-acceleration":!1,"popper-class":[S(s).be("picker","panel"),S(s).b("dropdown"),ie.popperClass],"stop-popper-mouse-event":!1,effect:"light",trigger:"click",transition:`${S(s).namespace.value}-zoom-in-top`,persistent:"",onHide:Le[2]||(Le[2]=et=>J(!1))},{content:x(()=>[Ve((g(),k("div",{onKeydown:rn(Fe,["esc"])},[_("div",{class:F(S(s).be("dropdown","main-wrapper"))},[b(cre,{ref_key:"hue",ref:d,class:"hue-slider",color:S($),vertical:""},null,8,["color"]),b(Cre,{ref_key:"sv",ref:f,color:S($)},null,8,["color"])],2),ie.showAlpha?(g(),L(ire,{key:0,ref_key:"alpha",ref:h,color:S($)},null,8,["color"])):O("v-if",!0),ie.predefine?(g(),L(vre,{key:1,ref:"predefine",color:S($),colors:ie.predefine},null,8,["color","colors"])):O("v-if",!0),_("div",{class:F(S(s).be("dropdown","btns"))},[_("span",{class:F(S(s).be("dropdown","value"))},[b(S(Dn),{ref_key:"inputRef",ref:v,modelValue:P.value,"onUpdate:modelValue":Le[0]||(Le[0]=et=>P.value=et),"validate-event":!1,size:"small",onKeyup:rn(Ce,["enter"]),onBlur:Ce},null,8,["modelValue","onKeyup"])],2),b(S(Ze),{class:F(S(s).be("dropdown","link-btn")),text:"",size:"small",onClick:xe},{default:x(()=>[ne(M(S(r)("el.colorpicker.clear")),1)]),_:1},8,["class"]),b(S(Ze),{plain:"",size:"small",class:F(S(s).be("dropdown","btn")),onClick:U},{default:x(()=>[ne(M(S(r)("el.colorpicker.confirm")),1)]),_:1},8,["class"])],2)],40,Sre)),[[S(M3),Ye]])]),default:x(()=>[_("div",{id:S(c),ref_key:"triggerRef",ref:m,class:F(S(te)),role:"button","aria-label":S(V),"aria-labelledby":S(G),"aria-description":S(r)("el.colorpicker.description",{color:ie.modelValue||""}),"aria-disabled":S(a),tabindex:S(a)?-1:ie.tabindex,onKeydown:Z,onFocus:C,onBlur:Le[1]||(Le[1]=(...et)=>S(w)&&S(w)(...et))},[S(a)?(g(),k("div",{key:0,class:F(S(s).be("picker","mask"))},null,2)):O("v-if",!0),_("div",{class:F(S(s).be("picker","trigger")),onClick:ye},[_("span",{class:F([S(s).be("picker","color"),S(s).is("alpha",ie.showAlpha)])},[_("span",{class:F(S(s).be("picker","color-inner")),style:Be({backgroundColor:S(I)})},[Ve(b(S(ve),{class:F([S(s).be("picker","icon"),S(s).is("icon-arrow-down")])},{default:x(()=>[b(S(ip))]),_:1},8,["class"]),[[sn,ie.modelValue||N.value]]),Ve(b(S(ve),{class:F([S(s).be("picker","empty"),S(s).is("icon-close")])},{default:x(()=>[b(S(Fs))]),_:1},8,["class"]),[[sn,!ie.modelValue&&!N.value]])],6)],2)],2)],42,$re)]),_:1},8,["visible","popper-class","transition"]))}});var Tre=Re(xre,[["__file","color-picker.vue"]]);const WM=zt(Tre),Mre=K({name:"ElContainer"}),Are=K({...Mre,props:{direction:{type:String}},setup(e){const t=e,n=Ws(),o=Ae("container"),r=B(()=>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)=>(g(),k("section",{class:F([S(o).b(),S(o).is("vertical",S(r))])},[le(s.$slots,"default")],2))}});var Ore=Re(Are,[["__file","container.vue"]]);const Ire=K({name:"ElAside"}),Nre=K({...Ire,props:{width:{type:String,default:null}},setup(e){const t=e,n=Ae("aside"),o=B(()=>t.width?n.cssVarBlock({width:t.width}):{});return(r,s)=>(g(),k("aside",{class:F(S(n).b()),style:Be(S(o))},[le(r.$slots,"default")],6))}});var qM=Re(Nre,[["__file","aside.vue"]]);const Pre=K({name:"ElFooter"}),Lre=K({...Pre,props:{height:{type:String,default:null}},setup(e){const t=e,n=Ae("footer"),o=B(()=>t.height?n.cssVarBlock({height:t.height}):{});return(r,s)=>(g(),k("footer",{class:F(S(n).b()),style:Be(S(o))},[le(r.$slots,"default")],6))}});var KM=Re(Lre,[["__file","footer.vue"]]);const Rre=K({name:"ElHeader"}),Fre=K({...Rre,props:{height:{type:String,default:null}},setup(e){const t=e,n=Ae("header"),o=B(()=>t.height?n.cssVarBlock({height:t.height}):{});return(r,s)=>(g(),k("header",{class:F(S(n).b()),style:Be(S(o))},[le(r.$slots,"default")],6))}});var GM=Re(Fre,[["__file","header.vue"]]);const Dre=K({name:"ElMain"}),Bre=K({...Dre,setup(e){const t=Ae("main");return(n,o)=>(g(),k("main",{class:F(S(t).b())},[le(n.$slots,"default")],2))}});var YM=Re(Bre,[["__file","main.vue"]]);const hd=zt(Ore,{Aside:qM,Footer:KM,Header:GM,Main:YM}),_p=Hn(qM);Hn(KM);const JM=Hn(GM),Ii=Hn(YM),Vre=qe({mask:{type:Boolean,default:!0},customMaskEvent:{type:Boolean,default:!1},overlayClass:{type:we([String,Array,Object])},zIndex:{type:we([String,Number])}}),zre={click:e=>e instanceof MouseEvent},jre="overlay";var Hre=K({name:"ElOverlay",props:Vre,emits:zre,setup(e,{slots:t,emit:n}){const o=Ae(jre),r=a=>{n("click",a)},{onClick:s,onMousedown:i,onMouseup:l}=p3(e.customMaskEvent?void 0:r);return()=>e.mask?b("div",{class:[o.b(),e.overlayClass],style:{zIndex:e.zIndex},onClick:s,onMousedown:i,onMouseup:l},[le(t,"default")],Wm.STYLE|Wm.CLASS|Wm.PROPS,["onClick","onMouseup","onMousedown"]):Xe("div",{class:e.overlayClass,style:{zIndex:e.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[le(t,"default")])}});const A3=Hre,ZM=Symbol("dialogInjectionKey"),XM=qe({center:Boolean,alignCenter:Boolean,closeIcon:{type:Pn},draggable:Boolean,overflow:Boolean,fullscreen:Boolean,showClose:{type:Boolean,default:!0},title:{type:String,default:""},ariaLevel:{type:String,default:"2"}}),Ure={close:()=>!0},Wre=["aria-level"],qre=["aria-label"],Kre=["id"],Gre=K({name:"ElDialogContent"}),Yre=K({...Gre,props:XM,emits:Ure,setup(e){const t=e,{t:n}=Fn(),{Close:o}=kT,{dialogRef:r,headerRef:s,bodyId:i,ns:l,style:a}=Pe(ZM),{focusTrapRef:c}=Pe(C3),u=B(()=>[l.b(),l.is("fullscreen",t.fullscreen),l.is("draggable",t.draggable),l.is("align-center",t.alignCenter),{[l.m("center")]:t.center}]),d=r3(c,r),f=B(()=>t.draggable),h=B(()=>t.overflow);return xT(r,s,f,h),(p,m)=>(g(),k("div",{ref:S(d),class:F(S(u)),style:Be(S(a)),tabindex:"-1"},[_("header",{ref_key:"headerRef",ref:s,class:F([S(l).e("header"),{"show-close":p.showClose}])},[le(p.$slots,"header",{},()=>[_("span",{role:"heading","aria-level":p.ariaLevel,class:F(S(l).e("title"))},M(p.title),11,Wre)]),p.showClose?(g(),k("button",{key:0,"aria-label":S(n)("el.dialog.close"),class:F(S(l).e("headerbtn")),type:"button",onClick:m[0]||(m[0]=v=>p.$emit("close"))},[b(S(ve),{class:F(S(l).e("close"))},{default:x(()=>[(g(),L(xt(p.closeIcon||S(o))))]),_:1},8,["class"])],10,qre)):O("v-if",!0)],2),_("div",{id:S(i),class:F(S(l).e("body"))},[le(p.$slots,"default")],10,Kre),p.$slots.footer?(g(),k("footer",{key:0,class:F(S(l).e("footer"))},[le(p.$slots,"footer")],2)):O("v-if",!0)],6))}});var Jre=Re(Yre,[["__file","dialog-content.vue"]]);const QM=qe({...XM,appendToBody:Boolean,appendTo:{type:we(String),default:"body"},beforeClose:{type:we(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"}}),eA={open:()=>!0,opened:()=>!0,close:()=>!0,closed:()=>!0,[Wt]:e=>ao(e),openAutoFocus:()=>!0,closeAutoFocus:()=>!0},tA=(e,t)=>{var n;const r=nt().emit,{nextZIndex:s}=P0();let i="";const l=Lr(),a=Lr(),c=H(!1),u=H(!1),d=H(!1),f=H((n=e.zIndex)!=null?n:s());let h,p;const m=dp("namespace",Df),v=B(()=>{const oe={},J=`--${m.value}-dialog`;return e.fullscreen||(e.top&&(oe[`${J}-margin-top`]=e.top),e.width&&(oe[`${J}-width`]=fo(e.width))),oe}),y=B(()=>e.alignCenter?{display:"flex"}:{});function E(){r("opened")}function w(){r("closed"),r(Wt,!1),e.destroyOnClose&&(d.value=!1)}function C(){r("close")}function T(){p==null||p(),h==null||h(),e.openDelay&&e.openDelay>0?{stop:h}=Fy(()=>P(),e.openDelay):P()}function $(){h==null||h(),p==null||p(),e.closeDelay&&e.closeDelay>0?{stop:p}=Fy(()=>I(),e.closeDelay):I()}function A(){function oe(J){J||(u.value=!0,c.value=!1)}e.beforeClose?e.beforeClose(oe):$()}function N(){e.closeOnClickModal&&A()}function P(){kt&&(c.value=!0)}function I(){c.value=!1}function D(){r("openAutoFocus")}function V(){r("closeAutoFocus")}function G(oe){var J;((J=oe.detail)==null?void 0:J.focusReason)==="pointer"&&oe.preventDefault()}e.lockScroll&&AT(c);function te(){e.closeOnPressEscape&&A()}return ke(()=>e.modelValue,oe=>{oe?(u.value=!1,T(),d.value=!0,f.value=aT(e.zIndex)?s():f.value++,tt(()=>{r("open"),t.value&&(t.value.scrollTop=0)})):c.value&&$()}),ke(()=>e.fullscreen,oe=>{t.value&&(oe?(i=t.value.style.transform,t.value.style.transform=""):t.value.style.transform=i)}),mt(()=>{e.modelValue&&(c.value=!0,d.value=!0,T())}),{afterEnter:E,afterLeave:w,beforeLeave:C,handleClose:A,onModalClick:N,close:$,doClose:I,onOpenAutoFocus:D,onCloseAutoFocus:V,onCloseRequested:te,onFocusoutPrevented:G,titleId:l,bodyId:a,closed:u,style:v,overlayDialogStyle:y,rendered:d,visible:c,zIndex:f}},Zre=["aria-label","aria-labelledby","aria-describedby"],Xre=K({name:"ElDialog",inheritAttrs:!1}),Qre=K({...Xre,props:QM,emits:eA,setup(e,{expose:t}){const n=e,o=Ws();Ra({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"},B(()=>!!o.title));const r=Ae("dialog"),s=H(),i=H(),l=H(),{visible:a,titleId:c,bodyId:u,style:d,overlayDialogStyle:f,rendered:h,zIndex:p,afterEnter:m,afterLeave:v,beforeLeave:y,handleClose:E,onModalClick:w,onOpenAutoFocus:C,onCloseAutoFocus:T,onCloseRequested:$,onFocusoutPrevented:A}=tA(n,s);bt(ZM,{dialogRef:s,headerRef:i,bodyId:u,ns:r,rendered:h,style:d});const N=p3(w),P=B(()=>n.draggable&&!n.fullscreen);return t({visible:a,dialogContentRef:l}),(I,D)=>(g(),L(sr,{to:I.appendTo,disabled:I.appendTo!=="body"?!1:!I.appendToBody},[b(ur,{name:"dialog-fade",onAfterEnter:S(m),onAfterLeave:S(v),onBeforeLeave:S(y),persisted:""},{default:x(()=>[Ve(b(S(A3),{"custom-mask-event":"",mask:I.modal,"overlay-class":I.modalClass,"z-index":S(p)},{default:x(()=>[_("div",{role:"dialog","aria-modal":"true","aria-label":I.title||void 0,"aria-labelledby":I.title?void 0:S(c),"aria-describedby":S(u),class:F(`${S(r).namespace.value}-overlay-dialog`),style:Be(S(f)),onClick:D[0]||(D[0]=(...V)=>S(N).onClick&&S(N).onClick(...V)),onMousedown:D[1]||(D[1]=(...V)=>S(N).onMousedown&&S(N).onMousedown(...V)),onMouseup:D[2]||(D[2]=(...V)=>S(N).onMouseup&&S(N).onMouseup(...V))},[b(S(B0),{loop:"",trapped:S(a),"focus-start-el":"container",onFocusAfterTrapped:S(C),onFocusAfterReleased:S(T),onFocusoutPrevented:S(A),onReleaseRequested:S($)},{default:x(()=>[S(h)?(g(),L(Jre,pn({key:0,ref_key:"dialogContentRef",ref:l},I.$attrs,{center:I.center,"align-center":I.alignCenter,"close-icon":I.closeIcon,draggable:S(P),overflow:I.overflow,fullscreen:I.fullscreen,"show-close":I.showClose,title:I.title,"aria-level":I.headerAriaLevel,onClose:S(E)}),Ps({header:x(()=>[I.$slots.title?le(I.$slots,"title",{key:1}):le(I.$slots,"header",{key:0,close:S(E),titleId:S(c),titleClass:S(r).e("title")})]),default:x(()=>[le(I.$slots,"default")]),_:2},[I.$slots.footer?{name:"footer",fn:x(()=>[le(I.$slots,"footer")])}:void 0]),1040,["center","align-center","close-icon","draggable","overflow","fullscreen","show-close","title","aria-level","onClose"])):O("v-if",!0)]),_:3},8,["trapped","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])],46,Zre)]),_:3},8,["mask","overlay-class","z-index"]),[[sn,S(a)]])]),_:3},8,["onAfterEnter","onAfterLeave","onBeforeLeave"])],8,["to","disabled"]))}});var ese=Re(Qre,[["__file","dialog.vue"]]);const vp=zt(ese),tse=qe({...QM,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"}}),nse=eA,ose=["aria-label","aria-labelledby","aria-describedby"],rse=["id","aria-level"],sse=["aria-label"],ise=["id"],lse=K({name:"ElDrawer",inheritAttrs:!1}),ase=K({...lse,props:tse,emits:nse,setup(e,{expose:t}){const n=e,o=Ws();Ra({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"},B(()=>!!o.title));const r=H(),s=H(),i=Ae("drawer"),{t:l}=Fn(),{afterEnter:a,afterLeave:c,beforeLeave:u,visible:d,rendered:f,titleId:h,bodyId:p,zIndex:m,onModalClick:v,onOpenAutoFocus:y,onCloseAutoFocus:E,onFocusoutPrevented:w,onCloseRequested:C,handleClose:T}=tA(n,r),$=B(()=>n.direction==="rtl"||n.direction==="ltr"),A=B(()=>fo(n.size));return t({handleClose:T,afterEnter:a,afterLeave:c}),(N,P)=>(g(),L(sr,{to:"body",disabled:!N.appendToBody},[b(ur,{name:S(i).b("fade"),onAfterEnter:S(a),onAfterLeave:S(c),onBeforeLeave:S(u),persisted:""},{default:x(()=>[Ve(b(S(A3),{mask:N.modal,"overlay-class":N.modalClass,"z-index":S(m),onClick:S(v)},{default:x(()=>[b(S(B0),{loop:"",trapped:S(d),"focus-trap-el":r.value,"focus-start-el":s.value,onFocusAfterTrapped:S(y),onFocusAfterReleased:S(E),onFocusoutPrevented:S(w),onReleaseRequested:S(C)},{default:x(()=>[_("div",pn({ref_key:"drawerRef",ref:r,"aria-modal":"true","aria-label":N.title||void 0,"aria-labelledby":N.title?void 0:S(h),"aria-describedby":S(p)},N.$attrs,{class:[S(i).b(),N.direction,S(d)&&"open"],style:S($)?"width: "+S(A):"height: "+S(A),role:"dialog",onClick:P[1]||(P[1]=Ge(()=>{},["stop"]))}),[_("span",{ref_key:"focusStartRef",ref:s,class:F(S(i).e("sr-focus")),tabindex:"-1"},null,2),N.withHeader?(g(),k("header",{key:0,class:F(S(i).e("header"))},[N.$slots.title?le(N.$slots,"title",{key:1},()=>[O(" DEPRECATED SLOT ")]):le(N.$slots,"header",{key:0,close:S(T),titleId:S(h),titleClass:S(i).e("title")},()=>[N.$slots.title?O("v-if",!0):(g(),k("span",{key:0,id:S(h),role:"heading","aria-level":N.headerAriaLevel,class:F(S(i).e("title"))},M(N.title),11,rse))]),N.showClose?(g(),k("button",{key:2,"aria-label":S(l)("el.drawer.close"),class:F(S(i).e("close-btn")),type:"button",onClick:P[0]||(P[0]=(...I)=>S(T)&&S(T)(...I))},[b(S(ve),{class:F(S(i).e("close"))},{default:x(()=>[b(S(Fs))]),_:1},8,["class"])],10,sse)):O("v-if",!0)],2)):O("v-if",!0),S(f)?(g(),k("div",{key:1,id:S(p),class:F(S(i).e("body"))},[le(N.$slots,"default")],10,ise)):O("v-if",!0),N.$slots.footer?(g(),k("div",{key:2,class:F(S(i).e("footer"))},[le(N.$slots,"footer")],2)):O("v-if",!0)],16,ose)]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])]),_:3},8,["mask","overlay-class","z-index","onClick"]),[[sn,S(d)]])]),_:3},8,["name","onAfterEnter","onAfterLeave","onBeforeLeave"])],8,["disabled"]))}});var cse=Re(ase,[["__file","drawer.vue"]]);const nA=zt(cse),use=K({inheritAttrs:!1});function dse(e,t,n,o,r,s){return le(e.$slots,"default")}var fse=Re(use,[["render",dse],["__file","collection.vue"]]);const hse=K({name:"ElCollectionItem",inheritAttrs:!1});function pse(e,t,n,o,r,s){return le(e.$slots,"default")}var mse=Re(hse,[["render",pse],["__file","collection-item.vue"]]);const oA="data-el-collection-item",rA=e=>{const t=`El${e}Collection`,n=`${t}Item`,o=Symbol(t),r=Symbol(n),s={...fse,name:t,setup(){const l=H(null),a=new Map;bt(o,{itemMap:a,getItems:()=>{const u=S(l);if(!u)return[];const d=Array.from(u.querySelectorAll(`[${oA}]`));return[...a.values()].sort((h,p)=>d.indexOf(h.ref)-d.indexOf(p.ref))},collectionRef:l})}},i={...mse,name:n,setup(l,{attrs:a}){const c=H(null),u=Pe(o,void 0);bt(r,{collectionItemRef:c}),mt(()=>{const d=S(c);d&&u.itemMap.set(d,{ref:d,...a})}),bn(()=>{const d=S(c);u.itemMap.delete(d)})}};return{COLLECTION_INJECTION_KEY:o,COLLECTION_ITEM_INJECTION_KEY:r,ElCollection:s,ElCollectionItem:i}},gse=qe({style:{type:we([String,Array,Object])},currentTabId:{type:we(String)},defaultCurrentTabId:String,loop:Boolean,dir:{type:String,values:["ltr","rtl"],default:"ltr"},orientation:{type:we(String)},onBlur:Function,onFocus:Function,onMousedown:Function}),{ElCollection:_se,ElCollectionItem:vse,COLLECTION_INJECTION_KEY:O3,COLLECTION_ITEM_INJECTION_KEY:yse}=rA("RovingFocusGroup"),I3=Symbol("elRovingFocusGroup"),sA=Symbol("elRovingFocusGroupItem"),bse={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"},wse=(e,t)=>{if(t!=="rtl")return e;switch(e){case pt.right:return pt.left;case pt.left:return pt.right;default:return e}},kse=(e,t,n)=>{const o=wse(e.key,n);if(!(t==="vertical"&&[pt.left,pt.right].includes(o))&&!(t==="horizontal"&&[pt.up,pt.down].includes(o)))return bse[o]},Cse=(e,t)=>e.map((n,o)=>e[(o+t)%e.length]),N3=e=>{const{activeElement:t}=document;for(const n of e)if(n===t||(n.focus(),t!==document.activeElement))return},v8="currentTabIdChange",y8="rovingFocusGroup.entryFocus",Sse={bubbles:!1,cancelable:!0},$se=K({name:"ElRovingFocusGroupImpl",inheritAttrs:!1,props:gse,emits:[v8,"entryFocus"],setup(e,{emit:t}){var n;const o=H((n=e.currentTabId||e.defaultCurrentTabId)!=null?n:null),r=H(!1),s=H(!1),i=H(null),{getItems:l}=Pe(O3,void 0),a=B(()=>[{outline:"none"},e.style]),c=m=>{t(v8,m)},u=()=>{r.value=!0},d=En(m=>{var v;(v=e.onMousedown)==null||v.call(e,m)},()=>{s.value=!0}),f=En(m=>{var v;(v=e.onFocus)==null||v.call(e,m)},m=>{const v=!S(s),{target:y,currentTarget:E}=m;if(y===E&&v&&!S(r)){const w=new Event(y8,Sse);if(E==null||E.dispatchEvent(w),!w.defaultPrevented){const C=l().filter(P=>P.focusable),T=C.find(P=>P.active),$=C.find(P=>P.id===S(o)),N=[T,$,...C].filter(Boolean).map(P=>P.ref);N3(N)}}s.value=!1}),h=En(m=>{var v;(v=e.onBlur)==null||v.call(e,m)},()=>{r.value=!1}),p=(...m)=>{t("entryFocus",...m)};bt(I3,{currentTabbedId:dc(o),loop:Nn(e,"loop"),tabIndex:B(()=>S(r)?-1:0),rovingFocusGroupRef:i,rovingFocusGroupRootStyle:a,orientation:Nn(e,"orientation"),dir:Nn(e,"dir"),onItemFocus:c,onItemShiftTab:u,onBlur:h,onFocus:f,onMousedown:d}),ke(()=>e.currentTabId,m=>{o.value=m??null}),Tn(i,y8,p)}});function Ese(e,t,n,o,r,s){return le(e.$slots,"default")}var xse=Re($se,[["render",Ese],["__file","roving-focus-group-impl.vue"]]);const Tse=K({name:"ElRovingFocusGroup",components:{ElFocusGroupCollection:_se,ElRovingFocusGroupImpl:xse}});function Mse(e,t,n,o,r,s){const i=z("el-roving-focus-group-impl"),l=z("el-focus-group-collection");return g(),L(l,null,{default:x(()=>[b(i,Hb(hw(e.$attrs)),{default:x(()=>[le(e.$slots,"default")]),_:3},16)]),_:3})}var Ase=Re(Tse,[["render",Mse],["__file","roving-focus-group.vue"]]);const Ose=K({components:{ElRovingFocusCollectionItem:vse},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}=Pe(I3,void 0),{getItems:i}=Pe(O3,void 0),l=Lr(),a=H(null),c=En(h=>{t("mousedown",h)},h=>{e.focusable?r(S(l)):h.preventDefault()}),u=En(h=>{t("focus",h)},()=>{r(S(l))}),d=En(h=>{t("keydown",h)},h=>{const{key:p,shiftKey:m,target:v,currentTarget:y}=h;if(p===pt.tab&&m){s();return}if(v!==y)return;const E=kse(h);if(E){h.preventDefault();let C=i().filter(T=>T.focusable).map(T=>T.ref);switch(E){case"last":{C.reverse();break}case"prev":case"next":{E==="prev"&&C.reverse();const T=C.indexOf(y);C=o.value?Cse(C,T+1):C.slice(T+1);break}}tt(()=>{N3(C)})}}),f=B(()=>n.value===S(l));return bt(sA,{rovingFocusGroupItemRef:a,tabIndex:B(()=>S(f)?0:-1),handleMousedown:c,handleFocus:u,handleKeydown:d}),{id:l,handleKeydown:d,handleFocus:u,handleMousedown:c}}});function Ise(e,t,n,o,r,s){const i=z("el-roving-focus-collection-item");return g(),L(i,{id:e.id,focusable:e.focusable,active:e.active},{default:x(()=>[le(e.$slots,"default")]),_:3},8,["id","focusable","active"])}var Nse=Re(Ose,[["render",Ise],["__file","roving-focus-item.vue"]]);const Qm=qe({trigger:Nh.trigger,effect:{...Xo.effect,default:"light"},type:{type:we(String)},placement:{type:we(String),default:"bottom"},popperOptions:{type:we(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:we([Number,String]),default:0},maxHeight:{type:we([Number,String]),default:""},popperClass:{type:String,default:""},disabled:{type:Boolean,default:!1},role:{type:String,default:"menu"},buttonProps:{type:we(Object)},teleported:Xo.teleported}),iA=qe({command:{type:[Object,String,Number],default:()=>({})},disabled:Boolean,divided:Boolean,textValue:String,icon:{type:Pn}}),Pse=qe({onKeydown:{type:we(Function)}}),Lse=[pt.down,pt.pageDown,pt.home],lA=[pt.up,pt.pageUp,pt.end],Rse=[...Lse,...lA],{ElCollection:Fse,ElCollectionItem:Dse,COLLECTION_INJECTION_KEY:Bse,COLLECTION_ITEM_INJECTION_KEY:Vse}=rA("Dropdown"),z0=Symbol("elDropdown"),{ButtonGroup:zse}=Ze,jse=K({name:"ElDropdown",components:{ElButton:Ze,ElButtonGroup:zse,ElScrollbar:Vo,ElDropdownCollection:Fse,ElTooltip:dd,ElRovingFocusGroup:Ase,ElOnlyChild:hM,ElIcon:ve,ArrowDown:ip},props:Qm,emits:["visible-change","click","command"],setup(e,{emit:t}){const n=nt(),o=Ae("dropdown"),{t:r}=Fn(),s=H(),i=H(),l=H(null),a=H(null),c=H(null),u=H(null),d=H(!1),f=[pt.enter,pt.space,pt.down],h=B(()=>({maxHeight:fo(e.maxHeight)})),p=B(()=>[o.m(T.value)]),m=B(()=>bg(e.trigger)),v=Lr().value,y=B(()=>e.id||v);ke([s,m],([q,X],[ee])=>{var R,ye,Ce;(R=ee==null?void 0:ee.$el)!=null&&R.removeEventListener&&ee.$el.removeEventListener("pointerenter",A),(ye=q==null?void 0:q.$el)!=null&&ye.removeEventListener&&q.$el.removeEventListener("pointerenter",A),(Ce=q==null?void 0:q.$el)!=null&&Ce.addEventListener&&X.includes("hover")&&q.$el.addEventListener("pointerenter",A)},{immediate:!0}),bn(()=>{var q,X;(X=(q=s.value)==null?void 0:q.$el)!=null&&X.removeEventListener&&s.value.$el.removeEventListener("pointerenter",A)});function E(){w()}function w(){var q;(q=l.value)==null||q.onClose()}function C(){var q;(q=l.value)==null||q.onOpen()}const T=ar();function $(...q){t("command",...q)}function A(){var q,X;(X=(q=s.value)==null?void 0:q.$el)==null||X.focus()}function N(){}function P(){const q=S(a);m.value.includes("hover")&&(q==null||q.focus()),u.value=null}function I(q){u.value=q}function D(q){d.value||(q.preventDefault(),q.stopImmediatePropagation())}function V(){t("visible-change",!0)}function G(q){(q==null?void 0:q.type)==="keydown"&&a.value.focus()}function te(){t("visible-change",!1)}return bt(z0,{contentRef:a,role:B(()=>e.role),triggerId:y,isUsingKeyboard:d,onItemEnter:N,onItemLeave:P}),bt("elDropdown",{instance:n,dropdownSize:T,handleClick:E,commandHandler:$,trigger:Nn(e,"trigger"),hideOnClick:Nn(e,"hideOnClick")}),{t:r,ns:o,scrollbar:c,wrapStyle:h,dropdownTriggerKls:p,dropdownSize:T,triggerId:y,triggerKeys:f,currentTabId:u,handleCurrentTabIdChange:I,handlerMainButtonClick:q=>{t("click",q)},handleEntryFocus:D,handleClose:w,handleOpen:C,handleBeforeShowTooltip:V,handleShowTooltip:G,handleBeforeHideTooltip:te,onFocusAfterTrapped:q=>{var X,ee;q.preventDefault(),(ee=(X=a.value)==null?void 0:X.focus)==null||ee.call(X,{preventScroll:!0})},popperRef:l,contentRef:a,triggeringElementRef:s,referenceElementRef:i}}});function Hse(e,t,n,o,r,s){var i;const l=z("el-dropdown-collection"),a=z("el-roving-focus-group"),c=z("el-scrollbar"),u=z("el-only-child"),d=z("el-tooltip"),f=z("el-button"),h=z("arrow-down"),p=z("el-icon"),m=z("el-button-group");return g(),k("div",{class:F([e.ns.b(),e.ns.is("disabled",e.disabled)])},[b(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},Ps({content:x(()=>[b(c,{ref:"scrollbar","wrap-style":e.wrapStyle,tag:"div","view-class":e.ns.e("list")},{default:x(()=>[b(a,{loop:e.loop,"current-tab-id":e.currentTabId,orientation:"horizontal",onCurrentTabIdChange:e.handleCurrentTabIdChange,onEntryFocus:e.handleEntryFocus},{default:x(()=>[b(l,null,{default:x(()=>[le(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:x(()=>[b(u,{id:e.triggerId,ref:"triggeringElementRef",role:"button",tabindex:e.tabindex},{default:x(()=>[le(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?(g(),L(m,{key:0},{default:x(()=>[b(f,pn({ref:"referenceElementRef"},e.buttonProps,{size:e.dropdownSize,type:e.type,disabled:e.disabled,tabindex:e.tabindex,onClick:e.handlerMainButtonClick}),{default:x(()=>[le(e.$slots,"default")]),_:3},16,["size","type","disabled","tabindex","onClick"]),b(f,pn({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:x(()=>[b(p,{class:F(e.ns.e("icon"))},{default:x(()=>[b(h)]),_:1},8,["class"])]),_:1},16,["id","size","type","class","disabled","tabindex","aria-label"])]),_:3})):O("v-if",!0)],2)}var Use=Re(jse,[["render",Hse],["__file","dropdown.vue"]]);const Wse=K({name:"DropdownItemImpl",components:{ElIcon:ve},props:iA,emits:["pointermove","pointerleave","click","clickimpl"],setup(e,{emit:t}){const n=Ae("dropdown"),{role:o}=Pe(z0,void 0),{collectionItemRef:r}=Pe(Vse,void 0),{collectionItemRef:s}=Pe(yse,void 0),{rovingFocusGroupItemRef:i,tabIndex:l,handleFocus:a,handleKeydown:c,handleMousedown:u}=Pe(sA,void 0),d=r3(r,s,i),f=B(()=>o.value==="menu"?"menuitem":o.value==="navigation"?"link":"button"),h=En(p=>{const{code:m}=p;if(m===pt.enter||m===pt.space)return p.preventDefault(),p.stopImmediatePropagation(),t("clickimpl",p),!0},c);return{ns:n,itemRef:d,dataset:{[oA]:""},role:f,tabIndex:l,handleFocus:a,handleKeydown:h,handleMousedown:u}}}),qse=["aria-disabled","tabindex","role"];function Kse(e,t,n,o,r,s){const i=z("el-icon");return g(),k(Q,null,[e.divided?(g(),k("li",pn({key:0,role:"separator",class:e.ns.bem("menu","item","divided")},e.$attrs),null,16)):O("v-if",!0),_("li",pn({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]=Ge((...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?(g(),L(i,{key:0},{default:x(()=>[(g(),L(xt(e.icon)))]),_:1})):O("v-if",!0),le(e.$slots,"default")],16,qse)],64)}var Gse=Re(Wse,[["render",Kse],["__file","dropdown-item-impl.vue"]]);const aA=()=>{const e=Pe("elDropdown",{}),t=B(()=>e==null?void 0:e.dropdownSize);return{elDropdown:e,_elDropdownSize:t}},Yse=K({name:"ElDropdownItem",components:{ElDropdownCollectionItem:Dse,ElRovingFocusItem:Nse,ElDropdownItemImpl:Gse},inheritAttrs:!1,props:iA,emits:["pointermove","pointerleave","click"],setup(e,{emit:t,attrs:n}){const{elDropdown:o}=aA(),r=nt(),s=H(null),i=B(()=>{var h,p;return(p=(h=S(s))==null?void 0:h.textContent)!=null?p:""}),{onItemEnter:l,onItemLeave:a}=Pe(z0,void 0),c=En(h=>(t("pointermove",h),h.defaultPrevented),M5(h=>{if(e.disabled){a(h);return}const p=h.currentTarget;p===document.activeElement||p.contains(document.activeElement)||(l(h),h.defaultPrevented||p==null||p.focus())})),u=En(h=>(t("pointerleave",h),h.defaultPrevented),M5(h=>{a(h)})),d=En(h=>{if(!e.disabled)return t("click",h),h.type!=="keydown"&&h.defaultPrevented},h=>{var p,m,v;if(e.disabled){h.stopImmediatePropagation();return}(p=o==null?void 0:o.hideOnClick)!=null&&p.value&&((m=o.handleClick)==null||m.call(o)),(v=o.commandHandler)==null||v.call(o,e.command,r,h)}),f=B(()=>({...e,...n}));return{handleClick:d,handlePointerMove:c,handlePointerLeave:u,textContent:i,propsAndAttrs:f}}});function Jse(e,t,n,o,r,s){var i;const l=z("el-dropdown-item-impl"),a=z("el-roving-focus-item"),c=z("el-dropdown-collection-item");return g(),L(c,{disabled:e.disabled,"text-value":(i=e.textValue)!=null?i:e.textContent},{default:x(()=>[b(a,{focusable:!e.disabled},{default:x(()=>[b(l,pn(e.propsAndAttrs,{onPointerleave:e.handlePointerLeave,onPointermove:e.handlePointerMove,onClickimpl:e.handleClick}),{default:x(()=>[le(e.$slots,"default")]),_:3},16,["onPointerleave","onPointermove","onClickimpl"])]),_:3},8,["focusable"])]),_:3},8,["disabled","text-value"])}var cA=Re(Yse,[["render",Jse],["__file","dropdown-item.vue"]]);const Zse=K({name:"ElDropdownMenu",props:Pse,setup(e){const t=Ae("dropdown"),{_elDropdownSize:n}=aA(),o=n.value,{focusTrapRef:r,onKeydown:s}=Pe(C3,void 0),{contentRef:i,role:l,triggerId:a}=Pe(z0,void 0),{collectionRef:c,getItems:u}=Pe(Bse,void 0),{rovingFocusGroupRef:d,rovingFocusGroupRootStyle:f,tabIndex:h,onBlur:p,onFocus:m,onMousedown:v}=Pe(I3,void 0),{collectionRef:y}=Pe(O3,void 0),E=B(()=>[t.b("menu"),t.bm("menu",o==null?void 0:o.value)]),w=r3(i,c,r,d,y),C=En($=>{var A;(A=e.onKeydown)==null||A.call(e,$)},$=>{const{currentTarget:A,code:N,target:P}=$;if(A.contains(P),pt.tab===N&&$.stopImmediatePropagation(),$.preventDefault(),P!==S(i)||!Rse.includes(N))return;const D=u().filter(V=>!V.disabled).map(V=>V.ref);lA.includes(N)&&D.reverse(),N3(D)});return{size:o,rovingFocusGroupRootStyle:f,tabIndex:h,dropdownKls:E,role:l,triggerId:a,dropdownListWrapperRef:w,handleKeydown:$=>{C($),s($)},onBlur:p,onFocus:m,onMousedown:v}}}),Xse=["role","aria-labelledby"];function Qse(e,t,n,o,r,s){return g(),k("ul",{ref:e.dropdownListWrapperRef,class:F(e.dropdownKls),style:Be(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]=Ge((...i)=>e.handleKeydown&&e.handleKeydown(...i),["self"])),onMousedown:t[3]||(t[3]=Ge((...i)=>e.onMousedown&&e.onMousedown(...i),["self"]))},[le(e.$slots,"default")],46,Xse)}var uA=Re(Zse,[["render",Qse],["__file","dropdown-menu.vue"]]);const eie=zt(Use,{DropdownItem:cA,DropdownMenu:uA}),tie=Hn(cA),nie=Hn(uA),oie=qe({urlList:{type:we(Array),default:()=>vo([])},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:we(String)}}),rie={close:()=>!0,switch:e=>Et(e),rotate:e=>Et(e)},sie=["src","crossorigin"],iie=K({name:"ElImageViewer"}),lie=K({...iie,props:oie,emits:rie,setup(e,{expose:t,emit:n}){var o;const r=e,s={CONTAIN:{name:"contain",icon:ns(pT)},ORIGINAL:{name:"original",icon:ns(bZ)}},{t:i}=Fn(),l=Ae("image-viewer"),{nextZIndex:a}=P0(),c=H(),u=H([]),d=K9(),f=H(!0),h=H(r.initialIndex),p=Cn(s.CONTAIN),m=H({scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}),v=H((o=r.zIndex)!=null?o:a()),y=B(()=>{const{urlList:R}=r;return R.length<=1}),E=B(()=>h.value===0),w=B(()=>h.value===r.urlList.length-1),C=B(()=>r.urlList[h.value]),T=B(()=>[l.e("btn"),l.e("prev"),l.is("disabled",!r.infinite&&E.value)]),$=B(()=>[l.e("btn"),l.e("next"),l.is("disabled",!r.infinite&&w.value)]),A=B(()=>{const{scale:R,deg:ye,offsetX:Ce,offsetY:U,enableTransition:xe}=m.value;let Ye=Ce/R,Fe=U/R;switch(ye%360){case 90:case-270:[Ye,Fe]=[Fe,-Ye];break;case 180:case-180:[Ye,Fe]=[-Ye,-Fe];break;case 270:case-90:[Ye,Fe]=[-Fe,Ye];break}const Z={transform:`scale(${R}) rotate(${ye}deg) translate(${Ye}px, ${Fe}px)`,transition:xe?"transform .3s":""};return p.value.name===s.CONTAIN.name&&(Z.maxWidth=Z.maxHeight="100%"),Z});function N(){I(),n("close")}function P(){const R=J_(Ce=>{switch(Ce.code){case pt.esc:r.closeOnPressEscape&&N();break;case pt.space:oe();break;case pt.left:q();break;case pt.up:ee("zoomIn");break;case pt.right:X();break;case pt.down:ee("zoomOut");break}}),ye=J_(Ce=>{const U=Ce.deltaY||Ce.deltaX;ee(U<0?"zoomIn":"zoomOut",{zoomRate:r.zoomRate,enableTransition:!1})});d.run(()=>{Tn(document,"keydown",R),Tn(document,"wheel",ye)})}function I(){d.stop()}function D(){f.value=!1}function V(R){f.value=!1,R.target.alt=i("el.image.error")}function G(R){if(f.value||R.button!==0||!c.value)return;m.value.enableTransition=!1;const{offsetX:ye,offsetY:Ce}=m.value,U=R.pageX,xe=R.pageY,Ye=J_(Z=>{m.value={...m.value,offsetX:ye+Z.pageX-U,offsetY:Ce+Z.pageY-xe}}),Fe=Tn(document,"mousemove",Ye);Tn(document,"mouseup",()=>{Fe()}),R.preventDefault()}function te(){m.value={scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}}function oe(){if(f.value)return;const R=qy(s),ye=Object.values(s),Ce=p.value.name,xe=(ye.findIndex(Ye=>Ye.name===Ce)+1)%R.length;p.value=s[R[xe]],te()}function J(R){const ye=r.urlList.length;h.value=(R+ye)%ye}function q(){E.value&&!r.infinite||J(h.value-1)}function X(){w.value&&!r.infinite||J(h.value+1)}function ee(R,ye={}){if(f.value)return;const{minScale:Ce,maxScale:U}=r,{zoomRate:xe,rotateDeg:Ye,enableTransition:Fe}={zoomRate:r.zoomRate,rotateDeg:90,enableTransition:!0,...ye};switch(R){case"zoomOut":m.value.scale>Ce&&(m.value.scale=Number.parseFloat((m.value.scale/xe).toFixed(3)));break;case"zoomIn":m.value.scale<U&&(m.value.scale=Number.parseFloat((m.value.scale*xe).toFixed(3)));break;case"clockwise":m.value.deg+=Ye,n("rotate",m.value.deg);break;case"anticlockwise":m.value.deg-=Ye,n("rotate",m.value.deg);break}m.value.enableTransition=Fe}return ke(C,()=>{tt(()=>{const R=u.value[0];R!=null&&R.complete||(f.value=!0)})}),ke(h,R=>{te(),n("switch",R)}),mt(()=>{var R,ye;P(),(ye=(R=c.value)==null?void 0:R.focus)==null||ye.call(R)}),t({setActiveItem:J}),(R,ye)=>(g(),L(sr,{to:"body",disabled:!R.teleported},[b(ur,{name:"viewer-fade",appear:""},{default:x(()=>[_("div",{ref_key:"wrapper",ref:c,tabindex:-1,class:F(S(l).e("wrapper")),style:Be({zIndex:v.value})},[_("div",{class:F(S(l).e("mask")),onClick:ye[0]||(ye[0]=Ge(Ce=>R.hideOnClickModal&&N(),["self"]))},null,2),O(" CLOSE "),_("span",{class:F([S(l).e("btn"),S(l).e("close")]),onClick:N},[b(S(ve),null,{default:x(()=>[b(S(Fs))]),_:1})],2),O(" ARROW "),S(y)?O("v-if",!0):(g(),k(Q,{key:0},[_("span",{class:F(S(T)),onClick:q},[b(S(ve),null,{default:x(()=>[b(S(T0))]),_:1})],2),_("span",{class:F(S($)),onClick:X},[b(S(ve),null,{default:x(()=>[b(S(cd))]),_:1})],2)],64)),O(" ACTIONS "),_("div",{class:F([S(l).e("btn"),S(l).e("actions")])},[_("div",{class:F(S(l).e("actions__inner"))},[b(S(ve),{onClick:ye[1]||(ye[1]=Ce=>ee("zoomOut"))},{default:x(()=>[b(S(DZ))]),_:1}),b(S(ve),{onClick:ye[2]||(ye[2]=Ce=>ee("zoomIn"))},{default:x(()=>[b(S(bT))]),_:1}),_("i",{class:F(S(l).e("actions__divider"))},null,2),b(S(ve),{onClick:oe},{default:x(()=>[(g(),L(xt(S(p).icon)))]),_:1}),_("i",{class:F(S(l).e("actions__divider"))},null,2),b(S(ve),{onClick:ye[3]||(ye[3]=Ce=>ee("anticlockwise"))},{default:x(()=>[b(S(_T))]),_:1}),b(S(ve),{onClick:ye[4]||(ye[4]=Ce=>ee("clockwise"))},{default:x(()=>[b(S(vZ))]),_:1})],2)],2),O(" CANVAS "),_("div",{class:F(S(l).e("canvas"))},[(g(!0),k(Q,null,Me(R.urlList,(Ce,U)=>Ve((g(),k("img",{ref_for:!0,ref:xe=>u.value[U]=xe,key:Ce,src:Ce,style:Be(S(A)),class:F(S(l).e("img")),crossorigin:R.crossorigin,onLoad:D,onError:V,onMousedown:G},null,46,sie)),[[sn,U===h.value]])),128))],2),le(R.$slots,"default")],6)]),_:3})],8,["disabled"]))}});var aie=Re(lie,[["__file","image-viewer.vue"]]);const cie=zt(aie),uie=qe({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:we([String,Object])},previewSrcList:{type:we(Array),default:()=>vo([])},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:we(String)}}),die={load:e=>e instanceof Event,error:e=>e instanceof Event,switch:e=>Et(e),close:()=>!0,show:()=>!0},fie=["src","loading","crossorigin"],hie={key:0},pie=K({name:"ElImage",inheritAttrs:!1}),mie=K({...pie,props:uie,emits:die,setup(e,{emit:t}){const n=e;let o="";const{t:r}=Fn(),s=Ae("image"),i=cw(),l=ET(),a=H(),c=H(!1),u=H(!0),d=H(!1),f=H(),h=H(),p=kt&&"loading"in HTMLImageElement.prototype;let m,v;const y=B(()=>[s.e("inner"),C.value&&s.e("preview"),u.value&&s.is("loading")]),E=B(()=>i.style),w=B(()=>{const{fit:X}=n;return kt&&X?{objectFit:X}:{}}),C=B(()=>{const{previewSrcList:X}=n;return Array.isArray(X)&&X.length>0}),T=B(()=>{const{previewSrcList:X,initialIndex:ee}=n;let R=ee;return ee>X.length-1&&(R=0),R}),$=B(()=>n.loading==="eager"?!1:!p&&n.loading==="lazy"||n.lazy),A=()=>{kt&&(u.value=!0,c.value=!1,a.value=n.src)};function N(X){u.value=!1,c.value=!1,t("load",X)}function P(X){u.value=!1,c.value=!0,t("error",X)}function I(){PH(f.value,h.value)&&(A(),G())}const D=hH(I,200,!0);async function V(){var X;if(!kt)return;await tt();const{scrollContainer:ee}=n;is(ee)?h.value=ee:je(ee)&&ee!==""?h.value=(X=document.querySelector(ee))!=null?X:void 0:f.value&&(h.value=zY(f.value)),h.value&&(m=Tn(h,"scroll",D),setTimeout(()=>I(),100))}function G(){!kt||!h.value||!D||(m==null||m(),h.value=void 0)}function te(X){if(X.ctrlKey){if(X.deltaY<0)return X.preventDefault(),!1;if(X.deltaY>0)return X.preventDefault(),!1}}function oe(){C.value&&(v=Tn("wheel",te,{passive:!1}),o=document.body.style.overflow,document.body.style.overflow="hidden",d.value=!0,t("show"))}function J(){v==null||v(),document.body.style.overflow=o,d.value=!1,t("close")}function q(X){t("switch",X)}return ke(()=>n.src,()=>{$.value?(u.value=!0,c.value=!1,G(),V()):A()}),mt(()=>{$.value?V():A()}),(X,ee)=>(g(),k("div",{ref_key:"container",ref:f,class:F([S(s).b(),X.$attrs.class]),style:Be(S(E))},[c.value?le(X.$slots,"error",{key:0},()=>[_("div",{class:F(S(s).e("error"))},M(S(r)("el.image.error")),3)]):(g(),k(Q,{key:1},[a.value!==void 0?(g(),k("img",pn({key:0},S(l),{src:a.value,loading:X.loading,style:S(w),class:S(y),crossorigin:X.crossorigin,onClick:oe,onLoad:N,onError:P}),null,16,fie)):O("v-if",!0),u.value?(g(),k("div",{key:1,class:F(S(s).e("wrapper"))},[le(X.$slots,"placeholder",{},()=>[_("div",{class:F(S(s).e("placeholder"))},null,2)])],2)):O("v-if",!0)],64)),S(C)?(g(),k(Q,{key:2},[d.value?(g(),L(S(cie),{key:0,"z-index":X.zIndex,"initial-index":S(T),infinite:X.infinite,"zoom-rate":X.zoomRate,"min-scale":X.minScale,"max-scale":X.maxScale,"url-list":X.previewSrcList,"hide-on-click-modal":X.hideOnClickModal,teleported:X.previewTeleported,"close-on-press-escape":X.closeOnPressEscape,onClose:J,onSwitch:q},{default:x(()=>[X.$slots.viewer?(g(),k("div",hie,[le(X.$slots,"viewer")])):O("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"])):O("v-if",!0)],64)):O("v-if",!0)],6))}});var gie=Re(mie,[["__file","image.vue"]]);const Hl=zt(gie),_ie=qe({type:{type:String,values:["primary","success","warning","info","danger","default"],default:"default"},underline:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},href:{type:String,default:""},target:{type:String,default:"_self"},icon:{type:Pn}}),vie={click:e=>e instanceof MouseEvent},yie=["href","target"],bie=K({name:"ElLink"}),wie=K({...bie,props:_ie,emits:vie,setup(e,{emit:t}){const n=e,o=Ae("link"),r=B(()=>[o.b(),o.m(n.type),o.is("disabled",n.disabled),o.is("underline",n.underline&&!n.disabled)]);function s(i){n.disabled||t("click",i)}return(i,l)=>(g(),k("a",{class:F(S(r)),href:i.disabled||!i.href?void 0:i.href,target:i.disabled||!i.href?void 0:i.target,onClick:s},[i.icon?(g(),L(S(ve),{key:0},{default:x(()=>[(g(),L(xt(i.icon)))]),_:1})):O("v-if",!0),i.$slots.default?(g(),k("span",{key:1,class:F(S(o).e("inner"))},[le(i.$slots,"default")],2)):O("v-if",!0),i.$slots.icon?le(i.$slots,"icon",{key:2}):O("v-if",!0)],10,yie))}});var kie=Re(wie,[["__file","link.vue"]]);const Cie=zt(kie),dA=Symbol("elPaginationKey"),Sie=qe({disabled:Boolean,currentPage:{type:Number,default:1},prevText:{type:String},prevIcon:{type:Pn}}),$ie={click:e=>e instanceof MouseEvent},Eie=["disabled","aria-label","aria-disabled"],xie={key:0},Tie=K({name:"ElPaginationPrev"}),Mie=K({...Tie,props:Sie,emits:$ie,setup(e){const t=e,{t:n}=Fn(),o=B(()=>t.disabled||t.currentPage<=1);return(r,s)=>(g(),k("button",{type:"button",class:"btn-prev",disabled:S(o),"aria-label":r.prevText||S(n)("el.pagination.prev"),"aria-disabled":S(o),onClick:s[0]||(s[0]=i=>r.$emit("click",i))},[r.prevText?(g(),k("span",xie,M(r.prevText),1)):(g(),L(S(ve),{key:1},{default:x(()=>[(g(),L(xt(r.prevIcon)))]),_:1}))],8,Eie))}});var Aie=Re(Mie,[["__file","prev.vue"]]);const Oie=qe({disabled:Boolean,currentPage:{type:Number,default:1},pageCount:{type:Number,default:50},nextText:{type:String},nextIcon:{type:Pn}}),Iie=["disabled","aria-label","aria-disabled"],Nie={key:0},Pie=K({name:"ElPaginationNext"}),Lie=K({...Pie,props:Oie,emits:["click"],setup(e){const t=e,{t:n}=Fn(),o=B(()=>t.disabled||t.currentPage===t.pageCount||t.pageCount===0);return(r,s)=>(g(),k("button",{type:"button",class:"btn-next",disabled:S(o),"aria-label":r.nextText||S(n)("el.pagination.next"),"aria-disabled":S(o),onClick:s[0]||(s[0]=i=>r.$emit("click",i))},[r.nextText?(g(),k("span",Nie,M(r.nextText),1)):(g(),L(S(ve),{key:1},{default:x(()=>[(g(),L(xt(r.nextIcon)))]),_:1}))],8,Iie))}});var Rie=Re(Lie,[["__file","next.vue"]]);const fA=Symbol("ElSelectGroup"),j0=Symbol("ElSelect");function Fie(e,t){const n=Pe(j0),o=Pe(fA,{disabled:!1}),r=B(()=>n.props.multiple?u(n.props.modelValue,e.value):u([n.props.modelValue],e.value)),s=B(()=>{if(n.props.multiple){const h=n.props.modelValue||[];return!r.value&&h.length>=n.props.multipleLimit&&n.props.multipleLimit>0}else return!1}),i=B(()=>e.label||(it(e.value)?"":e.value)),l=B(()=>e.value||e.label||""),a=B(()=>e.disabled||t.groupDisabled||s.value),c=nt(),u=(h=[],p)=>{if(it(e.value)){const m=n.props.valueKey;return h&&h.some(v=>Ct(wr(v,m))===wr(p,m))}else return h&&h.includes(p)},d=()=>{!e.disabled&&!o.disabled&&(n.states.hoveringIndex=n.optionsArray.indexOf(c.proxy))},f=h=>{const p=new RegExp(FY(h),"i");t.visible=p.test(i.value)||e.created};return ke(()=>i.value,()=>{!e.created&&!n.props.remote&&n.setSelected()}),ke(()=>e.value,(h,p)=>{const{remote:m,valueKey:v}=n.props;if(Qa(h,p)||(n.onOptionDestroy(p,c.proxy),n.onOptionCreate(c.proxy)),!e.created&&!m){if(v&&it(h)&&it(p)&&h[v]===p[v])return;n.setSelected()}}),ke(()=>o.disabled,()=>{t.groupDisabled=o.disabled},{immediate:!0}),{select:n,currentLabel:i,currentValue:l,itemSelected:r,isDisabled:a,hoverItem:d,updateOption:f}}const Die=K({name:"ElOption",componentName:"ElOption",props:{value:{required:!0,type:[String,Number,Boolean,Object]},label:[String,Number],created:Boolean,disabled:Boolean},setup(e){const t=Ae("select"),n=Lr(),o=B(()=>[t.be("dropdown","item"),t.is("disabled",S(l)),t.is("selected",S(i)),t.is("hovering",S(f))]),r=jn({index:-1,groupDisabled:!1,visible:!0,hover:!1}),{currentLabel:s,itemSelected:i,isDisabled:l,select:a,hoverItem:c,updateOption:u}=Fie(e,r),{visible:d,hover:f}=Hs(r),h=nt().proxy;a.onOptionCreate(h),bn(()=>{const m=h.value,{selected:v}=a.states,E=(a.props.multiple?v:[v]).some(w=>w.value===h.value);tt(()=>{a.states.cachedOptions.get(m)===h&&!E&&a.states.cachedOptions.delete(m)}),a.onOptionDestroy(m,h)});function p(){e.disabled!==!0&&r.groupDisabled!==!0&&a.handleOptionSelect(h)}return{ns:t,id:n,containerKls:o,currentLabel:s,itemSelected:i,isDisabled:l,select:a,hoverItem:c,updateOption:u,visible:d,hover:f,selectOptionClick:p,states:r}}}),Bie=["id","aria-disabled","aria-selected"];function Vie(e,t,n,o,r,s){return Ve((g(),k("li",{id:e.id,class:F(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]=Ge((...i)=>e.selectOptionClick&&e.selectOptionClick(...i),["stop"]))},[le(e.$slots,"default",{},()=>[_("span",null,M(e.currentLabel),1)])],42,Bie)),[[sn,e.visible]])}var P3=Re(Die,[["render",Vie],["__file","option.vue"]]);const zie=K({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const e=Pe(j0),t=Ae("select"),n=B(()=>e.props.popperClass),o=B(()=>e.props.multiple),r=B(()=>e.props.fitInputWidth),s=H("");function i(){var l;s.value=`${(l=e.selectRef)==null?void 0:l.offsetWidth}px`}return mt(()=>{i(),Oo(e.selectRef,i)}),{ns:t,minWidth:s,popperClass:n,isMultiple:o,isFitInputWidth:r}}});function jie(e,t,n,o,r,s){return g(),k("div",{class:F([e.ns.b("dropdown"),e.ns.is("multiple",e.isMultiple),e.popperClass]),style:Be({[e.isFitInputWidth?"width":"minWidth"]:e.minWidth})},[e.$slots.header?(g(),k("div",{key:0,class:F(e.ns.be("dropdown","header"))},[le(e.$slots,"header")],2)):O("v-if",!0),le(e.$slots,"default"),e.$slots.footer?(g(),k("div",{key:1,class:F(e.ns.be("dropdown","footer"))},[le(e.$slots,"footer")],2)):O("v-if",!0)],6)}var Hie=Re(zie,[["render",jie],["__file","select-dropdown.vue"]]);function Uie(e){const t=H(!1);return{handleCompositionStart:()=>{t.value=!0},handleCompositionUpdate:s=>{const i=s.target.value,l=i[i.length-1]||"";t.value=!$T(l)},handleCompositionEnd:s=>{t.value&&(t.value=!1,Ue(e)&&e(s))}}}const Wie=11,qie=(e,t)=>{const{t:n}=Fn(),o=Lr(),r=Ae("select"),s=Ae("input"),i=jn({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=H(null),a=H(null),c=H(null),u=H(null),d=H(null),f=H(null),h=H(null),p=H(null),m=H(null),v=H(null),y=H(null),E=H(null),{wrapperRef:w,isFocused:C,handleFocus:T,handleBlur:$}=y3(d,{afterFocus(){e.automaticDropdown&&!A.value&&(A.value=!0,i.menuVisibleOnFocus=!0)},beforeBlur(ue){var Ne,Ut;return((Ne=c.value)==null?void 0:Ne.isFocusInsideContent(ue))||((Ut=u.value)==null?void 0:Ut.isFocusInsideContent(ue))},afterBlur(){A.value=!1,i.menuVisibleOnFocus=!1}}),A=H(!1),N=H(),{form:P,formItem:I}=Ti(),{inputId:D}=_c(e,{formItemContext:I}),{valueOnClear:V,isEmptyValue:G}=GQ(e),te=B(()=>e.disabled||(P==null?void 0:P.disabled)),oe=B(()=>e.multiple?Ee(e.modelValue)&&e.modelValue.length>0:!G(e.modelValue)),J=B(()=>e.clearable&&!te.value&&i.inputHovering&&oe.value),q=B(()=>e.remote&&e.filterable&&!e.remoteShowSuffix?"":e.suffixIcon),X=B(()=>r.is("reverse",q.value&&A.value)),ee=B(()=>(I==null?void 0:I.validateState)||""),R=B(()=>CT[ee.value]),ye=B(()=>e.remote?300:0),Ce=B(()=>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&&U.value===0?e.noMatchText||n("el.select.noMatch"):i.options.size===0?e.noDataText||n("el.select.noData"):null),U=B(()=>xe.value.filter(ue=>ue.visible).length),xe=B(()=>{const ue=Array.from(i.options.values()),Ne=[];return i.optionValues.forEach(Ut=>{const kn=ue.findIndex(Li=>Li.value===Ut);kn>-1&&Ne.push(ue[kn])}),Ne.length>=ue.length?Ne:ue}),Ye=B(()=>Array.from(i.cachedOptions.values())),Fe=B(()=>{const ue=xe.value.filter(Ne=>!Ne.created).some(Ne=>Ne.currentLabel===i.inputValue);return e.filterable&&e.allowCreate&&i.inputValue!==""&&!ue}),Z=()=>{e.filterable&&Ue(e.filterMethod)||e.filterable&&e.remote&&Ue(e.remoteMethod)||xe.value.forEach(ue=>{var Ne;(Ne=ue.updateOption)==null||Ne.call(ue,i.inputValue)})},ce=ar(),pe=B(()=>["small"].includes(ce.value)?"small":"default"),ie=B({get(){return A.value&&Ce.value!==!1},set(ue){A.value=ue}}),Le=B(()=>Ee(e.modelValue)?e.modelValue.length===0&&!i.inputValue:e.filterable?!i.inputValue:!0),et=B(()=>{var ue;const Ne=(ue=e.placeholder)!=null?ue:n("el.select.placeholder");return e.multiple||!oe.value?Ne:i.selectedLabel});ke(()=>e.modelValue,(ue,Ne)=>{e.multiple&&e.filterable&&!e.reserveKeyword&&(i.inputValue="",j("")),re(),!Qa(ue,Ne)&&e.validateEvent&&(I==null||I.validate("change").catch(Ut=>void 0))},{flush:"post",deep:!0}),ke(()=>A.value,ue=>{ue?j(i.inputValue):(i.inputValue="",i.previousQuery=null,i.isBeforeHide=!0),t("visible-change",ue)}),ke(()=>i.options.entries(),()=>{var ue;if(!kt)return;const Ne=((ue=l.value)==null?void 0:ue.querySelectorAll("input"))||[];(!e.filterable&&!e.defaultFirstOption&&!bi(e.modelValue)||!Array.from(Ne).includes(document.activeElement))&&re(),e.defaultFirstOption&&(e.filterable||e.remote)&&U.value&&W()},{flush:"post"}),ke(()=>i.hoveringIndex,ue=>{Et(ue)&&ue>-1?N.value=xe.value[ue]||{}:N.value={},xe.value.forEach(Ne=>{Ne.hover=N.value===Ne})}),Yr(()=>{i.isBeforeHide||Z()});const j=ue=>{i.previousQuery!==ue&&(i.previousQuery=ue,e.filterable&&Ue(e.filterMethod)?e.filterMethod(ue):e.filterable&&e.remote&&Ue(e.remoteMethod)&&e.remoteMethod(ue),e.defaultFirstOption&&(e.filterable||e.remote)&&U.value?tt(W):tt(de))},W=()=>{const ue=xe.value.filter(kn=>kn.visible&&!kn.disabled&&!kn.states.groupDisabled),Ne=ue.find(kn=>kn.created),Ut=ue[0];i.hoveringIndex=rt(xe.value,Ne||Ut)},re=()=>{if(e.multiple)i.selectedLabel="";else{const Ne=he(e.modelValue);i.selectedLabel=Ne.currentLabel,i.selected=Ne;return}const ue=[];Ee(e.modelValue)&&e.modelValue.forEach(Ne=>{ue.push(he(Ne))}),i.selected=ue},he=ue=>{let Ne;const Ut=Rm(ue).toLowerCase()==="object",kn=Rm(ue).toLowerCase()==="null",Li=Rm(ue).toLowerCase()==="undefined";for(let Zl=i.cachedOptions.size-1;Zl>=0;Zl--){const ps=Ye.value[Zl];if(Ut?wr(ps.value,e.valueKey)===wr(ue,e.valueKey):ps.value===ue){Ne={value:ue,currentLabel:ps.currentLabel,isDisabled:ps.isDisabled};break}}if(Ne)return Ne;const Sc=Ut?ue.label:!kn&&!Li?ue:"";return{value:ue,currentLabel:Sc}},de=()=>{e.multiple?i.hoveringIndex=xe.value.findIndex(ue=>i.selected.some(Ne=>Ld(Ne)===Ld(ue))):i.hoveringIndex=xe.value.findIndex(ue=>Ld(ue)===Ld(i.selected))},Se=()=>{i.selectionWidth=a.value.getBoundingClientRect().width},Oe=()=>{i.calculatorWidth=f.value.getBoundingClientRect().width},be=()=>{i.collapseItemWidth=y.value.getBoundingClientRect().width},$e=()=>{var ue,Ne;(Ne=(ue=c.value)==null?void 0:ue.updatePopper)==null||Ne.call(ue)},ge=()=>{var ue,Ne;(Ne=(ue=u.value)==null?void 0:ue.updatePopper)==null||Ne.call(ue)},De=()=>{i.inputValue.length>0&&!A.value&&(A.value=!0),j(i.inputValue)},Ke=ue=>{if(i.inputValue=ue.target.value,e.remote)se();else return De()},se=Xa(()=>{De()},ye.value),Y=ue=>{Qa(e.modelValue,ue)||t(tc,ue)},ae=ue=>CY(ue,Ne=>!i.disabledOptions.has(Ne)),Ie=ue=>{if(e.multiple&&ue.code!==pt.delete&&ue.target.value.length<=0){const Ne=e.modelValue.slice(),Ut=ae(Ne);if(Ut<0)return;Ne.splice(Ut,1),t(Wt,Ne),Y(Ne)}},We=(ue,Ne)=>{const Ut=i.selected.indexOf(Ne);if(Ut>-1&&!te.value){const kn=e.modelValue.slice();kn.splice(Ut,1),t(Wt,kn),Y(kn),t("remove-tag",Ne.value)}ue.stopPropagation(),Cc()},_e=ue=>{ue.stopPropagation();const Ne=e.multiple?[]:V.value;if(e.multiple)for(const Ut of i.selected)Ut.isDisabled&&Ne.push(Ut.value);t(Wt,Ne),Y(Ne),i.hoveringIndex=-1,A.value=!1,t("clear"),Cc()},He=ue=>{if(e.multiple){const Ne=(e.modelValue||[]).slice(),Ut=rt(Ne,ue.value);Ut>-1?Ne.splice(Ut,1):(e.multipleLimit<=0||Ne.length<e.multipleLimit)&&Ne.push(ue.value),t(Wt,Ne),Y(Ne),ue.created&&j(""),e.filterable&&!e.reserveKeyword&&(i.inputValue="")}else t(Wt,ue.value),Y(ue.value),A.value=!1;Cc(),!A.value&&tt(()=>{Qe(ue)})},rt=(ue=[],Ne)=>{if(!it(Ne))return ue.indexOf(Ne);const Ut=e.valueKey;let kn=-1;return ue.some((Li,Sc)=>Ct(wr(Li,Ut))===wr(Ne,Ut)?(kn=Sc,!0):!1),kn},Qe=ue=>{var Ne,Ut,kn,Li,Sc;const jp=Ee(ue)?ue[0]:ue;let Zl=null;if(jp!=null&&jp.value){const ps=xe.value.filter(o4=>o4.value===jp.value);ps.length>0&&(Zl=ps[0].$el)}if(c.value&&Zl){const ps=(Li=(kn=(Ut=(Ne=c.value)==null?void 0:Ne.popperRef)==null?void 0:Ut.contentRef)==null?void 0:kn.querySelector)==null?void 0:Li.call(kn,`.${r.be("dropdown","wrap")}`);ps&&HY(ps,Zl)}(Sc=E.value)==null||Sc.handleScroll()},yt=ue=>{i.options.set(ue.value,ue),i.cachedOptions.set(ue.value,ue),ue.disabled&&i.disabledOptions.set(ue.value,ue)},Kt=(ue,Ne)=>{i.options.get(ue)===Ne&&i.options.delete(ue)},{handleCompositionStart:gt,handleCompositionUpdate:Jt,handleCompositionEnd:an}=Uie(ue=>Ke(ue)),T_=B(()=>{var ue,Ne;return(Ne=(ue=c.value)==null?void 0:ue.popperRef)==null?void 0:Ne.contentRef}),M_=()=>{i.isBeforeHide=!1,tt(()=>Qe(i.selected))},Cc=()=>{var ue;(ue=d.value)==null||ue.focus()},Pd=()=>{e4()},A_=ue=>{_e(ue)},e4=ue=>{if(A.value=!1,C.value){const Ne=new FocusEvent("focus",ue);tt(()=>$(Ne))}},LR=()=>{i.inputValue.length>0?i.inputValue="":A.value=!1},t4=()=>{te.value||(i.menuVisibleOnFocus?i.menuVisibleOnFocus=!1:A.value=!A.value)},RR=()=>{A.value?xe.value[i.hoveringIndex]&&He(xe.value[i.hoveringIndex]):t4()},Ld=ue=>it(ue.value)?wr(ue.value,e.valueKey):ue.value,FR=B(()=>xe.value.filter(ue=>ue.visible).every(ue=>ue.disabled)),DR=B(()=>e.multiple?e.collapseTags?i.selected.slice(0,e.maxCollapseTags):i.selected:[]),BR=B(()=>e.multiple?e.collapseTags?i.selected.slice(e.maxCollapseTags):[]:[]),n4=ue=>{if(!A.value){A.value=!0;return}if(!(i.options.size===0||U.value===0)&&!FR.value){ue==="next"?(i.hoveringIndex++,i.hoveringIndex===i.options.size&&(i.hoveringIndex=0)):ue==="prev"&&(i.hoveringIndex--,i.hoveringIndex<0&&(i.hoveringIndex=i.options.size-1));const Ne=xe.value[i.hoveringIndex];(Ne.disabled===!0||Ne.states.groupDisabled===!0||!Ne.visible)&&n4(ue),tt(()=>Qe(N.value))}},VR=()=>{if(!a.value)return 0;const ue=window.getComputedStyle(a.value);return Number.parseFloat(ue.gap||"6px")},zR=B(()=>{const ue=VR();return{maxWidth:`${y.value&&e.maxCollapseTags===1?i.selectionWidth-i.collapseItemWidth-ue:i.selectionWidth}px`}}),jR=B(()=>({maxWidth:`${i.selectionWidth}px`})),HR=B(()=>({width:`${Math.max(i.calculatorWidth,Wie)}px`}));return e.multiple&&!Ee(e.modelValue)&&t(Wt,[]),!e.multiple&&Ee(e.modelValue)&&t(Wt,""),Oo(a,Se),Oo(f,Oe),Oo(m,$e),Oo(w,$e),Oo(v,ge),Oo(y,be),mt(()=>{re()}),{inputId:D,contentId:o,nsSelect:r,nsInput:s,states:i,isFocused:C,expanded:A,optionsArray:xe,hoverOption:N,selectSize:ce,filteredOptionsCount:U,resetCalculatorWidth:Oe,updateTooltip:$e,updateTagTooltip:ge,debouncedOnInputChange:se,onInput:Ke,deletePrevTag:Ie,deleteTag:We,deleteSelected:_e,handleOptionSelect:He,scrollToOption:Qe,hasModelValue:oe,shouldShowPlaceholder:Le,currentPlaceholder:et,showClose:J,iconComponent:q,iconReverse:X,validateState:ee,validateIcon:R,showNewOption:Fe,updateOptions:Z,collapseTagSize:pe,setSelected:re,selectDisabled:te,emptyText:Ce,handleCompositionStart:gt,handleCompositionUpdate:Jt,handleCompositionEnd:an,onOptionCreate:yt,onOptionDestroy:Kt,handleMenuEnter:M_,handleFocus:T,focus:Cc,blur:Pd,handleBlur:$,handleClearClick:A_,handleClickOutside:e4,handleEsc:LR,toggleMenu:t4,selectOption:RR,getValueKey:Ld,navigateOptions:n4,dropdownMenuVisible:ie,showTagList:DR,collapseTagList:BR,tagStyle:zR,collapseTagStyle:jR,inputStyle:HR,popperRef:T_,inputRef:d,tooltipRef:c,tagTooltipRef:u,calculatorRef:f,prefixRef:h,suffixRef:p,selectRef:l,wrapperRef:w,selectionRef:a,scrollbarRef:E,menuRef:m,tagMenuRef:v,collapseItemRef:y}};var Kie=K({name:"ElOptions",setup(e,{slots:t}){const n=Pe(j0);let o=[];return()=>{var r,s;const i=(r=t.default)==null?void 0:r.call(t),l=[];function a(c){Ee(c)&&c.forEach(u=>{var d,f,h,p;const m=(d=(u==null?void 0:u.type)||{})==null?void 0:d.name;m==="ElOptionGroup"?a(!je(u.children)&&!Ee(u.children)&&Ue((f=u.children)==null?void 0:f.default)?(h=u.children)==null?void 0:h.default():u.children):m==="ElOption"?l.push((p=u.props)==null?void 0:p.value):Ee(u.children)&&a(u.children)})}return i.length&&a((s=i[0])==null?void 0:s.children),Qa(l,o)||(o=l,n&&(n.states.optionValues=l)),i}}});const Gie=qe({name:String,id:String,modelValue:{type:[Array,String,Number,Boolean,Object],default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:xi,effect:{type:we(String),default:"light"},disabled:Boolean,clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:String,default:""},popperOptions:{type:we(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:Xo.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:Pn,default:M0},fitInputWidth:Boolean,suffixIcon:{type:Pn,default:ip},tagType:{...jM.type,default:"info"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:Boolean,placement:{type:we(String),values:I0,default:"bottom-start"},fallbackPlacements:{type:we(Array),default:["bottom-start","top-start","right","left"]},ariaLabel:{type:String,default:void 0},...KQ}),b8="ElSelect",Yie=K({name:b8,componentName:b8,components:{ElInput:Dn,ElSelectMenu:Hie,ElOption:P3,ElOptions:Kie,ElTag:pp,ElScrollbar:Vo,ElTooltip:dd,ElIcon:ve},directives:{ClickOutside:M3},props:Gie,emits:[Wt,tc,"remove-tag","clear","visible-change","focus","blur"],setup(e,{emit:t}){const n=qie(e,t);return bt(j0,jn({props:e,states:n.states,optionsArray:n.optionsArray,handleOptionSelect:n.handleOptionSelect,onOptionCreate:n.onOptionCreate,onOptionDestroy:n.onOptionDestroy,selectRef:n.selectRef,setSelected:n.setSelected})),{...n}}}),Jie=["id","disabled","autocomplete","readonly","aria-activedescendant","aria-controls","aria-expanded","aria-label"],Zie=["textContent"];function Xie(e,t,n,o,r,s){const i=z("el-tag"),l=z("el-tooltip"),a=z("el-icon"),c=z("el-option"),u=z("el-options"),d=z("el-scrollbar"),f=z("el-select-menu"),h=Mt("click-outside");return Ve((g(),k("div",{ref:"selectRef",class:F([e.nsSelect.b(),e.nsSelect.m(e.selectSize)]),onMouseenter:t[16]||(t[16]=p=>e.states.inputHovering=!0),onMouseleave:t[17]||(t[17]=p=>e.states.inputHovering=!1),onClick:t[18]||(t[18]=Ge((...p)=>e.toggleMenu&&e.toggleMenu(...p),["prevent","stop"]))},[b(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]=p=>e.states.isBeforeHide=!1)},{default:x(()=>{var p;return[_("div",{ref:"wrapperRef",class:F([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?(g(),k("div",{key:0,ref:"prefixRef",class:F(e.nsSelect.e("prefix"))},[le(e.$slots,"prefix")],2)):O("v-if",!0),_("div",{ref:"selectionRef",class:F([e.nsSelect.e("selection"),e.nsSelect.is("near",e.multiple&&!e.$slots.prefix&&!!e.states.selected.length)])},[e.multiple?le(e.$slots,"tag",{key:0},()=>[(g(!0),k(Q,null,Me(e.showTagList,m=>(g(),k("div",{key:e.getValueKey(m),class:F(e.nsSelect.e("selected-item"))},[b(i,{closable:!e.selectDisabled&&!m.isDisabled,size:e.collapseTagSize,type:e.tagType,"disable-transitions":"",style:Be(e.tagStyle),onClose:v=>e.deleteTag(v,m)},{default:x(()=>[_("span",{class:F(e.nsSelect.e("tags-text"))},M(m.currentLabel),3)]),_:2},1032,["closable","size","type","style","onClose"])],2))),128)),e.collapseTags&&e.states.selected.length>e.maxCollapseTags?(g(),L(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:x(()=>[_("div",{ref:"collapseItemRef",class:F(e.nsSelect.e("selected-item"))},[b(i,{closable:!1,size:e.collapseTagSize,type:e.tagType,"disable-transitions":"",style:Be(e.collapseTagStyle)},{default:x(()=>[_("span",{class:F(e.nsSelect.e("tags-text"))}," + "+M(e.states.selected.length-e.maxCollapseTags),3)]),_:1},8,["size","type","style"])],2)]),content:x(()=>[_("div",{ref:"tagMenuRef",class:F(e.nsSelect.e("selection"))},[(g(!0),k(Q,null,Me(e.collapseTagList,m=>(g(),k("div",{key:e.getValueKey(m),class:F(e.nsSelect.e("selected-item"))},[b(i,{class:"in-tooltip",closable:!e.selectDisabled&&!m.isDisabled,size:e.collapseTagSize,type:e.tagType,"disable-transitions":"",onClose:v=>e.deleteTag(v,m)},{default:x(()=>[_("span",{class:F(e.nsSelect.e("tags-text"))},M(m.currentLabel),3)]),_:2},1032,["closable","size","type","onClose"])],2))),128))],2)]),_:1},8,["disabled","effect","teleported"])):O("v-if",!0)]):O("v-if",!0),e.selectDisabled?O("v-if",!0):(g(),k("div",{key:1,class:F([e.nsSelect.e("selected-item"),e.nsSelect.e("input-wrapper"),e.nsSelect.is("hidden",!e.filterable)])},[Ve(_("input",{id:e.inputId,ref:"inputRef","onUpdate:modelValue":t[0]||(t[0]=m=>e.states.inputValue=m),type:"text",class:F([e.nsSelect.e("input"),e.nsSelect.is(e.selectSize)]),disabled:e.selectDisabled,autocomplete:e.autocomplete,style:Be(e.inputStyle),role:"combobox",readonly:!e.filterable,spellcheck:"false","aria-activedescendant":((p=e.hoverOption)==null?void 0:p.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]=rn(Ge(m=>e.navigateOptions("next"),["stop","prevent"]),["down"])),t[4]||(t[4]=rn(Ge(m=>e.navigateOptions("prev"),["stop","prevent"]),["up"])),t[5]||(t[5]=rn(Ge((...m)=>e.handleEsc&&e.handleEsc(...m),["stop","prevent"]),["esc"])),t[6]||(t[6]=rn(Ge((...m)=>e.selectOption&&e.selectOption(...m),["stop","prevent"]),["enter"])),t[7]||(t[7]=rn(Ge((...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]=Ge((...m)=>e.toggleMenu&&e.toggleMenu(...m),["stop"]))},null,46,Jie),[[Ou,e.states.inputValue]]),e.filterable?(g(),k("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:F(e.nsSelect.e("input-calculator")),textContent:M(e.states.inputValue)},null,10,Zie)):O("v-if",!0)],2)),e.shouldShowPlaceholder?(g(),k("div",{key:2,class:F([e.nsSelect.e("selected-item"),e.nsSelect.e("placeholder"),e.nsSelect.is("transparent",!e.hasModelValue||e.expanded&&!e.states.inputValue)])},[_("span",null,M(e.currentPlaceholder),1)],2)):O("v-if",!0)],2),_("div",{ref:"suffixRef",class:F(e.nsSelect.e("suffix"))},[e.iconComponent&&!e.showClose?(g(),L(a,{key:0,class:F([e.nsSelect.e("caret"),e.nsSelect.e("icon"),e.iconReverse])},{default:x(()=>[(g(),L(xt(e.iconComponent)))]),_:1},8,["class"])):O("v-if",!0),e.showClose&&e.clearIcon?(g(),L(a,{key:1,class:F([e.nsSelect.e("caret"),e.nsSelect.e("icon")]),onClick:e.handleClearClick},{default:x(()=>[(g(),L(xt(e.clearIcon)))]),_:1},8,["class","onClick"])):O("v-if",!0),e.validateState&&e.validateIcon?(g(),L(a,{key:2,class:F([e.nsInput.e("icon"),e.nsInput.e("validateIcon")])},{default:x(()=>[(g(),L(xt(e.validateIcon)))]),_:1},8,["class"])):O("v-if",!0)],2)],2)]}),content:x(()=>[b(f,{ref:"menuRef"},{default:x(()=>[e.$slots.header?(g(),k("div",{key:0,class:F(e.nsSelect.be("dropdown","header")),onClick:t[13]||(t[13]=Ge(()=>{},["stop"]))},[le(e.$slots,"header")],2)):O("v-if",!0),Ve(b(d,{id:e.contentId,ref:"scrollbarRef",tag:"ul","wrap-class":e.nsSelect.be("dropdown","wrap"),"view-class":e.nsSelect.be("dropdown","list"),class:F([e.nsSelect.is("empty",e.filteredOptionsCount===0)]),role:"listbox","aria-label":e.ariaLabel,"aria-orientation":"vertical"},{default:x(()=>[e.showNewOption?(g(),L(c,{key:0,value:e.states.inputValue,created:!0},null,8,["value"])):O("v-if",!0),b(u,null,{default:x(()=>[le(e.$slots,"default")]),_:3})]),_:3},8,["id","wrap-class","view-class","class","aria-label"]),[[sn,e.states.options.size>0&&!e.loading]]),e.$slots.loading&&e.loading?(g(),k("div",{key:1,class:F(e.nsSelect.be("dropdown","loading"))},[le(e.$slots,"loading")],2)):e.loading||e.filteredOptionsCount===0?(g(),k("div",{key:2,class:F(e.nsSelect.be("dropdown","empty"))},[le(e.$slots,"empty",{},()=>[_("span",null,M(e.emptyText),1)])],2)):O("v-if",!0),e.$slots.footer?(g(),k("div",{key:3,class:F(e.nsSelect.be("dropdown","footer")),onClick:t[14]||(t[14]=Ge(()=>{},["stop"]))},[le(e.$slots,"footer")],2)):O("v-if",!0)]),_:3},512)]),_:3},8,["visible","placement","teleported","popper-class","popper-options","fallback-placements","effect","transition","persistent","onBeforeShow"])],34)),[[h,e.handleClickOutside,e.popperRef]])}var Qie=Re(Yie,[["render",Xie],["__file","select.vue"]]);const ele=K({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(e){const t=Ae("select"),n=H(null),o=nt(),r=H([]);bt(fA,jn({...Hs(e)}));const s=B(()=>r.value.some(a=>a.visible===!0)),i=a=>{const c=[];return Ee(a.children)&&a.children.forEach(u=>{var d,f;u.type&&u.type.name==="ElOption"&&u.component&&u.component.proxy?c.push(u.component.proxy):(d=u.children)!=null&&d.length?c.push(...i(u)):(f=u.component)!=null&&f.subTree&&c.push(...i(u.component.subTree))}),c},l=()=>{r.value=i(o.subTree)};return mt(()=>{l()}),$H(n,l,{attributes:!0,subtree:!0,childList:!0}),{groupRef:n,visible:s,ns:t}}});function tle(e,t,n,o,r,s){return Ve((g(),k("ul",{ref:"groupRef",class:F(e.ns.be("group","wrap"))},[_("li",{class:F(e.ns.be("group","title"))},M(e.label),3),_("li",null,[_("ul",{class:F(e.ns.b("group"))},[le(e.$slots,"default")],2)])],2)),[[sn,e.visible]])}var hA=Re(ele,[["render",tle],["__file","option-group.vue"]]);const zo=zt(Qie,{Option:P3,OptionGroup:hA}),jo=Hn(P3),pA=Hn(hA),L3=()=>Pe(dA,{}),nle=qe({pageSize:{type:Number,required:!0},pageSizes:{type:we(Array),default:()=>vo([10,20,30,40,50,100])},popperClass:{type:String},disabled:Boolean,teleported:Boolean,size:{type:String,values:gc}}),ole=K({name:"ElPaginationSizes"}),rle=K({...ole,props:nle,emits:["page-size-change"],setup(e,{emit:t}){const n=e,{t:o}=Fn(),r=Ae("pagination"),s=L3(),i=H(n.pageSize);ke(()=>n.pageSizes,(c,u)=>{if(!Qa(c,u)&&Array.isArray(c)){const d=c.includes(n.pageSize)?n.pageSize:n.pageSizes[0];t("page-size-change",d)}}),ke(()=>n.pageSize,c=>{i.value=c});const l=B(()=>n.pageSizes);function a(c){var u;c!==i.value&&(i.value=c,(u=s.handleSizeChange)==null||u.call(s,Number(c)))}return(c,u)=>(g(),k("span",{class:F(S(r).e("sizes"))},[b(S(zo),{"model-value":i.value,disabled:c.disabled,"popper-class":c.popperClass,size:c.size,teleported:c.teleported,"validate-event":!1,onChange:a},{default:x(()=>[(g(!0),k(Q,null,Me(S(l),d=>(g(),L(S(jo),{key:d,value:d,label:d+S(o)("el.pagination.pagesize")},null,8,["value","label"]))),128))]),_:1},8,["model-value","disabled","popper-class","size","teleported"])],2))}});var sle=Re(rle,[["__file","sizes.vue"]]);const ile=qe({size:{type:String,values:gc}}),lle=["disabled"],ale=K({name:"ElPaginationJumper"}),cle=K({...ale,props:ile,setup(e){const{t}=Fn(),n=Ae("pagination"),{pageCount:o,disabled:r,currentPage:s,changeEvent:i}=L3(),l=H(),a=B(()=>{var d;return(d=l.value)!=null?d:s==null?void 0:s.value});function c(d){l.value=d?+d:""}function u(d){d=Math.trunc(+d),i==null||i(d),l.value=void 0}return(d,f)=>(g(),k("span",{class:F(S(n).e("jump")),disabled:S(r)},[_("span",{class:F([S(n).e("goto")])},M(S(t)("el.pagination.goto")),3),b(S(Dn),{size:d.size,class:F([S(n).e("editor"),S(n).is("in-pagination")]),min:1,max:S(o),disabled:S(r),"model-value":S(a),"validate-event":!1,label:S(t)("el.pagination.page"),type:"number","onUpdate:modelValue":c,onChange:u},null,8,["size","class","max","disabled","model-value","label"]),_("span",{class:F([S(n).e("classifier")])},M(S(t)("el.pagination.pageClassifier")),3)],10,lle))}});var ule=Re(cle,[["__file","jumper.vue"]]);const dle=qe({total:{type:Number,default:1e3}}),fle=["disabled"],hle=K({name:"ElPaginationTotal"}),ple=K({...hle,props:dle,setup(e){const{t}=Fn(),n=Ae("pagination"),{disabled:o}=L3();return(r,s)=>(g(),k("span",{class:F(S(n).e("total")),disabled:S(o)},M(S(t)("el.pagination.total",{total:r.total})),11,fle))}});var mle=Re(ple,[["__file","total.vue"]]);const gle=qe({currentPage:{type:Number,default:1},pageCount:{type:Number,required:!0},pagerCount:{type:Number,default:7},disabled:Boolean}),_le=["onKeyup"],vle=["aria-current","aria-label","tabindex"],yle=["tabindex","aria-label"],ble=["aria-current","aria-label","tabindex"],wle=["tabindex","aria-label"],kle=["aria-current","aria-label","tabindex"],Cle=K({name:"ElPaginationPager"}),Sle=K({...Cle,props:gle,emits:["change"],setup(e,{emit:t}){const n=e,o=Ae("pager"),r=Ae("icon"),{t:s}=Fn(),i=H(!1),l=H(!1),a=H(!1),c=H(!1),u=H(!1),d=H(!1),f=B(()=>{const C=n.pagerCount,T=(C-1)/2,$=Number(n.currentPage),A=Number(n.pageCount);let N=!1,P=!1;A>C&&($>C-T&&(N=!0),$<A-T&&(P=!0));const I=[];if(N&&!P){const D=A-(C-2);for(let V=D;V<A;V++)I.push(V)}else if(!N&&P)for(let D=2;D<C;D++)I.push(D);else if(N&&P){const D=Math.floor(C/2)-1;for(let V=$-D;V<=$+D;V++)I.push(V)}else for(let D=2;D<A;D++)I.push(D);return I}),h=B(()=>["more","btn-quickprev",r.b(),o.is("disabled",n.disabled)]),p=B(()=>["more","btn-quicknext",r.b(),o.is("disabled",n.disabled)]),m=B(()=>n.disabled?-1:0);Yr(()=>{const C=(n.pagerCount-1)/2;i.value=!1,l.value=!1,n.pageCount>n.pagerCount&&(n.currentPage>n.pagerCount-C&&(i.value=!0),n.currentPage<n.pageCount-C&&(l.value=!0))});function v(C=!1){n.disabled||(C?a.value=!0:c.value=!0)}function y(C=!1){C?u.value=!0:d.value=!0}function E(C){const T=C.target;if(T.tagName.toLowerCase()==="li"&&Array.from(T.classList).includes("number")){const $=Number(T.textContent);$!==n.currentPage&&t("change",$)}else T.tagName.toLowerCase()==="li"&&Array.from(T.classList).includes("more")&&w(C)}function w(C){const T=C.target;if(T.tagName.toLowerCase()==="ul"||n.disabled)return;let $=Number(T.textContent);const A=n.pageCount,N=n.currentPage,P=n.pagerCount-2;T.className.includes("more")&&(T.className.includes("quickprev")?$=N-P:T.className.includes("quicknext")&&($=N+P)),Number.isNaN(+$)||($<1&&($=1),$>A&&($=A)),$!==N&&t("change",$)}return(C,T)=>(g(),k("ul",{class:F(S(o).b()),onClick:w,onKeyup:rn(E,["enter"])},[C.pageCount>0?(g(),k("li",{key:0,class:F([[S(o).is("active",C.currentPage===1),S(o).is("disabled",C.disabled)],"number"]),"aria-current":C.currentPage===1,"aria-label":S(s)("el.pagination.currentPage",{pager:1}),tabindex:S(m)}," 1 ",10,vle)):O("v-if",!0),i.value?(g(),k("li",{key:1,class:F(S(h)),tabindex:S(m),"aria-label":S(s)("el.pagination.prevPages",{pager:C.pagerCount-2}),onMouseenter:T[0]||(T[0]=$=>v(!0)),onMouseleave:T[1]||(T[1]=$=>a.value=!1),onFocus:T[2]||(T[2]=$=>y(!0)),onBlur:T[3]||(T[3]=$=>u.value=!1)},[(a.value||u.value)&&!C.disabled?(g(),L(S(SJ),{key:0})):(g(),L(S(Ky),{key:1}))],42,yle)):O("v-if",!0),(g(!0),k(Q,null,Me(S(f),$=>(g(),k("li",{key:$,class:F([[S(o).is("active",C.currentPage===$),S(o).is("disabled",C.disabled)],"number"]),"aria-current":C.currentPage===$,"aria-label":S(s)("el.pagination.currentPage",{pager:$}),tabindex:S(m)},M($),11,ble))),128)),l.value?(g(),k("li",{key:2,class:F(S(p)),tabindex:S(m),"aria-label":S(s)("el.pagination.nextPages",{pager:C.pagerCount-2}),onMouseenter:T[4]||(T[4]=$=>v()),onMouseleave:T[5]||(T[5]=$=>c.value=!1),onFocus:T[6]||(T[6]=$=>y()),onBlur:T[7]||(T[7]=$=>d.value=!1)},[(c.value||d.value)&&!C.disabled?(g(),L(S(EJ),{key:0})):(g(),L(S(Ky),{key:1}))],42,wle)):O("v-if",!0),C.pageCount>1?(g(),k("li",{key:3,class:F([[S(o).is("active",C.currentPage===C.pageCount),S(o).is("disabled",C.disabled)],"number"]),"aria-current":C.currentPage===C.pageCount,"aria-label":S(s)("el.pagination.currentPage",{pager:C.pageCount}),tabindex:S(m)},M(C.pageCount),11,kle)):O("v-if",!0)],42,_le))}});var $le=Re(Sle,[["__file","pager.vue"]]);const po=e=>typeof e!="number",Ele=qe({pageSize:Number,defaultPageSize:Number,total:Number,pageCount:Number,pagerCount:{type:Number,validator:e=>Et(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:we(Array),default:()=>vo([10,20,30,40,50,100])},popperClass:{type:String,default:""},prevText:{type:String,default:""},prevIcon:{type:Pn,default:()=>T0},nextText:{type:String,default:""},nextIcon:{type:Pn,default:()=>cd},teleported:{type:Boolean,default:!0},small:Boolean,background:Boolean,disabled:Boolean,hideOnSinglePage:Boolean}),xle={"update:current-page":e=>Et(e),"update:page-size":e=>Et(e),"size-change":e=>Et(e),change:(e,t)=>Et(e)&&Et(t),"current-change":e=>Et(e),"prev-click":e=>Et(e),"next-click":e=>Et(e)},w8="ElPagination";var Tle=K({name:w8,props:Ele,emits:xle,setup(e,{emit:t,slots:n}){const{t:o}=Fn(),r=Ae("pagination"),s=nt().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=B(()=>{if(po(e.total)&&po(e.pageCount)||!po(e.currentPage)&&!i)return!1;if(e.layout.includes("sizes")){if(po(e.pageCount)){if(!po(e.total)&&!po(e.pageSize)&&!l)return!1}else if(!l)return!1}return!0}),c=H(po(e.defaultPageSize)?10:e.defaultPageSize),u=H(po(e.defaultCurrentPage)?1:e.defaultCurrentPage),d=B({get(){return po(e.pageSize)?c.value:e.pageSize},set(w){po(e.pageSize)&&(c.value=w),l&&(t("update:page-size",w),t("size-change",w))}}),f=B(()=>{let w=0;return po(e.pageCount)?po(e.total)||(w=Math.max(1,Math.ceil(e.total/d.value))):w=e.pageCount,w}),h=B({get(){return po(e.currentPage)?u.value:e.currentPage},set(w){let C=w;w<1?C=1:w>f.value&&(C=f.value),po(e.currentPage)&&(u.value=C),i&&(t("update:current-page",C),t("current-change",C))}});ke(f,w=>{h.value>w&&(h.value=w)}),ke([h,d],w=>{t("change",...w)},{flush:"post"});function p(w){h.value=w}function m(w){d.value=w;const C=f.value;h.value>C&&(h.value=C)}function v(){e.disabled||(h.value-=1,t("prev-click",h.value))}function y(){e.disabled||(h.value+=1,t("next-click",h.value))}function E(w,C){w&&(w.props||(w.props={}),w.props.class=[w.props.class,C].join(" "))}return bt(dA,{pageCount:f,disabled:B(()=>e.disabled),currentPage:h,changeEvent:p,handleSizeChange:m}),()=>{var w,C;if(!a.value)return o("el.pagination.deprecationWarning"),null;if(!e.layout||e.hideOnSinglePage&&f.value<=1)return null;const T=[],$=[],A=Xe("div",{class:r.e("rightwrapper")},$),N={prev:Xe(Aie,{disabled:e.disabled,currentPage:h.value,prevText:e.prevText,prevIcon:e.prevIcon,onClick:v}),jumper:Xe(ule,{size:e.small?"small":"default"}),pager:Xe($le,{currentPage:h.value,pageCount:f.value,pagerCount:e.pagerCount,onChange:p,disabled:e.disabled}),next:Xe(Rie,{disabled:e.disabled,currentPage:h.value,pageCount:f.value,nextText:e.nextText,nextIcon:e.nextIcon,onClick:y}),sizes:Xe(sle,{pageSize:d.value,pageSizes:e.pageSizes,popperClass:e.popperClass,disabled:e.disabled,teleported:e.teleported,size:e.small?"small":"default"}),slot:(C=(w=n==null?void 0:n.default)==null?void 0:w.call(n))!=null?C:null,total:Xe(mle,{total:po(e.total)?0:e.total})},P=e.layout.split(",").map(D=>D.trim());let I=!1;return P.forEach(D=>{if(D==="->"){I=!0;return}I?$.push(N[D]):T.push(N[D])}),E(T[0],r.is("first")),E(T[T.length-1],r.is("last")),I&&$.length>0&&(E($[0],r.is("first")),E($[$.length-1],r.is("last")),T.push(A)),Xe("div",{class:[r.b(),r.is("background",e.background),{[r.m("small")]:e.small}]},T)}}});const Mle=zt(Tle),Ale=qe({trigger:Nh.trigger,placement:Qm.placement,disabled:Nh.disabled,visible:Xo.visible,transition:Xo.transition,popperOptions:Qm.popperOptions,tabindex:Qm.tabindex,content:Xo.content,popperStyle:Xo.popperStyle,popperClass:Xo.popperClass,enterable:{...Xo.enterable,default:!0},effect:{...Xo.effect,default:"light"},teleported:Xo.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}}),Ole={"update:visible":e=>ao(e),"before-enter":()=>!0,"before-leave":()=>!0,"after-enter":()=>!0,"after-leave":()=>!0},Ile="onUpdate:visible",Nle=K({name:"ElPopover"}),Ple=K({...Nle,props:Ale,emits:Ole,setup(e,{expose:t,emit:n}){const o=e,r=B(()=>o[Ile]),s=Ae("popover"),i=H(),l=B(()=>{var v;return(v=S(i))==null?void 0:v.popperRef}),a=B(()=>[{width:fo(o.width)},o.popperStyle]),c=B(()=>[s.b(),o.popperClass,{[s.m("plain")]:!!o.content}]),u=B(()=>o.transition===`${s.namespace.value}-fade-in-linear`),d=()=>{var v;(v=i.value)==null||v.hide()},f=()=>{n("before-enter")},h=()=>{n("before-leave")},p=()=>{n("after-enter")},m=()=>{n("update:visible",!1),n("after-leave")};return t({popperRef:l,hide:d}),(v,y)=>(g(),L(S(dd),pn({ref_key:"tooltipRef",ref:i},v.$attrs,{trigger:v.trigger,placement:v.placement,disabled:v.disabled,visible:v.visible,transition:v.transition,"popper-options":v.popperOptions,tabindex:v.tabindex,content:v.content,offset:v.offset,"show-after":v.showAfter,"hide-after":v.hideAfter,"auto-close":v.autoClose,"show-arrow":v.showArrow,"aria-label":v.title,effect:v.effect,enterable:v.enterable,"popper-class":S(c),"popper-style":S(a),teleported:v.teleported,persistent:v.persistent,"gpu-acceleration":S(u),"onUpdate:visible":S(r),onBeforeShow:f,onBeforeHide:h,onShow:p,onHide:m}),{content:x(()=>[v.title?(g(),k("div",{key:0,class:F(S(s).e("title")),role:"title"},M(v.title),3)):O("v-if",!0),le(v.$slots,"default",{},()=>[ne(M(v.content),1)])]),default:x(()=>[v.$slots.reference?le(v.$slots,"reference",{key:0}):O("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 Lle=Re(Ple,[["__file","popover.vue"]]);const k8=(e,t)=>{const n=t.arg||t.value,o=n==null?void 0:n.popperRef;o&&(o.triggerRef=e)};var Rle={mounted(e,t){k8(e,t)},updated(e,t){k8(e,t)}};const Fle="popover",Dle=jZ(Rle,Fle),$o=zt(Lle,{directive:Dle}),Ble=qe({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:we(String),default:"round"},textInside:{type:Boolean,default:!1},width:{type:Number,default:126},showText:{type:Boolean,default:!0},color:{type:we([String,Array,Function]),default:""},striped:Boolean,stripedFlow:Boolean,format:{type:we(Function),default:e=>`${e}%`}}),Vle=["aria-valuenow"],zle={viewBox:"0 0 100 100"},jle=["d","stroke","stroke-linecap","stroke-width"],Hle=["d","stroke","opacity","stroke-linecap","stroke-width"],Ule={key:0},Wle=K({name:"ElProgress"}),qle=K({...Wle,props:Ble,setup(e){const t=e,n={success:"#13ce66",exception:"#ff4949",warning:"#e6a23c",default:"#20a0ff"},o=Ae("progress"),r=B(()=>({width:`${t.percentage}%`,animationDuration:`${t.duration}s`,backgroundColor:E(t.percentage)})),s=B(()=>(t.strokeWidth/t.width*100).toFixed(1)),i=B(()=>["circle","dashboard"].includes(t.type)?Number.parseInt(`${50-Number.parseFloat(s.value)/2}`,10):0),l=B(()=>{const w=i.value,C=t.type==="dashboard";return` |
| 72 |
M 50 50 |
| 73 |
m 0 ${C?"":"-"}${w} |
| 74 |
a ${w} ${w} 0 1 1 0 ${C?"-":""}${w*2} |
| 75 |
a ${w} ${w} 0 1 1 0 ${C?"":"-"}${w*2} |
| 76 |
`}),a=B(()=>2*Math.PI*i.value),c=B(()=>t.type==="dashboard"?.75:1),u=B(()=>`${-1*a.value*(1-c.value)/2}px`),d=B(()=>({strokeDasharray:`${a.value*c.value}px, ${a.value}px`,strokeDashoffset:u.value})),f=B(()=>({strokeDasharray:`${a.value*c.value*(t.percentage/100)}px, ${a.value}px`,strokeDashoffset:u.value,transition:"stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s"})),h=B(()=>{let w;return t.color?w=E(t.percentage):w=n[t.status]||n.default,w}),p=B(()=>t.status==="warning"?o3:t.type==="line"?t.status==="success"?t3:M0:t.status==="success"?e3:Fs),m=B(()=>t.type==="line"?12+t.strokeWidth*.4:t.width*.111111+2),v=B(()=>t.format(t.percentage));function y(w){const C=100/w.length;return w.map(($,A)=>je($)?{color:$,percentage:(A+1)*C}:$).sort(($,A)=>$.percentage-A.percentage)}const E=w=>{var C;const{color:T}=t;if(Ue(T))return T(w);if(je(T))return T;{const $=y(T);for(const A of $)if(A.percentage>w)return A.color;return(C=$[$.length-1])==null?void 0:C.color}};return(w,C)=>(g(),k("div",{class:F([S(o).b(),S(o).m(w.type),S(o).is(w.status),{[S(o).m("without-text")]:!w.showText,[S(o).m("text-inside")]:w.textInside}]),role:"progressbar","aria-valuenow":w.percentage,"aria-valuemin":"0","aria-valuemax":"100"},[w.type==="line"?(g(),k("div",{key:0,class:F(S(o).b("bar"))},[_("div",{class:F(S(o).be("bar","outer")),style:Be({height:`${w.strokeWidth}px`})},[_("div",{class:F([S(o).be("bar","inner"),{[S(o).bem("bar","inner","indeterminate")]:w.indeterminate},{[S(o).bem("bar","inner","striped")]:w.striped},{[S(o).bem("bar","inner","striped-flow")]:w.stripedFlow}]),style:Be(S(r))},[(w.showText||w.$slots.default)&&w.textInside?(g(),k("div",{key:0,class:F(S(o).be("bar","innerText"))},[le(w.$slots,"default",{percentage:w.percentage},()=>[_("span",null,M(S(v)),1)])],2)):O("v-if",!0)],6)],6)],2)):(g(),k("div",{key:1,class:F(S(o).b("circle")),style:Be({height:`${w.width}px`,width:`${w.width}px`})},[(g(),k("svg",zle,[_("path",{class:F(S(o).be("circle","track")),d:S(l),stroke:`var(${S(o).cssVarName("fill-color-light")}, #e5e9f2)`,"stroke-linecap":w.strokeLinecap,"stroke-width":S(s),fill:"none",style:Be(S(d))},null,14,jle),_("path",{class:F(S(o).be("circle","path")),d:S(l),stroke:S(h),fill:"none",opacity:w.percentage?1:0,"stroke-linecap":w.strokeLinecap,"stroke-width":S(s),style:Be(S(f))},null,14,Hle)]))],6)),(w.showText||w.$slots.default)&&!w.textInside?(g(),k("div",{key:2,class:F(S(o).e("text")),style:Be({fontSize:`${S(m)}px`})},[le(w.$slots,"default",{percentage:w.percentage},()=>[w.status?(g(),L(S(ve),{key:1},{default:x(()=>[(g(),L(xt(S(p))))]),_:1})):(g(),k("span",Ule,M(S(v)),1))])],6)):O("v-if",!0)],10,Vle))}});var Kle=Re(qle,[["__file","progress.vue"]]);const mA=zt(Kle),Gle=qe({animated:{type:Boolean,default:!1},count:{type:Number,default:1},rows:{type:Number,default:3},loading:{type:Boolean,default:!0},throttle:{type:Number}}),Yle=qe({variant:{type:String,values:["circle","rect","h1","h3","text","caption","p","image","button"],default:"text"}}),Jle=K({name:"ElSkeletonItem"}),Zle=K({...Jle,props:Yle,setup(e){const t=Ae("skeleton");return(n,o)=>(g(),k("div",{class:F([S(t).e("item"),S(t).e(n.variant)])},[n.variant==="image"?(g(),L(S(aZ),{key:0})):O("v-if",!0)],2))}});var Ag=Re(Zle,[["__file","skeleton-item.vue"]]);const Xle=K({name:"ElSkeleton"}),Qle=K({...Xle,props:Gle,setup(e,{expose:t}){const n=e,o=Ae("skeleton"),r=nQ(Nn(n,"loading"),n.throttle);return t({uiLoading:r}),(s,i)=>S(r)?(g(),k("div",pn({key:0,class:[S(o).b(),S(o).is("animated",s.animated)]},s.$attrs),[(g(!0),k(Q,null,Me(s.count,l=>(g(),k(Q,{key:l},[s.loading?le(s.$slots,"template",{key:l},()=>[b(Ag,{class:F(S(o).is("first")),variant:"p"},null,8,["class"]),(g(!0),k(Q,null,Me(s.rows,a=>(g(),L(Ag,{key:a,class:F([S(o).e("paragraph"),S(o).is("last",a===s.rows&&s.rows>1)]),variant:"p"},null,8,["class"]))),128))]):O("v-if",!0)],64))),128))],16)):le(s.$slots,"default",Hb(pn({key:1},s.$attrs)))}});var eae=Re(Qle,[["__file","skeleton.vue"]]);const qt=zt(eae,{SkeletonItem:Ag});Hn(Ag);const tae=qe({modelValue:{type:[Boolean,String,Number],default:!1},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},size:{type:String,validator:ST},width:{type:[String,Number],default:""},inlinePrompt:{type:Boolean,default:!1},inactiveActionIcon:{type:Pn},activeActionIcon:{type:Pn},activeIcon:{type:Pn},inactiveIcon:{type:Pn},activeText:{type:String,default:""},inactiveText:{type:String,default:""},activeValue:{type:[Boolean,String,Number],default:!0},inactiveValue:{type:[Boolean,String,Number],default:!1},name:{type:String,default:""},validateEvent:{type:Boolean,default:!0},beforeChange:{type:we(Function)},id:String,tabindex:{type:[String,Number]},label:{type:String,default:void 0}}),nae={[Wt]:e=>ao(e)||je(e)||Et(e),[tc]:e=>ao(e)||je(e)||Et(e),[Gy]:e=>ao(e)||je(e)||Et(e)},oae=["onClick"],rae=["id","aria-checked","aria-disabled","aria-label","name","true-value","false-value","disabled","tabindex","onKeydown"],sae=["aria-hidden"],iae=["aria-hidden"],lae=["aria-hidden"],gA="ElSwitch",aae=K({name:gA}),cae=K({...aae,props:tae,emits:nae,setup(e,{expose:t,emit:n}){const o=e,{formItem:r}=Ti(),s=ar(),i=Ae("switch"),{inputId:l}=_c(o,{formItemContext:r}),a=fs(B(()=>o.loading)),c=H(o.modelValue!==!1),u=H(),d=H(),f=B(()=>[i.b(),i.m(s.value),i.is("disabled",a.value),i.is("checked",y.value)]),h=B(()=>[i.e("label"),i.em("label","left"),i.is("active",!y.value)]),p=B(()=>[i.e("label"),i.em("label","right"),i.is("active",y.value)]),m=B(()=>({width:fo(o.width)}));ke(()=>o.modelValue,()=>{c.value=!0});const v=B(()=>c.value?o.modelValue:!1),y=B(()=>v.value===o.activeValue);[o.activeValue,o.inactiveValue].includes(v.value)||(n(Wt,o.inactiveValue),n(tc,o.inactiveValue),n(Gy,o.inactiveValue)),ke(y,T=>{var $;u.value.checked=T,o.validateEvent&&(($=r==null?void 0:r.validate)==null||$.call(r,"change").catch(A=>void 0))});const E=()=>{const T=y.value?o.inactiveValue:o.activeValue;n(Wt,T),n(tc,T),n(Gy,T),tt(()=>{u.value.checked=y.value})},w=()=>{if(a.value)return;const{beforeChange:T}=o;if(!T){E();return}const $=T();[lh($),ao($)].includes(!0)||us(gA,"beforeChange must return type `Promise<boolean>` or `boolean`"),lh($)?$.then(N=>{N&&E()}).catch(N=>{}):$&&E()},C=()=>{var T,$;($=(T=u.value)==null?void 0:T.focus)==null||$.call(T)};return mt(()=>{u.value.checked=y.value}),t({focus:C,checked:y}),(T,$)=>(g(),k("div",{class:F(S(f)),onClick:Ge(w,["prevent"])},[_("input",{id:S(l),ref_key:"input",ref:u,class:F(S(i).e("input")),type:"checkbox",role:"switch","aria-checked":S(y),"aria-disabled":S(a),"aria-label":T.label,name:T.name,"true-value":T.activeValue,"false-value":T.inactiveValue,disabled:S(a),tabindex:T.tabindex,onChange:E,onKeydown:rn(w,["enter"])},null,42,rae),!T.inlinePrompt&&(T.inactiveIcon||T.inactiveText)?(g(),k("span",{key:0,class:F(S(h))},[T.inactiveIcon?(g(),L(S(ve),{key:0},{default:x(()=>[(g(),L(xt(T.inactiveIcon)))]),_:1})):O("v-if",!0),!T.inactiveIcon&&T.inactiveText?(g(),k("span",{key:1,"aria-hidden":S(y)},M(T.inactiveText),9,sae)):O("v-if",!0)],2)):O("v-if",!0),_("span",{ref_key:"core",ref:d,class:F(S(i).e("core")),style:Be(S(m))},[T.inlinePrompt?(g(),k("div",{key:0,class:F(S(i).e("inner"))},[T.activeIcon||T.inactiveIcon?(g(),L(S(ve),{key:0,class:F(S(i).is("icon"))},{default:x(()=>[(g(),L(xt(S(y)?T.activeIcon:T.inactiveIcon)))]),_:1},8,["class"])):T.activeText||T.inactiveText?(g(),k("span",{key:1,class:F(S(i).is("text")),"aria-hidden":!S(y)},M(S(y)?T.activeText:T.inactiveText),11,iae)):O("v-if",!0)],2)):O("v-if",!0),_("div",{class:F(S(i).e("action"))},[T.loading?(g(),L(S(ve),{key:0,class:F(S(i).is("loading"))},{default:x(()=>[b(S(A0))]),_:1},8,["class"])):S(y)?le(T.$slots,"active-action",{key:1},()=>[T.activeActionIcon?(g(),L(S(ve),{key:0},{default:x(()=>[(g(),L(xt(T.activeActionIcon)))]),_:1})):O("v-if",!0)]):S(y)?O("v-if",!0):le(T.$slots,"inactive-action",{key:2},()=>[T.inactiveActionIcon?(g(),L(S(ve),{key:0},{default:x(()=>[(g(),L(xt(T.inactiveActionIcon)))]),_:1})):O("v-if",!0)])],2)],6),!T.inlinePrompt&&(T.activeIcon||T.activeText)?(g(),k("span",{key:1,class:F(S(p))},[T.activeIcon?(g(),L(S(ve),{key:0},{default:x(()=>[(g(),L(xt(T.activeIcon)))]),_:1})):O("v-if",!0),!T.activeIcon&&T.activeText?(g(),k("span",{key:1,"aria-hidden":!S(y)},M(T.activeText),9,lae)):O("v-if",!0)],2)):O("v-if",!0)],10,oae))}});var uae=Re(cae,[["__file","switch.vue"]]);const _A=zt(uae),sv=function(e){var t;return(t=e.target)==null?void 0:t.closest("td")},dae=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(c=>typeof c=="string"?wr(l,c):c(l,a,e))):(t!=="$key"&&it(l)&&"$value"in l&&(l=l.$value),[it(l)?wr(l,t):l])},i=function(l,a){if(o)return o(l.value,a.value);for(let c=0,u=l.key.length;c<u;c++){if(l.key[c]<a.key[c])return-1;if(l.key[c]>a.key[c])return 1}return 0};return e.map((l,a)=>({value:l,index:a,key:s?s(l,a):null})).sort((l,a)=>{let c=i(l,a);return c||(c=l.index-a.index),c*+n}).map(l=>l.value)},vA=function(e,t){let n=null;return e.columns.forEach(o=>{o.id===t&&(n=o)}),n},fae=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||us("ElTable",`No column matching with column-key: ${t}`),n},C8=function(e,t,n){const o=(t.className||"").match(new RegExp(`${n}-table_[^\\s]+`,"gm"));return o?vA(e,o[0]):null},Xn=(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)},Ea=function(e,t){const n={};return(e||[]).forEach((o,r)=>{n[Xn(o,t)]={row:o,index:r}}),n};function hae(e,t){const n={};let o;for(o in e)n[o]=e[o];for(o in t)if(ut(t,o)){const r=t[o];typeof r<"u"&&(n[o]=r)}return n}function R3(e){return e===""||e!==void 0&&(e=Number.parseInt(e,10),Number.isNaN(e)&&(e="")),e}function yA(e){return e===""||e!==void 0&&(e=R3(e),Number.isNaN(e)&&(e=80)),e}function pae(e){return typeof e=="number"?e:typeof e=="string"?/^\d+(?:px)?$/.test(e)?Number.parseInt(e,10):e:null}function mae(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...o)=>t(n(...o)))}function Uf(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,Ee(t.children)&&t.children.forEach(a=>{Uf(e,a,n??!s)})};return ao(n)?n&&!s?i("add"):!n&&s&&i("remove"):i(s?"remove":"add"),o}function gae(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(c=>{if(c[o]){t(c,null,a+1);return}const u=c[n];r(u)||s(c,u,a+1)})}e.forEach(i=>{if(i[o]){t(i,null,0);return}const l=i[n];r(l)||s(i,l,0)})}let gr=null;function _ae(e,t,n,o){if((gr==null?void 0:gr.trigger)===n)return;gr==null||gr();const r=o==null?void 0:o.refs.tableWrapper,s=r==null?void 0:r.dataset.prefix,i={strategy:"fixed",...e.popperOptions},l=b(dd,{content:t,virtualTriggering:!0,virtualRef:n,appendTo:r,placement:"top",transition:"none",offset:0,hideAfter:0,...e,popperOptions:i,onHide:()=>{gr==null||gr()}});l.appContext={...o.appContext,...o};const a=document.createElement("div");yi(l,a),l.component.exposed.onOpen();const c=r==null?void 0:r.querySelector(`.${s}-scrollbar__wrap`);gr=()=>{yi(null,a),c==null||c.removeEventListener("scroll",gr),gr=null},gr.trigger=n,c==null||c.addEventListener("scroll",gr)}function bA(e){return e.children?EY(e.children,bA):[e]}function S8(e,t){return e+t.colSpan}const wA=(e,t,n,o)=>{let r=0,s=e;const i=n.states.columns.value;if(o){const a=bA(o[e]);r=i.slice(0,i.indexOf(a[0])).reduce(S8,0),s=r+a.reduce(S8,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}:{}},F3=(e,t,n,o,r,s=0)=>{const i=[],{direction:l,start:a,after:c}=wA(t,n,o,r);if(l){const u=l==="left";i.push(`${e}-fixed-column--${l}`),u&&c+s===o.states.fixedLeafColumnsLength.value-1?i.push("is-last-column"):!u&&a-s===o.states.columns.value.length-o.states.rightFixedLeafColumnsLength.value&&i.push("is-first-column")}return i};function $8(e,t){return e+(t.realWidth===null||Number.isNaN(t.realWidth)?Number(t.width):t.realWidth)}const D3=(e,t,n,o)=>{const{direction:r,start:s=0,after:i=0}=wA(e,t,n,o);if(!r)return;const l={},a=r==="left",c=n.states.columns.value;return a?l.left=c.slice(0,s).reduce($8,0):l.right=c.slice(i+1).reverse().reduce($8,0),l},Ju=(e,t)=>{e&&(Number.isNaN(e[t])||(e[t]=`${e[t]}px`))};function vae(e){const t=nt(),n=H(!1),o=H([]);return{updateExpandRows:()=>{const a=e.data.value||[],c=e.rowKey.value;if(n.value)o.value=a.slice();else if(c){const u=Ea(o.value,c);o.value=a.reduce((d,f)=>{const h=Xn(f,c);return u[h]&&d.push(f),d},[])}else o.value=[]},toggleRowExpansion:(a,c)=>{Uf(o.value,a,c)&&t.emit("expand-change",a,o.value.slice())},setExpandRowKeys:a=>{t.store.assertRowKey();const c=e.data.value||[],u=e.rowKey.value,d=Ea(c,u);o.value=a.reduce((f,h)=>{const p=d[h];return p&&f.push(p.row),f},[])},isRowExpanded:a=>{const c=e.rowKey.value;return c?!!Ea(o.value,c)[Xn(a,c)]:o.value.includes(a)},states:{expandRows:o,defaultExpandAll:n}}}function yae(e){const t=nt(),n=H(null),o=H(null),r=c=>{t.store.assertRowKey(),n.value=c,i(c)},s=()=>{n.value=null},i=c=>{const{data:u,rowKey:d}=e;let f=null;d.value&&(f=(S(u)||[]).find(h=>Xn(h,d.value)===c)),o.value=f,t.emit("current-change",o.value,null)};return{setCurrentRowKey:r,restoreCurrentRowKey:s,setCurrentRowByKey:i,updateCurrentRow:c=>{const u=o.value;if(c&&c!==u){o.value=c,t.emit("current-change",o.value,u);return}!c&&u&&(o.value=null,t.emit("current-change",null,u))},updateCurrentRowData:()=>{const c=e.rowKey.value,u=e.data.value||[],d=o.value;if(!u.includes(d)&&d){if(c){const f=Xn(d,c);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 bae(e){const t=H([]),n=H({}),o=H(16),r=H(!1),s=H({}),i=H("hasChildren"),l=H("children"),a=nt(),c=B(()=>{if(!e.rowKey.value)return{};const y=e.data.value||[];return d(y)}),u=B(()=>{const y=e.rowKey.value,E=Object.keys(s.value),w={};return E.length&&E.forEach(C=>{if(s.value[C].length){const T={children:[]};s.value[C].forEach($=>{const A=Xn($,y);T.children.push(A),$[i.value]&&!w[A]&&(w[A]={children:[]})}),w[C]=T}}),w}),d=y=>{const E=e.rowKey.value,w={};return gae(y,(C,T,$)=>{const A=Xn(C,E);Array.isArray(T)?w[A]={children:T.map(N=>Xn(N,E)),level:$}:r.value&&(w[A]={children:[],lazy:!0,level:$})},l.value,i.value),w},f=(y=!1,E=(w=>(w=a.store)==null?void 0:w.states.defaultExpandAll.value)())=>{var w;const C=c.value,T=u.value,$=Object.keys(C),A={};if($.length){const N=S(n),P=[],I=(V,G)=>{if(y)return t.value?E||t.value.includes(G):!!(E||V!=null&&V.expanded);{const te=E||t.value&&t.value.includes(G);return!!(V!=null&&V.expanded||te)}};$.forEach(V=>{const G=N[V],te={...C[V]};if(te.expanded=I(G,V),te.lazy){const{loaded:oe=!1,loading:J=!1}=G||{};te.loaded=!!oe,te.loading=!!J,P.push(V)}A[V]=te});const D=Object.keys(T);r.value&&D.length&&P.length&&D.forEach(V=>{const G=N[V],te=T[V].children;if(P.includes(V)){if(A[V].children.length!==0)throw new Error("[ElTable]children must be an empty array.");A[V].children=te}else{const{loaded:oe=!1,loading:J=!1}=G||{};A[V]={lazy:!0,loaded:!!oe,loading:!!J,expanded:I(G,V),children:te,level:""}}})}n.value=A,(w=a.store)==null||w.updateTableScrollY()};ke(()=>t.value,()=>{f(!0)}),ke(()=>c.value,()=>{f()}),ke(()=>u.value,()=>{f()});const h=y=>{t.value=y,f()},p=(y,E)=>{a.store.assertRowKey();const w=e.rowKey.value,C=Xn(y,w),T=C&&n.value[C];if(C&&T&&"expanded"in T){const $=T.expanded;E=typeof E>"u"?!T.expanded:E,n.value[C].expanded=E,$!==E&&a.emit("expand-change",y,E),a.store.updateTableScrollY()}},m=y=>{a.store.assertRowKey();const E=e.rowKey.value,w=Xn(y,E),C=n.value[w];r.value&&C&&"loaded"in C&&!C.loaded?v(y,w,C):p(y,void 0)},v=(y,E,w)=>{const{load:C}=a.props;C&&!n.value[E].loaded&&(n.value[E].loading=!0,C(y,w,T=>{if(!Array.isArray(T))throw new TypeError("[ElTable] data must be an array");n.value[E].loading=!1,n.value[E].loaded=!0,n.value[E].expanded=!0,T.length&&(s.value[E]=T),a.emit("expand-change",y,!0)}))};return{loadData:v,loadOrToggle:m,toggleTreeExpansion:p,updateTreeExpandKeys:h,updateTreeData:f,normalize:d,states:{expandRowKeys:t,treeData:n,indent:o,lazy:r,lazyTreeNodeMap:s,lazyColumnIdentifier:i,childrenColumnName:l}}}const wae=(e,t)=>{const n=t.sortingColumn;return!n||typeof n.sortable=="string"?e:dae(e,t.sortProp,t.sortOrder,n.sortMethod,n.sortBy)},e1=e=>{const t=[];return e.forEach(n=>{n.children&&n.children.length>0?t.push.apply(t,e1(n.children)):t.push(n)}),t};function kae(){var e;const t=nt(),{size:n}=Hs((e=t.proxy)==null?void 0:e.$props),o=H(null),r=H([]),s=H([]),i=H(!1),l=H([]),a=H([]),c=H([]),u=H([]),d=H([]),f=H([]),h=H([]),p=H([]),m=[],v=H(0),y=H(0),E=H(0),w=H(!1),C=H([]),T=H(!1),$=H(!1),A=H(null),N=H({}),P=H(null),I=H(null),D=H(null),V=H(null),G=H(null);ke(r,()=>t.state&&q(!1),{deep:!0});const te=()=>{if(!o.value)throw new Error("[ElTable] prop row-key is required")},oe=_e=>{var He;(He=_e.children)==null||He.forEach(rt=>{rt.fixed=_e.fixed,oe(rt)})},J=()=>{l.value.forEach(yt=>{oe(yt)}),u.value=l.value.filter(yt=>yt.fixed===!0||yt.fixed==="left"),d.value=l.value.filter(yt=>yt.fixed==="right"),u.value.length>0&&l.value[0]&&l.value[0].type==="selection"&&!l.value[0].fixed&&(l.value[0].fixed=!0,u.value.unshift(l.value[0]));const _e=l.value.filter(yt=>!yt.fixed);a.value=[].concat(u.value).concat(_e).concat(d.value);const He=e1(_e),rt=e1(u.value),Qe=e1(d.value);v.value=He.length,y.value=rt.length,E.value=Qe.length,c.value=[].concat(rt).concat(He).concat(Qe),i.value=u.value.length>0||d.value.length>0},q=(_e,He=!1)=>{_e&&J(),He?t.state.doLayout():t.state.debouncedUpdateLayout()},X=_e=>C.value.includes(_e),ee=()=>{w.value=!1,C.value.length&&(C.value=[],t.emit("selection-change",[]))},R=()=>{let _e;if(o.value){_e=[];const He=Ea(C.value,o.value),rt=Ea(r.value,o.value);for(const Qe in He)ut(He,Qe)&&!rt[Qe]&&_e.push(He[Qe].row)}else _e=C.value.filter(He=>!r.value.includes(He));if(_e.length){const He=C.value.filter(rt=>!_e.includes(rt));C.value=He,t.emit("selection-change",He.slice())}},ye=()=>(C.value||[]).slice(),Ce=(_e,He=void 0,rt=!0)=>{if(Uf(C.value,_e,He)){const yt=(C.value||[]).slice();rt&&t.emit("select",yt,_e),t.emit("selection-change",yt)}},U=()=>{var _e,He;const rt=$.value?!w.value:!(w.value||C.value.length);w.value=rt;let Qe=!1,yt=0;const Kt=(He=(_e=t==null?void 0:t.store)==null?void 0:_e.states)==null?void 0:He.rowKey.value;r.value.forEach((gt,Jt)=>{const an=Jt+yt;A.value?A.value.call(null,gt,an)&&Uf(C.value,gt,rt)&&(Qe=!0):Uf(C.value,gt,rt)&&(Qe=!0),yt+=Fe(Xn(gt,Kt))}),Qe&&t.emit("selection-change",C.value?C.value.slice():[]),t.emit("select-all",C.value)},xe=()=>{const _e=Ea(C.value,o.value);r.value.forEach(He=>{const rt=Xn(He,o.value),Qe=_e[rt];Qe&&(C.value[Qe.index]=He)})},Ye=()=>{var _e,He,rt;if(((_e=r.value)==null?void 0:_e.length)===0){w.value=!1;return}let Qe;o.value&&(Qe=Ea(C.value,o.value));const yt=function(an){return Qe?!!Qe[Xn(an,o.value)]:C.value.includes(an)};let Kt=!0,gt=0,Jt=0;for(let an=0,T_=(r.value||[]).length;an<T_;an++){const M_=(rt=(He=t==null?void 0:t.store)==null?void 0:He.states)==null?void 0:rt.rowKey.value,Cc=an+Jt,Pd=r.value[an],A_=A.value&&A.value.call(null,Pd,Cc);if(yt(Pd))gt++;else if(!A.value||A_){Kt=!1;break}Jt+=Fe(Xn(Pd,M_))}gt===0&&(Kt=!1),w.value=Kt},Fe=_e=>{var He;if(!t||!t.store)return 0;const{treeData:rt}=t.store.states;let Qe=0;const yt=(He=rt.value[_e])==null?void 0:He.children;return yt&&(Qe+=yt.length,yt.forEach(Kt=>{Qe+=Fe(Kt)})),Qe},Z=(_e,He)=>{Array.isArray(_e)||(_e=[_e]);const rt={};return _e.forEach(Qe=>{N.value[Qe.id]=He,rt[Qe.columnKey||Qe.id]=He}),rt},ce=(_e,He,rt)=>{I.value&&I.value!==_e&&(I.value.order=null),I.value=_e,D.value=He,V.value=rt},pe=()=>{let _e=S(s);Object.keys(N.value).forEach(He=>{const rt=N.value[He];if(!rt||rt.length===0)return;const Qe=vA({columns:c.value},He);Qe&&Qe.filterMethod&&(_e=_e.filter(yt=>rt.some(Kt=>Qe.filterMethod.call(null,Kt,yt,Qe))))}),P.value=_e},ie=()=>{r.value=wae(P.value,{sortingColumn:I.value,sortProp:D.value,sortOrder:V.value})},Le=(_e=void 0)=>{_e&&_e.filter||pe(),ie()},et=_e=>{const{tableHeaderRef:He}=t.refs;if(!He)return;const rt=Object.assign({},He.filterPanels),Qe=Object.keys(rt);if(Qe.length)if(typeof _e=="string"&&(_e=[_e]),Array.isArray(_e)){const yt=_e.map(Kt=>fae({columns:c.value},Kt));Qe.forEach(Kt=>{const gt=yt.find(Jt=>Jt.id===Kt);gt&&(gt.filteredValue=[])}),t.store.commit("filterChange",{column:yt,values:[],silent:!0,multi:!0})}else Qe.forEach(yt=>{const Kt=c.value.find(gt=>gt.id===yt);Kt&&(Kt.filteredValue=[])}),N.value={},t.store.commit("filterChange",{column:{},values:[],silent:!0})},j=()=>{I.value&&(ce(null,null,null),t.store.commit("changeSortCondition",{silent:!0}))},{setExpandRowKeys:W,toggleRowExpansion:re,updateExpandRows:he,states:de,isRowExpanded:Se}=vae({data:r,rowKey:o}),{updateTreeExpandKeys:Oe,toggleTreeExpansion:be,updateTreeData:$e,loadOrToggle:ge,states:De}=bae({data:r,rowKey:o}),{updateCurrentRowData:Ke,updateCurrentRow:se,setCurrentRowKey:Y,states:ae}=yae({data:r,rowKey:o});return{assertRowKey:te,updateColumns:J,scheduleLayout:q,isSelected:X,clearSelection:ee,cleanSelection:R,getSelectionRows:ye,toggleRowSelection:Ce,_toggleAllSelection:U,toggleAllSelection:null,updateSelectionByRowKey:xe,updateAllSelected:Ye,updateFilters:Z,updateCurrentRow:se,updateSort:ce,execFilter:pe,execSort:ie,execQuery:Le,clearFilter:et,clearSort:j,toggleRowExpansion:re,setExpandRowKeysAdapter:_e=>{W(_e),Oe(_e)},setCurrentRowKey:Y,toggleRowExpansionAdapter:(_e,He)=>{c.value.some(({type:Qe})=>Qe==="expand")?re(_e,He):be(_e,He)},isRowExpanded:Se,updateExpandRows:he,updateCurrentRowData:Ke,loadOrToggle:ge,updateTreeData:$e,states:{tableSize:n,rowKey:o,data:r,_data:s,isComplex:i,_columns:l,originColumns:a,columns:c,fixedColumns:u,rightFixedColumns:d,leafColumns:f,fixedLeafColumns:h,rightFixedLeafColumns:p,updateOrderFns:m,leafColumnsLength:v,fixedLeafColumnsLength:y,rightFixedLeafColumnsLength:E,isAllSelected:w,selection:C,reserveSelection:T,selectOnIndeterminate:$,selectable:A,filters:N,filteredData:P,sortingColumn:I,sortProp:D,sortOrder:V,hoverRow:G,...de,...De,...ae}}}function _2(e,t){return e.map(n=>{var o;return n.id===t.id?t:((o=n.children)!=null&&o.length&&(n.children=_2(n.children,t)),n)})}function v2(e){e.forEach(t=>{var n,o;t.no=(n=t.getColumnIndex)==null?void 0:n.call(t),(o=t.children)!=null&&o.length&&v2(t.children)}),e.sort((t,n)=>t.no-n.no)}function Cae(){const e=nt(),t=kae();return{ns:Ae("table"),...t,mutations:{setData(i,l){const a=S(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),S(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,c){const u=S(i._columns);let d=[];a?(a&&!a.children&&(a.children=[]),a.children.push(l),d=_2(u,a)):(u.push(l),d=u),v2(d),i._columns.value=d,i.updateOrderFns.push(c),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&&(v2(i._columns.value),e.$ready&&e.store.updateColumns())},removeColumn(i,l,a,c){const u=S(i._columns)||[];if(a)a.children.splice(a.children.findIndex(f=>f.id===l.id),1),tt(()=>{var f;((f=a.children)==null?void 0:f.length)===0&&delete a.children}),i._columns.value=_2(u,a);else{const f=u.indexOf(l);f>-1&&(u.splice(f,1),i._columns.value=u)}const d=i.updateOrderFns.indexOf(c);d>-1&&i.updateOrderFns.splice(d,1),e.$ready&&(e.store.updateColumns(),e.store.scheduleLayout())},sort(i,l){const{prop:a,order:c,init:u}=l;if(a){const d=S(i.columns).find(f=>f.property===a);d&&(d.order=c,e.store.updateSort(d,a,c),e.store.commit("changeSortCondition",{init:u}))}},changeSortCondition(i,l){const{sortingColumn:a,sortProp:c,sortOrder:u}=i,d=S(a),f=S(c),h=S(u);h===null&&(i.sortingColumn.value=null,i.sortProp.value=null);const p={filter:!0};e.store.execQuery(p),(!l||!(l.silent||l.init))&&e.emit("sort-change",{column:d,prop:f,order:h}),e.store.updateTableScrollY()},filterChange(i,l){const{column:a,values:c,silent:u}=l,d=e.store.updateFilters(a,c);e.store.execQuery(),u||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(){tt(()=>e.layout.updateScrollY.apply(e.layout))}}}const Wf={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 Sae(e,t){if(!e)throw new Error("Table is required.");const n=Cae();return n.toggleAllSelection=Xa(n._toggleAllSelection,10),Object.keys(Wf).forEach(o=>{kA(CA(t,o),o,n)}),$ae(n,t),n}function $ae(e,t){Object.keys(Wf).forEach(n=>{ke(()=>CA(t,n),o=>{kA(o,n,e)})})}function kA(e,t,n){let o=e,r=Wf[t];typeof Wf[t]=="object"&&(r=r.key,o=o||Wf[t].default),n.states[r].value=o}function CA(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 Eae{constructor(t){this.observers=[],this.table=null,this.store=null,this.columns=[],this.fit=!0,this.showHeader=!0,this.height=H(null),this.scrollX=H(!1),this.scrollY=H(!1),this.bodyWidth=H(null),this.fixedWidth=H(null),this.rightFixedWidth=H(null),this.gutterWidth=0;for(const n in t)ut(t,n)&&(Yt(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(!kt)return;const o=this.table.vnode.el;if(t=pae(t),this.height.value=Number(t),!o&&(t||t===0))return tt(()=>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(!kt)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 c=s.reduce((f,h)=>f+Number(h.minWidth||80),0),u=a/c;let d=0;s.forEach((f,h)=>{if(h===0)return;const p=Math.floor(Number(f.minWidth||80)*u);d+=p,f.realWidth=Number(f.minWidth||80)+p}),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(c=>{a+=Number(c.realWidth||c.width)}),this.fixedWidth.value=a}const l=this.store.states.rightFixedColumns.value;if(l.length>0){let a=0;l.forEach(c=>{a+=Number(c.realWidth||c.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:xae}=Fr,Tae=K({name:"ElTableFilterPanel",components:{ElCheckbox:Fr,ElCheckboxGroup:xae,ElScrollbar:Vo,ElTooltip:dd,ElIcon:ve,ArrowDown:ip,ArrowUp:dT},directives:{ClickOutside:M3},props:{placement:{type:String,default:"bottom-start"},store:{type:Object},column:{type:Object},upDataColumn:{type:Function}},setup(e){const t=nt(),{t:n}=Fn(),o=Ae("table-filter"),r=t==null?void 0:t.parent;r.filterPanels.value[e.column.id]||(r.filterPanels.value[e.column.id]=t);const s=H(!1),i=H(null),l=B(()=>e.column&&e.column.filters),a=B(()=>e.column.filterClassName?`${o.b()} ${e.column.filterClassName}`:o.b()),c=B({get:()=>{var T;return(((T=e.column)==null?void 0:T.filteredValue)||[])[0]},set:T=>{u.value&&(typeof T<"u"&&T!==null?u.value.splice(0,1,T):u.value.splice(0,1))}}),u=B({get(){return e.column?e.column.filteredValue||[]:[]},set(T){e.column&&e.upDataColumn("filteredValue",T)}}),d=B(()=>e.column?e.column.filterMultiple:!0),f=T=>T.value===c.value,h=()=>{s.value=!1},p=T=>{T.stopPropagation(),s.value=!s.value},m=()=>{s.value=!1},v=()=>{w(u.value),h()},y=()=>{u.value=[],w(u.value),h()},E=T=>{c.value=T,w(typeof T<"u"&&T!==null?u.value:[]),h()},w=T=>{e.store.commit("filterChange",{column:e.column,values:T}),e.store.updateAllSelected()};ke(s,T=>{e.column&&e.upDataColumn("filterOpened",T)},{immediate:!0});const C=B(()=>{var T,$;return($=(T=i.value)==null?void 0:T.popperRef)==null?void 0:$.contentRef});return{tooltipVisible:s,multiple:d,filterClassName:a,filteredValue:u,filterValue:c,filters:l,handleConfirm:v,handleReset:y,handleSelect:E,isActive:f,t:n,ns:o,showFilterPanel:p,hideFilterPanel:m,popperPaneRef:C,tooltip:i}}}),Mae={key:0},Aae=["disabled"],Oae=["label","onClick"];function Iae(e,t,n,o,r,s){const i=z("el-checkbox"),l=z("el-checkbox-group"),a=z("el-scrollbar"),c=z("arrow-up"),u=z("arrow-down"),d=z("el-icon"),f=z("el-tooltip"),h=Mt("click-outside");return g(),L(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:x(()=>[e.multiple?(g(),k("div",Mae,[_("div",{class:F(e.ns.e("content"))},[b(a,{"wrap-class":e.ns.e("wrap")},{default:x(()=>[b(l,{modelValue:e.filteredValue,"onUpdate:modelValue":t[0]||(t[0]=p=>e.filteredValue=p),class:F(e.ns.e("checkbox-group"))},{default:x(()=>[(g(!0),k(Q,null,Me(e.filters,p=>(g(),L(i,{key:p.value,value:p.value},{default:x(()=>[ne(M(p.text),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","class"])]),_:1},8,["wrap-class"])],2),_("div",{class:F(e.ns.e("bottom"))},[_("button",{class:F({[e.ns.is("disabled")]:e.filteredValue.length===0}),disabled:e.filteredValue.length===0,type:"button",onClick:t[1]||(t[1]=(...p)=>e.handleConfirm&&e.handleConfirm(...p))},M(e.t("el.table.confirmFilter")),11,Aae),_("button",{type:"button",onClick:t[2]||(t[2]=(...p)=>e.handleReset&&e.handleReset(...p))},M(e.t("el.table.resetFilter")),1)],2)])):(g(),k("ul",{key:1,class:F(e.ns.e("list"))},[_("li",{class:F([e.ns.e("list-item"),{[e.ns.is("active")]:e.filterValue===void 0||e.filterValue===null}]),onClick:t[3]||(t[3]=p=>e.handleSelect(null))},M(e.t("el.table.clearFilter")),3),(g(!0),k(Q,null,Me(e.filters,p=>(g(),k("li",{key:p.value,class:F([e.ns.e("list-item"),e.ns.is("active",e.isActive(p))]),label:p.value,onClick:m=>e.handleSelect(p.value)},M(p.text),11,Oae))),128))],2))]),default:x(()=>[Ve((g(),k("span",{class:F([`${e.ns.namespace.value}-table__column-filter-trigger`,`${e.ns.namespace.value}-none-outline`]),onClick:t[4]||(t[4]=(...p)=>e.showFilterPanel&&e.showFilterPanel(...p))},[b(d,null,{default:x(()=>[e.column.filterOpened?(g(),L(c,{key:0})):(g(),L(u,{key:1}))]),_:1})],2)),[[h,e.hideFilterPanel,e.popperPaneRef]])]),_:1},8,["visible","placement","popper-class"])}var Nae=Re(Tae,[["render",Iae],["__file","filter-panel.vue"]]);function SA(e){const t=nt();ld(()=>{n.value.addObserver(t)}),mt(()=>{o(n.value),r(n.value)}),Bl(()=>{o(n.value),r(n.value)}),Us(()=>{n.value.removeObserver(t)});const n=B(()=>{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(),c={};a.forEach(u=>{c[u.id]=u});for(let u=0,d=l.length;u<d;u++){const f=l[u],h=f.getAttribute("name"),p=c[h];p&&f.setAttribute("width",p.realWidth||p.width)}},r=s=>{var i,l;const a=((i=e.vnode.el)==null?void 0:i.querySelectorAll("colgroup > col[name=gutter]"))||[];for(let u=0,d=a.length;u<d;u++)a[u].setAttribute("width",s.scrollY.value?s.gutterWidth:"0");const c=((l=e.vnode.el)==null?void 0:l.querySelectorAll("th.gutter"))||[];for(let u=0,d=c.length;u<d;u++){const f=c[u];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 qs=Symbol("ElTable");function Pae(e,t){const n=nt(),o=Pe(qs),r=m=>{m.stopPropagation()},s=(m,v)=>{!v.filters&&v.sortable?p(m,v,!1):v.filterable&&!v.sortable&&r(m),o==null||o.emit("header-click",v,m)},i=(m,v)=>{o==null||o.emit("header-contextmenu",v,m)},l=H(null),a=H(!1),c=H({}),u=(m,v)=>{if(kt&&!(v.children&&v.children.length>0)&&l.value&&e.border){a.value=!0;const y=o;t("set-drag-visible",!0);const w=(y==null?void 0:y.vnode.el).getBoundingClientRect().left,C=n.vnode.el.querySelector(`th.${v.id}`),T=C.getBoundingClientRect(),$=T.left-w+30;ec(C,"noclick"),c.value={startMouseLeft:m.clientX,startLeft:T.right-w,startColumnLeft:T.left-w,tableLeft:w};const A=y==null?void 0:y.refs.resizeProxy;A.style.left=`${c.value.startLeft}px`,document.onselectstart=function(){return!1},document.ondragstart=function(){return!1};const N=I=>{const D=I.clientX-c.value.startMouseLeft,V=c.value.startLeft+D;A.style.left=`${Math.max($,V)}px`},P=()=>{if(a.value){const{startColumnLeft:I,startLeft:D}=c.value,G=Number.parseInt(A.style.left,10)-I;v.width=v.realWidth=G,y==null||y.emit("header-dragend",v.width,D-I,v,m),requestAnimationFrame(()=>{e.store.scheduleLayout(!1,!0)}),document.body.style.cursor="",a.value=!1,l.value=null,c.value={},t("set-drag-visible",!1)}document.removeEventListener("mousemove",N),document.removeEventListener("mouseup",P),document.onselectstart=null,document.ondragstart=null,setTimeout(()=>{Rs(C,"noclick")},0)};document.addEventListener("mousemove",N),document.addEventListener("mouseup",P)}},d=(m,v)=>{if(v.children&&v.children.length>0)return;const y=m.target;if(!is(y))return;const E=y==null?void 0:y.closest("th");if(!(!v||!v.resizable)&&!a.value&&e.border){const w=E.getBoundingClientRect(),C=document.body.style;w.width>12&&w.right-m.pageX<8?(C.cursor="col-resize",pu(E,"is-sortable")&&(E.style.cursor="col-resize"),l.value=v):a.value||(C.cursor="",pu(E,"is-sortable")&&(E.style.cursor="pointer"),l.value=null)}},f=()=>{kt&&(document.body.style.cursor="")},h=({order:m,sortOrders:v})=>{if(m==="")return v[0];const y=v.indexOf(m||null);return v[y>v.length-2?0:y+1]},p=(m,v,y)=>{var E;m.stopPropagation();const w=v.order===y?null:y||h(v),C=(E=m.target)==null?void 0:E.closest("th");if(C&&pu(C,"noclick")){Rs(C,"noclick");return}if(!v.sortable)return;const T=e.store.states;let $=T.sortProp.value,A;const N=T.sortingColumn.value;(N!==v||N===v&&N.order===null)&&(N&&(N.order=null),T.sortingColumn.value=v,$=v.property),w?A=v.order=w:A=v.order=null,T.sortProp.value=$,T.sortOrder.value=A,o==null||o.store.commit("changeSortCondition")};return{handleHeaderClick:s,handleHeaderContextMenu:i,handleMouseDown:u,handleMouseMove:d,handleMouseOut:f,handleSortClick:p,handleFilterClick:r}}function Lae(e){const t=Pe(qs),n=Ae("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=[],c=t==null?void 0:t.props.headerRowClassName;return typeof c=="string"?a.push(c):typeof c=="function"&&a.push(c.call(null,{rowIndex:l})),a.join(" ")},getHeaderCellStyle:(l,a,c,u)=>{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:c,column:u}));const h=D3(a,u.fixed,e.store,c);return Ju(h,"left"),Ju(h,"right"),Object.assign({},f,h)},getHeaderCellClass:(l,a,c,u)=>{const d=F3(n.b(),a,u.fixed,e.store,c),f=[u.id,u.order,u.headerAlign,u.className,u.labelClassName,...d];u.children||f.push("is-leaf"),u.sortable&&f.push("is-sortable");const h=t==null?void 0:t.props.headerCellClassName;return typeof h=="string"?f.push(h):typeof h=="function"&&f.push(h.call(null,{rowIndex:l,columnIndex:a,row:c,column:u})),f.push(n.e("cell")),f.filter(p=>!!p).join(" ")}}}const $A=e=>{const t=[];return e.forEach(n=>{n.children?(t.push(n),t.push.apply(t,$A(n.children))):t.push(n)}),t},Rae=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 $A(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 Fae(e){const t=Pe(qs),n=B(()=>Rae(e.store.states.originColumns.value));return{isGroup:B(()=>{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 Dae=K({name:"ElTableHeader",components:{ElCheckbox:Fr},props:{fixed:{type:String,default:""},store:{required:!0,type:Object},border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})}},setup(e,{emit:t}){const n=nt(),o=Pe(qs),r=Ae("table"),s=H({}),{onColumnsChange:i,onScrollableChange:l}=SA(o);mt(async()=>{await tt(),await tt();const{prop:$,order:A}=e.defaultSort;o==null||o.store.commit("sort",{prop:$,order:A,init:!0})});const{handleHeaderClick:a,handleHeaderContextMenu:c,handleMouseDown:u,handleMouseMove:d,handleMouseOut:f,handleSortClick:h,handleFilterClick:p}=Pae(e,t),{getHeaderRowStyle:m,getHeaderRowClass:v,getHeaderCellStyle:y,getHeaderCellClass:E}=Lae(e),{isGroup:w,toggleAllSelection:C,columnRows:T}=Fae(e);return n.state={onColumnsChange:i,onScrollableChange:l},n.filterPanels=s,{ns:r,filterPanels:s,onColumnsChange:i,onScrollableChange:l,columnRows:T,getHeaderRowClass:v,getHeaderRowStyle:m,getHeaderCellClass:E,getHeaderCellStyle:y,handleHeaderClick:a,handleHeaderContextMenu:c,handleMouseDown:u,handleMouseMove:d,handleMouseOut:f,handleSortClick:h,handleFilterClick:p,isGroup:w,toggleAllSelection:C}},render(){const{ns:e,isGroup:t,columnRows:n,getHeaderCellStyle:o,getHeaderCellClass:r,getHeaderRowClass:s,getHeaderRowStyle:i,handleHeaderClick:l,handleHeaderContextMenu:a,handleMouseDown:c,handleMouseMove:u,handleSortClick:d,handleMouseOut:f,store:h,$parent:p}=this;let m=1;return Xe("thead",{class:{[e.is("group")]:t}},n.map((v,y)=>Xe("tr",{class:s(y),key:y,style:i(y)},v.map((E,w)=>(E.rowSpan>m&&(m=E.rowSpan),Xe("th",{class:r(y,w,v,E),colspan:E.colSpan,key:`${E.id}-thead`,rowspan:E.rowSpan,style:o(y,w,v,E),onClick:C=>l(C,E),onContextmenu:C=>a(C,E),onMousedown:C=>c(C,E),onMousemove:C=>u(C,E),onMouseout:f},[Xe("div",{class:["cell",E.filteredValue&&E.filteredValue.length>0?"highlight":""]},[E.renderHeader?E.renderHeader({column:E,$index:w,store:h,_self:p}):E.label,E.sortable&&Xe("span",{onClick:C=>d(C,E),class:"caret-wrapper"},[Xe("i",{onClick:C=>d(C,E,"ascending"),class:"sort-caret ascending"}),Xe("i",{onClick:C=>d(C,E,"descending"),class:"sort-caret descending"})]),E.filterable&&Xe(Nae,{store:h,placement:E.filterPlacement||"bottom-start",column:E,upDataColumn:(C,T)=>{E[C]=T}})])]))))))}});function Bae(e){const t=Pe(qs),n=H(""),o=H(Xe("div")),r=(p,m,v)=>{var y;const E=t,w=sv(p);let C;const T=(y=E==null?void 0:E.vnode.el)==null?void 0:y.dataset.prefix;w&&(C=C8({columns:e.store.states.columns.value},w,T),C&&(E==null||E.emit(`cell-${v}`,m,C,w,p))),E==null||E.emit(`row-${v}`,m,C,p)},s=(p,m)=>{r(p,m,"dblclick")},i=(p,m)=>{e.store.commit("setCurrentRow",m),r(p,m,"click")},l=(p,m)=>{r(p,m,"contextmenu")},a=Xa(p=>{e.store.commit("setHoverRow",p)},30),c=Xa(()=>{e.store.commit("setHoverRow",null)},30),u=p=>{const m=window.getComputedStyle(p,null),v=Number.parseInt(m.paddingLeft,10)||0,y=Number.parseInt(m.paddingRight,10)||0,E=Number.parseInt(m.paddingTop,10)||0,w=Number.parseInt(m.paddingBottom,10)||0;return{left:v,right:y,top:E,bottom:w}},d=(p,m,v)=>{let y=m.target.parentNode;for(;p>1&&(y=y==null?void 0:y.nextSibling,!(!y||y.nodeName!=="TR"));)v(y,"hover-row hover-fixed-row"),p--};return{handleDoubleClick:s,handleClick:i,handleContextMenu:l,handleMouseEnter:a,handleMouseLeave:c,handleCellMouseEnter:(p,m,v)=>{var y;const E=t,w=sv(p),C=(y=E==null?void 0:E.vnode.el)==null?void 0:y.dataset.prefix;if(w){const q=C8({columns:e.store.states.columns.value},w,C);w.rowSpan>1&&d(w.rowSpan,p,ec);const X=E.hoverState={cell:w,column:q,row:m};E==null||E.emit("cell-mouse-enter",X.row,X.column,X.cell,p)}if(!v)return;const T=p.target.querySelector(".cell");if(!(pu(T,`${C}-tooltip`)&&T.childNodes.length))return;const $=document.createRange();$.setStart(T,0),$.setEnd(T,T.childNodes.length);let A=$.getBoundingClientRect().width,N=$.getBoundingClientRect().height;A-Math.floor(A)<.001&&(A=Math.floor(A)),N-Math.floor(N)<.001&&(N=Math.floor(N));const{top:D,left:V,right:G,bottom:te}=u(T),oe=V+G,J=D+te;(A+oe>T.offsetWidth||N+J>T.offsetHeight||T.scrollWidth>T.offsetWidth)&&_ae(v,w.innerText||w.textContent,w,E)},handleCellMouseLeave:p=>{const m=sv(p);if(!m)return;m.rowSpan>1&&d(m.rowSpan,p,Rs);const v=t==null?void 0:t.hoverState;t==null||t.emit("cell-mouse-leave",v==null?void 0:v.row,v==null?void 0:v.column,v==null?void 0:v.cell,p)},tooltipContent:n,tooltipTrigger:o}}function Vae(e){const t=Pe(qs),n=Ae("table");return{getRowStyle:(c,u)=>{const d=t==null?void 0:t.props.rowStyle;return typeof d=="function"?d.call(null,{row:c,rowIndex:u}):d||null},getRowClass:(c,u)=>{const d=[n.e("row")];t!=null&&t.props.highlightCurrentRow&&c===e.store.states.currentRow.value&&d.push("current-row"),e.stripe&&u%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:c,rowIndex:u})),d},getCellStyle:(c,u,d,f)=>{const h=t==null?void 0:t.props.cellStyle;let p=h??{};typeof h=="function"&&(p=h.call(null,{rowIndex:c,columnIndex:u,row:d,column:f}));const m=D3(u,e==null?void 0:e.fixed,e.store);return Ju(m,"left"),Ju(m,"right"),Object.assign({},p,m)},getCellClass:(c,u,d,f,h)=>{const p=F3(n.b(),u,e==null?void 0:e.fixed,e.store,void 0,h),m=[f.id,f.align,f.className,...p],v=t==null?void 0:t.props.cellClassName;return typeof v=="string"?m.push(v):typeof v=="function"&&m.push(v.call(null,{rowIndex:c,columnIndex:u,row:d,column:f})),m.push(n.e("cell")),m.filter(y=>!!y).join(" ")},getSpan:(c,u,d,f)=>{let h=1,p=1;const m=t==null?void 0:t.props.spanMethod;if(typeof m=="function"){const v=m({row:c,column:u,rowIndex:d,columnIndex:f});Array.isArray(v)?(h=v[0],p=v[1]):typeof v=="object"&&(h=v.rowspan,p=v.colspan)}return{rowspan:h,colspan:p}},getColspanRealWidth:(c,u,d)=>{if(u<1)return c[d].realWidth;const f=c.map(({realWidth:h,width:p})=>h||p).slice(d,d+u);return Number(f.reduce((h,p)=>Number(h)+Number(p),-1))}}}function zae(e){const t=Pe(qs),n=Ae("table"),{handleDoubleClick:o,handleClick:r,handleContextMenu:s,handleMouseEnter:i,handleMouseLeave:l,handleCellMouseEnter:a,handleCellMouseLeave:c,tooltipContent:u,tooltipTrigger:d}=Bae(e),{getRowStyle:f,getRowClass:h,getCellStyle:p,getCellClass:m,getSpan:v,getColspanRealWidth:y}=Vae(e),E=B(()=>e.store.states.columns.value.findIndex(({type:A})=>A==="default")),w=(A,N)=>{const P=t.props.rowKey;return P?Xn(A,P):N},C=(A,N,P,I=!1)=>{const{tooltipEffect:D,tooltipOptions:V,store:G}=e,{indent:te,columns:oe}=G.states,J=h(A,N);let q=!0;return P&&(J.push(n.em("row",`level-${P.level}`)),q=P.display),Xe("tr",{style:[q?null:{display:"none"},f(A,N)],class:J,key:w(A,N),onDblclick:ee=>o(ee,A),onClick:ee=>r(ee,A),onContextmenu:ee=>s(ee,A),onMouseenter:()=>i(N),onMouseleave:l},oe.value.map((ee,R)=>{const{rowspan:ye,colspan:Ce}=v(A,ee,N,R);if(!ye||!Ce)return null;const U=Object.assign({},ee);U.realWidth=y(oe.value,Ce,R);const xe={store:e.store,_self:e.context||t,column:U,row:A,$index:N,cellIndex:R,expanded:I};R===E.value&&P&&(xe.treeNode={indent:P.level*te.value,level:P.level},typeof P.expanded=="boolean"&&(xe.treeNode.expanded=P.expanded,"loading"in P&&(xe.treeNode.loading=P.loading),"noLazyChildren"in P&&(xe.treeNode.noLazyChildren=P.noLazyChildren)));const Ye=`${N},${R}`,Fe=U.columnKey||U.rawColumnKey||"",Z=T(R,ee,xe),ce=ee.showOverflowTooltip&&TY({effect:D},V,ee.showOverflowTooltip);return Xe("td",{style:p(N,R,A,ee),class:m(N,R,A,ee,Ce-1),key:`${Fe}${Ye}`,rowspan:ye,colspan:Ce,onMouseenter:pe=>a(pe,A,ce),onMouseleave:c},[Z])}))},T=(A,N,P)=>N.renderCell(P);return{wrappedRowRender:(A,N)=>{const P=e.store,{isRowExpanded:I,assertRowKey:D}=P,{treeData:V,lazyTreeNodeMap:G,childrenColumnName:te,rowKey:oe}=P.states,J=P.states.columns.value;if(J.some(({type:X})=>X==="expand")){const X=I(A),ee=C(A,N,void 0,X),R=t.renderExpanded;return X?R?[[ee,Xe("tr",{key:`expanded-row__${ee.key}`},[Xe("td",{colspan:J.length,class:`${n.e("cell")} ${n.e("expanded-cell")}`},[R({row:A,$index:N,store:P,expanded:X})])])]]:(console.error("[Element Error]renderExpanded is required."),ee):[[ee]]}else if(Object.keys(V.value).length){D();const X=Xn(A,oe.value);let ee=V.value[X],R=null;ee&&(R={expanded:ee.expanded,level:ee.level,display:!0},typeof ee.lazy=="boolean"&&(typeof ee.loaded=="boolean"&&ee.loaded&&(R.noLazyChildren=!(ee.children&&ee.children.length)),R.loading=ee.loading));const ye=[C(A,N,R)];if(ee){let Ce=0;const U=(Ye,Fe)=>{Ye&&Ye.length&&Fe&&Ye.forEach(Z=>{const ce={display:Fe.display&&Fe.expanded,level:Fe.level+1,expanded:!1,noLazyChildren:!1,loading:!1},pe=Xn(Z,oe.value);if(pe==null)throw new Error("For nested data item, row-key is required.");if(ee={...V.value[pe]},ee&&(ce.expanded=ee.expanded,ee.level=ee.level||ce.level,ee.display=!!(ee.expanded&&ce.display),typeof ee.lazy=="boolean"&&(typeof ee.loaded=="boolean"&&ee.loaded&&(ce.noLazyChildren=!(ee.children&&ee.children.length)),ce.loading=ee.loading)),Ce++,ye.push(C(Z,N+Ce,ce)),ee){const ie=G.value[pe]||Z[te.value];U(ie,ee)}})};ee.display=!0;const xe=G.value[X]||A[te.value];U(xe,ee)}return ye}else return C(A,N,void 0)},tooltipContent:u,tooltipTrigger:d}}const jae={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 Hae=K({name:"ElTableBody",props:jae,setup(e){const t=nt(),n=Pe(qs),o=Ae("table"),{wrappedRowRender:r,tooltipContent:s,tooltipTrigger:i}=zae(e),{onColumnsChange:l,onScrollableChange:a}=SA(n),c=[];return ke(e.store.states.hoverRow,(u,d)=>{var f;const h=t==null?void 0:t.vnode.el,p=Array.from((h==null?void 0:h.children)||[]).filter(y=>y==null?void 0:y.classList.contains(`${o.e("row")}`));let m=u;const v=(f=p[m])==null?void 0:f.childNodes;if(v!=null&&v.length){let y=0;Array.from(v).reduce((w,C,T)=>{var $,A;return(($=v[T])==null?void 0:$.colSpan)>1&&(y=(A=v[T])==null?void 0:A.colSpan),C.nodeName!=="TD"&&y===0&&w.push(T),y>0&&y--,w},[]).forEach(w=>{for(var C;m>0;){const T=(C=p[m-1])==null?void 0:C.childNodes;if(T[w]&&T[w].nodeName==="TD"&&T[w].rowSpan>1){ec(T[w],"hover-cell"),c.push(T[w]);break}m--}})}else c.forEach(y=>Rs(y,"hover-cell")),c.length=0;!e.store.states.isComplex.value||!kt||RY(()=>{const y=p[d],E=p[u];y&&!y.classList.contains("hover-fixed-row")&&Rs(y,"hover-row"),E&&ec(E,"hover-row")})}),Us(()=>{var u;(u=gr)==null||u()}),{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 Xe("tbody",{tabIndex:-1},[n.reduce((o,r)=>o.concat(e(r,o.length)),[])])}});function Uae(){const e=Pe(qs),t=e==null?void 0:e.store,n=B(()=>t.states.fixedLeafColumnsLength.value),o=B(()=>t.states.rightFixedColumns.value.length),r=B(()=>t.states.columns.value.length),s=B(()=>t.states.fixedColumns.value.length),i=B(()=>t.states.rightFixedColumns.value.length);return{leftFixedLeafCount:n,rightFixedLeafCount:o,columnsCount:r,leftFixedCount:s,rightFixedCount:i,columns:t.states.columns}}function Wae(e){const{columns:t}=Uae(),n=Ae("table");return{getCellClasses:(s,i)=>{const l=s[i],a=[n.e("cell"),l.id,l.align,l.labelClassName,...F3(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=D3(i,s.fixed,e.store);return Ju(l,"left"),Ju(l,"right"),l},columns:t}}var qae=K({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}=Wae(e);return{ns:Ae("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 c=s.map(h=>Number(h[l.property])),u=[];let d=!0;c.forEach(h=>{if(!Number.isNaN(+h)){d=!1;const p=`${h}`.split(".")[1];u.push(p?p.length:0)}});const f=Math.max.apply(null,u);d?i[a]="":i[a]=c.reduce((h,p)=>{const m=Number(p);return Number.isNaN(+m)?h:Number.parseFloat((h+p).toFixed(Math.min(f,20)))},0)}),Xe(Xe("tfoot",[Xe("tr",{},[...e.map((l,a)=>Xe("td",{key:a,colspan:l.colSpan,rowspan:l.rowSpan,class:n(e,a),style:t(l,a)},[Xe("div",{class:["cell",l.labelClassName]},[i[a]])]))])]))}});function Kae(e){return{setCurrentRow:u=>{e.commit("setCurrentRow",u)},getSelectionRows:()=>e.getSelectionRows(),toggleRowSelection:(u,d)=>{e.toggleRowSelection(u,d,!1),e.updateAllSelected()},clearSelection:()=>{e.clearSelection()},clearFilter:u=>{e.clearFilter(u)},toggleAllSelection:()=>{e.commit("toggleAllSelection")},toggleRowExpansion:(u,d)=>{e.toggleRowExpansionAdapter(u,d)},clearSort:()=>{e.clearSort()},sort:(u,d)=>{e.commit("sort",{prop:u,order:d})}}}function Gae(e,t,n,o){const r=H(!1),s=H(null),i=H(!1),l=ee=>{i.value=ee},a=H({width:null,height:null,headerHeight:null}),c=H(!1),u={display:"inline-block",verticalAlign:"middle"},d=H(),f=H(0),h=H(0),p=H(0),m=H(0),v=H(0);Yr(()=>{t.setHeight(e.height)}),Yr(()=>{t.setMaxHeight(e.maxHeight)}),ke(()=>[e.currentRowKey,n.states.rowKey],([ee,R])=>{!S(R)||!S(ee)||n.setCurrentRowKey(`${ee}`)},{immediate:!0}),ke(()=>e.data,ee=>{o.store.commit("setData",ee)},{immediate:!0,deep:!0}),Yr(()=>{e.expandRowKeys&&n.setExpandRowKeysAdapter(e.expandRowKeys)});const y=()=>{o.store.commit("setHoverRow",null),o.hoverState&&(o.hoverState=null)},E=(ee,R)=>{const{pixelX:ye,pixelY:Ce}=R;Math.abs(ye)>=Math.abs(Ce)&&(o.refs.bodyWrapper.scrollLeft+=R.pixelX/5)},w=B(()=>e.height||e.maxHeight||n.states.fixedColumns.value.length>0||n.states.rightFixedColumns.value.length>0),C=B(()=>({width:t.bodyWidth.value?`${t.bodyWidth.value}px`:""})),T=()=>{w.value&&t.updateElsHeight(),t.updateColumnsWidth(),requestAnimationFrame(P)};mt(async()=>{await tt(),n.updateColumns(),I(),requestAnimationFrame(T);const ee=o.vnode.el,R=o.refs.headerWrapper;e.flexible&&ee&&ee.parentElement&&(ee.parentElement.style.minWidth="0"),a.value={width:d.value=ee.offsetWidth,height:ee.offsetHeight,headerHeight:e.showHeader&&R?R.offsetHeight:null},n.states.columns.value.forEach(ye=>{ye.filteredValue&&ye.filteredValue.length&&o.store.commit("filterChange",{column:ye,values:ye.filteredValue,silent:!0})}),o.$ready=!0});const $=(ee,R)=>{if(!ee)return;const ye=Array.from(ee.classList).filter(Ce=>!Ce.startsWith("is-scrolling-"));ye.push(t.scrollX.value?R:"is-scrolling-none"),ee.className=ye.join(" ")},A=ee=>{const{tableWrapper:R}=o.refs;$(R,ee)},N=ee=>{const{tableWrapper:R}=o.refs;return!!(R&&R.classList.contains(ee))},P=function(){if(!o.refs.scrollBarRef)return;if(!t.scrollX.value){const Fe="is-scrolling-none";N(Fe)||A(Fe);return}const ee=o.refs.scrollBarRef.wrapRef;if(!ee)return;const{scrollLeft:R,offsetWidth:ye,scrollWidth:Ce}=ee,{headerWrapper:U,footerWrapper:xe}=o.refs;U&&(U.scrollLeft=R),xe&&(xe.scrollLeft=R);const Ye=Ce-ye-1;R>=Ye?A("is-scrolling-right"):A(R===0?"is-scrolling-left":"is-scrolling-middle")},I=()=>{o.refs.scrollBarRef&&(o.refs.scrollBarRef.wrapRef&&Tn(o.refs.scrollBarRef.wrapRef,"scroll",P,{passive:!0}),e.fit?Oo(o.vnode.el,D):Tn(window,"resize",D),Oo(o.refs.bodyWrapper,()=>{var ee,R;D(),(R=(ee=o.refs)==null?void 0:ee.scrollBarRef)==null||R.update()}))},D=()=>{var ee,R,ye,Ce;const U=o.vnode.el;if(!o.$ready||!U)return;let xe=!1;const{width:Ye,height:Fe,headerHeight:Z}=a.value,ce=d.value=U.offsetWidth;Ye!==ce&&(xe=!0);const pe=U.offsetHeight;(e.height||w.value)&&Fe!==pe&&(xe=!0);const ie=e.tableLayout==="fixed"?o.refs.headerWrapper:(ee=o.refs.tableHeaderRef)==null?void 0:ee.$el;e.showHeader&&(ie==null?void 0:ie.offsetHeight)!==Z&&(xe=!0),f.value=((R=o.refs.tableWrapper)==null?void 0:R.scrollHeight)||0,p.value=(ie==null?void 0:ie.scrollHeight)||0,m.value=((ye=o.refs.footerWrapper)==null?void 0:ye.offsetHeight)||0,v.value=((Ce=o.refs.appendWrapper)==null?void 0:Ce.offsetHeight)||0,h.value=f.value-p.value-m.value-v.value,xe&&(a.value={width:ce,height:pe,headerHeight:e.showHeader&&(ie==null?void 0:ie.offsetHeight)||0},T())},V=ar(),G=B(()=>{const{bodyWidth:ee,scrollY:R,gutterWidth:ye}=t;return ee.value?`${ee.value-(R.value?ye:0)}px`:""}),te=B(()=>e.maxHeight?"fixed":e.tableLayout),oe=B(()=>{if(e.data&&e.data.length)return null;let ee="100%";e.height&&h.value&&(ee=`${h.value}px`);const R=d.value;return{width:R?`${R}px`:"",height:ee}}),J=B(()=>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`}:{}),q=B(()=>e.height?{height:"100%"}:e.maxHeight?Number.isNaN(Number(e.maxHeight))?{maxHeight:`calc(${e.maxHeight} - ${p.value+m.value}px)`}:{maxHeight:`${e.maxHeight-p.value-m.value}px`}:{});return{isHidden:r,renderExpanded:s,setDragVisible:l,isGroup:c,handleMouseLeave:y,handleHeaderFooterMousewheel:E,tableSize:V,emptyBlockStyle:oe,handleFixedMousewheel:(ee,R)=>{const ye=o.refs.bodyWrapper;if(Math.abs(R.spinY)>0){const Ce=ye.scrollTop;R.pixelY<0&&Ce!==0&&ee.preventDefault(),R.pixelY>0&&ye.scrollHeight-ye.clientHeight>Ce&&ee.preventDefault(),ye.scrollTop+=Math.ceil(R.pixelY/5)}else ye.scrollLeft+=Math.ceil(R.pixelX/5)},resizeProxyVisible:i,bodyWidth:G,resizeState:a,doLayout:T,tableBodyStyles:C,tableLayout:te,scrollbarViewStyle:u,tableInnerStyle:J,scrollbarStyle:q}}function Yae(e){const t=H(),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)};mt(()=>{n()}),Us(()=>{var o;(o=t.value)==null||o.disconnect()})}var Jae={data:{type:Array,default:()=>[]},size:xi,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 EA(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 Xe("colgroup",{},n.map(r=>Xe("col",o(r))))}EA.props=["columns","tableLayout"];const Zae=()=>{const e=H(),t=(s,i)=>{const l=e.value;l&&l.scrollTo(s,i)},n=(s,i)=>{const l=e.value;l&&Et(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 Xae=1;const Qae=K({name:"ElTable",directives:{Mousewheel:aoe},components:{TableHeader:Dae,TableBody:Hae,TableFooter:qae,ElScrollbar:Vo,hColgroup:EA},props:Jae,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}=Fn(),n=Ae("table"),o=nt();bt(qs,o);const r=Sae(o,e);o.store=r;const s=new Eae({store:o.store,table:o,fit:e.fit,showHeader:e.showHeader});o.layout=s;const i=B(()=>(r.states.data.value||[]).length===0),{setCurrentRow:l,getSelectionRows:a,toggleRowSelection:c,clearSelection:u,clearFilter:d,toggleAllSelection:f,toggleRowExpansion:h,clearSort:p,sort:m}=Kae(r),{isHidden:v,renderExpanded:y,setDragVisible:E,isGroup:w,handleMouseLeave:C,handleHeaderFooterMousewheel:T,tableSize:$,emptyBlockStyle:A,handleFixedMousewheel:N,resizeProxyVisible:P,bodyWidth:I,resizeState:D,doLayout:V,tableBodyStyles:G,tableLayout:te,scrollbarViewStyle:oe,tableInnerStyle:J,scrollbarStyle:q}=Gae(e,s,r,o),{scrollBarRef:X,scrollTo:ee,setScrollLeft:R,setScrollTop:ye}=Zae(),Ce=Xa(V,50),U=`${n.namespace.value}-table_${Xae++}`;o.tableId=U,o.state={isGroup:w,resizeState:D,doLayout:V,debouncedUpdateLayout:Ce};const xe=B(()=>e.sumText||t("el.table.sumText")),Ye=B(()=>e.emptyText||t("el.table.emptyText"));return Yae(o),{ns:n,layout:s,store:r,handleHeaderFooterMousewheel:T,handleMouseLeave:C,tableId:U,tableSize:$,isHidden:v,isEmpty:i,renderExpanded:y,resizeProxyVisible:P,resizeState:D,isGroup:w,bodyWidth:I,tableBodyStyles:G,emptyBlockStyle:A,debouncedUpdateLayout:Ce,handleFixedMousewheel:N,setCurrentRow:l,getSelectionRows:a,toggleRowSelection:c,clearSelection:u,clearFilter:d,toggleAllSelection:f,toggleRowExpansion:h,clearSort:p,doLayout:V,sort:m,t,setDragVisible:E,context:o,computedSumText:xe,computedEmptyText:Ye,tableLayout:te,scrollbarViewStyle:oe,tableInnerStyle:J,scrollbarStyle:q,scrollBarRef:X,scrollTo:ee,setScrollLeft:R,setScrollTop:ye}}}),ece=["data-prefix"],tce={ref:"hiddenColumns",class:"hidden-columns"};function nce(e,t,n,o,r,s){const i=z("hColgroup"),l=z("table-header"),a=z("table-body"),c=z("table-footer"),u=z("el-scrollbar"),d=Mt("mousewheel");return g(),k("div",{ref:"tableWrapper",class:F([{[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:Be(e.style),"data-prefix":e.ns.namespace.value,onMouseleave:t[0]||(t[0]=(...f)=>e.handleMouseLeave&&e.handleMouseLeave(...f))},[_("div",{class:F(e.ns.e("inner-wrapper")),style:Be(e.tableInnerStyle)},[_("div",tce,[le(e.$slots,"default")],512),e.showHeader&&e.tableLayout==="fixed"?Ve((g(),k("div",{key:0,ref:"headerWrapper",class:F(e.ns.e("header-wrapper"))},[_("table",{ref:"tableHeader",class:F(e.ns.e("header")),style:Be(e.tableBodyStyles),border:"0",cellpadding:"0",cellspacing:"0"},[b(i,{columns:e.store.states.columns.value,"table-layout":e.tableLayout},null,8,["columns","table-layout"]),b(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]]):O("v-if",!0),_("div",{ref:"bodyWrapper",class:F(e.ns.e("body-wrapper"))},[b(u,{ref:"scrollBarRef","view-style":e.scrollbarViewStyle,"wrap-style":e.scrollbarStyle,always:e.scrollbarAlwaysOn},{default:x(()=>[_("table",{ref:"tableBody",class:F(e.ns.e("body")),cellspacing:"0",cellpadding:"0",border:"0",style:Be({width:e.bodyWidth,tableLayout:e.tableLayout})},[b(i,{columns:e.store.states.columns.value,"table-layout":e.tableLayout},null,8,["columns","table-layout"]),e.showHeader&&e.tableLayout==="auto"?(g(),L(l,{key:0,ref:"tableHeaderRef",class:F(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"])):O("v-if",!0),b(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"?(g(),L(c,{key:1,class:F(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"])):O("v-if",!0)],6),e.isEmpty?(g(),k("div",{key:0,ref:"emptyBlock",style:Be(e.emptyBlockStyle),class:F(e.ns.e("empty-block"))},[_("span",{class:F(e.ns.e("empty-text"))},[le(e.$slots,"empty",{},()=>[ne(M(e.computedEmptyText),1)])],2)],6)):O("v-if",!0),e.$slots.append?(g(),k("div",{key:1,ref:"appendWrapper",class:F(e.ns.e("append-wrapper"))},[le(e.$slots,"append")],2)):O("v-if",!0)]),_:3},8,["view-style","wrap-style","always"])],2),e.showSummary&&e.tableLayout==="fixed"?Ve((g(),k("div",{key:1,ref:"footerWrapper",class:F(e.ns.e("footer-wrapper"))},[_("table",{class:F(e.ns.e("footer")),cellspacing:"0",cellpadding:"0",border:"0",style:Be(e.tableBodyStyles)},[b(i,{columns:e.store.states.columns.value,"table-layout":e.tableLayout},null,8,["columns","table-layout"]),b(c,{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)),[[sn,!e.isEmpty],[d,e.handleHeaderFooterMousewheel]]):O("v-if",!0),e.border||e.isGroup?(g(),k("div",{key:2,class:F(e.ns.e("border-left-patch"))},null,2)):O("v-if",!0)],6),Ve(_("div",{ref:"resizeProxy",class:F(e.ns.e("column-resize-proxy"))},null,2),[[sn,e.resizeProxyVisible]])],46,ece)}var oce=Re(Qae,[["render",nce],["__file","table.vue"]]);const rce={selection:"table-column--selection",expand:"table__expand-column"},sce={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:""}},ice=e=>rce[e]||"",lce={selection:{renderHeader({store:e,column:t}){function n(){return e.states.data.value&&e.states.data.value.length===0}return Xe(Fr,{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 Xe(Fr,{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)),Xe("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")),Xe("div",{class:r,onClick:function(i){i.stopPropagation(),t.toggleRowExpansion(e)}},{default:()=>[Xe(ve,null,{default:()=>[Xe(cd)]})]})},sortable:!1,resizable:!1}};function ace({row:e,column:t,$index:n}){var o;const r=t.property,s=r&&Um(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 cce({row:e,treeNode:t,store:n},o=!1){const{ns:r}=n;if(!t)return o?[Xe("span",{class:r.e("placeholder")})]:null;const s=[],i=function(l){l.stopPropagation(),!t.loading&&n.loadOrToggle(e)};if(t.indent&&s.push(Xe("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=cd;t.loading&&(a=A0),s.push(Xe("div",{class:l,onClick:i},{default:()=>[Xe(ve,{class:{[r.is("loading")]:t.loading}},{default:()=>[Xe(a)]})]}))}else s.push(Xe("span",{class:r.e("placeholder")}));return s}function E8(e,t){return e.reduce((n,o)=>(n[o]=o,n),t)}function uce(e,t){const n=nt();return{registerComplexWatchers:()=>{const s=["fixed"],i={realWidth:"width",realMinWidth:"minWidth"},l=E8(s,i);Object.keys(l).forEach(a=>{const c=i[a];ut(t,c)&&ke(()=>t[c],u=>{let d=u;c==="width"&&a==="realWidth"&&(d=R3(u)),c==="minWidth"&&a==="realMinWidth"&&(d=yA(u)),n.columnConfig.value[c]=d,n.columnConfig.value[a]=d;const f=c==="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=E8(s,i);Object.keys(l).forEach(a=>{const c=i[a];ut(t,c)&&ke(()=>t[c],u=>{n.columnConfig.value[a]=u})})}}}function dce(e,t,n){const o=nt(),r=H(""),s=H(!1),i=H(),l=H(),a=Ae("table");Yr(()=>{i.value=e.align?`is-${e.align}`:null,i.value}),Yr(()=>{l.value=e.headerAlign?`is-${e.headerAlign}`:i.value,l.value});const c=B(()=>{let C=o.vnode.vParent||o.parent;for(;C&&!C.tableId&&!C.columnId;)C=C.vnode.vParent||C.parent;return C}),u=B(()=>{const{store:C}=o.parent;if(!C)return!1;const{treeData:T}=C.states,$=T.value;return $&&Object.keys($).length>0}),d=H(R3(e.width)),f=H(yA(e.minWidth)),h=C=>(d.value&&(C.width=d.value),f.value&&(C.minWidth=f.value),!d.value&&f.value&&(C.width=void 0),C.minWidth||(C.minWidth=80),C.realWidth=Number(C.width===void 0?C.minWidth:C.width),C),p=C=>{const T=C.type,$=lce[T]||{};Object.keys($).forEach(N=>{const P=$[N];N!=="className"&&P!==void 0&&(C[N]=P)});const A=ice(T);if(A){const N=`${S(a.namespace)}-${A}`;C.className=C.className?`${C.className} ${N}`:N}return C},m=C=>{Array.isArray(C)?C.forEach($=>T($)):T(C);function T($){var A;((A=$==null?void 0:$.type)==null?void 0:A.name)==="ElTableColumn"&&($.vParent=o)}};return{columnId:r,realAlign:i,isSubColumn:s,realHeaderAlign:l,columnOrTableParent:c,setColumnWidth:h,setColumnForcedProps:p,setColumnRenders:C=>{e.renderHeader||C.type!=="selection"&&(C.renderHeader=$=>(o.columnConfig.value.label,le(t,"header",$,()=>[C.label])));let T=C.renderCell;return C.type==="expand"?(C.renderCell=$=>Xe("div",{class:"cell"},[T($)]),n.value.renderExpanded=$=>t.default?t.default($):t.default):(T=T||ace,C.renderCell=$=>{let A=null;if(t.default){const G=t.default($);A=G.some(te=>te.type!==Vn)?G:T($)}else A=T($);const{columns:N}=n.value.store.states,P=N.value.findIndex(G=>G.type==="default"),I=u.value&&$.cellIndex===P,D=cce($,I),V={class:"cell",style:{}};return C.showOverflowTooltip&&(V.class=`${V.class} ${S(a.namespace)}-tooltip`,V.style={width:`${($.column.realWidth||Number($.column.width))-1}px`}),m(A),Xe("div",V,[D,A])}),C},getPropsData:(...C)=>C.reduce((T,$)=>(Array.isArray($)&&$.forEach(A=>{T[A]=e[A]}),T),{}),getColumnElIndex:(C,T)=>Array.prototype.indexOf.call(C,T),updateColumnOrder:()=>{n.value.store.commit("updateColumnOrder",o.columnConfig.value)}}}var fce={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 hce=1;var xA=K({name:"ElTableColumn",components:{ElCheckbox:Fr},props:fce,setup(e,{slots:t}){const n=nt(),o=H({}),r=B(()=>{let w=n.parent;for(;w&&!w.tableId;)w=w.parent;return w}),{registerNormalWatchers:s,registerComplexWatchers:i}=uce(r,e),{columnId:l,isSubColumn:a,realHeaderAlign:c,columnOrTableParent:u,setColumnWidth:d,setColumnForcedProps:f,setColumnRenders:h,getPropsData:p,getColumnElIndex:m,realAlign:v,updateColumnOrder:y}=dce(e,t,r),E=u.value;l.value=`${E.tableId||E.columnId}_column_${hce++}`,ld(()=>{a.value=r.value!==E;const w=e.type||"default",C=e.sortable===""?!0:e.sortable,T=bi(e.showOverflowTooltip)?E.props.showOverflowTooltip:e.showOverflowTooltip,$={...sce[w],id:l.value,type:w,property:e.prop||e.property,align:v,headerAlign:c,showOverflowTooltip:T,filterable:e.filters||e.filterMethod,filteredValue:[],filterPlacement:"",filterClassName:"",isColumnGroup:!1,isSubColumn:!1,filterOpened:!1,sortable:C,index:e.index,rawColumnKey:n.vnode.key};let D=p(["columnKey","label","className","labelClassName","type","renderHeader","formatter","fixed","resizable"],["sortMethod","sortBy","sortOrders"],["selectable","reserveSelection"],["filterMethod","filters","filterMultiple","filterOpened","filteredValue","filterPlacement","filterClassName"]);D=hae($,D),D=mae(h,d,f)(D),o.value=D,s(),i()}),mt(()=>{var w;const C=u.value,T=a.value?C.vnode.el.children:(w=C.refs.hiddenColumns)==null?void 0:w.children,$=()=>m(T||[],n.vnode.el);o.value.getColumnIndex=$,$()>-1&&r.value.store.commit("insertColumn",o.value,a.value?C.columnConfig.value:null,y)}),bn(()=>{r.value.store.commit("removeColumn",o.value,a.value?E.columnConfig.value:null,y)}),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===Q&&Array.isArray(i.children)&&i.children.forEach(l=>{(l==null?void 0:l.patchFlag)!==1024&&!je(l==null?void 0:l.children)&&r.push(l)});return Xe("div",r)}catch{return Xe("div",[])}}});const pce=zt(oce,{TableColumn:xA}),mce=Hn(xA),H0=Symbol("tabsRootContextKey"),gce=qe({tabs:{type:we(Array),default:()=>vo([])}}),TA="ElTabBar",_ce=K({name:TA}),vce=K({..._ce,props:gce,setup(e,{expose:t}){const n=e,o=nt(),r=Pe(H0);r||us(TA,"<el-tabs><el-tab-bar /></el-tabs>");const s=Ae("tabs"),i=H(),l=H(),a=()=>{let u=0,d=0;const f=["top","bottom"].includes(r.props.tabPosition)?"width":"height",h=f==="width"?"x":"y",p=h==="x"?"left":"top";return n.tabs.every(m=>{var v,y;const E=(y=(v=o.parent)==null?void 0:v.refs)==null?void 0:y[`tab-${m.uid}`];if(!E)return!1;if(!m.active)return!0;u=E[`offset${hl(p)}`],d=E[`client${hl(f)}`];const w=window.getComputedStyle(E);return f==="width"&&(n.tabs.length>1&&(d-=Number.parseFloat(w.paddingLeft)+Number.parseFloat(w.paddingRight)),u+=Number.parseFloat(w.paddingLeft)),!1}),{[f]:`${d}px`,transform:`translate${hl(h)}(${u}px)`}},c=()=>l.value=a();return ke(()=>n.tabs,async()=>{await tt(),c()},{immediate:!0}),Oo(i,()=>c()),t({ref:i,update:c}),(u,d)=>(g(),k("div",{ref_key:"barRef",ref:i,class:F([S(s).e("active-bar"),S(s).is(S(r).props.tabPosition)]),style:Be(l.value)},null,6))}});var yce=Re(vce,[["__file","tab-bar.vue"]]);const bce=qe({panes:{type:we(Array),default:()=>vo([])},currentName:{type:[String,Number],default:""},editable:Boolean,type:{type:String,values:["card","border-card",""],default:""},stretch:Boolean}),wce={tabClick:(e,t,n)=>n instanceof Event,tabRemove:(e,t)=>t instanceof Event},x8="ElTabNav",kce=K({name:x8,props:bce,emits:wce,setup(e,{expose:t,emit:n}){const o=nt(),r=Pe(H0);r||us(x8,"<el-tabs><tab-nav /></el-tabs>");const s=Ae("tabs"),i=vH(),l=IH(),a=H(),c=H(),u=H(),d=H(),f=H(!1),h=H(0),p=H(!1),m=H(!0),v=B(()=>["top","bottom"].includes(r.props.tabPosition)?"width":"height"),y=B(()=>({transform:`translate${v.value==="width"?"X":"Y"}(-${h.value}px)`})),E=()=>{if(!a.value)return;const P=a.value[`offset${hl(v.value)}`],I=h.value;if(!I)return;const D=I>P?I-P:0;h.value=D},w=()=>{if(!a.value||!c.value)return;const P=c.value[`offset${hl(v.value)}`],I=a.value[`offset${hl(v.value)}`],D=h.value;if(P-D<=I)return;const V=P-D>I*2?D+I:P-I;h.value=V},C=async()=>{const P=c.value;if(!f.value||!u.value||!a.value||!P)return;await tt();const I=u.value.querySelector(".is-active");if(!I)return;const D=a.value,V=["top","bottom"].includes(r.props.tabPosition),G=I.getBoundingClientRect(),te=D.getBoundingClientRect(),oe=V?P.offsetWidth-te.width:P.offsetHeight-te.height,J=h.value;let q=J;V?(G.left<te.left&&(q=J-(te.left-G.left)),G.right>te.right&&(q=J+G.right-te.right)):(G.top<te.top&&(q=J-(te.top-G.top)),G.bottom>te.bottom&&(q=J+(G.bottom-te.bottom))),q=Math.max(q,0),h.value=Math.min(q,oe)},T=()=>{var P;if(!c.value||!a.value)return;e.stretch&&((P=d.value)==null||P.update());const I=c.value[`offset${hl(v.value)}`],D=a.value[`offset${hl(v.value)}`],V=h.value;D<I?(f.value=f.value||{},f.value.prev=V,f.value.next=V+D<I,I-V<D&&(h.value=I-D)):(f.value=!1,V>0&&(h.value=0))},$=P=>{const I=P.code,{up:D,down:V,left:G,right:te}=pt;if(![D,V,G,te].includes(I))return;const oe=Array.from(P.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)")),J=oe.indexOf(P.target);let q;I===G||I===D?J===0?q=oe.length-1:q=J-1:J<oe.length-1?q=J+1:q=0,oe[q].focus({preventScroll:!0}),oe[q].click(),A()},A=()=>{m.value&&(p.value=!0)},N=()=>p.value=!1;return ke(i,P=>{P==="hidden"?m.value=!1:P==="visible"&&setTimeout(()=>m.value=!0,50)}),ke(l,P=>{P?setTimeout(()=>m.value=!0,50):m.value=!1}),Oo(u,T),mt(()=>setTimeout(()=>C(),0)),Bl(()=>T()),t({scrollToActiveTab:C,removeFocus:N}),ke(()=>e.panes,()=>o.update(),{flush:"post",deep:!0}),()=>{const P=f.value?[b("span",{class:[s.e("nav-prev"),s.is("disabled",!f.value.prev)],onClick:E},[b(ve,null,{default:()=>[b(T0,null,null)]})]),b("span",{class:[s.e("nav-next"),s.is("disabled",!f.value.next)],onClick:w},[b(ve,null,{default:()=>[b(cd,null,null)]})])]:null,I=e.panes.map((D,V)=>{var G,te,oe,J;const q=D.uid,X=D.props.disabled,ee=(te=(G=D.props.name)!=null?G:D.index)!=null?te:`${V}`,R=!X&&(D.isClosable||e.editable);D.index=`${V}`;const ye=R?b(ve,{class:"is-icon-close",onClick:xe=>n("tabRemove",D,xe)},{default:()=>[b(Fs,null,null)]}):null,Ce=((J=(oe=D.slots).label)==null?void 0:J.call(oe))||D.props.label,U=!X&&D.active?0:-1;return b("div",{ref:`tab-${q}`,class:[s.e("item"),s.is(r.props.tabPosition),s.is("active",D.active),s.is("disabled",X),s.is("closable",R),s.is("focus",p.value)],id:`tab-${ee}`,key:`tab-${q}`,"aria-controls":`pane-${ee}`,role:"tab","aria-selected":D.active,tabindex:U,onFocus:()=>A(),onBlur:()=>N(),onClick:xe=>{N(),n("tabClick",D,ee,xe)},onKeydown:xe=>{R&&(xe.code===pt.delete||xe.code===pt.backspace)&&n("tabRemove",D,xe)}},[Ce,ye])});return b("div",{ref:u,class:[s.e("nav-wrap"),s.is("scrollable",!!f.value),s.is(r.props.tabPosition)]},[P,b("div",{class:s.e("nav-scroll"),ref:a},[b("div",{class:[s.e("nav"),s.is(r.props.tabPosition),s.is("stretch",e.stretch&&["top","bottom"].includes(r.props.tabPosition))],ref:c,style:y.value,role:"tablist",onKeydown:$},[e.type?null:b(yce,{ref:d,tabs:[...e.panes]},null),I])])])}}}),Cce=qe({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:we(Function),default:()=>!0},stretch:Boolean}),iv=e=>je(e)||Et(e),Sce={[Wt]:e=>iv(e),tabClick:(e,t)=>t instanceof Event,tabChange:e=>iv(e),edit:(e,t)=>["remove","add"].includes(t),tabRemove:e=>iv(e),tabAdd:()=>!0},$ce=K({name:"ElTabs",props:Cce,emits:Sce,setup(e,{emit:t,slots:n,expose:o}){var r;const s=Ae("tabs"),{children:i,addChild:l,removeChild:a}=HQ(nt(),"ElTabPane"),c=H(),u=H((r=e.modelValue)!=null?r:"0"),d=async(m,v=!1)=>{var y,E,w;if(!(u.value===m||bi(m)))try{await((y=e.beforeLeave)==null?void 0:y.call(e,m,u.value))!==!1&&(u.value=m,v&&(t(Wt,m),t("tabChange",m)),(w=(E=c.value)==null?void 0:E.removeFocus)==null||w.call(E))}catch{}},f=(m,v,y)=>{m.props.disabled||(d(v,!0),t("tabClick",m,y))},h=(m,v)=>{m.props.disabled||bi(m.props.name)||(v.stopPropagation(),t("edit",m.props.name,"remove"),t("tabRemove",m.props.name))},p=()=>{t("edit",void 0,"add"),t("tabAdd")};return ke(()=>e.modelValue,m=>d(m)),ke(u,async()=>{var m;await tt(),(m=c.value)==null||m.scrollToActiveTab()}),bt(H0,{props:e,currentName:u,registerPane:l,unregisterPane:a}),o({currentName:u}),()=>{const m=n["add-icon"],v=e.editable||e.addable?b("span",{class:s.e("new-tab"),tabindex:"0",onClick:p,onKeydown:w=>{w.code===pt.enter&&p()}},[m?le(n,"add-icon"):b(ve,{class:s.is("icon-plus")},{default:()=>[b(gT,null,null)]})]):null,y=b("div",{class:[s.e("header"),s.is(e.tabPosition)]},[v,b(kce,{ref:c,currentName:u.value,editable:e.editable,type:e.type,panes:i.value,stretch:e.stretch,onTabClick:f,onTabRemove:h},null)]),E=b("div",{class:s.e("content")},[le(n,"default")]);return b("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"?[y,E]:[E,y]])}}}),Ece=qe({label:{type:String,default:""},name:{type:[String,Number]},closable:Boolean,disabled:Boolean,lazy:Boolean}),xce=["id","aria-hidden","aria-labelledby"],MA="ElTabPane",Tce=K({name:MA}),Mce=K({...Tce,props:Ece,setup(e){const t=e,n=nt(),o=Ws(),r=Pe(H0);r||us(MA,"usage: <el-tabs><el-tab-pane /></el-tabs/>");const s=Ae("tab-pane"),i=H(),l=B(()=>t.closable||r.props.closable),a=I5(()=>{var h;return r.currentName.value===((h=t.name)!=null?h:i.value)}),c=H(a.value),u=B(()=>{var h;return(h=t.name)!=null?h:i.value}),d=I5(()=>!t.lazy||c.value||a.value);ke(a,h=>{h&&(c.value=!0)});const f=jn({uid:n.uid,slots:o,props:t,paneName:u,active:a,index:i,isClosable:l});return mt(()=>{r.registerPane(f)}),Us(()=>{r.unregisterPane(f.uid)}),(h,p)=>S(d)?Ve((g(),k("div",{key:0,id:`pane-${S(u)}`,class:F(S(s).b()),role:"tabpanel","aria-hidden":!S(a),"aria-labelledby":`tab-${S(u)}`},[le(h.$slots,"default")],10,xce)),[[sn,S(a)]]):O("v-if",!0)}});var AA=Re(Mce,[["__file","tab-pane.vue"]]);const OA=zt($ce,{TabPane:AA}),IA=Hn(AA),NA=Symbol("uploadContextKey"),Ace="ElUpload";class Oce extends Error{constructor(t,n,o,r){super(t),this.name="UploadAjaxError",this.status=n,this.method=o,this.url=r}}function T8(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 Oce(o,n.status,t.method,e)}function Ice(e){const t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}const Nce=e=>{typeof XMLHttpRequest>"u"&&us(Ace,"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))Ee(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(T8(n,e,t))}),t.addEventListener("load",()=>{if(t.status<200||t.status>=300)return e.onError(T8(n,e,t));e.onSuccess(Ice(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))As(i)||t.setRequestHeader(s,String(i));return t.send(o),t},PA=["text","picture","picture-card"];let Pce=1;const y2=()=>Date.now()+Pce++,LA=qe({action:{type:String,default:"#"},headers:{type:we(Object)},method:{type:String,default:"post"},data:{type:we([Object,Function,Promise]),default:()=>vo({})},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:we(Array),default:()=>vo([])},autoUpload:{type:Boolean,default:!0},listType:{type:String,values:PA,default:"text"},httpRequest:{type:we(Function),default:Nce},disabled:Boolean,limit:Number}),Lce=qe({...LA,beforeUpload:{type:we(Function),default:dt},beforeRemove:{type:we(Function)},onRemove:{type:we(Function),default:dt},onChange:{type:we(Function),default:dt},onPreview:{type:we(Function),default:dt},onSuccess:{type:we(Function),default:dt},onProgress:{type:we(Function),default:dt},onError:{type:we(Function),default:dt},onExceed:{type:we(Function),default:dt},crossorigin:{type:we(String)}}),Rce=qe({files:{type:we(Array),default:()=>vo([])},disabled:{type:Boolean,default:!1},handlePreview:{type:we(Function),default:dt},listType:{type:String,values:PA,default:"text"},crossorigin:{type:we(String)}}),Fce={remove:e=>!!e},Dce=["onKeydown"],Bce=["src","crossorigin"],Vce=["onClick"],zce=["title"],jce=["onClick"],Hce=["onClick"],Uce=K({name:"ElUploadList"}),Wce=K({...Uce,props:Rce,emits:Fce,setup(e,{emit:t}){const n=e,{t:o}=Fn(),r=Ae("upload"),s=Ae("icon"),i=Ae("list"),l=fs(),a=H(!1),c=B(()=>[r.b("list"),r.bm("list",n.listType),r.is("disabled",n.disabled)]),u=d=>{t("remove",d)};return(d,f)=>(g(),L(g0,{tag:"ul",class:F(S(c)),name:S(i).b()},{default:x(()=>[(g(!0),k(Q,null,Me(d.files,h=>(g(),k("li",{key:h.uid||h.name,class:F([S(r).be("list","item"),S(r).is(h.status),{focusing:a.value}]),tabindex:"0",onKeydown:rn(p=>!S(l)&&u(h),["delete"]),onFocus:f[0]||(f[0]=p=>a.value=!0),onBlur:f[1]||(f[1]=p=>a.value=!1),onClick:f[2]||(f[2]=p=>a.value=!1)},[le(d.$slots,"default",{file:h},()=>[d.listType==="picture"||h.status!=="uploading"&&d.listType==="picture-card"?(g(),k("img",{key:0,class:F(S(r).be("list","item-thumbnail")),src:h.url,crossorigin:d.crossorigin,alt:""},null,10,Bce)):O("v-if",!0),h.status==="uploading"||d.listType!=="picture-card"?(g(),k("div",{key:1,class:F(S(r).be("list","item-info"))},[_("a",{class:F(S(r).be("list","item-name")),onClick:Ge(p=>d.handlePreview(h),["prevent"])},[b(S(ve),{class:F(S(s).m("document"))},{default:x(()=>[b(S(OJ))]),_:1},8,["class"]),_("span",{class:F(S(r).be("list","item-file-name")),title:h.name},M(h.name),11,zce)],10,Vce),h.status==="uploading"?(g(),L(S(mA),{key:0,type:d.listType==="picture-card"?"circle":"line","stroke-width":d.listType==="picture-card"?6:2,percentage:Number(h.percentage),style:Be(d.listType==="picture-card"?"":"margin-top: 0.5rem")},null,8,["type","stroke-width","percentage","style"])):O("v-if",!0)],2)):O("v-if",!0),_("label",{class:F(S(r).be("list","item-status-label"))},[d.listType==="text"?(g(),L(S(ve),{key:0,class:F([S(s).m("upload-success"),S(s).m("circle-check")])},{default:x(()=>[b(S(t3))]),_:1},8,["class"])):["picture-card","picture"].includes(d.listType)?(g(),L(S(ve),{key:1,class:F([S(s).m("upload-success"),S(s).m("check")])},{default:x(()=>[b(S(e3))]),_:1},8,["class"])):O("v-if",!0)],2),S(l)?O("v-if",!0):(g(),L(S(ve),{key:2,class:F(S(s).m("close")),onClick:p=>u(h)},{default:x(()=>[b(S(Fs))]),_:2},1032,["class","onClick"])),O(" Due to close btn only appears when li gets focused disappears after li gets blurred, thus keyboard navigation can never reach close btn"),O(" This is a bug which needs to be fixed "),O(" TODO: Fix the incorrect navigation interaction "),S(l)?O("v-if",!0):(g(),k("i",{key:3,class:F(S(s).m("close-tip"))},M(S(o)("el.upload.deleteTip")),3)),d.listType==="picture-card"?(g(),k("span",{key:4,class:F(S(r).be("list","item-actions"))},[_("span",{class:F(S(r).be("list","item-preview")),onClick:p=>d.handlePreview(h)},[b(S(ve),{class:F(S(s).m("zoom-in"))},{default:x(()=>[b(S(bT))]),_:1},8,["class"])],10,jce),S(l)?O("v-if",!0):(g(),k("span",{key:0,class:F(S(r).be("list","item-delete")),onClick:p=>u(h)},[b(S(ve),{class:F(S(s).m("delete"))},{default:x(()=>[b(S(hT))]),_:1},8,["class"])],10,Hce))],2)):O("v-if",!0)])],42,Dce))),128)),le(d.$slots,"append")]),_:3},8,["class","name"]))}});var M8=Re(Wce,[["__file","upload-list.vue"]]);const qce=qe({disabled:{type:Boolean,default:!1}}),Kce={file:e=>Ee(e)},Gce=["onDrop","onDragover"],RA="ElUploadDrag",Yce=K({name:RA}),Jce=K({...Yce,props:qce,emits:Kce,setup(e,{emit:t}){Pe(NA)||us(RA,"usage: <el-upload><el-upload-dragger /></el-upload>");const o=Ae("upload"),r=H(!1),s=fs(),i=a=>{if(s.value)return;r.value=!1,a.stopPropagation();const c=Array.from(a.dataTransfer.files);t("file",c)},l=()=>{s.value||(r.value=!0)};return(a,c)=>(g(),k("div",{class:F([S(o).b("dragger"),S(o).is("dragover",r.value)]),onDrop:Ge(i,["prevent"]),onDragover:Ge(l,["prevent"]),onDragleave:c[0]||(c[0]=Ge(u=>r.value=!1,["prevent"]))},[le(a.$slots,"default")],42,Gce))}});var Zce=Re(Jce,[["__file","upload-dragger.vue"]]);const Xce=qe({...LA,beforeUpload:{type:we(Function),default:dt},onRemove:{type:we(Function),default:dt},onStart:{type:we(Function),default:dt},onSuccess:{type:we(Function),default:dt},onProgress:{type:we(Function),default:dt},onError:{type:we(Function),default:dt},onExceed:{type:we(Function),default:dt}}),Qce=["onKeydown"],eue=["name","multiple","accept"],tue=K({name:"ElUploadContent",inheritAttrs:!1}),nue=K({...tue,props:Xce,setup(e,{expose:t}){const n=e,o=Ae("upload"),r=fs(),s=Cn({}),i=Cn(),l=m=>{if(m.length===0)return;const{autoUpload:v,limit:y,fileList:E,multiple:w,onStart:C,onExceed:T}=n;if(y&&E.length+m.length>y){T(m,E);return}w||(m=m.slice(0,1));for(const $ of m){const A=$;A.uid=y2(),C(A),v&&a(A)}},a=async m=>{if(i.value.value="",!n.beforeUpload)return u(m);let v,y={};try{const w=n.data,C=n.beforeUpload(m);y=X1(n.data)?m6(n.data):n.data,v=await C,X1(n.data)&&Qa(w,y)&&(y=m6(n.data))}catch{v=!1}if(v===!1){n.onRemove(m);return}let E=m;v instanceof Blob&&(v instanceof File?E=v:E=new File([v],m.name,{type:m.type})),u(Object.assign(E,{uid:m.uid}),y)},c=async(m,v)=>Ue(m)?m(v):m,u=async(m,v)=>{const{headers:y,data:E,method:w,withCredentials:C,name:T,action:$,onProgress:A,onSuccess:N,onError:P,httpRequest:I}=n;try{v=await c(v??E,m)}catch{n.onRemove(m);return}const{uid:D}=m,V={headers:y||{},withCredentials:C,file:m,data:v,method:w,filename:T,action:$,onProgress:te=>{A(te,m)},onSuccess:te=>{N(te,m),delete s.value[D]},onError:te=>{P(te,m),delete s.value[D]}},G=I(V);s.value[D]=G,G instanceof Promise&&G.then(V.onSuccess,V.onError)},d=m=>{const v=m.target.files;v&&l(Array.from(v))},f=()=>{r.value||(i.value.value="",i.value.click())},h=()=>{f()};return t({abort:m=>{DY(s.value).filter(m?([y])=>String(m.uid)===y:()=>!0).forEach(([y,E])=>{E instanceof XMLHttpRequest&&E.abort(),delete s.value[y]})},upload:a}),(m,v)=>(g(),k("div",{class:F([S(o).b(),S(o).m(m.listType),S(o).is("drag",m.drag)]),tabindex:"0",onClick:f,onKeydown:rn(Ge(h,["self"]),["enter","space"])},[m.drag?(g(),L(Zce,{key:0,disabled:S(r),onFile:l},{default:x(()=>[le(m.$slots,"default")]),_:3},8,["disabled"])):le(m.$slots,"default",{key:1}),_("input",{ref_key:"inputRef",ref:i,class:F(S(o).e("input")),name:m.name,multiple:m.multiple,accept:m.accept,type:"file",onChange:d,onClick:v[0]||(v[0]=Ge(()=>{},["stop"]))},null,42,eue)],42,Qce))}});var A8=Re(nue,[["__file","upload-content.vue"]]);const O8="ElUpload",I8=e=>{var t;(t=e.url)!=null&&t.startsWith("blob:")&&URL.revokeObjectURL(e.url)},oue=(e,t)=>{const n=OH(e,"fileList",void 0,{passive:!0}),o=f=>n.value.find(h=>h.uid===f.uid);function r(f){var h;(h=t.value)==null||h.abort(f)}function s(f=["ready","uploading","success","fail"]){n.value=n.value.filter(h=>!f.includes(h.status))}const i=(f,h)=>{const p=o(h);p&&(console.error(f),p.status="fail",n.value.splice(n.value.indexOf(p),1),e.onError(f,p,n.value),e.onChange(p,n.value))},l=(f,h)=>{const p=o(h);p&&(e.onProgress(f,p,n.value),p.status="uploading",p.percentage=Math.round(f.percent))},a=(f,h)=>{const p=o(h);p&&(p.status="success",p.response=f,e.onSuccess(f,p,n.value),e.onChange(p,n.value))},c=f=>{As(f.uid)&&(f.uid=y2());const h={name:f.name,percentage:0,status:"ready",size:f.size,raw:f,uid:f.uid};if(e.listType==="picture-card"||e.listType==="picture")try{h.url=URL.createObjectURL(f)}catch(p){p.message,e.onError(p,h,n.value)}n.value=[...n.value,h],e.onChange(h,n.value)},u=async f=>{const h=f instanceof File?o(f):f;h||us(O8,"file to be removed not found");const p=m=>{r(m);const v=n.value;v.splice(v.indexOf(m),1),e.onRemove(m,v),I8(m)};e.beforeRemove?await e.beforeRemove(h,n.value)!==!1&&p(h):p(h)};function d(){n.value.filter(({status:f})=>f==="ready").forEach(({raw:f})=>{var h;return f&&((h=t.value)==null?void 0:h.upload(f))})}return ke(()=>e.listType,f=>{f!=="picture-card"&&f!=="picture"||(n.value=n.value.map(h=>{const{raw:p,url:m}=h;if(!m&&p)try{h.url=URL.createObjectURL(p)}catch(v){e.onError(v,h,n.value)}return h}))}),ke(n,f=>{for(const h of f)h.uid||(h.uid=y2()),h.status||(h.status="success")},{immediate:!0,deep:!0}),{uploadFiles:n,abort:r,clearFiles:s,handleError:i,handleProgress:l,handleStart:c,handleSuccess:a,handleRemove:u,submit:d,revokeFileObjectURL:I8}},rue=K({name:"ElUpload"}),sue=K({...rue,props:Lce,setup(e,{expose:t}){const n=e,o=fs(),r=Cn(),{abort:s,submit:i,clearFiles:l,uploadFiles:a,handleStart:c,handleError:u,handleRemove:d,handleSuccess:f,handleProgress:h,revokeFileObjectURL:p}=oue(n,r),m=B(()=>n.listType==="picture-card"),v=B(()=>({...n,fileList:a.value,onStart:c,onProgress:h,onSuccess:f,onError:u,onRemove:d}));return bn(()=>{a.value.forEach(p)}),bt(NA,{accept:Nn(n,"accept")}),t({abort:s,submit:i,clearFiles:l,handleStart:c,handleRemove:d}),(y,E)=>(g(),k("div",null,[S(m)&&y.showFileList?(g(),L(M8,{key:0,disabled:S(o),"list-type":y.listType,files:S(a),crossorigin:y.crossorigin,"handle-preview":y.onPreview,onRemove:S(d)},Ps({append:x(()=>[b(A8,pn({ref_key:"uploadRef",ref:r},S(v)),{default:x(()=>[y.$slots.trigger?le(y.$slots,"trigger",{key:0}):O("v-if",!0),!y.$slots.trigger&&y.$slots.default?le(y.$slots,"default",{key:1}):O("v-if",!0)]),_:3},16)]),_:2},[y.$slots.file?{name:"default",fn:x(({file:w})=>[le(y.$slots,"file",{file:w})])}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):O("v-if",!0),!S(m)||S(m)&&!y.showFileList?(g(),L(A8,pn({key:1,ref_key:"uploadRef",ref:r},S(v)),{default:x(()=>[y.$slots.trigger?le(y.$slots,"trigger",{key:0}):O("v-if",!0),!y.$slots.trigger&&y.$slots.default?le(y.$slots,"default",{key:1}):O("v-if",!0)]),_:3},16)):O("v-if",!0),y.$slots.trigger?le(y.$slots,"default",{key:2}):O("v-if",!0),le(y.$slots,"tip"),!S(m)&&y.showFileList?(g(),L(M8,{key:3,disabled:S(o),"list-type":y.listType,files:S(a),crossorigin:y.crossorigin,"handle-preview":y.onPreview,onRemove:S(d)},Ps({_:2},[y.$slots.file?{name:"default",fn:x(({file:w})=>[le(y.$slots,"file",{file:w})])}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):O("v-if",!0)]))}});var iue=Re(sue,[["__file","upload.vue"]]);const FA=zt(iue);function lue(e){let t;const n=H(!1),o=jn({...e,originalPosition:"",originalOverflow:"",visible:!1});function r(f){o.text=f}function s(){const f=o.parent,h=d.ns;if(!f.vLoadingAddClassList){let p=f.getAttribute("loading-number");p=Number.parseInt(p)-1,p?f.setAttribute("loading-number",p.toString()):(Rs(f,h.bm("parent","relative")),f.removeAttribute("loading-number")),Rs(f,h.bm("parent","hidden"))}i(),u.unmount()}function i(){var f,h;(h=(f=d.$el)==null?void 0:f.parentNode)==null||h.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 u=mw(K({name:"ElLoading",setup(f,{expose:h}){const{ns:p,zIndex:m}=b3("loading");return h({ns:p,zIndex:m}),()=>{const v=o.spinner||o.svg,y=Xe("svg",{class:"circular",viewBox:o.svgViewBox?o.svgViewBox:"0 0 50 50",...v?{innerHTML:v}:{}},[Xe("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),E=o.text?Xe("p",{class:p.b("text")},[o.text]):void 0;return Xe(ur,{name:p.b("fade"),onAfterLeave:a},{default:x(()=>[Ve(b("div",{style:{backgroundColor:o.background||""},class:[p.b("mask"),o.customClass,o.fullscreen?"is-fullscreen":""]},[Xe("div",{class:p.b("spinner")},[y,E])]),[[sn,o.visible]])])})}}})),d=u.mount(document.createElement("div"));return{...Hs(o),setText:r,removeElLoadingChild:i,close:l,handleAfterLeave:a,vm:d,get $el(){return d.$el}}}let mm;const b2=function(e={}){if(!kt)return;const t=aue(e);if(t.fullscreen&&mm)return mm;const n=lue({...t,closed:()=>{var r;(r=t.closed)==null||r.call(t),t.fullscreen&&(mm=void 0)}});cue(t,t.parent,n),N8(t,t.parent,n),t.parent.vLoadingAddClassList=()=>N8(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),tt(()=>n.visible.value=t.visible),t.fullscreen&&(mm=n),n},aue=e=>{var t,n,o,r;let s;return je(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}},cue=async(e,t,n)=>{const{nextZIndex:o}=n.vm.zIndex||n.vm._.exposed.zIndex,r={};if(e.fullscreen)n.originalPosition.value=ga(document.body,"position"),n.originalOverflow.value=ga(document.body,"overflow"),r.zIndex=o();else if(e.parent===document.body){n.originalPosition.value=ga(document.body,"position"),await tt();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(ga(document.body,`margin-${s}`),10)}px`}for(const s of["height","width"])r[s]=`${e.target.getBoundingClientRect()[s]}px`}else n.originalPosition.value=ga(t,"position");for(const[s,i]of Object.entries(r))n.$el.style[s]=i},N8=(e,t,n)=>{const o=n.vm.ns||n.vm._.exposed.ns;["absolute","fixed","sticky"].includes(n.originalPosition.value)?Rs(t,o.bm("parent","relative")):ec(t,o.bm("parent","relative")),e.fullscreen&&e.lock?ec(t,o.bm("parent","hidden")):Rs(t,o.bm("parent","hidden"))},t1=Symbol("ElLoading"),P8=(e,t)=>{var n,o,r,s;const i=t.instance,l=f=>it(t.value)?t.value[f]:void 0,a=f=>{const h=je(f)&&(i==null?void 0:i[f])||f;return h&&H(h)},c=f=>a(l(f)||e.getAttribute(`element-loading-${Io(f)}`)),u=(n=l("fullscreen"))!=null?n:t.modifiers.fullscreen,d={text:c("text"),svg:c("svg"),svgViewBox:c("svgViewBox"),spinner:c("spinner"),background:c("background"),customClass:c("customClass"),fullscreen:u,target:(o=l("target"))!=null?o:u?void 0:e,body:(r=l("body"))!=null?r:t.modifiers.body,lock:(s=l("lock"))!=null?s:t.modifiers.lock};e[t1]={options:d,instance:b2(d)}},uue=(e,t)=>{for(const n of Object.keys(t))Yt(t[n])&&(t[n].value=e[n])},L8={mounted(e,t){t.value&&P8(e,t)},updated(e,t){const n=e[t1];t.oldValue!==t.value&&(t.value&&!t.oldValue?P8(e,t):t.value&&t.oldValue?it(t.value)&&uue(t.value,n.options):n==null||n.instance.close())},unmounted(e){var t;(t=e[t1])==null||t.instance.close(),e[t1]=null}},due={install(e){e.directive("loading",L8),e.config.globalProperties.$loading=b2},directive:L8,service:b2},fue=K({name:"ElMessageBox",directives:{TrapFocus:toe},components:{ElButton:Ze,ElFocusTrap:B0,ElInput:Dn,ElOverlay:A3,ElIcon:ve,...VZ},inheritAttrs:!1,props:{buttonSize:{type:String,validator:ST},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}=b3("message-box",B(()=>e.buttonSize)),{t:i}=n,{nextZIndex:l}=o,a=H(!1),c=jn({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()}),u=B(()=>{const J=c.type;return{[r.bm("icon",J)]:J&&Sg[J]}}),d=Lr(),f=Lr(),h=B(()=>c.icon||Sg[c.type]||""),p=B(()=>!!c.message),m=H(),v=H(),y=H(),E=H(),w=H(),C=B(()=>c.confirmButtonClass);ke(()=>c.inputValue,async J=>{await tt(),e.boxType==="prompt"&&J!==null&&V()},{immediate:!0}),ke(()=>a.value,J=>{var q,X;J&&(e.boxType!=="prompt"&&(c.autofocus?y.value=(X=(q=w.value)==null?void 0:q.$el)!=null?X:m.value:y.value=m.value),c.zIndex=l()),e.boxType==="prompt"&&(J?tt().then(()=>{var ee;E.value&&E.value.$el&&(c.autofocus?y.value=(ee=G())!=null?ee:m.value:y.value=m.value)}):(c.editorErrorMessage="",c.validateError=!1))});const T=B(()=>e.draggable),$=B(()=>e.overflow);xT(m,v,T,$),mt(async()=>{await tt(),e.closeOnHashChange&&window.addEventListener("hashchange",A)}),bn(()=>{e.closeOnHashChange&&window.removeEventListener("hashchange",A)});function A(){a.value&&(a.value=!1,tt(()=>{c.action&&t("action",c.action)}))}const N=()=>{e.closeOnClickModal&&D(c.distinguishCancelAndClose?"close":"cancel")},P=p3(N),I=J=>{if(c.inputType!=="textarea")return J.preventDefault(),D("confirm")},D=J=>{var q;e.boxType==="prompt"&&J==="confirm"&&!V()||(c.action=J,c.beforeClose?(q=c.beforeClose)==null||q.call(c,J,c,A):A())},V=()=>{if(e.boxType==="prompt"){const J=c.inputPattern;if(J&&!J.test(c.inputValue||""))return c.editorErrorMessage=c.inputErrorMessage||i("el.messagebox.error"),c.validateError=!0,!1;const q=c.inputValidator;if(typeof q=="function"){const X=q(c.inputValue);if(X===!1)return c.editorErrorMessage=c.inputErrorMessage||i("el.messagebox.error"),c.validateError=!0,!1;if(typeof X=="string")return c.editorErrorMessage=X,c.validateError=!0,!1}}return c.editorErrorMessage="",c.validateError=!1,!0},G=()=>{const J=E.value.$refs;return J.input||J.textarea},te=()=>{D("close")},oe=()=>{e.closeOnPressEscape&&te()};return e.lockScroll&&AT(a),{...Hs(c),ns:r,overlayEvent:P,visible:a,hasMessage:p,typeClass:u,contentId:d,inputId:f,btnSize:s,iconComponent:h,confirmButtonClasses:C,rootRef:m,focusStartRef:y,headerRef:v,inputRef:E,confirmRef:w,doClose:A,handleClose:te,onCloseRequested:oe,handleWrapperClick:N,handleInputEnter:I,handleAction:D,t:i}}}),hue=["aria-label","aria-describedby"],pue=["aria-label"],mue=["id"];function gue(e,t,n,o,r,s){const i=z("el-icon"),l=z("close"),a=z("el-input"),c=z("el-button"),u=z("el-focus-trap"),d=z("el-overlay");return g(),L(ur,{name:"fade-in-linear",onAfterLeave:t[11]||(t[11]=f=>e.$emit("vanish")),persisted:""},{default:x(()=>[Ve(b(d,{"z-index":e.zIndex,"overlay-class":[e.ns.is("message-box"),e.modalClass],mask:e.modal},{default:x(()=>[_("div",{role:"dialog","aria-label":e.title,"aria-modal":"true","aria-describedby":e.showInput?void 0:e.contentId,class:F(`${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))},[b(u,{loop:"",trapped:e.visible,"focus-trap-el":e.rootRef,"focus-start-el":e.focusStartRef,onReleaseRequested:e.onCloseRequested},{default:x(()=>[_("div",{ref:"rootRef",class:F([e.ns.b(),e.customClass,e.ns.is("draggable",e.draggable),{[e.ns.m("center")]:e.center}]),style:Be(e.customStyle),tabindex:"-1",onClick:t[7]||(t[7]=Ge(()=>{},["stop"]))},[e.title!==null&&e.title!==void 0?(g(),k("div",{key:0,ref:"headerRef",class:F([e.ns.e("header"),{"show-close":e.showClose}])},[_("div",{class:F(e.ns.e("title"))},[e.iconComponent&&e.center?(g(),L(i,{key:0,class:F([e.ns.e("status"),e.typeClass])},{default:x(()=>[(g(),L(xt(e.iconComponent)))]),_:1},8,["class"])):O("v-if",!0),_("span",null,M(e.title),1)],2),e.showClose?(g(),k("button",{key:0,type:"button",class:F(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]=rn(Ge(f=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel"),["prevent"]),["enter"]))},[b(i,{class:F(e.ns.e("close"))},{default:x(()=>[b(l)]),_:1},8,["class"])],42,pue)):O("v-if",!0)],2)):O("v-if",!0),_("div",{id:e.contentId,class:F(e.ns.e("content"))},[_("div",{class:F(e.ns.e("container"))},[e.iconComponent&&!e.center&&e.hasMessage?(g(),L(i,{key:0,class:F([e.ns.e("status"),e.typeClass])},{default:x(()=>[(g(),L(xt(e.iconComponent)))]),_:1},8,["class"])):O("v-if",!0),e.hasMessage?(g(),k("div",{key:1,class:F(e.ns.e("message"))},[le(e.$slots,"default",{},()=>[e.dangerouslyUseHTMLString?(g(),L(xt(e.showInput?"label":"p"),{key:1,for:e.showInput?e.inputId:void 0,innerHTML:e.message},null,8,["for","innerHTML"])):(g(),L(xt(e.showInput?"label":"p"),{key:0,for:e.showInput?e.inputId:void 0},{default:x(()=>[ne(M(e.dangerouslyUseHTMLString?"":e.message),1)]),_:1},8,["for"]))])],2)):O("v-if",!0)],2),Ve(_("div",{class:F(e.ns.e("input"))},[b(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:F({invalid:e.validateError}),onKeydown:rn(e.handleInputEnter,["enter"])},null,8,["id","modelValue","type","placeholder","aria-invalid","class","onKeydown"]),_("div",{class:F(e.ns.e("errormsg")),style:Be({visibility:e.editorErrorMessage?"visible":"hidden"})},M(e.editorErrorMessage),7)],2),[[sn,e.showInput]])],10,mue),_("div",{class:F(e.ns.e("btns"))},[e.showCancelButton?(g(),L(c,{key:0,loading:e.cancelButtonLoading,class:F([e.cancelButtonClass]),round:e.roundButton,size:e.btnSize,onClick:t[3]||(t[3]=f=>e.handleAction("cancel")),onKeydown:t[4]||(t[4]=rn(Ge(f=>e.handleAction("cancel"),["prevent"]),["enter"]))},{default:x(()=>[ne(M(e.cancelButtonText||e.t("el.messagebox.cancel")),1)]),_:1},8,["loading","class","round","size"])):O("v-if",!0),Ve(b(c,{ref:"confirmRef",type:"primary",loading:e.confirmButtonLoading,class:F([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]=rn(Ge(f=>e.handleAction("confirm"),["prevent"]),["enter"]))},{default:x(()=>[ne(M(e.confirmButtonText||e.t("el.messagebox.confirm")),1)]),_:1},8,["loading","class","round","disabled","size"]),[[sn,e.showConfirmButton]])],2)],6)]),_:3},8,["trapped","focus-trap-el","focus-start-el","onReleaseRequested"])],42,hue)]),_:3},8,["z-index","overlay-class","mask"]),[[sn,e.visible]])]),_:3})}var _ue=Re(fue,[["render",gue],["__file","index.vue"]]);const Lh=new Map,vue=e=>{let t=document.body;return e.appendTo&&(je(e.appendTo)&&(t=document.querySelector(e.appendTo)),is(e.appendTo)&&(t=e.appendTo),is(t)||(t=document.body)),t},yue=(e,t,n=null)=>{const o=b(_ue,e,Ue(e.message)||uo(e.message)?{default:Ue(e.message)?e.message:()=>e.message}:null);return o.appContext=n,yi(o,t),vue(e).appendChild(t.firstElementChild),o.component},bue=()=>document.createElement("div"),wue=(e,t)=>{const n=bue();e.onVanish=()=>{yi(null,n),Lh.delete(r)},e.onAction=s=>{const i=Lh.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=yue(e,n,t),r=o.proxy;for(const s in e)ut(e,s)&&!ut(r.$props,s)&&(r[s]=e[s]);return r.visible=!0,r};function pd(e,t=null){if(!kt)return Promise.reject();let n;return je(e)||uo(e)?e={message:e}:n=e.callback,new Promise((o,r)=>{const s=wue(e,t??pd._context);Lh.set(s,{options:e,callback:n,resolve:o,reject:r})})}const kue=["alert","confirm","prompt"],Cue={alert:{closeOnPressEscape:!1,closeOnClickModal:!1},confirm:{showCancelButton:!0},prompt:{showCancelButton:!0,showInput:!0}};kue.forEach(e=>{pd[e]=Sue(e)});function Sue(e){return(t,n,o,r)=>{let s="";return it(n)?(o=n,s=""):bi(n)?s="":s=n,pd(Object.assign({title:s,message:t,type:"",...Cue[e]},o,{boxType:e}),r)}}pd.close=()=>{Lh.forEach((e,t)=>{t.doClose()}),Lh.clear()};pd._context=null;const Ki=pd;Ki.install=e=>{Ki._context=e._context,e.config.globalProperties.$msgbox=Ki,e.config.globalProperties.$messageBox=Ki,e.config.globalProperties.$alert=Ki.alert,e.config.globalProperties.$confirm=Ki.confirm,e.config.globalProperties.$prompt=Ki.prompt};const lv=Ki,DA=["success","info","warning","error"],$ue=qe({customClass:{type:String,default:""},dangerouslyUseHTMLString:{type:Boolean,default:!1},duration:{type:Number,default:4500},icon:{type:Pn},id:{type:String,default:""},message:{type:we([String,Object]),default:""},offset:{type:Number,default:0},onClick:{type:we(Function),default:()=>{}},onClose:{type:we(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:[...DA,""],default:""},zIndex:Number}),Eue={destroy:()=>!0},xue=["id"],Tue=["textContent"],Mue={key:0},Aue=["innerHTML"],Oue=K({name:"ElNotification"}),Iue=K({...Oue,props:$ue,emits:Eue,setup(e,{expose:t}){const n=e,{ns:o,zIndex:r}=b3("notification"),{nextZIndex:s,currentZIndex:i}=r,{Close:l}=kT,a=H(!1);let c;const u=B(()=>{const w=n.type;return w&&Sg[n.type]?o.m(w):""}),d=B(()=>n.type&&Sg[n.type]||n.icon),f=B(()=>n.position.endsWith("right")?"right":"left"),h=B(()=>n.position.startsWith("top")?"top":"bottom"),p=B(()=>{var w;return{[h.value]:`${n.offset}px`,zIndex:(w=n.zIndex)!=null?w:i.value}});function m(){n.duration>0&&({stop:c}=Fy(()=>{a.value&&y()},n.duration))}function v(){c==null||c()}function y(){a.value=!1}function E({code:w}){w===pt.delete||w===pt.backspace?v():w===pt.esc?a.value&&y():m()}return mt(()=>{m(),s(),a.value=!0}),Tn(document,"keydown",E),t({visible:a,close:y}),(w,C)=>(g(),L(ur,{name:S(o).b("fade"),onBeforeLeave:w.onClose,onAfterLeave:C[1]||(C[1]=T=>w.$emit("destroy")),persisted:""},{default:x(()=>[Ve(_("div",{id:w.id,class:F([S(o).b(),w.customClass,S(f)]),style:Be(S(p)),role:"alert",onMouseenter:v,onMouseleave:m,onClick:C[0]||(C[0]=(...T)=>w.onClick&&w.onClick(...T))},[S(d)?(g(),L(S(ve),{key:0,class:F([S(o).e("icon"),S(u)])},{default:x(()=>[(g(),L(xt(S(d))))]),_:1},8,["class"])):O("v-if",!0),_("div",{class:F(S(o).e("group"))},[_("h2",{class:F(S(o).e("title")),textContent:M(w.title)},null,10,Tue),Ve(_("div",{class:F(S(o).e("content")),style:Be(w.title?void 0:{margin:0})},[le(w.$slots,"default",{},()=>[w.dangerouslyUseHTMLString?(g(),k(Q,{key:1},[O(" Caution here, message could've been compromised, never use user's input as message "),_("p",{innerHTML:w.message},null,8,Aue)],2112)):(g(),k("p",Mue,M(w.message),1))])],6),[[sn,w.message]]),w.showClose?(g(),L(S(ve),{key:0,class:F(S(o).e("closeBtn")),onClick:Ge(y,["stop"])},{default:x(()=>[b(S(l))]),_:1},8,["class","onClick"])):O("v-if",!0)],2)],46,xue),[[sn,a.value]])]),_:3},8,["name","onBeforeLeave"]))}});var Nue=Re(Iue,[["__file","notification.vue"]]);const Og={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]},w2=16;let Pue=1;const Zu=function(e={},t=null){if(!kt)return{close:()=>{}};(typeof e=="string"||uo(e))&&(e={message:e});const n=e.position||"top-right";let o=e.offset||0;Og[n].forEach(({vm:u})=>{var d;o+=(((d=u.el)==null?void 0:d.offsetHeight)||0)+w2}),o+=w2;const r=`notification_${Pue++}`,s=e.onClose,i={...e,offset:o,id:r,onClose:()=>{Lue(r,n,s)}};let l=document.body;is(e.appendTo)?l=e.appendTo:je(e.appendTo)&&(l=document.querySelector(e.appendTo)),is(l)||(l=document.body);const a=document.createElement("div"),c=b(Nue,i,uo(i.message)?{default:()=>i.message}:null);return c.appContext=t??Zu._context,c.props.onDestroy=()=>{yi(null,a)},yi(c,a),Og[n].push({vm:c}),l.appendChild(a.firstElementChild),{close:()=>{c.component.exposed.visible.value=!1}}};DA.forEach(e=>{Zu[e]=(t={})=>((typeof t=="string"||uo(t))&&(t={message:t}),Zu({...t,type:e}))});function Lue(e,t,n){const o=Og[t],r=o.findIndex(({vm:c})=>{var u;return((u=c.component)==null?void 0:u.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 c=r;c<a;c++){const{el:u,component:d}=o[c].vm,f=Number.parseInt(u.style[l],10)-i-w2;d.props.offset=f}}function Rue(){for(const e of Object.values(Og))e.forEach(({vm:t})=>{t.component.exposed.visible.value=!1})}Zu.closeAll=Rue;Zu._context=null;const Fue=zZ(Zu,"$notify"),fe=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},Due={name:"NewFeedTicker",data(){return{new_items_count:0,last_checked:null,period:6e4,isScheduled:!1,lastTimeStamp:null,dismissed:!1}},methods:{scheduleTicker(){this.isScheduled||(this.isScheduled=!0,setTimeout(()=>{this.initTicker(),this.period=Math.floor(Math.random()*6e4)+3e4},this.period))},initTicker(){let e=this.$getLocalData("tickerData",{});if(e&&e.lastTimeStamp&&new Date().getTime()-parseInt(e.lastTimeStamp)<5e4){this.handleResponse(e);return}if(!this.appVars.last_feed_id||this.new_items_count){this.isScheduled=!1,this.scheduleTicker();return}this.$get("feeds/ticker",{last_checked:this.last_checked,last_feed_id:this.appVars.last_feed_id}).then(t=>{t.lastTimeStamp=new Date().getTime(),this.lastTimeStamp=t.lastTimeStamp,this.handleResponse(t),this.$storeLocalData("tickerData",t)}).catch(t=>{this.isScheduled=!1,this.scheduleTicker()})},handleResponse(e){this.new_items_count=e.new_items_count,this.last_checked=e.last_checked,this.isScheduled=!1,this.scheduleTicker(),this.$eventBus.emit("ticker_updated",e),this.new_items_count&&this.changeTitle(this.$t("🔔 new post available"))},routeToAllFeeds(){this.changeTitle(this.$t("Feeds")),this.new_items_count=0,this.$router.push({name:"dashboard",query:{stamp:new Date().getTime()}})},handleDismiss(){this.dismissed=!0,this.changeTitle(this.$t(""))}},mounted(){this.scheduleTicker()}},Bue={key:0,class:"fcom_new_ticker"};function Vue(e,t,n,o,r,s){return r.new_items_count&&!r.dismissed?(g(),k("div",Bue,[_("div",{onClick:t[0]||(t[0]=i=>s.routeToAllFeeds()),class:"fcom_ticker_menu"},M(e.$_n("%s new post available","%s new posts available",r.new_items_count)),1),_("div",{onClick:t[1]||(t[1]=i=>s.handleDismiss()),class:"fcom_ticker_dismiss"}," x ")])):O("",!0)}const zue=fe(Due,[["render",Vue]]),jue={name:"NotificationsBlock",emits:["close"],props:["notifications"],methods:{markRead(e,t){e.subscriber&&!e.subscriber.is_read||(this.notifications.splice(t,1),this.$post("notifications/mark-read/"+e.id).then(n=>{this.$eventBus.$emit("notification-read",n.unread_count)}))},getNotificationRoute(e){const t=e.route;return e.action=="comment_added"&&(t.query={comment_id:e.object_id}),t}}},Hue={class:"notification_avatar"},Uue={class:"notification_content"},Wue=["innerHTML"],que={class:"notification_time_stamp"};function Kue(e,t,n,o,r,s){const i=z("UserAvatar"),l=z("router-link");return g(!0),k(Q,null,Me(n.notifications,(a,c)=>{var u;return g(),k("div",{class:F(["notification_wrap",{notification_wrap_unread:((u=a==null?void 0:a.subscriber)==null?void 0:u.is_read)=="0"}])},[b(l,{onClick:d=>s.markRead(a,c),to:s.getNotificationRoute(a),class:"notification_item"},{default:x(()=>[_("div",Hue,[b(i,{xprofile:a.xprofile},null,8,["xprofile"])]),_("div",Uue,[_("div",{innerHTML:a.content},null,8,Wue),_("span",que,M(e.humanDateDiff(a.updated_at)),1)])]),_:2},1032,["onClick","to"])],2)}),256)}const BA=fe(jue,[["render",Kue]]),Gue={name:"NotificationIcon"},Yue={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Jue=_("path",{d:"M2.10794 11.9954C1.93073 13.1229 2.72301 13.9055 3.69305 14.2955C7.41201 15.7908 12.5873 15.7908 16.3063 14.2955C17.2763 13.9055 18.0686 13.1229 17.8914 11.9954C17.7825 11.3024 17.244 10.7254 16.845 10.162C16.3224 9.41493 16.2705 8.60009 16.2704 7.73317C16.2704 4.38291 13.4629 1.66699 9.99968 1.66699C6.53645 1.66699 3.72895 4.38291 3.72895 7.73317C3.72887 8.60009 3.67694 9.41493 3.15435 10.162C2.75537 10.7254 2.21685 11.3024 2.10794 11.9954Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),Zue=_("path",{d:"M7.5 17.5C8.16345 18.0182 9.03956 18.3333 10 18.3333C10.9604 18.3333 11.8366 18.0182 12.5 17.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),Xue=[Jue,Zue];function Que(e,t,n,o,r,s){return g(),k("svg",Yue,Xue)}const ede=fe(Gue,[["render",Que]]),tde={name:"Notifications",components:{NotificationsBlock:BA,NotificationIcon:ede},data(){return{unread_notifications:[],unread_count:parseInt(this.appVars.unread_notification_count),loading:!1,working:!1,visible:!1,notification_type:"all"}},methods:{switchType(e){this.notification_type=e,this.fetchUnread()},toggleNotifications(){this.loading=!0,this.visible=!this.visible,this.visible?this.fetchUnread():this.loading=!1},handleClose(){this.$refs.notification_pop.hide(),this.visible=!1},fetchUnread(){this.loading=!0,this.$get("notifications/unread",{notification_type:this.notification_type}).then(e=>{this.unread_notifications=e.notifications,this.appVars.unread_notification_count=e.unread_count,this.unread_count=e.unread_count}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})},markAllRead(){this.working=!0,this.$post("notifications/mark-all-read").then(e=>{this.$notify.success(e.message),this.fetchUnread()}).catch(e=>{this.$handleError(e)}).finally(()=>{this.working=!1})},gotoAll(){this.handleClose(),this.$router.push({name:"notifications"})},keyBind(e){e.code==="KeyN"&&e.altKey&&this.$refs.notification_icon.click()}},mounted(){document.addEventListener("keydown",this.keyBind),this.$eventBus.on("ticker_updated",e=>{this.appVars.unread_notification_count=e.unread_notification_count,this.unread_count=e.unread_notification_count}),this.$eventBus.on("notification_count_updated",e=>{this.appVars.unread_notification_count=e,this.unread_count=e}),this.$eventBus.on("feed_interaction",e=>{e=e+"",this.appVars.unread_feed_ids&&this.appVars.unread_feed_ids.indexOf(e)!==-1&&this.$post("notifications/mark-read/"+e+"/by-feed-id").then(t=>{this.unread_count=t.unread_notification_count,this.appVars.unread_feed_ids=t.unread_feed_ids})})},beforeUnmount(){document.removeEventListener("keydown",this.keyBind)}},nde={ref:"notification_icon",class:"notification_icon"},ode={class:"notifications_wrap unread_notifications"},rde={class:"norification_pop_header"},sde={class:"fcom_filter_menu"},ide={class:"fcom_filter_menu_ul"},lde={key:2};function ade(e,t,n,o,r,s){const i=z("NotificationIcon"),l=ve,a=vM,c=Ze,u=qt,d=z("notifications-block"),f=$o,h=Mt("loading");return g(),L(f,{popperClass:"notification_pop",onBeforeEnter:t[7]||(t[7]=p=>s.toggleNotifications()),ref:"notification_pop",trigger:"click",placement:"bottom",width:500},{reference:x(()=>[b(a,{max:20,hidden:!r.unread_count,value:r.unread_count,class:"item"},{default:x(()=>[_("div",nde,[b(l,null,{default:x(()=>[b(i)]),_:1})],512)]),_:1},8,["hidden","value"])]),default:x(()=>[_("div",ode,[_("div",rde,[_("h3",null,M(e.$t("Unread Notifications")),1),_("div",null,[Ve((g(),L(c,{disabled:r.working,size:"small",onClick:t[0]||(t[0]=p=>s.markAllRead())},{default:x(()=>[ne(M(e.$t("Mark all as read")),1)]),_:1},8,["disabled"])),[[h,r.working]])])]),_("div",sde,[_("ul",ide,[_("li",null,[_("a",{onClick:t[1]||(t[1]=Ge(p=>s.switchType("all"),["prevent"])),class:F({"router-link-exact-active":r.notification_type=="all"}),href:"#"},M(e.$t("All")),3)]),_("li",null,[_("a",{onClick:t[2]||(t[2]=Ge(p=>s.switchType("mentioned"),["prevent"])),class:F({"router-link-exact-active":r.notification_type=="mentioned"}),href:"#"},M(e.$t("Mentions")),3)]),_("li",null,[_("a",{onClick:t[3]||(t[3]=Ge(p=>s.switchType("following"),["prevent"])),class:F({"router-link-exact-active":r.notification_type=="following"}),href:"#"},M(e.$t("Following")),3)])])]),r.loading?(g(),L(u,{key:0,animated:!0,rows:2})):r.unread_notifications.length?(g(),k("div",{key:1,onClick:t[5]||(t[5]=p=>e.$refs.notification_pop.hide()),class:"notifications"},[b(d,{onClose:t[4]||(t[4]=p=>s.handleClose()),notifications:r.unread_notifications},null,8,["notifications"])])):(g(),k("div",lde,[_("p",null,M(e.$t("No unread notifications found")),1)])),b(c,{style:{"margin-top":"10px"},onClick:t[6]||(t[6]=p=>s.gotoAll())},{default:x(()=>[ne(M(e.$t("View All")),1)]),_:1})])]),_:1},512)}const cde=fe(tde,[["render",ade]]),ude={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 dde(e,t,n,o,r,s){const i=Ze,l=FA,a=z("CloseBold"),c=ve,u=Mt("loading");return g(),k(Q,null,[b(l,{class:F(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:x(()=>[le(e.$slots,"trigger",{},()=>[le(e.$slots,"default",{},()=>[Ve((g(),L(i,{disabled:r.loading,text:n.isTextBtn,class:"fcom_plain_button"},{default:x(()=>[ne(M(n.button_text),1)]),_:1},8,["disabled","text"])),[[u,r.loading]])])])]),_:3},8,["class","multiple","action","headers","data","on-success","on-progress","on-error"]),n.can_remove?(g(),L(i,{key:0,class:"remove_img",size:"small",type:"danger",plain:"",onClick:t[0]||(t[0]=d=>e.$emit("uploaded","")),text:n.isTextBtn},{default:x(()=>[n.removeIcon?(g(),L(c,{key:0},{default:x(()=>[b(a)]),_:1})):O("",!0),_("span",null,M(e.$t("Remove")),1)]),_:1},8,["text"])):O("",!0)],64)}const vc=fe(ude,[["render",dde]]),fde={name:"SurveyEditForm",props:["form"],emits:["cancel"],data(){return{}},methods:{addOption(){this.form.options.push({label:"",slug:""})},removeOption(e){this.form.options.splice(e,1)}}},hde={class:"fcom_compose_app_form"},pde={class:"fcom_app_header"},mde={class:"fcom_app_options"},gde={class:"fcom_app_pref"},_de={class:"fcom_app_footer"};function vde(e,t,n,o,r,s){const i=Ze,l=Dn,a=z("Plus"),c=ve,u=Fr;return g(),k("div",hde,[_("div",pde,[_("h5",null,M(e.$t("Poll Options")),1),_("div",null,[b(i,{onClick:t[0]||(t[0]=d=>e.$emit("cancel")),size:"small",text:""},{default:x(()=>[ne(M(e.$t("cancel")),1)]),_:1})])]),_("div",mde,[(g(!0),k(Q,null,Me(n.form.options,(d,f)=>(g(),k("div",{class:"fcom_app_option",key:"option_"+f},[b(l,{modelValue:d.label,"onUpdate:modelValue":h=>d.label=h,type:"text",placeholder:e.$t("Your option text")},Ps({_:2},[!d.slug&&f!==0?{name:"suffix",fn:x(()=>[b(i,{onClick:h=>s.removeOption(f),text:"",size:"small"},{default:x(()=>[ne("x")]),_:2},1032,["onClick"])]),key:"0"}:void 0]),1032,["modelValue","onUpdate:modelValue","placeholder"])]))),128)),_("div",gde,[b(i,{onClick:s.addOption,text:"",size:"small"},{default:x(()=>[b(c,null,{default:x(()=>[b(a)]),_:1}),_("span",null,M(e.$t("Add More")),1)]),_:1},8,["onClick"])])]),_("div",_de,[_("h5",null,M(e.$t("Poll Settings")),1),b(u,{modelValue:n.form.type,"onUpdate:modelValue":t[1]||(t[1]=d=>n.form.type=d),"true-value":"multi-choice","false-value":"single_choice"},{default:x(()=>[ne(M(e.$t("Users can choose multiple options")),1)]),_:1},8,["modelValue"])])])}const yde=fe(fde,[["render",vde]]),bde={name:"GiphyIcon"},wde={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},kde=h0('<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),Cde=[kde];function Sde(e,t,n,o,r,s){return g(),k("svg",wde,Cde)}const $de=fe(bde,[["render",Sde]]);function Ede(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var md=Ede,xde=typeof $r=="object"&&$r&&$r.Object===Object&&$r,VA=xde,Tde=VA,Mde=typeof self=="object"&&self&&self.Object===Object&&self,Ade=Tde||Mde||Function("return this")(),Ks=Ade,Ode=Ks,Ide=function(){return Ode.Date.now()},Nde=Ide,Pde=/\s/;function Lde(e){for(var t=e.length;t--&&Pde.test(e.charAt(t)););return t}var Rde=Lde,Fde=Rde,Dde=/^\s+/;function Bde(e){return e&&e.slice(0,Fde(e)+1).replace(Dde,"")}var Vde=Bde,zde=Ks,jde=zde.Symbol,U0=jde,R8=U0,zA=Object.prototype,Hde=zA.hasOwnProperty,Ude=zA.toString,jd=R8?R8.toStringTag:void 0;function Wde(e){var t=Hde.call(e,jd),n=e[jd];try{e[jd]=void 0;var o=!0}catch{}var r=Ude.call(e);return o&&(t?e[jd]=n:delete e[jd]),r}var qde=Wde,Kde=Object.prototype,Gde=Kde.toString;function Yde(e){return Gde.call(e)}var Jde=Yde,F8=U0,Zde=qde,Xde=Jde,Qde="[object Null]",efe="[object Undefined]",D8=F8?F8.toStringTag:void 0;function tfe(e){return e==null?e===void 0?efe:Qde:D8&&D8 in Object(e)?Zde(e):Xde(e)}var yp=tfe;function nfe(e){return e!=null&&typeof e=="object"}var bp=nfe,ofe=yp,rfe=bp,sfe="[object Symbol]";function ife(e){return typeof e=="symbol"||rfe(e)&&ofe(e)==sfe}var W0=ife,lfe=Vde,B8=md,afe=W0,V8=0/0,cfe=/^[-+]0x[0-9a-f]+$/i,ufe=/^0b[01]+$/i,dfe=/^0o[0-7]+$/i,ffe=parseInt;function hfe(e){if(typeof e=="number")return e;if(afe(e))return V8;if(B8(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=B8(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=lfe(e);var n=ufe.test(e);return n||dfe.test(e)?ffe(e.slice(2),n?2:8):cfe.test(e)?V8:+e}var pfe=hfe,mfe=md,av=Nde,z8=pfe,gfe="Expected a function",_fe=Math.max,vfe=Math.min;function yfe(e,t,n){var o,r,s,i,l,a,c=0,u=!1,d=!1,f=!0;if(typeof e!="function")throw new TypeError(gfe);t=z8(t)||0,mfe(n)&&(u=!!n.leading,d="maxWait"in n,s=d?_fe(z8(n.maxWait)||0,t):s,f="trailing"in n?!!n.trailing:f);function h($){var A=o,N=r;return o=r=void 0,c=$,i=e.apply(N,A),i}function p($){return c=$,l=setTimeout(y,t),u?h($):i}function m($){var A=$-a,N=$-c,P=t-A;return d?vfe(P,s-N):P}function v($){var A=$-a,N=$-c;return a===void 0||A>=t||A<0||d&&N>=s}function y(){var $=av();if(v($))return E($);l=setTimeout(y,m($))}function E($){return l=void 0,f&&o?h($):(o=r=void 0,i)}function w(){l!==void 0&&clearTimeout(l),c=0,o=a=r=l=void 0}function C(){return l===void 0?i:E(av())}function T(){var $=av(),A=v($);if(o=arguments,r=this,a=$,A){if(l===void 0)return p(a);if(d)return clearTimeout(l),l=setTimeout(y,t),h(a)}return l===void 0&&(l=setTimeout(y,t)),i}return T.cancel=w,T.flush=C,T}var jA=yfe;const bfe=jl(jA),wfe={name:"Giphy",components:{GiphyIcon:$de},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:bfe(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()}}},kfe={class:"fcom_giphy_composer"},Cfe={class:"search-container"},Sfe=["onLoad","src","alt","onClick"],$fe={key:0,class:"img_loading"},Efe={key:1,class:"no_result"},xfe=_("div",{class:"fcom_giphy_powered_by"},[_("span",{class:"powered_by"},"POWERED BY "),_("span",null,"GIPHY")],-1);function Tfe(e,t,n,o,r,s){const i=Dn,l=gp,a=mp,c=z("GiphyIcon"),u=ve,d=Ze,f=$o,h=Mt("loading");return g(),k("div",kfe,[b(f,{placement:"top-end",width:300,persistent:!1,trigger:"click","popper-class":"fcom_giphy_popover",ref:"popover"},{reference:x(()=>[b(d,{"aria-label":"Pick GIF",text:"",onClick:s.handleGiphyClick},{default:x(()=>[b(u,{class:F(["fcom_apps_icon"])},{default:x(()=>[b(c)]),_:1})]),_:1},8,["onClick"])]),default:x(()=>[Ve((g(),k("div",Cfe,[b(i,{modelValue:r.searchQuery,"onUpdate:modelValue":t[0]||(t[0]=p=>r.searchQuery=p),placeholder:e.$t("Search Gifs"),onInput:s.handleSearch},null,8,["modelValue","placeholder","onInput"]),_("div",{class:"gif_container",onScroll:t[1]||(t[1]=(...p)=>s.handleScroll&&s.handleScroll(...p))},[r.gifs.length>0?(g(),L(a,{key:0,gutter:5},{default:x(()=>[(g(!0),k(Q,null,Me(r.gifs,p=>(g(),L(l,{span:12,key:p.id,class:"gif_item"},{default:x(()=>[_("img",{alt:"",onLoad:m=>p.loaded=!0,src:p.images.preview_gif.url,onClick:m=>s.selectGiphy(p)},null,40,Sfe),p.loaded?O("",!0):(g(),k("p",$fe))]),_:2},1024))),128))]),_:1})):(g(),k("p",Efe,M(e.$t("No results")),1))],32),xfe])),[[h,r.loading]])]),_:1},512)])}const Mfe=fe(wfe,[["render",Tfe]]),Afe={name:"VideoIcon"},Ofe={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},Ife=_("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),Nfe=_("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),Pfe=[Ife,Nfe];function Lfe(e,t,n,o,r,s){return g(),k("svg",Ofe,Pfe)}const Rfe=fe(Afe,[["render",Lfe]]),Ffe={name:"MediaPreview",components:{Postcard:hZ},props:["feed","media_item"],computed:{media(){return this.feed?this.feed.meta.media_preview:this.media_item}},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 1}}},Dfe={key:0},Bfe=["innerHTML"],Vfe=["href"],zfe={key:0,class:"feed_media_image"},jfe=["src"],Hfe={key:1,class:"feed_media_content"},Ufe={class:"media_domain"},Wfe={class:"feed_media_title"};function qfe(e,t,n,o,r,s){const i=qt,l=Hl;return g(),k("div",{class:F(["feed_media","feed_media_"+s.media.type])},[s.media.type=="oembed"||s.media.type=="iframe_html"?(g(),k(Q,{key:0},[s.media.content_type=="video"?(g(),k("div",Dfe,[_("div",{class:"feed_media_ext_video",innerHTML:s.media.html},null,8,Bfe)])):O("",!0)],64)):s.media.type=="image"||s.media.is_uploaded?(g(),k("div",{key:1,class:F(["feed_media_provider_"+s.media.provider,"feed_media_image feed_custom_uploaded"])},[b(l,{alt:"",style:Be({width:"100%",aspectRatio:s.getAspectRatio(s.media.width,s.media.height)}),src:s.media.image,lazy:!0,previewSrcList:[s.media.image],loading:"lazy","zoom-rate":1.2,"max-scale":7,"preview-teleported":!0,"min-scale":.2,"initial-index":1,class:F("fcom_media_provider_"+s.media.provider),fit:"scale-down"},{placeholder:x(()=>[b(i,{animated:!0})]),_:1},8,["style","src","previewSrcList","class"])],2)):(g(),k("a",{key:2,href:s.media.url,target:"_blank",rel:"noopener",class:"feed_media_link"},[s.media.image?(g(),k("div",zfe,[_("img",{alt:"",src:s.media.image},null,8,jfe)])):O("",!0),s.media.title?(g(),k("div",Hfe,[_("div",Ufe,M(s.getDomainName(s.media.url)),1),_("div",Wfe,M(s.media.title),1),O("",!0)])):O("",!0)],8,Vfe))],2)}const gd=fe(Ffe,[["render",qfe]]),Kfe={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:gd},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()}},Gfe={key:0},Yfe={key:0,class:"fcom_media_editor_actions"},Jfe={key:1,class:"fcom_media_editor fcom_media_embeder"},Zfe={key:2,class:"fcom_course_media"};function Xfe(e,t,n,o,r,s){const i=Ze,l=hp,a=Oi,c=Dn,u=z("media-preview"),d=Mt("loading");return r.appReady?Ve((g(),k("div",Gfe,[n.has_iframe?(g(),k("div",Yfe,[s.showPreview?(g(),L(i,{key:0,onClick:t[0]||(t[0]=f=>r.showInput=!0),type:"danger",size:"small",text:""},{default:x(()=>[ne(M(e.$t("Edit media")),1)]),_:1})):(g(),L(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:x(()=>[b(l,{label:e.$t("Oembed"),value:"oembed"},null,8,["label"]),b(l,{label:e.$t("Custom HTML Code"),value:"iframe_html"},null,8,["label"])]),_:1},8,["modelValue"]))])):O("",!0),s.showPreview?(g(),k("div",Zfe,[b(u,{media_item:n.media},null,8,["media_item"])])):(g(),k("div",Jfe,[n.media.type=="iframe_html"&&n.has_iframe?(g(),k(Q,{key:0},[_("h3",null,M(e.$t("Add Video from custom HTML Code")),1),b(c,{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"]),b(i,{style:{"margin-top":"20px"},onClick:t[4]||(t[4]=f=>r.showInput=!1),class:"fcom_secondary_button"},{default:x(()=>[ne(M(e.$t("Embed")),1)]),_:1})],64)):(g(),k(Q,{key:1},[_("h3",null,M(n.box_title||e.$t("Featured media")),1),_("p",null,M(n.box_description||e.$t("Embed from Vimeo, YouTube, Wistia and more")),1),b(c,{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:x(()=>[b(i,{onClick:s.fetchData,class:"fcom_primary_button"},{default:x(()=>[ne(M(e.$t("Embed")),1)]),_:1},8,["onClick"])]),_:1},8,["modelValue","placeholder"])],64))]))])),[[d,r.fetching]]):O("",!0)}const B3=fe(Kfe,[["render",Xfe]]),Qfe={name:"VideoEmbeder",emits:["embeded"],components:{MediaEmbeder:B3,VideoIcon:Rfe},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"}}}},ehe={class:"fcom_video_embeder"};function the(e,t,n,o,r,s){const i=z("VideoIcon"),l=ve,a=Ze,c=z("media-embeder"),u=vp;return g(),k("div",ehe,[b(a,{"aria-label":"Add Video",text:"",onClick:s.show},{default:x(()=>[b(l,{class:F(["fcom_apps_icon"])},{default:x(()=>[b(i)]),_:1})]),_:1},8,["onClick"]),r.showVideoPop?(g(),L(u,{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:x(()=>[b(c,{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"])):O("",!0)])}const nhe=fe(Qfe,[["render",the]]);var Ho=(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))(Ho||{});let fr=class extends Error{constructor(t,n){super(n),this.name="MilkdownError",this.code=t}};const ohe=(e,t)=>typeof t=="function"?"[Function]":t,Xu=e=>JSON.stringify(e,ohe);function rhe(e){return new fr(Ho.docTypeError,`Doc type error, unsupported type: ${Xu(e)}`)}function she(e){return new fr(Ho.contextNotFound,`Context "${e}" not found, do you forget to inject it?`)}function ihe(e){return new fr(Ho.timerNotFound,`Timer "${e}" not found, do you forget to record it?`)}function V3(){return new fr(Ho.ctxCallOutOfScope,"Should not call a context out of the plugin.")}function lhe(...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?Xu(s.toJSON()):s.spec?Xu(s.spec):s.toString();return`${n}, ${r(o)}`},"Create prosemirror node from remark failed in parser");return new fr(Ho.createNodeInParserFail,t)}function HA(){return new fr(Ho.stackOverFlow,"Stack over flow, cannot pop on an empty stack.")}function ahe(e){return new fr(Ho.parserMatchError,`Cannot match target parser for node: ${Xu(e)}.`)}function che(e){return new fr(Ho.serializerMatchError,`Cannot match target serializer for node: ${Xu(e)}.`)}function uhe(e,t){return new fr(Ho.getAtomFromSchemaFail,`Cannot get ${e}: ${t} from schema.`)}function Gs(e){return new fr(Ho.expectDomTypeError,`Expect to be a dom, but get: ${Xu(e)}.`)}function dhe(){return new fr(Ho.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 UA(e){return new fr(Ho.missingNodeInSchema,`Missing node in schema, milkdown cannot find "${e}" in schema.`)}function fhe(e){return new fr(Ho.missingMarkInSchema,`Missing mark in schema, milkdown cannot find "${e}" in schema.`)}var WA=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Je=(e,t,n)=>(WA(e,t,"read from private field"),n?n.call(e):t.get(e)),_n=(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)},Ft=(e,t,n,o)=>(WA(e,t,"write to private field"),o?o.call(e,n):t.set(e,n),n);let qA=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 she(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 vs,Gi,Gd;let hhe=class{constructor(t,n,o){_n(this,vs,void 0),_n(this,Gi,void 0),_n(this,Gd,void 0),Ft(this,vs,[]),Ft(this,Gd,()=>{Je(this,vs).forEach(r=>r(Je(this,Gi)))}),this.set=r=>{Ft(this,Gi,r),Je(this,Gd).call(this)},this.get=()=>Je(this,Gi),this.update=r=>{Ft(this,Gi,r(Je(this,Gi))),Je(this,Gd).call(this)},this.type=o,Ft(this,Gi,n),t.set(o.id,this)}on(t){return Je(this,vs).push(t),()=>{Ft(this,vs,Je(this,vs).filter(n=>n!==t))}}once(t){const n=this.on(o=>{t(o),n()});return n}off(t){Ft(this,vs,Je(this,vs).filter(n=>n!==t))}offAll(){Ft(this,vs,[])}};vs=new WeakMap,Gi=new WeakMap,Gd=new WeakMap;let phe=class{constructor(t,n){this.id=Symbol(`Context-${n}`),this.name=n,this._defaultValue=t,this._typeInfo=()=>{throw V3()}}create(t,n=this._defaultValue){return new hhe(t,n,this)}};const Lt=(e,t)=>new phe(e,t);var n1,o1,r1,Vc,Yd,aa,Jd,Zd,Xd;let mhe=class{constructor(t,n,o){_n(this,n1,void 0),_n(this,o1,void 0),_n(this,r1,void 0),_n(this,Vc,void 0),_n(this,Yd,void 0),_n(this,aa,void 0),_n(this,Jd,void 0),_n(this,Zd,void 0),_n(this,Xd,void 0),Ft(this,Vc,new Set),Ft(this,Yd,new Set),Ft(this,aa,new Map),Ft(this,Jd,new Map),this.read=()=>({metadata:Je(this,n1),injectedSlices:[...Je(this,Vc)].map(r=>({name:typeof r=="string"?r:r.name,value:Je(this,Zd).call(this,r)})),consumedSlices:[...Je(this,Yd)].map(r=>({name:typeof r=="string"?r:r.name,value:Je(this,Zd).call(this,r)})),recordedTimers:[...Je(this,aa)].map(([r,{duration:s}])=>({name:r.name,duration:s,status:Je(this,Xd).call(this,r)})),waitTimers:[...Je(this,Jd)].map(([r,{duration:s}])=>({name:r.name,duration:s,status:Je(this,Xd).call(this,r)}))}),this.onRecord=r=>{Je(this,aa).set(r,{start:Date.now(),duration:0})},this.onClear=r=>{Je(this,aa).delete(r)},this.onDone=r=>{const s=Je(this,aa).get(r);s&&(s.duration=Date.now()-s.start)},this.onWait=(r,s)=>{const i=Date.now();s.finally(()=>{Je(this,Jd).set(r,{duration:Date.now()-i})})},this.onInject=r=>{Je(this,Vc).add(r)},this.onRemove=r=>{Je(this,Vc).delete(r)},this.onUse=r=>{Je(this,Yd).add(r)},Ft(this,Zd,r=>Je(this,o1).get(r).get()),Ft(this,Xd,r=>Je(this,r1).get(r).status),Ft(this,o1,t),Ft(this,r1,n),Ft(this,n1,o)}};n1=new WeakMap,o1=new WeakMap,r1=new WeakMap,Vc=new WeakMap,Yd=new WeakMap,aa=new WeakMap,Jd=new WeakMap,Zd=new WeakMap,Xd=new WeakMap;var Yi,Ji,s1,Hr;const ghe=class KA{constructor(t,n,o){_n(this,Yi,void 0),_n(this,Ji,void 0),_n(this,s1,void 0),_n(this,Hr,void 0),this.produce=r=>r&&Object.keys(r).length?new KA(Je(this,Yi),Je(this,Ji),{...r}):this,this.inject=(r,s)=>{var i;const l=r.create(Je(this,Yi).sliceMap);return s!=null&&l.set(s),(i=Je(this,Hr))==null||i.onInject(r),this},this.remove=r=>{var s;return Je(this,Yi).remove(r),(s=Je(this,Hr))==null||s.onRemove(r),this},this.record=r=>{var s;return r.create(Je(this,Ji).store),(s=Je(this,Hr))==null||s.onRecord(r),this},this.clearTimer=r=>{var s;return Je(this,Ji).remove(r),(s=Je(this,Hr))==null||s.onClear(r),this},this.isInjected=r=>Je(this,Yi).has(r),this.isRecorded=r=>Je(this,Ji).has(r),this.use=r=>{var s;return(s=Je(this,Hr))==null||s.onUse(r),Je(this,Yi).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=>Je(this,Ji).get(r),this.done=r=>{var s;this.timer(r).done(),(s=Je(this,Hr))==null||s.onDone(r)},this.wait=r=>{var s;const i=this.timer(r).start();return(s=Je(this,Hr))==null||s.onWait(r,i),i},this.waitTimers=async r=>{await Promise.all(this.get(r).map(s=>this.wait(s)))},Ft(this,Yi,t),Ft(this,Ji,n),Ft(this,s1,o),o&&Ft(this,Hr,new mhe(t,n,o))}get meta(){return Je(this,s1)}get inspector(){return Je(this,Hr)}};Yi=new WeakMap,Ji=new WeakMap,s1=new WeakMap,Hr=new WeakMap;let _he=ghe,vhe=class{constructor(){this.store=new Map,this.get=t=>{const n=this.store.get(t.id);if(!n)throw ihe(t.name);return n},this.remove=t=>{this.store.delete(t.id)},this.has=t=>this.store.has(t.id)}};var zc,ca,Qd,Zi,ef,i1;let yhe=class{constructor(t,n){_n(this,zc,void 0),_n(this,ca,void 0),_n(this,Qd,void 0),_n(this,Zi,void 0),_n(this,ef,void 0),_n(this,i1,void 0),Ft(this,zc,null),Ft(this,ca,null),Ft(this,Zi,"pending"),this.start=()=>(Je(this,zc)??Ft(this,zc,new Promise((o,r)=>{Ft(this,ca,s=>{s instanceof CustomEvent&&s.detail.id===Je(this,Qd)&&(Ft(this,Zi,"resolved"),Je(this,ef).call(this),s.stopImmediatePropagation(),o())}),Je(this,i1).call(this,()=>{Je(this,Zi)==="pending"&&Ft(this,Zi,"rejected"),Je(this,ef).call(this),r(new Error(`Timing ${this.type.name} timeout.`))}),Ft(this,Zi,"pending"),addEventListener(this.type.name,Je(this,ca))})),Je(this,zc)),this.done=()=>{const o=new CustomEvent(this.type.name,{detail:{id:Je(this,Qd)}});dispatchEvent(o)},Ft(this,ef,()=>{Je(this,ca)&&removeEventListener(this.type.name,Je(this,ca))}),Ft(this,i1,o=>{setTimeout(()=>{o()},this.type.timeout)}),Ft(this,Qd,Symbol(n.name)),this.type=n,t.set(n.id,this)}get status(){return Je(this,Zi)}};zc=new WeakMap,ca=new WeakMap,Qd=new WeakMap,Zi=new WeakMap,ef=new WeakMap,i1=new WeakMap;let bhe=class{constructor(t,n=3e3){this.create=o=>new yhe(o,this),this.id=Symbol(`Timer-${t}`),this.name=t,this.timeout=n}};const Ul=(e,t=3e3)=>new bhe(e,t);function Kn(e){this.content=e}Kn.prototype={constructor:Kn,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 Kn(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 Kn(n)},addToStart:function(e,t){return new Kn([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new Kn(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 Kn(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=Kn.from(e),e.size?new Kn(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=Kn.from(e),e.size?new Kn(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=Kn.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}};Kn.from=function(e){if(e instanceof Kn)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new Kn(t)};function GA(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=GA(r.content,s.content,n+1);if(i!=null)return i}n+=r.nodeSize}}function YA(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 c=0,u=Math.min(i.text.length,l.text.length);for(;c<u&&i.text[i.text.length-c-1]==l.text[l.text.length-c-1];)c++,n--,o--;return{a:n,b:o}}if(i.content.size||l.content.size){let c=YA(i.content,l.content,n-1,o-1);if(c)return c}n-=a,o-=a}}let Te=class go{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],c=l+a.nodeSize;if(c>t&&o(a,r+l,s||null,i)!==!1&&a.content.size){let u=l+1;a.nodesBetween(Math.max(0,t-u),Math.min(a.content.size,n-u),o,r+u)}l=c}}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 c=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&&c||l.isTextblock)&&o&&(i?i=!1:s+=o),s+=c},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 go(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 go(o,r)}cutByIndex(t,n){return t==n?go.empty:t==0&&n==this.content.length?this:new go(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 go(r,s)}addToStart(t){return new go([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new go(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 GA(this,t,n)}findDiffEnd(t,n=this.size,o=t.size){return YA(this,t,n,o)}findIndex(t,n=-1){if(t==0)return gm(0,t);if(t==this.size)return gm(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?gm(o+1,i):gm(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 go.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new go(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return go.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 go(n||t,o)}static from(t){if(!t)return go.empty;if(t instanceof go)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new go([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}};Te.empty=new Te([],0);const cv={index:0,offset:0};function gm(e,t){return cv.index=e,cv.offset=t,cv}function Ig(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(!Ig(e[o],t[o]))return!1}else{for(let o in e)if(!(o in t)||!Ig(e[o],t[o]))return!1;for(let o in t)if(!(o in e))return!1}return!0}let Vt=class k2{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&&Ig(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 k2.none;if(t instanceof k2)return[t];let n=t.slice();return n.sort((o,r)=>o.type.rank-r.type.rank),n}};Vt.none=[];class Ng extends Error{}class ze{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=ZA(this.content,t+this.openStart,n);return o&&new ze(o,this.openStart,this.openEnd)}removeBetween(t,n){return new ze(JA(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 ze.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 ze(Te.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 ze(t,o,r)}}ze.empty=new ze(Te.empty,0,0);function JA(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(JA(s.content,t-r-1,n-r-1)))}function ZA(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=ZA(i.content,t-s-1,n);return l&&e.replaceChild(r,i.copy(l))}function whe(e,t,n){if(n.openStart>e.depth)throw new Ng("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new Ng("Inconsistent open depths");return XA(e,t,n,0)}function XA(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=XA(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 Ba(i,l.cut(0,e.parentOffset).append(n.content).append(l.cut(t.parentOffset)))}else{let{start:i,end:l}=khe(n,e);return Ba(s,eO(e,i,l,t,o))}else return Ba(s,Pg(e,t,o))}function QA(e,t){if(!t.type.compatibleContent(e.type))throw new Ng("Cannot join "+t.type.name+" onto "+e.type.name)}function C2(e,t,n){let o=e.node(n);return QA(o,t.node(n)),o}function Da(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 qf(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&&(Da(e.nodeAfter,o),s++));for(let l=s;l<i;l++)Da(r.child(l),o);t&&t.depth==n&&t.textOffset&&Da(t.nodeBefore,o)}function Ba(e,t){return e.type.checkContent(t),e.copy(t)}function eO(e,t,n,o,r){let s=e.depth>r&&C2(e,t,r+1),i=o.depth>r&&C2(n,o,r+1),l=[];return qf(null,e,r,l),s&&i&&t.index(r)==n.index(r)?(QA(s,i),Da(Ba(s,eO(e,t,n,o,r+1)),l)):(s&&Da(Ba(s,Pg(e,t,r+1)),l),qf(t,n,r,l),i&&Da(Ba(i,Pg(n,o,r+1)),l)),qf(o,null,r,l),new Te(l)}function Pg(e,t,n){let o=[];if(qf(null,e,n,o),e.depth>n){let r=C2(e,t,n+1);Da(Ba(r,Pg(e,t,n+1)),o)}return qf(t,null,n,o),new Te(o)}function khe(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(Te.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}class Rh{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 Vt.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 tO(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),c=s-a;if(o.push(i,l,r+a),!c||(i=i.child(l),i.isText))break;s=c-1,r+=a+1}return new Rh(n,o,s)}static resolveCached(t,n){let o=j8.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 j8.set(t,o=new Che);let r=o.elts[o.i]=Rh.resolve(t,n);return o.i=(o.i+1)%She,r}}class Che{constructor(){this.elts=[],this.i=0}}const She=12,j8=new WeakMap;class tO{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 $he=Object.create(null);let El=class S2{constructor(t,n,o,r=Vt.none){this.type=t,this.attrs=n,this.marks=r,this.content=o||Te.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&&Ig(this.attrs,n||t.defaultAttrs||$he)&&Vt.sameSet(this.marks,o||Vt.none)}copy(t=null){return t==this.content?this:new S2(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new S2(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 ze.empty;let r=this.resolve(t),s=this.resolve(n),i=o?0:r.sharedDepth(n),l=r.start(i),c=r.node(i).content.cut(r.pos-l,s.pos-l);return new ze(c,r.depth-i,s.depth-i)}replace(t,n,o){return whe(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 Rh.resolveCached(this,t)}resolveNoCache(t){return Rh.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()+")"),nO(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=Te.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=Vt.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(!Vt.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=Te.fromJSON(t,n.content),s=t.nodeType(n.type).create(n.attrs,r,o);return s.type.checkAttrs(s.attrs),s}};El.prototype.text=void 0;class Lg extends El{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):nO(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 Lg(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new Lg(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 nO(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class oc{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let o=new Ehe(t,n);if(o.next==null)return oc.empty;let r=oO(o);o.next&&o.err("Unexpected trailing text");let s=Nhe(Ihe(r));return Phe(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 Te.from(l.map(c=>c.createAndFill()));for(let c=0;c<i.next.length;c++){let{type:u,next:d}=i.next[c];if(!(u.isText||u.hasRequiredAttrs())&&r.indexOf(d)==-1){r.push(d);let f=s(d,l.concat(u));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 |
`)}}oc.empty=new oc(!0);class Ehe{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 oO(e){let t=[];do t.push(xhe(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function xhe(e){let t=[];do t.push(The(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function The(e){let t=Ohe(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=Mhe(e,t);else break;return t}function H8(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function Mhe(e,t){let n=H8(e),o=n;return e.eat(",")&&(e.next!="}"?o=H8(e):o=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:o,expr:t}}function Ahe(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 Ohe(e){if(e.eat("(")){let t=oO(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=Ahe(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 Ihe(e){let t=[[]];return r(s(e,0),n()),t;function n(){return t.push([])-1}function o(i,l,a){let c={term:a,to:l};return t[i].push(c),c}function r(i,l){i.forEach(a=>a.to=l)}function s(i,l){if(i.type=="choice")return i.exprs.reduce((a,c)=>a.concat(s(c,l)),[]);if(i.type=="seq")for(let a=0;;a++){let c=s(i.exprs[a],l);if(a==i.exprs.length-1)return c;r(c,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 c=0;c<i.min;c++){let u=n();r(s(i.expr,a),u),a=u}if(i.max==-1)r(s(i.expr,a),a);else for(let c=i.min;c<i.max;c++){let u=n();o(a,u),r(s(i.expr,a),u),a=u}return[o(a)]}else{if(i.type=="name")return[o(l,void 0,i.value)];throw new Error("Unknown expr type")}}}}function rO(e,t){return t-e}function U8(e,t){let n=[];return o(t),n.sort(rO);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 Nhe(e){let t=Object.create(null);return n(U8(e,0));function n(o){let r=[];o.forEach(i=>{e[i].forEach(({term:l,to:a})=>{if(!l)return;let c;for(let u=0;u<r.length;u++)r[u][0]==l&&(c=r[u][1]);U8(e,a).forEach(u=>{c||r.push([l,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let s=t[o.join(",")]=new oc(o.indexOf(e.length-1)>-1);for(let i=0;i<r.length;i++){let l=r[i][1].sort(rO);s.next.push({type:r[i][0],next:t[l.join(",")]||n(l)})}return s}}function Phe(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:c}=r.next[l];i.push(a.name),s&&!(a.isText||a.hasRequiredAttrs())&&(s=!1),o.indexOf(c)==-1&&o.push(c)}s&&t.err("Only non-generatable nodes ("+i.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function sO(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 iO(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 lO(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 aO(e,t){let n=Object.create(null);if(t)for(let o in t)n[o]=new Rhe(e,o,t[o]);return n}let W8=class cO{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=aO(t,o.attrs),this.defaultAttrs=sO(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==oc.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:iO(this.attrs,t)}create(t=null,n,o){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new El(this,this.computeAttrs(t),Te.from(n),Vt.setFrom(o))}createChecked(t=null,n,o){return n=Te.from(n),this.checkContent(n),new El(this,this.computeAttrs(t),n,Vt.setFrom(o))}createAndFill(t=null,n,o){if(t=this.computeAttrs(t),n=Te.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(Te.empty,!0);return s?new El(this,t,n.append(s),Vt.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){lO(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:Vt.none:t}static compile(t,n){let o=Object.create(null);t.forEach((s,i)=>o[s]=new cO(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 Lhe(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 Rhe{constructor(t,n,o){this.hasDefault=Object.prototype.hasOwnProperty.call(o,"default"),this.default=o.default,this.validate=typeof o.validate=="string"?Lhe(t,n,o.validate):o.validate}get isRequired(){return!this.hasDefault}}class q0{constructor(t,n,o,r){this.name=t,this.rank=n,this.schema=o,this.spec=r,this.attrs=aO(t,r.attrs),this.excluded=null;let s=sO(this.attrs);this.instance=s?new Vt(this,s):null}create(t=null){return!t&&this.instance?this.instance:new Vt(this,iO(this.attrs,t))}static compile(t,n){let o=Object.create(null),r=0;return t.forEach((s,i)=>o[s]=new q0(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){lO(this.attrs,t,"mark",this.name)}excludes(t){return this.excluded.indexOf(t)>-1}}class Fhe{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=Kn.from(t.nodes),n.marks=Kn.from(t.marks||{}),this.nodes=W8.compile(this.spec.nodes,this),this.marks=q0.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]=oc.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?q8(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==""?[]:q8(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 W8){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 Lg(o,o.defaultAttrs,t,Vt.setFrom(n))}mark(t,n){return typeof t=="string"&&(t=this.marks[t]),t.create(n)}nodeFromJSON(t){return El.fromJSON(this,t)}markFromJSON(t){return Vt.fromJSON(this,t)}nodeType(t){let n=this.nodes[t];if(!n)throw new RangeError("Unknown node type: "+t);return n}}function q8(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 Dhe(e){return e.tag!=null}function Bhe(e){return e.style!=null}class rc{constructor(t,n){this.schema=t,this.rules=n,this.tags=[],this.styles=[];let o=this.matchedStyles=[];n.forEach(r=>{if(Dhe(r))this.tags.push(r);else if(Bhe(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 G8(this,n,!1);return o.addAll(t,Vt.none,n.from,n.to),o.finish()}parseSlice(t,n={}){let o=new G8(this,n,!0);return o.addAll(t,Vt.none,n.from,n.to),ze.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(jhe(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=Y8(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=Y8(i)),i.node||i.ignore||i.mark||(i.node=r)})}return n}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new rc(t,rc.schemaRules(t)))}}const uO={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},Vhe={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},dO={ol:!0,ul:!0},Rg=1,Fg=2,Kf=4;function K8(e,t,n){return t!=null?(t?Rg:0)|(t==="full"?Fg:0):e&&e.whitespace=="pre"?Rg|Fg:n&~Kf}class _m{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=Vt.none,this.match=s||(i&Kf?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(Te.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&Rg)){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=Te.from(this.content);return!t&&this.match&&(n=n.append(this.match.fillBefore(Te.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&&!uO.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}}class G8{constructor(t,n,o){this.parser=t,this.options=n,this.isOpen=o,this.open=0;let r=n.topNode,s,i=K8(null,n.preserveWhitespace,0)|(o?Kf:0);r?s=new _m(r.type,r.attrs,Vt.none,!0,n.topMatch||r.type.contentMatch,i):o?s=new _m(null,null,Vt.none,!0,null,i):s=new _m(t.schema.topNodeType,null,Vt.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&Fg||r.inlineContext(t)||/[^ \t\r\n\u000c]/.test(o)){if(r.options&Rg)r.options&Fg?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;dO.hasOwnProperty(r)&&this.parser.normalizeLists&&zhe(t);let i=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(s=this.parser.matchTag(t,this,o));if(i?i.ignore:Vhe.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,c=this.needsBlock;if(uO.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 u=i&&i.skip?n:this.readStyles(t,n);u&&this.addAll(t,u),l&&this.sync(a),this.needsBlock=c}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(c=>!a.clearMark(c)):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=Vt.none;for(let i of o.concat(t.marks))(r.type?r.type.allowsMarkType(i.type):J8(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=K8(t,s,i.options);i.options&Kf&&i.content.length==0&&(l|=Kf);let a=Vt.none;return o=o.filter(c=>(i.type?i.type.allowsMarkType(c.type):J8(c.type,t))?(a=c.addToSet(a),!1):!0),this.nodes.push(new _m(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 c=n[l];if(c==""){if(l==n.length-1||l==0)continue;for(;a>=s;a--)if(i(l-1,a))return!0;return!1}else{let u=a>0||a==0&&r?this.nodes[a].type:o&&a>=s?o.node(a-s).type:null;if(!u||u.name!=c&&u.groups.indexOf(c)==-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 zhe(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let o=t.nodeType==1?t.nodeName.toLowerCase():null;o&&dO.hasOwnProperty(o)&&n?(n.appendChild(t),t=n):o=="li"?n=t:o&&(n=null)}}function jhe(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function Y8(e){let t={};for(let n in e)t[n]=e[n];return t}function J8(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:c,next:u}=l.edge(a);if(c==t||s.indexOf(u)<0&&i(u))return!0}};if(i(r.contentMatch))return!0}}class Wl{constructor(t,n){this.nodes=t,this.marks=n}serializeFragment(t,n={},o){o||(o=uv(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 c=i.marks[a];if(!this.marks[c.type.name]){a++;continue}if(!c.eq(s[l][0])||c.type.spec.spanning===!1)break;l++,a++}for(;l<s.length;)r=s.pop()[1];for(;a<i.marks.length;){let c=i.marks[a++],u=this.serializeMark(c,i.isInline,n);u&&(s.push([c,r]),r.appendChild(u.dom),r=u.contentDOM||u.dom)}}r.appendChild(this.serializeNodeInner(i,n))}),o}serializeNodeInner(t,n){let{dom:o,contentDOM:r}=l1(uv(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&&l1(uv(o),r(t,n),null,t.attrs)}static renderSpec(t,n,o=null,r){return l1(t,n,o,r)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new Wl(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let n=Z8(t.nodes);return n.text||(n.text=o=>o.text),n}static marksFromSchema(t){return Z8(t.marks)}}function Z8(e){let t={};for(let n in e){let o=e[n].spec.toDOM;o&&(t[n]=o)}return t}function uv(e){return e.document||window.document}const X8=new WeakMap;function Hhe(e){let t=X8.get(e);return t===void 0&&X8.set(e,t=Uhe(e)),t}function Uhe(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 l1(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=Hhe(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),c=t[1],u=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){u=2;for(let d in c)if(c[d]!=null){let f=d.indexOf(" ");f>0?a.setAttributeNS(d.slice(0,f),d.slice(f+1),c[d]):a.setAttribute(d,c[d])}}for(let d=u;d<t.length;d++){let f=t[d];if(f===0){if(d<t.length-1||d>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}else{let{dom:h,contentDOM:p}=l1(e,f,n,o);if(a.appendChild(h),p){if(l)throw new RangeError("Multiple content holes");l=p}}}return{dom:a,contentDOM:l}}const Whe={};function z3(e,t){const n=t||Whe,o=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,r=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return fO(e,o,r)}function fO(e,t,n){if(qhe(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 Q8(e.children,t,n)}return Array.isArray(e)?Q8(e,t,n):""}function Q8(e,t,n){const o=[];let r=-1;for(;++r<e.length;)o[r]=fO(e[r],t,n);return o.join("")}function qhe(e){return!!(e&&typeof e=="object")}const eS=document.createElement("i");function j3(e){const t="&"+e+";";eS.innerHTML=t;const n=eS.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Mr(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 yr(e,t){return e.length>0?(Mr(e,e.length,0,t),e):t}const tS={}.hasOwnProperty;function hO(e){const t={};let n=-1;for(;++n<e.length;)Khe(t,e[n]);return t}function Khe(e,t){let n;for(n in t){const r=(tS.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let i;if(s)for(i in s){tS.call(r,i)||(r[i]=[]);const l=s[i];Ghe(r[i],Array.isArray(l)?l:l?[l]:[])}}}function Ghe(e,t){let n=-1;const o=[];for(;++n<t.length;)(t[n].add==="after"?e:o).push(t[n]);Mr(e,0,0,o)}function pO(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 Xr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const yo=ql(/[A-Za-z]/),Lo=ql(/[\dA-Za-z]/),Yhe=ql(/[#-'*+\--9=?A-Z^-~]/);function Dg(e){return e!==null&&(e<32||e===127)}const $2=ql(/\d/),Jhe=ql(/[\dA-Fa-f]/),Zhe=ql(/[!-/:-@[-`{-~]/);function st(e){return e!==null&&e<-2}function Gt(e){return e!==null&&(e<0||e===32)}function Tt(e){return e===-2||e===-1||e===32}const K0=ql(/\p{P}|\p{S}/u),sc=ql(/\s/);function ql(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Nt(e,t,n,o){const r=o?o-1:Number.POSITIVE_INFINITY;let s=0;return i;function i(a){return Tt(a)?(e.enter(n),l(a)):t(a)}function l(a){return Tt(a)&&s++<r?(e.consume(a),l):(e.exit(n),t(a))}}const Xhe={tokenize:Qhe};function Qhe(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"),Nt(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 st(l)?(e.consume(l),e.exit("chunkText"),s):(e.consume(l),i)}}const epe={tokenize:tpe},nS={tokenize:npe};function tpe(e){const t=this,n=[];let o=0,r,s,i;return l;function l(w){if(o<n.length){const C=n[o];return t.containerState=C[1],e.attempt(C[0].continuation,a,c)(w)}return c(w)}function a(w){if(o++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&E();const C=t.events.length;let T=C,$;for(;T--;)if(t.events[T][0]==="exit"&&t.events[T][1].type==="chunkFlow"){$=t.events[T][1].end;break}y(o);let A=C;for(;A<t.events.length;)t.events[A][1].end=Object.assign({},$),A++;return Mr(t.events,T+1,0,t.events.slice(C)),t.events.length=A,c(w)}return l(w)}function c(w){if(o===n.length){if(!r)return f(w);if(r.currentConstruct&&r.currentConstruct.concrete)return p(w);t.interrupt=!!(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(nS,u,d)(w)}function u(w){return r&&E(),y(o),f(w)}function d(w){return t.parser.lazy[t.now().line]=o!==n.length,i=t.now().offset,p(w)}function f(w){return t.containerState={},e.attempt(nS,h,p)(w)}function h(w){return o++,n.push([t.currentConstruct,t.containerState]),f(w)}function p(w){if(w===null){r&&E(),y(0),e.consume(w);return}return r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:s,_tokenizer:r}),m(w)}function m(w){if(w===null){v(e.exit("chunkFlow"),!0),y(0),e.consume(w);return}return st(w)?(e.consume(w),v(e.exit("chunkFlow")),o=0,t.interrupt=void 0,l):(e.consume(w),m)}function v(w,C){const T=t.sliceStream(w);if(C&&T.push(null),w.previous=s,s&&(s.next=w),s=w,r.defineSkip(w.start),r.write(T),t.parser.lazy[w.start.line]){let $=r.events.length;for(;$--;)if(r.events[$][1].start.offset<i&&(!r.events[$][1].end||r.events[$][1].end.offset>i))return;const A=t.events.length;let N=A,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(y(o),$=A;$<t.events.length;)t.events[$][1].end=Object.assign({},I),$++;Mr(t.events,N+1,0,t.events.slice(A)),t.events.length=$}}function y(w){let C=n.length;for(;C-- >w;){const T=n[C];t.containerState=T[1],T[0].exit.call(t,e)}n.length=w}function E(){r.write([null]),s=void 0,r=void 0,t.containerState._closeFlow=void 0}}function npe(e,t,n){return Nt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Bg(e){if(e===null||Gt(e)||sc(e))return 1;if(K0(e))return 2}function G0(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 E2={name:"attention",tokenize:rpe,resolveAll:ope};function ope(e,t){let n=-1,o,r,s,i,l,a,c,u;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);oS(d,-a),oS(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),c=[],e[o][1].end.offset-e[o][1].start.offset&&(c=yr(c,[["enter",e[o][1],t],["exit",e[o][1],t]])),c=yr(c,[["enter",r,t],["enter",i,t],["exit",i,t],["enter",s,t]]),c=yr(c,G0(t.parser.constructs.insideSpan.null,e.slice(o+1,n),t)),c=yr(c,[["exit",s,t],["enter",l,t],["exit",l,t],["exit",r,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,c=yr(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):u=0,Mr(e,o-1,n-o+3,c),n=o+c.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function rpe(e,t){const n=this.parser.constructs.attentionMarkers.null,o=this.previous,r=Bg(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 c=e.exit("attentionSequence"),u=Bg(a),d=!u||u===2&&r||n.includes(a),f=!r||r===2&&u||n.includes(o);return c._open=!!(s===42?d:d&&(r||!f)),c._close=!!(s===42?f:f&&(u||!d)),t(a)}}function oS(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const spe={name:"autolink",tokenize:ipe};function ipe(e,t,n){let o=0;return r;function r(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(h){return yo(h)?(e.consume(h),i):h===64?n(h):c(h)}function i(h){return h===43||h===45||h===46||Lo(h)?(o=1,l(h)):c(h)}function l(h){return h===58?(e.consume(h),o=0,a):(h===43||h===45||h===46||Lo(h))&&o++<32?(e.consume(h),l):(o=0,c(h))}function a(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||Dg(h)?n(h):(e.consume(h),a)}function c(h){return h===64?(e.consume(h),u):Yhe(h)?(e.consume(h),c):n(h)}function u(h){return Lo(h)?d(h):n(h)}function d(h){return h===46?(e.consume(h),o=0,u):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):f(h)}function f(h){if((h===45||Lo(h))&&o++<63){const p=h===45?f:d;return e.consume(h),p}return n(h)}}const wp={tokenize:lpe,partial:!0};function lpe(e,t,n){return o;function o(s){return Tt(s)?Nt(e,r,"linePrefix")(s):r(s)}function r(s){return s===null||st(s)?t(s):n(s)}}const mO={name:"blockQuote",tokenize:ape,continuation:{tokenize:cpe},exit:upe};function ape(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 Tt(i)?(e.enter("blockQuotePrefixWhitespace"),e.consume(i),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(i))}}function cpe(e,t,n){const o=this;return r;function r(i){return Tt(i)?Nt(e,s,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i):s(i)}function s(i){return e.attempt(mO,t,n)(i)}}function upe(e){e.exit("blockQuote")}const gO={name:"characterEscape",tokenize:dpe};function dpe(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 Zhe(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const _O={name:"characterReference",tokenize:fpe};function fpe(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"),c):(e.enter("characterReferenceValue"),s=31,i=Lo,u(d))}function c(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,i=Jhe,u):(e.enter("characterReferenceValue"),s=7,i=$2,u(d))}function u(d){if(d===59&&r){const f=e.exit("characterReferenceValue");return i===Lo&&!j3(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),u):n(d)}}const rS={tokenize:ppe,partial:!0},sS={name:"codeFenced",tokenize:hpe,concrete:!0};function hpe(e,t,n){const o=this,r={tokenize:T,partial:!0};let s=0,i=0,l;return a;function a($){return c($)}function c($){const A=o.events[o.events.length-1];return s=A&&A[1].type==="linePrefix"?A[2].sliceSerialize(A[1],!0).length:0,l=$,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u($)}function u($){return $===l?(i++,e.consume($),u):i<3?n($):(e.exit("codeFencedFenceSequence"),Tt($)?Nt(e,d,"whitespace")($):d($))}function d($){return $===null||st($)?(e.exit("codeFencedFence"),o.interrupt?t($):e.check(rS,m,C)($)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f($))}function f($){return $===null||st($)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d($)):Tt($)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Nt(e,h,"whitespace")($)):$===96&&$===l?n($):(e.consume($),f)}function h($){return $===null||st($)?d($):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p($))}function p($){return $===null||st($)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d($)):$===96&&$===l?n($):(e.consume($),p)}function m($){return e.attempt(r,C,v)($)}function v($){return e.enter("lineEnding"),e.consume($),e.exit("lineEnding"),y}function y($){return s>0&&Tt($)?Nt(e,E,"linePrefix",s+1)($):E($)}function E($){return $===null||st($)?e.check(rS,m,C)($):(e.enter("codeFlowValue"),w($))}function w($){return $===null||st($)?(e.exit("codeFlowValue"),E($)):(e.consume($),w)}function C($){return e.exit("codeFenced"),t($)}function T($,A,N){let P=0;return I;function I(oe){return $.enter("lineEnding"),$.consume(oe),$.exit("lineEnding"),D}function D(oe){return $.enter("codeFencedFence"),Tt(oe)?Nt($,V,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(oe):V(oe)}function V(oe){return oe===l?($.enter("codeFencedFenceSequence"),G(oe)):N(oe)}function G(oe){return oe===l?(P++,$.consume(oe),G):P>=i?($.exit("codeFencedFenceSequence"),Tt(oe)?Nt($,te,"whitespace")(oe):te(oe)):N(oe)}function te(oe){return oe===null||st(oe)?($.exit("codeFencedFence"),A(oe)):N(oe)}}}function ppe(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 dv={name:"codeIndented",tokenize:gpe},mpe={tokenize:_pe,partial:!0};function gpe(e,t,n){const o=this;return r;function r(c){return e.enter("codeIndented"),Nt(e,s,"linePrefix",4+1)(c)}function s(c){const u=o.events[o.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?i(c):n(c)}function i(c){return c===null?a(c):st(c)?e.attempt(mpe,i,a)(c):(e.enter("codeFlowValue"),l(c))}function l(c){return c===null||st(c)?(e.exit("codeFlowValue"),i(c)):(e.consume(c),l)}function a(c){return e.exit("codeIndented"),t(c)}}function _pe(e,t,n){const o=this;return r;function r(i){return o.parser.lazy[o.now().line]?n(i):st(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),r):Nt(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):st(i)?r(i):n(i)}}const vpe={name:"codeText",tokenize:wpe,resolve:ype,previous:bpe};function ype(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 bpe(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function wpe(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,u(d)):st(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),a):(e.enter("codeTextData"),c(d))}function c(d){return d===null||d===32||d===96||st(d)?(e.exit("codeTextData"),a(d)):(e.consume(d),c)}function u(d){return d===96?(e.consume(d),r++,u):r===o?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(s.type="codeTextData",c(d))}}class kpe{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&&Hd(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),Hd(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Hd(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);Hd(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Hd(this.left,n.reverse())}}}function Hd(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 vO(e){const t={};let n=-1,o,r,s,i,l,a,c;const u=new kpe(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(o=u.get(n),n&&o[1].type==="chunkFlow"&&u.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,Cpe(u,n)),n=t[n],c=!0);else if(o[1]._container){for(s=n,r=void 0;s--&&(i=u.get(s),i[1].type==="lineEnding"||i[1].type==="lineEndingBlank");)i[0]==="enter"&&(r&&(u.get(r)[1].type="lineEndingBlank"),i[1].type="lineEnding",r=s);r&&(o[1].end=Object.assign({},u.get(r)[1].start),l=u.slice(r,n),l.unshift(o),u.splice(r,n-r+1,l))}}return Mr(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!c}function Cpe(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=[],c={};let u,d,f=-1,h=n,p=0,m=0;const v=[m];for(;h;){for(;e.get(++r)[1]!==h;);s.push(r),h._tokenizer||(u=o.sliceStream(h),h.next||u.push(null),d&&i.defineSkip(h.start),h._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=!0),i.write(u),h._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=void 0)),d=h,h=h.next}for(h=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,v.push(m),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(i.events=[],h?(h._tokenizer=void 0,h.previous=void 0):v.pop(),f=v.length;f--;){const y=l.slice(v[f],v[f+1]),E=s.pop();a.push([E,E+y.length-1]),e.splice(E,2,y)}for(a.reverse(),f=-1;++f<a.length;)c[p+a[f][0]]=p+a[f][1],p+=a[f][1]-a[f][0]-1;return c}const Spe={tokenize:xpe,resolve:Epe},$pe={tokenize:Tpe,partial:!0};function Epe(e){return vO(e),e}function xpe(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):st(l)?e.check($pe,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 Tpe(e,t,n){const o=this;return r;function r(i){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),Nt(e,s,"linePrefix")}function s(i){if(i===null||st(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 yO(e,t,n,o,r,s,i,l,a){const c=a||Number.POSITIVE_INFINITY;let u=0;return d;function d(y){return y===60?(e.enter(o),e.enter(r),e.enter(s),e.consume(y),e.exit(s),f):y===null||y===32||y===41||Dg(y)?n(y):(e.enter(o),e.enter(i),e.enter(l),e.enter("chunkString",{contentType:"string"}),m(y))}function f(y){return y===62?(e.enter(s),e.consume(y),e.exit(s),e.exit(r),e.exit(o),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),h(y))}function h(y){return y===62?(e.exit("chunkString"),e.exit(l),f(y)):y===null||y===60||st(y)?n(y):(e.consume(y),y===92?p:h)}function p(y){return y===60||y===62||y===92?(e.consume(y),h):h(y)}function m(y){return!u&&(y===null||y===41||Gt(y))?(e.exit("chunkString"),e.exit(l),e.exit(i),e.exit(o),t(y)):u<c&&y===40?(e.consume(y),u++,m):y===41?(e.consume(y),u--,m):y===null||y===32||y===40||Dg(y)?n(y):(e.consume(y),y===92?v:m)}function v(y){return y===40||y===41||y===92?(e.consume(y),m):m(y)}}function bO(e,t,n,o,r,s){const i=this;let l=0,a;return c;function c(h){return e.enter(o),e.enter(r),e.consume(h),e.exit(r),e.enter(s),u}function u(h){return l>999||h===null||h===91||h===93&&!a||h===94&&!l&&"_hiddenFootnoteSupport"in i.parser.constructs?n(h):h===93?(e.exit(s),e.enter(r),e.consume(h),e.exit(r),e.exit(o),t):st(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),d(h))}function d(h){return h===null||h===91||h===93||st(h)||l++>999?(e.exit("chunkString"),u(h)):(e.consume(h),a||(a=!Tt(h)),h===92?f:d)}function f(h){return h===91||h===92||h===93?(e.consume(h),l++,d):d(h)}}function wO(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),c(f))}function c(f){return f===i?(e.exit(s),a(i)):f===null?n(f):st(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Nt(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(f))}function u(f){return f===i||f===null||st(f)?(e.exit("chunkString"),c(f)):(e.consume(f),f===92?d:u)}function d(f){return f===i||f===92?(e.consume(f),u):u(f)}}function Gf(e,t){let n;return o;function o(r){return st(r)?(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),n=!0,o):Tt(r)?Nt(e,o,n?"linePrefix":"lineSuffix")(r):t(r)}}const Mpe={name:"definition",tokenize:Ope},Ape={tokenize:Ipe,partial:!0};function Ope(e,t,n){const o=this;let r;return s;function s(h){return e.enter("definition"),i(h)}function i(h){return bO.call(o,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function l(h){return r=Xr(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),a):n(h)}function a(h){return Gt(h)?Gf(e,c)(h):c(h)}function c(h){return yO(e,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function u(h){return e.attempt(Ape,d,d)(h)}function d(h){return Tt(h)?Nt(e,f,"whitespace")(h):f(h)}function f(h){return h===null||st(h)?(e.exit("definition"),o.parser.defined.push(r),t(h)):n(h)}}function Ipe(e,t,n){return o;function o(l){return Gt(l)?Gf(e,r)(l):n(l)}function r(l){return wO(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function s(l){return Tt(l)?Nt(e,i,"whitespace")(l):i(l)}function i(l){return l===null||st(l)?t(l):n(l)}}const Npe={name:"hardBreakEscape",tokenize:Ppe};function Ppe(e,t,n){return o;function o(s){return e.enter("hardBreakEscape"),e.consume(s),r}function r(s){return st(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const Lpe={name:"headingAtx",tokenize:Fpe,resolve:Rpe};function Rpe(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"},Mr(e,o,n-o+1,[["enter",r,t],["enter",s,t],["exit",s,t],["exit",r,t]])),e}function Fpe(e,t,n){let o=0;return r;function r(u){return e.enter("atxHeading"),s(u)}function s(u){return e.enter("atxHeadingSequence"),i(u)}function i(u){return u===35&&o++<6?(e.consume(u),i):u===null||Gt(u)?(e.exit("atxHeadingSequence"),l(u)):n(u)}function l(u){return u===35?(e.enter("atxHeadingSequence"),a(u)):u===null||st(u)?(e.exit("atxHeading"),t(u)):Tt(u)?Nt(e,l,"whitespace")(u):(e.enter("atxHeadingText"),c(u))}function a(u){return u===35?(e.consume(u),a):(e.exit("atxHeadingSequence"),l(u))}function c(u){return u===null||u===35||Gt(u)?(e.exit("atxHeadingText"),l(u)):(e.consume(u),c)}}const Dpe=["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"],iS=["pre","script","style","textarea"],Bpe={name:"htmlFlow",tokenize:Hpe,resolveTo:jpe,concrete:!0},Vpe={tokenize:Wpe,partial:!0},zpe={tokenize:Upe,partial:!0};function jpe(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 Hpe(e,t,n){const o=this;let r,s,i,l,a;return c;function c(U){return u(U)}function u(U){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(U),d}function d(U){return U===33?(e.consume(U),f):U===47?(e.consume(U),s=!0,m):U===63?(e.consume(U),r=3,o.interrupt?t:R):yo(U)?(e.consume(U),i=String.fromCharCode(U),v):n(U)}function f(U){return U===45?(e.consume(U),r=2,h):U===91?(e.consume(U),r=5,l=0,p):yo(U)?(e.consume(U),r=4,o.interrupt?t:R):n(U)}function h(U){return U===45?(e.consume(U),o.interrupt?t:R):n(U)}function p(U){const xe="CDATA[";return U===xe.charCodeAt(l++)?(e.consume(U),l===xe.length?o.interrupt?t:V:p):n(U)}function m(U){return yo(U)?(e.consume(U),i=String.fromCharCode(U),v):n(U)}function v(U){if(U===null||U===47||U===62||Gt(U)){const xe=U===47,Ye=i.toLowerCase();return!xe&&!s&&iS.includes(Ye)?(r=1,o.interrupt?t(U):V(U)):Dpe.includes(i.toLowerCase())?(r=6,xe?(e.consume(U),y):o.interrupt?t(U):V(U)):(r=7,o.interrupt&&!o.parser.lazy[o.now().line]?n(U):s?E(U):w(U))}return U===45||Lo(U)?(e.consume(U),i+=String.fromCharCode(U),v):n(U)}function y(U){return U===62?(e.consume(U),o.interrupt?t:V):n(U)}function E(U){return Tt(U)?(e.consume(U),E):I(U)}function w(U){return U===47?(e.consume(U),I):U===58||U===95||yo(U)?(e.consume(U),C):Tt(U)?(e.consume(U),w):I(U)}function C(U){return U===45||U===46||U===58||U===95||Lo(U)?(e.consume(U),C):T(U)}function T(U){return U===61?(e.consume(U),$):Tt(U)?(e.consume(U),T):w(U)}function $(U){return U===null||U===60||U===61||U===62||U===96?n(U):U===34||U===39?(e.consume(U),a=U,A):Tt(U)?(e.consume(U),$):N(U)}function A(U){return U===a?(e.consume(U),a=null,P):U===null||st(U)?n(U):(e.consume(U),A)}function N(U){return U===null||U===34||U===39||U===47||U===60||U===61||U===62||U===96||Gt(U)?T(U):(e.consume(U),N)}function P(U){return U===47||U===62||Tt(U)?w(U):n(U)}function I(U){return U===62?(e.consume(U),D):n(U)}function D(U){return U===null||st(U)?V(U):Tt(U)?(e.consume(U),D):n(U)}function V(U){return U===45&&r===2?(e.consume(U),J):U===60&&r===1?(e.consume(U),q):U===62&&r===4?(e.consume(U),ye):U===63&&r===3?(e.consume(U),R):U===93&&r===5?(e.consume(U),ee):st(U)&&(r===6||r===7)?(e.exit("htmlFlowData"),e.check(Vpe,Ce,G)(U)):U===null||st(U)?(e.exit("htmlFlowData"),G(U)):(e.consume(U),V)}function G(U){return e.check(zpe,te,Ce)(U)}function te(U){return e.enter("lineEnding"),e.consume(U),e.exit("lineEnding"),oe}function oe(U){return U===null||st(U)?G(U):(e.enter("htmlFlowData"),V(U))}function J(U){return U===45?(e.consume(U),R):V(U)}function q(U){return U===47?(e.consume(U),i="",X):V(U)}function X(U){if(U===62){const xe=i.toLowerCase();return iS.includes(xe)?(e.consume(U),ye):V(U)}return yo(U)&&i.length<8?(e.consume(U),i+=String.fromCharCode(U),X):V(U)}function ee(U){return U===93?(e.consume(U),R):V(U)}function R(U){return U===62?(e.consume(U),ye):U===45&&r===2?(e.consume(U),R):V(U)}function ye(U){return U===null||st(U)?(e.exit("htmlFlowData"),Ce(U)):(e.consume(U),ye)}function Ce(U){return e.exit("htmlFlow"),t(U)}}function Upe(e,t,n){const o=this;return r;function r(i){return st(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 Wpe(e,t,n){return o;function o(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(wp,t,n)}}const qpe={name:"htmlText",tokenize:Kpe};function Kpe(e,t,n){const o=this;let r,s,i;return l;function l(R){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(R),a}function a(R){return R===33?(e.consume(R),c):R===47?(e.consume(R),T):R===63?(e.consume(R),w):yo(R)?(e.consume(R),N):n(R)}function c(R){return R===45?(e.consume(R),u):R===91?(e.consume(R),s=0,p):yo(R)?(e.consume(R),E):n(R)}function u(R){return R===45?(e.consume(R),h):n(R)}function d(R){return R===null?n(R):R===45?(e.consume(R),f):st(R)?(i=d,q(R)):(e.consume(R),d)}function f(R){return R===45?(e.consume(R),h):d(R)}function h(R){return R===62?J(R):R===45?f(R):d(R)}function p(R){const ye="CDATA[";return R===ye.charCodeAt(s++)?(e.consume(R),s===ye.length?m:p):n(R)}function m(R){return R===null?n(R):R===93?(e.consume(R),v):st(R)?(i=m,q(R)):(e.consume(R),m)}function v(R){return R===93?(e.consume(R),y):m(R)}function y(R){return R===62?J(R):R===93?(e.consume(R),y):m(R)}function E(R){return R===null||R===62?J(R):st(R)?(i=E,q(R)):(e.consume(R),E)}function w(R){return R===null?n(R):R===63?(e.consume(R),C):st(R)?(i=w,q(R)):(e.consume(R),w)}function C(R){return R===62?J(R):w(R)}function T(R){return yo(R)?(e.consume(R),$):n(R)}function $(R){return R===45||Lo(R)?(e.consume(R),$):A(R)}function A(R){return st(R)?(i=A,q(R)):Tt(R)?(e.consume(R),A):J(R)}function N(R){return R===45||Lo(R)?(e.consume(R),N):R===47||R===62||Gt(R)?P(R):n(R)}function P(R){return R===47?(e.consume(R),J):R===58||R===95||yo(R)?(e.consume(R),I):st(R)?(i=P,q(R)):Tt(R)?(e.consume(R),P):J(R)}function I(R){return R===45||R===46||R===58||R===95||Lo(R)?(e.consume(R),I):D(R)}function D(R){return R===61?(e.consume(R),V):st(R)?(i=D,q(R)):Tt(R)?(e.consume(R),D):P(R)}function V(R){return R===null||R===60||R===61||R===62||R===96?n(R):R===34||R===39?(e.consume(R),r=R,G):st(R)?(i=V,q(R)):Tt(R)?(e.consume(R),V):(e.consume(R),te)}function G(R){return R===r?(e.consume(R),r=void 0,oe):R===null?n(R):st(R)?(i=G,q(R)):(e.consume(R),G)}function te(R){return R===null||R===34||R===39||R===60||R===61||R===96?n(R):R===47||R===62||Gt(R)?P(R):(e.consume(R),te)}function oe(R){return R===47||R===62||Gt(R)?P(R):n(R)}function J(R){return R===62?(e.consume(R),e.exit("htmlTextData"),e.exit("htmlText"),t):n(R)}function q(R){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),X}function X(R){return Tt(R)?Nt(e,ee,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):ee(R)}function ee(R){return e.enter("htmlTextData"),i(R)}}const H3={name:"labelEnd",tokenize:Qpe,resolveTo:Xpe,resolveAll:Zpe},Gpe={tokenize:eme},Ype={tokenize:tme},Jpe={tokenize:nme};function Zpe(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 Xpe(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)},c={type:"label",start:Object.assign({},e[s][1].start),end:Object.assign({},e[i][1].end)},u={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",c,t]],l=yr(l,e.slice(s+1,s+o+3)),l=yr(l,[["enter",u,t]]),l=yr(l,G0(t.parser.constructs.insideSpan.null,e.slice(s+o+4,i-3),t)),l=yr(l,[["exit",u,t],e[i-2],e[i-1],["exit",c,t]]),l=yr(l,e.slice(i+1)),l=yr(l,[["exit",a,t]]),Mr(e,s,e.length,l),e}function Qpe(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(Xr(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(Gpe,u,i?u:d)(f):f===91?e.attempt(Ype,u,i?c:d)(f):i?u(f):d(f)}function c(f){return e.attempt(Jpe,u,d)(f)}function u(f){return t(f)}function d(f){return s._balanced=!0,n(f)}}function eme(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 Gt(d)?Gf(e,s)(d):s(d)}function s(d){return d===41?u(d):yO(e,i,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function i(d){return Gt(d)?Gf(e,a)(d):u(d)}function l(d){return n(d)}function a(d){return d===34||d===39||d===40?wO(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):u(d)}function c(d){return Gt(d)?Gf(e,u)(d):u(d)}function u(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function tme(e,t,n){const o=this;return r;function r(l){return bO.call(o,e,s,i,"reference","referenceMarker","referenceString")(l)}function s(l){return o.parser.defined.includes(Xr(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function i(l){return n(l)}}function nme(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 ome={name:"labelStartImage",tokenize:rme,resolveAll:H3.resolveAll};function rme(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 sme={name:"labelStartLink",tokenize:ime,resolveAll:H3.resolveAll};function ime(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 fv={name:"lineEnding",tokenize:lme};function lme(e,t){return n;function n(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Nt(e,t,"linePrefix")}}const a1={name:"thematicBreak",tokenize:ame};function ame(e,t,n){let o=0,r;return s;function s(c){return e.enter("thematicBreak"),i(c)}function i(c){return r=c,l(c)}function l(c){return c===r?(e.enter("thematicBreakSequence"),a(c)):o>=3&&(c===null||st(c))?(e.exit("thematicBreak"),t(c)):n(c)}function a(c){return c===r?(e.consume(c),o++,a):(e.exit("thematicBreakSequence"),Tt(c)?Nt(e,l,"whitespace")(c):l(c))}}const Mo={name:"list",tokenize:dme,continuation:{tokenize:fme},exit:pme},cme={tokenize:mme,partial:!0},ume={tokenize:hme,partial:!0};function dme(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(h){const p=o.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(p==="listUnordered"?!o.containerState.marker||h===o.containerState.marker:$2(h)){if(o.containerState.type||(o.containerState.type=p,e.enter(p,{_container:!0})),p==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(a1,n,c)(h):c(h);if(!o.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),a(h)}return n(h)}function a(h){return $2(h)&&++i<10?(e.consume(h),a):(!o.interrupt||i<2)&&(o.containerState.marker?h===o.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),c(h)):n(h)}function c(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),o.containerState.marker=o.containerState.marker||h,e.check(wp,o.interrupt?n:u,e.attempt(cme,f,d))}function u(h){return o.containerState.initialBlankLine=!0,s++,f(h)}function d(h){return Tt(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),f):n(h)}function f(h){return o.containerState.size=s+o.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function fme(e,t,n){const o=this;return o.containerState._closeFlow=void 0,e.check(wp,r,s);function r(l){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,Nt(e,t,"listItemIndent",o.containerState.size+1)(l)}function s(l){return o.containerState.furtherBlankLines||!Tt(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(ume,t,i)(l))}function i(l){return o.containerState._closeFlow=!0,o.interrupt=void 0,Nt(e,e.attempt(Mo,t,n),"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function hme(e,t,n){const o=this;return Nt(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 pme(e){e.exit(this.containerState.type)}function mme(e,t,n){const o=this;return Nt(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!Tt(s)&&i&&i[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const lS={name:"setextUnderline",tokenize:_me,resolveTo:gme};function gme(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 _me(e,t,n){const o=this;let r;return s;function s(c){let u=o.events.length,d;for(;u--;)if(o.events[u][1].type!=="lineEnding"&&o.events[u][1].type!=="linePrefix"&&o.events[u][1].type!=="content"){d=o.events[u][1].type==="paragraph";break}return!o.parser.lazy[o.now().line]&&(o.interrupt||d)?(e.enter("setextHeadingLine"),r=c,i(c)):n(c)}function i(c){return e.enter("setextHeadingLineSequence"),l(c)}function l(c){return c===r?(e.consume(c),l):(e.exit("setextHeadingLineSequence"),Tt(c)?Nt(e,a,"lineSuffix")(c):a(c))}function a(c){return c===null||st(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const vme={tokenize:yme};function yme(e){const t=this,n=e.attempt(wp,o,e.attempt(this.parser.constructs.flowInitial,r,Nt(e,e.attempt(this.parser.constructs.flow,r,e.attempt(Spe,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 bme={resolveAll:CO()},wme=kO("string"),kme=kO("text");function kO(e){return{tokenize:t,resolveAll:CO(e==="text"?Cme:void 0)};function t(n){const o=this,r=this.parser.constructs[e],s=n.attempt(r,i,l);return i;function i(u){return c(u)?s(u):l(u)}function l(u){if(u===null){n.consume(u);return}return n.enter("data"),n.consume(u),a}function a(u){return c(u)?(n.exit("data"),s(u)):(n.consume(u),a)}function c(u){if(u===null)return!0;const d=r[u];let f=-1;if(d)for(;++f<d.length;){const h=d[f];if(!h.previous||h.previous.call(o,o.previous))return!0}return!1}}}function CO(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 Cme(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 c=r[s];if(typeof c=="string"){for(i=c.length;c.charCodeAt(i-1)===32;)l++,i--;if(i)break;i=-1}else if(c===-2)a=!0,l++;else if(c!==-1){s++;break}}if(l){const c={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({},c.start),o.start.offset===o.end.offset?Object.assign(o,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}function Sme(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:E,enter:w,exit:C,attempt:A(T),check:A($),interrupt:A($,{interrupt:!0})},c={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:h,sliceSerialize:f,now:p,defineSkip:m,write:d};let u=t.tokenize.call(c,a);return t.resolveAll&&s.push(t),c;function d(D){return i=yr(i,D),v(),i[i.length-1]!==null?[]:(N(t,0),c.events=G0(s,c.events,c),c.events)}function f(D,V){return Eme(h(D),V)}function h(D){return $me(i,D)}function p(){const{line:D,column:V,offset:G,_index:te,_bufferIndex:oe}=o;return{line:D,column:V,offset:G,_index:te,_bufferIndex:oe}}function m(D){r[D.line]=D.column,I()}function v(){let D;for(;o._index<i.length;){const V=i[o._index];if(typeof V=="string")for(D=o._index,o._bufferIndex<0&&(o._bufferIndex=0);o._index===D&&o._bufferIndex<V.length;)y(V.charCodeAt(o._bufferIndex));else y(V)}}function y(D){u=u(D)}function E(D){st(D)?(o.line++,o.column=1,o.offset+=D===-3?2:1,I()):D!==-1&&(o.column++,o.offset++),o._bufferIndex<0?o._index++:(o._bufferIndex++,o._bufferIndex===i[o._index].length&&(o._bufferIndex=-1,o._index++)),c.previous=D}function w(D,V){const G=V||{};return G.type=D,G.start=p(),c.events.push(["enter",G,c]),l.push(G),G}function C(D){const V=l.pop();return V.end=p(),c.events.push(["exit",V,c]),V}function T(D,V){N(D,V.from)}function $(D,V){V.restore()}function A(D,V){return G;function G(te,oe,J){let q,X,ee,R;return Array.isArray(te)?Ce(te):"tokenize"in te?Ce([te]):ye(te);function ye(Fe){return Z;function Z(ce){const pe=ce!==null&&Fe[ce],ie=ce!==null&&Fe.null,Le=[...Array.isArray(pe)?pe:pe?[pe]:[],...Array.isArray(ie)?ie:ie?[ie]:[]];return Ce(Le)(ce)}}function Ce(Fe){return q=Fe,X=0,Fe.length===0?J:U(Fe[X])}function U(Fe){return Z;function Z(ce){return R=P(),ee=Fe,Fe.partial||(c.currentConstruct=Fe),Fe.name&&c.parser.constructs.disable.null.includes(Fe.name)?Ye():Fe.tokenize.call(V?Object.assign(Object.create(c),V):c,a,xe,Ye)(ce)}}function xe(Fe){return D(ee,R),oe}function Ye(Fe){return R.restore(),++X<q.length?U(q[X]):J}}}function N(D,V){D.resolveAll&&!s.includes(D)&&s.push(D),D.resolve&&Mr(c.events,V,c.events.length-V,D.resolve(c.events.slice(V),c)),D.resolveTo&&(c.events=D.resolveTo(c.events,c))}function P(){const D=p(),V=c.previous,G=c.currentConstruct,te=c.events.length,oe=Array.from(l);return{restore:J,from:te};function J(){o=D,c.previous=V,c.currentConstruct=G,c.events.length=te,l=oe,I()}}function I(){o.line in r&&o.column<2&&(o.column=r[o.line],o.offset+=r[o.line]-1)}}function $me(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 Eme(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 xme={42:Mo,43:Mo,45:Mo,48:Mo,49:Mo,50:Mo,51:Mo,52:Mo,53:Mo,54:Mo,55:Mo,56:Mo,57:Mo,62:mO},Tme={91:Mpe},Mme={[-2]:dv,[-1]:dv,32:dv},Ame={35:Lpe,42:a1,45:[lS,a1],60:Bpe,61:lS,95:a1,96:sS,126:sS},Ome={38:_O,92:gO},Ime={[-5]:fv,[-4]:fv,[-3]:fv,33:ome,38:_O,42:E2,60:[spe,qpe],91:sme,92:[Npe,gO],93:H3,95:E2,96:vpe},Nme={null:[E2,bme]},Pme={null:[42,95]},Lme={null:[]},Rme=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Pme,contentInitial:Tme,disable:Lme,document:xme,flow:Ame,flowInitial:Mme,insideSpan:Nme,string:Ome,text:Ime},Symbol.toStringTag,{value:"Module"}));function Fme(e){const n=hO([Rme,...(e||{}).extensions||[]]),o={defined:[],lazy:{},constructs:n,content:r(Xhe),document:r(epe),flow:r(vme),string:r(wme),text:r(kme)};return o;function r(s){return i;function i(l){return Sme(o,s,l)}}}function Dme(e){for(;!vO(e););return e}const aS=/[\0\t\n\r]/g;function Bme(){let e=1,t="",n=!0,o;return r;function r(s,i,l){const a=[];let c,u,d,f,h;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(aS.lastIndex=d,c=aS.exec(s),f=c&&c.index!==void 0?c.index:s.length,h=s.charCodeAt(f),!c){t=s.slice(d);break}if(h===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),h){case 0:{a.push(65533),e++;break}case 9:{for(u=Math.ceil(e/4)*4,a.push(-2);e++<u;)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 Vme=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function SO(e){return e.replace(Vme,zme)}function zme(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const r=n.charCodeAt(1),s=r===120||r===88;return pO(n.slice(s?2:1),s?16:10)}return j3(n)||e}function Yf(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?cS(e.position):"start"in e||"end"in e?cS(e):"line"in e||"column"in e?x2(e):""}function x2(e){return uS(e&&e.line)+":"+uS(e&&e.column)}function cS(e){return x2(e&&e.start)+"-"+x2(e&&e.end)}function uS(e){return e&&typeof e=="number"?e:1}const $O={}.hasOwnProperty;function jme(e,t,n){return typeof t!="string"&&(n=t,t=void 0),Hme(n)(Dme(Fme(n).document().write(Bme()(e,t,!0))))}function Hme(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Oe),autolinkProtocol:P,autolinkEmail:P,atxHeading:s(re),blockQuote:s(ie),characterEscape:P,characterReference:P,codeFenced:s(Le),codeFencedFenceInfo:i,codeFencedFenceMeta:i,codeIndented:s(Le,i),codeText:s(et,i),codeTextData:P,data:P,codeFlowValue:P,definition:s(j),definitionDestinationString:i,definitionLabelString:i,definitionTitleString:i,emphasis:s(W),hardBreakEscape:s(he),hardBreakTrailing:s(he),htmlFlow:s(de,i),htmlFlowData:P,htmlText:s(de,i),htmlTextData:P,image:s(Se),label:i,link:s(Oe),listItem:s($e),listItemValue:f,listOrdered:s(be,d),listUnordered:s(be),paragraph:s(ge),reference:U,referenceString:i,resourceDestinationString:i,resourceTitleString:i,setextHeading:s(re),strong:s(De),thematicBreak:s(se)},exit:{atxHeading:a(),atxHeadingSequence:T,autolink:a(),autolinkEmail:pe,autolinkProtocol:ce,blockQuote:a(),characterEscapeValue:I,characterReferenceMarkerHexadecimal:Ye,characterReferenceMarkerNumeric:Ye,characterReferenceValue:Fe,characterReference:Z,codeFenced:a(v),codeFencedFence:m,codeFencedFenceInfo:h,codeFencedFenceMeta:p,codeFlowValue:I,codeIndented:a(y),codeText:a(oe),codeTextData:I,data:I,definition:a(),definitionDestinationString:C,definitionLabelString:E,definitionTitleString:w,emphasis:a(),hardBreakEscape:a(V),hardBreakTrailing:a(V),htmlFlow:a(G),htmlFlowData:I,htmlText:a(te),htmlTextData:I,image:a(q),label:ee,labelText:X,lineEnding:D,link:a(J),listItem:a(),listOrdered:a(),listUnordered:a(),paragraph:a(),referenceString:xe,resourceDestinationString:R,resourceTitleString:ye,resource:Ce,setextHeading:a(N),setextHeadingLineSequence:A,setextHeadingText:$,strong:a(),thematicBreak:a()}};EO(t,(e||{}).mdastExtensions||[]);const n={};return o;function o(Y){let ae={type:"root",children:[]};const Ie={stack:[ae],tokenStack:[],config:t,enter:l,exit:c,buffer:i,resume:u,data:n},We=[];let _e=-1;for(;++_e<Y.length;)if(Y[_e][1].type==="listOrdered"||Y[_e][1].type==="listUnordered")if(Y[_e][0]==="enter")We.push(_e);else{const He=We.pop();_e=r(Y,He,_e)}for(_e=-1;++_e<Y.length;){const He=t[Y[_e][0]];$O.call(He,Y[_e][1].type)&&He[Y[_e][1].type].call(Object.assign({sliceSerialize:Y[_e][2].sliceSerialize},Ie),Y[_e][1])}if(Ie.tokenStack.length>0){const He=Ie.tokenStack[Ie.tokenStack.length-1];(He[1]||dS).call(Ie,void 0,He[0])}for(ae.position={start:ji(Y.length>0?Y[0][1].start:{line:1,column:1,offset:0}),end:ji(Y.length>0?Y[Y.length-2][1].end:{line:1,column:1,offset:0})},_e=-1;++_e<t.transforms.length;)ae=t.transforms[_e](ae)||ae;return ae}function r(Y,ae,Ie){let We=ae-1,_e=-1,He=!1,rt,Qe,yt,Kt;for(;++We<=Ie;){const gt=Y[We];switch(gt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{gt[0]==="enter"?_e++:_e--,Kt=void 0;break}case"lineEndingBlank":{gt[0]==="enter"&&(rt&&!Kt&&!_e&&!yt&&(yt=We),Kt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Kt=void 0}if(!_e&>[0]==="enter"&>[1].type==="listItemPrefix"||_e===-1&>[0]==="exit"&&(gt[1].type==="listUnordered"||gt[1].type==="listOrdered")){if(rt){let Jt=We;for(Qe=void 0;Jt--;){const an=Y[Jt];if(an[1].type==="lineEnding"||an[1].type==="lineEndingBlank"){if(an[0]==="exit")continue;Qe&&(Y[Qe][1].type="lineEndingBlank",He=!0),an[1].type="lineEnding",Qe=Jt}else if(!(an[1].type==="linePrefix"||an[1].type==="blockQuotePrefix"||an[1].type==="blockQuotePrefixWhitespace"||an[1].type==="blockQuoteMarker"||an[1].type==="listItemIndent"))break}yt&&(!Qe||yt<Qe)&&(rt._spread=!0),rt.end=Object.assign({},Qe?Y[Qe][1].start:gt[1].end),Y.splice(Qe||We,0,["exit",rt,gt[2]]),We++,Ie++}if(gt[1].type==="listItemPrefix"){const Jt={type:"listItem",_spread:!1,start:Object.assign({},gt[1].start),end:void 0};rt=Jt,Y.splice(We,0,["enter",Jt,gt[2]]),We++,Ie++,yt=void 0,Kt=!0}}}return Y[ae][1]._spread=He,Ie}function s(Y,ae){return Ie;function Ie(We){l.call(this,Y(We),We),ae&&ae.call(this,We)}}function i(){this.stack.push({type:"fragment",children:[]})}function l(Y,ae,Ie){this.stack[this.stack.length-1].children.push(Y),this.stack.push(Y),this.tokenStack.push([ae,Ie]),Y.position={start:ji(ae.start),end:void 0}}function a(Y){return ae;function ae(Ie){Y&&Y.call(this,Ie),c.call(this,Ie)}}function c(Y,ae){const Ie=this.stack.pop(),We=this.tokenStack.pop();if(We)We[0].type!==Y.type&&(ae?ae.call(this,Y,We[0]):(We[1]||dS).call(this,Y,We[0]));else throw new Error("Cannot close `"+Y.type+"` ("+Yf({start:Y.start,end:Y.end})+"): it’s not open");Ie.position.end=ji(Y.end)}function u(){return z3(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(Y){if(this.data.expectingFirstListItemValue){const ae=this.stack[this.stack.length-2];ae.start=Number.parseInt(this.sliceSerialize(Y),10),this.data.expectingFirstListItemValue=void 0}}function h(){const Y=this.resume(),ae=this.stack[this.stack.length-1];ae.lang=Y}function p(){const Y=this.resume(),ae=this.stack[this.stack.length-1];ae.meta=Y}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function v(){const Y=this.resume(),ae=this.stack[this.stack.length-1];ae.value=Y.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const Y=this.resume(),ae=this.stack[this.stack.length-1];ae.value=Y.replace(/(\r?\n|\r)$/g,"")}function E(Y){const ae=this.resume(),Ie=this.stack[this.stack.length-1];Ie.label=ae,Ie.identifier=Xr(this.sliceSerialize(Y)).toLowerCase()}function w(){const Y=this.resume(),ae=this.stack[this.stack.length-1];ae.title=Y}function C(){const Y=this.resume(),ae=this.stack[this.stack.length-1];ae.url=Y}function T(Y){const ae=this.stack[this.stack.length-1];if(!ae.depth){const Ie=this.sliceSerialize(Y).length;ae.depth=Ie}}function $(){this.data.setextHeadingSlurpLineEnding=!0}function A(Y){const ae=this.stack[this.stack.length-1];ae.depth=this.sliceSerialize(Y).codePointAt(0)===61?1:2}function N(){this.data.setextHeadingSlurpLineEnding=void 0}function P(Y){const Ie=this.stack[this.stack.length-1].children;let We=Ie[Ie.length-1];(!We||We.type!=="text")&&(We=Ke(),We.position={start:ji(Y.start),end:void 0},Ie.push(We)),this.stack.push(We)}function I(Y){const ae=this.stack.pop();ae.value+=this.sliceSerialize(Y),ae.position.end=ji(Y.end)}function D(Y){const ae=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ie=ae.children[ae.children.length-1];Ie.position.end=ji(Y.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ae.type)&&(P.call(this,Y),I.call(this,Y))}function V(){this.data.atHardBreak=!0}function G(){const Y=this.resume(),ae=this.stack[this.stack.length-1];ae.value=Y}function te(){const Y=this.resume(),ae=this.stack[this.stack.length-1];ae.value=Y}function oe(){const Y=this.resume(),ae=this.stack[this.stack.length-1];ae.value=Y}function J(){const Y=this.stack[this.stack.length-1];if(this.data.inReference){const ae=this.data.referenceType||"shortcut";Y.type+="Reference",Y.referenceType=ae,delete Y.url,delete Y.title}else delete Y.identifier,delete Y.label;this.data.referenceType=void 0}function q(){const Y=this.stack[this.stack.length-1];if(this.data.inReference){const ae=this.data.referenceType||"shortcut";Y.type+="Reference",Y.referenceType=ae,delete Y.url,delete Y.title}else delete Y.identifier,delete Y.label;this.data.referenceType=void 0}function X(Y){const ae=this.sliceSerialize(Y),Ie=this.stack[this.stack.length-2];Ie.label=SO(ae),Ie.identifier=Xr(ae).toLowerCase()}function ee(){const Y=this.stack[this.stack.length-1],ae=this.resume(),Ie=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ie.type==="link"){const We=Y.children;Ie.children=We}else Ie.alt=ae}function R(){const Y=this.resume(),ae=this.stack[this.stack.length-1];ae.url=Y}function ye(){const Y=this.resume(),ae=this.stack[this.stack.length-1];ae.title=Y}function Ce(){this.data.inReference=void 0}function U(){this.data.referenceType="collapsed"}function xe(Y){const ae=this.resume(),Ie=this.stack[this.stack.length-1];Ie.label=ae,Ie.identifier=Xr(this.sliceSerialize(Y)).toLowerCase(),this.data.referenceType="full"}function Ye(Y){this.data.characterReferenceType=Y.type}function Fe(Y){const ae=this.sliceSerialize(Y),Ie=this.data.characterReferenceType;let We;Ie?(We=pO(ae,Ie==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):We=j3(ae);const _e=this.stack[this.stack.length-1];_e.value+=We}function Z(Y){const ae=this.stack.pop();ae.position.end=ji(Y.end)}function ce(Y){I.call(this,Y);const ae=this.stack[this.stack.length-1];ae.url=this.sliceSerialize(Y)}function pe(Y){I.call(this,Y);const ae=this.stack[this.stack.length-1];ae.url="mailto:"+this.sliceSerialize(Y)}function ie(){return{type:"blockquote",children:[]}}function Le(){return{type:"code",lang:null,meta:null,value:""}}function et(){return{type:"inlineCode",value:""}}function j(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function W(){return{type:"emphasis",children:[]}}function re(){return{type:"heading",depth:0,children:[]}}function he(){return{type:"break"}}function de(){return{type:"html",value:""}}function Se(){return{type:"image",title:null,url:"",alt:null}}function Oe(){return{type:"link",title:null,url:"",children:[]}}function be(Y){return{type:"list",ordered:Y.type==="listOrdered",start:null,spread:Y._spread,children:[]}}function $e(Y){return{type:"listItem",spread:Y._spread,checked:null,children:[]}}function ge(){return{type:"paragraph",children:[]}}function De(){return{type:"strong",children:[]}}function Ke(){return{type:"text",value:""}}function se(){return{type:"thematicBreak"}}}function ji(e){return{line:e.line,column:e.column,offset:e.offset}}function EO(e,t){let n=-1;for(;++n<t.length;){const o=t[n];Array.isArray(o)?EO(e,o):Ume(e,o)}}function Ume(e,t){let n;for(n in t)if($O.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 dS(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Yf({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Yf({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Yf({start:t.start,end:t.end})+") is still open")}function T2(e){const t=this;t.parser=n;function n(o){return jme(o,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}const fS={}.hasOwnProperty;function Wme(e,t){const n=t||{};function o(r,...s){let i=o.invalid;const l=o.handlers;if(r&&fS.call(r,e)){const a=String(r[e]);i=fS.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 qme={}.hasOwnProperty;function xO(e,t){let n=-1,o;if(t.extensions)for(;++n<t.extensions.length;)xO(e,t.extensions[n]);for(o in t)if(qme.call(t,o))switch(o){case"extensions":break;case"unsafe":{hS(e[o],t[o]);break}case"join":{hS(e[o],t[o]);break}case"handlers":{Kme(e[o],t[o]);break}default:e.options[o]=t[o]}return e}function hS(e,t){t&&e.push(...t)}function Kme(e,t){t&&Object.assign(e,t)}function Gme(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()),Yme);return r(),i}function Yme(e,t,n){return">"+(n?"":" ")+e}function TO(e,t){return pS(e,t.inConstruct,!0)&&!pS(e,t.notInConstruct,!1)}function pS(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 mS(e,t,n,o){let r=-1;for(;++r<n.unsafe.length;)if(n.unsafe[r].character===` |
| 82 |
`&&TO(n.stack,n.unsafe[r]))return/[ \t]/.test(o.before)?"":" ";return`\\ |
| 83 |
`}function Jme(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 M2(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 Zme(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 Xme(e,t,n,o){const r=Zme(n),s=e.value||"",i=r==="`"?"GraveAccent":"Tilde";if(M2(e,n)){const d=n.enter("codeIndented"),f=n.indentLines(s,Qme);return d(),f}const l=n.createTracker(o),a=r.repeat(Math.max(Jme(s,r)+1,3)),c=n.enter("codeFenced");let u=l.move(a);if(e.lang){const d=n.enter(`codeFencedLang${i}`);u+=l.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...l.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${i}`);u+=l.move(" "),u+=l.move(n.safe(e.meta,{before:u,after:` |
| 84 |
`,encode:["`"],...l.current()})),d()}return u+=l.move(` |
| 85 |
`),s&&(u+=l.move(s+` |
| 86 |
`)),u+=l.move(a),c(),u}function Qme(e,t,n){return(n?"":" ")+e}function U3(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 e1e(e,t,n,o){const r=U3(n),s=r==='"'?"Quote":"Apostrophe",i=n.enter("definition");let l=n.enter("label");const a=n.createTracker(o);let c=a.move("[");return c+=a.move(n.safe(n.associationId(e),{before:c,after:"]",...a.current()})),c+=a.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(n.safe(e.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(l=n.enter("destinationRaw"),c+=a.move(n.safe(e.url,{before:c,after:e.title?" ":` |
| 87 |
`,...a.current()}))),l(),e.title&&(l=n.enter(`title${s}`),c+=a.move(" "+r),c+=a.move(n.safe(e.title,{before:c,after:r,...a.current()})),c+=a.move(r),l()),i(),c}function t1e(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}MO.peek=n1e;function MO(e,t,n,o){const r=t1e(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 n1e(e,t,n){return n.options.emphasis||"*"}const Y0=function(e){if(e==null)return i1e;if(typeof e=="function")return J0(e);if(typeof e=="object")return Array.isArray(e)?o1e(e):r1e(e);if(typeof e=="string")return s1e(e);throw new Error("Expected function, string, or object as test")};function o1e(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Y0(e[n]);return J0(o);function o(...r){let s=-1;for(;++s<t.length;)if(t[s].apply(this,r))return!0;return!1}}function r1e(e){const t=e;return J0(n);function n(o){const r=o;let s;for(s in e)if(r[s]!==t[s])return!1;return!0}}function s1e(e){return J0(t);function t(n){return n&&n.type===e}}function J0(e){return t;function t(n,o,r){return!!(l1e(n)&&e.call(this,n,typeof o=="number"?o:void 0,r||void 0))}}function i1e(){return!0}function l1e(e){return e!==null&&typeof e=="object"&&"type"in e}const AO=[],a1e=!0,A2=!1,O2="skip";function OO(e,t,n,o){let r;typeof t=="function"&&typeof n!="function"?(o=n,n=t):r=t;const s=Y0(r),i=o?-1:1;l(e,void 0,[])();function l(a,c,u){const d=a&&typeof a=="object"?a:{};if(typeof d.type=="string"){const h=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(a.type+(h?"<"+h+">":""))+")"})}return f;function f(){let h=AO,p,m,v;if((!t||s(a,c,u[u.length-1]||void 0))&&(h=c1e(n(a,u)),h[0]===A2))return h;if("children"in a&&a.children){const y=a;if(y.children&&h[0]!==O2)for(m=(o?y.children.length:-1)+i,v=u.concat(y);m>-1&&m<y.children.length;){const E=y.children[m];if(p=l(E,m,v)(),p[0]===A2)return p;m=typeof p[1]=="number"?p[1]:m+i}}return h}}}function c1e(e){return Array.isArray(e)?e:typeof e=="number"?[a1e,e]:e==null?AO:[e]}function _d(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),OO(e,s,l,r);function l(a,c){const u=c[c.length-1],d=u?u.children.indexOf(a):void 0;return i(a,d,u)}}function IO(e,t){let n=!1;return _d(e,function(o){if("value"in o&&/\r?\n|\r/.test(o.value)||o.type==="break")return n=!0,A2}),!!((!e.depth||e.depth<3)&&z3(e)&&(t.options.setext||n))}function u1e(e,t,n,o){const r=Math.max(Math.min(6,e.depth||1),1),s=n.createTracker(o);if(IO(e,n)){const u=n.enter("headingSetext"),d=n.enter("phrasing"),f=n.containerPhrasing(e,{...s.current(),before:` |
| 88 |
`,after:` |
| 89 |
`});return d(),u(),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 c=n.containerPhrasing(e,{before:"# ",after:` |
| 92 |
`,...s.current()});return/^[\t ]/.test(c)&&(c="&#x"+c.charCodeAt(0).toString(16).toUpperCase()+";"+c.slice(1)),c=c?i+" "+c:i,n.options.closeAtx&&(c+=" "+i),a(),l(),c}NO.peek=d1e;function NO(e){return e.value||""}function d1e(){return"<"}PO.peek=f1e;function PO(e,t,n,o){const r=U3(n),s=r==='"'?"Quote":"Apostrophe",i=n.enter("image");let l=n.enter("label");const a=n.createTracker(o);let c=a.move("![");return c+=a.move(n.safe(e.alt,{before:c,after:"]",...a.current()})),c+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(n.safe(e.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(l=n.enter("destinationRaw"),c+=a.move(n.safe(e.url,{before:c,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${s}`),c+=a.move(" "+r),c+=a.move(n.safe(e.title,{before:c,after:r,...a.current()})),c+=a.move(r),l()),c+=a.move(")"),i(),c}function f1e(){return"!"}LO.peek=h1e;function LO(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 c=n.safe(e.alt,{before:a,after:"]",...l.current()});a+=l.move(c+"]["),i();const u=n.stack;n.stack=[],i=n.enter("reference");const d=n.safe(n.associationId(e),{before:a,after:"]",...l.current()});return i(),n.stack=u,s(),r==="full"||!c||c!==d?a+=l.move(d+"]"):r==="shortcut"?a=a.slice(0,-1):a+=l.move("]"),a}function h1e(){return"!"}RO.peek=p1e;function RO(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 c=a.index;o.charCodeAt(c)===10&&o.charCodeAt(c-1)===13&&c--,o=o.slice(0,c)+" "+o.slice(a.index+1)}}return r+o+r}function p1e(){return"`"}function FO(e,t){const n=z3(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))}DO.peek=m1e;function DO(e,t,n,o){const r=U3(n),s=r==='"'?"Quote":"Apostrophe",i=n.createTracker(o);let l,a;if(FO(e,n)){const u=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=u,d}l=n.enter("link"),a=n.enter("label");let c=i.move("[");return c+=i.move(n.containerPhrasing(e,{before:c,after:"](",...i.current()})),c+=i.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),c+=i.move("<"),c+=i.move(n.safe(e.url,{before:c,after:">",...i.current()})),c+=i.move(">")):(a=n.enter("destinationRaw"),c+=i.move(n.safe(e.url,{before:c,after:e.title?" ":")",...i.current()}))),a(),e.title&&(a=n.enter(`title${s}`),c+=i.move(" "+r),c+=i.move(n.safe(e.title,{before:c,after:r,...i.current()})),c+=i.move(r),a()),c+=i.move(")"),l(),c}function m1e(e,t,n){return FO(e,n)?"<":"["}BO.peek=g1e;function BO(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 c=n.containerPhrasing(e,{before:a,after:"]",...l.current()});a+=l.move(c+"]["),i();const u=n.stack;n.stack=[],i=n.enter("reference");const d=n.safe(n.associationId(e),{before:a,after:"]",...l.current()});return i(),n.stack=u,s(),r==="full"||!c||c!==d?a+=l.move(d+"]"):r==="shortcut"?a=a.slice(0,-1):a+=l.move("]"),a}function g1e(){return"["}function W3(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 _1e(e){const t=W3(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 v1e(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 VO(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 y1e(e,t,n,o){const r=n.enter("list"),s=n.bulletCurrent;let i=e.ordered?v1e(n):W3(n);const l=e.ordered?i==="."?")":".":_1e(n);let a=t&&n.bulletLastUsed?i===n.bulletLastUsed:!1;if(!e.ordered){const u=e.children?e.children[0]:void 0;if((i==="*"||i==="-")&&u&&(!u.children||!u.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),VO(n)===i&&u){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 c=n.containerFlow(e,o);return n.bulletLastUsed=i,n.bulletCurrent=s,r(),c}function b1e(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 w1e(e,t,n,o){const r=b1e(n);let s=n.bulletCurrent||W3(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"),c=n.indentLines(n.containerFlow(e,l.current()),u);return a(),c;function u(d,f,h){return f?(h?"":" ".repeat(i))+d:(h?s:s+" ".repeat(i-s.length))+d}}function k1e(e,t,n,o){const r=n.enter("paragraph"),s=n.enter("phrasing"),i=n.containerPhrasing(e,o);return s(),r(),i}const C1e=Y0(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function S1e(e,t,n,o){return(e.children.some(function(i){return C1e(i)})?n.containerPhrasing:n.containerFlow).call(n,e,o)}function $1e(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}zO.peek=E1e;function zO(e,t,n,o){const r=$1e(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 E1e(e,t,n){return n.options.strong||"*"}function x1e(e,t,n,o){return n.safe(e.value,o)}function T1e(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 M1e(e,t,n){const o=(VO(n)+(n.options.ruleSpaces?" ":"")).repeat(T1e(n));return n.options.ruleSpaces?o.slice(0,-1):o}const q3={blockquote:Gme,break:mS,code:Xme,definition:e1e,emphasis:MO,hardBreak:mS,heading:u1e,html:NO,image:PO,imageReference:LO,inlineCode:RO,link:DO,linkReference:BO,list:y1e,listItem:w1e,paragraph:k1e,root:S1e,strong:zO,text:x1e,thematicBreak:M1e},A1e=[O1e];function O1e(e,t,n,o){if(t.type==="code"&&M2(t,o)&&(e.type==="list"||e.type===t.type&&M2(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"&&IO(t,o))?void 0:n.spread?1:0}const na=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],I1e=[{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:na},{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:na},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:`(?:[ \r |
| 95 |
*])`},{character:"*",inConstruct:"phrasing",notInConstruct:na},{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:na},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:na},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:na},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:na},{atBreak:!0,character:"~"}];function N1e(e){return e.label||!e.identifier?e.label||"":SO(e.identifier)}function P1e(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 L1e(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 c=r[i];let u;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),u=d?d(r[i+1],e,t,{before:"",after:"",...a.current()}).charAt(0):""}else u=n.after;s.length>0&&(l==="\r"||l===` |
| 99 |
`)&&c.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(c,e,t,{...a.current(),before:l,after:u}))),l=s[s.length-1].slice(-1)}return o.pop(),s.join("")}function R1e(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(F1e(a,r[l+1],e,t)))}return o.pop(),i.join("")}function F1e(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 D1e=/\r?\n|\r/g;function B1e(e,t){const n=[];let o=0,r=0,s;for(;s=D1e.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 V1e(e,t,n){const o=(n.before||"")+(t||"")+(n.after||""),r=[],s=[],i={};let l=-1;for(;++l<e.unsafe.length;){const u=e.unsafe[l];if(!TO(e.stack,u))continue;const d=e.compilePattern(u);let f;for(;f=d.exec(o);){const h="before"in u||!!u.atBreak,p="after"in u,m=f.index+(h?f[1].length:0);r.includes(m)?(i[m].before&&!h&&(i[m].before=!1),i[m].after&&!p&&(i[m].after=!1)):(r.push(m),i[m]={before:h,after:p})}}r.sort(z1e);let a=n.before?n.before.length:0;const c=o.length-(n.after?n.after.length:0);for(l=-1;++l<r.length;){const u=r[l];u<a||u>=c||u+1<c&&r[l+1]===u+1&&i[u].after&&!i[u+1].before&&!i[u+1].after||r[l-1]===u-1&&i[u].before&&!i[u-1].before&&!i[u-1].after||(a!==u&&s.push(gS(o.slice(a,u),"\\")),a=u,/[!-/:-@[-`{-~]/.test(o.charAt(u))&&(!n.encode||!n.encode.includes(o.charAt(u)))?s.push("\\"):(s.push("&#x"+o.charCodeAt(u).toString(16).toUpperCase()+";"),a++))}return s.push(gS(o.slice(a,c),n.after)),s.join("")}function z1e(e,t){return e-t}function gS(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 j1e(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(c){o+=c}function a(c){const u=c||"",d=u.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,u}}function H1e(e,t={}){const n={enter:r,indentLines:B1e,associationId:N1e,containerPhrasing:K1e,containerFlow:G1e,createTracker:j1e,compilePattern:P1e,safe:Y1e,stack:[],unsafe:[...I1e],join:[...A1e],handlers:{...q3},options:{},indexStack:[],handle:void 0};xO(n,t),n.options.tightDefinitions&&n.join.push(q1e),n.handle=Wme("type",{invalid:U1e,unknown:W1e,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 U1e(e){throw new Error("Cannot handle value `"+e+"`, expected node")}function W1e(e){const t=e;throw new Error("Cannot handle unknown node `"+t.type+"`")}function q1e(e,t){if(e.type==="definition"&&e.type===t.type)return 0}function K1e(e,t){return L1e(e,this,t)}function G1e(e,t){return R1e(e,this,t)}function Y1e(e,t){return V1e(this,e,t)}function I2(e){const t=this;t.compiler=n;function n(o){return H1e(o,{...t.data("settings"),...e,extensions:t.data("toMarkdownExtensions")||[]})}}function _S(e){if(e)throw e}var c1=Object.prototype.hasOwnProperty,jO=Object.prototype.toString,vS=Object.defineProperty,yS=Object.getOwnPropertyDescriptor,bS=function(t){return typeof Array.isArray=="function"?Array.isArray(t):jO.call(t)==="[object Array]"},wS=function(t){if(!t||jO.call(t)!=="[object Object]")return!1;var n=c1.call(t,"constructor"),o=t.constructor&&t.constructor.prototype&&c1.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!o)return!1;var r;for(r in t);return typeof r>"u"||c1.call(t,r)},kS=function(t,n){vS&&n.name==="__proto__"?vS(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},CS=function(t,n){if(n==="__proto__")if(c1.call(t,n)){if(yS)return yS(t,n).value}else return;return t[n]},J1e=function e(){var t,n,o,r,s,i,l=arguments[0],a=1,c=arguments.length,u=!1;for(typeof l=="boolean"&&(u=l,l=arguments[1]||{},a=2),(l==null||typeof l!="object"&&typeof l!="function")&&(l={});a<c;++a)if(t=arguments[a],t!=null)for(n in t)o=CS(l,n),r=CS(t,n),l!==r&&(u&&r&&(wS(r)||(s=bS(r)))?(s?(s=!1,i=o&&bS(o)?o:[]):i=o&&wS(o)?o:{},kS(l,{name:n,newValue:e(u,i,r)})):typeof r<"u"&&kS(l,{name:n,newValue:r}));return l};const hv=jl(J1e);function N2(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 Z1e(){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,...c){const u=e[++s];let d=-1;if(a){i(a);return}for(;++d<r.length;)(c[d]===null||c[d]===void 0)&&(c[d]=r[d]);r=c,u?X1e(u,l)(...c):i(null,...c)}}function o(r){if(typeof r!="function")throw new TypeError("Expected `middelware` to be a function, not "+r);return e.push(r),t}}function X1e(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(c){const u=c;if(l&&n)throw u;return r(u)}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 Uo 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=Yf(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}}Uo.prototype.file="";Uo.prototype.name="";Uo.prototype.reason="";Uo.prototype.message="";Uo.prototype.stack="";Uo.prototype.column=void 0;Uo.prototype.line=void 0;Uo.prototype.ancestors=void 0;Uo.prototype.cause=void 0;Uo.prototype.fatal=void 0;Uo.prototype.place=void 0;Uo.prototype.ruleId=void 0;Uo.prototype.source=void 0;const Cs={basename:Q1e,dirname:ege,extname:tge,join:nge,sep:"/"};function Q1e(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');kp(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 ege(e){if(kp(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 tge(e){kp(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 nge(...e){let t=-1,n;for(;++t<e.length;)kp(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":oge(n)}function oge(e){kp(e);const t=e.codePointAt(0)===47;let n=rge(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function rge(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 kp(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const sge={cwd:ige};function ige(){return"/"}function P2(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function lge(e){if(typeof e=="string")e=new URL(e);else if(!P2(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 age(e)}function age(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 pv=["history","path","basename","stem","extname","dirname"];class cge{constructor(t){let n;t?P2(t)?n={path:t}:typeof t=="string"||uge(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":sge.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let o=-1;for(;++o<pv.length;){const s=pv[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)pv.includes(r)||(this[r]=n[r])}get basename(){return typeof this.path=="string"?Cs.basename(this.path):void 0}set basename(t){gv(t,"basename"),mv(t,"basename"),this.path=Cs.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Cs.dirname(this.path):void 0}set dirname(t){SS(this.basename,"dirname"),this.path=Cs.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Cs.extname(this.path):void 0}set extname(t){if(mv(t,"extname"),SS(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=Cs.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){P2(t)&&(t=lge(t)),gv(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Cs.basename(this.path,this.extname):void 0}set stem(t){gv(t,"stem"),mv(t,"stem"),this.path=Cs.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 Uo(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 mv(e,t){if(e&&e.includes(Cs.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Cs.sep+"`")}function gv(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function SS(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function uge(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const dge=function(e){const o=this.constructor.prototype,r=o[e],s=function(){return r.apply(s,arguments)};return Object.setPrototypeOf(s,o),s},fge={}.hasOwnProperty;class K3 extends dge{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=Z1e()}copy(){const t=new K3;let n=-1;for(;++n<this.attachers.length;){const o=this.attachers[n];t.use(...o)}return t.data(hv(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(yv("data",this.frozen),this.namespace[t]=n,this):fge.call(this.namespace,t)&&this.namespace[t]||void 0:t?(yv("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=vm(t),o=this.parser||this.Parser;return _v("parse",o),o(String(n),n)}process(t,n){const o=this;return this.freeze(),_v("process",this.parser||this.Parser),vv("process",this.compiler||this.Compiler),n?r(void 0,n):new Promise(r);function r(s,i){const l=vm(t),a=o.parse(l);o.run(a,l,function(u,d,f){if(u||!d||!f)return c(u);const h=d,p=o.stringify(h,f);pge(p)?f.value=p:f.result=p,c(u,f)});function c(u,d){u||!d?i(u):s?s(d):n(void 0,d)}}}processSync(t){let n=!1,o;return this.freeze(),_v("processSync",this.parser||this.Parser),vv("processSync",this.compiler||this.Compiler),this.process(t,r),ES("processSync","process",n),o;function r(s,i){n=!0,_S(s),o=i}}run(t,n,o){$S(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=vm(n);r.run(t,a,c);function c(u,d,f){const h=d||t;u?l(u):i?i(h):o(void 0,h,f)}}}runSync(t,n){let o=!1,r;return this.run(t,n,s),ES("runSync","run",o),r;function s(i,l){_S(i),r=l,o=!0}}stringify(t,n){this.freeze();const o=vm(n),r=this.compiler||this.Compiler;return vv("stringify",r),$S(t),r(t,o)}use(t,...n){const o=this.attachers,r=this.namespace;if(yv("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(c){if(typeof c=="function")a(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[u,...d]=c;a(u,d)}else i(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function i(c){if(!("plugins"in c)&&!("settings"in c))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(c.plugins),c.settings&&(r.settings=hv(!0,r.settings,c.settings))}function l(c){let u=-1;if(c!=null)if(Array.isArray(c))for(;++u<c.length;){const d=c[u];s(d)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function a(c,u){let d=-1,f=-1;for(;++d<o.length;)if(o[d][0]===c){f=d;break}if(f===-1)o.push([c,...u]);else if(u.length>0){let[h,...p]=u;const m=o[f][1];N2(m)&&N2(h)&&(h=hv(!0,m,h)),o[f]=[c,h,...p]}}}}const L2=new K3().freeze();function _v(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function vv(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function yv(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 $S(e){if(!N2(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function ES(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function vm(e){return hge(e)?e:new cge(e)}function hge(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function pge(e){return typeof e=="string"||mge(e)}function mge(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var HO=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},$t=(e,t,n)=>(HO(e,t,"read from private field"),n?n.call(e):t.get(e)),$n=(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)},nn=(e,t,n,o)=>(HO(e,t,"write to private field"),o?o.call(e,n):t.set(e,n),n);let UO=class{},WO=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 HA();return t}}},gge=class qO extends UO{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 qO(t,n,o)}};var ys,tf,u1,d1,f1,nf,of;const R2=class extends WO{constructor(t){super(),$n(this,ys,void 0),$n(this,tf,void 0),$n(this,u1,void 0),$n(this,d1,void 0),$n(this,f1,void 0),$n(this,nf,void 0),$n(this,of,void 0),nn(this,ys,Vt.none),nn(this,tf,n=>n.isText),nn(this,u1,(n,o)=>{if($t(this,tf).call(this,n)&&$t(this,tf).call(this,o)&&Vt.sameSet(n.marks,o.marks))return this.schema.text(n.text+o.text,n.marks)}),nn(this,d1,n=>{const o=Object.values({...this.schema.nodes,...this.schema.marks}).find(r=>r.spec.parseMarkdown.match(n));if(!o)throw ahe(n);return o}),nn(this,f1,n=>{const o=$t(this,d1).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(gge.create(n,[],o)),this),nn(this,nf,()=>{nn(this,ys,Vt.none);const n=this.close();return $t(this,of).call(this,n.type,n.attrs,n.content)}),this.closeNode=()=>($t(this,nf).call(this),this),nn(this,of,(n,o,r)=>{const s=n.createAndFill(o,r,$t(this,ys));if(!s)throw lhe(n,o,r);return this.push(s),s}),this.addNode=(n,o,r)=>($t(this,of).call(this,n,o,r),this),this.openMark=(n,o)=>{const r=n.create(o);return nn(this,ys,r.addToSet($t(this,ys))),this},this.closeMark=n=>(nn(this,ys,n.removeFromSet($t(this,ys))),this),this.addText=n=>{const o=this.top();if(!o)throw HA();const r=o.pop(),s=this.schema.text(n,$t(this,ys));if(!r)return o.push(s),this;const i=$t(this,u1).call(this,r,s);return i?(o.push(i),this):(o.push(r,s),this)},this.build=()=>{let n;do n=$t(this,nf).call(this);while(this.size());return n},this.next=(n=[])=>([n].flat().forEach(o=>$t(this,f1).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}};ys=new WeakMap,tf=new WeakMap,u1=new WeakMap,d1=new WeakMap,f1=new WeakMap,nf=new WeakMap,of=new WeakMap,R2.create=(e,t)=>{const n=new R2(e);return o=>(n.run(t,o),n.toDoc())};let _ge=R2;const F2=class extends UO{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()}}};F2.create=(e,t,n,o={})=>new F2(e,t,n,o);let xS=F2;const vge=e=>Object.prototype.hasOwnProperty.call(e,"size");var oi,rf,h1,p1,sf,m1,lf,g1,_1,jc,ua,v1,af;const D2=class extends WO{constructor(t){super(),$n(this,oi,void 0),$n(this,rf,void 0),$n(this,h1,void 0),$n(this,p1,void 0),$n(this,sf,void 0),$n(this,m1,void 0),$n(this,lf,void 0),$n(this,g1,void 0),$n(this,_1,void 0),$n(this,jc,void 0),$n(this,ua,void 0),$n(this,v1,void 0),$n(this,af,void 0),nn(this,oi,Vt.none),nn(this,rf,n=>{const o=Object.values({...this.schema.nodes,...this.schema.marks}).find(r=>r.spec.toMarkdown.match(n));if(!o)throw che(n.type);return o}),nn(this,h1,n=>$t(this,rf).call(this,n).spec.toMarkdown.runner(this,n)),nn(this,p1,(n,o)=>$t(this,rf).call(this,n).spec.toMarkdown.runner(this,n,o)),nn(this,sf,n=>{const{marks:o}=n,r=s=>s.type.spec.priority??50;[...o].sort((s,i)=>r(s)-r(i)).every(s=>!$t(this,p1).call(this,s,n))&&$t(this,h1).call(this,n),o.forEach(s=>$t(this,af).call(this,s))}),nn(this,m1,(n,o)=>{var r;if(n.type===o||((r=n.children)==null?void 0:r.length)!==1)return n;const s=c=>{var u;if(c.type===o)return c;if(((u=c.children)==null?void 0:u.length)!==1)return null;const[d]=c.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}),nn(this,lf,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=$t(this,m1).call(this,s,l.type);const{children:a,...c}=s,{children:u,...d}=l;if(s.type===l.type&&a&&u&&JSON.stringify(c)===JSON.stringify(d)){const f={...d,children:[...u,...a]};return r.slice(0,-1).concat($t(this,lf).call(this,f))}}return r.concat(s)},[])),n}),nn(this,g1,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(xS.create(n,void 0,o,r)),this),nn(this,_1,(n,o)=>{let r="",s="";const i=n.children;let l=-1,a=-1;const c=d=>{d&&d.forEach((f,h)=>{f.type==="text"&&f.value&&(l<0&&(l=h),a=h)})};if(i){c(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&&$t(this,ua).call(this,"text",void 0,r);const u=o();return s.length&&$t(this,ua).call(this,"text",void 0,s),u}),nn(this,jc,(n=!1)=>{const o=this.close(),r=()=>$t(this,ua).call(this,o.type,o.children,o.value,o.props);return n?$t(this,_1).call(this,o,r):r()}),this.closeNode=()=>($t(this,jc).call(this),this),nn(this,ua,(n,o,r,s)=>{const i=xS.create(n,o,r,s),l=$t(this,lf).call(this,$t(this,g1).call(this,i));return this.push(l),l}),this.addNode=(n,o,r,s)=>($t(this,ua).call(this,n,o,r,s),this),nn(this,v1,(n,o,r,s)=>n.isInSet($t(this,oi))?this:(nn(this,oi,n.addToSet($t(this,oi))),this.openNode(o,r,{...s,isMark:!0}))),nn(this,af,n=>{n.isInSet($t(this,oi))&&(nn(this,oi,n.type.removeFromSet($t(this,oi))),$t(this,jc).call(this,!0))}),this.withMark=(n,o,r,s)=>($t(this,v1).call(this,n,o,r,s),this),this.closeMark=n=>($t(this,af).call(this,n),this),this.build=()=>{let n=null;do n=$t(this,jc).call(this);while(this.size());return n},this.next=n=>vge(n)?(n.forEach(o=>{$t(this,sf).call(this,o)}),this):($t(this,sf).call(this,n),this),this.toString=n=>n.stringify(this.build()),this.run=n=>(this.next(n),this),this.schema=t}};oi=new WeakMap,rf=new WeakMap,h1=new WeakMap,p1=new WeakMap,sf=new WeakMap,m1=new WeakMap,lf=new WeakMap,g1=new WeakMap,_1=new WeakMap,jc=new WeakMap,ua=new WeakMap,v1=new WeakMap,af=new WeakMap,D2.create=(e,t)=>{const n=new D2(e);return o=>(n.run(o),n.toString(t))};let yge=D2;const KO=65535,GO=Math.pow(2,16);function bge(e,t){return e+t*GO}function TS(e){return e&KO}function wge(e){return(e-(e&KO))/GO}const YO=1,JO=2,y1=4,ZO=8;class B2{constructor(t,n,o){this.pos=t,this.delInfo=n,this.recover=o}get deleted(){return(this.delInfo&ZO)>0}get deletedBefore(){return(this.delInfo&(YO|y1))>0}get deletedAfter(){return(this.delInfo&(JO|y1))>0}get deletedAcross(){return(this.delInfo&y1)>0}}class er{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&er.empty)return er.empty}recover(t){let n=0,o=TS(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+wge(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 c=this.ranges[l+s],u=this.ranges[l+i],d=a+c;if(t<=d){let f=c?t==a?-1:t==d?1:n:n,h=a+r+(f<0?0:u);if(o)return h;let p=t==(n<0?a:d)?null:bge(l/3,t-a),m=t==a?JO:t==d?YO:y1;return(n<0?t!=a:t!=d)&&(m|=ZO),new B2(h,m,p)}r+=u-c}return o?t+r:new B2(t+r,0,null)}touches(t,n){let o=0,r=TS(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 c=this.ranges[l+s],u=a+c;if(t<=u&&l==r*3)return!0;o+=this.ranges[l+i]-c}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),c=this.ranges[r+n],u=this.ranges[r+o];t(l,l+c,a,a+u),s+=u-c}}invert(){return new er(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return t==0?er.empty:new er(t<0?[0,-t,0]:[0,0,t])}}er.empty=new er([]);class _u{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 _u(this.maps,this.mirror,t,n)}copy(){return new _u(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 _u;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 B2(t,r,null)}}const bv=Object.create(null);class ho{getMap(){return er.empty}merge(t){return null}static fromJSON(t,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let o=bv[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 bv)throw new RangeError("Duplicate use of step JSON ID "+t);return bv[t]=n,n.prototype.jsonID=t,n}}class Mn{constructor(t,n){this.doc=t,this.failed=n}static ok(t){return new Mn(t,null)}static fail(t){return new Mn(null,t)}static fromReplace(t,n,o,r){try{return Mn.ok(t.replace(n,o,r))}catch(s){if(s instanceof Ng)return Mn.fail(s.message);throw s}}}function G3(e,t,n){let o=[];for(let r=0;r<e.childCount;r++){let s=e.child(r);s.content.size&&(s=s.copy(G3(s.content,t,s))),s.isInline&&(s=t(s,n,r)),o.push(s)}return Te.fromArray(o)}class fi extends ho{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 ze(G3(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 Mn.fromReplace(t,this.from,this.to,s)}invert(){return new Ms(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 fi(n.pos,o.pos,this.mark)}merge(t){return t instanceof fi&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new fi(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 fi(n.from,n.to,t.markFromJSON(n.mark))}}ho.jsonID("addMark",fi);class Ms extends ho{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 ze(G3(n.content,r=>r.mark(this.mark.removeFromSet(r.marks)),t),n.openStart,n.openEnd);return Mn.fromReplace(t,this.from,this.to,o)}invert(){return new fi(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 Ms(n.pos,o.pos,this.mark)}merge(t){return t instanceof Ms&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Ms(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 Ms(n.from,n.to,t.markFromJSON(n.mark))}}ho.jsonID("removeMark",Ms);class wl extends ho{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return Mn.fail("No node at mark step's position");let o=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return Mn.fromReplace(t,this.pos,this.pos+1,new ze(Te.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 wl(this.pos,n.marks[r]);return new wl(this.pos,this.mark)}}return new Qu(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new wl(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 wl(n.pos,t.markFromJSON(n.mark))}}ho.jsonID("addNodeMark",wl);class Qu extends ho{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return Mn.fail("No node at mark step's position");let o=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return Mn.fromReplace(t,this.pos,this.pos+1,new ze(Te.from(o),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new wl(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new Qu(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 Qu(n.pos,t.markFromJSON(n.mark))}}ho.jsonID("removeNodeMark",Qu);class Yn extends ho{constructor(t,n,o,r=!1){super(),this.from=t,this.to=n,this.slice=o,this.structure=r}apply(t){return this.structure&&V2(t,this.from,this.to)?Mn.fail("Structure replace would overwrite content"):Mn.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new er([this.from,this.to-this.from,this.slice.size])}invert(t){return new Yn(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 Yn(n.pos,Math.max(n.pos,o.pos),this.slice)}merge(t){if(!(t instanceof Yn)||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?ze.empty:new ze(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new Yn(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?ze.empty:new ze(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new Yn(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 Yn(n.from,n.to,ze.fromJSON(t,n.slice),!!n.structure)}}ho.jsonID("replace",Yn);class co extends ho{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&&(V2(t,this.from,this.gapFrom)||V2(t,this.gapTo,this.to)))return Mn.fail("Structure gap-replace would overwrite content");let n=t.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return Mn.fail("Gap is not a flat range");let o=this.slice.insertAt(this.insert,n.content);return o?Mn.fromReplace(t,this.from,this.to,o):Mn.fail("Content does not fit in gap")}getMap(){return new er([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 co(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 co(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 co(n.from,n.to,n.gapFrom,n.gapTo,ze.fromJSON(t,n.slice),n.insert,!!n.structure)}}ho.jsonID("replaceAround",co);function V2(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 kge(e,t,n,o){let r=[],s=[],i,l;e.doc.nodesBetween(t,n,(a,c,u)=>{if(!a.isInline)return;let d=a.marks;if(!o.isInSet(d)&&u.type.allowsMarkType(o.type)){let f=Math.max(c,t),h=Math.min(c+a.nodeSize,n),p=o.addToSet(d);for(let m=0;m<d.length;m++)d[m].isInSet(p)||(i&&i.to==f&&i.mark.eq(d[m])?i.to=h:r.push(i=new Ms(f,h,d[m])));l&&l.to==f?l.to=h:s.push(l=new fi(f,h,o))}}),r.forEach(a=>e.step(a)),s.forEach(a=>e.step(a))}function Cge(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 q0){let c=i.marks,u;for(;u=o.isInSet(c);)(a||(a=[])).push(u),c=u.removeFromSet(c)}else o?o.isInSet(i.marks)&&(a=[o]):a=i.marks;if(a&&a.length){let c=Math.min(l+i.nodeSize,n);for(let u=0;u<a.length;u++){let d=a[u],f;for(let h=0;h<r.length;h++){let p=r[h];p.step==s-1&&d.eq(r[h].style)&&(f=p)}f?(f.to=c,f.step=s):r.push({style:d,from:Math.max(l,t),to:c,step:s})}}}),r.forEach(i=>e.step(new Ms(i.from,i.to,i.style)))}function XO(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 c=s.child(a),u=l+c.nodeSize,d=o.matchType(c.type);if(!d)i.push(new Yn(l,u,ze.empty));else{o=d;for(let f=0;f<c.marks.length;f++)n.allowsMarkType(c.marks[f].type)||e.step(new Ms(l,u,c.marks[f]));if(r&&c.isText&&n.whitespace!="pre"){let f,h=/\r?\n|\r/g,p;for(;f=h.exec(c.text);)p||(p=new ze(Te.from(n.schema.text(" ",n.allowedMarks(c.marks))),0,0)),i.push(new Yn(l+f.index,l+f.index+f[0].length,p))}}l=u}if(!o.validEnd){let a=o.fillBefore(Te.empty,!0);e.replace(l,l,new ze(a,0,0))}for(let a=i.length-1;a>=0;a--)e.step(i[a])}function Sge(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function Z0(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||!Sge(r,s,i))break}return null}function $ge(e,t,n){let{$from:o,$to:r,depth:s}=t,i=o.before(s+1),l=r.after(s+1),a=i,c=l,u=Te.empty,d=0;for(let p=s,m=!1;p>n;p--)m||o.index(p)>0?(m=!0,u=Te.from(o.node(p).copy(u)),d++):a--;let f=Te.empty,h=0;for(let p=s,m=!1;p>n;p--)m||r.after(p+1)<r.end(p)?(m=!0,f=Te.from(r.node(p).copy(f)),h++):c++;e.step(new co(a,c,i,l,new ze(u.append(f),d,h),u.size-d,!0))}function Y3(e,t,n=null,o=e){let r=Ege(e,t),s=r&&xge(o,t);return s?r.map(MS).concat({type:t,attrs:n}).concat(s.map(MS)):null}function MS(e){return{type:e,attrs:null}}function Ege(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 xge(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 c=o;a&&c<r;c++)a=a.matchType(n.child(c).type);return!a||!a.validEnd?null:i}function Tge(e,t,n){let o=Te.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=Te.from(n[i].type.create(n[i].attrs,o))}let r=t.start,s=t.end;e.step(new co(r,s,r,s,new ze(o,0,0),n.length,!0))}function Mge(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)&&Ige(e.doc,e.mapping.slice(s).map(l),o)){let c=null;if(o.schema.linebreakReplacement){let h=o.whitespace=="pre",p=!!o.contentMatch.matchType(o.schema.linebreakReplacement);h&&!p?c=!1:!h&&p&&(c=!0)}c===!1&&Oge(e,i,l,s),XO(e,e.mapping.slice(s).map(l,1),o,void 0,c===null);let u=e.mapping.slice(s),d=u.map(l,1),f=u.map(l+i.nodeSize,1);return e.step(new co(d,f,d+1,f-1,new ze(Te.from(o.create(a,null,i.marks)),0,0),1,!0)),c===!0&&Age(e,i,l,s),!1}})}function Age(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 Oge(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 Ige(e,t,n){let o=e.resolve(t),r=o.index();return o.parent.canReplaceWith(r,r+1,n)}function Nge(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 co(t,t+s.nodeSize,t+1,t+s.nodeSize-1,new ze(Te.from(i),0,0),1,!0))}function Jf(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 c=r.depth-1,u=n-2;c>s;c--,u--){let d=r.node(c),f=r.index(c);if(d.type.spec.isolating)return!1;let h=d.content.cutByIndex(f,d.childCount),p=o&&o[u+1];p&&(h=h.replaceChild(0,p.type.create(p.attrs)));let m=o&&o[u]||d;if(!d.canReplace(f+1,d.childCount)||!m.type.validContent(h))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 Pge(e,t,n=1,o){let r=e.doc.resolve(t),s=Te.empty,i=Te.empty;for(let l=r.depth,a=r.depth-n,c=n-1;l>a;l--,c--){s=Te.from(r.node(l).copy(s));let u=o&&o[c];i=Te.from(u?u.type.create(u.attrs,i):r.node(l).copy(i))}e.step(new Yn(t,t,new ze(s.append(i),n,n),!0))}function X0(e,t){let n=e.resolve(t),o=n.index();return Lge(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(o,o+1)}function Lge(e,t){return!!(e&&t&&!e.isLeaf&&e.canAppend(t))}function Rge(e,t,n){let o=new Yn(t-n,t+n,ze.empty,!0);e.step(o)}function Fge(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 Dge(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),c=o.node(i),u=!1;if(s==1)u=c.canReplace(a,a,r);else{let d=c.contentMatchAt(a).findWrapping(r.firstChild.type);u=d&&c.canReplaceWith(a,a,d[0])}if(u)return l==0?o.pos:l<0?o.before(i+1):o.after(i+1)}return null}function J3(e,t,n=t,o=ze.empty){if(t==n&&!o.size)return null;let r=e.resolve(t),s=e.resolve(n);return QO(r,s,o)?new Yn(t,n,o):new Bge(r,s,o).fit()}function QO(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}class Bge{constructor(t,n,o){this.$from=t,this.$to=n,this.unplaced=o,this.frontier=[],this.placed=Te.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=Te.from(t.node(r).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,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 ze(s,i,l);return t>-1?new co(o.pos,t,this.$to.pos,this.$to.end(),a,n):a.size||o.pos!=this.$to.pos?new Yn(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=wv(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:c}=this.frontier[l],u,d=null;if(n==1&&(i?c.matchType(i.type)||(d=c.fillBefore(Te.from(i),!1)):s&&a.compatibleContent(s.type)))return{sliceDepth:o,frontierDepth:l,parent:s,inject:d};if(n==2&&i&&(u=c.findWrapping(i.type)))return{sliceDepth:o,frontierDepth:l,parent:s,wrap:u};if(s&&c.matchType(s.type))break}}}openMore(){let{content:t,openStart:n,openEnd:o}=this.unplaced,r=wv(t,n);return!r.childCount||r.firstChild.isLeaf?!1:(this.unplaced=new ze(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=wv(t,n);if(r.childCount<=1&&n>0){let s=t.size-n<=n+r.size;this.unplaced=new ze(cf(t,n-1,1),n-1,s?n-1:o)}else this.unplaced=new ze(cf(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,c=0,u=[],{match:d,type:f}=this.frontier[n];if(r){for(let m=0;m<r.childCount;m++)u.push(r.child(m));d=d.matchFragment(r)}let h=l.size+t-(i.content.size-i.openEnd);for(;c<l.childCount;){let m=l.child(c),v=d.matchType(m.type);if(!v)break;c++,(c>1||a==0||m.content.size)&&(d=v,u.push(eI(m.mark(f.allowedMarks(m.marks)),c==1?a:0,c==l.childCount?h:-1)))}let p=c==l.childCount;p||(h=-1),this.placed=uf(this.placed,n,Te.from(u)),this.frontier[n].match=d,p&&h<0&&o&&o.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,v=l;m<h;m++){let y=v.lastChild;this.frontier.push({type:y.type,match:y.contentMatchAt(y.childCount)}),v=y.content}this.unplaced=p?t==0?ze.empty:new ze(cf(i.content,t-1,1),t-1,h<0?i.openEnd:t-1):new ze(cf(i.content,t,c),i.openStart,i.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let t=this.frontier[this.depth],n;if(!t.type.isTextblock||!kv(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=kv(t,n,r,o,s);if(i){for(let l=n-1;l>=0;l--){let{match:a,type:c}=this.frontier[l],u=kv(t,l,c,a,!0);if(!u||u.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=uf(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=uf(this.placed,this.depth,Te.from(t.create(n,o))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(Te.empty,!0);n.childCount&&(this.placed=uf(this.placed,this.frontier.length,n))}}function cf(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(cf(e.firstChild.content,t-1,n)))}function uf(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(uf(e.lastChild.content,t-1,n)))}function wv(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function eI(e,t,n){if(t<=0)return e;let o=e.content;return t>1&&(o=o.replaceChild(0,eI(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(Te.empty,!0)))),e.copy(o)}function kv(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&&!Vge(n,s.content,i)?l:null}function Vge(e,t,n){for(let o=n;o<t.childCount;o++)if(!e.allowsMarks(t.child(o).marks))return!0;return!1}function zge(e){return e.spec.defining||e.spec.definingForContent}function jge(e,t,n,o){if(!o.size)return e.deleteRange(t,n);let r=e.doc.resolve(t),s=e.doc.resolve(n);if(QO(r,s,o))return e.step(new Yn(t,n,o));let i=nI(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,h=r.pos-1;f>0;f--,h--){let p=r.node(f).type.spec;if(p.defining||p.definingAsContext||p.isolating)break;i.indexOf(f)>-1?l=f:r.before(f)==h&&i.splice(1,0,-f)}let a=i.indexOf(l),c=[],u=o.openStart;for(let f=o.content,h=0;;h++){let p=f.firstChild;if(c.push(p),h==o.openStart)break;f=p.content}for(let f=u-1;f>=0;f--){let h=c[f],p=zge(h.type);if(p&&!h.sameMarkup(r.node(Math.abs(l)-1)))u=f;else if(p||!h.type.isTextblock)break}for(let f=o.openStart;f>=0;f--){let h=(f+u+1)%(o.openStart+1),p=c[h];if(p)for(let m=0;m<i.length;m++){let v=i[(m+a)%i.length],y=!0;v<0&&(y=!1,v=-v);let E=r.node(v-1),w=r.index(v-1);if(E.canReplaceWith(w,w,p.type,p.marks))return e.replace(r.before(v),y?s.after(v):n,new ze(tI(o.content,0,o.openStart,h),h,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 h=i[f];h<0||(t=r.before(h),n=s.after(h))}}function tI(e,t,n,o,r){if(t<n){let s=e.firstChild;e=e.replaceChild(0,s.copy(tI(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(Te.empty,!0))}return e}function Hge(e,t,n,o){if(!o.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let r=Fge(e.doc,t,o.type);r!=null&&(t=n=r)}e.replaceRange(t,n,new ze(Te.from(o),0,0))}function Uge(e,t,n){let o=e.doc.resolve(t),r=e.doc.resolve(n),s=nI(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 nI(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 vu extends ho{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 Mn.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 Mn.fromReplace(t,this.pos,this.pos+1,new ze(Te.from(r),0,n.isLeaf?0:1))}getMap(){return er.empty}invert(t){return new vu(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 vu(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 vu(n.pos,n.attr,n.value)}}ho.jsonID("attr",vu);class Fh extends ho{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 Mn.ok(o)}getMap(){return er.empty}invert(t){return new Fh(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 Fh(n.attr,n.value)}}ho.jsonID("docAttr",Fh);let ed=class extends Error{};ed=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n};ed.prototype=Object.create(Error.prototype);ed.prototype.constructor=ed;ed.prototype.name="TransformError";class oI{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new _u}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let n=this.maybeStep(t);if(n.failed)throw new ed(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=ze.empty){let r=J3(this.doc,t,n,o);return r&&this.step(r),this}replaceWith(t,n,o){return this.replace(t,n,new ze(Te.from(o),0,0))}delete(t,n){return this.replace(t,n,ze.empty)}insert(t,n){return this.replaceWith(t,t,n)}replaceRange(t,n,o){return jge(this,t,n,o),this}replaceRangeWith(t,n,o){return Hge(this,t,n,o),this}deleteRange(t,n){return Uge(this,t,n),this}lift(t,n){return $ge(this,t,n),this}join(t,n=1){return Rge(this,t,n),this}wrap(t,n){return Tge(this,t,n),this}setBlockType(t,n=t,o,r=null){return Mge(this,t,n,o,r),this}setNodeMarkup(t,n,o=null,r){return Nge(this,t,n,o,r),this}setNodeAttribute(t,n,o){return this.step(new vu(t,n,o)),this}setDocAttribute(t,n){return this.step(new Fh(t,n)),this}addNodeMark(t,n){return this.step(new wl(t,n)),this}removeNodeMark(t,n){if(!(n instanceof Vt)){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 Qu(t,n)),this}split(t,n=1,o){return Pge(this,t,n,o),this}addMark(t,n,o){return kge(this,t,n,o),this}removeMark(t,n,o){return Cge(this,t,n,o),this}clearIncompatible(t,n,o){return XO(this,t,n,o),this}}const Cv=Object.create(null);class ft{constructor(t,n,o){this.$anchor=t,this.$head=n,this.ranges=o||[new Vg(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=ze.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:c}=i[l],u=t.mapping.slice(s);t.replaceRange(u.map(a.pos),u.map(c.pos),l?ze.empty:n),l==0&&IS(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),c=a.map(i.pos),u=a.map(l.pos);s?t.deleteRange(c,u):(t.replaceRangeWith(c,u,n),IS(t,o,n.isInline?-1:1))}}static findFrom(t,n,o=!1){let r=t.parent.inlineContent?new lt(t):Hc(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?Hc(t.node(0),t.node(s),t.before(s+1),t.index(s),n,o):Hc(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 lr(t.node(0))}static atStart(t){return Hc(t,t,0,0,1)||new lr(t)}static atEnd(t){return Hc(t,t,t.content.size,t.childCount,-1)||new lr(t)}static fromJSON(t,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let o=Cv[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 Cv)throw new RangeError("Duplicate use of selection JSON ID "+t);return Cv[t]=n,n.prototype.jsonID=t,n}getBookmark(){return lt.between(this.$anchor,this.$head).getBookmark()}}ft.prototype.visible=!0;class Vg{constructor(t,n){this.$from=t,this.$to=n}}let AS=!1;function OS(e){!AS&&!e.parent.inlineContent&&(AS=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class lt extends ft{constructor(t,n=t){OS(t),OS(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 ft.near(o);let r=t.resolve(n.map(this.anchor));return new lt(r.parent.inlineContent?r:o,o)}replace(t,n=ze.empty){if(super.replace(t,n),n==ze.empty){let o=this.$from.marksAcross(this.$to);o&&t.ensureMarks(o)}}eq(t){return t instanceof lt&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new Q0(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 lt(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=ft.findFrom(n,o,!0)||ft.findFrom(n,-o,!0);if(s)n=s.$head;else return ft.near(n,o)}return t.parent.inlineContent||(r==0?t=n:(t=(ft.findFrom(t,-o,!0)||ft.findFrom(t,o,!0)).$anchor,t.pos<n.pos!=r<0&&(t=n))),new lt(t,n)}}ft.jsonID("text",lt);class Q0{constructor(t,n){this.anchor=t,this.head=n}map(t){return new Q0(t.map(this.anchor),t.map(this.head))}resolve(t){return lt.between(t.resolve(this.anchor),t.resolve(this.head))}}class at extends ft{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?ft.near(s):new at(s)}content(){return new ze(Te.from(this.node),0,0)}eq(t){return t instanceof at&&t.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new Z3(this.anchor)}static fromJSON(t,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new at(t.resolve(n.anchor))}static create(t,n){return new at(t.resolve(n))}static isSelectable(t){return!t.isText&&t.type.spec.selectable!==!1}}at.prototype.visible=!1;ft.jsonID("node",at);class Z3{constructor(t){this.anchor=t}map(t){let{deleted:n,pos:o}=t.mapResult(this.anchor);return n?new Q0(o,o):new Z3(o)}resolve(t){let n=t.resolve(this.anchor),o=n.nodeAfter;return o&&at.isSelectable(o)?new at(n):ft.near(n)}}class lr extends ft{constructor(t){super(t.resolve(0),t.resolve(t.content.size))}replace(t,n=ze.empty){if(n==ze.empty){t.delete(0,t.doc.content.size);let o=ft.atStart(t.doc);o.eq(t.selection)||t.setSelection(o)}else super.replace(t,n)}toJSON(){return{type:"all"}}static fromJSON(t){return new lr(t)}map(t){return new lr(t)}eq(t){return t instanceof lr}getBookmark(){return Wge}}ft.jsonID("all",lr);const Wge={map(){return this},resolve(e){return new lr(e)}};function Hc(e,t,n,o,r,s=!1){if(t.inlineContent)return lt.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&&at.isSelectable(l))return at.create(e,n-(r<0?l.nodeSize:0))}else{let a=Hc(e,l,n+r,r<0?l.childCount:0,r,s);if(a)return a}n+=l.nodeSize*r}return null}function IS(e,t,n){let o=e.steps.length-1;if(o<t)return;let r=e.steps[o];if(!(r instanceof Yn||r instanceof co))return;let s=e.mapping.maps[o],i;s.forEach((l,a,c,u)=>{i==null&&(i=u)}),e.setSelection(ft.near(e.doc.resolve(i),n))}const NS=1,ym=2,PS=4;class qge extends oI{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|NS)&~ym,this.storedMarks=null,this}get selectionSet(){return(this.updated&NS)>0}setStoredMarks(t){return this.storedMarks=t,this.updated|=ym,this}ensureMarks(t){return Vt.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&ym)>0}addStep(t,n){super.addStep(t,n),this.updated=this.updated&~ym,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)||Vt.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(ft.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|=PS,this}get scrolledIntoView(){return(this.updated&PS)>0}}function LS(e,t){return!t||!e?e:e.bind(t)}class df{constructor(t,n,o){this.name=t,this.init=LS(n.init,o),this.apply=LS(n.apply,o)}}const Kge=[new df("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new df("selection",{init(e,t){return e.selection||ft.atStart(t.doc)},apply(e){return e.selection}}),new df("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,n,o){return o.selection.$cursor?e.storedMarks:null}}),new df("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})];class Sv{constructor(t,n){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=Kge.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 df(o.key,o.spec.state,o))})}}class xa{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,c=r?r[i].state:this,u=a<n.length&&l.spec.appendTransaction.call(l,a?n.slice(a):n,c,o);if(u&&o.filterTransaction(u,i)){if(u.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(u),o=o.applyInner(u),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 xa(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 qge(this)}static create(t){let n=new Sv(t.doc?t.doc.type.schema:t.schema,t.plugins),o=new xa(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 Sv(this.schema,t.plugins),o=n.fields,r=new xa(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 Sv(t.schema,t.plugins),s=new xa(r);return r.fields.forEach(i=>{if(i.name=="doc")s.doc=El.fromJSON(t.schema,n.doc);else if(i.name=="selection")s.selection=ft.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],c=a.spec.state;if(a.key==i.name&&c&&c.fromJSON&&Object.prototype.hasOwnProperty.call(n,l)){s[i.name]=c.fromJSON.call(a,t,n[l],s);return}}s[i.name]=i.init(t,s)}}),s}}function rI(e,t,n){for(let o in e){let r=e[o];r instanceof Function?r=r.bind(t):o=="handleDOMEvents"&&(r=rI(r,t,{})),n[o]=r}return n}class wn{constructor(t){this.spec=t,this.props={},t.props&&rI(t.props,this,this.props),this.key=t.key?t.key.key:sI("plugin")}getState(t){return t[this.key]}}const $v=Object.create(null);function sI(e){return e in $v?e+"$"+ ++$v[e]:($v[e]=0,e+"$")}class mn{constructor(t="key"){this.key=sI(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}class hr{constructor(t,n,o={}){this.match=t,this.match=t,this.handler=typeof n=="string"?Gge(n):n,this.undoable=o.undoable!==!1,this.inCode=o.inCode||!1}}function Gge(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 Yge=(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 hr(/--$/,"—");new hr(/\.\.\.$/,"…");new hr(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"“");new hr(/"$/,"”");new hr(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"‘");new hr(/'$/,"’");function X3(e,t,n=null,o){return new hr(e,(r,s,i,l)=>{let a=n instanceof Function?n(s):n,c=r.tr.delete(i,l),u=c.doc.resolve(i),d=u.blockRange(),f=d&&Y3(d,t,a);if(!f)return null;c.wrap(d,f);let h=c.doc.resolve(i-1).nodeBefore;return h&&h.type==t&&X0(c.doc,i-1)&&(!o||o(s,h))&&c.join(i-1),c})}function iI(e,t,n=null){return new hr(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 Pl=typeof navigator<"u"?navigator:null,RS=typeof document<"u"?document:null,Kl=Pl&&Pl.userAgent||"",z2=/Edge\/(\d+)/.exec(Kl),lI=/MSIE \d/.exec(Kl),j2=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Kl),e_=!!(lI||j2||z2),Jge=lI?document.documentMode:j2?+j2[1]:z2?+z2[1]:0,aI=!e_&&/gecko\/(\d+)/i.test(Kl),Zge=aI&&+(/Firefox\/(\d+)/.exec(Kl)||[0,0])[1],H2=!e_&&/Chrome\/(\d+)/.exec(Kl),Xge=!!H2,Qge=H2?+H2[1]:0,cI=!e_&&!!Pl&&/Apple Computer/.test(Pl.vendor),uI=cI&&(/Mobile\/\w+/.test(Kl)||!!Pl&&Pl.maxTouchPoints>2),e0e=uI||(Pl?/Mac/.test(Pl.platform):!1),t0e=/Android \d/.test(Kl),dI=!!RS&&"webkitFontSmoothing"in RS.documentElement.style,n0e=dI?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;var bm=Object.freeze({__proto__:null,android:t0e,chrome:Xge,chrome_version:Qge,gecko:aI,gecko_version:Zge,ie:e_,ie_version:Jge,ios:uI,mac:e0e,safari:cI,webkit:dI,webkit_version:n0e});function Ev(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 c=0;c<r.length;c++){const u=r[c].match.exec(a),d=u&&u[0]&&r[c].handler(i,u,t-(u[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 o0e=new mn("MILKDOWN_CUSTOM_INPUTRULES");function r0e({rules:e}){const t=new wn({key:o0e,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 Ev(n,o,r,s,e,t)},handleDOMEvents:{compositionend:n=>(setTimeout(()=>{const{$cursor:o}=n.state.selection;o&&Ev(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?Ev(n,r.pos,r.pos,` |
| 113 |
`,e,t):!1}}});return t}function Cp(e,t,n={}){return new hr(e,(o,r,s,i)=>{var l,a,c,u;const{tr:d}=o,f=r.length;let h=r[f-1],p=r[0],m=[],v=i;const y={group:h,fullMatch:p,start:s,end:i},E=(l=n.updateCaptured)==null?void 0:l.call(n,y);if(Object.assign(y,E),{group:h,fullMatch:p,start:s,end:i}=y,p===null||(h==null?void 0:h.trim())==="")return null;if(h){const w=p.search(/\S/),C=s+p.indexOf(h),T=C+h.length;m=(a=d.storedMarks)!=null?a:[],T<i&&d.delete(T,i),C>s&&d.delete(s+w,C),v=s+w+h.length;const $=(c=n.getAttr)==null?void 0:c.call(n,r);d.addMark(s,v,t.create($)),d.setStoredMarks(m),(u=n.beforeDispatch)==null||u.call(n,{match:r,start:s,end:i,tr:d})}return d})}var s0e=Object.defineProperty,i0e=Object.defineProperties,l0e=Object.getOwnPropertyDescriptors,FS=Object.getOwnPropertySymbols,a0e=Object.prototype.hasOwnProperty,c0e=Object.prototype.propertyIsEnumerable,DS=(e,t,n)=>t in e?s0e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,u0e=(e,t)=>{for(var n in t||(t={}))a0e.call(t,n)&&DS(e,n,t[n]);if(FS)for(var n of FS(t))c0e.call(t,n)&&DS(e,n,t[n]);return e},d0e=(e,t)=>i0e(e,l0e(t));function BS(e=0,t=0,n=0){return Math.min(Math.max(e,t),n)}function t_(e,t,n){const r=e.state.doc.content.size,s=BS(t,0,r),i=BS(n,0,r),l=e.coordsAtPos(s),a=e.coordsAtPos(i,-1),c=Math.min(l.top,a.top),u=Math.max(l.bottom,a.bottom),d=Math.min(l.left,a.left),f=Math.max(l.right,a.right),h=f-d,p=u-c,y={top:c,bottom:u,left:d,right:f,width:h,height:p,x:d,y:c};return d0e(u0e({},y),{toJSON:()=>y})}function n_(e){return Object.assign(Object.create(e),e).setTime(Date.now())}function f0e(e,t){return Array.isArray(e)&&e.includes(t.type)||t.type===e}function Q3(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 h0e(e,t){return Q3(n=>n.type===t)(e)}function p0e(e,t){const n=t.nodes[e];if(!n)throw uhe("node",e);return n}function ek(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 m0e(e){return t=>ek(e)(t.$from)}function g0e(e,t){if(!(e instanceof at))return;const{node:n,$from:o}=e;if(f0e(t,n))return{node:n,pos:o.pos,start:o.start(o.depth),depth:o.depth}}const tk=(e,t)=>e.selection.empty?!1:(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function _0e(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("backward",e):n.parentOffset>0)?null:n}const fI=(e,t,n)=>{let o=_0e(e,n);if(!o)return!1;let r=pI(o);if(!r){let i=o.blockRange(),l=i&&Z0(i);return l==null?!1:(t&&t(e.tr.lift(i,l).scrollIntoView()),!0)}let s=r.nodeBefore;if(gI(e,r,t,-1))return!0;if(o.parent.content.size==0&&(td(s,"end")||at.isSelectable(s)))for(let i=o.depth;;i--){let l=J3(e.doc,o.before(i),o.after(i),ze.empty);if(l&&l.slice.size<l.to-l.from){if(t){let a=e.tr.step(l);a.setSelection(td(s,"end")?ft.findFrom(a.doc.resolve(a.mapping.map(r.pos,-1)),-1):at.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 td(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 hI=(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=pI(o)}let i=s&&s.nodeBefore;return!i||!at.isSelectable(i)?!1:(t&&t(e.tr.setSelection(at.create(e.doc,s.pos-i.nodeSize)).scrollIntoView()),!0)};function pI(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 v0e(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("forward",e):n.parentOffset<n.parent.content.size)?null:n}const y0e=(e,t,n)=>{let o=v0e(e,n);if(!o)return!1;let r=mI(o);if(!r)return!1;let s=r.nodeAfter;if(gI(e,r,t,1))return!0;if(o.parent.content.size==0&&(td(s,"start")||at.isSelectable(s))){let i=J3(e.doc,o.before(),o.after(),ze.empty);if(i&&i.slice.size<i.to-i.from){if(t){let l=e.tr.step(i);l.setSelection(td(s,"start")?ft.findFrom(l.doc.resolve(l.mapping.map(r.pos)),1):at.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},b0e=(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=mI(o)}let i=s&&s.nodeAfter;return!i||!at.isSelectable(i)?!1:(t&&t(e.tr.setSelection(at.create(e.doc,s.pos)).scrollIntoView()),!0)};function mI(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 w0e=(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 nk(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 k0e=(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=nk(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(ft.near(a.doc.resolve(l),1)),t(a.scrollIntoView())}return!0},C0e=(e,t)=>{let n=e.selection,{$from:o,$to:r}=n;if(n instanceof lr||o.parent.inlineContent||r.parent.inlineContent)return!1;let s=nk(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(lt.create(l.doc,i+1)),t(l.scrollIntoView())}return!0},S0e=(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(Jf(e.doc,s))return t&&t(e.tr.split(s).scrollIntoView()),!0}let o=n.blockRange(),r=o&&Z0(o);return r==null?!1:(t&&t(e.tr.lift(o,r).scrollIntoView()),!0)};function $0e(e){return(t,n)=>{let{$from:o,$to:r}=t.selection;if(t.selection instanceof at&&t.selection.node.isBlock)return!o.parentOffset||!Jf(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 lt||t.selection instanceof lr)&&i.deleteSelection();let l=o.depth==0?null:nk(o.node(-1).contentMatchAt(o.indexAfter(-1))),a=e&&e(r.parent,s,o),c=a?[a]:s&&l?[{type:l}]:void 0,u=Jf(i.doc,i.mapping.map(o.pos),1,c);if(!c&&!u&&Jf(i.doc,i.mapping.map(o.pos),1,l?[{type:l}]:void 0)&&(l&&(c=[{type:l}]),u=!0),u&&(i.split(i.mapping.map(o.pos),1,c),!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 E0e=$0e(),x0e=(e,t)=>(t&&t(e.tr.setSelection(new lr(e.doc))),!0);function T0e(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||X0(e.doc,t.pos))?!1:(n&&n(e.tr.clearIncompatible(t.pos,o.type,o.contentMatchAt(o.childCount)).join(t.pos).scrollIntoView()),!0)}function gI(e,t,n,o){let r=t.nodeBefore,s=t.nodeAfter,i,l,a=r.type.spec.isolating||s.type.spec.isolating;if(!a&&T0e(e,t,n))return!0;let c=!a&&t.parent.canReplace(t.index(),t.index()+1);if(c&&(i=(l=r.contentMatchAt(r.childCount)).findWrapping(s.type))&&l.matchType(i[0]||s.type).validEnd){if(n){let h=t.pos+s.nodeSize,p=Te.empty;for(let y=i.length-1;y>=0;y--)p=Te.from(i[y].create(null,p));p=Te.from(r.copy(p));let m=e.tr.step(new co(t.pos-1,h,t.pos,h,new ze(p,1,0),i.length,!0)),v=h+2*i.length;X0(m.doc,v)&&m.join(v),n(m.scrollIntoView())}return!0}let u=s.type.spec.isolating||o>0&&a?null:ft.findFrom(t,1),d=u&&u.$from.blockRange(u.$to),f=d&&Z0(d);if(f!=null&&f>=t.depth)return n&&n(e.tr.lift(d,f).scrollIntoView()),!0;if(c&&td(s,"start",!0)&&td(r,"end")){let h=r,p=[];for(;p.push(h),!h.isTextblock;)h=h.lastChild;let m=s,v=1;for(;!m.isTextblock;m=m.firstChild)v++;if(h.canReplace(h.childCount,h.childCount,m.content)){if(n){let y=Te.empty;for(let w=p.length-1;w>=0;w--)y=Te.from(p[w].copy(y));let E=e.tr.step(new co(t.pos-p.length,t.pos+s.nodeSize,t.pos+v,t.pos+s.nodeSize-v,new ze(y,p.length,0),0,!0));n(E.scrollIntoView())}return!0}}return!1}function _I(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(lt.create(t.doc,e<0?r.start(s):r.end(s)))),!0):!1}}const M0e=_I(-1),A0e=_I(1);function ok(e,t=null){return function(n,o){let{$from:r,$to:s}=n.selection,i=r.blockRange(s),l=i&&Y3(i,e,t);return l?(o&&o(n.tr.wrap(i,l).scrollIntoView()),!0):!1}}function Dh(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,c)=>{if(r)return!1;if(!(!a.isTextblock||a.hasMarkup(e,t)))if(a.type==e)r=!0;else{let u=n.doc.resolve(c),d=u.index();r=u.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 O0e(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,c)=>{if(l||!o&&a.isAtom&&a.isInline&&c>=s.pos&&c+a.nodeSize<=i.pos)return!1;l=a.inlineContent&&a.type.allowsMarkType(n)}),l)return!0}return!1}function I0e(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 Vg(o,o.doc.resolve(i+1))),o=o.doc.resolve(i+1+s.content.size),!1}),o.pos<r.pos&&t.push(new Vg(o,r))}return t}function o_(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:c}=s.selection;if(l&&!a||!O0e(s.doc,c,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 u,d=s.tr;r||(c=I0e(c)),o?u=!c.some(f=>s.doc.rangeHasMark(f.$from.pos,f.$to.pos,e)):u=!c.every(f=>{let h=!1;return d.doc.nodesBetween(f.$from.pos,f.$to.pos,(p,m,v)=>{if(h)return!1;h=!e.isInSet(p.marks)&&!!v&&v.type.allowsMarkType(e)&&!(p.isText&&/^\s*$/.test(p.textBetween(Math.max(0,f.$from.pos-m),Math.min(p.nodeSize,f.$to.pos-m))))}),!h});for(let f=0;f<c.length;f++){let{$from:h,$to:p}=c[f];if(!u)d.removeMark(h.pos,p.pos,e);else{let m=h.pos,v=p.pos,y=h.nodeAfter,E=p.nodeBefore,w=y&&y.isText?/^\s*/.exec(y.text)[0].length:0,C=E&&E.isText?/\s*$/.exec(E.text)[0].length:0;m+w<v&&(m+=w,v-=C),d.addMark(m,v,e.create(t))}}i(d.scrollIntoView())}return!0}}function r_(...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 xv=r_(tk,fI,hI),VS=r_(tk,y0e,b0e);const li={Enter:r_(w0e,C0e,S0e,E0e),"Mod-Enter":k0e,Backspace:xv,"Mod-Backspace":xv,"Shift-Backspace":xv,Delete:VS,"Mod-Delete":VS,"Mod-a":x0e},vI={"Ctrl-h":li.Backspace,"Alt-Backspace":li["Mod-Backspace"],"Ctrl-d":li.Delete,"Ctrl-Alt-Backspace":li["Mod-Delete"],"Alt-Delete":li["Mod-Delete"],"Alt-d":li["Mod-Delete"],"Ctrl-a":M0e,"Ctrl-e":A0e};for(let e in li)vI[e]=li[e];const N0e=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform?os.platform()=="darwin":!1,P0e=N0e?vI:li;var Ll={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:"'"},zg={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},L0e=typeof navigator<"u"&&/Mac/.test(navigator.platform),R0e=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Jn=0;Jn<10;Jn++)Ll[48+Jn]=Ll[96+Jn]=String(Jn);for(var Jn=1;Jn<=24;Jn++)Ll[Jn+111]="F"+Jn;for(var Jn=65;Jn<=90;Jn++)Ll[Jn]=String.fromCharCode(Jn+32),zg[Jn]=String.fromCharCode(Jn);for(var Tv in Ll)zg.hasOwnProperty(Tv)||(zg[Tv]=Ll[Tv]);function F0e(e){var t=L0e&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||R0e&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",n=!t&&e.key||(e.shiftKey?zg:Ll)[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 D0e=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function B0e(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))D0e?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 V0e(e){let t=Object.create(null);for(let n in e)t[B0e(n)]=e[n];return t}function Mv(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 yI(e){return new wn({props:{handleKeyDown:bI(e)}})}function bI(e){let t=V0e(e);return function(n,o){let r=F0e(o),s,i=t[Mv(r,o)];if(i&&i(n.state,n.dispatch,n))return!0;if(r.length==1&&r!=" "){if(o.shiftKey){let l=t[Mv(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=Ll[o.keyCode])&&s!=r){let l=t[Mv(s,o)];if(l&&l(n.state,n.dispatch,n))return!0}}return!1}}const Zn=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},Bh=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t};let U2=null;const ii=function(e,t,n){let o=U2||(U2=document.createRange());return o.setEnd(e,n??e.nodeValue.length),o.setStart(e,t||0),o},z0e=function(){U2=null},ic=function(e,t,n,o){return n&&(zS(e,t,n,o,-1)||zS(e,t,n,o,1))},j0e=/^(img|br|input|textarea|hr)$/i;function zS(e,t,n,o,r){for(;;){if(e==n&&t==o)return!0;if(t==(r<0?0:Ts(e))){let s=e.parentNode;if(!s||s.nodeType!=1||Sp(e)||j0e.test(e.nodeName)||e.contentEditable=="false")return!1;t=Zn(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?Ts(e):0}else return!1}}function Ts(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function H0e(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=Ts(e)}else if(e.parentNode&&!Sp(e))t=Zn(e),e=e.parentNode;else return null}}function U0e(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&&!Sp(e))t=Zn(e)+1,e=e.parentNode;else return null}}function W0e(e,t,n){for(let o=t==0,r=t==Ts(e);o||r;){if(e==n)return!0;let s=Zn(e);if(e=e.parentNode,!e)return!1;o=o&&s==0,r=r&&s==Ts(e)}}function Sp(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 s_=function(e){return e.focusNode&&ic(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function va(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function q0e(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}function K0e(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 Vs=typeof navigator<"u"?navigator:null,jS=typeof document<"u"?document:null,Gl=Vs&&Vs.userAgent||"",W2=/Edge\/(\d+)/.exec(Gl),wI=/MSIE \d/.exec(Gl),q2=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Gl),Do=!!(wI||q2||W2),xl=wI?document.documentMode:q2?+q2[1]:W2?+W2[1]:0,ls=!Do&&/gecko\/(\d+)/i.test(Gl);ls&&+(/Firefox\/(\d+)/.exec(Gl)||[0,0])[1];const K2=!Do&&/Chrome\/(\d+)/.exec(Gl),io=!!K2,kI=K2?+K2[1]:0,ko=!Do&&!!Vs&&/Apple Computer/.test(Vs.vendor),nd=ko&&(/Mobile\/\w+/.test(Gl)||!!Vs&&Vs.maxTouchPoints>2),vr=nd||(Vs?/Mac/.test(Vs.platform):!1),G0e=Vs?/Win/.test(Vs.platform):!1,qr=/Android \d/.test(Gl),$p=!!jS&&"webkitFontSmoothing"in jS.documentElement.style,Y0e=$p?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function J0e(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 ei(e,t){return typeof e=="number"?e:e[t]}function Z0e(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 HS(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=Bh(i)){if(i.nodeType!=1)continue;let l=i,a=l==s.body,c=a?J0e(s):Z0e(l),u=0,d=0;if(t.top<c.top+ei(o,"top")?d=-(c.top-t.top+ei(r,"top")):t.bottom>c.bottom-ei(o,"bottom")&&(d=t.bottom-t.top>c.bottom-c.top?t.top+ei(r,"top")-c.top:t.bottom-c.bottom+ei(r,"bottom")),t.left<c.left+ei(o,"left")?u=-(c.left-t.left+ei(r,"left")):t.right>c.right-ei(o,"right")&&(u=t.right-c.right+ei(r,"right")),u||d)if(a)s.defaultView.scrollBy(u,d);else{let f=l.scrollLeft,h=l.scrollTop;d&&(l.scrollTop+=d),u&&(l.scrollLeft+=u);let p=l.scrollLeft-f,m=l.scrollTop-h;t={left:t.left-p,top:t.top-m,right:t.right-p,bottom:t.bottom-m}}if(a||/^(fixed|sticky)$/.test(getComputedStyle(i).position))break}}function X0e(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:CI(e.dom)}}function CI(e){let t=[],n=e.ownerDocument;for(let o=e;o&&(t.push({dom:o,top:o.scrollTop,left:o.scrollLeft}),e!=n);o=Bh(o));return t}function Q0e({refDOM:e,refTop:t,stack:n}){let o=e?e.getBoundingClientRect().top:0;SI(n,o==0?0:o-t)}function SI(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 Mc=null;function e_e(e){if(e.setActive)return e.setActive();if(Mc)return e.focus(Mc);let t=CI(e);e.focus(Mc==null?{get preventScroll(){return Mc={preventScroll:!0},!0}}:void 0),Mc||(Mc=!1,SI(t,0))}function $I(e,t){let n,o=2e8,r,s=0,i=t.top,l=t.top,a,c;for(let u=e.firstChild,d=0;u;u=u.nextSibling,d++){let f;if(u.nodeType==1)f=u.getClientRects();else if(u.nodeType==3)f=ii(u).getClientRects();else continue;for(let h=0;h<f.length;h++){let p=f[h];if(p.top<=i&&p.bottom>=l){i=Math.max(p.bottom,i),l=Math.min(p.top,l);let m=p.left>t.left?p.left-t.left:p.right<t.left?t.left-p.right:0;if(m<o){n=u,o=m,r=m&&n.nodeType==3?{left:p.right<t.left?p.right:p.left,top:t.top}:t,u.nodeType==1&&m&&(s=d+(t.left>=(p.left+p.right)/2?1:0));continue}}else p.top>t.top&&!a&&p.left<=t.left&&p.right>=t.left&&(a=u,c={left:Math.max(p.left,Math.min(p.right,t.left)),top:p.top});!n&&(t.left>=p.right&&t.top>=p.top||t.left>=p.left&&t.top>=p.bottom)&&(s=d+1)}}return!n&&a&&(n=a,r=c,o=0),n&&n.nodeType==3?t_e(n,r):!n||o&&n.nodeType==1?{node:e,offset:s}:$I(n,r)}function t_e(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=Xi(o,1);if(s.top!=s.bottom&&rk(t,s))return{node:e,offset:r+(t.left>=(s.left+s.right)/2?1:0)}}return{node:e,offset:0}}function rk(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function n_e(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}function o_e(e,t,n){let{node:o,offset:r}=$I(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 r_e(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 EI(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 c=l[a];if(rk(t,c))return EI(i,t,c)}}if((s=(s+1)%o)==r)break}return e}function s_e(e,t){let n=e.dom.ownerDocument,o,r=0,s=K0e(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 c=e.dom.getBoundingClientRect();if(!rk(t,c)||(i=EI(e.dom,t,c),!i))return null}if(ko)for(let c=i;o&&c;c=Bh(c))c.draggable&&(o=void 0);if(i=n_e(i,t),o){if(ls&&o.nodeType==1&&(r=Math.min(r,o.childNodes.length),r<o.childNodes.length)){let u=o.childNodes[r],d;u.nodeName=="IMG"&&(d=u.getBoundingClientRect()).right<=t.left&&d.bottom>t.top&&r++}let c;$p&&r&&o.nodeType==1&&(c=o.childNodes[r-1]).nodeType==1&&c.contentEditable=="false"&&c.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=r_e(e,o,r,t))}l==null&&(l=o_e(e,i,t));let a=e.docView.nearestDesc(i,!0);return{pos:l,inside:a?a.posAtStart-a.border:-1}}function US(e){return e.top<e.bottom||e.left<e.right}function Xi(e,t){let n=e.getClientRects();if(n.length){let o=n[t<0?0:n.length-1];if(US(o))return o}return Array.prototype.find.call(n,US)||e.getBoundingClientRect()}const i_e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function xI(e,t,n){let{node:o,offset:r,atom:s}=e.docView.domFromPos(t,n<0?-1:1),i=$p||ls;if(o.nodeType==3)if(i&&(i_e.test(o.nodeValue)||(n<0?!r:r==o.nodeValue.length))){let a=Xi(ii(o,r,r),n);if(ls&&r&&/\s/.test(o.nodeValue[r-1])&&r<o.nodeValue.length){let c=Xi(ii(o,r-1,r-1),-1);if(c.top==a.top){let u=Xi(ii(o,r,r+1),-1);if(u.top!=a.top)return Ud(u,u.left<c.left)}}return a}else{let a=r,c=r,u=n<0?1:-1;return n<0&&!r?(c++,u=-1):n>=0&&r==o.nodeValue.length?(a--,u=1):n<0?a--:c++,Ud(Xi(ii(o,a,c),u),u<0)}if(!e.state.doc.resolve(t-(s||0)).parent.inlineContent){if(s==null&&r&&(n<0||r==Ts(o))){let a=o.childNodes[r-1];if(a.nodeType==1)return Av(a.getBoundingClientRect(),!1)}if(s==null&&r<Ts(o)){let a=o.childNodes[r];if(a.nodeType==1)return Av(a.getBoundingClientRect(),!0)}return Av(o.getBoundingClientRect(),n>=0)}if(s==null&&r&&(n<0||r==Ts(o))){let a=o.childNodes[r-1],c=a.nodeType==3?ii(a,Ts(a)-(i?0:1)):a.nodeType==1&&(a.nodeName!="BR"||!a.nextSibling)?a:null;if(c)return Ud(Xi(c,1),!1)}if(s==null&&r<Ts(o)){let a=o.childNodes[r];for(;a.pmViewDesc&&a.pmViewDesc.ignoreForCoords;)a=a.nextSibling;let c=a?a.nodeType==3?ii(a,0,i?0:1):a.nodeType==1?a:null:null;if(c)return Ud(Xi(c,-1),!0)}return Ud(Xi(o.nodeType==3?ii(o):o,-n),n>=0)}function Ud(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 Av(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 TI(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 l_e(e,t,n){let o=t.selection,r=n=="up"?o.$from:o.$to;return TI(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=xI(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=ii(l,0,l.nodeValue.length).getClientRects();else continue;for(let c=0;c<a.length;c++){let u=a[c];if(u.bottom>u.top+1&&(n=="up"?i.top-u.top>(u.bottom-i.top)*2:u.bottom-i.bottom>(i.bottom-u.top)*2))return!1}}return!0})}const a_e=/[\u0590-\u08ac]/;function c_e(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?!a_e.test(o.parent.textContent)||!l.modify?n=="left"||n=="backward"?s:i:TI(e,t,()=>{let{focusNode:a,focusOffset:c,anchorNode:u,anchorOffset:d}=e.domSelectionRange(),f=l.caretBidiLevel;l.modify("move",n,"character");let h=o.depth?e.docView.domAfterPos(o.before()):e.dom,{focusNode:p,focusOffset:m}=e.domSelectionRange(),v=p&&!h.contains(p.nodeType==1?p:p.parentNode)||a==p&&c==m;try{l.collapse(u,d),a&&(a!=u||c!=d)&&l.extend&&l.extend(a,c)}catch{}return f!=null&&(l.caretBidiLevel=f),v}):o.pos==o.start()||o.pos==o.end()}let WS=null,qS=null,KS=!1;function u_e(e,t,n){return WS==t&&qS==n?KS:(WS=t,qS=n,KS=n=="up"||n=="down"?l_e(e,t,n):c_e(e,t,n))}const Ar=0,GS=1,Ta=2,zs=3;class Ep{constructor(t,n,o,r){this.parent=t,this.children=n,this.dom=o,this.contentDOM=r,this.dirty=Ar,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>Zn(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 AI){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 MI&&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?Zn(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?Zn(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],c=i+a.size;if(r==-1&&t<=c){let u=i+a.border;if(t>=u&&n<=c-a.border&&a.node&&a.contentDOM&&this.contentDOM.contains(a.contentDOM))return a.parseRange(t,n,u);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=Zn(f.dom)+1;break}t-=f.size}r==-1&&(r=0)}if(r>-1&&(c>n||l==this.children.length-1)){n=c;for(let u=l+1;u<this.children.length;u++){let d=this.children[u];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(-1)){s=Zn(d.dom);break}n+=d.size}s==-1&&(s=this.contentDOM.childNodes.length);break}i=c}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,h=0;f<this.children.length;f++){let p=this.children[f],m=h+p.size;if(s>h&&i<m)return p.setSelection(t-h-p.border,n-h-p.border,o,r);h=m}let l=this.domFromPos(t,t?-1:1),a=n==t?l:this.domFromPos(n,n?-1:1),c=o.getSelection(),u=!1;if((ls||ko)&&t==n){let{node:f,offset:h}=l;if(f.nodeType==3){if(u=!!(h&&f.nodeValue[h-1]==` |
| 115 |
`),u&&h==f.nodeValue.length)for(let p=f,m;p;p=p.parentNode){if(m=p.nextSibling){m.nodeName=="BR"&&(l=a={node:m.parentNode,offset:Zn(m)+1});break}let v=p.pmViewDesc;if(v&&v.node&&v.node.isBlock)break}}else{let p=f.childNodes[h-1];u=p&&(p.nodeName=="BR"||p.contentEditable=="false")}}if(ls&&c.focusNode&&c.focusNode!=a.node&&c.focusNode.nodeType==1){let f=c.focusNode.childNodes[c.focusOffset];f&&f.contentEditable=="false"&&(r=!0)}if(!(r||u&&ko)&&ic(l.node,l.offset,c.anchorNode,c.anchorOffset)&&ic(a.node,a.offset,c.focusNode,c.focusOffset))return;let d=!1;if((c.extend||t==n)&&!u){c.collapse(l.node,l.offset);try{t!=n&&c.extend(a.node,a.offset),d=!0}catch{}}if(!d){if(t>n){let h=l;l=a,a=h}let f=document.createRange();f.setEnd(a.node,a.offset),f.setStart(l.node,l.offset),c.removeAllRanges(),c.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?Ta:GS,t==l&&n==a&&(s.contentLost||s.dom.parentNode!=this.contentDOM)?s.dirty=zs:s.markDirty(t-l,n-l);return}else s.dirty=s.dom==s.contentDOM&&s.dom.parentNode==this.contentDOM&&!s.children.length?Ta:zs}o=i}this.dirty=Ta}markParentsDirty(){let t=1;for(let n=this.parent;n;n=n.parent,t++){let o=t==1?Ta:GS;n.dirty<o&&(n.dirty=o)}}get domAtom(){return!1}get ignoreForCoords(){return!1}isText(t){return!1}}class MI extends Ep{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==Ar&&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 d_e extends Ep{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 lc extends Ep{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=Wl.renderSpec(document,n.type.spec.toDOM(n,o),null,n.attrs)),new lc(t,n,i.dom,i.contentDOM||i.dom)}parseRule(){return this.dirty&zs||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return this.dirty!=zs&&this.mark.eq(t)}markDirty(t,n){if(super.markDirty(t,n),this.dirty!=Ar){let o=this.parent;for(;!o.node;)o=o.parent;o.dirty<this.dirty&&(o.dirty=this.dirty),this.dirty=Ar}}slice(t,n,o){let r=lc.create(this.parent,this.mark,!0,o),s=this.children,i=this.size;n<i&&(s=J2(s,n,i,o)),t>0&&(s=J2(s,0,t,o));for(let l=0;l<s.length;l++)s[l].parent=r;return r.children=s,r}}class Tl extends Ep{constructor(t,n,o,r,s,i,l,a,c){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,c=l&&l(n,s,()=>{if(!a)return i;if(a.parent)return a.parent.posBeforeChild(a)},o,r),u=c&&c.dom,d=c&&c.contentDOM;if(n.isText){if(!u)u=document.createTextNode(n.text);else if(u.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else u||({dom:u,contentDOM:d}=Wl.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!d&&!n.isText&&u.nodeName!="BR"&&(u.hasAttribute("contenteditable")||(u.contentEditable="false"),n.type.spec.draggable&&(u.draggable=!0));let f=u;return u=NI(u,o,n),c?a=new f_e(t,n,o,r,u,d||null,f,c,s,i+1):n.isText?new i_(t,n,o,r,u,f,s):new Tl(t,n,o,r,u,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=()=>Te.empty)}return t}matchesNode(t,n,o){return this.dirty==Ar&&t.eq(this.node)&&Y2(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 p_e(this,i&&i.node,t);__e(this.node,this.innerDeco,(c,u,d)=>{c.spec.marks?a.syncToMarks(c.spec.marks,o,t):c.type.side>=0&&!d&&a.syncToMarks(u==this.node.childCount?Vt.none:this.node.child(u).marks,o,t),a.placeWidget(c,t,r)},(c,u,d,f)=>{a.syncToMarks(c.marks,o,t);let h;a.findNodeMatch(c,u,d,f)||l&&t.state.selection.from>r&&t.state.selection.to<r+c.nodeSize&&(h=a.findIndexWithChild(s.node))>-1&&a.updateNodeAt(c,u,d,h,t)||a.updateNextNode(c,u,d,t,f,r)||a.addNode(c,u,d,t,r),r+=c.nodeSize}),a.syncToMarks([],o,t),this.node.isTextblock&&a.addTextblockHacks(),a.destroyRest(),(a.changed||this.dirty==Ta)&&(i&&this.protectLocalComposition(t,i),OI(this.contentDOM,this.children,t),nd&&v_e(this.dom))}localCompositionInfo(t,n){let{from:o,to:r}=t.state.selection;if(!(t.state.selection instanceof lt)||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=y_e(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 d_e(this,s,n,r);t.input.compositionNodes.push(i),this.children=J2(this.children,o,o+r.length,t,i)}update(t,n,o,r){return this.dirty==zs||!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=Ar}updateOuterDeco(t){if(Y2(t,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,o=this.dom;this.dom=II(this.dom,this.nodeDOM,G2(this.outerDeco,this.node,n),G2(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 YS(e,t,n,o,r){NI(o,t,e);let s=new Tl(void 0,e,t,n,o,o,o,r,0);return s.contentDOM&&s.updateChildren(r,0),s}class i_ extends Tl{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==zs||this.dirty!=Ar&&!this.inParent()||!t.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=Ar||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=Ar,!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 i_(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=zs)}get domAtom(){return!1}isText(t){return this.node.text==t}}class AI extends Ep{parseRule(){return{ignore:!0}}matchesHack(t){return this.dirty==Ar&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class f_e extends Tl{constructor(t,n,o,r,s,i,l,a,c,u){super(t,n,o,r,s,i,l,c,u),this.spec=a}update(t,n,o,r){if(this.dirty==zs)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 OI(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=JS(o),r=!0;o=o.nextSibling}else r=!0,e.insertBefore(l,o);if(i instanceof lc){let a=o?o.previousSibling:e.lastChild;OI(i.contentDOM,i.children,n),o=a?a.nextSibling:e.firstChild}}for(;o;)o=JS(o),r=!0;r&&n.trackWrites==e&&(n.trackWrites=null)}const Zf=function(e){e&&(this.nodeName=e)};Zf.prototype=Object.create(null);const Ma=[new Zf];function G2(e,t,n){if(e.length==0)return Ma;let o=n?Ma[0]:new Zf,r=[o];for(let s=0;s<e.length;s++){let i=e[s].type.attrs;if(i){i.nodeName&&r.push(o=new Zf(i.nodeName));for(let l in i){let a=i[l];a!=null&&(n&&r.length==1&&r.push(o=new Zf(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 II(e,t,n,o){if(n==Ma&&o==Ma)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=Ma[0]),r=a}h_e(r,l||Ma[0],i)}return r}function h_e(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 NI(e,t,n){return II(e,e,Ma,G2(t,n,e.nodeType!=1))}function Y2(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 JS(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}class p_e{constructor(t,n,o){this.lock=n,this.view=o,this.index=0,this.stack=[],this.changed=!1,this.top=t,this.preMatch=m_e(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=Ar,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 c=this.top.children[a];if(c.matchesMark(t[s])&&!this.isLocked(c.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=lc.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 c=this.top.children[l];if(c.matchesNode(t,n,o)&&!this.preMatch.matched.has(c)){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==zs&&i.dom==i.contentDOM&&(i.dirty=Ta),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 Tl){let c=this.preMatch.matched.get(a);if(c!=null&&c!=s)return!1;let u=a.dom,d,f=this.isLocked(u)&&!(t.isText&&a.node&&a.node.isText&&a.nodeDOM.nodeValue==t.text&&a.dirty!=zs&&Y2(n,a.outerDeco));if(!f&&a.update(t,n,o,r))return this.destroyBetween(this.index,l),a.dom!=u&&(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=Ta,d.updateChildren(r,i+1),d.dirty=Ar),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=Tl.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=Tl.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 MI(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 lc;)n=t,t=n.children[n.children.length-1];(!t||!(t instanceof i_)||/\n$/.test(t.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(t.node.text))&&((ko||io)&&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 AI(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 m_e(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 c=n.children[o-1];if(c instanceof lc)n=c,o=c.children.length;else{l=c,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 g_e(e,t){return e.type.side-t.type.side}function __e(e,t,n,o){let r=t.locals(e),s=0;if(r.length==0){for(let c=0;c<e.childCount;c++){let u=e.child(c);o(u,r,t.forChild(s,u),c),s+=u.nodeSize}return}let i=0,l=[],a=null;for(let c=0;;){let u,d;for(;i<r.length&&r[i].to==s;){let v=r[i++];v.widget&&(u?(d||(d=[u])).push(v):u=v)}if(u)if(d){d.sort(g_e);for(let v=0;v<d.length;v++)n(d[v],c,!!a)}else n(u,c,!!a);let f,h;if(a)h=-1,f=a,a=null;else if(c<e.childCount)h=c,f=e.child(c++);else break;for(let v=0;v<l.length;v++)l[v].to<=s&&l.splice(v--,1);for(;i<r.length&&r[i].from<=s&&r[i].to>s;)l.push(r[i++]);let p=s+f.nodeSize;if(f.isText){let v=p;i<r.length&&r[i].from<v&&(v=r[i].from);for(let y=0;y<l.length;y++)l[y].to<v&&(v=l[y].to);v<p&&(a=f.cut(v-s),f=f.cut(0,v-s),p=v,h=-1)}else for(;i<r.length&&r[i].to<p;)i++;let m=f.isInline&&!f.isLeaf?l.filter(v=>!v.inline):l.slice();o(f,m,t.forChild(s,f),h),s=p}}function v_e(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 y_e(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 c=e.child(r++);if(s+=c.nodeSize,!c.isText)break;a+=c.text}if(s>=n){if(s>=o&&a.slice(o-t.length-l,o-l)==t)return o-t.length;let c=l<o?a.lastIndexOf(t,o-l-1):-1;if(c>=0&&c+t.length+l>=n)return l+c;if(n==o&&a.length>=o+t.length-l&&a.slice(o-l,o-l+t.length)==t)return o}}return-1}function J2(e,t,n,o,r){let s=[];for(let i=0,l=0;i<e.length;i++){let a=e[i],c=l,u=l+=a.size;c>=n||u<=t?s.push(a):(c<t&&s.push(a.slice(0,t-c,o)),r&&(s.push(r),r=void 0),u>n&&s.push(a.slice(n-c,a.size,o)))}return s}function sk(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,c;if(s_(n)){for(a=l;r&&!r.node;)r=r.parent;let u=r.node;if(r&&u.isAtom&&at.isSelectable(u)&&r.parent&&!(u.isInline&&W0e(n.focusNode,n.focusOffset,r.dom))){let d=r.posBefore;c=new at(i==d?l:o.resolve(d))}}else{let u=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(u<0)return null;a=o.resolve(u)}if(!c){let u=t=="pointer"||e.state.selection.head<l.pos&&!s?1:-1;c=ik(e,a,l,u)}return c}function PI(e){return e.editable?e.hasFocus():RI(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function _i(e,t=!1){let n=e.state.selection;if(LI(e,n),!!PI(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&io){let o=e.domSelectionRange(),r=e.domObserver.currentSelection;if(o.anchorNode&&r.anchorNode&&ic(o.anchorNode,o.anchorOffset,r.anchorNode,r.anchorOffset)){e.input.mouseDown.delayedSelectionSync=!0,e.domObserver.setCurSelection();return}}if(e.domObserver.disconnectSelection(),e.cursorWrapper)w_e(e);else{let{anchor:o,head:r}=n,s,i;ZS&&!(n instanceof lt)&&(n.$from.parent.inlineContent||(s=XS(e,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(i=XS(e,n.to))),e.docView.setSelection(o,r,e.root,t),ZS&&(s&&QS(s),i&&QS(i)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&b_e(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}const ZS=ko||io&&kI<63;function XS(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(ko&&r&&r.contentEditable=="false")return Ov(r);if((!r||r.contentEditable=="false")&&(!s||s.contentEditable=="false")){if(r)return Ov(r);if(s)return Ov(s)}}function Ov(e){return e.contentEditable="true",ko&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function QS(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function b_e(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(()=>{(!PI(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function w_e(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,Zn(o)+1):n.setStart(o,0),n.collapse(!0),t.removeAllRanges(),t.addRange(n),!r&&!e.state.selection.visible&&Do&&xl<=11&&(o.disabled=!0,o.disabled=!1)}function LI(e,t){if(t instanceof at){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(e$(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else e$(e)}function e$(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function ik(e,t,n,o){return e.someProp("createSelectionBetween",r=>r(e,t,n))||lt.between(t,n,o)}function t$(e){return e.editable&&!e.hasFocus()?!1:RI(e)}function RI(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 k_e(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return ic(t.node,t.offset,n.anchorNode,n.anchorOffset)}function Z2(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&&ft.findFrom(s,t)}function ul(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function n$(e,t,n){let o=e.state.selection;if(o instanceof lt)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 ul(e,new lt(o.$anchor,i))}else if(o.empty){if(e.endOfTextblock(t>0?"forward":"backward")){let r=Z2(e.state,t);return r&&r instanceof at?ul(e,r):!1}else if(!(vr&&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?at.isSelectable(s)?ul(e,new at(t<0?e.state.doc.resolve(r.pos-s.nodeSize):r)):$p?ul(e,new lt(e.state.doc.resolve(t<0?l:l+s.nodeSize))):!1:!1}}else return!1;else{if(o instanceof at&&o.node.isInline)return ul(e,new lt(t>0?o.$to:o.$from));{let r=Z2(e.state,t);return r?ul(e,r):!1}}}function jg(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function Xf(e,t){let n=e.pmViewDesc;return n&&n.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function Ac(e,t){return t<0?C_e(e):S_e(e)}function C_e(e){let t=e.domSelectionRange(),n=t.focusNode,o=t.focusOffset;if(!n)return;let r,s,i=!1;for(ls&&n.nodeType==1&&o<jg(n)&&Xf(n.childNodes[o],-1)&&(i=!0);;)if(o>0){if(n.nodeType!=1)break;{let l=n.childNodes[o-1];if(Xf(l,-1))r=n,s=--o;else if(l.nodeType==3)n=l,o=n.nodeValue.length;else break}}else{if(FI(n))break;{let l=n.previousSibling;for(;l&&Xf(l,-1);)r=n.parentNode,s=Zn(l),l=l.previousSibling;if(l)n=l,o=jg(n);else{if(n=n.parentNode,n==e.dom)break;o=0}}}i?X2(e,n,o):r&&X2(e,r,s)}function S_e(e){let t=e.domSelectionRange(),n=t.focusNode,o=t.focusOffset;if(!n)return;let r=jg(n),s,i;for(;;)if(o<r){if(n.nodeType!=1)break;let l=n.childNodes[o];if(Xf(l,1))s=n,i=++o;else break}else{if(FI(n))break;{let l=n.nextSibling;for(;l&&Xf(l,1);)s=l.parentNode,i=Zn(l)+1,l=l.nextSibling;if(l)n=l,o=0,r=jg(n);else{if(n=n.parentNode,n==e.dom)break;o=r=0}}}s&&X2(e,s,i)}function FI(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function $_e(e,t){for(;e&&t==e.childNodes.length&&!Sp(e);)t=Zn(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 E_e(e,t){for(;e&&!t&&!Sp(e);)t=Zn(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 X2(e,t,n){if(t.nodeType!=3){let s,i;(i=$_e(t,n))?(t=i,n=0):(s=E_e(t,n))&&(t=s,n=s.nodeValue.length)}let o=e.domSelection();if(!o)return;if(s_(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&&_i(e)},50)}function o$(e,t){let n=e.state.doc.resolve(t);if(!(io||G0e)&&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 r$(e,t,n){let o=e.state.selection;if(o instanceof lt&&!o.empty||n.indexOf("s")>-1||vr&&n.indexOf("m")>-1)return!1;let{$from:r,$to:s}=o;if(!r.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let i=Z2(e.state,t);if(i&&i instanceof at)return ul(e,i)}if(!r.parent.inlineContent){let i=t<0?r:s,l=o instanceof lr?ft.near(i,t):ft.findFrom(i,t);return l?ul(e,l):!1}return!1}function s$(e,t){if(!(e.state.selection instanceof lt))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 i$(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function x_e(e){if(!ko||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;i$(e,o,"true"),setTimeout(()=>i$(e,o,"false"),20)}return!1}function T_e(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function M_e(e,t){let n=t.keyCode,o=T_e(t);if(n==8||vr&&n==72&&o=="c")return s$(e,-1)||Ac(e,-1);if(n==46&&!t.shiftKey||vr&&n==68&&o=="c")return s$(e,1)||Ac(e,1);if(n==13||n==27)return!0;if(n==37||vr&&n==66&&o=="c"){let r=n==37?o$(e,e.state.selection.from)=="ltr"?-1:1:-1;return n$(e,r,o)||Ac(e,r)}else if(n==39||vr&&n==70&&o=="c"){let r=n==39?o$(e,e.state.selection.from)=="ltr"?1:-1:1;return n$(e,r,o)||Ac(e,r)}else{if(n==38||vr&&n==80&&o=="c")return r$(e,-1,o)||Ac(e,-1);if(n==40||vr&&n==78&&o=="c")return x_e(e)||r$(e,1,o)||Ac(e,1);if(o==(vr?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function DI(e,t){e.someProp("transformCopied",h=>{t=h(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 h=o.firstChild;n.push(h.type.name,h.attrs!=h.type.defaultAttrs?h.attrs:null),o=h.content}let i=e.someProp("clipboardSerializer")||Wl.fromSchema(e.state.schema),l=UI(),a=l.createElement("div");a.appendChild(i.serializeFragment(o,{document:l}));let c=a.firstChild,u,d=0;for(;c&&c.nodeType==1&&(u=HI[c.nodeName.toLowerCase()]);){for(let h=u.length-1;h>=0;h--){let p=l.createElement(u[h]);for(;a.firstChild;)p.appendChild(a.firstChild);a.appendChild(p),d++}c=a.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${r} ${s}${d?` -${d}`:""} ${JSON.stringify(n)}`);let f=e.someProp("clipboardTextSerializer",h=>h(t,e))||t.content.textBetween(0,t.content.size,` |
| 116 |
|
| 117 |
`);return{dom:a,text:f,slice:t}}function BI(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 ze(Te.from(e.state.schema.text(t.replace(/\r\n?/g,` |
| 118 |
`))),0,0):ze.empty;let d=e.someProp("clipboardTextParser",f=>f(t,r,o,e));if(d)l=d;else{let f=r.marks(),{schema:h}=e.state,p=Wl.fromSchema(h);i=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(m=>{let v=i.appendChild(document.createElement("p"));m&&v.appendChild(p.serializeNode(h.text(m,f)))})}}else e.someProp("transformPastedHTML",d=>{n=d(n,e)}),i=I_e(n),$p&&N_e(i);let c=i&&i.querySelector("[data-pm-slice]"),u=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(u&&u[3])for(let d=+u[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")||rc.fromSchema(e.state.schema)).parseSlice(i,{preserveWhitespace:!!(a||u),context:r,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!A_e.test(f.parentNode.nodeName)?{ignore:!0}:null}})),u)l=P_e(l$(l,+u[1],+u[2]),u[4]);else if(l=ze.maxOpen(O_e(l.content,r),!0),l.openStart||l.openEnd){let d=0,f=0;for(let h=l.content.firstChild;d<l.openStart&&!h.type.spec.isolating;d++,h=h.firstChild);for(let h=l.content.lastChild;f<l.openEnd&&!h.type.spec.isolating;f++,h=h.lastChild);l=l$(l,d,f)}return e.someProp("transformPasted",d=>{l=d(l,e)}),l}const A_e=/^(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 O_e(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),c;if(!a)return i=null;if(c=i.length&&s.length&&zI(a,s,l,i[i.length-1],0))i[i.length-1]=c;else{i.length&&(i[i.length-1]=jI(i[i.length-1],s.length));let u=VI(l,a);i.push(u),r=r.matchType(u.type),s=a}}),i)return Te.from(i)}return e}function VI(e,t,n=0){for(let o=t.length-1;o>=n;o--)e=t[o].create(null,Te.from(e));return e}function zI(e,t,n,o,r){if(r<e.length&&r<t.length&&e[r]==t[r]){let s=zI(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(Te.from(VI(n,e,r+1))))}}function jI(e,t){if(t==0)return e;let n=e.content.replaceChild(e.childCount-1,jI(e.lastChild,t-1)),o=e.contentMatchAt(e.childCount).fillBefore(Te.empty,!0);return e.copy(n.append(o))}function Q2(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=Q2(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(Te.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,i.copy(l))}function l$(e,t,n){return t<e.openStart&&(e=new ze(Q2(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new ze(Q2(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}const HI={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 a$=null;function UI(){return a$||(a$=document.implementation.createHTMLDocument("title"))}function I_e(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=UI().createElement("div"),o=/<([a-z][^>\s]+)/i.exec(e),r;if((r=o&&HI[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 N_e(e){let t=e.querySelectorAll(io?"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 P_e(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=Te.from(a.create(o[l+1],r)),s++,i++}return new ze(r,s,i)}const Co={},So={},L_e={touchstart:!0,touchmove:!0};class R_e{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 F_e(e){for(let t in Co){let n=Co[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=o=>{B_e(e,o)&&!lk(e,o)&&(e.editable||!(o.type in So))&&n(e,o)},L_e[t]?{passive:!0}:void 0)}ko&&e.dom.addEventListener("input",()=>null),eb(e)}function kl(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function D_e(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 eb(e){e.someProp("handleDOMEvents",t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=o=>lk(e,o))})}function lk(e,t){return e.someProp("handleDOMEvents",n=>{let o=n[t.type];return o?o(e,t)||t.defaultPrevented:!1})}function B_e(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 V_e(e,t){!lk(e,t)&&Co[t.type]&&(e.editable||!(t.type in So))&&Co[t.type](e,t)}So.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!qI(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!(qr&&io&&n.keyCode==13)))if(n.keyCode!=229&&e.domObserver.forceFlush(),nd&&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,va(13,"Enter"))),e.input.lastIOSEnter=0)},200)}else e.someProp("handleKeyDown",o=>o(e,n))||M_e(e,n)?n.preventDefault():kl(e,"key")};So.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)};So.keypress=(e,t)=>{let n=t;if(qI(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||vr&&n.metaKey)return;if(e.someProp("handleKeyPress",r=>r(e,n))){n.preventDefault();return}let o=e.state.selection;if(!(o instanceof lt)||!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 l_(e){return{left:e.clientX,top:e.clientY}}function z_e(e,t){let n=t.x-e.clientX,o=t.y-e.clientY;return n*n+o*o<100}function ak(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 yu(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 j_e(e,t){if(t==-1)return!1;let n=e.state.doc.resolve(t),o=n.nodeAfter;return o&&o.isAtom&&at.isSelectable(o)?(yu(e,new at(n),"pointer"),!0):!1}function H_e(e,t){if(t==-1)return!1;let n=e.state.selection,o,r;n instanceof at&&(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(at.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?(yu(e,at.create(e.state.doc,r),"pointer"),!0):!1}function U_e(e,t,n,o,r){return ak(e,"handleClickOn",t,n,o)||e.someProp("handleClick",s=>s(e,t,o))||(r?H_e(e,n):j_e(e,n))}function W_e(e,t,n,o){return ak(e,"handleDoubleClickOn",t,n,o)||e.someProp("handleDoubleClick",r=>r(e,t,o))}function q_e(e,t,n,o){return ak(e,"handleTripleClickOn",t,n,o)||e.someProp("handleTripleClick",r=>r(e,t,o))||K_e(e,n,o)}function K_e(e,t,n){if(n.button!=0)return!1;let o=e.state.doc;if(t==-1)return o.inlineContent?(yu(e,lt.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)yu(e,lt.create(o,l+1,l+1+i.content.size),"pointer");else if(at.isSelectable(i))yu(e,at.create(o,l),"pointer");else continue;return!0}}function ck(e){return Hg(e)}const WI=vr?"metaKey":"ctrlKey";Co.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let o=ck(e),r=Date.now(),s="singleClick";r-e.input.lastClick.time<500&&z_e(n,e.input.lastClick)&&!n[WI]&&(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(l_(n));i&&(s=="singleClick"?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new G_e(e,i,n,!!o)):(s=="doubleClick"?W_e:q_e)(e,i.pos,i.inside,n)?n.preventDefault():kl(e,"pointer"))};class G_e{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[WI],this.allowDefault=o.shiftKey;let s,i;if(n.inside>-1)s=t.state.doc.nodeAt(n.inside),i=n.inside;else{let u=t.state.doc.resolve(n.pos);s=u.parent,i=u.depth?u.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:c}=t.state;(o.button==0&&s.type.spec.draggable&&s.type.spec.selectable!==!1||c instanceof at&&c.from<=i&&c.to>i)&&(this.mightDrag={node:s,pos:i,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&ls&&!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)),kl(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(()=>_i(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(l_(t))),this.updateAllowDefault(t),this.allowDefault||!n?kl(this.view,"pointer"):U_e(this.view,n.pos,n.inside,t,this.selectNode)?t.preventDefault():t.button==0&&(this.flushed||ko&&this.mightDrag&&!this.mightDrag.node.isAtom||io&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(yu(this.view,ft.near(this.view.state.doc.resolve(n.pos)),"pointer"),t.preventDefault()):kl(this.view,"pointer")}move(t){this.updateAllowDefault(t),kl(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)}}Co.touchstart=e=>{e.input.lastTouch=Date.now(),ck(e),kl(e,"pointer")};Co.touchmove=e=>{e.input.lastTouch=Date.now(),kl(e,"pointer")};Co.contextmenu=e=>ck(e);function qI(e,t){return e.composing?!0:ko&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}const Y_e=qr?5e3:-1;So.compositionstart=So.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$to;if(t.selection instanceof lt&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(o=>o.type.spec.inclusive===!1)))e.markCursor=e.state.storedMarks||n.marks(),Hg(e,!0),e.markCursor=null;else if(Hg(e,!t.selection.empty),ls&&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}KI(e,Y_e)};So.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++,KI(e,20))};function KI(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>Hg(e),t))}function GI(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=Z_e());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function J_e(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let n=H0e(t.focusNode,t.focusOffset),o=U0e(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 Z_e(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}function Hg(e,t=!1){if(!(qr&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),GI(e),t||e.docView&&e.docView.dirty){let n=sk(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 X_e(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 Vh=Do&&xl<15||nd&&Y0e<604;Co.copy=So.cut=(e,t)=>{let n=t,o=e.state.selection,r=n.type=="cut";if(o.empty)return;let s=Vh?null:n.clipboardData,i=o.content(),{dom:l,text:a}=DI(e,i);s?(n.preventDefault(),s.clearData(),s.setData("text/html",l.innerHTML),s.setData("text/plain",a)):X_e(e,l),r&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function Q_e(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function eve(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?zh(e,o.value,null,r,t):zh(e,o.textContent,o.innerHTML,r,t)},50)}function zh(e,t,n,o,r){let s=BI(e,t,n,o,e.state.selection.$from);if(e.someProp("handlePaste",a=>a(e,r,s||ze.empty)))return!0;if(!s)return!1;let i=Q_e(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 YI(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," "):""}So.paste=(e,t)=>{let n=t;if(e.composing&&!qr)return;let o=Vh?null:n.clipboardData,r=e.input.shiftKey&&e.input.lastKeyCode!=45;o&&zh(e,YI(o),o.getData("text/html"),r,n)?n.preventDefault():eve(e,n)};class JI{constructor(t,n,o){this.slice=t,this.move=n,this.node=o}}const ZI=vr?"altKey":"ctrlKey";Co.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(l_(n)),i;if(!(s&&s.pos>=r.from&&s.pos<=(r instanceof at?r.to-1:r.to))){if(o&&o.mightDrag)i=at.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=at.create(e.state.doc,d.posBefore))}}let l=(i||e.state.selection).content(),{dom:a,text:c,slice:u}=DI(e,l);(!n.dataTransfer.files.length||!io||kI>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(Vh?"Text":"text/html",a.innerHTML),n.dataTransfer.effectAllowed="copyMove",Vh||n.dataTransfer.setData("text/plain",c),e.dragging=new JI(u,!n[ZI],i)};Co.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)};So.dragover=So.dragenter=(e,t)=>t.preventDefault();So.drop=(e,t)=>{let n=t,o=e.dragging;if(e.dragging=null,!n.dataTransfer)return;let r=e.posAtCoords(l_(n));if(!r)return;let s=e.state.doc.resolve(r.pos),i=o&&o.slice;i?e.someProp("transformPasted",p=>{i=p(i,e)}):i=BI(e,YI(n.dataTransfer),Vh?null:n.dataTransfer.getData("text/html"),!1,s);let l=!!(o&&!n[ZI]);if(e.someProp("handleDrop",p=>p(e,n,i||ze.empty,l))){n.preventDefault();return}if(!i)return;n.preventDefault();let a=i?Dge(e.state.doc,s.pos,i):s.pos;a==null&&(a=s.pos);let c=e.state.tr;if(l){let{node:p}=o;p?p.replace(c):c.deleteSelection()}let u=c.mapping.map(a),d=i.openStart==0&&i.openEnd==0&&i.content.childCount==1,f=c.doc;if(d?c.replaceRangeWith(u,u,i.content.firstChild):c.replaceRange(u,u,i),c.doc.eq(f))return;let h=c.doc.resolve(u);if(d&&at.isSelectable(i.content.firstChild)&&h.nodeAfter&&h.nodeAfter.sameMarkup(i.content.firstChild))c.setSelection(new at(h));else{let p=c.mapping.map(a);c.mapping.maps[c.mapping.maps.length-1].forEach((m,v,y,E)=>p=E),c.setSelection(ik(e,h,c.doc.resolve(p)))}e.focus(),e.dispatch(c.setMeta("uiEvent","drop"))};Co.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())&&_i(e)},20))};Co.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)};Co.beforeinput=(e,t)=>{if(io&&qr&&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,va(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 So)Co[e]=So[e];function jh(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 Ug{constructor(t,n){this.toDOM=t,this.spec=n||Va,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 Ln(s-o,s-o,this)}valid(){return!0}eq(t){return this==t||t instanceof Ug&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&jh(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class Ml{constructor(t,n){this.attrs=t,this.spec=n||Va}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 Ln(s,i,this)}valid(t,n){return n.from<n.to}eq(t){return this==t||t instanceof Ml&&jh(this.attrs,t.attrs)&&jh(this.spec,t.spec)}static is(t){return t.type instanceof Ml}destroy(){}}class uk{constructor(t,n){this.attrs=t,this.spec=n||Va}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 Ln(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 uk&&jh(this.attrs,t.attrs)&&jh(this.spec,t.spec)}destroy(){}}class Ln{constructor(t,n,o){this.from=t,this.to=n,this.type=o}copy(t,n){return new Ln(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 Ln(t,t,new Ug(n,o))}static inline(t,n,o,r){return new Ln(t,n,new Ml(o,r))}static node(t,n,o,r){return new Ln(t,n,new uk(o,r))}get spec(){return this.type.spec}get inline(){return this.type instanceof Ml}get widget(){return this.type instanceof Ug}}const Uc=[],Va={};class en{constructor(t,n){this.local=t.length?t:Uc,this.children=n.length?n:Uc}static create(t,n){return n.length?Wg(n,t,0,Va):oo}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==oo||t.maps.length==0?this:this.mapInner(t,n,0,0,o||Va)}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?tve(this.children,i||[],t,n,o,r,s):i?new en(i.sort(za),Uc):oo}add(t,n){return n.length?this==oo?en.create(t,n):this.addInner(t,n,0):this}addInner(t,n,o){let r,s=0;t.forEach((l,a)=>{let c=a+o,u;if(u=QI(n,l,c)){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,u,c+1):r.splice(s,0,a,a+l.nodeSize,Wg(u,l,c+1,Va)),s+=3}});let i=XI(s?eN(n):n,-o);for(let l=0;l<i.length;l++)i[l].type.valid(t,i[l])||i.splice(l--,1);return new en(i.length?this.local.concat(i).sort(za):this.local,r||this.children)}remove(t){return t.length==0||this==oo?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 u=0,d;u<t.length;u++)(d=t[u])&&d.from>l&&d.to<a&&(t[u]=null,(i||(i=[])).push(d));if(!i)continue;o==this.children&&(o=this.children.slice());let c=o[s+2].removeInner(i,l+1);c!=oo?o[s+2]=c:(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 en(r,o):oo}forChild(t,n){if(this==oo)return this;if(n.isLeaf)return en.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 Ml){let c=Math.max(s,a.from)-s,u=Math.min(i,a.to)-s;c<u&&(r||(r=[])).push(a.copy(c,u))}}if(r){let l=new en(r.sort(za),Uc);return o?new pl([l,o]):l}return o||oo}eq(t){if(this==t)return!0;if(!(t instanceof en)||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 dk(this.localsInner(t))}localsInner(t){if(this==oo)return Uc;if(t.inlineContent||!this.local.some(Ml.is))return this.local;let n=[];for(let o=0;o<this.local.length;o++)this.local[o].type instanceof Ml||n.push(this.local[o]);return n}forEachSet(t){t(this)}}en.empty=new en([],[]);en.removeOverlap=dk;const oo=en.empty;class pl{constructor(t){this.members=t}map(t,n){const o=this.members.map(r=>r.map(t,n,Va));return pl.from(o)}forChild(t,n){if(n.isLeaf)return en.empty;let o=[];for(let r=0;r<this.members.length;r++){let s=this.members[r].forChild(t,n);s!=oo&&(s instanceof pl?o=o.concat(s.members):o.push(s))}return pl.from(o)}eq(t){if(!(t instanceof pl)||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?dk(o?n:n.sort(za)):Uc}static from(t){switch(t.length){case 0:return oo;case 1:return t[0];default:return new pl(t.every(n=>n instanceof en)?t:t.reduce((n,o)=>n.concat(o instanceof en?o:o.members),[]))}}forEachSet(t){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(t)}}function tve(e,t,n,o,r,s,i){let l=e.slice();for(let c=0,u=s;c<n.maps.length;c++){let d=0;n.maps[c].forEach((f,h,p,m)=>{let v=m-p-(h-f);for(let y=0;y<l.length;y+=3){let E=l[y+1];if(E<0||f>E+u-d)continue;let w=l[y]+u-d;h>=w?l[y+1]=f<=w?-2:-1:f>=u&&v&&(l[y]+=v,l[y+1]+=v)}d+=v}),u=n.maps[c].map(u,-1)}let a=!1;for(let c=0;c<l.length;c+=3)if(l[c+1]<0){if(l[c+1]==-2){a=!0,l[c+1]=-1;continue}let u=n.map(e[c]+s),d=u-r;if(d<0||d>=o.content.size){a=!0;continue}let f=n.map(e[c+1]+s,-1),h=f-r,{index:p,offset:m}=o.content.findIndex(d),v=o.maybeChild(p);if(v&&m==d&&m+v.nodeSize==h){let y=l[c+2].mapInner(n,v,u+1,e[c]+s+1,i);y!=oo?(l[c]=d,l[c+1]=h,l[c+2]=y):(l[c+1]=-2,a=!0)}else a=!0}if(a){let c=nve(l,e,t,n,r,s,i),u=Wg(c,o,0,i);t=u.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<u.children.length;d+=3){let h=u.children[d];for(;f<l.length&&l[f]<h;)f+=3;l.splice(f,0,u.children[d],u.children[d+1],u.children[d+2])}}return new en(t.sort(za),l)}function XI(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 Ln(r.from+t,r.to+t,r.type))}return n}function nve(e,t,n,o,r,s,i){function l(a,c){for(let u=0;u<a.local.length;u++){let d=a.local[u].map(o,r,c);d?n.push(d):i.onRemove&&i.onRemove(a.local[u].spec)}for(let u=0;u<a.children.length;u+=3)l(a.children[u+2],a.children[u]+c+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 QI(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 eN(e){let t=[];for(let n=0;n<e.length;n++)e[n]!=null&&t.push(e[n]);return t}function Wg(e,t,n,o){let r=[],s=!1;t.forEach((l,a)=>{let c=QI(e,l,a+n);if(c){s=!0;let u=Wg(c,l,n+a+1,o);u!=oo&&r.push(a,a+l.nodeSize,u)}});let i=XI(s?eN(e):e,-n).sort(za);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 en(i,r):oo}function za(e,t){return e.from-t.from||e.to-t.to}function dk(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),c$(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),c$(t,r,o.copy(s.from,o.to)));break}}}return t}function c$(e,t,n){for(;t<e.length&&za(n,e[t])>0;)t++;e.splice(t,0,n)}function Iv(e){let t=[];return e.someProp("decorations",n=>{let o=n(e.state);o&&o!=oo&&t.push(o)}),e.cursorWrapper&&t.push(en.create(e.state.doc,[e.cursorWrapper.deco])),pl.from(t)}const ove={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},rve=Do&&xl<=11;class sve{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 ive{constructor(t,n){this.view=t,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new sve,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]);Do&&xl<=11&&o.some(r=>r.type=="childList"&&r.removedNodes.length||r.type=="characterData"&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():this.flush()}),rve&&(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,ove)),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(t$(this.view)){if(this.suppressingSelectionUpdates)return _i(this.view);if(Do&&xl<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&ic(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=Bh(s))n.add(s);for(let s=t.anchorNode;s;s=Bh(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)&&t$(t)&&!this.ignoreSelectionChange(o),s=-1,i=-1,l=!1,a=[];if(t.editable)for(let u=0;u<n.length;u++){let d=this.registerMutation(n[u],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(ls&&a.length){let u=a.filter(d=>d.nodeName=="BR");if(u.length==2){let[d,f]=u;d.parentNode&&d.parentNode.parentNode==f.parentNode?f.remove():d.remove()}else{let{focusNode:d}=this.currentSelection;for(let f of u){let h=f.parentNode;h&&h.nodeName=="LI"&&(!d||cve(t,d)!=h)&&f.remove()}}}let c=null;s<0&&r&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)<Date.now()-300&&s_(o)&&(c=sk(t))&&c.eq(ft.near(t.state.doc.resolve(0),1))?(t.input.lastFocus=0,_i(t),this.currentSelection.set(o),t.scrollToSelection()):(s>-1||r)&&(s>-1&&(t.docView.markDirty(s,i),lve(t)),this.handleDOMChange(s,i,l,a),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(o)||_i(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 u=0;u<t.addedNodes.length;u++){let d=t.addedNodes[u];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(Do&&xl<=11&&t.addedNodes.length)for(let u=0;u<t.addedNodes.length;u++){let{previousSibling:d,nextSibling:f}=t.addedNodes[u];(!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?Zn(r)+1:0,l=o.localPosFromDOM(t.target,i,-1),a=s&&s.parentNode==t.target?Zn(s):t.target.childNodes.length,c=o.localPosFromDOM(t.target,a,1);return{from:l,to:c}}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 u$=new WeakMap,d$=!1;function lve(e){if(!u$.has(e)&&(u$.set(e,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(e.dom).whiteSpace)!==-1)){if(e.requiresGeckoHackNode=ls,d$)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."),d$=!0}}function f$(e,t){let n=t.startContainer,o=t.startOffset,r=t.endContainer,s=t.endOffset,i=e.domAtPos(e.state.selection.anchor);return ic(i.node,i.offset,r,s)&&([n,o,r,s]=[r,s,n,o]),{anchorNode:n,anchorOffset:o,focusNode:r,focusOffset:s}}function ave(e,t){if(t.getComposedRanges){let r=t.getComposedRanges(e.root)[0];if(r)return f$(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?f$(e,n):null}function cve(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 uve(e,t,n){let{node:o,fromOffset:r,toOffset:s,from:i,to:l}=e.docView.parseRange(t,n),a=e.domSelectionRange(),c,u=a.anchorNode;if(u&&e.dom.contains(u.nodeType==1?u:u.parentNode)&&(c=[{node:u,offset:a.anchorOffset}],s_(a)||c.push({node:a.focusNode,offset:a.focusOffset})),io&&e.input.lastKeyCode===8)for(let v=s;v>r;v--){let y=o.childNodes[v-1],E=y.pmViewDesc;if(y.nodeName=="BR"&&!E){s=v;break}if(!E||E.size)break}let d=e.state.doc,f=e.someProp("domParser")||rc.fromSchema(e.state.schema),h=d.resolve(i),p=null,m=f.parse(o,{topNode:h.parent,topMatch:h.parent.contentMatchAt(h.index()),topOpen:!0,from:r,to:s,preserveWhitespace:h.parent.type.whitespace=="pre"?"full":!0,findPositions:c,ruleFromNode:dve,context:h});if(c&&c[0].pos!=null){let v=c[0].pos,y=c[1]&&c[1].pos;y==null&&(y=v),p={anchor:v+i,head:y+i}}return{doc:m,sel:p,from:i,to:l}}function dve(e){let t=e.pmViewDesc;if(t)return t.parseRule();if(e.nodeName=="BR"&&e.parentNode){if(ko&&/^(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||ko&&/^(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 fve=/^(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 hve(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=sk(e,P);if(I&&!e.state.selection.eq(I)){if(io&&qr&&e.input.lastKeyCode===13&&Date.now()-100<e.input.lastKeyCodeTime&&e.someProp("handleKeyDown",V=>V(e,va(13,"Enter"))))return;let D=e.state.tr.setSelection(I);P=="pointer"?D.setMeta("pointer",!0):P=="key"&&D.scrollIntoView(),s&&D.setMeta("composition",s),e.dispatch(D)}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,c=uve(e,t,n),u=e.state.doc,d=u.slice(c.from,c.to),f,h;e.input.lastKeyCode===8&&Date.now()-100<e.input.lastKeyCodeTime?(f=e.state.selection.to,h="end"):(f=e.state.selection.from,h="start"),e.input.lastKeyCode=null;let p=gve(d.content,c.doc.content,c.from,f,h);if((nd&&e.input.lastIOSEnter>Date.now()-225||qr)&&r.some(P=>P.nodeType==1&&!fve.test(P.nodeName))&&(!p||p.endA>=p.endB)&&e.someProp("handleKeyDown",P=>P(e,va(13,"Enter")))){e.input.lastIOSEnter=0;return}if(!p)if(o&&a instanceof lt&&!a.empty&&a.$head.sameParent(a.$anchor)&&!e.composing&&!(c.sel&&c.sel.anchor!=c.sel.head))p={start:a.from,endA:a.to,endB:a.to};else{if(c.sel){let P=h$(e,e.state.doc,c.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&&p.start==p.endB&&e.state.selection instanceof lt&&(p.start>e.state.selection.from&&p.start<=e.state.selection.from+2&&e.state.selection.from>=c.from?p.start=e.state.selection.from:p.endA<e.state.selection.to&&p.endA>=e.state.selection.to-2&&e.state.selection.to<=c.to&&(p.endB+=e.state.selection.to-p.endA,p.endA=e.state.selection.to)),Do&&xl<=11&&p.endB==p.start+1&&p.endA==p.start&&p.start>c.from&&c.doc.textBetween(p.start-c.from-1,p.start-c.from+1)==" "&&(p.start--,p.endA--,p.endB--);let m=c.doc.resolveNoCache(p.start-c.from),v=c.doc.resolveNoCache(p.endB-c.from),y=u.resolve(p.start),E=m.sameParent(v)&&m.parent.inlineContent&&y.end()>=p.endA,w;if((nd&&e.input.lastIOSEnter>Date.now()-225&&(!E||r.some(P=>P.nodeName=="DIV"||P.nodeName=="P"))||!E&&m.pos<c.doc.content.size&&!m.sameParent(v)&&(w=ft.findFrom(c.doc.resolve(m.pos+1),1,!0))&&w.head==v.pos)&&e.someProp("handleKeyDown",P=>P(e,va(13,"Enter")))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>p.start&&mve(u,p.start,p.endA,m,v)&&e.someProp("handleKeyDown",P=>P(e,va(8,"Backspace")))){qr&&io&&e.domObserver.suppressSelectionUpdates();return}io&&qr&&p.endB==p.start&&(e.input.lastAndroidDelete=Date.now()),qr&&!E&&m.start()!=v.start()&&v.parentOffset==0&&m.depth==v.depth&&c.sel&&c.sel.anchor==c.sel.head&&c.sel.head==p.endA&&(p.endB-=2,v=c.doc.resolveNoCache(p.endB-c.from),setTimeout(()=>{e.someProp("handleKeyDown",function(P){return P(e,va(13,"Enter"))})},20));let C=p.start,T=p.endA,$,A,N;if(E){if(m.pos==v.pos)Do&&xl<=11&&m.parentOffset==0&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>_i(e),20)),$=e.state.tr.delete(C,T),A=u.resolve(p.start).marksAcross(u.resolve(p.endA));else if(p.endA==p.endB&&(N=pve(m.parent.content.cut(m.parentOffset,v.parentOffset),y.parent.content.cut(y.parentOffset,p.endA-y.start()))))$=e.state.tr,N.type=="add"?$.addMark(C,T,N.mark):$.removeMark(C,T,N.mark);else if(m.parent.child(m.index()).isText&&m.index()==v.index()-(v.textOffset?0:1)){let P=m.parent.textBetween(m.parentOffset,v.parentOffset);if(e.someProp("handleTextInput",I=>I(e,C,T,P)))return;$=e.state.tr.insertText(P,C,T)}}if($||($=e.state.tr.replace(C,T,c.doc.slice(p.start-c.from,p.endB-c.from))),c.sel){let P=h$(e,$.doc,c.sel);P&&!(io&&qr&&e.composing&&P.empty&&(p.start!=p.endB||e.input.lastAndroidDelete<Date.now()-100)&&(P.head==C||P.head==$.mapping.map(T)-1)||Do&&P.empty&&P.head==C)&&$.setSelection(P)}A&&$.ensureMarks(A),s&&$.setMeta("composition",s),e.dispatch($.scrollIntoView())}function h$(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:ik(e,t.resolve(n.anchor),t.resolve(n.head))}function pve(e,t){let n=e.firstChild.marks,o=t.firstChild.marks,r=n,s=o,i,l,a;for(let u=0;u<o.length;u++)r=o[u].removeFromSet(r);for(let u=0;u<n.length;u++)s=n[u].removeFromSet(s);if(r.length==1&&s.length==0)l=r[0],i="add",a=u=>u.mark(l.addToSet(u.marks));else if(r.length==0&&s.length==1)l=s[0],i="remove",a=u=>u.mark(l.removeFromSet(u.marks));else return null;let c=[];for(let u=0;u<t.childCount;u++)c.push(a(t.child(u)));if(Te.from(c).eq(e))return{mark:l,type:i}}function mve(e,t,n,o,r){if(n-t<=r.pos-o.pos||Nv(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(Nv(s,!0,!0));return!i.parent.isTextblock||i.pos>n||Nv(i,!0,!1)<n?!1:o.parent.content.cut(o.parentOffset).eq(i.parent.content)}function Nv(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 gve(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&&p$(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&&p$(e.textBetween(s-1,s+1))&&(s+=a?1:-1),i=s+(i-l),l=s}return{start:s,endA:i,endB:l}}function p$(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 _ve{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 R_e,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(y$),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=_$(this),g$(this),this.nodeViews=v$(this),this.docView=YS(this.state.doc,m$(this),Iv(this),this.dom,this),this.domObserver=new ive(this,(o,r,s,i)=>hve(this,o,r,s,i)),this.domObserver.start(),F_e(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&&eb(this);let n=this._props;this._props=t,t.plugins&&(t.plugins.forEach(y$),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&&(GI(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 h=v$(this);yve(h,this.nodeViews)&&(this.nodeViews=h,s=!0)}(l||n.handleDOMEvents!=this._props.handleDOMEvents)&&eb(this),this.editable=_$(this),g$(this);let a=Iv(this),c=m$(this),u=r.plugins!=t.plugins&&!r.doc.eq(t.doc)?"reset":t.scrollToSelection>r.scrollToSelection?"to selection":"preserve",d=s||!this.docView.matchesNode(t.doc,c,a);(d||!t.selection.eq(r.selection))&&(i=!0);let f=u=="preserve"&&i&&this.dom.style.overflowAnchor==null&&X0e(this);if(i){this.domObserver.stop();let h=d&&(Do||io)&&!this.composing&&!r.selection.empty&&!t.selection.empty&&vve(r.selection,t.selection);if(d){let p=io?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=J_e(this)),(s||!this.docView.update(t.doc,c,a,this))&&(this.docView.updateOuterDeco(c),this.docView.destroy(),this.docView=YS(t.doc,c,a,this.dom,this)),p&&!this.trackWrites&&(h=!0)}h||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&k_e(this))?_i(this,h):(LI(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),u=="reset"?this.dom.scrollTop=0:u=="to selection"?this.scrollToSelection():f&&Q0e(f)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof at){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&HS(this,n.getBoundingClientRect(),t)}else HS(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 JI(t.slice,t.move,r<0?void 0:at.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(Do){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&&e_e(this.dom),_i(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 s_e(this,t)}coordsAtPos(t,n=1){return xI(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 u_e(this,n||this.state,t)}pasteHTML(t,n){return zh(this,"",t,!1,n||new ClipboardEvent("paste"))}pasteText(t,n){return zh(this,t,null,!0,n||new ClipboardEvent("paste"))}destroy(){this.docView&&(D_e(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Iv(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,z0e())}get isDestroyed(){return this.docView==null}dispatchEvent(t){return V_e(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?ko&&this.root.nodeType===11&&q0e(this.dom.ownerDocument)==this.dom&&ave(this,t)||t:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function m$(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"),[Ln.node(0,e.state.doc.content.size,t)]}function g$(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:Ln.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function _$(e){return!e.someProp("editable",t=>t(e.state)===!1)}function vve(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 v$(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 yve(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 y$(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 tN=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},ot=(e,t,n)=>(tN(e,t,"read from private field"),n?n.call(e):t.get(e)),Wn=(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)},fn=(e,t,n,o)=>(tN(e,t,"write to private field"),o?o.call(e,n):t.set(e,n),n);function Yl(e,t){return e.meta={package:"@milkdown/core",group:"System",...t},e}const nN={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}},hn=Lt({},"editorView"),ff=Lt({},"editorState"),Pv=Lt([],"initTimer"),b$=Lt({},"editor"),Hh=Lt([],"inputRules"),as=Lt([],"prosePlugins"),Uh=Lt([],"remarkPlugins"),tb=Lt([],"nodeView"),nb=Lt([],"markView"),ja=Lt(L2().use(T2).use(I2),"remark"),Qf=Lt({handlers:nN},"remarkStringifyOptions"),b1=Ul("ConfigReady");function bve(e){const t=n=>(n.record(b1),async()=>(await e(n),n.done(b1),()=>{n.clearTimer(b1)}));return Yl(t,{displayName:"Config"}),t}const Ha=Ul("InitReady");function wve(e){const t=n=>(n.inject(b$,e).inject(as,[]).inject(Uh,[]).inject(Hh,[]).inject(tb,[]).inject(nb,[]).inject(Qf,{handlers:nN}).inject(ja,L2().use(T2).use(I2)).inject(Pv,[b1]).record(Ha),async()=>{await n.waitTimers(Pv);const o=n.get(Qf);return n.set(ja,L2().use(T2).use(I2,o)),n.done(Ha),()=>{n.remove(b$).remove(as).remove(Uh).remove(Hh).remove(tb).remove(nb).remove(Qf).remove(ja).remove(Pv).clearTimer(Ha)}});return Yl(t,{displayName:"Init"}),t}const Is=Ul("SchemaReady"),Lv=Lt([],"schemaTimer"),Qr=Lt({},"schema"),bu=Lt([],"nodes"),wu=Lt([],"marks");function w$(e){var t;return{...e,parseDOM:(t=e.parseDOM)==null?void 0:t.map(n=>({priority:e.priority,...n}))}}const oN=e=>(e.inject(Qr,{}).inject(bu,[]).inject(wu,[]).inject(Lv,[Ha]).record(Is),async()=>{await e.waitTimers(Lv);const t=e.get(ja),n=e.get(Uh).reduce((i,l)=>i.use(l.plugin,l.options),t);e.set(ja,n);const o=Object.fromEntries(e.get(bu).map(([i,l])=>[i,w$(l)])),r=Object.fromEntries(e.get(wu).map(([i,l])=>[i,w$(l)])),s=new Fhe({nodes:o,marks:r});return e.set(Qr,s),e.done(Is),()=>{e.remove(Qr).remove(bu).remove(wu).remove(Lv).clearTimer(Is)}});Yl(oN,{displayName:"Schema"});var Wc,da;let rN=class{constructor(){Wn(this,Wc,void 0),Wn(this,da,void 0),fn(this,Wc,new qA),fn(this,da,null),this.setCtx=t=>{fn(this,da,t)}}get ctx(){return ot(this,da)}create(t,n){const o=t.create(ot(this,Wc).sliceMap);return o.set(n),o}get(t){return ot(this,Wc).get(t).get()}remove(t){return ot(this,Wc).remove(t)}call(t,n){if(ot(this,da)==null)throw dhe();const o=this.get(t)(n),r=ot(this,da).get(hn);return o(r.state,r.dispatch,r)}};Wc=new WeakMap,da=new WeakMap;function kve(e="cmdKey"){return Lt(()=>()=>!1,e)}const Ot=Lt(new rN,"commands"),Rv=Lt([Is],"commandsTimer"),eh=Ul("CommandsReady"),sN=e=>{const t=new rN;return t.setCtx(e),e.inject(Ot,t).inject(Rv,[Is]).record(eh),async()=>(await e.waitTimers(Rv),e.done(eh),()=>{e.remove(Ot).remove(Rv).clearTimer(eh)})};Yl(sN,{displayName:"Commands"});const w1=Ul("ParserReady"),iN=()=>{throw V3()},ku=Lt(iN,"parser"),Fv=Lt([],"parserTimer"),lN=e=>(e.inject(ku,iN).inject(Fv,[Is]).record(w1),async()=>{await e.waitTimers(Fv);const t=e.get(ja),n=e.get(Qr);return e.set(ku,_ge.create(n,t)),e.done(w1),()=>{e.remove(ku).remove(Fv).clearTimer(w1)}});Yl(lN,{displayName:"Parser"});const th=Ul("SerializerReady"),Dv=Lt([],"serializerTimer"),aN=()=>{throw V3()},Cu=Lt(aN,"serializer"),cN=e=>(e.inject(Cu,aN).inject(Dv,[Is]).record(th),async()=>{await e.waitTimers(Dv);const t=e.get(ja),n=e.get(Qr);return e.set(Cu,yge.create(n,t)),e.done(th),()=>{e.remove(Cu).remove(Dv).clearTimer(th)}});Yl(cN,{displayName:"Serializer"});const k1=Lt("","defaultValue"),C1=Lt(e=>e,"stateOptions"),Bv=Lt([],"editorStateTimer"),S1=Ul("EditorStateReady");function Cve(e,t,n){if(typeof e=="string")return t(e);if(e.type==="html")return rc.fromSchema(n).parse(e.dom);if(e.type==="json")return El.fromJSON(n,e.value);throw rhe(e)}const Sve=new mn("MILKDOWN_STATE_TRACKER");function $ve(e){const t=r_(Yge,tk,fI,hI);return e.Backspace=t,e}const uN=e=>(e.inject(k1,"").inject(ff,{}).inject(C1,t=>t).inject(Bv,[w1,th,eh]).record(S1),async()=>{await e.waitTimers(Bv);const t=e.get(Qr),n=e.get(ku),o=e.get(Hh),r=e.get(C1),s=e.get(as),i=e.get(k1),l=Cve(i,n,t),a=[...s,new wn({key:Sve,state:{init:()=>{},apply:(d,f,h,p)=>{e.set(ff,p)}}}),r0e({rules:o}),yI($ve(P0e))];e.set(as,a);const c=r({schema:t,doc:l,plugins:a}),u=xa.create(c);return e.set(ff,u),e.done(S1),()=>{e.remove(k1).remove(ff).remove(C1).remove(Bv).clearTimer(S1)}});Yl(uN,{displayName:"EditorState"});const $1=Ul("EditorViewReady"),Vv=Lt([],"editorViewTimer"),nh=Lt({},"editorViewOptions"),E1=Lt(null,"root"),ob=Lt(null,"rootDOM"),rb=Lt({},"rootAttrs");function Eve(e,t){const n=document.createElement("div");n.className="milkdown",e.appendChild(n),t.set(ob,n);const o=t.get(rb);return Object.entries(o).forEach(([r,s])=>n.setAttribute(r,s)),n}function xve(e){e.classList.add("editor"),e.setAttribute("role","textbox")}const Tve=new mn("MILKDOWN_VIEW_CLEAR"),dN=e=>(e.inject(E1,document.body).inject(hn,{}).inject(nh,{}).inject(ob,null).inject(rb,{}).inject(Vv,[S1]).record($1),async()=>{await e.wait(Ha);const t=e.get(E1)||document.body,n=typeof t=="string"?document.querySelector(t):t;e.update(as,a=>[new wn({key:Tve,view:c=>{const u=n?Eve(n,e):void 0;return(()=>{if(u&&n){const d=c.dom;n.replaceChild(u,d),u.appendChild(d)}})(),{destroy:()=>{u!=null&&u.parentNode&&(u==null||u.parentNode.replaceChild(c.dom,u)),u==null||u.remove()}}}}),...a]),await e.waitTimers(Vv);const o=e.get(ff),r=e.get(nh),s=Object.fromEntries(e.get(tb)),i=Object.fromEntries(e.get(nb)),l=new _ve(n,{state:o,nodeViews:s,markViews:i,...r});return xve(l.dom),e.set(hn,l),e.done($1),()=>{l==null||l.destroy(),e.remove(E1).remove(hn).remove(nh).remove(ob).remove(rb).remove(Vv).clearTimer($1)}});Yl(dN,{displayName:"EditorView"});var qc,_r,Qi,hf,x1,T1,Go,el,Kc,M1,Gc,pf,A1,fa,mf;const Mve=class fN{constructor(){Wn(this,qc,void 0),Wn(this,_r,void 0),Wn(this,Qi,void 0),Wn(this,hf,void 0),Wn(this,x1,void 0),Wn(this,T1,void 0),Wn(this,Go,void 0),Wn(this,el,void 0),Wn(this,Kc,void 0),Wn(this,M1,void 0),Wn(this,Gc,void 0),Wn(this,pf,void 0),Wn(this,A1,void 0),Wn(this,fa,void 0),Wn(this,mf,void 0),fn(this,qc,!1),fn(this,_r,"Idle"),fn(this,Qi,[]),fn(this,hf,()=>{}),fn(this,x1,new qA),fn(this,T1,new vhe),fn(this,Go,new Map),fn(this,el,new Map),fn(this,Kc,new _he(ot(this,x1),ot(this,T1))),fn(this,M1,()=>{const t=bve(async o=>{await Promise.all(ot(this,Qi).map(r=>r(o)))}),n=[oN,lN,cN,sN,uN,dN,wve(this),t];ot(this,Gc).call(this,n,ot(this,el))}),fn(this,Gc,(t,n)=>{t.forEach(o=>{const r=ot(this,Kc).produce(ot(this,qc)?o.meta:void 0),s=o(r);n.set(o,{ctx:r,handler:s,cleanup:void 0})})}),fn(this,pf,(t,n=!1)=>Promise.all([t].flat().map(o=>{const r=ot(this,Go).get(o),s=r==null?void 0:r.cleanup;return n?ot(this,Go).delete(o):ot(this,Go).set(o,{ctx:void 0,handler:void 0,cleanup:void 0}),typeof s=="function"?s():s}))),fn(this,A1,async()=>{await Promise.all([...ot(this,el).entries()].map(([t,{cleanup:n}])=>typeof n=="function"?n():n)),ot(this,el).clear()}),fn(this,fa,t=>{fn(this,_r,t),ot(this,hf).call(this,t)}),fn(this,mf,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)=>(fn(this,qc,t),this),this.onStatusChange=t=>(fn(this,hf,t),this),this.config=t=>(ot(this,Qi).push(t),this),this.removeConfig=t=>(fn(this,Qi,ot(this,Qi).filter(n=>n!==t)),this),this.use=t=>{const n=[t].flat();return n.flat().forEach(o=>{ot(this,Go).set(o,{ctx:void 0,handler:void 0,cleanup:void 0})}),ot(this,_r)==="Created"&&ot(this,Gc).call(this,n,ot(this,Go)),this},this.remove=async t=>ot(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 ot(this,pf).call(this,[t].flat(),!0),this),this.create=async()=>ot(this,_r)==="OnCreate"?this:(ot(this,_r)==="Created"&&await this.destroy(),ot(this,fa).call(this,"OnCreate"),ot(this,M1).call(this),ot(this,Gc).call(this,[...ot(this,Go).keys()],ot(this,Go)),await Promise.all([ot(this,mf).call(this,ot(this,el)),ot(this,mf).call(this,ot(this,Go))].flat()),ot(this,fa).call(this,"Created"),this),this.destroy=async(t=!1)=>ot(this,_r)==="Destroyed"||ot(this,_r)==="OnDestroy"?this:ot(this,_r)==="OnCreate"?new Promise(n=>{setTimeout(()=>{n(this.destroy(t))},50)}):(t&&fn(this,Qi,[]),ot(this,fa).call(this,"OnDestroy"),await ot(this,pf).call(this,[...ot(this,Go).keys()],t),await ot(this,A1).call(this),ot(this,fa).call(this,"Destroyed"),this),this.action=t=>t(ot(this,Kc)),this.inspect=()=>ot(this,qc)?[...ot(this,el).values(),...ot(this,Go).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 fN}get ctx(){return ot(this,Kc)}get status(){return ot(this,_r)}};qc=new WeakMap,_r=new WeakMap,Qi=new WeakMap,hf=new WeakMap,x1=new WeakMap,T1=new WeakMap,Go=new WeakMap,el=new WeakMap,Kc=new WeakMap,M1=new WeakMap,Gc=new WeakMap,pf=new WeakMap,A1=new WeakMap,fa=new WeakMap,mf=new WeakMap;let Ave=Mve,Ove=e=>crypto.getRandomValues(new Uint8Array(e)),Ive=(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}}},Nve=(e,t=21)=>Ive(e,t,Ove);Nve("abcedfghicklmn",10);function St(e,t){const n=kve(e),o=r=>async()=>{o.key=n,await r.wait(eh);const s=t(r);return r.get(Ot).create(n,s),o.run=i=>r.get(Ot).call(e,i),()=>{r.get(Ot).remove(n)}};return o}function Wo(e){const t=n=>async()=>{await n.wait(Is);const o=e(n);return n.update(Hh,r=>[...r,o]),t.inputRule=o,()=>{n.update(Hh,r=>r.filter(s=>s!==o))}};return t}function Pve(e,t){const n=o=>async()=>{const r=t(o);return o.update(wu,s=>[...s.filter(i=>i[0]!==e),[e,r]]),n.id=e,n.schema=r,()=>{o.update(wu,s=>s.filter(([i])=>i!==e))}};return n.type=o=>{const r=o.get(Qr).marks[e];if(!r)throw fhe(e);return r},n}function fk(e,t){const n=o=>async()=>{const r=t(o);return o.update(bu,s=>[...s.filter(i=>i[0]!==e),[e,r]]),n.id=e,n.schema=r,()=>{o.update(bu,s=>s.filter(([i])=>i!==e))}};return n.type=o=>{const r=o.get(Qr).nodes[e];if(!r)throw UA(e);return r},n}function eo(e){let t;const n=o=>async()=>(await o.wait(Is),t=e(o),o.update(as,r=>[...r,t]),()=>{o.update(as,r=>r.filter(s=>s!==t))});return n.plugin=()=>t,n.key=()=>t.spec.key,n}function Lve(e){const t=n=>async()=>{await n.wait(Is);const o=e(n),r=yI(o);return n.update(as,s=>[...s,r]),t.keymap=o,()=>{n.update(as,s=>s.filter(i=>i!==r))}};return t}function Sn(e,t){const n=Lt(e,t),o=r=>(r.inject(n),()=>()=>{r.remove(n)});return o.key=n,o}function Un(e,t){const n=Sn(t,e),o=fk(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(bu,c=>[...c.filter(u=>u[0]!==e),[e,a]]),r.schema=a},r}function xp(e,t){const n=Sn(t,e),o=Pve(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(wu,c=>[...c.filter(u=>u[0]!==e),[e,a]]),r.schema=a},r}function qo(e,t){const n=Object.fromEntries(Object.entries(t).map(([i,{shortcuts:l}])=>[i,l])),o=Sn(n,`${e}Keymap`),r=Lve(i=>{const l=i.get(o.key),a=Object.entries(t).flatMap(([c,{command:u}])=>[l[c]].flat().map(d=>[d,u(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 hs=(e,t=()=>({}))=>Sn(t,`${e}Attr`),Tp=(e,t=()=>({}))=>Sn(t,`${e}Attr`);function vd(e,t,n){const o=Sn(n??{},e),r=i=>async()=>{await i.wait(Ha);const l={plugin:t(i),options:i.get(o.key)};return i.update(Uh,a=>[...a,l]),()=>{i.update(Uh,a=>a.filter(c=>c!==l))}},s=[o,r];return s.id=e,s.plugin=r,s.options=o,s}function Rve(){return e=>{const t=e.get(hn);return e.get(Cu)(t.state.doc)}}function Fve(e,t=!1){return n=>{const o=n.get(hn),r=n.get(ku)(e);if(!r)return;if(!t){const{state:c}=o;return o.dispatch(c.tr.replace(0,c.doc.content.size,new ze(r.content,0,0)))}const s=n.get(Qr),i=n.get(C1),l=n.get(as),a=xa.create({schema:s,doc:r,plugins:l,...i});o.updateState(a)}}function a_(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const Dve=[["ß","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"]],Bve=(e,t)=>{for(const[n,o]of t)e=e.replace(new RegExp(a_(n),"g"),o);return e};function Vve(e,t){if(typeof e!="string")throw new TypeError(`Expected a string, got \`${typeof e}\``);t={customReplacements:[],...t};const n=new Map([...Dve,...t.customReplacements]);return e=e.normalize(),e=Bve(e,n),e=e.normalize("NFD").replace(/\p{Diacritic}/gu,"").normalize(),e}const zve=[["&"," and "],["🦄"," unicorn "],["♥"," love "]],jve=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"),Hve=(e,t)=>{const n=a_(t);return e.replace(new RegExp(`${n}{2,}`,"g"),t).replace(new RegExp(`^${n}|${n}$`,"g"),"")},Uve=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+=a_(n)}return new RegExp(`[^${t}]+`,"g")};function Wve(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([...zve,...t.customReplacements]);e=Vve(e,{customReplacements:r}),t.decamelize&&(e=jve(e));const s=Uve(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=Hve(e,t.separator)),n&&(e=`_${e}`),o&&(e=`${e}-`),e}function qve(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=Te.empty,f=r.index(-1)?1:r.index(-2)?2:3;for(let y=r.depth-f;y>=r.depth-3;y--)d=Te.from(r.node(y).copy(d));let h=r.indexAfter(-1)<r.node(-2).childCount?1:r.indexAfter(-2)<r.node(-3).childCount?2:3;d=d.append(Te.from(e.createAndFill()));let p=r.before(r.depth-(f-1)),m=n.tr.replace(p,r.after(-h),new ze(d,4-f,0)),v=-1;m.doc.nodesBetween(p,m.doc.content.size,(y,E)=>{if(v>-1)return!1;y.isTextblock&&y.content.size==0&&(v=E+1)}),v>-1&&m.setSelection(ft.near(m.doc.resolve(v))),o(m.scrollIntoView())}return!0}let a=s.pos==r.end()?l.contentMatchAt(0).defaultType:null,c=n.tr.delete(r.pos,s.pos),u=a?[t?{type:e,attrs:t}:null,{type:a}]:void 0;return Jf(c.doc,r.pos,2,u)?(o&&o(c.split(r.pos,2,u).scrollIntoView()),!0):!1}}function hN(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?Kve(t,n,e,s):Gve(t,n,s):!0:!1}}function Kve(e,t,n,o){let r=e.tr,s=o.end,i=o.$to.end(o.depth);s<i&&(r.step(new co(s-1,i,s,i,new ze(Te.from(n.create(null,o.parent.copy())),1,0),1,!0)),o=new tO(r.doc.resolve(o.$from.pos),r.doc.resolve(i),o.depth));const l=Z0(o);if(l==null)return!1;r.lift(o,l);let a=r.mapping.map(s,-1)-1;return X0(r.doc,a)&&r.join(a),t(r.scrollIntoView()),!0}function Gve(e,t,n){let o=e.tr,r=n.parent;for(let h=n.end,p=n.endIndex-1,m=n.startIndex;p>m;p--)h-=r.child(p).nodeSize,o.delete(h-1,h+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,c=s.node(-1),u=s.index(-1);if(!c.canReplace(u+(l?0:1),u+1,i.content.append(a?Te.empty:Te.from(r))))return!1;let d=s.pos,f=d+i.nodeSize;return o.step(new co(d-(l?1:0),f+(a?1:0),d+1,f-1,new ze((l?Te.empty:Te.from(r.copy(Te.empty))).append(a?Te.empty:Te.from(r.copy(Te.empty))),l?0:1,a?0:1),l?0:1)),t(o.scrollIntoView()),!0}function Yve(e){return function(t,n){let{$from:o,$to:r}=t.selection,s=o.blockRange(r,c=>c.childCount>0&&c.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 c=a.lastChild&&a.lastChild.type==l.type,u=Te.from(c?e.create():null),d=new ze(Te.from(e.create(null,Te.from(l.type.create(null,u)))),c?3:1,0),f=s.start,h=s.end;n(t.tr.step(new co(f-(c?3:1),h,f,h,d,1,!0)).scrollIntoView())}return!0}}function Jve(e){const t=new Map;if(!e||!e.type)throw new Error("mdast-util-definitions expected node");return _d(e,"definition",function(o){const r=k$(o.identifier);r&&!t.get(r)&&t.set(r,o)}),n;function n(o){const r=k$(o);return t.get(r)}}function k$(e){return String(e||"").toUpperCase()}function Zve(){return function(e){const t=Jve(e);_d(e,function(n,o,r){if(n.type==="definition"&&r!==void 0&&typeof o=="number")return r.children.splice(o,1),[O2,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},[O2,o]}})}}function pN(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(Te.fromArray(o))}function me(e,t){return Object.assign(e,{meta:{package:"@milkdown/preset-commonmark",...t}}),e}const hk=Tp("emphasis");me(hk,{displayName:"Attr<emphasis>",group:"Emphasis"});const yc=xp("emphasis",e=>({attrs:{marker:{default:e.get(Qf).emphasis||"*"}},parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style",getAttrs:t=>t==="italic"}],toDOM:t=>["em",e.get(hk.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})}}}));me(yc.mark,{displayName:"MarkSchema<emphasis>",group:"Emphasis"});me(yc.ctx,{displayName:"MarkSchemaCtx<emphasis>",group:"Emphasis"});const c_=St("ToggleEmphasis",e=>()=>o_(yc.type(e)));me(c_,{displayName:"Command<toggleEmphasisCommand>",group:"Emphasis"});const mN=Wo(e=>Cp(/(?:^|[^*])\*([^*]+)\*$/,yc.type(e),{getAttr:()=>({marker:"*"}),updateCaptured:({fullMatch:t,start:n})=>t.startsWith("*")?{}:{fullMatch:t.slice(1),start:n+1}}));me(mN,{displayName:"InputRule<emphasis>|Star",group:"Emphasis"});const gN=Wo(e=>Cp(/(?:^|[^_])_([^_]+)_$/,yc.type(e),{getAttr:()=>({marker:"_"}),updateCaptured:({fullMatch:t,start:n})=>t.startsWith("_")?{}:{fullMatch:t.slice(1),start:n+1}}));me(gN,{displayName:"InputRule<emphasis>|Underscore",group:"Emphasis"});const pk=qo("emphasisKeymap",{ToggleEmphasis:{shortcuts:"Mod-i",command:e=>{const t=e.get(Ot);return()=>t.call(c_.key)}}});me(pk.ctx,{displayName:"KeymapCtx<emphasis>",group:"Emphasis"});me(pk.shortcuts,{displayName:"Keymap<emphasis>",group:"Emphasis"});const mk=Tp("strong");me(mk,{displayName:"Attr<strong>",group:"Strong"});const yd=xp("strong",e=>({attrs:{marker:{default:e.get(Qf).strong||"*"}},parseDOM:[{tag:"b"},{tag:"strong"},{style:"font-style",getAttrs:t=>t==="bold"}],toDOM:t=>["strong",e.get(mk.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})}}}));me(yd.mark,{displayName:"MarkSchema<strong>",group:"Strong"});me(yd.ctx,{displayName:"MarkSchemaCtx<strong>",group:"Strong"});const u_=St("ToggleStrong",e=>()=>o_(yd.type(e)));me(u_,{displayName:"Command<toggleStrongCommand>",group:"Strong"});const _N=Wo(e=>Cp(/(?:\*\*|__)([^*_]+)(?:\*\*|__)$/,yd.type(e),{getAttr:t=>({marker:t[0].startsWith("*")?"*":"_"})}));me(_N,{displayName:"InputRule<strong>",group:"Strong"});const gk=qo("strongKeymap",{ToggleBold:{shortcuts:["Mod-b"],command:e=>{const t=e.get(Ot);return()=>t.call(u_.key)}}});me(gk.ctx,{displayName:"KeymapCtx<strong>",group:"Strong"});me(gk.shortcuts,{displayName:"Keymap<strong>",group:"Strong"});const _k=Tp("inlineCode");me(_k,{displayName:"Attr<inlineCode>",group:"InlineCode"});const hi=xp("inlineCode",e=>({priority:100,code:!0,inclusive:!1,parseDOM:[{tag:"code"}],toDOM:t=>["code",e.get(_k.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||"")}}}));me(hi.mark,{displayName:"MarkSchema<inlineCode>",group:"InlineCode"});me(hi.ctx,{displayName:"MarkSchemaCtx<inlineCode>",group:"InlineCode"});const d_=St("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,hi.type(e))?(n==null||n(r.removeMark(s,i,hi.type(e))),!0):(Object.keys(t.schema.marks).filter(l=>l!==hi.type.name).map(l=>t.schema.marks[l]).forEach(l=>{r.removeMark(s,i,l)}),n==null||n(r.addMark(s,i,hi.type(e).create())),!0)});me(d_,{displayName:"Command<toggleInlineCodeCommand>",group:"InlineCode"});const vN=Wo(e=>Cp(/(?:\`)([^\`]+)(?:\`)$/,hi.type(e)));me(vN,{displayName:"InputRule<inlineCodeInputRule>",group:"InlineCode"});const vk=qo("inlineCodeKeymap",{ToggleInlineCode:{shortcuts:"Mod-e",command:e=>{const t=e.get(Ot);return()=>t.call(d_.key)}}});me(vk.ctx,{displayName:"KeymapCtx<inlineCode>",group:"InlineCode"});me(vk.shortcuts,{displayName:"Keymap<inlineCode>",group:"InlineCode"});const yk=Tp("link");me(yk,{displayName:"Attr<link>",group:"Link"});const es=xp("link",e=>({attrs:{href:{},title:{default:null}},parseDOM:[{tag:"a[href]",getAttrs:t=>{if(!(t instanceof HTMLElement))throw Gs(t);return{href:t.getAttribute("href"),title:t.getAttribute("title")}}}],toDOM:t=>["a",{...e.get(yk.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})}}}));me(es.mark,{displayName:"MarkSchema<link>",group:"Link"});const yN=St("ToggleLink",e=>(t={})=>o_(es.type(e),t));me(yN,{displayName:"Command<toggleLinkCommand>",group:"Link"});const bN=St("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,(p,m)=>{if(es.type(e).isInSet(p.marks))return r=p,s=m,!1}),!r)return!1;const c=r.marks.find(({type:p})=>p===es.type(e));if(!c)return!1;const u=s,d=s+r.nodeSize,{tr:f}=n,h=es.type(e).create({...c.attrs,...t});return h?(o(f.removeMark(u,d,c).addMark(u,d,h).setSelection(new lt(f.selection.$anchor)).scrollIntoView()),!0):!1});me(bN,{displayName:"Command<updateLinkCommand>",group:"Link"});const wN=fk("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)}}}));me(wN,{displayName:"NodeSchema<doc>",group:"Doc"});const bk=hs("paragraph");me(bk,{displayName:"Attr<paragraph>",group:"Paragraph"});const Ni=Un("paragraph",e=>({content:"inline*",group:"block",parseDOM:[{tag:"p"}],toDOM:t=>["p",e.get(bk.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"),pN(t,n),t.closeNode()}}}));me(Ni.node,{displayName:"NodeSchema<paragraph>",group:"Paragraph"});me(Ni.ctx,{displayName:"NodeSchemaCtx<paragraph>",group:"Paragraph"});const wk=St("TurnIntoText",e=>()=>Dh(Ni.type(e)));me(wk,{displayName:"Command<turnIntoTextCommand>",group:"Paragraph"});const kk=qo("paragraphKeymap",{TurnIntoText:{shortcuts:"Mod-Alt-0",command:e=>{const t=e.get(Ot);return()=>t.call(wk.key)}}});me(kk.ctx,{displayName:"KeymapCtx<paragraph>",group:"Paragraph"});me(kk.shortcuts,{displayName:"Keymap<paragraph>",group:"Paragraph"});const Xve=Array(6).fill(0).map((e,t)=>t+1);function Qve(e){return Wve(e.textContent)}const f_=Sn(Qve,"headingIdGenerator");me(f_,{displayName:"Ctx<HeadingIdGenerator>",group:"Heading"});const Ck=hs("heading");me(Ck,{displayName:"Attr<heading>",group:"Heading"});const Ns=Un("heading",e=>{const t=e.get(f_.key);return{content:"inline*",group:"block",defining:!0,attrs:{id:{default:""},level:{default:1}},parseDOM:Xve.map(n=>({tag:`h${n}`,getAttrs:o=>{if(!(o instanceof HTMLElement))throw Gs(o);return{level:n,id:o.id}}})),toDOM:n=>[`h${n.attrs.level}`,{...e.get(Ck.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}),pN(n,o),n.closeNode()}}}});me(Ns.node,{displayName:"NodeSchema<heading>",group:"Heading"});me(Ns.ctx,{displayName:"NodeSchemaCtx<heading>",group:"Heading"});const kN=Wo(e=>iI(/^(?<hashes>#+)\s$/,Ns.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(hn),{$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}}));me(kN,{displayName:"InputRule<wrapInHeadingInputRule>",group:"Heading"});const dl=St("WrapInHeading",e=>t=>(t??(t=1),t<1?Dh(Ni.type(e)):Dh(Ns.type(e),{level:t})));me(dl,{displayName:"Command<wrapInHeadingCommand>",group:"Heading"});const Sk=St("DowngradeHeading",e=>()=>(t,n,o)=>{const{$from:r}=t.selection,s=r.node();if(s.type!==Ns.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):Dh(Ni.type(e))(t,n,o)});me(Sk,{displayName:"Command<downgradeHeadingCommand>",group:"Heading"});const $k=qo("headingKeymap",{TurnIntoH1:{shortcuts:"Mod-Alt-1",command:e=>{const t=e.get(Ot);return()=>t.call(dl.key,1)}},TurnIntoH2:{shortcuts:"Mod-Alt-2",command:e=>{const t=e.get(Ot);return()=>t.call(dl.key,2)}},TurnIntoH3:{shortcuts:"Mod-Alt-3",command:e=>{const t=e.get(Ot);return()=>t.call(dl.key,3)}},TurnIntoH4:{shortcuts:"Mod-Alt-4",command:e=>{const t=e.get(Ot);return()=>t.call(dl.key,4)}},TurnIntoH5:{shortcuts:"Mod-Alt-5",command:e=>{const t=e.get(Ot);return()=>t.call(dl.key,5)}},TurnIntoH6:{shortcuts:"Mod-Alt-6",command:e=>{const t=e.get(Ot);return()=>t.call(dl.key,6)}},DowngradeHeading:{shortcuts:["Delete","Backspace"],command:e=>{const t=e.get(Ot);return()=>t.call(Sk.key)}}});me($k.ctx,{displayName:"KeymapCtx<heading>",group:"Heading"});me($k.shortcuts,{displayName:"Keymap<heading>",group:"Heading"});const Ek=hs("blockquote");me(Ek,{displayName:"Attr<blockquote>",group:"Blockquote"});const bd=Un("blockquote",e=>({content:"block+",group:"block",defining:!0,parseDOM:[{tag:"blockquote"}],toDOM:t=>["blockquote",e.get(Ek.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()}}}));me(bd.node,{displayName:"NodeSchema<blockquote>",group:"Blockquote"});me(bd.ctx,{displayName:"NodeSchemaCtx<blockquote>",group:"Blockquote"});const CN=Wo(e=>X3(/^\s*>\s$/,bd.type(e)));me(CN,{displayName:"InputRule<wrapInBlockquoteInputRule>",group:"Blockquote"});const xk=St("WrapInBlockquote",e=>()=>ok(bd.type(e)));me(xk,{displayName:"Command<wrapInBlockquoteCommand>",group:"Blockquote"});const Tk=qo("blockquoteKeymap",{WrapInBlockquote:{shortcuts:"Mod-Shift-b",command:e=>{const t=e.get(Ot);return()=>t.call(xk.key)}}});me(Tk.ctx,{displayName:"KeymapCtx<blockquote>",group:"Blockquote"});me(Tk.shortcuts,{displayName:"Keymap<blockquote>",group:"Blockquote"});const Mk=hs("codeBlock",()=>({pre:{},code:{}}));me(Mk,{displayName:"Attr<codeBlock>",group:"CodeBlock"});const wd=Un("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 Gs(t);return{language:t.dataset.language}}}],toDOM:t=>{const n=e.get(Mk.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})}}}));me(wd.node,{displayName:"NodeSchema<codeBlock>",group:"CodeBlock"});me(wd.ctx,{displayName:"NodeSchemaCtx<codeBlock>",group:"CodeBlock"});const SN=Wo(e=>iI(/^```(?<language>[a-z]*)?[\s\n]$/,wd.type(e),t=>{var n;return{language:((n=t.groups)==null?void 0:n.language)??""}}));me(SN,{displayName:"InputRule<createCodeBlockInputRule>",group:"CodeBlock"});const Ak=St("CreateCodeBlock",e=>(t="")=>Dh(wd.type(e),{language:t}));me(Ak,{displayName:"Command<createCodeBlockCommand>",group:"CodeBlock"});const eye=St("UpdateCodeBlockLanguage",()=>({pos:e,language:t}={pos:-1,language:""})=>(n,o)=>e>=0?(o==null||o(n.tr.setNodeAttribute(e,"language",t)),!0):!1);me(eye,{displayName:"Command<updateCodeBlockLanguageCommand>",group:"CodeBlock"});const Ok=qo("codeBlockKeymap",{CreateCodeBlock:{shortcuts:"Mod-Alt-c",command:e=>{const t=e.get(Ot);return()=>t.call(Ak.key)}}});me(Ok.ctx,{displayName:"KeymapCtx<codeBlock>",group:"CodeBlock"});me(Ok.shortcuts,{displayName:"Keymap<codeBlock>",group:"CodeBlock"});const Ik=hs("image");me(Ik,{displayName:"Attr<image>",group:"Image"});const kd=Un("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 Gs(t);return{src:t.getAttribute("src")||"",alt:t.getAttribute("alt")||"",title:t.getAttribute("title")||t.getAttribute("alt")||""}}}],toDOM:t=>["img",{...e.get(Ik.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})}}}));me(kd.node,{displayName:"NodeSchema<image>",group:"Image"});me(kd.ctx,{displayName:"NodeSchemaCtx<image>",group:"Image"});const $N=St("InsertImage",e=>(t={})=>(n,o)=>{if(!o)return!0;const{src:r="",alt:s="",title:i=""}=t,l=kd.type(e).create({src:r,alt:s,title:i});return l&&o(n.tr.replaceSelectionWith(l).scrollIntoView()),!0});me($N,{displayName:"Command<insertImageCommand>",group:"Image"});const EN=St("UpdateImage",e=>(t={})=>(n,o)=>{const r=g0e(n.selection,kd.type(e));if(!r)return!1;const{node:s,pos:i}=r,l={...s.attrs},{src:a,alt:c,title:u}=t;return a!==void 0&&(l.src=a),c!==void 0&&(l.alt=c),u!==void 0&&(l.title=u),o==null||o(n.tr.setNodeMarkup(i,void 0,l).scrollIntoView()),!0});me(EN,{displayName:"Command<updateImageCommand>",group:"Image"});const tye=Wo(e=>new hr(/!\[(?<alt>.*?)]\((?<filename>.*?)\s*(?="|\))"?(?<title>[^"]+)?"?\)/,(t,n,o,r)=>{const[s,i,l="",a]=n;return s?t.tr.replaceWith(o,r,kd.type(e).create({src:l,alt:i,title:a})):null}));me(tye,{displayName:"InputRule<insertImageInputRule>",group:"Image"});const qg=hs("hardbreak",e=>({"data-type":"hardbreak","data-is-inline":e.attrs.isInline}));me(qg,{displayName:"Attr<hardbreak>",group:"Hardbreak"});const Ua=Un("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(qg.key)(t)," "]:["br",e.get(qg.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")}}}));me(Ua.node,{displayName:"NodeSchema<hardbreak>",group:"Hardbreak"});me(Ua.ctx,{displayName:"NodeSchemaCtx<hardbreak>",group:"Hardbreak"});const Nk=St("InsertHardbreak",e=>()=>(t,n)=>{var o;const{selection:r,tr:s}=t;if(!(r instanceof lt))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(ft.near(s.doc.resolve(r.to))).scrollIntoView()),!0}return n==null||n(s.setMeta("hardbreak",!0).replaceSelectionWith(Ua.type(e).create()).scrollIntoView()),!0});me(Nk,{displayName:"Command<insertHardbreakCommand>",group:"Hardbreak"});const Pk=qo("hardbreakKeymap",{InsertHardbreak:{shortcuts:"Shift-Enter",command:e=>{const t=e.get(Ot);return()=>t.call(Nk.key)}}});me(Pk.ctx,{displayName:"KeymapCtx<hardbreak>",group:"Hardbreak"});me(Pk.shortcuts,{displayName:"Keymap<hardbreak>",group:"Hardbreak"});const Lk=hs("hr");me(Lk,{displayName:"Attr<hr>",group:"Hr"});const Mp=Un("hr",e=>({group:"block",parseDOM:[{tag:"hr"}],toDOM:t=>["hr",e.get(Lk.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")}}}));me(Mp.node,{displayName:"NodeSchema<hr>",group:"Hr"});me(Mp.ctx,{displayName:"NodeSchemaCtx<hr>",group:"Hr"});const xN=Wo(e=>new hr(/^(?:---|___\s|\*\*\*\s)$/,(t,n,o,r)=>{const{tr:s}=t;return n[0]&&s.replaceWith(o-1,r,Mp.type(e).create()),s}));me(xN,{displayName:"InputRule<insertHrInputRule>",group:"Hr"});const TN=St("InsertHr",e=>()=>(t,n)=>{if(!n)return!0;const o=Ni.node.type(e).create(),{tr:r,selection:s}=t,{from:i}=s,l=Mp.type(e).create();if(!l)return!0;const a=r.replaceSelectionWith(l).insert(i,o),c=ft.findFrom(a.doc.resolve(i),1,!0);return c&&n(a.setSelection(c).scrollIntoView()),!0});me(TN,{displayName:"Command<insertHrCommand>",group:"Hr"});const Rk=hs("bulletList");me(Rk,{displayName:"Attr<bulletList>",group:"BulletList"});const bc=Un("bullet_list",e=>({content:"listItem+",group:"block",attrs:{spread:{default:!1}},parseDOM:[{tag:"ul",getAttrs:t=>{if(!(t instanceof HTMLElement))throw Gs(t);return{spread:t.dataset.spread}}}],toDOM:t=>["ul",{...e.get(Rk.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()}}}));me(bc.node,{displayName:"NodeSchema<bulletList>",group:"BulletList"});me(bc.ctx,{displayName:"NodeSchemaCtx<bulletList>",group:"BulletList"});const MN=Wo(e=>X3(/^\s*([-+*])\s$/,bc.type(e)));me(MN,{displayName:"InputRule<wrapInBulletListInputRule>",group:"BulletList"});const Fk=St("WrapInBulletList",e=>()=>ok(bc.type(e)));me(Fk,{displayName:"Command<wrapInBulletListCommand>",group:"BulletList"});const Dk=qo("bulletListKeymap",{WrapInBulletList:{shortcuts:"Mod-Alt-8",command:e=>{const t=e.get(Ot);return()=>t.call(Fk.key)}}});me(Dk.ctx,{displayName:"KeymapCtx<bulletListKeymap>",group:"BulletList"});me(Dk.shortcuts,{displayName:"Keymap<bulletListKeymap>",group:"BulletList"});const Bk=hs("orderedList");me(Bk,{displayName:"Attr<orderedList>",group:"OrderedList"});const wc=Un("ordered_list",e=>({content:"listItem+",group:"block",attrs:{order:{default:1},spread:{default:!1}},parseDOM:[{tag:"ol",getAttrs:t=>{if(!(t instanceof HTMLElement))throw Gs(t);return{spread:t.dataset.spread,order:t.hasAttribute("start")?Number(t.getAttribute("start")):1}}}],toDOM:t=>["ol",{...e.get(Bk.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()}}}));me(wc.node,{displayName:"NodeSchema<orderedList>",group:"OrderedList"});me(wc.ctx,{displayName:"NodeSchemaCtx<orderedList>",group:"OrderedList"});const AN=Wo(e=>X3(/^\s*(\d+)\.\s$/,wc.type(e),t=>({order:Number(t[1])}),(t,n)=>n.childCount+n.attrs.order===Number(t[1])));me(AN,{displayName:"InputRule<wrapInOrderedListInputRule>",group:"OrderedList"});const Vk=St("WrapInOrderedList",e=>()=>ok(wc.type(e)));me(Vk,{displayName:"Command<wrapInOrderedListCommand>",group:"OrderedList"});const zk=qo("orderedListKeymap",{WrapInOrderedList:{shortcuts:"Mod-Alt-7",command:e=>{const t=e.get(Ot);return()=>t.call(Vk.key)}}});me(zk.ctx,{displayName:"KeymapCtx<orderedList>",group:"OrderedList"});me(zk.shortcuts,{displayName:"Keymap<orderedList>",group:"OrderedList"});const jk=hs("listItem");me(jk,{displayName:"Attr<listItem>",group:"ListItem"});const js=Un("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 Gs(t);return{label:t.dataset.label,listType:t.dataset.listType,spread:t.dataset.spread}}}],toDOM:t=>["li",{...e.get(jk.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()}}}));me(js.node,{displayName:"NodeSchema<listItem>",group:"ListItem"});me(js.ctx,{displayName:"NodeSchemaCtx<listItem>",group:"ListItem"});const Hk=St("SinkListItem",e=>()=>Yve(js.type(e)));me(Hk,{displayName:"Command<sinkListItemCommand>",group:"ListItem"});const Uk=St("LiftListItem",e=>()=>hN(js.type(e)));me(Uk,{displayName:"Command<liftListItemCommand>",group:"ListItem"});const Wk=St("SplitListItem",e=>()=>qve(js.type(e)));me(Wk,{displayName:"Command<splitListItemCommand>",group:"ListItem"});function nye(e){return(t,n,o)=>{const{selection:r}=t;if(!(r instanceof lt))return!1;const{empty:s,$from:i}=r;if(!s||i.parentOffset!==0)return!1;const l=i.node(-1);return l.type!==js.type(e)||l.firstChild!==i.node()||i.node(-2).childCount>1?!1:hN(js.type(e))(t,n,o)}}const qk=St("LiftFirstListItem",e=>()=>nye(e));me(qk,{displayName:"Command<liftFirstListItemCommand>",group:"ListItem"});const Kk=qo("listItemKeymap",{NextListItem:{shortcuts:"Enter",command:e=>{const t=e.get(Ot);return()=>t.call(Wk.key)}},SinkListItem:{shortcuts:["Tab","Mod-]"],command:e=>{const t=e.get(Ot);return()=>t.call(Hk.key)}},LiftListItem:{shortcuts:["Shift-Tab","Mod-["],command:e=>{const t=e.get(Ot);return()=>t.call(Uk.key)}},LiftFirstListItem:{shortcuts:["Backspace","Delete"],command:e=>{const t=e.get(Ot);return()=>t.call(qk.key)}}});me(Kk.ctx,{displayName:"KeymapCtx<listItem>",group:"ListItem"});me(Kk.shortcuts,{displayName:"Keymap<listItem>",group:"ListItem"});const ON=fk("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)}}}));me(ON,{displayName:"NodeSchema<text>",group:"Text"});const Gk=hs("html");me(Gk,{displayName:"Attr<html>",group:"Html"});const Yk=Un("html",e=>({atom:!0,group:"inline",inline:!0,attrs:{value:{default:""}},toDOM:t=>{const n=document.createElement("span"),o={...e.get(Gk.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)}}}));me(Yk.node,{displayName:"NodeSchema<html>",group:"Html"});me(Yk.ctx,{displayName:"NodeSchemaCtx<html>",group:"Html"});const oye=[wN,bk,Ni,f_,Ck,Ns,qg,Ua,Ek,bd,Mk,wd,Lk,Mp,Ik,kd,Rk,bc,Bk,wc,jk,js,hk,yc,mk,yd,_k,hi,yk,es,Gk,Yk,ON].flat(),rye=[CN,MN,AN,SN,xN,kN].flat(),sye=[mN,gN,vN,_N],iye=[wk,xk,dl,Sk,Ak,Nk,TN,$N,EN,Vk,Fk,Hk,Wk,Uk,qk,c_,d_,u_,yN,bN],lye=[Tk,Ok,Pk,$k,Kk,zk,Dk,kk,pk,vk,gk].flat(),Jk=vd("remarkAddOrderInList",()=>()=>e=>{_d(e,"list",t=>{if(t.ordered){const n=t.start??1;t.children.forEach((o,r)=>{o.label=r+n})}})});me(Jk.plugin,{displayName:"Remark<remarkAddOrderInListPlugin>",group:"Remark"});me(Jk.options,{displayName:"RemarkConfig<remarkAddOrderInListPlugin>",group:"Remark"});const Zk=vd("remarkLineBreak",()=>()=>e=>{const t=/[\t ]*(?:\r?\n|\r)/g;_d(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})});me(Zk.plugin,{displayName:"Remark<remarkLineBreak>",group:"Remark"});me(Zk.options,{displayName:"RemarkConfig<remarkLineBreak>",group:"Remark"});const Xk=vd("remarkInlineLink",()=>Zve);me(Xk.plugin,{displayName:"Remark<remarkInlineLinkPlugin>",group:"Remark"});me(Xk.options,{displayName:"RemarkConfig<remarkInlineLinkPlugin>",group:"Remark"});const aye=e=>!!e.children,cye=e=>e.type==="html";function uye(e,t){return n(e,0,null)[0];function n(o,r,s){if(aye(o)){const i=[];for(let l=0,a=o.children.length;l<a;l++){const c=o.children[l];if(c){const u=n(c,l,o);if(u)for(let d=0,f=u.length;d<f;d++){const h=u[d];h&&i.push(h)}}}o.children=i}return t(o,r,s)}}const Qk=vd("remarkHTMLTransformer",()=>()=>e=>{uye(e,(t,n,o)=>cye(t)?((o==null?void 0:o.type)==="root"&&(t.children=[{...t}],delete t.value,t.type="paragraph"),[t]):[t])});me(Qk.plugin,{displayName:"Remark<remarkHtmlTransformer>",group:"Remark"});me(Qk.options,{displayName:"RemarkConfig<remarkHtmlTransformer>",group:"Remark"});const eC=vd("remarkMarker",()=>()=>(e,t)=>{const n=o=>t.value.charAt(o.position.start.offset);_d(e,o=>["strong","emphasis"].includes(o.type),o=>{o.marker=n(o)})});me(eC.plugin,{displayName:"Remark<remarkMarker>",group:"Remark"});me(eC.options,{displayName:"RemarkConfig<remarkMarker>",group:"Remark"});const IN=eo(()=>{let e=!1;const t=new mn("MILKDOWN_INLINE_NODES_CURSOR"),n=new wn({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=Ln.widget(r,s,{side:-1}),l=document.createElement("span"),a=Ln.widget(r,l);return setTimeout(()=>{s.contentEditable="true",l.contentEditable="true"}),en.create(o.doc,[i,a])}return en.empty}}});return n});me(IN,{displayName:"Prose<inlineNodesCursorPlugin>",group:"Prose"});const NN=eo(e=>new wn({key:new mn("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 Yn))return;const{from:i}=s;return o.tr.setNodeMarkup(i,Ua.type(e),void 0,[])}if(s instanceof fi){let i=o.tr;const{from:l,to:a}=s;return o.doc.nodesBetween(l,a,(c,u)=>{c.type===Ua.type(e)&&(i=i.setNodeMarkup(u,Ua.type(e),void 0,[]))}),i}}}));me(NN,{displayName:"Prose<hardbreakClearMarkPlugin>",group:"Prose"});const tC=Sn(["table","code_block"],"hardbreakFilterNodes");me(tC,{displayName:"Ctx<hardbreakFilterNodes>",group:"Prose"});const PN=eo(e=>{const t=e.get(tC.key);return new wn({key:new mn("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,c=!0;for(;a>0;)t.includes(l.node(a).type.name)&&(c=!1),a--;return c}return!0}})});me(PN,{displayName:"Prose<hardbreakFilterPlugin>",group:"Prose"});const LN=eo(e=>{const t=new mn("MILKDOWN_HEADING_ID"),n=o=>{if(o.composing)return;const r=e.get(f_.key),s=o.state.tr.setMeta("addToHistory",!1);let i=!1;o.state.doc.descendants((l,a)=>{if(l.type===Ns.type(e)){if(l.textContent.trim().length===0)return;const c=l.attrs,u=r(l);c.id!==u&&(i=!0,s.setMeta(t,!0).setNodeMarkup(a,void 0,{...c,id:u}))}}),i&&o.dispatch(s)};return new wn({key:t,view:o=>(n(o),{update:(r,s)=>{r.state.doc.eq(s.doc)||n(r)}})})});me(LN,{displayName:"Prose<syncHeadingIdPlugin>",group:"Prose"});const RN=eo(e=>{const t=n=>{if(n.composing||!n.editable)return;const o=wc.type(e),r=bc.type(e),s=js.type(e),i=n.state,l=(u,d)=>{let f=!1;const h=`${d+1}.`;return u.label!==h&&(u.label=h,f=!0),f};let a=i.tr,c=!1;i.doc.descendants((u,d,f,h)=>{if(u.type===r){const p=u.maybeChild(0);(p==null?void 0:p.type)===s&&p.attrs.listType==="ordered"&&(c=!0,a.setNodeMarkup(d,o,{spread:"true"}),u.descendants((m,v,y,E)=>{if(m.type===s){const w={...m.attrs};l(w,E)&&(a=a.setNodeMarkup(v,void 0,w))}return!1}))}else if(u.type===s&&(f==null?void 0:f.type)===o){const p={...u.attrs};let m=!1;p.listType!=="ordered"&&(p.listType="ordered",m=!0),f!=null&&f.maybeChild(0)&&(m=l(p,h)),m&&(a=a.setNodeMarkup(d,void 0,p),c=!0)}}),c&&n.dispatch(a.setMeta("addToHistory",!1))};return new wn({key:new mn("MILKDOWN_KEEP_LIST_ORDER"),view:n=>(t(n),{update:o=>{t(o)}})})});me(RN,{displayName:"Prose<syncListOrderPlugin>",group:"Prose"});const dye=[NN,tC,PN,IN,Jk,Xk,Zk,Qk,eC,LN,RN].flat(),fye=[oye,rye,sye,iye,lye,dye].flat();var sb,ib;if(typeof WeakMap<"u"){let e=new WeakMap;sb=t=>e.get(t),ib=(t,n)=>(e.set(t,n),n)}else{const e=[];let n=0;sb=o=>{for(let r=0;r<e.length;r+=2)if(e[r]==o)return e[r+1]},ib=(o,r)=>(n==10&&(n=0),e[n++]=o,e[n++]=r)}var jt=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:c}=this.findCell(t);return{left:Math.min(n,i),top:Math.min(r,a),right:Math.max(o,l),bottom:Math.max(s,c)}}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 sb(e)||ib(e,hye(e))}};function hye(e){if(e.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+e.type.name);const t=pye(e),n=e.childCount,o=[];let r=0,s=null;const i=[];for(let c=0,u=t*n;c<u;c++)o[c]=0;for(let c=0,u=0;c<n;c++){const d=e.child(c);u++;for(let p=0;;p++){for(;r<o.length&&o[r]!=0;)r++;if(p==d.childCount)break;const m=d.child(p),{colspan:v,rowspan:y,colwidth:E}=m.attrs;for(let w=0;w<y;w++){if(w+c>=n){(s||(s=[])).push({type:"overlong_rowspan",pos:u,n:y-w});break}const C=r+w*t;for(let T=0;T<v;T++){o[C+T]==0?o[C+T]=u:(s||(s=[])).push({type:"collision",row:c,pos:u,n:v-T});const $=E&&E[T];if($){const A=(C+T)%t*2,N=i[A];N==null||N!=$&&i[A+1]==1?(i[A]=$,i[A+1]=1):N==$&&i[A+1]++}}}r+=v,u+=m.nodeSize}const f=(c+1)*t;let h=0;for(;r<f;)o[r++]==0&&h++;h&&(s||(s=[])).push({type:"missing",row:c,n:h}),u++}const l=new jt(t,n,o,s);let a=!1;for(let c=0;!a&&c<i.length;c+=2)i[c]!=null&&i[c+1]<n&&(a=!0);return a&&mye(l,i,e),l}function pye(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 c=l.child(a);i+c.attrs.rowspan>o&&(s+=c.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 mye(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 c=0;c<a.colspan;c++){const u=(r+c)%e.width,d=t[u*2];d!=null&&(!a.colwidth||a.colwidth[c]!=d)&&((l||(l=gye(a)))[c]=d)}l&&e.problems.unshift({type:"colwidth mismatch",pos:s,colwidth:l})}}function gye(e){if(e.colwidth)return e.colwidth.slice();const t=[];for(let n=0;n<e.colspan;n++)t.push(0);return t}function C$(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 S$(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 _ye(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=>C$(o,t)}],toDOM(o){return["td",S$(o,t),0]}},table_header:{content:e.cellContent,attrs:n,tableRole:"header_cell",isolating:!0,parseDOM:[{tag:"th",getAttrs:o=>C$(o,t)}],toDOM(o){return["th",S$(o,t),0]}}}}function Dr(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 ml=new mn("selectingCells");function Ap(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 Br(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 h_(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=Ap(t.$head)||vye(t.$head);if(n)return n;throw new RangeError(`No cell found around position ${t.head}`)}function vye(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 lb(e){return e.parent.type.spec.tableRole=="row"&&!!e.nodeAfter}function yye(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function nC(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function FN(e,t,n){const o=e.node(-1),r=jt.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 ac(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 bye(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 wye(e,t,n){const o=Dr(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 ln=class ri extends ft{constructor(t,n=t){const o=t.node(-1),r=jt.get(o),s=t.start(-1),i=r.rectBetween(t.pos-s,n.pos-s),l=t.node(0),a=r.cellsInRect(i).filter(u=>u!=n.pos-s);a.unshift(n.pos-s);const c=a.map(u=>{const d=o.nodeAt(u);if(!d)throw RangeError(`No cell with offset ${u} found`);const f=s+u+1;return new Vg(l.resolve(f),l.resolve(f+d.content.size))});super(c[0].$from,c[0].$to,c),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(lb(o)&&lb(r)&&nC(o,r)){const s=this.$anchorCell.node(-1)!=o.node(-1);return s&&this.isRowSelection()?ri.rowSelection(o,r):s&&this.isColSelection()?ri.colSelection(o,r):new ri(o,r)}return lt.between(o,r)}content(){const t=this.$anchorCell.node(-1),n=jt.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 c=[];for(let u=a*n.width+r.left,d=r.left;d<r.right;d++,u++){const f=n.map[u];if(s[f])continue;s[f]=!0;const h=n.findCell(f);let p=t.nodeAt(f);if(!p)throw RangeError(`No cell with offset ${f} found`);const m=r.left-h.left,v=h.right-r.right;if(m>0||v>0){let y=p.attrs;if(m>0&&(y=ac(y,0,m)),v>0&&(y=ac(y,y.colspan-v,v)),h.left<r.left){if(p=p.type.createAndFill(y),!p)throw RangeError(`Could not create cell with attrs ${JSON.stringify(y)}`)}else p=p.type.create(y,p.content)}if(h.top<r.top||h.bottom>r.bottom){const y={...p.attrs,rowspan:Math.min(h.bottom,r.bottom)-Math.max(h.top,r.top)};h.top<r.top?p=p.type.createAndFill(y):p=p.type.create(y,p.content)}c.push(p)}i.push(t.child(a).copy(Te.from(c)))}const l=this.isColSelection()&&this.isRowSelection()?t:i;return new ze(Te.from(l),1,1)}replace(t,n=ze.empty){const o=t.steps.length,r=this.ranges;for(let i=0;i<r.length;i++){const{$from:l,$to:a}=r[i],c=t.mapping.slice(o);t.replace(c.map(l.pos),c.map(a.pos),i?ze.empty:n)}const s=ft.findFrom(t.doc.resolve(t.mapping.slice(o).map(this.to)),-1);s&&t.setSelection(s)}replaceWith(t,n){this.replace(t,new ze(Te.from(n),0,0))}forEachCell(t){const n=this.$anchorCell.node(-1),o=jt.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=jt.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 ri(t,n)}isRowSelection(){const t=this.$anchorCell.node(-1),n=jt.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 ri&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,n=t){const o=t.node(-1),r=jt.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 ri(t,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(t,n){return new ri(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,o=n){return new ri(t.resolve(n),t.resolve(o))}getBookmark(){return new kye(this.$anchorCell.pos,this.$headCell.pos)}};ln.prototype.visible=!1;ft.jsonID("cell",ln);var kye=class DN{constructor(t,n){this.anchor=t,this.head=n}map(t){return new DN(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&&nC(n,o)?new ln(n,o):ft.near(o,1)}};function Cye(e){if(!(e.selection instanceof ln))return null;const t=[];return e.selection.forEachCell((n,o)=>{t.push(Ln.node(o,o+n.nodeSize,{class:"selectedCell"}))}),en.create(e.doc,t)}function Sye({$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 $ye({$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 Eye(e,t,n){const o=(t||e).selection,r=(t||e).doc;let s,i;if(o instanceof at&&(i=o.node.type.spec.tableRole)){if(i=="cell"||i=="header_cell")s=ln.create(r,o.from);else if(i=="row"){const l=r.resolve(o.from+1);s=ln.rowSelection(l,l)}else if(!n){const l=jt.get(o.node),a=o.from+1,c=a+l.map[l.width*l.height-1];s=ln.create(r,a+1,c)}}else o instanceof lt&&Sye(o)?s=lt.create(r,o.from):o instanceof lt&&$ye(o)&&(s=lt.create(r,o.$from.start(),o.$from.end()));return s&&(t||(t=e.tr)).setSelection(s),t}var xye=new mn("fix-tables");function BN(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 c=l,u=Math.min(r,i+3);c<u;c++)if(e.child(c)==a){l=c+1,n+=a.nodeSize;continue e}o(a,n),l<r&&e.child(l).sameMarkup(a)?BN(e.child(l),a,n+1,o):a.nodesBetween(0,a.content.size,o,n+1),n+=a.nodeSize}}function Tye(e,t){let n;const o=(r,s)=>{r.type.spec.tableRole=="table"&&(n=Mye(e,r,s,n))};return t?t.doc!=e.doc&&BN(t.doc,e.doc,0,o):e.doc.descendants(o),n}function Mye(e,t,n,o){const r=jt.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 c=r.problems[a];if(c.type=="collision"){const u=t.nodeAt(c.pos);if(!u)continue;const d=u.attrs;for(let f=0;f<d.rowspan;f++)s[c.row+f]+=c.n;o.setNodeMarkup(o.mapping.map(n+1+c.pos),null,ac(d,d.colspan-c.n,c.n))}else if(c.type=="missing")s[c.row]+=c.n;else if(c.type=="overlong_rowspan"){const u=t.nodeAt(c.pos);if(!u)continue;o.setNodeMarkup(o.mapping.map(n+1+c.pos),null,{...u.attrs,rowspan:u.attrs.rowspan-c.n})}else if(c.type=="colwidth mismatch"){const u=t.nodeAt(c.pos);if(!u)continue;o.setNodeMarkup(o.mapping.map(n+1+c.pos),null,{...u.attrs,colwidth:c.colwidth})}}let i,l;for(let a=0;a<s.length;a++)s[a]&&(i==null&&(i=a),l=a);for(let a=0,c=n+1;a<r.height;a++){const u=t.child(a),d=c+u.nodeSize,f=s[a];if(f>0){let h="cell";u.firstChild&&(h=u.firstChild.type.spec.tableRole);const p=[];for(let v=0;v<f;v++){const y=Dr(e.schema)[h].createAndFill();y&&p.push(y)}const m=(a==0||i==a-1)&&l==a?c+1:d-1;o.insert(o.mapping.map(m),p)}c=d}return o.setMeta(xye,{fixTables:!0})}function Jl(e){const t=e.selection,n=h_(e),o=n.node(-1),r=n.start(-1),s=jt.get(o);return{...t instanceof ln?s.rectBetween(t.$anchorCell.pos-r,t.$headCell.pos-r):s.findCell(n.pos-r),tableStart:r,map:s,table:o}}function VN(e,{map:t,tableStart:n,table:o},r){let s=r>0?-1:0;wye(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],c=o.nodeAt(a);e.setNodeMarkup(e.mapping.map(n+a),null,bye(c.attrs,r-t.colCount(a))),i+=c.attrs.rowspan-1}else{const a=s==null?Dr(o.type.schema).cell:o.nodeAt(t.map[l+s]).type,c=t.positionAt(i,r,o);e.insert(e.mapping.map(n+c),a.createAndFill())}}return e}function Aye(e,t){if(!Br(e))return!1;if(t){const n=Jl(e);t(VN(e.tr,n,n.left))}return!0}function Oye(e,t){if(!Br(e))return!1;if(t){const n=Jl(e);t(VN(e.tr,n,n.right))}return!0}function Iye(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],c=n.nodeAt(a),u=c.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,ac(u,r-t.colCount(a)));else{const d=e.mapping.slice(s).map(o+a);e.delete(d,d+c.nodeSize)}i+=u.rowspan}}function Nye(e,t){if(!Br(e))return!1;if(t){const n=Jl(e),o=e.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let r=n.right-1;Iye(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=jt.get(s)}t(o)}return!0}function Pye(e,{map:t,table:n,tableStart:o},r){let s=0;for(let c=0;c<r;c++)s+=n.child(c).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 c=0,u=r*t.width;c<t.width;c++,u++){const d=t.map[u];if(!a.has(d)){if(a.add(d),r>0&&d==t.map[u-t.width]){const f=n.nodeAt(d).attrs;e.setNodeMarkup(e.mapping.slice(l).map(d+o),null,{...f,rowspan:f.rowspan-1}),c+=f.colspan-1}else if(r<t.height&&d==t.map[u+t.width]){const f=n.nodeAt(d),h=f.attrs,p=f.type.create({...h,rowspan:f.attrs.rowspan-1},f.content),m=t.positionAt(r+1,c,n);e.insert(e.mapping.slice(l).map(o+m),p),c+=h.colspan-1}}}}function Lye(e,t){if(!Br(e))return!1;if(t){const n=Jl(e),o=e.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let r=n.bottom-1;Pye(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=jt.get(n.table)}t(o)}return!0}function Rye(e,t){return function(n,o){if(!Br(n))return!1;const r=h_(n);if(r.nodeAfter.attrs[e]===t)return!1;if(o){const s=n.tr;n.selection instanceof ln?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 Fye(e){return function(t,n){if(!Br(t))return!1;if(n){const o=Dr(t.schema),r=Jl(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 $$(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 oC(e,t){return t=t||{useDeprecatedLogic:!1},t.useDeprecatedLogic?Fye(e):function(n,o){if(!Br(n))return!1;if(o){const r=Dr(n.schema),s=Jl(n),i=n.tr,l=$$("row",s,r),a=$$("column",s,r),u=(e==="column"?l:e==="row"?a:!1)?1:0,d=e=="column"?{left:0,top:u,right:1,bottom:s.map.height}:e=="row"?{left:u,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(h=>{const p=h+s.tableStart,m=i.doc.nodeAt(p);m&&i.setNodeMarkup(p,f,m.attrs)}),o(i)}return!0}}oC("row",{useDeprecatedLogic:!0});oC("column",{useDeprecatedLogic:!0});oC("cell",{useDeprecatedLogic:!0});function Dye(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 zN(e){return function(t,n){if(!Br(t))return!1;const o=Dye(h_(t),e);if(o==null)return!1;if(n){const r=t.doc.resolve(o);n(t.tr.setSelection(lt.between(r,yye(r))).scrollIntoView())}return!0}}function Bye(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 wm(e,t){const n=e.selection;if(!(n instanceof ln))return!1;if(t){const o=e.tr,r=Dr(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 ze(r,0,0))}),o.docChanged&&t(o)}return!0}function Vye(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 c=t.child(a).content;const u=a?0:Math.max(0,n-1),d=a<t.childCount-1?0:Math.max(0,o-1);(u||d)&&(c=ab(Dr(i).row,new ze(c,u,d)).content),l.push(c)}else if(s=="cell"||s=="header_cell")l.push(n||o?ab(Dr(i).row,new ze(t,n,o)).content:t);else return null;return zye(i,l)}function zye(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 c=r;c<r+l;c++)n[c]=(n[c]||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(Te.empty),n[r]<o){const s=Dr(e).cell.createAndFill(),i=[];for(let l=n[r];l<o;l++)i.push(s);t[r]=t[r].append(Te.from(i))}return{height:t.length,width:o,rows:t}}function ab(e,t){const n=e.createAndFill();return new oI(n).replace(0,n.content.size,t).doc}function jye({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],c=[];for(let u=s[l]||0,d=0;u<o;d++){let f=a.child(d%a.childCount);u+f.attrs.colspan>o&&(f=f.type.createChecked(ac(f.attrs,f.attrs.colspan,u+f.attrs.colspan-o),f.content)),c.push(f),u+=f.attrs.colspan;for(let h=1;h<f.attrs.rowspan;h++)s[l+h]=(s[l+h]||0)+f.attrs.colspan}i.push(Te.from(c))}n=i,e=o}if(t!=r){const s=[];for(let i=0,l=0;i<r;i++,l++){const a=[],c=n[l%t];for(let u=0;u<c.childCount;u++){let d=c.child(u);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(Te.from(a))}n=s,t=r}return{width:e,height:t,rows:n}}function Hye(e,t,n,o,r,s,i){const l=e.doc.type.schema,a=Dr(l);let c,u;if(r>t.width)for(let d=0,f=0;d<t.height;d++){const h=n.child(d);f+=h.nodeSize;const p=[];let m;h.lastChild==null||h.lastChild.type==a.cell?m=c||(c=a.cell.createAndFill()):m=u||(u=a.header_cell.createAndFill());for(let v=t.width;v<r;v++)p.push(m);e.insert(e.mapping.slice(i).map(f-1+o),p)}if(s>t.height){const d=[];for(let p=0,m=(t.height-1)*t.width;p<Math.max(t.width,r);p++){const v=p>=t.width?!1:n.nodeAt(t.map[m+p]).type==a.header_cell;d.push(v?u||(u=a.header_cell.createAndFill()):c||(c=a.cell.createAndFill()))}const f=a.row.create(null,Te.from(d)),h=[];for(let p=t.height;p<s;p++)h.push(f);e.insert(e.mapping.slice(i).map(o+n.nodeSize-2),h)}return!!(c||u)}function E$(e,t,n,o,r,s,i,l){if(i==0||i==t.height)return!1;let a=!1;for(let c=r;c<s;c++){const u=i*t.width+c,d=t.map[u];if(t.map[u-t.width]==d){a=!0;const f=n.nodeAt(d),{top:h,left:p}=t.findCell(d);e.setNodeMarkup(e.mapping.slice(l).map(d+o),null,{...f.attrs,rowspan:i-h}),e.insert(e.mapping.slice(l).map(t.positionAt(i,p,n)),f.type.createAndFill({...f.attrs,rowspan:h+f.attrs.rowspan-i})),c+=f.attrs.colspan-1}}return a}function x$(e,t,n,o,r,s,i,l){if(i==0||i==t.width)return!1;let a=!1;for(let c=r;c<s;c++){const u=c*t.width+i,d=t.map[u];if(t.map[u-1]==d){a=!0;const f=n.nodeAt(d),h=t.colCount(d),p=e.mapping.slice(l).map(d+o);e.setNodeMarkup(p,null,ac(f.attrs,i-h,f.attrs.colspan-(i-h))),e.insert(p+f.nodeSize,f.type.createAndFill(ac(f.attrs,0,i-h))),c+=f.attrs.rowspan-1}}return a}function T$(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=jt.get(s);const{top:l,left:a}=o,c=a+r.width,u=l+r.height,d=e.tr;let f=0;function h(){if(s=n?d.doc.nodeAt(n-1):d.doc,!s)throw new Error("No table found");i=jt.get(s),f=d.mapping.maps.length}Hye(d,i,s,n,c,u,f)&&h(),E$(d,i,s,n,a,c,l,f)&&h(),E$(d,i,s,n,a,c,u,f)&&h(),x$(d,i,s,n,l,u,a,f)&&h(),x$(d,i,s,n,l,u,c,f)&&h();for(let p=l;p<u;p++){const m=i.positionAt(p,a,s),v=i.positionAt(p,c,s);d.replace(d.mapping.slice(f).map(m+n),d.mapping.slice(f).map(v+n),new ze(r.rows[p-l],0,0))}h(),d.setSelection(new ln(d.doc.resolve(n+i.positionAt(l,a,s)),d.doc.resolve(n+i.positionAt(u-1,c-1,s)))),t(d)}var Uye=bI({ArrowLeft:km("horiz",-1),ArrowRight:km("horiz",1),ArrowUp:km("vert",-1),ArrowDown:km("vert",1),"Shift-ArrowLeft":Cm("horiz",-1),"Shift-ArrowRight":Cm("horiz",1),"Shift-ArrowUp":Cm("vert",-1),"Shift-ArrowDown":Cm("vert",1),Backspace:wm,"Mod-Backspace":wm,Delete:wm,"Mod-Delete":wm});function O1(e,t,n){return n.eq(e.selection)?!1:(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function km(e,t){return(n,o,r)=>{if(!r)return!1;const s=n.selection;if(s instanceof ln)return O1(n,o,ft.near(s.$headCell,t));if(e!="horiz"&&!s.empty)return!1;const i=jN(r,e,t);if(i==null)return!1;if(e=="horiz")return O1(n,o,ft.near(n.doc.resolve(s.head+t),t));{const l=n.doc.resolve(i),a=FN(l,e,t);let c;return a?c=ft.near(a,1):t<0?c=ft.near(n.doc.resolve(l.before(-1)),-1):c=ft.near(n.doc.resolve(l.after(-1)),1),O1(n,o,c)}}}function Cm(e,t){return(n,o,r)=>{if(!r)return!1;const s=n.selection;let i;if(s instanceof ln)i=s;else{const a=jN(r,e,t);if(a==null)return!1;i=new ln(n.doc.resolve(a))}const l=FN(i.$headCell,e,t);return l?O1(n,o,new ln(i.$anchorCell,l)):!1}}function Wye(e,t){const n=e.state.doc,o=Ap(n.resolve(t));return o?(e.dispatch(e.state.tr.setSelection(new ln(o))),!0):!1}function qye(e,t,n){if(!Br(e.state))return!1;let o=Vye(n);const r=e.state.selection;if(r instanceof ln){o||(o={width:1,height:1,rows:[Te.from(ab(Dr(e.state.schema).cell,n))]});const s=r.$anchorCell.node(-1),i=r.$anchorCell.start(-1),l=jt.get(s).rectBetween(r.$anchorCell.pos-i,r.$headCell.pos-i);return o=jye(o,l.right-l.left,l.bottom-l.top),T$(e.state,e.dispatch,i,l,o),!0}else if(o){const s=h_(e.state),i=s.start(-1);return T$(e.state,e.dispatch,i,jt.get(s.node(-1)).findCell(s.pos-i),o),!0}else return!1}function Kye(e,t){var n;if(t.ctrlKey||t.metaKey)return;const o=M$(e,t.target);let r;if(t.shiftKey&&e.state.selection instanceof ln)s(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&o&&(r=Ap(e.state.selection.$anchor))!=null&&((n=zv(e,t))==null?void 0:n.pos)!=r.pos)s(r,t),t.preventDefault();else if(!o)return;function s(a,c){let u=zv(e,c);const d=ml.getState(e.state)==null;if(!u||!nC(a,u))if(d)u=a;else return;const f=new ln(a,u);if(d||!e.state.selection.eq(f)){const h=e.state.tr.setSelection(f);d&&h.setMeta(ml,a.pos),e.dispatch(h)}}function i(){e.root.removeEventListener("mouseup",i),e.root.removeEventListener("dragstart",i),e.root.removeEventListener("mousemove",l),ml.getState(e.state)!=null&&e.dispatch(e.state.tr.setMeta(ml,-1))}function l(a){const c=a,u=ml.getState(e.state);let d;if(u!=null)d=e.state.doc.resolve(u);else if(M$(e,c.target)!=o&&(d=zv(e,t),!d))return i();d&&s(d,c)}e.root.addEventListener("mouseup",i),e.root.addEventListener("dragstart",i),e.root.addEventListener("mousemove",l)}function jN(e,t,n){if(!(e.state.selection instanceof lt))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 M$(e,t){for(;t&&t!=e.dom;t=t.parentNode)if(t.nodeName=="TD"||t.nodeName=="TH")return t;return null}function zv(e,t){const n=e.posAtCoords({left:t.clientX,top:t.clientY});return n&&n?Ap(e.state.doc.resolve(n.pos)):null}var Gye=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")),cb(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,cb(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){return e.type=="attributes"&&(e.target==this.table||this.colgroup.contains(e.target))}};function cb(e,t,n,o,r,s){var i;let l=0,a=!0,c=t.firstChild;const u=e.firstChild;if(u){for(let d=0,f=0;d<u.childCount;d++){const{colspan:h,colwidth:p}=u.child(d).attrs;for(let m=0;m<h;m++,f++){const v=r==f?s:p&&p[m],y=v?v+"px":"";l+=v||o,v||(a=!1),c?(c.style.width!=y&&(c.style.width=y),c=c.nextSibling):t.appendChild(document.createElement("col")).style.width=y}}for(;c;){const d=c.nextSibling;(i=c.parentNode)==null||i.removeChild(c),c=d}a?(n.style.width=l+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=l+"px")}}var kr=new mn("tableColumnResizing");function Yye({handleWidth:e=5,cellMinWidth:t=25,View:n=Gye,lastColumnResizable:o=!0}={}){const r=new wn({key:kr,state:{init(s,i){var l,a;const c=(a=(l=r.spec)==null?void 0:l.props)==null?void 0:a.nodeViews,u=Dr(i.schema).table.name;return n&&c&&(c[u]=(d,f)=>new n(d,t,f)),new Jye(-1,!1)},apply(s,i){return i.apply(s)}},props:{attributes:s=>{const i=kr.getState(s);return i&&i.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(s,i)=>{Zye(s,i,e,t,o)},mouseleave:s=>{Xye(s)},mousedown:(s,i)=>{Qye(s,i,t)}},decorations:s=>{const i=kr.getState(s);if(i&&i.activeHandle>-1)return s2e(s,i.activeHandle)},nodeViews:{}}});return r}var Jye=class I1{constructor(t,n){this.activeHandle=t,this.dragging=n}apply(t){const n=this,o=t.getMeta(kr);if(o&&o.setHandle!=null)return new I1(o.setHandle,!1);if(o&&o.setDragging!==void 0)return new I1(n.activeHandle,o.setDragging);if(n.activeHandle>-1&&t.docChanged){let r=t.mapping.map(n.activeHandle,-1);return lb(t.doc.resolve(r))||(r=-1),new I1(r,n.dragging)}return n}};function Zye(e,t,n,o,r){const s=kr.getState(e.state);if(s&&!s.dragging){const i=t2e(t.target);let l=-1;if(i){const{left:a,right:c}=i.getBoundingClientRect();t.clientX-a<=n?l=A$(e,t,"left",n):c-t.clientX<=n&&(l=A$(e,t,"right",n))}if(l!=s.activeHandle){if(!r&&l!==-1){const a=e.state.doc.resolve(l),c=a.node(-1),u=jt.get(c),d=a.start(-1);if(u.colCount(a.pos-d)+a.nodeAfter.attrs.colspan-1==u.width-1)return}HN(e,l)}}}function Xye(e){const t=kr.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&HN(e,-1)}function Qye(e,t,n){var o;const r=(o=e.dom.ownerDocument.defaultView)!=null?o:window,s=kr.getState(e.state);if(!s||s.activeHandle==-1||s.dragging)return!1;const i=e.state.doc.nodeAt(s.activeHandle),l=e2e(e,s.activeHandle,i.attrs);e.dispatch(e.state.tr.setMeta(kr,{setDragging:{startX:t.clientX,startWidth:l}}));function a(u){r.removeEventListener("mouseup",a),r.removeEventListener("mousemove",c);const d=kr.getState(e.state);d!=null&&d.dragging&&(n2e(e,d.activeHandle,O$(d.dragging,u,n)),e.dispatch(e.state.tr.setMeta(kr,{setDragging:null})))}function c(u){if(!u.which)return a(u);const d=kr.getState(e.state);if(d&&d.dragging){const f=O$(d.dragging,u,n);o2e(e,d.activeHandle,f,n)}}return r.addEventListener("mouseup",a),r.addEventListener("mousemove",c),t.preventDefault(),!0}function e2e(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 c=0;c<n;c++)o[c]&&(l-=o[c],a--);return l/a}function t2e(e){for(;e&&e.nodeName!="TD"&&e.nodeName!="TH";)e=e.classList&&e.classList.contains("ProseMirror")?null:e.parentNode;return e}function A$(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=Ap(e.state.doc.resolve(i));if(!l)return-1;if(n=="right")return l.pos;const a=jt.get(l.node(-1)),c=l.start(-1),u=a.map.indexOf(l.pos-c);return u%a.width==0?-1:c+a.map[u-1]}function O$(e,t,n){const o=t.clientX-e.startX;return Math.max(n,e.startWidth+o)}function HN(e,t){e.dispatch(e.state.tr.setMeta(kr,{setHandle:t}))}function n2e(e,t,n){const o=e.state.doc.resolve(t),r=o.node(-1),s=jt.get(r),i=o.start(-1),l=s.colCount(o.pos-i)+o.nodeAfter.attrs.colspan-1,a=e.state.tr;for(let c=0;c<s.height;c++){const u=c*s.width+l;if(c&&s.map[u]==s.map[u-s.width])continue;const d=s.map[u],f=r.nodeAt(d).attrs,h=f.colspan==1?0:l-s.colCount(d);if(f.colwidth&&f.colwidth[h]==n)continue;const p=f.colwidth?f.colwidth.slice():r2e(f.colspan);p[h]=n,a.setNodeMarkup(i+d,null,{...f,colwidth:p})}a.docChanged&&e.dispatch(a)}function o2e(e,t,n,o){const r=e.state.doc.resolve(t),s=r.node(-1),i=r.start(-1),l=jt.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&&cb(s,a.firstChild,a,o,l,n)}function r2e(e){return Array(e).fill(0)}function s2e(e,t){const n=[],o=e.doc.resolve(t),r=o.node(-1);if(!r)return en.empty;const s=jt.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 c=l+a*s.width;if((l==s.width-1||s.map[c]!=s.map[c+1])&&(a==0||s.map[c]!=s.map[c-s.width])){const u=s.map[c],d=i+u+r.nodeAt(u).nodeSize-1,f=document.createElement("div");f.className="column-resize-handle",n.push(Ln.widget(d,f))}}return en.create(e.doc,n)}function i2e({allowTableNodeSelection:e=!1}={}){return new wn({key:ml,state:{init(){return null},apply(t,n){const o=t.getMeta(ml);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:Cye,handleDOMEvents:{mousedown:Kye},createSelectionBetween(t){return ml.getState(t.state)!=null?t.state.selection:null},handleTripleClick:Wye,handleKeyDown:Uye,handlePaste:qye},appendTransaction(t,n,o){return Eye(o,Tye(o,n),e)}})}var Kg=typeof navigator<"u"?navigator:null,rC=Kg&&Kg.userAgent||"",l2e=/Edge\/(\d+)/.exec(rC),a2e=/MSIE \d/.exec(rC),c2e=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(rC),u2e=!!(a2e||c2e||l2e),d2e=!u2e&&!!Kg&&/Apple Computer/.test(Kg.vendor),UN=new mn("safari-ime-span"),ub=!1,f2e={key:UN,props:{decorations:h2e,handleDOMEvents:{compositionstart:()=>{ub=!0},compositionend:()=>{ub=!1}}}};function h2e(e){const{$from:t,$to:n,to:o}=e.selection;if(ub&&t.sameParent(n)){const r=Ln.widget(o,p2e,{ignoreSelection:!0,key:"safari-ime-span"});return en.create(e.doc,[r])}}function p2e(e){const t=e.dom.ownerDocument.createElement("span");return t.className="ProseMirror-safari-ime-span",t}var m2e=new wn(d2e?f2e:{key:UN});function I$(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 g2e(e,t,n){const r=Y0((n||{}).ignore||[]),s=_2e(t);let i=-1;for(;++i<s.length;)OO(e,"text",l);function l(c,u){let d=-1,f;for(;++d<u.length;){const h=u[d],p=f?f.children:void 0;if(r(h,p?p.indexOf(h):void 0,f))return;f=h}if(f)return a(c,u)}function a(c,u){const d=u[u.length-1],f=s[i][0],h=s[i][1];let p=0;const v=d.children.indexOf(c);let y=!1,E=[];f.lastIndex=0;let w=f.exec(c.value);for(;w;){const C=w.index,T={index:w.index,input:w.input,stack:[...u,c]};let $=h(...w,T);if(typeof $=="string"&&($=$.length>0?{type:"text",value:$}:void 0),$===!1?f.lastIndex=C+1:(p!==C&&E.push({type:"text",value:c.value.slice(p,C)}),Array.isArray($)?E.push(...$):$&&E.push($),p=C+w[0].length,y=!0),!f.global)break;w=f.exec(c.value)}return y?(p<c.value.length&&E.push({type:"text",value:c.value.slice(p)}),d.children.splice(v,1,...E)):E=[c],v+E.length}}function _2e(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([v2e(r[0]),y2e(r[1])])}return t}function v2e(e){return typeof e=="string"?new RegExp(a_(e),"g"):e}function y2e(e){return typeof e=="function"?e:function(){return e}}const jv="phrasing",Hv=["autolink","link","image","label"];function b2e(){return{transforms:[x2e],enter:{literalAutolink:k2e,literalAutolinkEmail:Uv,literalAutolinkHttp:Uv,literalAutolinkWww:Uv},exit:{literalAutolink:E2e,literalAutolinkEmail:$2e,literalAutolinkHttp:C2e,literalAutolinkWww:S2e}}}function w2e(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:jv,notInConstruct:Hv},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:jv,notInConstruct:Hv},{character:":",before:"[ps]",after:"\\/",inConstruct:jv,notInConstruct:Hv}]}}function k2e(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Uv(e){this.config.enter.autolinkProtocol.call(this,e)}function C2e(e){this.config.exit.autolinkProtocol.call(this,e)}function S2e(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 $2e(e){this.config.exit.autolinkEmail.call(this,e)}function E2e(e){this.exit(e)}function x2e(e){g2e(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,T2e],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),M2e]],{ignore:["link","linkReference"]})}function T2e(e,t,n,o,r){let s="";if(!WN(r)||(/^w/i.test(t)&&(n=t+n,t="",s="http://"),!A2e(n)))return!1;const i=O2e(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 M2e(e,t,n,o){return!WN(o,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function A2e(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 O2e(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=I$(e,"(");let s=I$(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 WN(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||sc(n)||K0(n))&&(!t||n!==47)}qN.peek=j2e;function I2e(){return{enter:{gfmFootnoteDefinition:P2e,gfmFootnoteDefinitionLabelString:L2e,gfmFootnoteCall:D2e,gfmFootnoteCallString:B2e},exit:{gfmFootnoteDefinition:F2e,gfmFootnoteDefinitionLabelString:R2e,gfmFootnoteCall:z2e,gfmFootnoteCallString:V2e}}}function N2e(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:H2e,footnoteReference:qN}}}function P2e(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function L2e(){this.buffer()}function R2e(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=Xr(this.sliceSerialize(e)).toLowerCase()}function F2e(e){this.exit(e)}function D2e(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function B2e(){this.buffer()}function V2e(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=Xr(this.sliceSerialize(e)).toLowerCase()}function z2e(e){this.exit(e)}function qN(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 j2e(){return"["}function H2e(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()),U2e)),i(),s}function U2e(e,t,n){return t===0?e:(n?"":" ")+e}const W2e=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];KN.peek=J2e;function q2e(){return{canContainEols:["delete"],enter:{strikethrough:G2e},exit:{strikethrough:Y2e}}}function K2e(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:W2e}],handlers:{delete:KN}}}function G2e(e){this.enter({type:"delete",children:[]},e)}function Y2e(e){this.exit(e)}function KN(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 J2e(){return"~"}function Z2e(e,t={}){const n=(t.align||[]).concat(),o=t.stringLength||Q2e,r=[],s=[],i=[],l=[];let a=0,c=-1;for(;++c<e.length;){const p=[],m=[];let v=-1;for(e[c].length>a&&(a=e[c].length);++v<e[c].length;){const y=X2e(e[c][v]);if(t.alignDelimiters!==!1){const E=o(y);m[v]=E,(l[v]===void 0||E>l[v])&&(l[v]=E)}p.push(y)}s[c]=p,i[c]=m}let u=-1;if(typeof n=="object"&&"length"in n)for(;++u<a;)r[u]=N$(n[u]);else{const p=N$(n);for(;++u<a;)r[u]=p}u=-1;const d=[],f=[];for(;++u<a;){const p=r[u];let m="",v="";p===99?(m=":",v=":"):p===108?m=":":p===114&&(v=":");let y=t.alignDelimiters===!1?1:Math.max(1,l[u]-m.length-v.length);const E=m+"-".repeat(y)+v;t.alignDelimiters!==!1&&(y=m.length+y+v.length,y>l[u]&&(l[u]=y),f[u]=y),d[u]=E}s.splice(1,0,d),i.splice(1,0,f),c=-1;const h=[];for(;++c<s.length;){const p=s[c],m=i[c];u=-1;const v=[];for(;++u<a;){const y=p[u]||"";let E="",w="";if(t.alignDelimiters!==!1){const C=l[u]-(m[u]||0),T=r[u];T===114?E=" ".repeat(C):T===99?C%2?(E=" ".repeat(C/2+.5),w=" ".repeat(C/2-.5)):(E=" ".repeat(C/2),w=E):w=" ".repeat(C)}t.delimiterStart!==!1&&!u&&v.push("|"),t.padding!==!1&&!(t.alignDelimiters===!1&&y==="")&&(t.delimiterStart!==!1||u)&&v.push(" "),t.alignDelimiters!==!1&&v.push(E),v.push(y),t.alignDelimiters!==!1&&v.push(w),t.padding!==!1&&v.push(" "),(t.delimiterEnd!==!1||u!==a-1)&&v.push("|")}h.push(t.delimiterEnd===!1?v.join("").replace(/ +$/,""):v.join(""))}return h.join(` |
| 121 |
`)}function X2e(e){return e==null?"":String(e)}function Q2e(e){return e.length}function N$(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 ebe(){return{enter:{table:tbe,tableData:P$,tableHeader:P$,tableRow:obe},exit:{codeText:rbe,table:nbe,tableData:Wv,tableHeader:Wv,tableRow:Wv}}}function tbe(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 nbe(e){this.exit(e),this.data.inTable=void 0}function obe(e){this.enter({type:"tableRow",children:[]},e)}function Wv(e){this.exit(e)}function P$(e){this.enter({type:"tableCell",children:[]},e)}function rbe(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,sbe));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function sbe(e,t){return t==="|"?t:e}function ibe(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(h,p,m,v){return c(u(h,m,v),h.align)}function l(h,p,m,v){const y=d(h,m,v),E=c([y]);return E.slice(0,E.indexOf(` |
| 123 |
`))}function a(h,p,m,v){const y=m.enter("tableCell"),E=m.enter("phrasing"),w=m.containerPhrasing(h,{...v,before:s,after:s});return E(),y(),w}function c(h,p){return Z2e(h,{align:p,alignDelimiters:o,padding:n,stringLength:r})}function u(h,p,m){const v=h.children;let y=-1;const E=[],w=p.enter("table");for(;++y<v.length;)E[y]=d(v[y],p,m);return w(),E}function d(h,p,m){const v=h.children;let y=-1;const E=[],w=p.enter("tableRow");for(;++y<v.length;)E[y]=a(v[y],h,p,m);return w(),E}function f(h,p,m){let v=q3.inlineCode(h,p,m);return m.stack.includes("tableCell")&&(v=v.replace(/\|/g,"\\$&")),v}}function lbe(){return{exit:{taskListCheckValueChecked:L$,taskListCheckValueUnchecked:L$,paragraph:cbe}}}function abe(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:ube}}}function L$(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function cbe(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 ube(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=q3.listItem(e,t,n,{...o,...l.current()});return s&&(a=a.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),a;function c(u){return u+i}}function dbe(){return[b2e(),I2e(),q2e(),ebe(),lbe()]}function fbe(e){return{extensions:[w2e(),N2e(),K2e(),ibe(e),abe()]}}const hbe={tokenize:ybe,partial:!0},GN={tokenize:bbe,partial:!0},YN={tokenize:wbe,partial:!0},JN={tokenize:kbe,partial:!0},pbe={tokenize:Cbe,partial:!0},ZN={name:"wwwAutolink",tokenize:_be,previous:QN},XN={name:"protocolAutolink",tokenize:vbe,previous:eP},Pi={name:"emailAutolink",tokenize:gbe,previous:tP},Ys={};function mbe(){return{text:Ys}}let oa=48;for(;oa<123;)Ys[oa]=Pi,oa++,oa===58?oa=65:oa===91&&(oa=97);Ys[43]=Pi;Ys[45]=Pi;Ys[46]=Pi;Ys[95]=Pi;Ys[72]=[Pi,XN];Ys[104]=[Pi,XN];Ys[87]=[Pi,ZN];Ys[119]=[Pi,ZN];function gbe(e,t,n){const o=this;let r,s;return i;function i(d){return!db(d)||!tP.call(o,o.previous)||sC(o.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(d))}function l(d){return db(d)?(e.consume(d),l):d===64?(e.consume(d),a):n(d)}function a(d){return d===46?e.check(pbe,u,c)(d):d===45||d===95||Lo(d)?(s=!0,e.consume(d),a):u(d)}function c(d){return e.consume(d),r=!0,a}function u(d){return s&&r&&yo(o.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function _be(e,t,n){const o=this;return r;function r(i){return i!==87&&i!==119||!QN.call(o,o.previous)||sC(o.events)?n(i):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(hbe,e.attempt(GN,e.attempt(YN,s),n),n)(i))}function s(i){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(i)}}function vbe(e,t,n){const o=this;let r="",s=!1;return i;function i(d){return(d===72||d===104)&&eP.call(o,o.previous)&&!sC(o.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),r+=String.fromCodePoint(d),e.consume(d),l):n(d)}function l(d){if(yo(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?c:(s=!0,a)):n(d)}function c(d){return d===null||Dg(d)||Gt(d)||sc(d)||K0(d)?n(d):e.attempt(GN,e.attempt(YN,u),n)(d)}function u(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function ybe(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 bbe(e,t,n){let o,r,s;return i;function i(c){return c===46||c===95?e.check(JN,a,l)(c):c===null||Gt(c)||sc(c)||c!==45&&K0(c)?a(c):(s=!0,e.consume(c),i)}function l(c){return c===95?o=!0:(r=o,o=void 0),e.consume(c),i}function a(c){return r||o||!s?n(c):t(c)}}function wbe(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(JN,t,s)(i):i===null||Gt(i)||sc(i)?t(i):(e.consume(i),r)}function s(i){return i===41&&o++,e.consume(i),r}}function kbe(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||Gt(l)||sc(l)?t(l):n(l)}function r(l){return l===null||l===40||l===91||Gt(l)||sc(l)?t(l):o(l)}function s(l){return yo(l)?i(l):n(l)}function i(l){return l===59?(e.consume(l),o):yo(l)?(e.consume(l),i):n(l)}}function Cbe(e,t,n){return o;function o(s){return e.consume(s),r}function r(s){return Lo(s)?n(s):t(s)}}function QN(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Gt(e)}function eP(e){return!yo(e)}function tP(e){return!(e===47||db(e))}function db(e){return e===43||e===45||e===46||e===95||Lo(e)}function sC(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 Sbe={tokenize:Ibe,partial:!0};function $be(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Mbe,continuation:{tokenize:Abe},exit:Obe}},text:{91:{name:"gfmFootnoteCall",tokenize:Tbe},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Ebe,resolveTo:xbe}}}}function Ebe(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 c=Xr(o.sliceSerialize({start:i.end,end:o.now()}));return c.codePointAt(0)!==94||!s.includes(c.slice(1))?n(a):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),t(a))}}function xbe(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 Tbe(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",c)}function c(d){if(s>999||d===93&&!i||d===null||d===91||Gt(d))return n(d);if(d===93){e.exit("chunkString");const f=e.exit("gfmFootnoteCallString");return r.includes(Xr(o.sliceSerialize(f)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return Gt(d)||(i=!0),s++,e.consume(d),d===92?u:c}function u(d){return d===91||d===92||d===93?(e.consume(d),s++,c):c(d)}}function Mbe(e,t,n){const o=this,r=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let s,i=0,l;return a;function a(p){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(p){return p===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",u):n(p)}function u(p){if(i>999||p===93&&!l||p===null||p===91||Gt(p))return n(p);if(p===93){e.exit("chunkString");const m=e.exit("gfmFootnoteDefinitionLabelString");return s=Xr(o.sliceSerialize(m)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f}return Gt(p)||(l=!0),i++,e.consume(p),p===92?d:u}function d(p){return p===91||p===92||p===93?(e.consume(p),i++,u):u(p)}function f(p){return p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),r.includes(s)||r.push(s),Nt(e,h,"gfmFootnoteDefinitionWhitespace")):n(p)}function h(p){return t(p)}}function Abe(e,t,n){return e.check(wp,t,e.attempt(Sbe,t,n))}function Obe(e){e.exit("gfmFootnoteDefinition")}function Ibe(e,t,n){const o=this;return Nt(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 Nbe(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 c=a;for(;c--;)if(i[c][0]==="exit"&&i[c][1].type==="strikethroughSequenceTemporary"&&i[c][1]._open&&i[a][1].end.offset-i[a][1].start.offset===i[c][1].end.offset-i[c][1].start.offset){i[a][1].type="strikethroughSequence",i[c][1].type="strikethroughSequence";const u={type:"strikethrough",start:Object.assign({},i[c][1].start),end:Object.assign({},i[a][1].end)},d={type:"strikethroughText",start:Object.assign({},i[c][1].end),end:Object.assign({},i[a][1].start)},f=[["enter",u,l],["enter",i[c][1],l],["exit",i[c][1],l],["enter",d,l]],h=l.parser.constructs.insideSpan.null;h&&Mr(f,f.length,0,G0(h,i.slice(c+1,a),l)),Mr(f,f.length,0,[["exit",d,l],["enter",i[a][1],l],["exit",i[a][1],l],["exit",u,l]]),Mr(i,c-1,a-c+3,f),a=c+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 c=this.previous,u=this.events;let d=0;return f;function f(p){return c===126&&u[u.length-1][1].type!=="characterEscape"?a(p):(i.enter("strikethroughSequenceTemporary"),h(p))}function h(p){const m=Bg(c);if(p===126)return d>1?a(p):(i.consume(p),d++,h);if(d<2&&!n)return a(p);const v=i.exit("strikethroughSequenceTemporary"),y=Bg(p);return v._open=!y||y===2&&!!m,v._close=!m||m===2&&!!y,l(p)}}}class Pbe{constructor(){this.map=[]}add(t,n,o){Lbe(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 Lbe(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 Rbe(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 Fbe(){return{flow:{null:{name:"table",tokenize:Dbe,resolveAll:Bbe}}}}function Dbe(e,t,n){const o=this;let r=0,s=0,i;return l;function l(I){let D=o.events.length-1;for(;D>-1;){const te=o.events[D][1].type;if(te==="lineEnding"||te==="linePrefix")D--;else break}const V=D>-1?o.events[D][1].type:null,G=V==="tableHead"||V==="tableRow"?$:a;return G===$&&o.parser.lazy[o.now().line]?n(I):G(I)}function a(I){return e.enter("tableHead"),e.enter("tableRow"),c(I)}function c(I){return I===124||(i=!0,s+=1),u(I)}function u(I){return I===null?n(I):st(I)?s>1?(s=0,o.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),h):n(I):Tt(I)?Nt(e,u,"whitespace")(I):(s+=1,i&&(i=!1,r+=1),I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),i=!0,u):(e.enter("data"),d(I)))}function d(I){return I===null||I===124||Gt(I)?(e.exit("data"),u(I)):(e.consume(I),I===92?f:d)}function f(I){return I===92||I===124?(e.consume(I),d):d(I)}function h(I){return o.interrupt=!1,o.parser.lazy[o.now().line]?n(I):(e.enter("tableDelimiterRow"),i=!1,Tt(I)?Nt(e,p,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):p(I))}function p(I){return I===45||I===58?v(I):I===124?(i=!0,e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),m):T(I)}function m(I){return Tt(I)?Nt(e,v,"whitespace")(I):v(I)}function v(I){return I===58?(s+=1,i=!0,e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),y):I===45?(s+=1,y(I)):I===null||st(I)?C(I):T(I)}function y(I){return I===45?(e.enter("tableDelimiterFiller"),E(I)):T(I)}function E(I){return I===45?(e.consume(I),E):I===58?(i=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),w):(e.exit("tableDelimiterFiller"),w(I))}function w(I){return Tt(I)?Nt(e,C,"whitespace")(I):C(I)}function C(I){return I===124?p(I):I===null||st(I)?!i||r!==s?T(I):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(I)):T(I)}function T(I){return n(I)}function $(I){return e.enter("tableRow"),A(I)}function A(I){return I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),A):I===null||st(I)?(e.exit("tableRow"),t(I)):Tt(I)?Nt(e,A,"whitespace")(I):(e.enter("data"),N(I))}function N(I){return I===null||I===124||Gt(I)?(e.exit("data"),A(I)):(e.consume(I),I===92?P:N)}function P(I){return I===92||I===124?(e.consume(I),N):N(I)}}function Bbe(e,t){let n=-1,o=!0,r=0,s=[0,0,0,0],i=[0,0,0,0],l=!1,a=0,c,u,d;const f=new Pbe;for(;++n<e.length;){const h=e[n],p=h[1];h[0]==="enter"?p.type==="tableHead"?(l=!1,a!==0&&(R$(f,t,a,c,u),u=void 0,a=0),c={type:"table",start:Object.assign({},p.start),end:Object.assign({},p.end)},f.add(n,0,[["enter",c,t]])):p.type==="tableRow"||p.type==="tableDelimiterRow"?(o=!0,d=void 0,s=[0,0,0,0],i=[0,n+1,0,0],l&&(l=!1,u={type:"tableBody",start:Object.assign({},p.start),end:Object.assign({},p.end)},f.add(n,0,[["enter",u,t]])),r=p.type==="tableDelimiterRow"?2:u?3:1):r&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")?(o=!1,i[2]===0&&(s[1]!==0&&(i[0]=i[1],d=Sm(f,t,s,r,void 0,d),s=[0,0,0,0]),i[2]=n)):p.type==="tableCellDivider"&&(o?o=!1:(s[1]!==0&&(i[0]=i[1],d=Sm(f,t,s,r,void 0,d)),s=i,i=[s[1],n,0,0])):p.type==="tableHead"?(l=!0,a=n):p.type==="tableRow"||p.type==="tableDelimiterRow"?(a=n,s[1]!==0?(i[0]=i[1],d=Sm(f,t,s,r,n,d)):i[1]!==0&&(d=Sm(f,t,i,r,n,d)),r=0):r&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")&&(i[3]=n)}for(a!==0&&R$(f,t,a,c,u),f.consume(t.events),n=-1;++n<t.events.length;){const h=t.events[n];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=Rbe(t.events,n))}return e}function Sm(e,t,n,o,r,s){const i=o===1?"tableHeader":o===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(s.end=Object.assign({},Yc(t.events,n[0])),e.add(n[0],0,[["exit",s,t]]));const a=Yc(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 c=Yc(t.events,n[2]),u=Yc(t.events,n[3]),d={type:l,start:Object.assign({},c),end:Object.assign({},u)};if(e.add(n[2],0,[["enter",d,t]]),o!==2){const f=t.events[n[2]],h=t.events[n[3]];if(f[1].end=Object.assign({},h[1].end),f[1].type="chunkText",f[1].contentType="text",n[3]>n[2]+1){const p=n[2]+1,m=n[3]-n[2]-1;e.add(p,m,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return r!==void 0&&(s.end=Object.assign({},Yc(t.events,r)),e.add(r,0,[["exit",s,t]]),s=void 0),s}function R$(e,t,n,o,r){const s=[],i=Yc(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 Yc(e,t){const n=e[t],o=n[0]==="enter"?"start":"end";return n[1][o]}const Vbe={name:"tasklistCheck",tokenize:jbe};function zbe(){return{text:{91:Vbe}}}function jbe(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 Gt(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 st(a)?t(a):Tt(a)?e.check({tokenize:Hbe},t,n)(a):n(a)}}function Hbe(e,t,n){return Nt(e,o,"whitespace");function o(r){return r===null?n(r):t(r)}}function Ube(e){return hO([mbe(),$be(),Nbe(e),Fbe(),zbe()])}const Wbe={};function qbe(e){const t=this,n=e||Wbe,o=t.data(),r=o.micromarkExtensions||(o.micromarkExtensions=[]),s=o.fromMarkdownExtensions||(o.fromMarkdownExtensions=[]),i=o.toMarkdownExtensions||(o.toMarkdownExtensions=[]);r.push(Ube(n)),s.push(dbe()),i.push(fbe(n))}function ct(e,t){return Object.assign(e,{meta:{package:"@milkdown/preset-gfm",...t}}),e}const iC=Tp("strike_through");ct(iC,{displayName:"Attr<strikethrough>",group:"Strikethrough"});const Cd=xp("strike_through",e=>({parseDOM:[{tag:"del"},{style:"text-decoration",getAttrs:t=>t==="line-through"}],toDOM:t=>["del",e.get(iC.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")}}}));ct(Cd.mark,{displayName:"MarkSchema<strikethrough>",group:"Strikethrough"});ct(Cd.ctx,{displayName:"MarkSchemaCtx<strikethrough>",group:"Strikethrough"});const p_=St("ToggleStrikeThrough",e=>()=>o_(Cd.type(e)));ct(p_,{displayName:"Command<ToggleStrikethrough>",group:"Strikethrough"});const nP=Wo(e=>Cp(/~([^~]+)~$/,Cd.type(e)));ct(nP,{displayName:"InputRule<strikethrough>",group:"Strikethrough"});const lC=qo("strikeThroughKeymap",{ToggleStrikethrough:{shortcuts:"Mod-Alt-x",command:e=>{const t=e.get(Ot);return()=>t.call(p_.key)}}});ct(lC.ctx,{displayName:"KeymapCtx<strikethrough>",group:"Strikethrough"});ct(lC.shortcuts,{displayName:"Keymap<strikethrough>",group:"Strikethrough"});const Op=_ye({tableGroup:"block",cellContent:"paragraph",cellAttributes:{alignment:{default:"left",getFromDOM:e=>e.style.textAlign||"left",setDOMAttr:(e,t)=>{t.style=`text-align: ${e||"left"}`}}}}),Sd=Un("table",()=>({...Op.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()}}}));ct(Sd.node,{displayName:"NodeSchema<table>",group:"Table"});ct(Sd.ctx,{displayName:"NodeSchemaCtx<table>",group:"Table"});const m_=Un("table_header_row",()=>({...Op.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()}}}));ct(m_.node,{displayName:"NodeSchema<tableHeaderRow>",group:"Table"});ct(m_.ctx,{displayName:"NodeSchemaCtx<tableHeaderRow>",group:"Table"});const Ip=Un("table_row",()=>({...Op.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()}}}));ct(Ip.node,{displayName:"NodeSchema<tableRow>",group:"Table"});ct(Ip.ctx,{displayName:"NodeSchemaCtx<tableRow>",group:"Table"});const Np=Un("table_cell",()=>({...Op.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()}}}));ct(Np.node,{displayName:"NodeSchema<tableCell>",group:"Table"});ct(Np.ctx,{displayName:"NodeSchemaCtx<tableCell>",group:"Table"});const g_=Un("table_header",()=>({...Op.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()}}}));ct(g_.node,{displayName:"NodeSchema<tableHeader>",group:"Table"});ct(g_.ctx,{displayName:"NodeSchemaCtx<tableHeader>",group:"Table"});function oP(e,t=3,n=3){const o=Array(n).fill(0).map(()=>Np.type(e).createAndFill()),r=Array(n).fill(0).map(()=>g_.type(e).createAndFill()),s=Array(t).fill(0).map((i,l)=>l===0?m_.type(e).create(null,r):Ip.type(e).create(null,o));return Sd.type(e).create(null,s)}function Pp(e){return ek(t=>t.type.spec.tableRole==="table")(e)}function Jc(e,t){const n=Pp(t.$from);if(!n)return;const o=jt.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 Zc(e,t){const n=Pp(t.$from);if(!n)return;const o=jt.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 Kbe(e){const t=Pp(e.$from);if(!t)return;const n=jt.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 Gbe(e){const t=Kbe(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 n_(e.setSelection(new ln(r,n)))}}return e}function rP(e,t,{map:n,tableStart:o,table:r},s){const i=Array(s).fill(0).reduce((a,c,u)=>a+r.child(u).nodeSize,o),l=Array(n.width).fill(0).map((a,c)=>{const u=r.nodeAt(n.map[c]);return Np.type(e).createAndFill({alignment:u==null?void 0:u.attrs.alignment})});return t.insert(i,Ip.type(e).create(null,l)),t}function sP(e){return(t,n)=>o=>{n=n??o.selection.from;const r=o.doc.resolve(n),s=ek(a=>a.type.name==="table")(r),i=s?{node:s.node,from:s.start}:void 0,l=e==="row";if(i){const a=jt.get(i.node);if(t>=0&&t<(l?a.height:a.width)){const c=a.positionAt(l?t:a.height-1,l?a.width-1:t,i.node),u=o.doc.resolve(i.from+c),d=l?ln.rowSelection:ln.colSelection,f=a.positionAt(l?t:0,l?0:t,i.node),h=o.doc.resolve(i.from+f);return n_(o.setSelection(d(u,h)))}}return o}}const Ybe=sP("row"),Jbe=sP("col");function F$(e){return e[0].map((t,n)=>e.map(o=>o[n]))}function iP(e,t){const n=[],o=jt.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],c=t[r][l],u=e.nodeAt(a).type.createChecked(Object.assign({},c.attrs),c.content,c.marks);i.push(u)}n.push(s.type.createChecked(s.attrs,i,s.marks))}return e.type.createChecked(e.attrs,n,e.marks)}function lP(e){const t=jt.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),c=t.findCell(l);if(s[l]||c.top!==o){r.push(null);continue}s[l]=!0,r.push(a)}n.push(r)}return n}function aP(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 Zbe(e,t,n,o){let r=F$(lP(e.node));return r=aP(r,t,n,o),r=F$(r),iP(e.node,r)}function Xbe(e,t,n,o){let r=lP(e.node);return r=aP(r,t,n,o),iP(e.node,r)}function D$(e,t){let n=e,o=e;for(let u=e;u>=0;u--){const d=Jc(u,t.selection);d&&d.forEach(f=>{const h=f.node.attrs.colspan+u-1;h>=n&&(n=u),h>o&&(o=h)})}for(let u=e;u<=o;u++){const d=Jc(u,t.selection);d&&d.forEach(f=>{const h=f.node.attrs.colspan+u-1;f.node.attrs.colspan>1&&h>o&&(o=h)})}const r=[];for(let u=n;u<=o;u++){const d=Jc(u,t.selection);d&&d.length&&r.push(u)}n=r[0],o=r[r.length-1];const s=Jc(n,t.selection),i=Zc(0,t.selection),l=t.doc.resolve(s[s.length-1].pos);let a;for(let u=o;u>=n;u--){const d=Jc(u,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 c=t.doc.resolve(a.pos);return{$anchor:l,$head:c,indexes:r}}function B$(e,t){let n=e,o=e;for(let u=e;u>=0;u--)Zc(u,t.selection).forEach(d=>{const f=d.node.attrs.rowspan+u-1;f>=n&&(n=u),f>o&&(o=f)});for(let u=e;u<=o;u++)Zc(u,t.selection).forEach(d=>{const f=d.node.attrs.rowspan+u-1;d.node.attrs.rowspan>1&&f>o&&(o=f)});const r=[];for(let u=n;u<=o;u++){const d=Zc(u,t.selection);d&&d.length&&r.push(u)}n=r[0],o=r[r.length-1];const s=Zc(n,t.selection),i=Jc(0,t.selection),l=t.doc.resolve(s[s.length-1].pos);let a;for(let u=o;u>=n;u--){const d=Zc(u,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 c=t.doc.resolve(a.pos);return{$anchor:l,$head:c,indexes:r}}function Qbe(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=Pp(i);if(!l)return t;const{indexes:a}=D$(n,t),{indexes:c}=D$(o,t);if(a.includes(o))return t;const u=Zbe(l,a,c,0),d=n_(t).replaceWith(l.pos,l.pos+l.node.nodeSize,u);if(!r)return d;const f=jt.get(u),h=l.start,p=o,m=f.positionAt(f.height-1,p,u),v=d.doc.resolve(h+m),y=ln.colSelection,E=f.positionAt(0,p,u),w=d.doc.resolve(h+E);return d.setSelection(y(v,w))}function ewe(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=Pp(i);if(!l)return t;const{indexes:a}=B$(n,t),{indexes:c}=B$(o,t);if(a.includes(o))return t;const u=Xbe(l,a,c,0),d=n_(t).replaceWith(l.pos,l.pos+l.node.nodeSize,u);if(!r)return d;const f=jt.get(u),h=l.start,p=o,m=f.positionAt(p,f.width-1,u),v=d.doc.resolve(h+m),y=ln.rowSelection,E=f.positionAt(p,0,u),w=d.doc.resolve(h+E);return d.setSelection(y(v,w))}const aC=St("GoToPrevTableCell",()=>()=>zN(-1));ct(aC,{displayName:"Command<goToPrevTableCellCommand>",group:"Table"});const cC=St("GoToNextTableCell",()=>()=>zN(1));ct(cC,{displayName:"Command<goToNextTableCellCommand>",group:"Table"});const uC=St("ExitTable",e=>()=>(t,n)=>{if(!Br(t))return!1;const{$head:o}=t.selection,r=h0e(o,Sd.type(e));if(!r)return!1;const{to:s}=r,i=t.tr.replaceWith(s,s,Ni.type(e).createAndFill());return i.setSelection(ft.near(i.doc.resolve(s),1)).scrollIntoView(),n==null||n(i),!0});ct(uC,{displayName:"Command<breakTableCommand>",group:"Table"});const cP=St("InsertTable",e=>({row:t,col:n}={})=>(o,r)=>{const{selection:s,tr:i}=o,{from:l}=s,a=oP(e,t,n),c=i.replaceSelectionWith(a),u=ft.findFrom(c.doc.resolve(l),1,!0);return u&&c.setSelection(u),r==null||r(c),!0});ct(cP,{displayName:"Command<insertTableCommand>",group:"Table"});const uP=St("MoveRow",()=>({from:e,to:t,pos:n}={})=>(o,r)=>{const{tr:s}=o;return!!(r!=null&&r(ewe({tr:s,origin:e??0,target:t??0,pos:n,select:!0})))});ct(uP,{displayName:"Command<moveRowCommand>",group:"Table"});const dP=St("MoveCol",()=>({from:e,to:t,pos:n}={})=>(o,r)=>{const{tr:s}=o;return!!(r!=null&&r(Qbe({tr:s,origin:e??0,target:t??0,pos:n,select:!0})))});ct(dP,{displayName:"Command<moveColCommand>",group:"Table"});const fP=St("SelectRow",()=>(e={index:0})=>(t,n)=>{const{tr:o}=t;return!!(n!=null&&n(Ybe(e.index,e.pos)(o)))});ct(fP,{displayName:"Command<selectRowCommand>",group:"Table"});const hP=St("SelectCol",()=>(e={index:0})=>(t,n)=>{const{tr:o}=t;return!!(n!=null&&n(Jbe(e.index,e.pos)(o)))});ct(hP,{displayName:"Command<selectColCommand>",group:"Table"});const pP=St("SelectTable",()=>()=>(e,t)=>{const{tr:n}=e;return!!(t!=null&&t(Gbe(n)))});ct(pP,{displayName:"Command<selectTableCommand>",group:"Table"});const mP=St("DeleteSelectedCells",()=>()=>(e,t)=>{const{selection:n}=e;if(!(n instanceof ln))return!1;const o=n.isRowSelection(),r=n.isColSelection();return o&&r?Bye(e,t):r?Nye(e,t):Lye(e,t)});ct(mP,{displayName:"Command<deleteSelectedCellsCommand>",group:"Table"});const gP=St("AddColBefore",()=>()=>Aye);ct(gP,{displayName:"Command<addColBeforeCommand>",group:"Table"});const _P=St("AddColAfter",()=>()=>Oye);ct(_P,{displayName:"Command<addColAfterCommand>",group:"Table"});const vP=St("AddRowBefore",e=>()=>(t,n)=>{if(!Br(t))return!1;if(n){const o=Jl(t);n(rP(e,t.tr,o,o.top))}return!0});ct(vP,{displayName:"Command<addRowBeforeCommand>",group:"Table"});const yP=St("AddRowAfter",e=>()=>(t,n)=>{if(!Br(t))return!1;if(n){const o=Jl(t);n(rP(e,t.tr,o,o.bottom))}return!0});ct(yP,{displayName:"Command<addRowAfterCommand>",group:"Table"});const bP=St("SetAlign",()=>(e="left")=>Rye("alignment",e));ct(bP,{displayName:"Command<setAlignCommand>",group:"Table"});const wP=Wo(e=>new hr(/^\|(?<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),Sd.type(e)))return null;const a=oP(e,Number((s=n.groups)==null?void 0:s.row),Number((i=n.groups)==null?void 0:i.col)),c=t.tr.replaceRangeWith(o,r,a);return c.setSelection(lt.create(c.doc,o+3)).scrollIntoView()}));ct(wP,{displayName:"InputRule<insertTableInputRule>",group:"Table"});const dC=qo("tableKeymap",{NextCell:{shortcuts:["Mod-]","Tab"],command:e=>{const t=e.get(Ot);return()=>t.call(cC.key)}},PrevCell:{shortcuts:["Mod-[","Shift-Tab"],command:e=>{const t=e.get(Ot);return()=>t.call(aC.key)}},ExitTable:{shortcuts:["Mod-Enter"],command:e=>{const t=e.get(Ot);return()=>t.call(uC.key)}}});ct(dC.ctx,{displayName:"KeymapCtx<table>",group:"Table"});ct(dC.shortcuts,{displayName:"Keymap<table>",group:"Table"});const qv="footnote_definition",V$="footnoteDefinition",fC=Un("footnote_definition",()=>({group:"block",content:"block+",defining:!0,attrs:{label:{default:""}},parseDOM:[{tag:`dl[data-type="${qv}"]`,getAttrs:e=>{if(!(e instanceof HTMLElement))throw Gs(e);return{label:e.dataset.label}},contentElement:"dd"}],toDOM:e=>{const t=e.attrs.label;return["dl",{"data-label":t,"data-type":qv},["dt",t],["dd",0]]},parseMarkdown:{match:({type:e})=>e===V$,runner:(e,t,n)=>{e.openNode(n,{label:t.label}).next(t.children).closeNode()}},toMarkdown:{match:e=>e.type.name===qv,runner:(e,t)=>{e.openNode(V$,void 0,{label:t.attrs.label,identifier:t.attrs.label}).next(t.content).closeNode()}}}));ct(fC.ctx,{displayName:"NodeSchemaCtx<footnodeDef>",group:"footnote"});ct(fC.node,{displayName:"NodeSchema<footnodeDef>",group:"footnote"});const Kv="footnote_reference",hC=Un("footnote_reference",()=>({group:"inline",inline:!0,atom:!0,attrs:{label:{default:""}},parseDOM:[{tag:`sup[data-type="${Kv}"]`,getAttrs:e=>{if(!(e instanceof HTMLElement))throw Gs(e);return{label:e.dataset.label}}}],toDOM:e=>{const t=e.attrs.label;return["sup",{"data-label":t,"data-type":Kv},t]},parseMarkdown:{match:({type:e})=>e==="footnoteReference",runner:(e,t,n)=>{e.addNode(n,{label:t.label})}},toMarkdown:{match:e=>e.type.name===Kv,runner:(e,t)=>{e.addNode("footnoteReference",void 0,void 0,{label:t.attrs.label,identifier:t.attrs.label})}}}));ct(hC.ctx,{displayName:"NodeSchemaCtx<footnodeRef>",group:"footnote"});ct(hC.node,{displayName:"NodeSchema<footnodeRef>",group:"footnote"});const kP=js.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 Gs(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",c=r.spread!=null?`${r.spread}`:"true";o.openNode(s,{label:i,listType:a,spread:c,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()}}}});ct(kP,{displayName:"NodeSchema<listItem>",group:"ListItem"});const CP=Wo(()=>new hr(/^\[(?<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",c=s.before(i),u=e.tr;return u.deleteRange(n,o).setNodeMarkup(c,void 0,{...l.attrs,checked:a}),u}));ct(CP,{displayName:"InputRule<wrapInTaskListInputRule>",group:"ListItem"});const twe=[lC,dC].flat(),nwe=[wP,CP],owe=[nP],SP=eo(()=>m2e);ct(SP,{displayName:"Prose<autoInsertSpanPlugin>",group:"Prose"});const rwe=eo(()=>Yye({}));ct(rwe,{displayName:"Prose<columnResizingPlugin>",group:"Prose"});const $P=eo(()=>i2e({allowTableNodeSelection:!0}));ct($P,{displayName:"Prose<tableEditingPlugin>",group:"Prose"});const pC=vd("remarkGFM",()=>qbe);ct(pC.plugin,{displayName:"Remark<remarkGFMPlugin>",group:"Remark"});ct(pC.options,{displayName:"RemarkConfig<remarkGFMPlugin>",group:"Remark"});const swe=new mn("MILKDOWN_KEEP_TABLE_ALIGN_PLUGIN");function iwe(e,t){let n=0;return t.forEach((o,r,s)=>{o===e&&(n=s)}),n}const EP=eo(()=>new wn({key:swe,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),c=l.node(l.depth-1).firstChild;if(!c)return;const u=iwe(s,a),d=c.maybeChild(u);if(!d)return;const f=d.attrs.alignment,h=s.attrs.alignment;f!==h&&o.setNodeMarkup(i,void 0,{...s.attrs,alignment:f})};return t.doc!==n.doc&&n.doc.descendants(r),o}}));ct(EP,{displayName:"Prose<keepTableAlignPlugin>",group:"Prose"});const lwe=[EP,SP,pC,$P].flat(),awe=[kP,Sd,m_,Ip,g_,Np,fC,hC,iC,Cd].flat(),cwe=[cC,aC,uC,cP,uP,dP,fP,hP,pP,mP,vP,yP,gP,_P,bP,p_],uwe=[awe,nwe,owe,twe,cwe,lwe].flat();var Gg=200,zn=function(){};zn.prototype.append=function(t){return t.length?(t=zn.from(t),!this.length&&t||t.length<Gg&&this.leafAppend(t)||this.length<Gg&&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 dwe(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 xP(t):zn.empty};var xP=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<=Gg)return new t(this.values.concat(r.flatten()))},t.prototype.leafPrepend=function(r){if(this.length+r.length<=Gg)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 xP([]);var dwe=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 fwe=500;class Gr{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,c=[],u=[];return this.items.forEach((d,f)=>{if(!d.step){r||(r=this.remapping(o,f+1),s=r.maps.length),s--,u.push(d);return}if(r){u.push(new Ss(d.map));let h=d.step.map(r.slice(s)),p;h&&i.maybeStep(h).doc&&(p=i.mapping.maps[i.mapping.maps.length-1],c.push(new Ss(p,void 0,void 0,c.length+u.length))),s--,p&&r.appendMap(p,s)}else i.maybeStep(d.step);if(d.selection)return l=r?d.selection.map(r.slice(s)):d.selection,a=new Gr(this.items.slice(0,o).append(u.reverse().concat(c)),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 u=0;u<t.steps.length;u++){let d=t.steps[u].invert(t.docs[u]),f=new Ss(t.mapping.maps[u],d,n),h;(h=a&&a.merge(f))&&(f=h,u?s.pop():l=l.slice(0,l.length-1)),s.push(f),n&&(i++,n=void 0),r||(a=f)}let c=i-o.depth;return c>pwe&&(l=hwe(l,c),i-=c),new Gr(l.append(s),i)}remapping(t,n){let o=new _u;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 Gr(this.items.append(t.map(n=>new Ss(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 h=s.getMirror(--a);if(h==null)return;i=Math.min(i,h);let p=s.maps[h];if(f.step){let m=t.steps[h].invert(t.docs[h]),v=f.selection&&f.selection.map(s.slice(a+1,h));v&&l++,o.push(new Ss(p,m,v))}else o.push(new Ss(p))},r);let c=[];for(let f=n;f<i;f++)c.push(new Ss(s.maps[f]));let u=this.items.slice(0,r).append(c).append(o),d=new Gr(u,l);return d.emptyItemCount()>fwe&&(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)),c=a&&a.getMap();if(o--,c&&n.appendMap(c,o),a){let u=i.selection&&i.selection.map(n.slice(o));u&&s++;let d=new Ss(c.invert(),a,u),f,h=r.length-1;(f=r.length&&r[h].merge(d))?r[h]=f:r.push(d)}}else i.map&&o--},this.items.length,0),new Gr(zn.from(r.reverse()),s)}}Gr.empty=new Gr(zn.empty,0);function hwe(e,t){let n;return e.forEach((o,r)=>{if(o.selection&&t--==0)return n=r,!1}),e.slice(n)}class Ss{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 Ss(n.getMap().invert(),n,this.selection)}}}class fl{constructor(t,n,o,r,s){this.done=t,this.undone=n,this.prevRanges=o,this.prevTime=r,this.prevComposition=s}}const pwe=20;function mwe(e,t,n,o){let r=n.getMeta(Wa),s;if(r)return r.historyState;n.getMeta(vwe)&&(e=new fl(e.done,e.undone,null,0,-1));let i=n.getMeta("appendedTransaction");if(n.steps.length==0)return e;if(i&&i.getMeta(Wa))return i.getMeta(Wa).redo?new fl(e.done.addTransform(n,void 0,o,N1(t)),e.undone,z$(n.mapping.maps),e.prevTime,e.prevComposition):new fl(e.done,e.undone.addTransform(n,void 0,o,N1(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||!gwe(n,e.prevRanges)),c=i?Gv(e.prevRanges,n.mapping):z$(n.mapping.maps);return new fl(e.done.addTransform(n,a?t.selection.getBookmark():void 0,o,N1(t)),Gr.empty,c,n.time,l??e.prevComposition)}else return(s=n.getMeta("rebased"))?new fl(e.done.rebased(n,s),e.undone.rebased(n,s),Gv(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new fl(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),Gv(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function gwe(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 z$(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 Gv(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 _we(e,t,n){let o=N1(t),r=Wa.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 fl(n?l:s.remaining,n?s.remaining:l,null,0,-1);return s.transform.setSelection(i).setMeta(Wa,{redo:n,historyState:a})}let Yv=!1,j$=null;function N1(e){let t=e.plugins;if(j$!=t){Yv=!1,j$=t;for(let n=0;n<t.length;n++)if(t[n].spec.historyPreserveItems){Yv=!0;break}}return Yv}const Wa=new mn("history"),vwe=new mn("closeHistory");function ywe(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new wn({key:Wa,state:{init(){return new fl(Gr.empty,Gr.empty,null,0,-1)},apply(t,n,o){return mwe(n,o,t,e)}},config:e,props:{handleDOMEvents:{beforeinput(t,n){let o=n.inputType,r=o=="historyUndo"?MP:o=="historyRedo"?AP:null;return r?(n.preventDefault(),r(t.state,t.dispatch)):!1}}}})}function TP(e,t){return(n,o)=>{let r=Wa.getState(n);if(!r||(e?r.undone:r.done).eventCount==0)return!1;if(o){let s=_we(r,n,e);s&&o(t?s.scrollIntoView():s)}return!0}}const MP=TP(!1,!0),AP=TP(!0,!0);function $d(e,t){return Object.assign(e,{meta:{package:"@milkdown/plugin-history",...t}}),e}const mC=St("Undo",()=>()=>MP);$d(mC,{displayName:"Command<undo>"});const gC=St("Redo",()=>()=>AP);$d(gC,{displayName:"Command<redo>"});const _C=Sn({},"historyProviderConfig");$d(_C,{displayName:"Ctx<historyProviderConfig>"});const OP=eo(e=>ywe(e.get(_C.key)));$d(OP,{displayName:"Ctx<historyProviderPlugin>"});const vC=qo("historyKeymap",{Undo:{shortcuts:"Mod-z",command:e=>{const t=e.get(Ot);return()=>t.call(mC.key)}},Redo:{shortcuts:["Mod-y","Shift-Mod-z"],command:e=>{const t=e.get(Ot);return()=>t.call(gC.key)}}});$d(vC.ctx,{displayName:"KeymapCtx<history>"});$d(vC.shortcuts,{displayName:"Keymap<history>"});const bwe=[_C,OP,vC,mC,gC].flat();function fb(e){if(!e)return!1;if(Array.isArray(e))return e.length>1?!1:fb(e[0]);const t=e.content;return t?fb(t):e.type==="text"}function wwe(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 IP=eo(e=>{const t=e.get(Qr);e.update(nh,o=>({...o,editable:o.editable??(()=>!0)}));const n=new mn("MILKDOWN_CLIPBOARD");return new wn({key:n,props:{handlePaste:(o,r)=>{var s,i;const l=e.get(ku),a=(i=(s=o.props).editable)==null?void 0:i.call(s,o.state),{clipboardData:c}=r;if(!a||!c||o.state.selection.$from.node().type.spec.code)return!1;const u=c.getData("text/plain"),d=c.getData("vscode-editor-data");if(d){const y=JSON.parse(d),E=y==null?void 0:y.mode;if(u&&E){const{tr:w}=o.state,C=p0e("code_block",t);return w.replaceSelectionWith(C.create({language:E})).setSelection(lt.near(w.doc.resolve(Math.max(0,w.selection.from-2)))).insertText(u.replace(/\r\n?/g,` |
| 124 |
`)),o.dispatch(w),!0}}const f=c.getData("text/html");if(f.length===0&&u.length===0)return!1;const h=rc.fromSchema(t);let p;if(f.length===0){const y=l(u);if(!y||typeof y=="string")return!1;p=Wl.fromSchema(t).serializeFragment(y.content)}else{const y=document.createElement("template");y.innerHTML=f,p=y.content.cloneNode(!0),y.remove()}const m=h.parseSlice(p),v=wwe(m);return v?(o.dispatch(o.state.tr.replaceSelectionWith(v,!0)),!0):(o.dispatch(o.state.tr.replaceSelection(m)),!0)},clipboardTextSerializer:o=>{const r=e.get(Cu);if(fb(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):""}}})});IP.meta={displayName:"Prose<clipboard>",package:"@milkdown/plugin-clipboard"};const yC=Sn({shouldAppend:e=>!(!e||["heading","paragraph"].includes(e.type.name)),getNode:e=>e.schema.nodes.paragraph.create()},"trailingConfig");yC.meta={package:"@milkdown/plugin-trailing",displayName:"Ctx<trailingConfig>"};const NP=eo(e=>{const t=new mn("MILKDOWN_TRAILING"),{shouldAppend:n,getNode:o}=e.get(yC.key),r=new wn({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 c=s.doc.lastChild;return n(c,a)}},appendTransaction:(s,i,l)=>{const{doc:a,tr:c}=l,u=o==null?void 0:o(l),d=r.getState(l),f=a.content.size;if(!(!d||!u))return c.insert(f,u)}});return r});NP.meta={package:"@milkdown/plugin-trailing",displayName:"Prose<trailing>"};const kwe=[yC,NP],Cwe="modulepreload",Swe=function(e){return"/"+e},H$={},$m=function(t,n,o){if(!n||n.length===0)return t();const r=document.getElementsByTagName("link");return Promise.all(n.map(s=>{if(s=Swe(s),s in H$)return;H$[s]=!0;const i=s.endsWith(".css"),l=i?'[rel="stylesheet"]':"";if(!!o)for(let u=r.length-1;u>=0;u--){const d=r[u];if(d.href===s&&(!i||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${s}"]${l}`))return;const c=document.createElement("link");if(c.rel=i?"stylesheet":Cwe,i||(c.as="script",c.crossOrigin=""),c.href=s,document.head.appendChild(c),i)return new Promise((u,d)=>{c.addEventListener("load",u),c.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})};var PP=(e=>(e.CodeMirror="code-mirror",e.LinkTooltip="link-tooltip",e.Cursor="cursor",e.BlockEdit="block-edit",e.Toolbar="toolbar",e.Placeholder="placeholder",e))(PP||{});const $we={cursor:!0,"link-tooltip":!0,"block-edit":!0,placeholder:!0,toolbar:!0,"code-mirror":!0};async function Ewe(e,t,n){switch(e){case"link-tooltip":{const{defineFeature:o}=await $m(()=>Promise.resolve().then(()=>TGe),void 0);return o(t,n)}case"block-edit":{const{defineFeature:o}=await $m(()=>Promise.resolve().then(()=>fYe),void 0);return o(t,n)}case"placeholder":{const{defineFeature:o}=await $m(()=>Promise.resolve().then(()=>gYe),void 0);return o(t,n)}case"toolbar":{const{defineFeature:o}=await $m(()=>Promise.resolve().then(()=>yYe),void 0);return o(t,n)}}}const xwe=Lt([],"FeaturesCtx");function Twe(e){return t=>{t.inject(xwe,e)}}var Mwe="Expected a function",U$=0/0,Awe="[object Symbol]",Owe=/^\s+|\s+$/g,Iwe=/^[-+]0x[0-9a-f]+$/i,Nwe=/^0b[01]+$/i,Pwe=/^0o[0-7]+$/i,Lwe=parseInt,Rwe=typeof $r=="object"&&$r&&$r.Object===Object&&$r,Fwe=typeof self=="object"&&self&&self.Object===Object&&self,Dwe=Rwe||Fwe||Function("return this")(),Bwe=Object.prototype,Vwe=Bwe.toString,zwe=Math.max,jwe=Math.min,Jv=function(){return Dwe.Date.now()};function Hwe(e,t,n){var o,r,s,i,l,a,c=0,u=!1,d=!1,f=!0;if(typeof e!="function")throw new TypeError(Mwe);t=W$(t)||0,hb(n)&&(u=!!n.leading,d="maxWait"in n,s=d?zwe(W$(n.maxWait)||0,t):s,f="trailing"in n?!!n.trailing:f);function h($){var A=o,N=r;return o=r=void 0,c=$,i=e.apply(N,A),i}function p($){return c=$,l=setTimeout(y,t),u?h($):i}function m($){var A=$-a,N=$-c,P=t-A;return d?jwe(P,s-N):P}function v($){var A=$-a,N=$-c;return a===void 0||A>=t||A<0||d&&N>=s}function y(){var $=Jv();if(v($))return E($);l=setTimeout(y,m($))}function E($){return l=void 0,f&&o?h($):(o=r=void 0,i)}function w(){l!==void 0&&clearTimeout(l),c=0,o=a=r=l=void 0}function C(){return l===void 0?i:E(Jv())}function T(){var $=Jv(),A=v($);if(o=arguments,r=this,a=$,A){if(l===void 0)return p(a);if(d)return l=setTimeout(y,t),h(a)}return l===void 0&&(l=setTimeout(y,t)),i}return T.cancel=w,T.flush=C,T}function hb(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Uwe(e){return!!e&&typeof e=="object"}function Wwe(e){return typeof e=="symbol"||Uwe(e)&&Vwe.call(e)==Awe}function W$(e){if(typeof e=="number")return e;if(Wwe(e))return U$;if(hb(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=hb(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(Owe,"");var n=Nwe.test(e);return n||Pwe.test(e)?Lwe(e.slice(2),n?2:8):Iwe.test(e)?U$:+e}var qwe=Hwe;const __=jl(qwe);let LP=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 pb=Lt(new LP,"listener"),Kwe=new mn("MILKDOWN_LISTENER"),RP=e=>(e.inject(pb,new LP),async()=>{await e.wait(Ha);const t=e.get(pb),{listeners:n}=t;n.beforeMount.forEach(l=>l(e)),await e.wait(th);const o=e.get(Cu);let r=null,s=null;const i=new wn({key:Kwe,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:__(()=>{const{doc:a}=l;if(n.updated.length>0&&r&&!r.eq(a)&&n.updated.forEach(c=>{c(e,a,r)}),n.markdownUpdated.length>0&&r&&!r.eq(a)){const c=o(a);n.markdownUpdated.forEach(u=>{u(e,c,s)}),s=c}r=a},200)()}});e.update(as,l=>l.concat(i)),await e.wait($1),n.mounted.forEach(l=>l(e))});RP.meta={package:"@milkdown/plugin-listener",displayName:"Listener"};function Gwe(e){return new Promise(t=>{const n=new FileReader;n.addEventListener("load",()=>{t({alt:e.name,src:n.result})},!1),n.readAsDataURL(e)})}const Ywe=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 UA("image");return(await Promise.all(n.map(r=>Gwe(r)))).map(({alt:r,src:s})=>o.createAndFill({src:s,alt:r}))},Su=Sn({uploader:Ywe,enableHtmlFileUploader:!1,uploadWidgetFactory:(e,t)=>{const n=document.createElement("span");return n.textContent="Upload in progress...",Ln.widget(e,n,t)}},"uploadConfig");Su.meta={package:"@milkdown/plugin-upload",displayName:"Ctx<uploadConfig>"};const FP=eo(e=>{const t=new mn("MILKDOWN_UPLOAD"),n=(r,s)=>{var i;const l=t.getState(r);if(!l)return-1;const a=l.find(void 0,void 0,c=>c.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"),c=e.get(Qr),{tr:u}=r.state,d=s instanceof DragEvent?((l=r.posAtCoords({left:s.clientX,top:s.clientY}))==null?void 0:l.pos)??u.selection.from:u.selection.from;r.dispatch(u.setMeta(t,{add:{id:a,pos:d}}));const{uploader:f}=e.get(Su.key);return f(i,c).then(h=>{const p=n(r.state,a);p<0||r.dispatch(r.state.tr.replaceWith(p,p,h).setMeta(t,{remove:{id:a}}))}).catch(h=>{console.error(h)}),!0};return new wn({key:t,state:{init(){return en.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(Su.key),c=a(l.add.pos,{id:l.add.id});return i.add(r.doc,[c])}if(l.remove){const a=i.find(void 0,void 0,c=>c.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(Su.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}}})});FP.meta={package:"@milkdown/plugin-upload",displayName:"Prose<upload>"};const Jwe=[Su,FP];var DP=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},gs=(e,t,n)=>(DP(e,t,"read from private field"),n?n.call(e):t.get(e)),Em=(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)},xm=(e,t,n,o)=>(DP(e,t,"write to private field"),o?o.call(e,n):t.set(e,n),n),si,gf,P1,L1;class BP{constructor({root:t,features:n={},featureConfigs:o={},defaultValue:r="",onUpdate:s=l=>{},handleCommonActions:i=(l,a)=>{}}){Em(this,si,void 0),Em(this,gf,void 0),Em(this,P1,void 0),Em(this,L1,!0);const l=Object.entries({...$we,...n}).filter(([,c])=>c).map(([c])=>c);xm(this,P1,(typeof t=="string"?document.querySelector(t):t)??document.body),xm(this,si,Ave.make().config(Twe(l)).config(c=>{c.set(E1,gs(this,P1)),c.set(k1,r),c.set(nh,{editable:()=>gs(this,L1)})}).config(c=>{const u=async(d,f)=>await i("handleFileUpload",{ctx:c,files:d,schema:f});c.update(Su.key,d=>({...d,uploader:u}))}).config(c=>{const u=c.get(pb);u.markdownUpdated((d,f,h)=>{f!==h&&s(f)}),u.updated((d,f,h)=>{i("editor_updated",d)})}).use(fye).use(bwe).use(kwe).use(IP).use(RP).use(Jwe).use(uwe));const a=[];l.forEach(c=>{const u=o[c];a.push(Ewe(c,gs(this,si),u))}),xm(this,gf,Promise.all(a))}async create(){return await gs(this,gf),gs(this,si).create()}async destroy(){return await gs(this,gf),gs(this,si).destroy()}get editor(){return gs(this,si)}setReadonly(t){return xm(this,L1,!t),this}getMarkdown(){return gs(this,si).action(Rve())}getEditor(){return gs(this,si)}destroyEditor(){this.destroy()}}si=new WeakMap;gf=new WeakMap;P1=new WeakMap;L1=new WeakMap;BP.Feature=PP;const Zwe=Symbol("editorInfoCtxKey"),Xwe=K({name:"MilkdownProvider",setup:(e,{slots:t})=>{const n=H(null),o=H(void 0),r=H(void 0),s=H(!0);return bt(Zwe,{loading:s,dom:n,editor:r,editorFactory:o}),()=>{var i;return b(Q,null,[(i=t.default)==null?void 0:i.call(t)])}}});var Qwe=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},VP=(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)},mb=(e,t,n)=>(Qwe(e,t,"access private method"),n),R1,gb;let e3e=class{constructor({node:t,view:n,getPos:o,decorations:r,innerDecorations:s,options:i}){VP(this,R1),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,c)=>{var u,d;const f=this.options.update;let h;return f&&(h=f(l,a,c)),typeof h!="boolean"&&(h=this.shouldUpdate(l)),this.node=l,this.decorations=a,this.innerDecorations=c,h&&((d=(u=this.options).onUpdate)==null||d.call(u)),h},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 c=this.options.ignoreMutation;return c&&(a=c(l)),typeof a!="boolean"&&(a=this.shouldIgnoreMutation(l)),a},this.destroy=()=>{var l,a,c;(a=(l=this.options).destroy)==null||a.call(l),this.dom.remove(),(c=this.contentDOM)==null||c.remove()},this.setAttrs=l=>{const{dispatch:a,state:c}=this.view,u=this.getPos();if(typeof u=="number")return a(c.tr.setNodeMarkup(u,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 mb(this,R1,gb).call(this,t)}createContentDOM(t){return mb(this,R1,gb).call(this,t)}get component(){return this.options.component}};R1=new WeakSet,gb=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 t3e=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 _b,zP;let n3e=class{constructor({pos:t,spec:n,options:o}){VP(this,_b),this.pos=t,this.options=o,this.spec=n,this.dom=mb(this,_b,zP).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}};_b=new WeakSet,zP=function(e){return e instanceof HTMLElement?e:document.createElement(e)};let bC=(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 o3e=Object.defineProperty,r3e=(e,t,n)=>t in e?o3e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Er=(e,t,n)=>(r3e(e,typeof t!="symbol"?t+"":t,n),n);const s3e=Symbol("[ProsemirrorAdapter]nodeViewContext"),i3e=Symbol("[ProsemirrorAdapter]useNodeViewFactory");let l3e=class extends e3e{constructor(){super(...arguments),Er(this,"key",bC()),Er(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:Cn(this.node),selected:Cn(this.selected),decorations:Cn(this.decorations),innerDecorations:Cn(this.innerDecorations)}),Er(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)})}),Er(this,"render",()=>{const t=this.component;return ns(K({name:"ProsemirrorNodeView",setup:()=>(bt(s3e,this.context),()=>b(sr,{key:this.key,to:this.dom},{default:()=>[b(t,null,null)]}))}))})}};const a3e=(e,t)=>n=>(o,r,s,i,l)=>{const a=new l3e({node:o,view:r,getPos:s,decorations:i,innerDecorations:l,options:{...n,onUpdate(){var c;(c=n.onUpdate)==null||c.call(n),a.updateContext()},selectNode(){var c;(c=n.selectNode)==null||c.call(n),a.updateContext()},deselectNode(){var c;(c=n.deselectNode)==null||c.call(n),a.updateContext()},destroy(){var c;(c=n.destroy)==null||c.call(n),t(a)}}});return e(a),a},c3e=Symbol("[ProsemirrorAdapter]nodeViewContext"),u3e=Symbol("[ProsemirrorAdapter]usePluginViewFactory");let d3e=class extends t3e{constructor(){super(...arguments),Er(this,"key",bC()),Er(this,"context",{view:Cn(this.view),prevState:Cn(this.prevState)}),Er(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})}),Er(this,"render",()=>{const t=this.component;return ns(K({name:"ProsemirrorNodeView",setup:()=>(bt(c3e,this.context),()=>b(sr,{key:this.key,to:this.root},{default:()=>[b(t,null,null)]}))}))})}};const f3e=(e,t)=>n=>o=>{const r=new d3e({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},h3e=()=>{const e=H({}),t=nt(),n=ns({});return ld(()=>{n.updater=()=>{t==null||t.update()}}),Us(()=>{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]}}},p3e=Symbol("[ProsemirrorAdapter]widgetViewContext"),m3e=Symbol("[ProsemirrorAdapter]useWidgetViewFactory");class g3e extends n3e{constructor(){super(...arguments),Er(this,"key",bC()),Er(this,"context",{view:this.view,getPos:this.getPos,spec:this.spec}),Er(this,"updateContext",()=>{Object.assign(this.context,{view:this.view,getPos:this.getPos,spec:this.spec})}),Er(this,"render",()=>{const t=this.component;return ns(K({name:"ProsemirrorWidgetView",setup:()=>(bt(p3e,this.context),()=>b(sr,{key:this.key,to:this.dom},{default:()=>[b(t,null,null)]}))}))})}}const _3e=(e,t)=>n=>(o,r={})=>{const s=new g3e({pos:o,options:n}),i={...r,destroy:l=>{var a;(a=r.destroy)==null||a.call(r,l),t(s)}};return s.spec=i,Ln.widget(o,(l,a)=>(s.bind(l,a),s.updateContext(),e(s),s.dom),i)},v3e=K({name:"ProsemirrorAdapterProvider",setup:(e,{slots:t})=>{const{portals:n,renderVueRenderer:o,removeVueRenderer:r}=h3e(),s=a3e(o,r),i=f3e(o,r),l=_3e(o,r);return bt(i3e,s),bt(u3e,i),bt(m3e,l),()=>{var a;return b(Q,null,[(a=t.default)==null?void 0:a.call(t),Object.values(n.value).map(c=>Xe(c))])}}}),y3e={name:"CrepeEditor",emits:["update:modelValue","handleMediaUpload","editorCreated"],props:{modelValue:{type:String,default:""},placeholder:{type:String,default:"Type your message here!"},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:Xwe,ProsemirrorAdapterProvider:v3e},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(hn),{state:o}=n,{from:r}=o.selection,s=e,i=o.tr.insertText(s,r),l=r+s.length,a=i.setSelection(lt.create(i.doc,l));n.dispatch(a),n.focus()})},initEditor(){const e=this,t=new BP({root:this.$refs.crepe_editor_vue,defaultValue:this.modelValue,featureConfigs:{placeholder:{text:this.placeholder,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(hn),{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(),c=this.defaultMentions.filter(u=>u.username.toLowerCase().includes(a)||u.display_name.toLowerCase().includes(a));c.length&&(this.currentMentionSearch=l,this.mentionResults=c,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(Fve(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()}},b3e={style:{position:"relative"},class:"fcom_md_editor"},w3e={ref:"crepe_editor_vue",class:"crepe-editor feed_md_content fcom_md_seditor_wrapper"},k3e={class:"fcom_mention_pop_wrap"},C3e=_("span",{style:{}},null,-1),S3e={key:0},$3e={key:0},E3e=["onClick"],x3e=["src"],T3e={key:1},M3e={key:0};function A3e(e,t,n,o,r,s){const i=z("ProsemirrorAdapterProvider"),l=z("MilkdownProvider"),a=$o;return g(),k(Q,null,[b(l,null,{default:x(()=>[b(i,null,{default:x(()=>[_("div",b3e,[_("div",w3e,null,512)])]),_:1})]),_:1}),_("div",k3e,[b(a,{"popper-class":"fcom_mention_pop",ref:"mentionPopoverRef",placement:"bottom",visible:r.showMentionPop,width:300,persistent:!1},{reference:x(()=>[C3e]),default:x(()=>[r.justReplaced?O("",!0):(g(),k("div",S3e,[r.mentionResults.length?(g(),k("ul",$3e,[(g(!0),k(Q,null,Me(r.mentionResults,c=>(g(),k("li",{key:c.user_id,onClick:u=>s.addMention("@"+c.username)},[c.avatar?(g(),k("img",{key:0,alt:"",src:c.avatar},null,8,x3e)):O("",!0),_("span",null,M(c.display_name)+" (@"+M(c.username)+")",1)],8,E3e))),128))])):r.searchingMention?O("",!0):(g(),k("div",T3e,[_("p",null,[ne(M(e.$t("No results found. Please search by username"))+" ",1),e.isAdmin()&&n.hasEveyoneMention?(g(),k("span",M3e,M(e.$t("You can use @everyone to tag everyone.")),1)):O("",!0)])]))]))]),_:1},8,["visible"])])],64)}const wC=fe(y3e,[["render",A3e]]);var kC="emoji-mart";const O3e=JSON;var jP=typeof window<"u"&&"localStorage"in window;let vb,yb;function I3e(e){e||(e={}),vb=e.getter,yb=e.setter}function N3e(e){kC=e}function P3e(e){for(let t in e){let n=e[t];HP(t,n)}}function HP(e,t){if(yb)yb(e,t);else{if(!jP)return;try{window.localStorage[`${kC}.${e}`]=O3e.stringify(t)}catch{}}}function L3e(e){if(vb)return vb(e);if(!jP)return;try{var t=window.localStorage[`${kC}.${e}`]}catch{return}if(t)return JSON.parse(t)}const od={update:P3e,set:HP,get:L3e,setNamespace:N3e,setHandlers:I3e},Zv={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"},UP=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 WP(e){var t=Object.getOwnPropertyNames(e);for(let n of t){let o=e[n];e[n]=o&&typeof o=="object"?WP(o):o}return Object.freeze(e)}const R3e=e=>{if(!e.compressed)return e;e.compressed=!1;for(let t in e.emojis){let n=e.emojis[t];for(let o in Zv)n[o]=n[Zv[o]],delete n[Zv[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=UP(n)}return e=WP(e),e},Xv=["+1","grinning","kissing_heart","heart_eyes","laughing","stuck_out_tongue_winking_eye","sweat_smile","joy","scream","disappointed","unamused","weary","sob","sunglasses","heart","hankey"];let br,CC,bb={};function qP(){CC=!0,br=od.get("frequently")}function F3e(e){CC||qP();var{id:t}=e;br||(br=bb),br[t]||(br[t]=0),br[t]+=1,od.set("last",t),od.set("frequently",br)}function D3e(e){if(CC||qP(),!br){bb={};const i=[];let l=Math.min(e,Xv.length);for(let a=0;a<l;a++)bb[Xv[a]]=parseInt((l-a)/4,10)+1,i.push(Xv[a]);return i}const t=e,n=[];for(let i in br)br.hasOwnProperty(i)&&n.push(i);const r=n.sort((i,l)=>br[i]-br[l]).reverse().slice(0,t),s=od.get("last");return s&&r.indexOf(s)==-1&&(r.pop(),r.push(s)),r}const wb={add:F3e,get:D3e},B3e={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>'},V3e={props:{i18n:{type:Object,required:!0},color:{type:String},categories:{type:Array,required:!0},activeCategory:{type:Object,default(){return{}}}},emits:["click"],created(){this.svgs=B3e}},z3e={role:"tablist",class:"emoji-mart-anchors"},j3e=["aria-label","aria-selected","data-title","onClick"],H3e=["innerHTML"];function U3e(e,t,n,o,r,s){return g(),k("div",z3e,[(g(!0),k(Q,null,Me(n.categories,i=>(g(),k("button",{role:"tab",type:"button","aria-label":i.name,"aria-selected":i.id==n.activeCategory.id,key:i.id,class:F({"emoji-mart-anchor":!0,"emoji-mart-anchor-selected":i.id==n.activeCategory.id}),style:Be({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,H3e),_("span",{"aria-hidden":"true",class:"emoji-mart-anchor-bar",style:Be({backgroundColor:n.color})},null,4)],14,j3e))),128))])}const W3e=fe(V3e,[["render",U3e]]),q3e=String,K3e=q3e.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 G3e(e){var t=e.split("-"),n=t.map(o=>`0x${o}`);return K3e.apply(null,n)}function q$(e){return e.reduce((t,n)=>(t.indexOf(n)===-1&&t.push(n),t),[])}function Y3e(e,t){const n=q$(e),o=q$(t);return n.filter(r=>o.indexOf(r)>=0)}function KP(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=KP(r,s)),n[o]=s}return n}function J3e(){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 Z3e=61,X3e=/^(?:\:([^\:]+)\:)(?:\:skin-tone-(\d)\:)?$/,K$=["1F3FA","1F3FB","1F3FC","1F3FD","1F3FE","1F3FF"];class Q3e{constructor(t,{emojisToShowFilter:n,include:o,exclude:r,custom:s,recent:i,recentLength:l=20}={}){this._data=R3e(t),this._emojisFilter=n||null,this._include=o||null,this._exclude=r||null,this._custom=s||[],this._recent=i||wb.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(X3e);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,c=0;for(let u=0;u<i.length;u++){const d=i[u];if(c++,a[d]||(a[d]={}),a=a[d],!a.results){let f={};a.results=[],a.emojis={};for(let h in l){let p=l[h],m=p._data.search,v=i.substr(0,c),y=m.indexOf(v);if(y!=-1){let E=y+1;v==h&&(E=0),a.results.push(p),a.emojis[h]=p,f[h]=E}}a.results.sort((h,p)=>{var m=f[h.id],v=f[p.id];return m-v})}l=a.emojis}return a.results}).filter(i=>i);var s=null;return r.length>1?s=Y3e.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=UP(n));let o=new Yg(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 Yg(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 Yg{constructor(t){if(this._data=Object.assign({},t),this._skins=null,this._data.skin_variations){this._skins=[];for(var n in K$){let o=K$[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 Yg(s))}}this._sanitized=eke(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=Z3e-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 GP{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 eke(e){var{name:t,short_names:n,skin_tone:o,skin_variations:r,emoticons:s,unified:i,custom:l,imageUrl:a}=e,c=e.id||n[0],u=`:${c}:`;return l?{id:c,name:t,colons:u,emoticons:s,custom:l,imageUrl:a}:(o&&(u+=`:skin-tone-${o}:`),{id:c,name:t,colons:u,emoticons:s,unified:i.toLowerCase(),skin:o||(r?1:null),native:G3e(i)})}const tke={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"}},nke={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{}}}},oke={props:{...tke,data:{type:Object,required:!0}},emits:["click","mouseenter","mouseleave"],computed:{view(){return new GP(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 rke(e,t,n,o,r,s){return s.view.canRender?(g(),L(xt(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:x(()=>[_("span",{class:F(s.view.cssClass),style:Be(s.view.cssStyle)},M(s.view.content),7)]),_:1},40,["title","aria-label","data-title","onMouseenter","onMouseleave","onClick"])):O("",!0)}const YP=fe(oke,[["render",rke]]),ske={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 GP(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:YP}},ike=["aria-label"],lke={class:"emoji-mart-category-label"},ake={class:"emoji-mart-category-label"},cke=["aria-label","data-title","title","onMouseenter","onMouseleave","onClick"],uke={key:0},dke={class:"emoji-mart-no-results-label"};function fke(e,t,n,o,r,s){const i=z("emoji");return s.isVisible&&(s.isSearch||s.hasResults)?(g(),k("section",{key:0,class:F({"emoji-mart-category":!0,"emoji-mart-no-results":!s.hasResults}),"aria-label":n.i18n.categories[n.id]},[_("div",lke,[_("h3",ake,M(n.i18n.categories[n.id]),1)]),(g(!0),k(Q,null,Me(s.emojiObjects,({emojiObject:l,emojiView:a})=>(g(),k(Q,null,[a.canRender?(g(),k("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:F(["emoji-mart-emoji",s.activeClass(l)]),onMouseenter:c=>n.emojiProps.onEnter(a.getEmoji()),onMouseleave:c=>n.emojiProps.onLeave(a.getEmoji()),onClick:c=>n.emojiProps.onClick(a.getEmoji())},[_("span",{class:F(a.cssClass),style:Be(a.cssStyle)},M(a.content),7)],42,cke)):O("",!0)],64))),256)),s.hasResults?O("",!0):(g(),k("div",uke,[b(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",dke,M(n.i18n.notfound),1)]))],10,ike)):O("",!0)}const hke=fe(ske,[["render",fke]]),pke={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}}},mke=["onClick"];function gke(e,t,n,o,r,s){return g(),k("div",{class:F({"emoji-mart-skin-swatches":!0,"emoji-mart-skin-swatches-opened":r.opened})},[(g(),k(Q,null,Me(6,i=>_("span",{key:i,class:F({"emoji-mart-skin-swatch":!0,"emoji-mart-skin-swatch-selected":n.skin==i})},[_("span",{class:F("emoji-mart-skin emoji-mart-skin-tone-"+i),onClick:l=>s.onClick(i)},null,10,mke)],2)),64))],2)}const _ke=fe(pke,[["render",gke]]),vke={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:YP,Skins:_ke}},yke={class:"emoji-mart-preview"},bke={class:"emoji-mart-preview-emoji"},wke={class:"emoji-mart-preview-data"},kke={class:"emoji-mart-preview-name"},Cke={class:"emoji-mart-preview-shortnames"},Ske={class:"emoji-mart-preview-emoticons"},$ke={class:"emoji-mart-preview-emoji"},Eke={class:"emoji-mart-preview-data"},xke={class:"emoji-mart-title-label"},Tke={key:0,class:"emoji-mart-preview-skins"};function Mke(e,t,n,o,r,s){const i=z("emoji"),l=z("skins");return g(),k("div",yke,[n.emoji?(g(),k(Q,{key:0},[_("div",bke,[b(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",wke,[_("div",kke,M(n.emoji.name),1),_("div",Cke,[(g(!0),k(Q,null,Me(s.emojiShortNames,a=>(g(),k("span",{key:a,class:"emoji-mart-preview-shortname"},":"+M(a)+":",1))),128))]),_("div",Ske,[(g(!0),k(Q,null,Me(s.emojiEmoticons,a=>(g(),k("span",{key:a,class:"emoji-mart-preview-emoticon"},M(a),1))),128))])])],64)):(g(),k(Q,{key:1},[_("div",$ke,[b(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",Eke,[_("span",xke,M(n.title),1)]),n.showSkinTones?(g(),k("div",Tke,[b(l,{skin:n.skinProps.skin,onChange:t[0]||(t[0]=a=>n.onSkinChange(a))},null,8,["skin"])])):O("",!0)],64))])}const Ake=fe(vke,[["render",Mke]]),Oke={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()}},Ike={class:"emoji-mart-search"},Nke=["placeholder"],Pke=_("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 Lke(e,t,n,o,r,s){return g(),k("div",Ike,[Ve(_("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]=rn(i=>e.$emit("arrowLeft",i),["left"])),t[1]||(t[1]=rn(()=>e.$emit("arrowRight"),["right"])),t[2]||(t[2]=rn(()=>e.$emit("arrowDown"),["down"])),t[3]||(t[3]=rn(i=>e.$emit("arrowUp",i),["up"])),t[4]||(t[4]=rn(()=>e.$emit("enter"),["enter"]))],"onUpdate:modelValue":t[5]||(t[5]=i=>r.value=i)},null,40,Nke),[[Ou,r.value]]),Pke])}const Rke=fe(Oke,[["render",Lke]]);var Fke=typeof window<"u";Fke&&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 Dke{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 Bke={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"}},Vke={props:{...nke,data:{type:Object,required:!0}},emits:["select","skin-change"],data(){return{activeSkin:this.skin||od.get("skin")||this.defaultSkin,view:new Dke(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+J3e()},filteredCategories(){return this.view.filteredCategories},mergedI18n(){return Object.freeze(KP(Bke,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),wb.add(this.view.previewEmoji))},onEmojiClick(e){this.$emit("select",e),wb.add(e)},onTextSelect(e){e.stopPropagation()},onSkinChange(e){this.activeSkin=e,od.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:W3e,Category:hke,Preview:Ake,Search:Rke}},zke={key:0,class:"emoji-mart-bar emoji-mart-bar-anchors"},jke={id:"emoji-mart-list",ref:"scrollContent",role:"listbox","aria-expanded":"true"},Hke={key:0,class:"emoji-mart-bar emoji-mart-bar-preview"};function Uke(e,t,n,o,r,s){const i=z("anchors"),l=z("search"),a=z("category"),c=z("preview");return g(),k("section",{class:"emoji-mart emoji-mart-static",style:Be(s.customStyles)},[e.showCategories?(g(),k("div",zke,[b(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"])])):O("",!0),le(e.$slots,"searchTemplate",{data:n.data,i18n:e.i18n,autoFocus:e.autoFocus,onSearch:s.onSearch},()=>[e.showSearch?(g(),L(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"])):O("",!0)]),_("div",{role:"tabpanel",class:"emoji-mart-scroll",ref:"scroll",onScroll:t[0]||(t[0]=(...u)=>s.onScroll&&s.onScroll(...u))},[_("div",jke,[le(e.$slots,"customCategory"),(g(!0),k(Q,null,Me(r.view.filteredCategories,(u,d)=>Ve((g(),L(a,{ref_for:!0,ref:"categories_"+d,key:u.id,data:n.data,i18n:s.mergedI18n,id:u.id,name:u.name,emojis:u.emojis,"emoji-props":s.emojiProps},null,8,["data","i18n","id","name","emojis","emoji-props"])),[[sn,e.infiniteScroll||u==r.view.activeCategory]])),128))],512)],544),le(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?(g(),k("div",Hke,[b(c,{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"])])):O("",!0)])],4)}const Wke=fe(Vke,[["render",Uke]]),qke={name:"EmojiPicker",components:{Picker:Wke},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 Q3e(t),this.emojiIndex=window.fcomEmojiIndex,this.imojiLoading=!1):this.errorMessage="Emoji loading failed"}).catch(t=>{this.errorMessage="Emoji loading failed"}).finally(()=>{this.isLoading=!1})}}},Kke={style:{position:"relative"},ref:"container"},Gke=_("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),Yke={key:0,class:"emoji-mart emoji-mart-static",style:{width:"320px",padding:"10px 20px"}},Jke={key:0},Zke={style:{"text-align":"center","margin-bottom":"20px"}},Xke={key:1,class:"fcom_emoji_holder"};function Qke(e,t,n,o,r,s){const i=ve,l=Ze,a=qt,c=z("Picker"),u=$o;return g(),k("div",Kke,[b(u,{placement:"bottom",width:320,trigger:"click",persistent:!1,ref:"fcom_emoji_popover",onShow:s.loadEmojiAssets,"popper-class":"fcom_emoji_popover ffcom_emoji"},{reference:x(()=>[b(l,{"aria-label":"Pick Imoji",text:""},{default:x(()=>[b(i,null,{default:x(()=>[Gke]),_:1})]),_:1})]),default:x(()=>[r.imojiLoading?(g(),k("div",Yke,[r.errorMessage?(g(),k("div",Jke,M(r.errorMessage),1)):(g(),k(Q,{key:1},[_("div",Zke,M(e.$t("Loading.....")),1),b(a,{animated:!0,rows:3})],64))])):r.emojiIndex?(g(),k("div",Xke,[b(c,{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"])])):O("",!0)]),_:1},8,["onShow"])],512)}const JP=fe(qke,[["render",Qke]]),eCe=window.fluentComAdmin.auth,tCe={name:"FeedTextComposer",components:{MediaPreview:gd,Giphy:Mfe,ImageUploader:vc,SurveyEditForm:yde,MarkdownEditor:wC,EmojiPicker:JP,VideoEmbeder:nhe},emits:["editorCreated"],props:{placeholder:{type:String,default(){return"What's happening, "+eCe.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 only upload maximum %s images for a 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()})}},nCe={class:"fcom_text_composer"},oCe={class:"fcom_editor status_text_input"},rCe={key:0,style:{position:"relative","text-align":"center"}},sCe={key:1,class:"fcom_media_items"},iCe={key:0,class:"fcom_media_images"},lCe=["src","alt"],aCe={key:1},cCe={class:"fcom_media_images"},uCe=["src","alt"],dCe={key:2,class:"fcrom_media_images"},fCe=["src","alt"],hCe={key:3,class:"fcrom_media_images"},pCe={class:"fcrom_media_image"},mCe=["src","alt"],gCe={class:"fcom_composer_footer"},_Ce={class:"fcom_composer_apps"},vCe=_("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),yCe={key:0},bCe=_("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),wCe={class:"fcom_composer_actions"};function kCe(e,t,n,o,r,s){var v,y,E,w,C,T,$,A,N;const i=z("MarkdownEditor"),l=z("SurveyEditForm"),a=Ze,c=z("media-preview"),u=ve,d=z("image-uploader"),f=z("video-embeder"),h=z("EmojiPicker"),p=z("Giphy"),m=Mt("loading");return g(),k(Q,null,[_("div",nCe,[_("div",oCe,[le(e.$slots,"before_input"),b(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"]),le(e.$slots,"after_input")]),n.content.survey?(g(),L(l,{key:0,onCancel:t[2]||(t[2]=P=>n.content.survey=null),form:n.content.survey},null,8,["form"])):(g(),k(Q,{key:1},[(y=(v=n.content)==null?void 0:v.media)!=null&&y.type?(g(),k("div",rCe,[b(a,{onClick:t[3]||(t[3]=P=>{n.content.media=null}),text:"",type:"danger"},{default:x(()=>[ne(M(e.$t("Remove Media")),1)]),_:1}),b(c,{media_item:n.content.media},null,8,["media_item"])])):(E=n.content)!=null&&E.meta?(g(),k("div",sCe,[(C=(w=n.content.meta)==null?void 0:w.media_items)!=null&&C.length?(g(!0),k(Q,{key:0},Me(n.content.meta.media_items,(P,I)=>(g(),k("div",{key:I},[P.type=="image"?(g(),k("div",iCe,[_("img",{class:"fcom_media_image",src:P.url,alt:e.$t("Media image")},null,8,lCe),b(a,{class:"fcom_media_images_cross_button",link:"",onClick:D=>n.content.meta.media_items.splice(I,1)},{default:x(()=>[ne(" x ")]),_:2},1032,["onClick"])])):O("",!0)]))),128)):(($=(T=n.content.meta)==null?void 0:T.media_preview)==null?void 0:$.type)=="image"||(N=(A=n.content.meta)==null?void 0:A.media_preview)!=null&&N.image?(g(),k("div",aCe,[_("div",cCe,[_("img",{class:"fcom_media_image",src:n.content.meta.media_preview.image,alt:e.$t("Media Preview image")},null,8,uCe),b(a,{class:"fcom_media_images_cross_button",link:"",onClick:t[4]||(t[4]=P=>n.content.meta.media_preview=null)},{default:x(()=>[ne(" x ")]),_:1})])])):O("",!0)])):n.content.media_images&&n.content.media_images.length?(g(),k("div",dCe,[(g(!0),k(Q,null,Me(n.content.media_images,(P,I)=>(g(),k("div",{class:"fcrom_media_image",key:I},[_("img",{src:P.url,alt:e.$t("Media image")},null,8,fCe),b(a,{link:"",onClick:D=>n.content.media_images.splice(I,1)},{default:x(()=>[ne(" x ")]),_:2},1032,["onClick"])]))),128))])):s.checkHasImageForCommentsEdit(n.content)?(g(),k("div",hCe,[_("div",pCe,[_("img",{src:n.content.media.media_url,alt:e.$t("Media image")},null,8,mCe),b(a,{link:"",onClick:t[5]||(t[5]=P=>s.removeImageFromComments())},{default:x(()=>[ne(" x ")]),_:1})])])):O("",!0)],64))]),Ve((g(),k("div",gCe,[_("div",_Ce,[s.hasActiveApp?O("",!0):(g(),k(Q,{key:0},[e.appVars.features.max_media_per_post?(g(),L(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:x(()=>[Ve((g(),L(a,{"aria-label":"Upload Media",text:""},{default:x(()=>[b(u,{class:"fcom_status_img_icon"},{default:x(()=>[vCe]),_:1}),r.uploading?(g(),k("span",yCe,M(e.$t("Uploading...")),1)):O("",!0)]),_:1})),[[m,r.uploading]])]),_:1},8,["isMultiple","onUploaded"])):O("",!0),n.videoApp&&e.hasFeature("video_embeder")?(g(),L(f,{key:1,onEmbeded:s.handleVideoAttachment},null,8,["onEmbeded"])):O("",!0),n.surveyApp&&e.hasFeature("has_survey_poll")?(g(),L(a,{key:2,"aria-label":"Create Poll",onClick:s.initSurveyForm,text:""},{default:x(()=>[b(u,{class:"fcom_apps_icon"},{default:x(()=>[bCe]),_:1})]),_:1},8,["onClick"])):O("",!0),e.hasFeature("emoji_app")?(g(),L(h,{key:3,onEmojiSelected:s.insertEmoji},null,8,["onEmojiSelected"])):O("",!0),e.hasFeature("giphy_app")?(g(),L(p,{key:4,onSelectedGiphy:s.selectedGiphy},null,8,["onSelectedGiphy"])):O("",!0)],64))]),_("div",wCe,[le(e.$slots,"default")])])),[[m,r.uploading]])],64)}const Ed=fe(tCe,[["render",kCe]]),CCe={name:"SingleComment",components:{FeedTextComposer:Ed,MediaPreview:gd},props:["comment"],emits:["deleted","updated","copyLink"],data(){return{working:!1,isEdit:!1}},methods:{deleteComment(){this.$confirm(this.$t("Are you sure you want to delete this comment and associate 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()}}},SCe={key:0,class:"person_avatar"},$Ce={class:"comment_wrap"},ECe={key:0,class:"comment_text"},xCe={class:"comment_text_head"},TCe={class:"comment_text_head_name"},MCe=["title"],ACe={style:{"margin-left":"auto"},class:"comment_actions"},OCe={class:"actions_items"},ICe=["innerHTML"],NCe={key:0,class:"comment_text_media"},PCe={key:1,class:"comment_text"};function LCe(e,t,n,o,r,s){const i=z("UserAvatar"),l=z("UserRouteLink"),a=z("MoreFilled"),c=ve,u=Ze,d=$o,f=z("MediaPreview"),h=z("feed-text-composer"),p=Mt("loading");return g(),k(Q,null,[n.comment.xprofile?(g(),k("div",SCe,[b(i,{with_level:!1,xprofile:n.comment.xprofile,is_rounded:!0},null,8,["xprofile"])])):O("",!0),Ve((g(),k("div",$Ce,[r.isEdit?(g(),k("div",PCe,[b(h,{multipleMedia:!1,content:n.comment,autofocus:!0,onUpdated:t[5]||(t[5]=m=>r.isEdit=!1)},{default:x(()=>[_("div",null,[b(u,{onClick:t[3]||(t[3]=m=>r.isEdit=!1)},{default:x(()=>[ne(M(e.$t("Cancel")),1)]),_:1}),b(u,{type:"primary",onClick:t[4]||(t[4]=m=>s.updateComment(n.comment))},{default:x(()=>[ne(M(e.$t("Update")),1)]),_:1})])]),_:1},8,["content"])])):(g(),k("div",ECe,[_("div",xCe,[_("div",TCe,[b(l,{show_badge:!0,xprofile:n.comment.xprofile},null,8,["xprofile"])]),_("div",{title:n.comment.created_at,class:"comment_text_head_time"},M(e.humanDateDiff(n.comment.created_at)),9,MCe),_("div",ACe,[b(d,{persistent:!1,placement:"bottom",ref:"comment_actions",width:200,trigger:"click"},{reference:x(()=>[b(u,{"aria-label":e.$t("View comment actions"),class:"fcom_dot_menu",size:"small",text:""},{default:x(()=>[b(c,null,{default:x(()=>[b(a)]),_:1})]),_:1},8,["aria-label"])]),default:x(()=>[_("ul",OCe,[_("li",{onClick:t[0]||(t[0]=m=>s.copyCommentLink(n.comment))},M(e.$t("Copy Link")),1),e.canEditComment(n.comment)?(g(),k("li",{key:0,onClick:t[1]||(t[1]=m=>s.editComment())},M(e.$t("Edit")),1)):O("",!0),e.canDeleteComment(n.comment)?(g(),k("li",{key:1,onClick:t[2]||(t[2]=m=>s.deleteComment())},M(e.$t("Delete")),1)):O("",!0)])]),_:1},512)])]),_("div",{class:"comment_text_body feed_md_content",innerHTML:s.renderedComment(n.comment.message_rendered)},null,8,ICe),n.comment.meta.media_preview?(g(),k("div",NCe,[b(f,{media_item:n.comment.meta.media_preview},null,8,["media_item"])])):O("",!0)])),le(e.$slots,"after_comment_text")])),[[p,r.working]])],64)}const ZP=fe(CCe,[["render",LCe]]);function RCe(e,t){for(var n=-1,o=e==null?0:e.length;++n<o&&t(e[n],n,e)!==!1;);return e}var FCe=RCe;function DCe(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 BCe=DCe,VCe=BCe,zCe=VCe(),jCe=zCe;function HCe(e,t){for(var n=-1,o=Array(e);++n<e;)o[n]=t(n);return o}var UCe=HCe,WCe=yp,qCe=bp,KCe="[object Arguments]";function GCe(e){return qCe(e)&&WCe(e)==KCe}var YCe=GCe,G$=YCe,JCe=bp,XP=Object.prototype,ZCe=XP.hasOwnProperty,XCe=XP.propertyIsEnumerable,QCe=G$(function(){return arguments}())?G$:function(e){return JCe(e)&&ZCe.call(e,"callee")&&!XCe.call(e,"callee")},SC=QCe,e4e=Array.isArray,Js=e4e,Jg={exports:{}};function t4e(){return!1}var n4e=t4e;Jg.exports;(function(e,t){var n=Ks,o=n4e,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,c=a||o;e.exports=c})(Jg,Jg.exports);var $C=Jg.exports,o4e=9007199254740991,r4e=/^(?:0|[1-9]\d*)$/;function s4e(e,t){var n=typeof e;return t=t??o4e,!!t&&(n=="number"||n!="symbol"&&r4e.test(e))&&e>-1&&e%1==0&&e<t}var QP=s4e,i4e=9007199254740991;function l4e(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=i4e}var EC=l4e,a4e=yp,c4e=EC,u4e=bp,d4e="[object Arguments]",f4e="[object Array]",h4e="[object Boolean]",p4e="[object Date]",m4e="[object Error]",g4e="[object Function]",_4e="[object Map]",v4e="[object Number]",y4e="[object Object]",b4e="[object RegExp]",w4e="[object Set]",k4e="[object String]",C4e="[object WeakMap]",S4e="[object ArrayBuffer]",$4e="[object DataView]",E4e="[object Float32Array]",x4e="[object Float64Array]",T4e="[object Int8Array]",M4e="[object Int16Array]",A4e="[object Int32Array]",O4e="[object Uint8Array]",I4e="[object Uint8ClampedArray]",N4e="[object Uint16Array]",P4e="[object Uint32Array]",on={};on[E4e]=on[x4e]=on[T4e]=on[M4e]=on[A4e]=on[O4e]=on[I4e]=on[N4e]=on[P4e]=!0;on[d4e]=on[f4e]=on[S4e]=on[h4e]=on[$4e]=on[p4e]=on[m4e]=on[g4e]=on[_4e]=on[v4e]=on[y4e]=on[b4e]=on[w4e]=on[k4e]=on[C4e]=!1;function L4e(e){return u4e(e)&&c4e(e.length)&&!!on[a4e(e)]}var R4e=L4e;function F4e(e){return function(t){return e(t)}}var D4e=F4e,Zg={exports:{}};Zg.exports;(function(e,t){var n=VA,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})(Zg,Zg.exports);var B4e=Zg.exports,V4e=R4e,z4e=D4e,Y$=B4e,J$=Y$&&Y$.isTypedArray,j4e=J$?z4e(J$):V4e,xC=j4e,H4e=UCe,U4e=SC,W4e=Js,q4e=$C,K4e=QP,G4e=xC,Y4e=Object.prototype,J4e=Y4e.hasOwnProperty;function Z4e(e,t){var n=W4e(e),o=!n&&U4e(e),r=!n&&!o&&q4e(e),s=!n&&!o&&!r&&G4e(e),i=n||o||r||s,l=i?H4e(e.length,String):[],a=l.length;for(var c in e)(t||J4e.call(e,c))&&!(i&&(c=="length"||r&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||K4e(c,a)))&&l.push(c);return l}var X4e=Z4e,Q4e=Object.prototype;function e5e(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Q4e;return e===n}var eL=e5e;function t5e(e,t){return function(n){return e(t(n))}}var n5e=t5e,o5e=n5e,r5e=o5e(Object.keys,Object),s5e=r5e,i5e=eL,l5e=s5e,a5e=Object.prototype,c5e=a5e.hasOwnProperty;function u5e(e){if(!i5e(e))return l5e(e);var t=[];for(var n in Object(e))c5e.call(e,n)&&n!="constructor"&&t.push(n);return t}var tL=u5e,d5e=yp,f5e=md,h5e="[object AsyncFunction]",p5e="[object Function]",m5e="[object GeneratorFunction]",g5e="[object Proxy]";function _5e(e){if(!f5e(e))return!1;var t=d5e(e);return t==p5e||t==m5e||t==h5e||t==g5e}var nL=_5e,v5e=nL,y5e=EC;function b5e(e){return e!=null&&y5e(e.length)&&!v5e(e)}var TC=b5e,w5e=X4e,k5e=tL,C5e=TC;function S5e(e){return C5e(e)?w5e(e):k5e(e)}var MC=S5e,$5e=jCe,E5e=MC;function x5e(e,t){return e&&$5e(e,t,E5e)}var T5e=x5e,M5e=TC;function A5e(e,t){return function(n,o){if(n==null)return n;if(!M5e(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 O5e=A5e,I5e=T5e,N5e=O5e,P5e=N5e(I5e),L5e=P5e;function R5e(e){return e}var oL=R5e,F5e=oL;function D5e(e){return typeof e=="function"?e:F5e}var B5e=D5e,V5e=FCe,z5e=L5e,j5e=B5e,H5e=Js;function U5e(e,t){var n=H5e(e)?V5e:z5e;return n(e,j5e(t))}var W5e=U5e,q5e=W5e;const ya=jl(q5e);function wt(e){return window.fluentComAdmin.i18n[e]||e}const rL={public:{label:wt("Public"),description:wt("__PUBLIC_SPACE_DESC"),space_description:wt("__PIBLIC_SPACE_DESC_2")},private:{label:wt("Private"),description:wt("__PRIVATE_SPACE_DESC"),space_description:wt("__PRIVATE_SPACE_DESC_2")},secret:{label:wt("Secret"),description:wt("Only invited members can view and post."),space_description:wt("__SECRET_SPACE_DESC_2")}},K5e={public:{label:wt("Public"),description:wt("Anyone can view and enroll the course for free")},private:{label:wt("Private"),description:wt("__PRIVATE_COURSE_DESC")},secret:{label:wt("Secret"),description:wt("Only invited students can view and enroll the course content.")}},G5e={self_paced:{label:wt("Self Paced"),description:wt("__SELF_PAED_COURSE_DESC")},structured:{label:"Structured",description:wt("__STRUCTURED_COURSE_DESC")},scheduled:{label:wt("Scheduled"),description:wt("Course starts on a specific date. Sections are dripped relative to that date.")}};wt("Leaderboard Settings"),wt("Settings for Leaderboard & Gamification features"),wt("Get Leaderboard & Gamification Module"),wt("Unlock potential by creating new feeds and earning points for likes. Advance in rank based on your total points using this module"),wt("Emoji Module"),wt("Settings for Emoji & Reaction features"),wt("Get Emoji & Reaction Module"),wt("Use emojis to add a personal touch and make your new article, post, or comment more expressive"),wt("Giphy Module"),wt("Customize Your Giphy Module Settings"),wt("Get Giphy Module"),wt("Want to use awesome GIF, upgrade to pro plan now and enjoy your surfing on Fluent community"),wt("User Badge Module"),wt("Add a badge next to user profile name to highlight valued users"),wt("Get User Badge Module"),wt("Show customized Badge to user profile beside name to easily recognize your admins / moderators or give appriciations to your power users"),wt("Media Module"),wt("Add a badge next to user profile name to highlight valued users"),wt("Get Media Module"),wt("Choose where to store your media files. Options include Local File System, Amazon S3, or Cloudflare R2 for storing and serving your media assets");const gl=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 Y5e=Ks,J5e=Y5e["__core-js_shared__"],Z5e=J5e,Qv=Z5e,Z$=function(){var e=/[^.]+$/.exec(Qv&&Qv.keys&&Qv.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function X5e(e){return!!Z$&&Z$ in e}var Q5e=X5e,e6e=Function.prototype,t6e=e6e.toString;function n6e(e){if(e!=null){try{return t6e.call(e)}catch{}try{return e+""}catch{}}return""}var sL=n6e,o6e=nL,r6e=Q5e,s6e=md,i6e=sL,l6e=/[\\^$.*+?()[\]{}|]/g,a6e=/^\[object .+?Constructor\]$/,c6e=Function.prototype,u6e=Object.prototype,d6e=c6e.toString,f6e=u6e.hasOwnProperty,h6e=RegExp("^"+d6e.call(f6e).replace(l6e,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function p6e(e){if(!s6e(e)||r6e(e))return!1;var t=o6e(e)?h6e:a6e;return t.test(i6e(e))}var m6e=p6e;function g6e(e,t){return e==null?void 0:e[t]}var _6e=g6e,v6e=m6e,y6e=_6e;function b6e(e,t){var n=y6e(e,t);return v6e(n)?n:void 0}var xd=b6e,w6e=xd,k6e=Ks,C6e=w6e(k6e,"DataView"),S6e=C6e,$6e=xd,E6e=Ks,x6e=$6e(E6e,"Map"),AC=x6e,T6e=xd,M6e=Ks,A6e=T6e(M6e,"Promise"),O6e=A6e,I6e=xd,N6e=Ks,P6e=I6e(N6e,"Set"),iL=P6e,L6e=xd,R6e=Ks,F6e=L6e(R6e,"WeakMap"),D6e=F6e,kb=S6e,Cb=AC,Sb=O6e,$b=iL,Eb=D6e,lL=yp,Td=sL,X$="[object Map]",B6e="[object Object]",Q$="[object Promise]",e9="[object Set]",t9="[object WeakMap]",n9="[object DataView]",V6e=Td(kb),z6e=Td(Cb),j6e=Td(Sb),H6e=Td($b),U6e=Td(Eb),ha=lL;(kb&&ha(new kb(new ArrayBuffer(1)))!=n9||Cb&&ha(new Cb)!=X$||Sb&&ha(Sb.resolve())!=Q$||$b&&ha(new $b)!=e9||Eb&&ha(new Eb)!=t9)&&(ha=function(e){var t=lL(e),n=t==B6e?e.constructor:void 0,o=n?Td(n):"";if(o)switch(o){case V6e:return n9;case z6e:return X$;case j6e:return Q$;case H6e:return e9;case U6e:return t9}return t});var aL=ha,W6e=tL,q6e=aL,K6e=SC,G6e=Js,Y6e=TC,J6e=$C,Z6e=eL,X6e=xC,Q6e="[object Map]",e8e="[object Set]",t8e=Object.prototype,n8e=t8e.hasOwnProperty;function o8e(e){if(e==null)return!0;if(Y6e(e)&&(G6e(e)||typeof e=="string"||typeof e.splice=="function"||J6e(e)||X6e(e)||K6e(e)))return!e.length;var t=q6e(e);if(t==Q6e||t==e8e)return!e.size;if(Z6e(e))return!W6e(e).length;for(var n in e)if(n8e.call(e,n))return!1;return!0}var r8e=o8e;const cL=jl(r8e),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),cL(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}}},i8e={class:"fcom_social_links"},l8e=["href","title"];function a8e(e,t,n,o,r,s){const i=ve,l=z("router-link");return g(),k("div",i8e,[(g(!0),k(Q,null,Me(s.socialLinks,a=>(g(),k("a",{rel:"noopener nofollow",target:"_blank",href:a.url,key:a.title,title:a.title},[b(i,{innerHTML:a.icon},null,8,["innerHTML"])],8,l8e))),128)),n.isOwn&&!s.socialLinks.length?(g(),L(l,{key:0,to:{name:"update_profile",params:{username:n.xprofile.username}}},{default:x(()=>[ne(M("+ "+e.$t("Add social links")),1)]),_:1},8,["to"])):O("",!0)])}const OC=fe(s8e,[["render",a8e]]),c8e={name:"UserRouteLink",props:{xprofile:{default:()=>({})},show_pop:{type:Boolean,default(){return!0}},show_badge:{type:Boolean,default(){return!1}}},components:{SocialLinks:OC},data(){return{showingPop:!1,userLevel:null}},methods:{initShow(){this.showingPop=!0,this.has_leaderboard&&!this.userLevel&&(this.userLevel=gl(this.xprofile.total_points))}}},u8e=["href"],d8e=["href"],f8e={key:0,class:"fcom_profile_pop"},h8e={class:"fcom_profile_pop_avatar"},p8e={key:0,class:"fcom_prfile_tagline"},m8e={class:"fcom_level_name"},g8e={style:{display:"block"},class:"fcoml_level_sub meta_line"},_8e={class:"fcom_profile_pop_info"},v8e=["href"],y8e={class:"fcom_user_name"},b8e={key:0,class:"fcom_profile_pop_bio"},w8e={class:"meta_line"},k8e={key:1,class:"meta_line"},C8e={class:"fcom_profile_btns"},S8e=["href"],$8e=["href"];function E8e(e,t,n,o,r,s){const i=z("verified-sign"),l=z("UserBadge"),a=z("UserAvatar"),c=gp,u=z("SocialLinks"),d=mp,f=$o;return n.show_pop?(g(),L(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:x(()=>[le(e.$slots,"default",{},()=>[_("a",{href:e.$getRouteLink("u/:username",{username:n.xprofile.username}),class:"user_route"},[ne(M(n.xprofile.display_name||e.$t("No name"))+" ",1),n.xprofile.is_verified?(g(),L(i,{key:0})):O("",!0),n.show_badge?(g(),L(l,{key:1,profile:n.xprofile},null,8,["profile"])):O("",!0)],8,d8e)])]),default:x(()=>[r.showingPop?(g(),k("div",f8e,[b(d,{gutter:20},{default:x(()=>[b(c,{sm:24,md:8},{default:x(()=>[_("div",h8e,[b(a,{xprofile:n.xprofile},null,8,["xprofile"]),r.userLevel?(g(),k("div",p8e,[_("div",m8e,M(r.userLevel.title),1),_("div",g8e,M(r.userLevel.tagline),1)])):O("",!0)])]),_:1}),b(c,{sm:24,md:16},{default:x(()=>[_("div",_8e,[_("a",{href:e.$getRouteLink("u/:username",{username:n.xprofile.username}),class:"user_route"},[ne(M(n.xprofile.display_name)+" ",1),n.xprofile.is_verified?(g(),L(i,{key:0})):O("",!0),n.show_badge?(g(),L(l,{key:1,profile:n.xprofile},null,8,["profile"])):O("",!0)],8,v8e),_("span",y8e," @"+M(n.xprofile.username),1),n.xprofile.short_description?(g(),k("div",b8e,M(e.getExcerpt(n.xprofile.short_description,160)),1)):O("",!0),_("div",w8e," Joined: "+M(e.humanDateDiff(n.xprofile.created_at)),1),n.xprofile.last_activity?(g(),k("div",k8e," Last seen: "+M(e.humanDateDiff(n.xprofile.last_activity)),1)):O("",!0),_("div",C8e,[_("a",{class:"el-button el-button--primary is-text is-has-bg",href:e.$getRouteLink("u/:username",{username:n.xprofile.username})},M(e.$t("View Profile")),9,S8e),e.appVars.has_chat?(g(),k("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})},M(e.$t("Message")),9,$8e)):O("",!0)]),b(u,{style:{"justify-content":"left"},xprofile:n.xprofile,isOwn:!1},null,8,["xprofile"])])]),_:1})]),_:1})])):O("",!0)]),_:3},8,["onShow"])):(g(),k("a",{key:0,href:e.$getRouteLink("u/:username",{username:n.xprofile.username}),class:"user_route"},[le(e.$slots,"default",{},()=>[ne(M(n.xprofile.display_name)+" ",1),n.xprofile.is_verified?(g(),L(i,{key:0})):O("",!0),n.show_badge?(g(),L(l,{key:1,profile:n.xprofile},null,8,["profile"])):O("",!0)])],8,u8e))}const Md=fe(c8e,[["render",E8e]]),x8e={name:"CommentReacts",components:{UserRouteLink:Md},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}))}}},T8e={style:{"margin-left":"5px"}},M8e={key:0},A8e={key:1},O8e={class:"fcom_user_lists"},I8e={key:2};function N8e(e,t,n,o,r,s){const i=qt,l=z("UserAvatar"),a=z("UserRouteLink"),c=Vo,u=$o;return g(),L(u,{persistent:!1,placement:"bottom",title:e.$t("Likes"),width:200,trigger:"click",onShow:s.getReactions},{reference:x(()=>[_("span",T8e,M(n.comment.reactions_count),1)]),default:x(()=>[r.loading?(g(),k("div",M8e,[b(i,{animated:!0,rows:1})])):r.reactions?(g(),k("div",A8e,[b(c,{"max-height":"300px"},{default:x(()=>[_("ul",O8e,[(g(!0),k(Q,null,Me(r.reactions,d=>(g(),k("li",null,[d.xprofile?(g(),k(Q,{key:0},[b(l,{with_level:!1,xprofile:d.xprofile},null,8,["xprofile"]),b(a,{show_badge:!0,xprofile:d.xprofile},null,8,["xprofile"])],64)):O("",!0)]))),256))])]),_:1})])):(g(),k("div",I8e,[_("p",null,M(e.$t("Failed to load the list")),1)]))]),_:1},8,["title","onShow"])}const P8e=fe(x8e,[["render",N8e]]),L8e={name:"HeartIcon",props:{filled:{default:!1}}},R8e={key:0,viewBox:"0 0 24 24","aria-hidden":"true"},F8e=_("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),D8e=[F8e],B8e={key:1,viewBox:"0 0 24 24","aria-hidden":"true"},V8e=_("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),z8e=[V8e];function j8e(e,t,n,o,r,s){return n.filled?(g(),k("svg",R8e,D8e)):(g(),k("svg",B8e,z8e))}const IC=fe(L8e,[["render",j8e]]),H8e={name:"NestedReplyBox",components:{SingleComment:ZP,FeedTextComposer:Ed,CommentReactions:P8e,HeartIcon:IC},props:["comment","feed","checkPermission","show_reacts_only","defaultMentions"],emits:["commented","copyLink"],data(){return{open:!1,commentReply:{message:"",media_images:[]},submitting:!1}},computed:{canComment(){return this.hasCommentPermission(this.feed)||!this.checkPermission}},methods:{addComment(){this.commentReply.message&&(this.submitting=!0,this.$post("feeds/"+this.feed.id+"/comments",{comment:this.commentReply.message,parent_id:this.comment.id,media_images:this.commentReply.media_images}).then(e=>{this.comment.comments||(this.comment.comments=[]),this.commentReply={message:"",media_images:[]},this.comment.comments.push(e.comment),this.$emit("commented",e.comment),this.feed.comments_count=parseInt(this.feed.comments_count)+1,this.open=!1}).catch(e=>{this.$handleError(e)}).finally(()=>{this.submitting=!1}))},toggleCommentBox(e){if(!this.hasCommentPermission(this.feed)){this.$notify({title:this.$t("Please login"),message:this.$t("Please login to reply to this post"),type:"warning"});return}this.open=!this.open;let t=e==null?void 0:e.xprofile.username;this.open&&t&&e.user_id!=this.auth.user_id&&(this.commentReply.message=`@${t}, `),this.open},handleCommentDelete(e){this.comment.comments.splice(e,1),this.feed.comments_count--},toggleLike(e){let t=!e.liked;e.liked=t,this.$post("feeds/"+this.feed.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)})},emitCopyLink(e){this.$emit("copyLink",e)}}},U8e={key:0,class:"reply_box"},W8e={class:"fcom_comments_react fcom_reaction_list"},q8e={class:"child_comments"},K8e=["id"],G8e={key:0,class:"reply_box"},Y8e=["onClick"],J8e={class:"fcom_comments_react fcom_reaction_list"},Z8e={key:0,class:"child_reply_wrap"},X8e={class:"feed_commenting"},Q8e={class:"person_avatar"},eSe=["alt","src"],tSe={class:"feed_comment_input comment_text"};function nSe(e,t,n,o,r,s){var h;const i=z("HeartIcon"),l=ve,a=z("CommentReactions"),c=z("single-comment"),u=Ze,d=z("feed-text-composer"),f=Mt("loading");return g(),k(Q,null,[s.canComment?(g(),k("div",U8e,[((h=n.feed.meta)==null?void 0:h.comments_disabled)!=="yes"?(g(),k("span",{key:0,onClick:t[0]||(t[0]=p=>s.toggleCommentBox(n.comment)),class:"reply_btn"},M(e.$t("Reply")),1)):O("",!0),_("span",{style:{"margin-left":"14px"},class:F([{fcom_is_liked:n.comment.liked},"reply_btn"])},[_("div",W8e,[b(l,{class:F({user_reacted:n.comment.liked}),onClick:t[1]||(t[1]=p=>s.toggleLike(n.comment))},{default:x(()=>[b(i,{filled:n.comment.liked},null,8,["filled"])]),_:1},8,["class"]),parseInt(n.comment.reactions_count)?(g(),L(a,{key:0,comment:n.comment},null,8,["comment"])):O("",!0)])],2),le(e.$slots,"after_reply_box_text")])):O("",!0),!n.show_reacts_only||r.open?(g(),k(Q,{key:1},[_("div",q8e,[(g(!0),k(Q,null,Me(n.comment.comments,(p,m)=>(g(),k("div",{id:"comment_"+p.id,class:"each_comment"},[b(c,{onCopyLink:s.emitCopyLink,onDeleted:v=>s.handleCommentDelete(m),comment:p},{after_comment_text:x(()=>[s.canComment?(g(),k("div",G8e,[_("span",{onClick:v=>s.toggleCommentBox(p),class:"reply_btn"},M(e.$t("Reply")),9,Y8e),_("span",{style:{"margin-left":"14px"},class:F([{fcom_is_liked:p.liked},"reply_btn"])},[_("div",J8e,[b(l,{class:F({user_reacted:p.liked}),onClick:v=>s.toggleLike(p)},{default:x(()=>[b(i,{filled:p.liked},null,8,["filled"])]),_:2},1032,["class","onClick"]),parseInt(p.reactions_count)?(g(),L(a,{key:0,comment:p},null,8,["comment"])):O("",!0)])],2)])):O("",!0)]),_:2},1032,["onCopyLink","onDeleted","comment"])],8,K8e))),256))]),r.open?(g(),k("div",Z8e,[_("div",X8e,[_("div",Q8e,[_("img",{alt:e.$t("Your Photo"),src:e.auth.avatar},null,8,eSe)]),_("div",tSe,[b(d,{defaultMentions:n.defaultMentions?n.defaultMentions:[],disabled:r.submitting,autofocus:r.open,mentionQuery:{space_id:n.feed.space_id},content:r.commentReply,placeholder:e.$t("Leave a reply")},{default:x(()=>[Ve((g(),L(u,{disabled:r.submitting,onClick:t[2]||(t[2]=p=>s.addComment()),class:"fcom_primary_button"},{default:x(()=>[ne(M(e.$t("Reply")),1)]),_:1},8,["disabled"])),[[f,r.submitting]])]),_:1},8,["defaultMentions","disabled","autofocus","mentionQuery","content","placeholder"])])])])):O("",!0)],64)):O("",!0)],64)}const oSe=fe(H8e,[["render",nSe]]),rSe={name:"FeedComments",components:{SingleComment:ZP,NestedReplyBox:oSe},props:["feed","show_all","checkPermission","defaultMentions","sortBy"],emits:["forceShowAll"],data(){return{lastComment:null,loading:!1}},watch:{sortBy(){this.sortComments()}},methods:{fetchComments(){this.loading=!0,this.$get("feeds/"+this.feed.id+"/comments").then(e=>{this.feed.comments=e.comments,this.formatComments(),this.$eventBus.emit("feed_interaction",this.feed.id)}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})},formatComments(){let e={},t=this.feed.comments,n=[];t.forEach(o=>{o.parent_id?n.push(o):e[o.id]=o}),n.forEach(o=>{e[o.parent_id]&&(e[o.parent_id].comments||(e[o.parent_id].comments=[]),e[o.parent_id].comments.push(o))}),this.feed.comments=Object.values(e),this.lastComment=this.feed.comments[this.feed.comments.length-1]},handleCommentDelete(e){this.feed.comments.splice(e,1),this.feed.comments_count--,this.formatComments()},copyCommentLink(e){let t={name:"single_feed",params:{feed_slug:this.feed.slug},query:{comment_id:e.id}};this.space_slug&&(t={name:"space_feed",params:{feed_slug:this.feed.slug,space:this.space_slug}});let n=this.$router.resolve(t),o=this.appVars.urls.portal_base;o=o.replace(/\/$/,"");let r=o+n.fullPath;navigator.clipboard.writeText(r).then(()=>{this.$notify.success(this.$t("Link copied to clipboard"))}).catch(s=>{this.$notify.error(this.$t("Failed to copy the link"))})},sortComments(){if(this.sortBy=="oldest"||!this.sortBy)this.feed.comments=this.feed.comments.sort((e,t)=>e.id-t.id);else if(this.sortBy=="latest")this.feed.comments=this.feed.comments.sort((e,t)=>t.id-e.id);else if(this.sortBy=="popular")this.feed.comments=this.feed.comments.sort((e,t)=>t.reactions_count-e.reactions_count);else if(this.sortBy=="most_replied")return this.feed.comments=this.feed.comments.sort((e,t)=>{var n,o;return((n=t.comments)==null?void 0:n.length)||0-((o=e.comments)==null?void 0:o.length)||0});return this.feed.comments}},mounted(){this.feed.comments?this.formatComments():this.feed.comments_count&&this.fetchComments()}},sSe={key:0,class:"feed_comments"},iSe=["id"],lSe={key:1,class:"feed_comments"},aSe={class:"each_comment"};function cSe(e,t,n,o,r,s){const i=qt,l=z("nested-reply-box"),a=z("single-comment");return n.show_all?(g(),k("div",sSe,[r.loading?(g(),L(i,{key:0,row:5,class:"feed_comments_skeleton"})):(g(),k(Q,{key:1},[le(e.$slots,"before_comments_start"),(g(!0),k(Q,null,Me(n.feed.comments,(c,u)=>(g(),k("div",{class:"each_comment",key:c.id,id:"comment_"+c.id},[b(a,{onCopyLink:s.copyCommentLink,onDeleted:d=>s.handleCommentDelete(u),comment:c},Ps({_:2},[c.parent_id?void 0:{name:"after_comment_text",fn:x(()=>[b(l,{defaultMentions:n.defaultMentions?n.defaultMentions:[],onCopyLink:s.copyCommentLink,checkPermission:n.checkPermission,feed:n.feed,comment:c},null,8,["defaultMentions","onCopyLink","checkPermission","feed","comment"])]),key:"0"}]),1032,["onCopyLink","onDeleted","comment"])],8,iSe))),128))],64))])):r.lastComment?(g(),k("div",lSe,[_("div",aSe,[b(a,{onCopyLink:s.copyCommentLink,onDeleted:t[1]||(t[1]=c=>s.handleCommentDelete(n.feed.comments.length-1)),comment:r.lastComment},Ps({_:2},[r.lastComment.parent_id?void 0:{name:"after_comment_text",fn:x(()=>[b(l,{defaultMentions:n.defaultMentions?n.defaultMentions:[],onCopyLink:s.copyCommentLink,show_reacts_only:!0,checkPermission:n.checkPermission,feed:n.feed,comment:r.lastComment},{after_reply_box_text:x(()=>[r.lastComment.comments&&r.lastComment.comments.length?(g(),k("span",{key:0,onClick:t[0]||(t[0]=c=>e.$emit("forceShowAll")),class:"reply_btn last_comment_reply_txt"},M(e.$_n("%d reply","%d replies",r.lastComment.comments.length)),1)):O("",!0)]),_:1},8,["defaultMentions","onCopyLink","checkPermission","feed","comment"])]),key:"0"}]),1032,["onCopyLink","comment"])]),n.feed.comments_count>1?(g(),k("div",{key:0,onClick:t[2]||(t[2]=c=>e.$emit("forceShowAll")),class:"each_comment show_all_comments"},M(e.$t("View more comments")),1)):O("",!0)])):O("",!0)}const uL=fe(rSe,[["render",cSe]]),uSe={name:"ReactedUsers",components:{UserRouteLink:Md},data(){return{centerDialogVisible:!1,reactions:null,loading:!1}},props:{feed:{type:Object,required:!0,default:()=>({})}},computed:{reactedProfiles(){let e=[],t=null;return this.feed.has_user_react&&(t=this.auth.user_id,e.push({user_id:t,avatar:this.auth.avatar})),this.each(this.feed.reactions,n=>{n.user_id!=t&&n.xprofile&&e.push({user_id:n.user_id,avatar:n.xprofile.avatar})}),e.slice(0,3)}},methods:{getReactions(){this.reactions||(this.loading=!0,this.$get("feeds/"+this.feed.id+"/reactions").then(e=>{this.reactions=e.reactions}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1}))}}},dSe=["title"],fSe={key:0,class:"reactions_avatars"},hSe=["alt","src"],pSe={key:0},mSe={key:1},gSe={class:"fcom_user_lists"},_Se={key:2};function vSe(e,t,n,o,r,s){const i=qt,l=z("UserAvatar"),a=z("UserRouteLink"),c=Vo,u=$o;return g(),L(u,{persistent:!1,placement:"bottom",title:e.$t("Likes"),width:200,trigger:"click",onShow:s.getReactions},{reference:x(()=>[_("div",{title:e.$t("Click to view"),class:"fcom_reactions"},[s.reactedProfiles&&s.reactedProfiles.length?(g(),k("div",fSe,[(g(!0),k(Q,null,Me(s.reactedProfiles,d=>(g(),k("span",{key:d.id,class:"fcom_reaction_avatar fcom_avatar_is_rounded fcom_user_avatar"},[d!=null&&d.avatar?(g(),k("img",{key:0,alt:e.$t("Reacted Users"),src:d.avatar},null,8,hSe)):O("",!0)]))),128))])):O("",!0),_("span",null,M(e.$_n("%s like","%s likes",n.feed.reactions_count)),1)],8,dSe)]),default:x(()=>[r.loading?(g(),k("div",pSe,[b(i,{animated:!0,rows:3})])):r.reactions?(g(),k("div",mSe,[b(c,{"max-height":"300px"},{default:x(()=>[_("ul",gSe,[(g(!0),k(Q,null,Me(r.reactions,d=>(g(),k("li",null,[d.xprofile?(g(),k(Q,{key:0},[b(l,{with_level:!1,xprofile:d.xprofile},null,8,["xprofile"]),b(a,{show_badge:!0,xprofile:d.xprofile},null,8,["xprofile"])],64)):O("",!0)]))),256))])]),_:1})])):(g(),k("div",_Se,[_("p",null,M(e.$t("Failed to load the list")),1)]))]),_:1},8,["title","onShow"])}const ySe=fe(uSe,[["render",vSe]]),bSe={name:"ChatIcon"},wSe={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},kSe=_("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),CSe=_("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),SSe=[kSe,CSe];function $Se(e,t,n,o,r,s){return g(),k("svg",wSe,SSe)}const NC=fe(bSe,[["render",$Se]]);function ESe(){this.__data__=[],this.size=0}var xSe=ESe;function TSe(e,t){return e===t||e!==e&&t!==t}var dL=TSe,MSe=dL;function ASe(e,t){for(var n=e.length;n--;)if(MSe(e[n][0],t))return n;return-1}var v_=ASe,OSe=v_,ISe=Array.prototype,NSe=ISe.splice;function PSe(e){var t=this.__data__,n=OSe(t,e);if(n<0)return!1;var o=t.length-1;return n==o?t.pop():NSe.call(t,n,1),--this.size,!0}var LSe=PSe,RSe=v_;function FSe(e){var t=this.__data__,n=RSe(t,e);return n<0?void 0:t[n][1]}var DSe=FSe,BSe=v_;function VSe(e){return BSe(this.__data__,e)>-1}var zSe=VSe,jSe=v_;function HSe(e,t){var n=this.__data__,o=jSe(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}var USe=HSe,WSe=xSe,qSe=LSe,KSe=DSe,GSe=zSe,YSe=USe;function Ad(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])}}Ad.prototype.clear=WSe;Ad.prototype.delete=qSe;Ad.prototype.get=KSe;Ad.prototype.has=GSe;Ad.prototype.set=YSe;var y_=Ad,JSe=y_;function ZSe(){this.__data__=new JSe,this.size=0}var XSe=ZSe;function QSe(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var e$e=QSe;function t$e(e){return this.__data__.get(e)}var n$e=t$e;function o$e(e){return this.__data__.has(e)}var r$e=o$e,s$e=xd,i$e=s$e(Object,"create"),b_=i$e,o9=b_;function l$e(){this.__data__=o9?o9(null):{},this.size=0}var a$e=l$e;function c$e(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var u$e=c$e,d$e=b_,f$e="__lodash_hash_undefined__",h$e=Object.prototype,p$e=h$e.hasOwnProperty;function m$e(e){var t=this.__data__;if(d$e){var n=t[e];return n===f$e?void 0:n}return p$e.call(t,e)?t[e]:void 0}var g$e=m$e,_$e=b_,v$e=Object.prototype,y$e=v$e.hasOwnProperty;function b$e(e){var t=this.__data__;return _$e?t[e]!==void 0:y$e.call(t,e)}var w$e=b$e,k$e=b_,C$e="__lodash_hash_undefined__";function S$e(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=k$e&&t===void 0?C$e:t,this}var $$e=S$e,E$e=a$e,x$e=u$e,T$e=g$e,M$e=w$e,A$e=$$e;function Od(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])}}Od.prototype.clear=E$e;Od.prototype.delete=x$e;Od.prototype.get=T$e;Od.prototype.has=M$e;Od.prototype.set=A$e;var O$e=Od,r9=O$e,I$e=y_,N$e=AC;function P$e(){this.size=0,this.__data__={hash:new r9,map:new(N$e||I$e),string:new r9}}var L$e=P$e;function R$e(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var F$e=R$e,D$e=F$e;function B$e(e,t){var n=e.__data__;return D$e(t)?n[typeof t=="string"?"string":"hash"]:n.map}var w_=B$e,V$e=w_;function z$e(e){var t=V$e(this,e).delete(e);return this.size-=t?1:0,t}var j$e=z$e,H$e=w_;function U$e(e){return H$e(this,e).get(e)}var W$e=U$e,q$e=w_;function K$e(e){return q$e(this,e).has(e)}var G$e=K$e,Y$e=w_;function J$e(e,t){var n=Y$e(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}var Z$e=J$e,X$e=L$e,Q$e=j$e,e9e=W$e,t9e=G$e,n9e=Z$e;function Id(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])}}Id.prototype.clear=X$e;Id.prototype.delete=Q$e;Id.prototype.get=e9e;Id.prototype.has=t9e;Id.prototype.set=n9e;var PC=Id,o9e=y_,r9e=AC,s9e=PC,i9e=200;function l9e(e,t){var n=this.__data__;if(n instanceof o9e){var o=n.__data__;if(!r9e||o.length<i9e-1)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new s9e(o)}return n.set(e,t),this.size=n.size,this}var a9e=l9e,c9e=y_,u9e=XSe,d9e=e$e,f9e=n$e,h9e=r$e,p9e=a9e;function Nd(e){var t=this.__data__=new c9e(e);this.size=t.size}Nd.prototype.clear=u9e;Nd.prototype.delete=d9e;Nd.prototype.get=f9e;Nd.prototype.has=h9e;Nd.prototype.set=p9e;var fL=Nd,m9e="__lodash_hash_undefined__";function g9e(e){return this.__data__.set(e,m9e),this}var _9e=g9e;function v9e(e){return this.__data__.has(e)}var y9e=v9e,b9e=PC,w9e=_9e,k9e=y9e;function Xg(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new b9e;++t<n;)this.add(e[t])}Xg.prototype.add=Xg.prototype.push=w9e;Xg.prototype.has=k9e;var hL=Xg;function C9e(e,t){for(var n=-1,o=e==null?0:e.length;++n<o;)if(t(e[n],n,e))return!0;return!1}var S9e=C9e;function $9e(e,t){return e.has(t)}var pL=$9e,E9e=hL,x9e=S9e,T9e=pL,M9e=1,A9e=2;function O9e(e,t,n,o,r,s){var i=n&M9e,l=e.length,a=t.length;if(l!=a&&!(i&&a>l))return!1;var c=s.get(e),u=s.get(t);if(c&&u)return c==t&&u==e;var d=-1,f=!0,h=n&A9e?new E9e:void 0;for(s.set(e,t),s.set(t,e);++d<l;){var p=e[d],m=t[d];if(o)var v=i?o(m,p,d,t,e,s):o(p,m,d,e,t,s);if(v!==void 0){if(v)continue;f=!1;break}if(h){if(!x9e(t,function(y,E){if(!T9e(h,E)&&(p===y||r(p,y,n,o,s)))return h.push(E)})){f=!1;break}}else if(!(p===m||r(p,m,n,o,s))){f=!1;break}}return s.delete(e),s.delete(t),f}var mL=O9e,I9e=Ks,N9e=I9e.Uint8Array,P9e=N9e;function L9e(e){var t=-1,n=Array(e.size);return e.forEach(function(o,r){n[++t]=[r,o]}),n}var R9e=L9e;function F9e(e){var t=-1,n=Array(e.size);return e.forEach(function(o){n[++t]=o}),n}var LC=F9e,s9=U0,i9=P9e,D9e=dL,B9e=mL,V9e=R9e,z9e=LC,j9e=1,H9e=2,U9e="[object Boolean]",W9e="[object Date]",q9e="[object Error]",K9e="[object Map]",G9e="[object Number]",Y9e="[object RegExp]",J9e="[object Set]",Z9e="[object String]",X9e="[object Symbol]",Q9e="[object ArrayBuffer]",e7e="[object DataView]",l9=s9?s9.prototype:void 0,ey=l9?l9.valueOf:void 0;function t7e(e,t,n,o,r,s,i){switch(n){case e7e:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Q9e:return!(e.byteLength!=t.byteLength||!s(new i9(e),new i9(t)));case U9e:case W9e:case G9e:return D9e(+e,+t);case q9e:return e.name==t.name&&e.message==t.message;case Y9e:case Z9e:return e==t+"";case K9e:var l=V9e;case J9e:var a=o&j9e;if(l||(l=z9e),e.size!=t.size&&!a)return!1;var c=i.get(e);if(c)return c==t;o|=H9e,i.set(e,t);var u=B9e(l(e),l(t),o,r,s,i);return i.delete(e),u;case X9e:if(ey)return ey.call(e)==ey.call(t)}return!1}var n7e=t7e;function o7e(e,t){for(var n=-1,o=t.length,r=e.length;++n<o;)e[r+n]=t[n];return e}var r7e=o7e,s7e=r7e,i7e=Js;function l7e(e,t,n){var o=t(e);return i7e(e)?o:s7e(o,n(e))}var a7e=l7e;function c7e(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}var u7e=c7e;function d7e(){return[]}var f7e=d7e,h7e=u7e,p7e=f7e,m7e=Object.prototype,g7e=m7e.propertyIsEnumerable,a9=Object.getOwnPropertySymbols,_7e=a9?function(e){return e==null?[]:(e=Object(e),h7e(a9(e),function(t){return g7e.call(e,t)}))}:p7e,v7e=_7e,y7e=a7e,b7e=v7e,w7e=MC;function k7e(e){return y7e(e,w7e,b7e)}var C7e=k7e,c9=C7e,S7e=1,$7e=Object.prototype,E7e=$7e.hasOwnProperty;function x7e(e,t,n,o,r,s){var i=n&S7e,l=c9(e),a=l.length,c=c9(t),u=c.length;if(a!=u&&!i)return!1;for(var d=a;d--;){var f=l[d];if(!(i?f in t:E7e.call(t,f)))return!1}var h=s.get(e),p=s.get(t);if(h&&p)return h==t&&p==e;var m=!0;s.set(e,t),s.set(t,e);for(var v=i;++d<a;){f=l[d];var y=e[f],E=t[f];if(o)var w=i?o(E,y,f,t,e,s):o(y,E,f,e,t,s);if(!(w===void 0?y===E||r(y,E,n,o,s):w)){m=!1;break}v||(v=f=="constructor")}if(m&&!v){var C=e.constructor,T=t.constructor;C!=T&&"constructor"in e&&"constructor"in t&&!(typeof C=="function"&&C instanceof C&&typeof T=="function"&&T instanceof T)&&(m=!1)}return s.delete(e),s.delete(t),m}var T7e=x7e,ty=fL,M7e=mL,A7e=n7e,O7e=T7e,u9=aL,d9=Js,f9=$C,I7e=xC,N7e=1,h9="[object Arguments]",p9="[object Array]",Tm="[object Object]",P7e=Object.prototype,m9=P7e.hasOwnProperty;function L7e(e,t,n,o,r,s){var i=d9(e),l=d9(t),a=i?p9:u9(e),c=l?p9:u9(t);a=a==h9?Tm:a,c=c==h9?Tm:c;var u=a==Tm,d=c==Tm,f=a==c;if(f&&f9(e)){if(!f9(t))return!1;i=!0,u=!1}if(f&&!u)return s||(s=new ty),i||I7e(e)?M7e(e,t,n,o,r,s):A7e(e,t,a,n,o,r,s);if(!(n&N7e)){var h=u&&m9.call(e,"__wrapped__"),p=d&&m9.call(t,"__wrapped__");if(h||p){var m=h?e.value():e,v=p?t.value():t;return s||(s=new ty),r(m,v,n,o,s)}}return f?(s||(s=new ty),O7e(e,t,n,o,r,s)):!1}var R7e=L7e,F7e=R7e,g9=bp;function gL(e,t,n,o,r){return e===t?!0:e==null||t==null||!g9(e)&&!g9(t)?e!==e&&t!==t:F7e(e,t,n,o,gL,r)}var _L=gL,D7e=fL,B7e=_L,V7e=1,z7e=2;function j7e(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],c=e[a],u=l[1];if(i&&l[2]){if(c===void 0&&!(a in e))return!1}else{var d=new D7e;if(o)var f=o(c,u,a,e,t,d);if(!(f===void 0?B7e(u,c,V7e|z7e,o,d):f))return!1}}return!0}var H7e=j7e,U7e=md;function W7e(e){return e===e&&!U7e(e)}var vL=W7e,q7e=vL,K7e=MC;function G7e(e){for(var t=K7e(e),n=t.length;n--;){var o=t[n],r=e[o];t[n]=[o,r,q7e(r)]}return t}var Y7e=G7e;function J7e(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}var yL=J7e,Z7e=H7e,X7e=Y7e,Q7e=yL;function eEe(e){var t=X7e(e);return t.length==1&&t[0][2]?Q7e(t[0][0],t[0][1]):function(n){return n===e||Z7e(n,e,t)}}var tEe=eEe,nEe=Js,oEe=W0,rEe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,sEe=/^\w*$/;function iEe(e,t){if(nEe(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||oEe(e)?!0:sEe.test(e)||!rEe.test(e)||t!=null&&e in Object(t)}var RC=iEe,bL=PC,lEe="Expected a function";function FC(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(lEe);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(FC.Cache||bL),n}FC.Cache=bL;var aEe=FC,cEe=aEe,uEe=500;function dEe(e){var t=cEe(e,function(o){return n.size===uEe&&n.clear(),o}),n=t.cache;return t}var fEe=dEe,hEe=fEe,pEe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,mEe=/\\(\\)?/g,gEe=hEe(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(pEe,function(n,o,r,s){t.push(r?s.replace(mEe,"$1"):o||n)}),t}),_Ee=gEe;function vEe(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 yEe=vEe,_9=U0,bEe=yEe,wEe=Js,kEe=W0,CEe=1/0,v9=_9?_9.prototype:void 0,y9=v9?v9.toString:void 0;function wL(e){if(typeof e=="string")return e;if(wEe(e))return bEe(e,wL)+"";if(kEe(e))return y9?y9.call(e):"";var t=e+"";return t=="0"&&1/e==-CEe?"-0":t}var SEe=wL,$Ee=SEe;function EEe(e){return e==null?"":$Ee(e)}var xEe=EEe,TEe=Js,MEe=RC,AEe=_Ee,OEe=xEe;function IEe(e,t){return TEe(e)?e:MEe(e,t)?[e]:AEe(OEe(e))}var kL=IEe,NEe=W0,PEe=1/0;function LEe(e){if(typeof e=="string"||NEe(e))return e;var t=e+"";return t=="0"&&1/e==-PEe?"-0":t}var k_=LEe,REe=kL,FEe=k_;function DEe(e,t){t=REe(t,e);for(var n=0,o=t.length;e!=null&&n<o;)e=e[FEe(t[n++])];return n&&n==o?e:void 0}var CL=DEe,BEe=CL;function VEe(e,t,n){var o=e==null?void 0:BEe(e,t);return o===void 0?n:o}var zEe=VEe;function jEe(e,t){return e!=null&&t in Object(e)}var HEe=jEe,UEe=kL,WEe=SC,qEe=Js,KEe=QP,GEe=EC,YEe=k_;function JEe(e,t,n){t=UEe(t,e);for(var o=-1,r=t.length,s=!1;++o<r;){var i=YEe(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&&GEe(r)&&KEe(i,r)&&(qEe(e)||WEe(e)))}var ZEe=JEe,XEe=HEe,QEe=ZEe;function exe(e,t){return e!=null&&QEe(e,t,XEe)}var txe=exe,nxe=_L,oxe=zEe,rxe=txe,sxe=RC,ixe=vL,lxe=yL,axe=k_,cxe=1,uxe=2;function dxe(e,t){return sxe(e)&&ixe(t)?lxe(axe(e),t):function(n){var o=oxe(n,e);return o===void 0&&o===t?rxe(n,e):nxe(t,o,cxe|uxe)}}var fxe=dxe;function hxe(e){return function(t){return t==null?void 0:t[e]}}var pxe=hxe,mxe=CL;function gxe(e){return function(t){return mxe(t,e)}}var _xe=gxe,vxe=pxe,yxe=_xe,bxe=RC,wxe=k_;function kxe(e){return bxe(e)?vxe(wxe(e)):yxe(e)}var Cxe=kxe,Sxe=tEe,$xe=fxe,Exe=oL,xxe=Js,Txe=Cxe;function Mxe(e){return typeof e=="function"?e:e==null?Exe:typeof e=="object"?xxe(e)?$xe(e[0],e[1]):Sxe(e):Txe(e)}var Axe=Mxe;function Oxe(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 Ixe=Oxe;function Nxe(e){return e!==e}var Pxe=Nxe;function Lxe(e,t,n){for(var o=n-1,r=e.length;++o<r;)if(e[o]===t)return o;return-1}var Rxe=Lxe,Fxe=Ixe,Dxe=Pxe,Bxe=Rxe;function Vxe(e,t,n){return t===t?Bxe(e,t,n):Fxe(e,Dxe,n)}var zxe=Vxe,jxe=zxe;function Hxe(e,t){var n=e==null?0:e.length;return!!n&&jxe(e,t,0)>-1}var Uxe=Hxe;function Wxe(e,t,n){for(var o=-1,r=e==null?0:e.length;++o<r;)if(n(t,e[o]))return!0;return!1}var qxe=Wxe;function Kxe(){}var Gxe=Kxe,ny=iL,Yxe=Gxe,Jxe=LC,Zxe=1/0,Xxe=ny&&1/Jxe(new ny([,-0]))[1]==Zxe?function(e){return new ny(e)}:Yxe,Qxe=Xxe,eTe=hL,tTe=Uxe,nTe=qxe,oTe=pL,rTe=Qxe,sTe=LC,iTe=200;function lTe(e,t,n){var o=-1,r=tTe,s=e.length,i=!0,l=[],a=l;if(n)i=!1,r=nTe;else if(s>=iTe){var c=t?null:rTe(e);if(c)return sTe(c);i=!1,r=oTe,a=new eTe}else a=t?[]:l;e:for(;++o<s;){var u=e[o],d=t?t(u):u;if(u=n||u!==0?u:0,i&&d===d){for(var f=a.length;f--;)if(a[f]===d)continue e;t&&a.push(d),l.push(u)}else r(a,d,n)||(a!==l&&a.push(d),l.push(u))}return l}var aTe=lTe,cTe=Axe,uTe=aTe;function dTe(e,t){return e&&e.length?uTe(e,cTe(t)):[]}var fTe=dTe;const hTe=jl(fTe),pTe={name:"FeedFooter",components:{ReactedUsers:ySe,FeedComments:uL,FeedTextComposer:Ed,ChatIcon:NC,HeartIcon:IC},props:["feed","is_single","space_slug"],emits:["commented","removeFromBookmark"],data(){return{commenting:!1,comment:{message:"",media_images:[]},saving:!1,show_all_comments:this.is_single,reactions:[],isAutoFocus:!1,showCommentBox:!0,defaultMentions:[],sortBy:"oldest"}},methods:{postComment(){this.saving=!0,this.$post("feeds/"+this.feed.id+"/comments",{comment:this.comment.message,media_images:this.comment.media_images,meta:this.comment.meta}).then(e=>{this.feed.comments||(this.feed.comments=[]),this.feed.comments.push(e.comment),this.$emit("commented",e.comment),this.feed.comments_count=parseInt(this.feed.comments_count)+1,this.comment={message:"",media_images:[]},this.commenting=!1,this.showCommentBox=!1,this.$nextTick(()=>{this.showCommentBox=!0})}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})},showCommentForm(){this.show_all_comments=!0,this.commenting?(this.commenting=!1,setTimeout(()=>{this.commenting=!0,this.isAutoFocus=!0},100)):(this.commenting=!0,this.isAutoFocus=!0),this.prepareDefaultMentions()},showAll(){this.show_all_comments=!this.show_all_comments,this.commenting=!this.commenting,this.isAutoFocus=!1,this.prepareDefaultMentions()},toggleReact(){const e={react_type:"like"};this.feed.has_user_react&&(e.remove=!0),this.feed.has_user_react=!this.feed.has_user_react,this.$post("feeds/"+this.feed.id+"/react",e).then(t=>{this.feed.reactions_count=t.new_count}).catch(t=>{this.$handleError(t),this.feed.has_user_react=!this.feed.has_user_react})},prepareDefaultMentions(){if(!this.auth.user_id||this.defaultMentions.length)return;let e=this.auth.user_id,t=[];this.feed.user_id!=e&&t.push(this.feed.xprofile);let n=this.feed.comments.slice(-30);this.each(n,o=>{o.user_id!=e&&t.push(o.xprofile)}),this.defaultMentions=hTe(t,"user_id")}},mounted(){this.is_single&&this.prepareDefaultMentions()}},mTe={ref:"feed_footer",class:"feed_footer"},gTe={class:"fcom_feed_footer_actions"},_Te={class:"fcom_sr_only"},vTe={class:"fcom_feed_footer_meta"},yTe={key:0},bTe={key:0,class:"fcom_reactions_count feed_reaction_meta"},wTe={key:1,class:"feed_reaction_meta"},kTe={key:2,class:"feed_reaction_meta"},CTe={key:0,ref:"fcom_comment_sorting",style:{margin:"-15px 0 5px"},class:"fcom_comment_sorting"},STe=["id"],$Te={key:0,style:{padding:"0",margin:"0","text-align":"center"}},ETe={key:1,class:"feed_commenting"},xTe={class:"person_avatar"},TTe=["src"],MTe={key:0,class:"feed_comment_input"},ATe={key:2,class:""},OTe={style:{padding:"0",margin:"0","text-align":"center"}},ITe=["href"];function NTe(e,t,n,o,r,s){var y,E,w,C;const i=z("HeartIcon"),l=ve,a=z("ChatIcon"),c=z("ReactedUsers"),u=jo,d=zo,f=z("feed-comments"),h=Ze,p=z("feed-text-composer"),m=z("router-link"),v=Mt("loading");return g(),k(Q,null,[_("div",mTe,[_("div",gTe,[_("ul",null,[_("li",{class:F(["fcom_reaction fcom_reaction_list",{react_active:n.feed.has_user_react}]),onClick:t[0]||(t[0]=T=>s.toggleReact())},[b(l,{class:F({user_reacted:n.feed.has_user_react})},{default:x(()=>[b(i,{filled:n.feed.has_user_react},null,8,["filled"])]),_:1},8,["class"])],2),((y=n.feed.meta)==null?void 0:y.comments_disabled)!=="yes"?(g(),k("li",{key:0,class:"fcom_comment_btn_wrap",onClick:t[1]||(t[1]=T=>s.showCommentForm())},[b(l,null,{default:x(()=>[b(a)]),_:1}),_("span",null,[_("span",_Te,M(e.$t("Comment")),1)])])):O("",!0)])]),_("div",vTe,[n.feed.reactions_count||n.feed.comments_count||((E=n.feed.meta)==null?void 0:E.comments_disabled)==="yes"?(g(),k("ul",yTe,[n.feed.reactions_count?(g(),k("li",bTe,[b(c,{feed:n.feed},null,8,["feed"])])):O("",!0),n.feed.comments_count?(g(),k("li",wTe,[_("div",{class:"feed_comment_count",onClick:t[2]||(t[2]=T=>s.showAll())},M(e.$_n("%d comment","%d comments",n.feed.comments_count)),1)])):((w=n.feed.meta)==null?void 0:w.comments_disabled)==="yes"?(g(),k("li",kTe,M(e.$t("comments disabled")),1)):O("",!0)])):O("",!0)])],512),b(f,{sortBy:r.sortBy,defaultMentions:r.defaultMentions,onForceShowAll:s.showAll,show_all:r.show_all_comments,feed:n.feed},{before_comments_start:x(()=>[n.feed.comments_count>=5?(g(),k("div",CTe,[b(d,{style:{width:"95px","padding-left":"0"},"aria-label":e.$t("Sort comments by"),modelValue:r.sortBy,"onUpdate:modelValue":t[3]||(t[3]=T=>r.sortBy=T),class:"fcom_off_color fcom_minimal_select","popper-class":"plain_select",placeholder:e.$t("Sort by")},{default:x(()=>[b(u,{value:"oldest",label:e.$t("Earliest")},null,8,["label"]),b(u,{value:"latest",label:e.$t("Latest")},null,8,["label"]),b(u,{value:"popular",label:e.$t("Popular")},null,8,["label"]),b(u,{value:"most_replied",label:e.$t("Most Replied")},null,8,["label"])]),_:1},8,["aria-label","modelValue","placeholder"])],512)):O("",!0)]),_:1},8,["sortBy","defaultMentions","onForceShowAll","show_all","feed"]),r.commenting||n.is_single?(g(),k("div",{key:0,id:"feed_comment_form_"+n.feed.id,class:"feed_comment feed_commentbox_main"},[((C=n.feed.meta)==null?void 0:C.comments_disabled)==="yes"?(g(),k(Q,{key:0},[n.feed.comments_count?(g(),k("p",$Te,M(e.$t("Comments are disabled for this post.")),1)):O("",!0)],64)):e.hasCommentPermission(n.feed)?(g(),k("div",ETe,[_("div",xTe,[_("img",{alt:"",src:e.auth.photo},null,8,TTe)]),r.showCommentBox?(g(),k("div",MTe,[b(p,{mentionQuery:{space_id:n.feed.space_id},autofocus_changed:r.commenting,defaultMentions:r.defaultMentions,autofocus:r.isAutoFocus,disabled:r.saving,placeholder:e.$t("Write a comment"),content:r.comment},{default:x(()=>[Ve((g(),L(h,{disabled:r.saving,size:"small",class:"fcom_primary_button",onClick:t[4]||(t[4]=T=>s.postComment())},{default:x(()=>[ne(M(e.$t("Reply")),1)]),_:1},8,["disabled"])),[[v,r.saving]])]),_:1},8,["mentionQuery","autofocus_changed","defaultMentions","autofocus","disabled","placeholder","content"])])):O("",!0)])):(g(),k("div",ATe,[_("p",OTe,[ne(M(e.$t("Please join the community to post a comment."))+" ",1),e.appVars.auth.user_id?(g(),k(Q,{key:0},[n.feed.space?(g(),L(m,{key:0,to:{name:"space_feeds",params:{space:n.feed.space.slug}}},{default:x(()=>[ne(M(e.$t("Go to community")),1)]),_:1},8,["to"])):O("",!0)],64)):(g(),k("a",{key:1,href:e.getCurrentAuthUrl()},M(e.$t("Login / Signup")),9,ITe))])]))],8,STe)):O("",!0)],64)}const PTe=fe(pTe,[["render",NTe]]),LTe={name:"ImageCarousel",props:["feed"],computed:{srcList(){return this.feed.meta.media_items.map(e=>e.url)}}},RTe={class:"fcom_image_carousel"},FTe={class:"fcom_image_carousel__container"},DTe={class:"fcom_carousel__image"};function BTe(e,t,n,o,r,s){const i=Hl;return g(),k("div",RTe,[_("div",FTe,[(g(!0),k(Q,null,Me(n.feed.meta.media_items,(l,a)=>(g(),k("div",DTe,[b(i,{lazy:"",alt:"",src:l.url,"zoom-rate":1.2,"max-scale":7,"min-scale":.5,"preview-teleported":!0,"initial-index":a,"preview-src-list":s.srcList,fit:"cover"},null,8,["src","initial-index","preview-src-list"])]))),256))])])}const VTe=fe(LTe,[["render",BTe]]),zTe={name:"SingleLineTextarea",props:{modelValue:{type:String,default:""},placeholder:{type:String,default:""},maxlength:{type:Number,default:500}},emits:["update:modelValue","enter"],methods:{onInput(e){const t=e.target.value.replace(/\n/g,"");this.$emit("update:modelValue",t),this.$nextTick(this.adjustTextareaHeight)},adjustTextareaHeight(){const e=this.$refs.textarea;e.style.height="auto",e.style.height=e.scrollHeight+"px"}},mounted(){this.adjustTextareaHeight()},watch:{modelValue(){this.$nextTick(this.adjustTextareaHeight)}}},jTe=["value","maxlength","placeholder"];function HTe(e,t,n,o,r,s){return g(),k("textarea",{value:n.modelValue,onInput:t[0]||(t[0]=(...i)=>s.onInput&&s.onInput(...i)),onKeydown:t[1]||(t[1]=rn(Ge(i=>e.$emit("enter"),["prevent"]),["enter"])),ref:"textarea",maxlength:n.maxlength,class:"fcom_status_title_input",rows:"1",placeholder:n.placeholder},null,40,jTe)}const SL=fe(zTe,[["render",HTe]]),UTe={name:"EditFeed",components:{SingleLineTextarea:SL,FeedTextComposer:Ed},data(){return{loading:!1,saving:!1,localDialogVisible:this.dialogVisible,feed:{},autofocus_changed:!1,hasPostTitle:this.hasFeature("has_post_title")}},props:{dialogVisible:{type:Boolean,required:!0},feedSlug:{type:String,required:!0}},methods:{getFeed(){this.loading=!0,this.$get("feeds/"+this.feedSlug+"/by-slug",{context:"edit"}).then(e=>{var t,n;this.feed=e.feed,(n=(t=e.feed)==null?void 0:t.meta)!=null&&n.survey_config&&(this.feed.survey=e.feed.meta.survey_config)}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})},changeAutoFocus(){this.feed.title=this.feed.title.replace(/\n/g,""),this.autofocus_changed=!1,setTimeout(()=>{this.autofocus_changed=!0},100)},handleUpdateFeed(){this.saving=!0,this.$post(`feeds/${this.feed.id}`,{...this.feed,space:this.space?this.space.slug:null}).then(e=>{this.$emit("updated",e.feed),this.handleClose()}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})},handleClose(){this.localDialogVisible=!1,this.$emit("close")}},mounted(){this.getFeed()}},WTe={class:"fcom_feed_edit"},qTe={class:"fcom_feed_edit_dialog_header"},KTe={class:"fcom_feed_edit_dialog_body"};function GTe(e,t,n,o,r,s){const i=Ze,l=z("SingleLineTextarea"),a=z("feed-text-composer"),c=vp,u=Mt("loading");return g(),k("div",WTe,[b(c,{class:"fcom_feed_edit_dialog",modelValue:r.localDialogVisible,"onUpdate:modelValue":t[2]||(t[2]=d=>r.localDialogVisible=d),width:e.dialogWidth,"append-to-body":!0,overflow:"","before-close":()=>{},"show-close":!1},{default:x(()=>[Ve((g(),k("div",null,[_("div",qTe,[_("span",null,M(e.$t("Edit Feed")),1),b(i,{class:"cross_btn",circle:"",onClick:s.handleClose},{default:x(()=>[ne("X")]),_:1},8,["onClick"])]),_("div",KTe,[r.feed.id?(g(),L(a,{key:0,multipleMedia:!0,surveyApp:!0,autofocus_changed:r.autofocus_changed,mentionQuery:{space:r.feed.space},autofocus:!0,content:r.feed},{before_input:x(()=>[r.hasPostTitle?(g(),L(l,{key:0,style:{"margin-top":"20px"},maxlength:120,autofocus:!0,modelValue:r.feed.title,"onUpdate:modelValue":t[0]||(t[0]=d=>r.feed.title=d),onEnter:t[1]||(t[1]=d=>s.changeAutoFocus()),placeholder:r.hasPostTitle=="required"?e.$t("Title"):e.$t("Title (optional)")},null,8,["modelValue","placeholder"])):O("",!0)]),default:x(()=>[b(i,{class:"fcom_primary_button",onClick:s.handleUpdateFeed},{default:x(()=>[ne(M(e.$t("Update")),1)]),_:1},8,["onClick"])]),_:1},8,["autofocus_changed","mentionQuery","content"])):O("",!0)])])),[[u,r.loading]])]),_:1},8,["modelValue","width"])])}const YTe=fe(UTe,[["render",GTe]]),JTe={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=gl(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=gl(this.xprofile.total_points),t=gl(e.max_points+1);return e.level!==t.level},getOutlineStyle(){if(!this.withCompletion)return{};const e=gl(this.xprofile.total_points),t=gl(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"}}},ZTe=["src"],XTe={key:1,class:"fcom_no_image"},QTe={key:0,role:"region","aria-label":"User Level",class:"fcom_user_level_mark"};function eMe(e,t,n,o,r,s){return g(),k("div",{class:F([{fcom_avatar_is_rounded:n.is_rounded,is_member_online:n.is_online},"fcom_user_avatar"])},[_("span",{style:Be(s.getOutlineStyle),class:F({fcom_compilation_avatar:s.withCompletion})},[n.xprofile?(g(),k("img",{key:0,onError:t[0]||(t[0]=(...i)=>s.setAltImg&&s.setAltImg(...i)),src:n.xprofile.avatar,alt:""},null,40,ZTe)):(g(),k("span",XTe))],6),s.level||n.is_online?(g(),k("div",QTe,[_("span",null,M(s.level),1)])):O("",!0)],2)}const $L=fe(JTe,[["render",eMe]]),tMe={name:"SurveyVoters",props:["feed","option","options","totalCount"],components:{UserRouteLink:Md,UserAvatar:$L},data(){return{voters:[],loading:!1,showVotersDialog:!0}},watch:{option(){this.loadVoters()}},computed:{getVotePercentage(){return this.option.vote_counts?Math.floor(this.option.vote_counts/this.totalCount*100)+"%":"0%"}},methods:{switchOption(e){this.$emit("updateOption",e)},closeDialog(){this.showVotersDialog=!1,this.$emit("close")},loadVoters(){var e;this.loading=!0,this.$get(`feeds/${this.feed.id}/apps/survey-voters/${(e=this.option)==null?void 0:e.slug}`).then(t=>{this.voters=t.voters}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})}},mounted(){this.loadVoters()}},nMe={class:"dialog_header"},oMe={class:"fcom_filter_menu"},rMe={class:"fcom_filter_menu_ul"},sMe=["onClick"],iMe={key:1},lMe={class:"feed_meta_info survey_voters_meta"},aMe={class:"meta_line"},cMe={class:"meta_line"},uMe={class:"voters_list"},dMe={class:"voter_avatar"},fMe={class:"voter_info"},hMe={class:"voter_time"},pMe={key:2,class:"not_found"};function mMe(e,t,n,o,r,s){const i=qt,l=z("UserAvatar"),a=z("UserRouteLink"),c=Vo,u=vp;return g(),L(u,{modelValue:r.showVotersDialog,"onUpdate:modelValue":t[0]||(t[0]=d=>r.showVotersDialog=d),"modal-class":"fcom_common_dialog menu_dialog","close-on-click-modal":!1,"append-to-body":!0,width:"40%",direction:"rtl",onClose:s.closeDialog},{header:x(({close:d})=>[_("div",nMe,[_("div",oMe,[_("ul",rMe,[(g(!0),k(Q,null,Me(n.options,f=>(g(),k("li",{key:f.slug},[_("a",{onClick:Ge(h=>s.switchOption(f.slug),["prevent"]),class:F({"router-link-exact-active":n.option.slug==f.slug}),href:"#"},M(f.label),11,sMe)]))),128))])])])]),default:x(()=>[r.loading?(g(),L(i,{key:0,animated:"",rows:4})):r.voters.length?(g(),k("div",iMe,[_("div",lMe,[_("span",aMe,M(s.getVotePercentage),1),_("span",cMe,M(e.$_n("%s Vote","%s Votes",n.option.vote_counts)),1)]),b(c,{"max-height":"800px"},{default:x(()=>[_("div",uMe,[(g(!0),k(Q,null,Me(r.voters,d=>(g(),k("div",{key:d.id,class:"voter_item"},[d.xprofile?(g(),k(Q,{key:0},[_("div",dMe,[b(l,{with_level:!1,xprofile:d.xprofile},null,8,["xprofile"])]),_("div",fMe,[b(a,{show_badge:!0,xprofile:d.xprofile},null,8,["xprofile"]),_("div",hMe,M(e.$t("Joined %s",e.humanDateDiff(d.xprofile.created_at))),1)])],64)):O("",!0)]))),128))])]),_:1})])):(g(),k("div",pMe,[_("p",null,M(e.$t("No voters yet")),1)]))]),_:1},8,["modelValue","onClose"])}const gMe=fe(tMe,[["render",mMe]]),_Me={name:"SurveyRenderer",props:["feed"],components:{SurveyVoters:gMe},data(){var e,t;return{inputType:(t=(e=this.feed.meta)==null?void 0:e.survey_config)==null?void 0:t.type,formattedOptions:[],working:!1,totalCount:0,showVotersDialog:!1,selectedOption:null}},methods:{getVoteStyle(e){const t=e/this.totalCount*100,n={width:t+"%"};return t>0&&t<100&&(n["border-top-right-radius"]=0,n["border-bottom-right-radius"]=0),n},showVoters(e){this.selectedOption=e,this.showVotersDialog=!0},updateOption(e){this.selectedOption=this.formattedOptions.find(t=>t.slug===e)},toggoleVote(e){if(this.showVotersDialog)return;let t=this.formattedOptions[e].voted;this.inputType=="single_choice"&&this.each(this.formattedOptions,n=>{n.voted=!1}),this.formattedOptions[e].voted=!t,this.syncVotes()},syncVotes(){let e=[];this.each(this.formattedOptions,t=>{t.voted&&e.push(t.slug)}),this.working=!0,this.$post(`feeds/${this.feed.id}/apps/survey-vote`,{vote_indexes:e}).then(t=>{this.feed.meta.survey_config=t.survey_config,this.setupData()}).catch(t=>{this.$handleError(t)}).finally(()=>{this.working=!1})},setupData(){let e=[],t=0;this.each(this.feed.meta.survey_config.options,n=>{e.push(n),n.vote_counts&&(t+=parseInt(n.vote_counts))}),this.formattedOptions=e,this.totalCount=t}},watch:{"feed.meta.survey_config":{handler(e,t){JSON.stringify(e)!==JSON.stringify(t)&&(this.inputType=t.type,this.setupData())},deep:!0}},mounted(){this.setupData()}},vMe={class:"fcom_app_render"},yMe={class:"fcom_app_options"},bMe=["onClick"],wMe={class:"fcom_app_text"},kMe={class:"fcom_app_input_wrap"},CMe={key:0,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6 6"},SMe=_("circle",{cx:"3",cy:"3",r:"2.5",fill:"currentColor"},null,-1),$Me=[SMe],EMe={key:1,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 8 8"},xMe=_("path",{fill:"currentColor",d:"M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z"},null,-1),TMe=[xMe],MMe=["onClick"],AMe={key:0};function OMe(e,t,n,o,r,s){const i=z("ArrowRight"),l=ve,a=z("SurveyVoters");return g(),k(Q,null,[_("div",vMe,[_("div",yMe,[(g(!0),k(Q,null,Me(r.formattedOptions,(c,u)=>(g(),k("div",{key:c.slug,onClick:d=>s.toggoleVote(u),class:F([c.voted?"fcom_is_voted":"","fcom_app_option"])},[_("div",wMe,[_("span",kMe,[_("span",{class:F("fcom_input_"+r.inputType)},[r.inputType=="single_choice"?(g(),k("svg",CMe,$Me)):(g(),k("svg",EMe,TMe))],2)]),_("span",null,M(c.label),1)]),_("div",{class:"fcom_app_counts",onClick:d=>s.showVoters(c)},[ne(M(c.vote_counts?Math.floor(c.vote_counts/r.totalCount*100)+"%":"")+" ",1),c.vote_counts?(g(),k("span",AMe,"("+M(c.vote_counts)+")",1)):O("",!0),c.vote_counts?(g(),L(l,{key:1},{default:x(()=>[b(i)]),_:1})):O("",!0)],8,MMe),r.totalCount?(g(),k("span",{key:0,style:Be(s.getVoteStyle(c.vote_counts)),class:"fc_app_shadow"},null,4)):O("",!0)],10,bMe))),128))])]),r.showVotersDialog?(g(),L(a,{key:0,feed:n.feed,option:r.selectedOption,options:r.formattedOptions,totalCount:r.totalCount,onUpdateOption:s.updateOption,onClose:t[0]||(t[0]=c=>r.showVotersDialog=!1)},null,8,["feed","option","options","totalCount","onUpdateOption"])):O("",!0)],64)}const IMe=fe(_Me,[["render",OMe]]),NMe={name:"BookmarkIcon",props:["is_active"]},PMe={key:0,style:{color:"#1d9bf0"},class:"bookmark_icon_active",width:"16",height:"20",viewBox:"0 0 16 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},LMe=_("path",{d:"M1.33331 14.9839V8.08944C1.33331 5.06164 1.33331 3.54774 2.30962 2.60712C3.28593 1.6665 4.85728 1.6665 7.99998 1.6665C11.1427 1.6665 12.714 1.6665 13.6903 2.60712C14.6666 3.54774 14.6666 5.06164 14.6666 8.08944V14.9839C14.6666 16.9054 14.6666 17.8662 14.0226 18.2101C12.7754 18.876 10.436 16.6542 9.32498 15.9852C8.68064 15.5972 8.35847 15.4032 7.99998 15.4032C7.64148 15.4032 7.31932 15.5972 6.67498 15.9852C5.56398 16.6542 3.22454 18.876 1.97735 18.2101C1.33331 17.8662 1.33331 16.9054 1.33331 14.9839Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),RMe=[LMe],FMe={key:1,width:"16",height:"20",viewBox:"0 0 16 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},DMe=_("path",{d:"M1.33331 14.9839V8.08944C1.33331 5.06164 1.33331 3.54774 2.30962 2.60712C3.28593 1.6665 4.85728 1.6665 7.99998 1.6665C11.1427 1.6665 12.714 1.6665 13.6903 2.60712C14.6666 3.54774 14.6666 5.06164 14.6666 8.08944V14.9839C14.6666 16.9054 14.6666 17.8662 14.0226 18.2101C12.7754 18.876 10.436 16.6542 9.32498 15.9852C8.68064 15.5972 8.35847 15.4032 7.99998 15.4032C7.64148 15.4032 7.31932 15.5972 6.67498 15.9852C5.56398 16.6542 3.22454 18.876 1.97735 18.2101C1.33331 17.8662 1.33331 16.9054 1.33331 14.9839Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),BMe=[DMe];function VMe(e,t,n,o,r,s){return n.is_active?(g(),k("svg",PMe,RMe)):(g(),k("svg",FMe,BMe))}const EL=fe(NMe,[["render",VMe]]),zMe={name:"CustomAppMeta",props:{feed:{type:Object,required:!0}},mounted(){}},jMe={ref:"fcom_custom_app"},HMe=["innerHTML"];function UMe(e,t,n,o,r,s){return g(),k("div",jMe,[_("div",{innerHTML:n.feed.meta.custom_app_preview.custom_html},null,8,HMe)],512)}const WMe=fe(zMe,[["render",UMe]]),qMe={name:"Feed",components:{CustomAppMeta:WMe,BookmarkIcon:EL,UserRouteLink:Md,EditFeed:YTe,FeedFooter:PTe,MediaPreview:gd,ImageCarousel:VTe,SurveyRenderer:IMe},emits:["updated","deleted","reload"],props:{feed:{type:Object,required:!0},is_single:{type:Boolean,default:!1},show_footer:{type:Boolean,default:!0}},data(){return{in_space:this.$route.params.space,working:!1,isEdit:!1,hasOverflowContent:!1,isExpanded:!1}},computed:{space_slug(){let e=!1;return this.feed.space?e=this.feed.space.slug:this.$route.params.space&&(e=this.$route.params.space),e},feedClasses(){let e=[];return e.push("feed_type_"+this.feed.type),this.feed.type=="article"&&e.push(this.feed.featured_image?"feed_has_image":"feed_no_image"),this.is_single?e.push("feed_single"):e.push("feed_list_item"),this.hasTopMedia&&e.push("feed_modern_layout"),e},feedRoute(){let e={name:"single_feed",params:{feed_slug:this.feed.slug}};return this.space_slug&&(e={name:"space_feed",params:{feed_slug:this.feed.slug,space:this.space_slug}}),e},hasTopMedia(){var t,n,o,r;if(this.appVars.features.post_layout!="modern")return!1;let e=((n=(t=this.feed.meta)==null?void 0:t.media_preview)==null?void 0:n.type)=="oembed";return e||(e=(r=(o=this.feed.meta)==null?void 0:o.media_preview)==null?void 0:r.is_uploaded),e}},methods:{deleteItem(){this.$refs.popover.hide(),this.$confirm(this.$t("Are you sure you want to delete this feed?"),this.$t("Warning"),{confirmButtonText:this.$t("Delete"),cancelButtonText:this.$t("Cancel"),type:"warning"}).then(()=>{this.working=!0,this.$del("feeds/"+this.feed.id).then(e=>{this.$emit("deleted"),(this.$route.name==="space_feed"||this.$route.name=="single_feed")&&this.$router.push({name:"all_feeds"})}).catch(e=>{this.$handleError(e)}).finally(()=>{this.working=!1})})},getSpaceRoute(e){return{name:"space_feeds",params:{space:e}}},getFeedContent(){return this.feed.title},goToFeedView(){if(!this.is_single){if(window.__showing_feed=this.feed,this.feed.type=="topic"){this.$router.push({name:"topic",params:{slug:this.feed.slug}});return}this.space_slug?this.$router.push({name:"space_feed",params:{feed_slug:this.feed.slug,space:this.space_slug}}):this.$router.push({name:this.feed.status==="draft"?"edit_article":"single_feed",params:{feed_slug:this.feed.slug}})}},removePreview(){this.working=!0,this.$del("feeds/"+this.feed.id+"/media-preview").then(e=>{this.feed.meta.media_preview=null}).catch(e=>{this.$handleError(e)}).finally(()=>{this.working=!1})},parseMessage(e){if(!e)return"";const t=this.$route.params.space?`${this.appVars.urls.portal_base}space/${this.$route.params.space}/home`:this.appVars.urls.global_search;return e.replace(/<a\s(?:(?!target="_blank")[^>])*>|<[^>]+>|#([a-zA-Z0-9_-]+)/gi,(n,o,r,s)=>n.startsWith("<a")&&!n.includes('target="_blank"')?n.includes(window.location.origin)?n:n.replace("<a",'<a target="_blank" rel="noopener noreferrer nofollow"'):o&&!this.isInsideHtmlTag(s,r)?`<a onclick="window.FluentCommunityUtil.handleSearchClick(event)" href="${t}?search=%23${o}">#${o}</a>`:n)},isInsideHtmlTag(e,t){let n=!1;for(let o=0;o<t;o++)e[o]==="<"&&(n=!0),e[o]===">"&&(n=!1);return n},editItem(){this.$refs.popover.hide(),this.isEdit=!0},handleUpdate(e){this.$emit("updated",e),this.$router.push(this.feedRoute),setTimeout(()=>{document.location.reload()})},handleRemoveBookmark(){this.$emit("deleted")},toggleBookmark(){const e={react_type:"bookmark"};this.feed.bookmarked&&(e.remove=!0),this.feed.bookmarked=!this.feed.bookmarked,this.$post("feeds/"+this.feed.id+"/react",e).then(t=>{this.$notify.success(this.feed.bookmarked?this.$t("Bookmarked"):this.$t("Removed from bookmark")),!this.feed.bookmarked&&this.$route.name==="bookmarks"&&this.$emit("removeFromBookmark")}).catch(t=>{this.$handleError(t),this.feed.bookmarked=!this.feed.bookmarked})},toggleCommentStatus(){var t;let e=((t=this.feed.meta)==null?void 0:t.comments_disabled)=="yes";this.$refs.popover.hide(),this.$patch("feeds/"+this.feed.id,{comments_disabled:e?0:1}).then(n=>{var r;let o=((r=n.feed.meta)==null?void 0:r.comments_disabled)=="yes";this.$notify.success(o?this.$t("Comments has been disabled"):this.$t("Comments has been enabled")),this.feed.meta.comments_disabled=n.feed.meta.comments_disabled}).catch(n=>{this.$handleError(n)})},copyFeedLink(){const e=this.$router.resolve(this.feedRoute);let t=this.appVars.urls.portal_base;t=t.replace(/\/$/,"");let n=t+e.fullPath;navigator.clipboard.writeText(n).then(()=>{this.$notify.success(this.$t("Link copied to clipboard")),this.$refs.popover.hide()}).catch(o=>{this.$notify.error(this.$t("Failed to copy"))})},toggleSticky(){!this.feed.space_id||!this.isAdmin()||(this.feed.is_sticky=!this.feed.is_sticky,this.$refs.popover.hide(),this.$patch("feeds/"+this.feed.id,{is_sticky:this.feed.is_sticky?1:0}).then(e=>{this.feed.is_sticky=e.feed.is_sticky,this.$emit("reload")}).catch(e=>{this.$handleError(e)}))},toggleSidebarPin(){!this.feed.space_id||!this.isAdmin()||(this.feed.priority=!this.feed.priority,this.$refs.popover.hide(),this.$patch("feeds/"+this.feed.id,{priority:this.feed.priority?1:0}).then(e=>{this.$notify.success(e.feed.priority?this.$t("Pinned to sidebar"):this.$t("Unpinned from sidebar")),this.feed.priority=e.feed.priority,this.$eventBus.emit("updateSpaceSidebar",this.feed.space_id)}).catch(e=>{this.$handleError(e)}))}},mounted(){if(document.dispatchEvent(new CustomEvent("fcomFeedMounted",{detail:{isSingle:this.is_single,feed:this.feed,feedBody:this.$refs.feed_body}})),this.is_single||this.feed.is_sticky||this.feed.priority){this.isExpanded=!0;return}let e=this.$refs.feed_body;if(!e)return;e.scrollHeight>400&&(this.hasOverflowContent=!0)}},KMe=["id"],GMe={key:0,class:"fcom_top_media"},YMe={class:"feed_header"},JMe={key:0,class:"feed_user"},ZMe={class:"feed_user_name"},XMe={class:"feed_meta_info"},QMe={key:0,class:"meta_line"},eAe={key:1},tAe={class:"feed_actions fcom_concat_buttons"},nAe=_("svg",{viewBox:"0 0 24 24","aria-hidden":"true",class:"r-4qtqp9 r-yyyyoo r-dnmrzs r-bnwqim r-lrvibr r-m6rgpd r-14j79pv r-10ptun7 r-1janqcz"},[_("g",null,[_("path",{d:"M7 4.5C7 3.12 8.12 2 9.5 2h5C15.88 2 17 3.12 17 4.5v5.26L20.12 16H13v5l-1 2-1-2v-5H3.88L7 9.76V4.5z"})])],-1),oAe={class:"actions_items"},rAe={key:0},sAe={key:1},iAe={key:0},lAe={key:1},aAe={key:0},cAe={key:1},uAe={key:0,class:"feed_title"},dAe={key:0,class:"feed_title_heading"},fAe={key:1,class:"feed_title_heading"},hAe=["innerHTML"];function pAe(e,t,n,o,r,s){const i=z("media-preview"),l=z("UserAvatar"),a=z("UserRouteLink"),c=z("router-link"),u=ve,d=Ze,f=z("BookmarkIcon"),h=z("MoreFilled"),p=$o,m=z("SurveyRenderer"),v=z("ImageCarousel"),y=z("CustomAppMeta"),E=z("feed-footer"),w=z("edit-feed"),C=Mt("loading");return Ve((g(),k("div",{id:"feed_id_"+n.feed.id,class:F([s.feedClasses,"feed"])},[s.hasTopMedia?(g(),k("div",GMe,[n.feed.meta&&n.feed.meta.media_preview?(g(),L(i,{key:0,feed:n.feed},null,8,["feed"])):O("",!0)])):O("",!0),_("div",YMe,[n.feed.xprofile?(g(),k("div",JMe,[b(l,{with_level:!1,xprofile:n.feed.xprofile},null,8,["xprofile"]),_("div",null,[_("div",ZMe,[b(a,{show_badge:!0,xprofile:n.feed.xprofile},null,8,["xprofile"])]),_("div",XMe,[n.feed.content_type=="survey"?(g(),k("span",QMe,M(e.$t("created a poll")),1)):O("",!0),b(c,{to:s.feedRoute,class:"feed_timestamp"},{default:x(()=>[ne(M(e.humanDateDiff(n.feed.created_at)),1)]),_:1},8,["to"]),!r.in_space&&n.feed.space?(g(),k("span",eAe,[b(c,{to:s.getSpaceRoute(n.feed.space.slug),class:"feed_timestamp"},{default:x(()=>[ne(M(e.$t("Posted in %s",e.getExcerpt(n.feed.space.title,30))),1)]),_:1},8,["to"])])):O("",!0)])])])):O("",!0),_("div",tAe,[n.feed.is_sticky&&r.in_space?(g(),L(d,{key:0,"aria-label":e.$t("Toggle Sticky"),class:"no_pad_btn",onClick:t[0]||(t[0]=T=>s.toggleSticky()),text:"",size:"small"},{default:x(()=>[b(u,{class:"fcom_sticky"},{default:x(()=>[nAe]),_:1})]),_:1},8,["aria-label"])):O("",!0),e.auth.user_id?(g(),L(d,{key:1,"aria-label":e.$t("Toggle Bookmark"),size:"small",text:"",onClick:t[1]||(t[1]=T=>s.toggleBookmark()),class:F([{bookmark_active:n.feed.bookmarked},"feed_bookmark no_pad_btn"]),title:n.feed.bookmarked?e.$t("Remove From Bookmark"):e.$t("Bookmark this post")},{default:x(()=>[b(u,{style:{"font-size":"14px"}},{default:x(()=>[b(f,{is_active:n.feed.bookmarked},null,8,["is_active"])]),_:1})]),_:1},8,["aria-label","class","title"])):O("",!0),b(p,{persistent:!1,ref:"popover",placement:"bottom",width:200,trigger:"click"},{reference:x(()=>[b(d,{"aria-label":e.$t("View Post actions"),class:"fcom_dot_menu",size:"small",text:""},{default:x(()=>[b(u,null,{default:x(()=>[b(h)]),_:1})]),_:1},8,["aria-label"])]),default:x(()=>{var T,$;return[_("ul",oAe,[_("li",{onClick:t[2]||(t[2]=A=>s.copyFeedLink())},M(e.$t("Copy Link")),1),e.canEditFeed(n.feed)?(g(),k(Q,{key:0},[_("li",{onClick:t[3]||(t[3]=A=>s.editItem())},M(e.$t("Edit")),1),n.feed.space&&e.isAdmin()?(g(),k(Q,{key:0},[_("li",{onClick:t[4]||(t[4]=A=>s.toggleSticky())},[n.feed.is_sticky?(g(),k("span",rAe,M(e.$t("Unpin from Top")),1)):(g(),k("span",sAe,M(e.$t("Pin to Top")),1))]),_("li",{onClick:t[5]||(t[5]=A=>s.toggleSidebarPin())},[n.feed.priority?(g(),k("span",lAe,M(e.$t("Unpin from sidebar")),1)):(g(),k("span",iAe,M(e.$t("Pin to sidebar")),1))])],64)):O("",!0),(T=n.feed.meta)!=null&&T.media_preview?(g(),k("li",{key:1,onClick:t[6]||(t[6]=A=>s.removePreview())},M(e.$t("Remove Preview")),1)):O("",!0),_("li",{onClick:t[7]||(t[7]=A=>s.toggleCommentStatus())},[(($=n.feed.meta)==null?void 0:$.comments_disabled)=="yes"?(g(),k("span",aAe,M(e.$t("Enable Comments")),1)):(g(),k("span",cAe,M(e.$t("Disable Comments")),1))])],64)):O("",!0),e.canDeleteFeed(n.feed)?(g(),k("li",{key:1,onClick:t[8]||(t[8]=A=>s.deleteItem())},M(e.$t("Delete")),1)):O("",!0)])]}),_:1},512)])]),_("div",{ref:"feed_body",class:F([{feed_is_overflow_content:r.hasOverflowContent},"feed_body"])},[n.feed.title?(g(),k("div",uAe,[n.is_single?(g(),k("h2",fAe,M(n.feed.title),1)):(g(),k("h2",dAe,[b(c,{to:s.feedRoute},{default:x(()=>[ne(M(n.feed.title),1)]),_:1},8,["to"])]))])):O("",!0),_("div",{class:"feed_texts feed_md_content",innerHTML:s.parseMessage(n.feed.message_rendered)},null,8,hAe),r.hasOverflowContent&&!r.isExpanded?(g(),k("div",{key:1,onClick:t[9]||(t[9]=T=>{r.hasOverflowContent=!1,r.isExpanded=!0}),class:"expand-button"},M(e.$t("Show More")),1)):O("",!0)],2),n.feed.content_type=="survey"?(g(),L(m,{key:1,feed:n.feed},null,8,["feed"])):n.feed.meta?(g(),k(Q,{key:2},[n.feed.meta.media_items?(g(),L(v,{key:0,feed:n.feed},null,8,["feed"])):!s.hasTopMedia&&n.feed.meta.media_preview?(g(),L(i,{key:1,feed:n.feed},null,8,["feed"])):O("",!0),n.feed.meta.custom_app_preview?(g(),L(y,{key:2,feed:n.feed},null,8,["feed"])):O("",!0)],64)):O("",!0),n.show_footer?(g(),L(E,{key:3,onRemoveFromBookmark:s.handleRemoveBookmark,space_slug:s.space_slug,is_single:n.is_single,feed:n.feed},null,8,["onRemoveFromBookmark","space_slug","is_single","feed"])):O("",!0),r.isEdit?(g(),L(w,{key:4,feedSlug:n.feed.slug,dialogVisible:r.isEdit,onUpdated:s.handleUpdate,onClose:t[10]||(t[10]=T=>r.isEdit=!1)},null,8,["feedSlug","dialogVisible","onUpdated"])):O("",!0)],10,KMe)),[[C,r.working]])}const xL=fe(qMe,[["render",pAe]]),mAe={name:"SpaceIcon",props:["space_profile"]},gAe=["alt","src"],_Ae={key:1,class:"fcom_emoji"},vAe={key:2,class:"fcom_shape"},yAe={key:3,class:"fcom_no_avatar"};function bAe(e,t,n,o,r,s){var l,a,c,u;const i=ve;return n.space_profile.logo?(g(),k("img",{key:0,alt:e.$t("Space Logo"),src:n.space_profile.logo},null,8,gAe)):(l=n.space_profile.settings)!=null&&l.emoji?(g(),k("span",_Ae,M((a=n.space_profile.settings)==null?void 0:a.emoji),1)):(c=n.space_profile.settings)!=null&&c.shape_svg?(g(),k("span",vAe,[b(i,{innerHTML:(u=n.space_profile.settings)==null?void 0:u.shape_svg},null,8,["innerHTML"])])):(g(),k("span",yAe))}const DC=fe(mAe,[["render",bAe]]),wAe={name:"CreateStatusForm",components:{SpaceIcon:DC,FeedTextComposer:Ed,SingleLineTextarea:SL},data(){return{feed:{title:"",type:"text",message:"",media_image:"",topic_ids:[]},isAutoFocus:!1,state:"idle",posting:!1,doingOembed:!1,oembed:null,postableSpaces:[],autofocus_changed:!1,globalDisabled:this.appVars.features.disable_global_posts,hasPostTitle:this.hasFeature("has_post_title")}},computed:{canPost(){var e,t;return this.space?(t=(e=this.appVars.auth.spaces[this.space])==null?void 0:e.permissions)==null?void 0:t.can_create_post:this.appVars.auth.user_id},currentPlaceHolder(){return this.state=="active"?this.$t("Write something here..."):this.$t("What's happening, %s",this.auth.first_name)},currentTopics(){var n;let e=this.space;e||(e=this.feed.space);let t=((n=this.appVars.auth.spaces[e])==null?void 0:n.topics)||[];return this.isModerator(e)?t:t.filter(o=>o.admin_only!="yes")}},props:["space"],emits:["added"],methods:{changeAutoFocus(){this.feed.title=this.feed.title.replace(/\n/g,""),this.autofocus_changed=!1,setTimeout(()=>{this.autofocus_changed=!0},100)},makeActive(){this.prepareData(),this.state="active"},post(){if(this.state!="active")return;const e=this.feed;if(this.space&&(e.space=this.space),!e.space){this.$refs.fcom_posting_space.classList.add("fcon_shake"),setTimeout(()=>{this.$refs.fcom_posting_space.classList.remove("fcon_shake")},500),this.$notify({title:this.$t("Error"),message:this.$t("Please select a space to post in."),type:"error"});return}e.space!="__self__post__"&&new RegExp("(?<!\\S)@everyone(?!\\S)").test(e.message)&&this.isCommunityModerator()?this.$confirm(this.$t("Are you sure you want to mention everyone? An automatted email will be sent to all the members of the space after 5 minutes for this post"),this.$t("Mentioning everyone?"),{confirmButtonText:this.$t("Yes"),cancelButtonText:this.$t("No"),type:"warning"}).then(()=>{this.postStatus(e)}).catch(()=>{this.state="active",this.$notify({title:this.$t("Cancelled"),message:this.$t("You have cancelled the action."),type:"info"})}):this.postStatus(e)},postStatus(e){this.posting=!0,this.$post("feeds",e).then(t=>{this.$emit("added",t.feed),this.feed={type:"text",message:"",media_image:"",topic_ids:[]},this.state="idle",this.appVars.last_feed_id<t.feed.id&&(this.appVars.last_feed_id=t.feed.id);let n=this.$getLocalData("tickerData",{});n&&(n.lastTimeStamp=new Date().getTime(),n.new_items_count=0,n.last_feed_id=t.feed.id,this.$storeLocalData("tickerData",n))}).catch(t=>{this.$handleError(t)}).finally(()=>{this.posting=!1})},prepareData(){if(this.space)return[];let e=this.appVars.auth.spaces;e=Object.values(e);let t=this.appVars.space_groups,n=[],o=[];this.each(t,r=>{let s=e.filter(i=>{let l=i.parent_id==r.id&&i.permissions&&i.permissions.can_create_post;return l&&o.push(i.slug),l});s.length&&n.push({label:r.title,spaces:s})}),this.globalDisabled||n.unshift({label:"",spaces:[{title:this.$t("On my profile"),slug:"__self__post__"}]}),this.postableSpaces=n}}},kAe={class:"create_header"},CAe={class:"person_avatar"},SAe=["alt","src"],$Ae={key:0,ref:"fcom_topics_input",class:"fcom_topics_input"},EAe={class:"fcom_post_actions"},xAe={key:0,style:{color:"var(--fcom-text-off)","font-size":"80%","margin-right":"20px"}},TAe={class:"target_label"},MAe={ref:"fcom_posting_space",style:{"margin-right":"10px"}},AAe={key:0,class:"fcom_space_title"},OAe={key:1};function IAe(e,t,n,o,r,s){const i=z("SingleLineTextarea"),l=jo,a=zo,c=z("SpaceIcon"),u=pA,d=Ze,f=z("feed-text-composer"),h=Mt("loading");return s.canPost?(g(),k("div",{key:0,class:F([{state_active:r.state=="active"},"create_status_holder"])},[_("div",kAe,[_("div",CAe,[_("img",{alt:e.$t("Your Photo"),src:e.auth.avatar},null,8,SAe)]),r.state!="active"?(g(),k("div",{key:0,onClick:t[0]||(t[0]=p=>s.makeActive()),class:"form_placeholder"},M(s.currentPlaceHolder),1)):(g(),k("div",{key:1,class:F([{fcom_editor_with_title:r.hasPostTitle},"fcom_create_status_box"])},[b(f,{placeholder:s.currentPlaceHolder,multipleMedia:!0,surveyApp:!0,videoApp:!0,autofocus:r.isAutoFocus||!r.hasPostTitle,onEditorCreated:t[6]||(t[6]=()=>{r.isAutoFocus=!0}),mentionQuery:{space:n.space},hasEveyoneMention:!0,disabled:r.posting,autofocus_changed:r.autofocus_changed,content:r.feed},{before_input:x(()=>[r.hasPostTitle?(g(),L(i,{key:0,maxlength:120,autofocus:!0,modelValue:r.feed.title,"onUpdate:modelValue":t[1]||(t[1]=p=>r.feed.title=p),onEnter:t[2]||(t[2]=p=>s.changeAutoFocus()),placeholder:r.hasPostTitle=="required"?e.$t("Short title of this post"):e.$t("Title (optional)")},null,8,["modelValue","placeholder"])):O("",!0)]),after_input:x(()=>[e.has_pro&&s.currentTopics.length?(g(),k("div",$Ae,[b(a,{"multiple-limit":e.appVars.features.max_topic_per_post,modelValue:r.feed.topic_ids,"onUpdate:modelValue":t[3]||(t[3]=p=>r.feed.topic_ids=p),multiple:e.appVars.features.max_topic_per_post>1,placeholder:e.$_n("Select a topic (optional)","Choose up to %s topics (optional)",e.appVars.features.max_topic_per_post)},{default:x(()=>[(g(!0),k(Q,null,Me(s.currentTopics,p=>(g(),L(l,{key:p.slug,label:p.title,value:p.id},{default:x(()=>[_("span",null,M(p.title),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["multiple-limit","modelValue","multiple","placeholder"])],512)):O("",!0)]),default:x(()=>[_("div",EAe,[n.space&&r.state=="active"?(g(),k("span",xAe," #"+M(n.space),1)):O("",!0),n.space?O("",!0):(g(),k(Q,{key:1},[_("span",TAe,M(e.$t("Posting in:")),1),_("span",MAe,[b(a,{class:"fcom_minimal_select",modelValue:r.feed.space,"onUpdate:modelValue":t[4]||(t[4]=p=>r.feed.space=p),placeholder:e.$t("Select Space"),style:{width:"170px"}},{default:x(()=>[(g(!0),k(Q,null,Me(r.postableSpaces,p=>(g(),L(u,{key:p.label,label:p.label},{default:x(()=>[(g(!0),k(Q,null,Me(p.spaces,m=>(g(),L(l,{key:m.slug,label:m.title,value:m.slug},{default:x(()=>[m.id?(g(),k("span",AAe,[b(c,{space_profile:m},null,8,["space_profile"]),_("span",null,M(e.getExcerpt(m.title,30)),1)])):(g(),k("span",OAe,M(e.getExcerpt(m.title,30)),1))]),_:2},1032,["label","value"]))),128))]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue","placeholder"])],512)],64)),Ve((g(),L(d,{onClick:t[5]||(t[5]=p=>s.post()),disabled:r.posting,class:"fcom_primary_button"},{default:x(()=>[ne(M(e.$t("Post")),1)]),_:1},8,["disabled"])),[[h,r.posting]])])]),_:1},8,["placeholder","autofocus","mentionQuery","disabled","autofocus_changed","content"])],2))])],2)):O("",!0)}const BC=fe(wAe,[["render",IAe]]),NAe={name:"FeedListItem",components:{UserRouteLink:Md,ChatIcon:NC,HeartIcon:IC},props:["feed"],computed:{feedRoute(){let e={name:"single_feed",params:{feed_slug:this.feed.slug}};return this.feed.space&&(e={name:"space_feed",params:{feed_slug:this.feed.slug,space:this.feed.space.slug}}),e}},data(){return{in_space:this.$route.params.space}},methods:{parseMessage(e){if(!e)return"";const t=this.$route.params.space?`${this.appVars.urls.portal_base}space/${this.$route.params.space}/home`:this.appVars.urls.global_search;return e.replace(/<a\s(?:(?!target="_blank")[^>])*>|<[^>]+>|#(\w+)/gi,(n,o,r,s)=>n.startsWith("<a")&&!n.includes('target="_blank"')?n.includes(window.location.origin)?n:n.replace("<a",'<a target="_blank" rel="noopener"'):o&&!this.isInsideHtmlTag(s,r)?`<a onclick="window.FluentCommunityUtil.handleSearchClick(event)" href="${t}?search=%23${o}">#${o}</a>`:n)},isInsideHtmlTag(e,t){let n=!1;for(let o=0;o<t;o++)e[o]==="<"&&(n=!0),e[o]===">"&&(n=!1);return n},goToFeedView(){if(window.__showing_feed=this.feed,this.feed.type=="topic"){this.$router.push({name:"topic",params:{slug:this.feed.slug}});return}this.$router.push(this.feedRoute)},toggleReact(){const e={react_type:"like"};this.feed.has_user_react&&(e.remove=!0),this.feed.has_user_react=!this.feed.has_user_react,this.$post("feeds/"+this.feed.id+"/react",e).then(t=>{this.feed.reactions_count=t.new_count}).catch(t=>{this.$handleError(t),this.feed.has_user_react=!this.feed.has_user_react})}}},PAe={class:"fcom_feed_list"},LAe={class:"fcom_feed_data"},RAe={key:0,class:"fcom_sticky"},FAe=_("svg",{viewBox:"0 0 24 24","aria-hidden":"true",class:"r-4qtqp9 r-yyyyoo r-dnmrzs r-bnwqim r-lrvibr r-m6rgpd r-14j79pv r-10ptun7 r-1janqcz"},[_("g",null,[_("path",{d:"M7 4.5C7 3.12 8.12 2 9.5 2h5C15.88 2 17 3.12 17 4.5v5.26L20.12 16H13v5l-1 2-1-2v-5H3.88L7 9.76V4.5z"})])],-1),DAe={class:"feed_user"},BAe=["href"],VAe=["innerHTML"],zAe={class:"fcom_feed_meta"},jAe={key:0},HAe={class:"feed_actions"},UAe={class:"num_label"},WAe={class:"num_label"};function qAe(e,t,n,o,r,s){var f;const i=ve,l=z("UserAvatar"),a=z("user-route-link"),c=z("HeartIcon"),u=Ze,d=z("ChatIcon");return g(),k("div",PAe,[_("div",LAe,[n.feed.is_sticky?(g(),k("div",RAe,[b(i,{class:"fcom_sticky"},{default:x(()=>[FAe]),_:1})])):O("",!0),_("div",DAe,[b(a,{show_pop:!1,xprofile:n.feed.xprofile},{default:x(()=>[b(l,{with_level:!1,xprofile:n.feed.xprofile},null,8,["xprofile"])]),_:1},8,["xprofile"])]),_("a",{href:e.$router.resolve(s.feedRoute).href,onClick:t[0]||(t[0]=Ge(h=>s.goToFeedView(),["prevent"])),class:"feed_body"},[_("div",{class:"feed_texts feed_md_content",innerHTML:e.getExcerpt(n.feed.title||n.feed.message_rendered,150)},null,8,VAe),_("div",zAe,[ne(M(((f=n.feed)==null?void 0:f.xprofile.display_name)||"Deleted user")+" • "+M(e.humanDateDiff(n.feed.created_at))+" ",1),!r.in_space&&n.feed.space?(g(),k("span",jAe,"• #"+M(n.feed.space.slug),1)):O("",!0)])],8,BAe)]),_("div",HAe,[b(u,{text:""},{default:x(()=>[b(i,{class:F({user_reacted:n.feed.has_user_react}),onClick:t[1]||(t[1]=h=>s.toggleReact())},{default:x(()=>[b(c,{filled:n.feed.has_user_react},null,8,["filled"])]),_:1},8,["class"]),_("span",UAe,M(n.feed.reactions_count),1)]),_:1}),b(u,{onClick:t[2]||(t[2]=h=>e.$router.push(s.feedRoute)),text:""},{default:x(()=>[b(i,null,{default:x(()=>[b(d)]),_:1}),_("span",WAe,M(n.feed.comments_count),1)]),_:1})])])}const KAe=fe(NAe,[["render",qAe]]),GAe={name:"SwitchTimelineIcon"},YAe={width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},JAe=_("path",{d:"M4 1H13.75V2.5H4V1ZM1.375 2.875C1.07663 2.875 0.790483 2.75647 0.579505 2.5455C0.368526 2.33452 0.25 2.04837 0.25 1.75C0.25 1.45163 0.368526 1.16548 0.579505 0.954505C0.790483 0.743526 1.07663 0.625 1.375 0.625C1.67337 0.625 1.95952 0.743526 2.1705 0.954505C2.38147 1.16548 2.5 1.45163 2.5 1.75C2.5 2.04837 2.38147 2.33452 2.1705 2.5455C1.95952 2.75647 1.67337 2.875 1.375 2.875ZM1.375 8.125C1.07663 8.125 0.790483 8.00647 0.579505 7.7955C0.368526 7.58452 0.25 7.29837 0.25 7C0.25 6.70163 0.368526 6.41548 0.579505 6.2045C0.790483 5.99353 1.07663 5.875 1.375 5.875C1.67337 5.875 1.95952 5.99353 2.1705 6.2045C2.38147 6.41548 2.5 6.70163 2.5 7C2.5 7.29837 2.38147 7.58452 2.1705 7.7955C1.95952 8.00647 1.67337 8.125 1.375 8.125ZM1.375 13.3C1.07663 13.3 0.790483 13.1815 0.579505 12.9705C0.368526 12.7595 0.25 12.4734 0.25 12.175C0.25 11.8766 0.368526 11.5905 0.579505 11.3795C0.790483 11.1685 1.07663 11.05 1.375 11.05C1.67337 11.05 1.95952 11.1685 2.1705 11.3795C2.38147 11.5905 2.5 11.8766 2.5 12.175C2.5 12.4734 2.38147 12.7595 2.1705 12.9705C1.95952 13.1815 1.67337 13.3 1.375 13.3ZM4 6.25H13.75V7.75H4V6.25ZM4 11.5H13.75V13H4V11.5Z",fill:"currentColor"},null,-1),ZAe=[JAe];function XAe(e,t,n,o,r,s){return g(),k("svg",YAe,ZAe)}const TL=fe(GAe,[["render",XAe]]),QAe={name:"SwitchListIcon"},eOe={width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",role:"img",color:"#666666"},tOe=_("path",{d:"M2.53168 9.32334C2.79738 9.26497 3.0942 9.25 3.4 9.25H20.6C20.9058 9.25 21.2026 9.26497 21.4683 9.32334C21.7425 9.38357 22.0291 9.49978 22.2647 9.73532C22.5002 9.97086 22.6164 10.2575 22.6767 10.5317C22.735 10.7974 22.75 11.0942 22.75 11.4V12.6C22.75 12.9058 22.735 13.2026 22.6767 13.4683C22.6164 13.7425 22.5002 14.0291 22.2647 14.2647C22.0291 14.5002 21.7425 14.6164 21.4683 14.6767C21.2026 14.735 20.9058 14.75 20.6 14.75H3.4C3.0942 14.75 2.79738 14.735 2.53168 14.6767C2.25749 14.6164 1.97086 14.5002 1.73532 14.2647C1.49978 14.0291 1.38357 13.7425 1.32334 13.4683C1.26497 13.2026 1.25 12.9058 1.25 12.6V11.4C1.25 11.0942 1.26497 10.7974 1.32334 10.5317C1.38357 10.2575 1.49978 9.97086 1.73532 9.73532C1.97086 9.49978 2.25749 9.38357 2.53168 9.32334Z",fill:"var(--fcom-primary-text)"},null,-1),nOe=_("path",{opacity:"0.4",d:"M2.53168 1.32334C2.79738 1.26497 3.0942 1.25 3.4 1.25H20.6C20.9058 1.25 21.2026 1.26497 21.4683 1.32334C21.7425 1.38357 22.0291 1.49978 22.2647 1.73532C22.5002 1.97086 22.6164 2.25749 22.6767 2.53168C22.735 2.79738 22.75 3.0942 22.75 3.4V4.6C22.75 4.9058 22.735 5.20262 22.6767 5.46832C22.6164 5.74251 22.5002 6.02914 22.2647 6.26468C22.0291 6.50022 21.7425 6.61643 21.4683 6.67666C21.2026 6.73503 20.9058 6.75 20.6 6.75H3.4C3.0942 6.75 2.79738 6.73503 2.53168 6.67666C2.25749 6.61643 1.97086 6.50022 1.73532 6.26468C1.49978 6.02914 1.38357 5.74251 1.32334 5.46832C1.26497 5.20262 1.25 4.9058 1.25 4.6V3.4C1.25 3.0942 1.26497 2.79738 1.32334 2.53168C1.38357 2.25749 1.49978 1.97086 1.73532 1.73532C1.97086 1.49978 2.25749 1.38357 2.53168 1.32334Z",fill:"var(--fcom-primary-text)"},null,-1),oOe=_("path",{opacity:"0.4",d:"M2.53168 17.3233C2.79738 17.265 3.0942 17.25 3.4 17.25H20.6C20.9058 17.25 21.2026 17.265 21.4683 17.3233C21.7425 17.3836 22.0291 17.4998 22.2647 17.7353C22.5002 17.9709 22.6164 18.2575 22.6767 18.5317C22.735 18.7974 22.75 19.0942 22.75 19.4V20.6C22.75 20.9058 22.735 21.2026 22.6767 21.4683C22.6164 21.7425 22.5002 22.0291 22.2647 22.2647C22.0291 22.5002 21.7425 22.6164 21.4683 22.6767C21.2026 22.735 20.9058 22.75 20.6 22.75H3.4C3.0942 22.75 2.79738 22.735 2.53168 22.6767C2.25749 22.6164 1.97086 22.5002 1.73532 22.2647C1.49978 22.0291 1.38357 21.7425 1.32334 21.4683C1.26497 21.2026 1.25 20.9058 1.25 20.6V19.4C1.25 19.0942 1.26497 18.7974 1.32334 18.5317C1.38357 18.2575 1.49978 17.9709 1.73532 17.7353C1.97086 17.4998 2.25749 17.3836 2.53168 17.3233Z",fill:"var(--fcom-primary-text)"},null,-1),rOe=[tOe,nOe,oOe];function sOe(e,t,n,o,r,s){return g(),k("svg",eOe,rOe)}const ML=fe(QAe,[["render",sOe]]),iOe={name:"AllFeeds",emits:["refetch"],inheritAttrs:!1,props:{space:{type:[String,Number],default(){return null}},user_id:{type:[String,Number],default(){return null}},hide_create_form:{type:Boolean,default(){return!1}},hide_filters:{type:Boolean,default(){return!1}},feed_base_url:{type:String,default(){return"feeds"}},default_search:{type:String,default(){return""}},layout_style:{type:String,default(){return"timeline"}},feed_name:{type:String,default(){return""}},topic_slug:{type:[String,Number],default(){return null}}},components:{CreateStatusForm:BC,Feed:xL,FeedListItem:KAe,SwitchTimelineIcon:TL,SwitchListIcon:ML},watch:{space(e){this.pagination.page=1,this.feeds=[],this.fetchFeeds()},search(){this.pagination.page=1,this.feeds=[],this.fetchFeeds()},topic_slug(){this.pagination.page=1,this.feeds=[],this.fetchFeeds()}},computed:{disableAutoLoad(){return this.loading||this.pagination.page*this.pagination.per_page>=this.pagination.total&&this.pagination.total},currentLayoutStyle(){return this.custom_layout_style}},data(){return{feeds:[],sticky:null,loading:!0,pagination:{total:0,page:1,per_page:10,last_page:1},appReady:!0,type:"",search:this.$route.query.search||"",custom_layout_style:this.layout_style,disable_sticky:!1}},methods:{fetchFeeds(e=!1){this.loading=!0,this.$get(this.feed_base_url,{page:this.pagination.page,per_page:this.pagination.per_page,space:this.space,user_id:this.user_id,type:this.type,search:this.search,disable_sticky:this.disable_sticky,topic_slug:this.topic_slug}).then(t=>{t.sticky&&(window["viewed_sticky_posts_"+t.sticky.id]?t.feeds.data.unshift(t.sticky):this.sticky=t.sticky),e?this.feeds=this.feeds.concat(t.feeds.data):this.feeds=t.feeds.data,t.last_id&&(this.appVars.last_feed_id<t.last_id&&(this.appVars.last_feed_id=t.last_id),this.$eventBus.emit("feed_fetched",{feeds:t.feeds,space:this.space,user_id:this.user_id,last_id:t.last_id})),this.pagination.total=t.feeds.total,this.pagination.last_page=t.feeds.last_page}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},feedAdded(e){this.sticky&&(this.feeds.unshift(this.sticky),this.sticky=null),this.feeds.unshift(e)},handleDelete(e){this.feeds.splice(e,1)},handleUpdate(e,t){this.feeds.splice(t,1,e)},handleLoadMore(e){var s;if(this.disableAutoLoad)return!1;if(this.pagination.last_page==this.pagination.page)return;let t=document.querySelector(".all_feeds_holder .feed_outer:last-child");if(!t)return;let n=t.getBoundingClientRect(),o=(s=window.fcomLayoutRef)==null?void 0:s.wrapRef;!o||n.bottom-o.getBoundingClientRect().bottom-n.height>100||this.loading||(this.loading=!0,this.pagination.page++,this.fetchFeeds(!0))},resetFetch(){this.disable_sticky="yes",this.sticky=null,this.pagination.page=1,this.feeds=[],this.fetchFeeds()},spaceChanged(){this.pagination.page=1,this.feeds=[],this.fetchFeeds()},routeNewArticle(){this.space?this.$router.push({name:"space_write_article",params:{space:this.space}}):this.$router.push({name:"write_article"})},switchView(e){this.sticky&&(window["viewed_sticky_posts_"+this.sticky.id]=!0,this.feeds.unshift(this.sticky),this.sticky=null),this.custom_layout_style=e,this.feed_name&&this.hasFeature("can_switch_layout")&&this.$storeLocalData("feed_layout_style_"+this.feed_name,e),this.$notify.success(this.$t("Layout changed"))}},created(){this.default_search&&(this.search=this.default_search),this.loading=!0,this.fetchFeeds()},mounted(){if(this.feed_name&&this.hasFeature("can_switch_layout")){let e=this.$getLocalData("feed_layout_style_"+this.feed_name);e&&(this.custom_layout_style=e)}document.addEventListener("fcom_layout_scroll",this.handleLoadMore),this.$eventBus.on("doGlobalSearch",e=>{this.loading||this.search!=e&&(this.search=e,this.pagination.page=1,this.$router.push({query:{search:e}}))})},beforeUnmount(){this.$eventBus.emit("leaving_all_feeds"),window.removeEventListener("fcom_layout_scroll",this.handleLoadMore),this.$eventBus.off("doGlobalSearch"),this.sticky&&(window["viewed_sticky_posts_"+this.sticky.id]=!0)}},lOe={key:1,class:"feed_filters"},aOe=_("div",{class:"fcom_feed_divider"},null,-1),cOe={id:"feed_short_by",class:"fcom_feed_filter_label"},uOe={key:0,class:"fcom_layout_switch"},dOe={key:2,style:{margin:"0 0 10px"},class:"fcom_search_result_num"},fOe={key:3,class:"fcom_sticky_feed"},hOe={class:"all_feeds_holder"},pOe={key:0,style:{"margin-top":"20px","text-align":"center"}},mOe={key:5},gOe={class:"feed_outer"},_Oe={class:"feed"},vOe={style:{"text-align":"center"},class:"feed_body"},yOe={key:0},bOe={key:1},wOe={key:2};function kOe(e,t,n,o,r,s){const i=z("create-status-form"),l=jo,a=zo,c=z("SwitchListIcon"),u=ve,d=Ze,f=z("SwitchTimelineIcon"),h=z("feed"),p=z("FeedListItem"),m=qt;return g(),k(Q,null,[le(e.$slots,"before_create_form"),!n.hide_create_form&&e.auth.user_id?(g(),L(i,{key:0,space:n.space,onAdded:s.feedAdded},null,8,["space","onAdded"])):O("",!0),le(e.$slots,"before_feeds"),n.hide_filters?O("",!0):(g(),k("div",lOe,[aOe,_("span",cOe,M(e.$t("Sort by:")),1),b(a,{"aria-label":e.$t("Sort posts by"),modelValue:r.type,"onUpdate:modelValue":t[0]||(t[0]=v=>r.type=v),class:"fcom_minimal_select","popper-class":"plain_select",placeholder:e.$t("Latest Posts"),onChange:t[1]||(t[1]=v=>s.resetFetch())},{default:x(()=>[b(l,{label:e.$t("Latest Posts"),value:""},null,8,["label"]),b(l,{value:"new_activity",label:e.$t("New Activity")},null,8,["label"]),b(l,{value:"oldest",label:e.$t("Oldest")},null,8,["label"]),b(l,{value:"popular",label:e.$t("Popular")},null,8,["label"]),b(l,{value:"likes",label:e.$t("Likes")},null,8,["label"]),b(l,{value:"alphabetical",label:e.$t("Alphabetical")},null,8,["label"]),b(l,{value:"unanswered",label:e.$t("Unanswered")},null,8,["label"])]),_:1},8,["aria-label","modelValue","placeholder"]),n.feed_name&&e.hasFeature("can_switch_layout")?(g(),k("div",uOe,[r.custom_layout_style=="list"?(g(),L(d,{key:0,type:"info",title:e.$t("Switch to List View"),text:"",onClick:t[2]||(t[2]=v=>s.switchView("timeline"))},{default:x(()=>[b(u,{style:{color:"var(--fcom-primary-text)"}},{default:x(()=>[b(c)]),_:1})]),_:1},8,["title"])):(g(),L(d,{key:1,title:e.$t("Switch to Timeline View"),type:"info",text:"",onClick:t[3]||(t[3]=v=>s.switchView("list"))},{default:x(()=>[b(u,{style:{color:"var(--fcom-primary-text)"}},{default:x(()=>[b(f)]),_:1})]),_:1},8,["title"]))])):O("",!0)])),r.pagination.total&&r.search?(g(),k("div",dOe,M(e.$_n("%s result found","%s results found",r.pagination.total)),1)):O("",!0),r.sticky?(g(),k("div",fOe,[b(h,{onReload:t[4]||(t[4]=v=>{r.sticky=null,s.fetchFeeds()}),onDeleted:t[5]||(t[5]=()=>{r.sticky=null}),feed:r.sticky},null,8,["feed"])])):O("",!0),r.feeds.length?(g(),k("div",{key:4,ref:"all_feeds_wrap",class:F(["fcom_feed_style_"+s.currentLayoutStyle,"all_feeds"])},[_("div",hOe,[(g(!0),k(Q,null,Me(r.feeds,(v,y)=>(g(),k("div",{key:v.id,class:"feed_outer"},[s.currentLayoutStyle=="list"?(g(),L(p,{key:0,feed:v},null,8,["feed"])):(g(),L(h,{key:1,layout_style:s.currentLayoutStyle,onUpdated:E=>s.handleUpdate(E,y),onDeleted:E=>s.handleDelete(y),feed:v},null,8,["layout_style","onUpdated","onDeleted","feed"]))]))),128))]),s.disableAutoLoad?O("",!0):(g(),k("div",pOe,[b(d,{disabled:r.loading,onClick:t[6]||(t[6]=v=>{r.pagination.page++,s.fetchFeeds(!0)})},{default:x(()=>[ne(M(e.$t("Load more")),1)]),_:1},8,["disabled"])]))],2)):r.loading?O("",!0):(g(),k("div",mOe,[_("div",gOe,[_("div",_Oe,[_("div",vOe,[r.search?(g(),k("p",yOe,M(e.$t("No results found based on your search criteria")),1)):n.topic_slug?(g(),k("p",bOe,M(e.$t("No posts found for the selected topic")),1)):(g(),k("p",wOe,M(e.$t("No posts found!")),1))])])])])),r.loading?(g(),k(Q,{key:6},[b(m,{style:{"margin-top":"20px"},class:"white_loaded",animated:!0,rows:5}),r.pagination.page==1?(g(),k(Q,{key:0},[b(m,{style:{"margin-top":"20px"},class:"white_loaded",animated:!0,rows:5}),b(m,{style:{"margin-top":"20px"},class:"white_loaded",animated:!0,rows:5})],64)):O("",!0)],64)):O("",!0)],64)}const Lp=fe(iOe,[["render",kOe]]),COe={name:"SearchBar",components:{SpaceIcon:DC,AllFeeds:Lp,SearchIcon:ju},data(){return{search:"",SearchIcon:ns(ju),showingSearch:!1,persoform_search:!1,searchGroups:[],search_space:"__all__"}},computed:{placeholder(){return this.search_space!="__all__"?this.$t("Search in %s","#"+this.search_space):this.$t("Search here...")}},methods:{initSearch(){this.$route.params.space?this.search_space=this.$route.params.space:this.search_space="__all__",this.showingSearch=!0,this.handleOpen()},toSearch(){this.search&&(this.persoform_search?(this.persoform_search=!1,this.$nextTick(()=>{this.persoform_search=!0})):this.persoform_search=!0)},handleScroll(e){if(this.$refs.feedsScroller.wrapRef.scrollHeight-this.$refs.feedsScroller.wrapRef.clientHeight-e.scrollTop<100){let n=this.$refs.feedsRef;!n.loading&&n.pagination.page<n.pagination.last_page&&(n.pagination.page++,n.fetchFeeds(!0))}},keyBind(e){e.key==="k"&&(e.ctrlKey||e.metaKey)&&(this.showingSearch=!this.showingSearch,this.showingSearch&&this.handleOpen())},handleOpen(){this.formatSearchGroups(),this.$nextTick(()=>{this.$refs.seatch_input.focus()})},formatSearchGroups(){if(this.searchGroups.length)return;let e=this.appVars.auth.spaces;e=Object.values(e);let t=this.appVars.space_groups,n=[];this.each(t,o=>{let r=e.filter(s=>s.parent_id==o.id&&s.permissions&&s.permissions.can_view_posts);r.length&&n.push({label:o.title,spaces:r})}),this.searchGroups=n}},mounted(){document.addEventListener("keydown",this.keyBind),this.$eventBus.on("route_updated",()=>{this.showingSearch=!1})},beforeUnmount(){document.removeEventListener("keydown",this.keyBind)}},SOe={class:"fcom_search_header"},$Oe={key:0,class:"fcom_space_title"},EOe={key:1},xOe={key:0,class:"fcom_search_results"},TOe={key:1,class:"fcom_search_welcome"},MOe=_("b",null,"⌘ + K",-1),AOe=_("b",null,"Ctrl + K",-1);function OOe(e,t,n,o,r,s){const i=z("SearchIcon"),l=ve,a=jo,c=z("SpaceIcon"),u=pA,d=zo,f=Dn,h=z("all-feeds"),p=Vo,m=vp;return g(),k(Q,null,[b(l,{id:"fcom_search_icon",class:"fcom_search_icon",onClick:t[0]||(t[0]=v=>s.initSearch())},{default:x(()=>[b(i)]),_:1}),r.showingSearch?(g(),L(m,{key:0,top:"60px",onClose:t[5]||(t[5]=v=>{r.persoform_search=!1}),"append-to-body":!0,"lock-scroll":!0,"modal-class":"fcom_search_bar_visible",modelValue:r.showingSearch,"onUpdate:modelValue":t[6]||(t[6]=v=>r.showingSearch=v),"show-close":!1,style:{"max-width":"700px"},width:e.drawerWidth},{header:x(()=>[_("div",SOe,[b(f,{ref:"seatch_input",size:"large",onClear:t[2]||(t[2]=v=>r.persoform_search=!1),modelValue:r.search,"onUpdate:modelValue":t[3]||(t[3]=v=>r.search=v),placeholder:s.placeholder,onKeyup:rn(s.toSearch,["enter"]),onInput:t[4]||(t[4]=v=>r.persoform_search=!1),clearable:""},{prefix:x(()=>[b(l,{onClick:s.toSearch},{default:x(()=>[b(i)]),_:1},8,["onClick"])]),append:x(()=>[b(d,{class:"fcom_minimal_select fcom_global_search_append",modelValue:r.search_space,"onUpdate:modelValue":t[1]||(t[1]=v=>r.search_space=v),placeholder:e.$t("All Posts"),style:{width:"100px"}},{default:x(()=>[b(a,{label:e.$t("All Posts"),value:"__all__"},null,8,["label"]),(g(!0),k(Q,null,Me(r.searchGroups,v=>(g(),L(u,{key:v.label,label:v.label},{default:x(()=>[(g(!0),k(Q,null,Me(v.spaces,y=>(g(),L(a,{key:y.slug,label:y.title,value:y.slug},{default:x(()=>[y.id?(g(),k("span",$Oe,[b(c,{space_profile:y},null,8,["space_profile"]),_("span",null,M(e.getExcerpt(y.title,30)),1)])):(g(),k("span",EOe,M(e.getExcerpt(y.title,30)),1))]),_:2},1032,["label","value"]))),128))]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["modelValue","placeholder","onKeyup"])])]),default:x(()=>[r.persoform_search&&r.search?(g(),k("div",xOe,[b(p,{ref:"feedsScroller",onScroll:s.handleScroll,style:{"padding-right":"20px"},height:"70vh"},{default:x(()=>[b(h,{layout_style:"list",feed_name:"search_results",space:r.search_space!="__all__"?r.search_space:"",ref:"feedsRef",default_search:r.search,hide_filters:!1,hide_create_form:!0},null,8,["space","default_search"])]),_:1},8,["onScroll"])])):(g(),k("div",TOe,[b(l,null,{default:x(()=>[b(i)]),_:1}),_("h3",null,M(e.$t("Search for anything")),1),_("p",null,M(e.$t("Try searching for keywords in posts")),1),_("p",null,[ne(M(e.$t("Tip: Quick-launch search with"))+" ",1),MOe,ne(" (Mac) "+M(e.$t("or"))+" ",1),AOe,ne(" (Windows/Linux)")])]))]),_:1},8,["modelValue","width"])):O("",!0)],64)}const IOe=fe(COe,[["render",OOe]]),NOe={name:"SvgShapeGenerator",emits:["update"],data(){return{currentColor:"",selectedShape:"circle",predefineColors:["#8000FF","#ff4500","#ff8c00","#ffd700","#90ee90","#0080FF","#1e90ff","#0000FF","#FFFF00","#BFFF00","#00FF00","#00FFBF","#00ced1","#00FFFF"]}},computed:{svgShapes(){return{circle:`<svg 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 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 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 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 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 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])}}},POe={class:"fcom_svg_generator"},LOe={class:"fcom_form_item"},ROe={class:"fcom_form_item"},FOe=["innerHTML"];function DOe(e,t,n,o,r,s){const i=WM,l=hp,a=Oi;return g(),k("div",POe,[_("div",LOe,[_("label",null,M(e.$t("Select Shape Color:")),1),b(i,{predefine:r.predefineColors,modelValue:r.currentColor,"onUpdate:modelValue":t[0]||(t[0]=c=>r.currentColor=c),onActiveChange:s.colorChanged,size:"large","show-alpha":""},null,8,["predefine","modelValue","onActiveChange"])]),_("div",ROe,[_("label",null,M(e.$t("Select Shape:")),1),b(a,{onChange:t[1]||(t[1]=c=>s.selectShape(r.selectedShape)),modelValue:r.selectedShape,"onUpdate:modelValue":t[2]||(t[2]=c=>r.selectedShape=c)},{default:x(()=>[(g(!0),k(Q,null,Me(s.svgShapes,(c,u)=>(g(),L(l,{key:u,value:u},{default:x(()=>[_("div",{innerHTML:c},null,8,FOe)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])])])}const BOe=fe(NOe,[["render",DOe]]),VOe={name:"LogoEmojiSelector",components:{EmojiPicker:JP,ImageUploader:vc,SvgShapeGenerator:BOe},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(){this.logo?this.selectedTab="logo":this.emoji?this.selectedTab="emoji":this.shape_svg&&(this.selectedTab="shape")}},zOe=["innerHTML"];function jOe(e,t,n,o,r,s){const i=Ze,l=z("EmojiPicker"),a=Dn,c=IA,u=z("SvgShapeGenerator"),d=Hl,f=z("ImageUploader"),h=OA,p=$o;return g(),L(p,{placement:"bottom",width:450,persistent:!1,style:{padding:"0"},visible:r.visible,ref:"logo_emoji_pop",class:"logo_emoji_pop"},{reference:x(()=>[b(i,{onClick:t[0]||(t[0]=m=>r.visible=!r.visible),text:""},{default:x(()=>[_("span",{class:"logo_emoji_holder",style:{cursor:"pointer"},innerHTML:s.currentMark||""},null,8,zOe)]),_:1})]),default:x(()=>[b(h,{modelValue:r.selectedTab,"onUpdate:modelValue":t[6]||(t[6]=m=>r.selectedTab=m),type:"border-card"},{default:x(()=>[b(c,{name:"emoji",label:e.$t("Emoji")},{default:x(()=>[b(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:x(()=>[b(l,{close_on_select:!0,onEmojiSelected:t[1]||(t[1]=m=>{r.emoji=m,s.setData("emoji")})})]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),b(c,{name:"shape",label:e.$t("Shape")},{default:x(()=>[b(u,{onUpdate:s.handleShapeChanged},null,8,["onUpdate"])]),_:1},8,["label"]),n.custom_svg?(g(),L(c,{key:0,name:"shape_svg",label:e.$t("Custom SVG")},{default:x(()=>[b(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"])):O("",!0),b(c,{name:"logo",label:e.$t("Custom Image")},{default:x(()=>[r.logo?(g(),L(d,{key:0,alt:e.$t("Logo"),src:r.logo,style:{"max-width":"100px"}},null,8,["alt","src"])):O("",!0),b(f,{additionalData:{resize:!0,max_width:400},onUploaded:s.handleLogoPhotoUpload},null,8,["onUploaded"])]),_:1},8,["label"])]),_:1},8,["modelValue"]),b(i,{onClick:t[7]||(t[7]=m=>{r.visible=!1}),type:"success",plain:"",style:{"margin-top":"20px"}},{default:x(()=>[ne(M(e.$t("Close")),1)]),_:1})]),_:1},8,["visible"])}const VC=fe(VOe,[["render",jOe]]),HOe={name:"SlugInput",emits:["update:modelValue"],props:{modelValue:{type:String,default:""},placeholder:{type:String,default:""},disabled:{type:Boolean,default:!1}},data(){return{model:this.modelValue}},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)}}};function UOe(e,t,n,o,r,s){const i=Dn;return g(),L(i,{disabled:n.disabled,modelValue:r.model,"onUpdate:modelValue":t[0]||(t[0]=l=>r.model=l),placeholder:n.placeholder,onInput:s.updateSlug},null,8,["disabled","modelValue","placeholder","onInput"])}const zC=fe(HOe,[["render",UOe]]),WOe={name:"TopicSelector",props:["modelValue"],emits:["update:modelValue"],data(){return{topics:[],selected:this.modelValue,loading:!1}},methods:{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})}},watch:{selected(){this.$emit("update:modelValue",this.selected)}},mounted(){this.fetchTopics()}};function qOe(e,t,n,o,r,s){const i=jo,l=zo,a=Mt("loading");return Ve((g(),L(l,{"multiple-limit":20,modelValue:r.selected,"onUpdate:modelValue":t[0]||(t[0]=c=>r.selected=c),multiple:!0,clearable:"",filterable:"",placeholder:e.$t("Choose up to 20 topics")},{default:x(()=>[(g(!0),k(Q,null,Me(r.topics,c=>(g(),L(i,{key:c.slug,label:c.title,value:c.id},{default:x(()=>[_("span",null,M(c.title),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])),[[a,r.loading]])}const AL=fe(WOe,[["render",qOe]]),KOe={name:"CreateSpaceForm",emits:["completed"],components:{SlugInput:zC,ImageUploader:vc,LogoEmojiSelector:VC,TopicSelector:AL},props:{community:{required:!1,default:null},parent_id:{required:!1,default:null},savingCount:{required:!1,default:0}},data(){return{saving:!1,privacies:rL,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"},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}},GOe={key:0},YOe={style:{"font-weight":"bold"}},JOe=["innerHTML"],ZOe={key:0},XOe={class:"fcom_lined_checkboxes"},QOe={class:"fcom_help_text"},eIe={class:"fcom_help_text"},tIe=["href"],nIe={class:"fcom_help_text"},oIe={class:"fcom_help_text"},rIe={key:0},sIe={key:1},iIe={class:"fcom_space_form_bottom"};function lIe(e,t,n,o,r,s){const i=z("logo-emoji-selector"),l=Dn,a=Ai,c=z("SlugInput"),u=jo,d=zo,f=V0,h=Oi,p=Fr,m=z("topic-selector"),v=Hl,y=z("ImageUploader"),E=Ze,w=Mi,C=Mt("loading");return g(),L(w,{onSubmit:t[17]||(t[17]=Ge(T=>e.doNothing(),["prevent"])),modelValue:r.form,"onUpdate:modelValue":t[18]||(t[18]=T=>r.form=T),"label-position":"top",class:"fcom_space_form"},{default:x(()=>[r.showingSections.indexOf("basic")!==-1?(g(),k(Q,{key:0},[r.form.id?O("",!0):(g(),k("h4",GOe,M(e.$t("Basic Info")),1)),b(a,{label:e.$t("Space Title")},{default:x(()=>[b(l,{type:"text",placeholder:e.$t("Your Space Title"),modelValue:r.form.title,"onUpdate:modelValue":t[1]||(t[1]=T=>r.form.title=T)},{prepend:x(()=>{var T,$;return[r.dataLoaded?(g(),L(i,{key:0,onUpdate:t[0]||(t[0]=A=>{r.form.settings.emoji=A.emoji,r.form.logo=A.logo,r.form.settings.shape_svg=A.shape_svg}),config:{logo:r.form.logo,emoji:((T=r.form.settings)==null?void 0:T.emoji)||"",shape_svg:($=r.form.settings)==null?void 0:$.shape_svg}},null,8,["config"])):O("",!0)]}),_:1},8,["placeholder","modelValue"])]),_:1},8,["label"]),b(a,{label:e.$t("Slug")},{default:x(()=>[b(c,{disabled:!!r.form.id,modelValue:r.form.slug,"onUpdate:modelValue":t[2]||(t[2]=T=>r.form.slug=T),placeholder:e.$t("Space Slug (no space or special chars)")},null,8,["disabled","modelValue","placeholder"])]),_:1},8,["label"]),b(a,{label:e.$t("Description")},{default:x(()=>[b(l,{type:"textarea",rows:3,placeholder:e.$t("Space Description"),modelValue:r.form.description,"onUpdate:modelValue":t[3]||(t[3]=T=>r.form.description=T)},null,8,["placeholder","modelValue"])]),_:1},8,["label"]),b(a,{label:e.$t("Privacy")},{default:x(()=>[b(d,{"popper-class":"rich_select",modelValue:r.form.privacy,"onUpdate:modelValue":t[4]||(t[4]=T=>r.form.privacy=T),placeholder:e.$t("Select Privacy")},{default:x(()=>[(g(!0),k(Q,null,Me(r.privacies,(T,$)=>(g(),L(u,{key:$,label:T.label,value:$},{default:x(()=>[_("span",YOe,M(e.$labelize(T.label)),1),_("p",{innerHTML:T.description},null,8,JOe)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),r.form.privacy=="private"?(g(),L(a,{key:1,label:e.$t("Lock Screen Type")},{default:x(()=>[b(h,{modelValue:r.form.settings.custom_lock_screen,"onUpdate:modelValue":t[5]||(t[5]=T=>r.form.settings.custom_lock_screen=T)},{default:x(()=>[b(f,{value:"yes"},{default:x(()=>[ne(M(e.$t("Custom Lock Screen")),1)]),_:1}),b(f,{value:"no"},{default:x(()=>[ne(M(e.$t("Default Lock Screen")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"])):O("",!0),r.form.settings.custom_lock_screen=="no"?(g(),L(a,{key:2},{default:x(()=>[b(p,{"true-value":"yes","false-value":"no",modelValue:r.form.settings.can_request_join,"onUpdate:modelValue":t[6]||(t[6]=T=>r.form.settings.can_request_join=T)},{default:x(()=>[ne(M(e.$t("Allow users to request to join this Space")),1)]),_:1},8,["modelValue"])]),_:1})):O("",!0),b(a,{label:e.$t("Menu Group")},{default:x(()=>[b(d,{modelValue:r.form.parent_id,"onUpdate:modelValue":t[7]||(t[7]=T=>r.form.parent_id=T)},{default:x(()=>[(g(!0),k(Q,null,Me(e.appVars.space_groups,T=>(g(),L(u,{key:T.id,value:T.id.toString(),label:T.title},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"])],64)):O("",!0),r.showingSections.indexOf("customization")!==-1?(g(),k(Q,{key:1},[r.form.id?O("",!0):(g(),k("h4",ZOe,M(e.$t("Customization")),1)),r.form.settings?(g(),L(a,{key:1,label:e.$t("Features Customizations")},{default:x(()=>[_("div",XOe,[b(p,{"true-value":"yes","false-value":"no",modelValue:r.form.settings.restricted_post_only,"onUpdate:modelValue":t[8]||(t[8]=T=>r.form.settings.restricted_post_only=T)},{default:x(()=>[ne(M(e.$t("Only admin or moderators can create post")),1)]),_:1},8,["modelValue"]),b(p,{"true-value":"yes","false-value":"no",modelValue:r.form.settings.show_sidebar,"onUpdate:modelValue":t[9]||(t[9]=T=>r.form.settings.show_sidebar=T)},{default:x(()=>[ne(M(e.$t("Show Right Sidebar on Space")),1)]),_:1},8,["modelValue"])])]),_:1},8,["label"])):O("",!0),b(a,{label:e.$t("Default layout styles")},{default:x(()=>[b(h,{modelValue:r.form.settings.layout_style,"onUpdate:modelValue":t[10]||(t[10]=T=>r.form.settings.layout_style=T)},{default:x(()=>[b(f,{value:"timeline"},{default:x(()=>[ne(M(e.$t("Timeline")),1)]),_:1}),b(f,{value:"list"},{default:x(()=>[ne(M(e.$t("List")),1)]),_:1})]),_:1},8,["modelValue"]),_("div",QOe,[_("p",null,M(e.$t("User can change the layout style for their own preference")),1)])]),_:1},8,["label"]),e.has_pro&&r.form.id?(g(),L(a,{key:2,label:e.$t("Topic navigation")},{default:x(()=>[b(m,{modelValue:r.form.topic_ids,"onUpdate:modelValue":t[11]||(t[11]=T=>r.form.topic_ids=T)},null,8,["modelValue"]),_("div",eIe,[_("p",null,[ne(M(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")},M(e.$t("Manage all topics.")),9,tIe)])])]),_:1},8,["label"])):O("",!0),e.appVars.has_chat?(g(),L(a,{key:3,label:e.$t("Group Chat?")},{default:x(()=>[b(p,{"true-value":"yes","false-value":"no",modelValue:r.form.group_chat_support,"onUpdate:modelValue":t[12]||(t[12]=T=>r.form.group_chat_support=T)},{default:x(()=>[ne(M(e.$t("Enable group chat for this space members")),1)]),_:1},8,["modelValue"])]),_:1},8,["label"])):O("",!0),b(a,{label:e.$t("Thumbnail / Open Graph Image (Recommended Size: 1200 x 630)")},{default:x(()=>[r.form.settings.og_image?(g(),L(v,{key:0,alt:e.$t("Thumbnail / Open Graph Image"),src:r.form.settings.og_image,style:{"max-width":"100px"}},null,8,["alt","src"])):O("",!0),b(y,{isTextBtn:!1,can_remove:!!r.form.settings.og_image,additionalData:{resize:!0,max_width:1200,max_height:630},onUploaded:t[13]||(t[13]=T=>{r.form.settings.og_image=T})},null,8,["can_remove"]),_("div",nIe,[_("p",null,M(e.$t("Will be used on card preview and social sharing preview.")),1)])]),_:1},8,["label"]),b(a,{label:e.$t("Featured Image (Recommended size: 1600x500) - Optional")},{default:x(()=>[r.form.cover_photo?(g(),L(v,{key:0,alt:e.$t("Featured Image Preview"),src:r.form.cover_photo,style:{"max-width":"100px"}},null,8,["alt","src"])):O("",!0),b(y,{isTextBtn:!1,can_remove:!!r.form.cover_photo,additionalData:{resize:!0,max_width:1600},onUploaded:s.handleCoverPhotoUpload},null,8,["can_remove","onUploaded"]),_("div",oIe,[_("p",null,M(e.$t("If you add this image, it will be shown on the space homepage")),1)])]),_:1},8,["label"]),b(a,{style:{"margin-top":"45px"}},{default:x(()=>[r.showingSections.indexOf("basic")===-1?(g(),L(E,{key:0,class:"plain_button",text:"",onClick:t[14]||(t[14]=()=>{r.showingSections=["basic"]})},{default:x(()=>[_("span",null,M(e.$t("Go Back")),1)]),_:1})):O("",!0),Ve((g(),L(E,{class:"fcom_primary_button",disabled:r.saving,onClick:t[15]||(t[15]=T=>s.submit())},{default:x(()=>[r.form.id?(g(),k("span",rIe,M(e.$t("Update Info")),1)):(g(),k("span",sIe,M(e.$t("Create")),1))]),_:1},8,["disabled"])),[[C,r.saving]])]),_:1})],64)):(g(),L(a,{key:2},{default:x(()=>[_("div",iIe,[b(E,{onClick:t[16]||(t[16]=()=>{r.showingSections=["customization"]}),class:"fcom_primary_button"},{default:x(()=>[_("span",null,M(e.$t("Continue")),1)]),_:1})])]),_:1}))]),_:1},8,["modelValue"])}const C_=fe(KOe,[["render",lIe]]),aIe={name:"CreateSpaceForm",components:{TopicSelector:AL,SlugInput:zC,ImageUploader:vc,LogoEmojiSelector:VC},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:K5e,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:G5e,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,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}},cIe={style:{"font-weight":"bold"}},uIe={style:{"font-weight":"bold"}},dIe={class:"fcom_help_text"},fIe=["href"],hIe={class:"fcom_help_text"},pIe={key:0},mIe={key:1},gIe={key:1},_Ie=["href"];function vIe(e,t,n,o,r,s){const i=z("logo-emoji-selector"),l=Dn,a=Ai,c=z("SlugInput"),u=jo,d=zo,f=V0,h=Oi,p=z("topic-selector"),m=Hl,v=z("ImageUploader"),y=Ze,E=Mi,w=Mt("loading");return e.hasFeature("has_course")?(g(),L(E,{key:0,onSubmit:t[11]||(t[11]=Ge(C=>e.doNothing(),["prevent"])),modelValue:r.form,"onUpdate:modelValue":t[12]||(t[12]=C=>r.form=C),"label-position":"top"},{default:x(()=>[b(a,{label:e.$t("Course Title")},{default:x(()=>[b(l,{type:"text",placeholder:e.$t("Your Course Title"),modelValue:r.form.title,"onUpdate:modelValue":t[1]||(t[1]=C=>r.form.title=C)},{prepend:x(()=>{var C,T;return[r.dataLoaded?(g(),L(i,{key:0,custom_svg:!0,onUpdate:t[0]||(t[0]=$=>{r.form.settings.emoji=$.emoji,r.form.logo=$.logo,r.form.settings.shape_svg=$.shape_svg}),config:{logo:r.form.logo,emoji:(C=r.form.settings)==null?void 0:C.emoji,shape_svg:((T=r.form.settings)==null?void 0:T.shape_svg)||""}},null,8,["config"])):O("",!0)]}),_:1},8,["placeholder","modelValue"])]),_:1},8,["label"]),b(a,{label:e.$t("Slug")},{default:x(()=>[b(c,{disabled:!!r.form.id,modelValue:r.form.slug,"onUpdate:modelValue":t[2]||(t[2]=C=>r.form.slug=C),placeholder:e.$t("Course Slug (no space or special chars)")},null,8,["disabled","modelValue","placeholder"]),_("pre",null,M(r.form.slug),1)]),_:1},8,["label"]),b(a,{label:e.$t("Short Description")},{default:x(()=>[b(l,{type:"textarea",rows:3,placeholder:e.$t("Course Description"),modelValue:r.form.description,"onUpdate:modelValue":t[3]||(t[3]=C=>r.form.description=C)},null,8,["placeholder","modelValue"])]),_:1},8,["label"]),b(a,{label:e.$t("Privacy")},{default:x(()=>[b(d,{"popper-class":"rich_select",modelValue:r.form.privacy,"onUpdate:modelValue":t[4]||(t[4]=C=>r.form.privacy=C),placeholder:e.$t("Select Privacy")},{default:x(()=>[(g(!0),k(Q,null,Me(r.privacies,(C,T)=>(g(),L(u,{key:T,label:C.label,value:T},{default:x(()=>[_("span",cIe,M(C.label),1),_("p",null,M(C.description),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),r.form.privacy!="public"?(g(),L(a,{key:0,label:e.$t("Lock Screen Type")},{default:x(()=>[b(h,{modelValue:r.form.settings.custom_lock_screen,"onUpdate:modelValue":t[5]||(t[5]=C=>r.form.settings.custom_lock_screen=C)},{default:x(()=>[b(f,{value:"yes"},{default:x(()=>[ne(M(e.$t("Custom")),1)]),_:1}),b(f,{value:"no"},{default:x(()=>[ne(M(e.$t("Default")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"])):O("",!0),b(a,{label:e.$t("Menu Group")},{default:x(()=>[b(d,{modelValue:r.form.parent_id,"onUpdate:modelValue":t[6]||(t[6]=C=>r.form.parent_id=C)},{default:x(()=>[(g(!0),k(Q,null,Me(e.appVars.space_groups,C=>(g(),L(u,{key:C.id,value:C.id.toString(),label:C.title},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]),b(a,{label:e.$t("Enrollment Type")},{default:x(()=>[b(d,{"popper-class":"rich_select",modelValue:r.form.course_type,"onUpdate:modelValue":t[7]||(t[7]=C=>r.form.course_type=C),placeholder:e.$t("Select Type")},{default:x(()=>[(g(!0),k(Q,null,Me(r.courseTypes,(C,T)=>(g(),L(u,{key:T,label:C.label,value:T},{default:x(()=>[_("span",uIe,M(C.label),1),_("p",null,M(C.description),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),b(a,{label:e.$t("Status")},{default:x(()=>[b(h,{modelValue:r.form.status,"onUpdate:modelValue":t[8]||(t[8]=C=>r.form.status=C)},{default:x(()=>[b(f,{value:"published"},{default:x(()=>[ne(M(e.$t("Published")),1)]),_:1}),b(f,{value:"draft"},{default:x(()=>[ne(M(e.$t("Draft")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),e.has_pro&&r.form.id?(g(),L(a,{key:1,label:e.$t("Topic navigation")},{default:x(()=>[b(p,{modelValue:r.form.category_ids,"onUpdate:modelValue":t[9]||(t[9]=C=>r.form.category_ids=C)},null,8,["modelValue"]),_("div",dIe,[_("p",null,[ne(M(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")},M(e.$t("Manage all topics.")),9,fIe)])])]),_:1},8,["label"])):O("",!0),b(a,{label:e.$t("Thumbnail / Open Graph Image (Recommended Size: 1200 x 630)")},{default:x(()=>[r.form.cover_photo?(g(),L(m,{key:0,alt:e.$t("Cover Photo"),src:r.form.cover_photo,style:{"max-width":"100px"}},null,8,["alt","src"])):O("",!0),b(v,{isTextBtn:!1,can_remove:!!r.form.cover_photo,additionalData:{resize:!0,max_width:1200,max_height:630},onUploaded:s.handlePhotoUpload},null,8,["can_remove","onUploaded"]),_("div",hIe,[_("p",null,M(e.$t("Will be used on course card preview and social sharing preview.")),1)])]),_:1},8,["label"]),b(a,null,{default:x(()=>[Ve((g(),L(y,{class:"fcom_primary_button",disabled:r.saving,onClick:t[10]||(t[10]=C=>s.submit())},{default:x(()=>[r.form.id?(g(),k("span",pIe,M(e.$t("Update Info")),1)):(g(),k("span",mIe,M(e.$t("Create")),1))]),_:1},8,["disabled"])),[[w,r.saving]])]),_:1})]),_:1},8,["modelValue"])):(g(),k("div",gIe,[_("p",null,M(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")},M(e.$t("Go to features settings")),9,_Ie)]))}const yIe=fe(aIe,[["render",vIe]]),bIe={name:"SpaceIcon"},wIe={version:"1.1",viewBox:"0 0 128 128","xml:space":"preserve"},kIe=h0('<g><path d="M64,42c-13.2,0-24,10.8-24,24s10.8,24,24,24s24-10.8,24-24S77.2,42,64,42z M64,82c-8.8,0-16-7.2-16-16s7.2-16,16-16 s16,7.2,16,16S72.8,82,64,82z"></path><path d="M64,100.8c-14.9,0-29.2,6.2-39.4,17.1l-2.7,2.9l5.8,5.5l2.7-2.9c8.8-9.4,20.7-14.6,33.6-14.6s24.8,5.2,33.6,14.6l2.7,2.9 l5.8-5.5l-2.7-2.9C93.2,107.1,78.9,100.8,64,100.8z"></path><path d="M97,47.9v8c9.4,0,18.1,3.8,24.6,10.7l5.8-5.5C119.6,52.7,108.5,47.9,97,47.9z"></path><path d="M116.1,20c0-10.5-8.6-19.1-19.1-19.1S77.9,9.5,77.9,20S86.5,39.1,97,39.1S116.1,30.5,116.1,20z M85.9,20 c0-6.1,5-11.1,11.1-11.1s11.1,5,11.1,11.1s-5,11.1-11.1,11.1S85.9,26.1,85.9,20z"></path><path d="M31,47.9c-11.5,0-22.6,4.8-30.4,13.2l5.8,5.5c6.4-6.9,15.2-10.7,24.6-10.7V47.9z"></path><path d="M50.1,20C50.1,9.5,41.5,0.9,31,0.9S11.9,9.5,11.9,20S20.5,39.1,31,39.1S50.1,30.5,50.1,20z M31,31.1 c-6.1,0-11.1-5-11.1-11.1S24.9,8.9,31,8.9s11.1,5,11.1,11.1S37.1,31.1,31,31.1z"></path></g>',1),CIe=[kIe];function SIe(e,t,n,o,r,s){return g(),k("svg",wIe,CIe)}const $Ie=fe(bIe,[["render",SIe]]),EIe={name:"CourseIcon"},xIe={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},TIe=_("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"},null,-1),MIe=_("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"},null,-1),AIe=[TIe,MIe];function OIe(e,t,n,o,r,s){return g(),k("svg",xIe,AIe)}const IIe=fe(EIe,[["render",OIe]]),NIe={name:"SpaceCreateModal",components:{CreateCourseForm:yIe,ArrowLeftBold:qY,CreateSpaceForm:C_,SpaceIcon:$Ie,CourseIcon:IIe},data(){return{step:"choose_type",spaceConfig:null,parent_id:null,createSpaceModal:!1,select_type:"space_form"}},computed:{currentTitle(){return this.step==="choose_type"?this.$t("Choose a Space Type"):this.step==="space_form"?this.$t("Create a Discussion Space"):this.step==="course_form"?this.$t("Create a Course"):""}},methods:{handleNextStep(){this.step=this.select_type},handleClose(){this.createSpaceModal=!1,this.step="choose_type",this.select_type="space_form"}},created(){this.$eventBus.on("createSpaceModal",e=>{this.createSpaceModal=!0,e&&(e.parent_id&&(this.parent_id=e.parent_id),e.spaceConfig?(this.step="space_form",this.select_type="space_form"):e.course_config&&(this.select_type="course_form",this.step="course_form"))})}},PIe={class:"dialog_header"},LIe={class:"dialog_left"},RIe={class:"dialog_body"},FIe={key:0,class:"fcom_choose_space_type"},DIe={class:"fcom_space_choices"},BIe={class:"fcom_space_choice_btn"},VIe={class:"fcom_space_choice_btn"},zIe={key:0},jIe={class:"dialog_footer"};function HIe(e,t,n,o,r,s){const i=z("ArrowLeftBold"),l=ve,a=Ze,c=z("SpaceIcon"),u=z("CourseIcon"),d=z("create-space-form"),f=z("create-course-form"),h=vp;return r.createSpaceModal?(g(),L(h,{key:0,top:"100px","modal-class":"fcom_common_dialog","append-to-body":!0,"close-on-click-modal":!1,width:e.drawerWidth,modelValue:r.createSpaceModal,"onUpdate:modelValue":t[5]||(t[5]=p=>r.createSpaceModal=p),direction:"rtl",onClose:s.handleClose},Ps({header:x(()=>[_("div",PIe,[_("div",LIe,[r.step!="choose_type"?(g(),L(a,{key:0,onClick:t[0]||(t[0]=p=>r.step="choose_type"),text:""},{default:x(()=>[b(l,null,{default:x(()=>[b(i)]),_:1})]),_:1})):O("",!0),_("h4",null,M(s.currentTitle),1)])])]),default:x(()=>[_("div",RIe,[r.step=="choose_type"?(g(),k("div",FIe,[_("div",DIe,[_("div",{onClick:t[1]||(t[1]=p=>r.select_type="space_form"),class:F([{fcom_space_choice_active:r.select_type=="space_form"},"fcom_space_choice"])},[_("div",BIe,[b(l,null,{default:x(()=>[b(c)]),_:1}),_("h4",null,M(e.$t("Discussion Space")),1)])],2),_("div",{onClick:t[2]||(t[2]=p=>r.select_type="course_form"),class:F([{fcom_space_choice_active:r.select_type=="course_form"},"fcom_space_choice"])},[_("div",VIe,[b(l,null,{default:x(()=>[b(u)]),_:1}),_("h4",null,M(e.$t("Course")),1)]),e.hasFeature("has_course")?O("",!0):(g(),k("p",zIe,M(e.$t("Course Module is disabled")),1))],2)])])):O("",!0),r.step=="space_form"?(g(),L(d,{key:1,parent_id:r.parent_id,onCompleted:t[3]||(t[3]=p=>{r.createSpaceModal=!1})},null,8,["parent_id"])):O("",!0),r.step=="course_form"?(g(),L(f,{key:2,parent_id:r.parent_id},null,8,["parent_id"])):O("",!0)])]),_:2},[r.step=="choose_type"?{name:"footer",fn:x(()=>[_("div",jIe,[b(a,{disabled:!r.select_type,class:"fcom_primary_button",onClick:t[4]||(t[4]=p=>s.handleNextStep())},{default:x(()=>[ne(M(e.$t("Next")),1)]),_:1},8,["disabled"])])]),key:"0"}:void 0]),1032,["width","modelValue","onClose"])):O("",!0)}const UIe=fe(NIe,[["render",HIe]]),WIe={name:"PortalApplication",components:{NotificationsPop:cde,NewFeedTicker:zue,SearchBar:IOe,SpaceCreateModal:UIe},data(){return{loading:!1,mobileMenuItems:this.appVars.mobileMenuItems,hasSearchHolder:!1,hasNotificationHolder:!1,isSmallScreen:!1}},watch:{$route(e,t){this.$eventBus.emit("route_updated",{to:e,from:t});const n=e.name;document.body.setAttribute("data-route",n),document.dispatchEvent(new CustomEvent("route_updated",{detail:{to:e,from:t}})),document.querySelectorAll(".feed_layout").forEach(s=>{s.classList.remove("space_opened")}),this.isSmallScreen&&document.querySelector(".feed_layout")&&document.querySelector(".feed_layout").classList.remove("space_opened");const o=e.meta.active_menu;document.querySelectorAll(".fcom_general_menu a").forEach(s=>{s.classList.remove("router-link-exact-active")}),o&&document.querySelectorAll(".fcom_general_menu a.fcom_"+o).forEach(s=>{s.classList.add("router-link-exact-active")}),document.querySelectorAll(".fcom_sidebar_contents a").forEach(s=>{s.classList.remove("router-link-exact-active")}),o&&document.querySelectorAll(".fcom_sidebar_contents a.fcom_"+o).forEach(s=>{s.classList.add("router-link-exact-active")});const r=(s,i)=>{var l;if(i)try{(l=document.querySelector(s+i))==null||l.classList.add("router-link-exact-active")}catch(a){console.error(a)}};e.meta.in_course&&r(".fcom_space_",e.params.course_slug),e.meta.in_space&&r(".space_contents a.fcom_space_",e.params.space)}},methods:{reloadSidebarMenu(){this.$get("options/sidebar-menu-html").then(e=>{e.sidebar_html&&document.getElementById("fcom_sidebar_wrap")&&(document.getElementById("fcom_sidebar_wrap").innerHTML=e.sidebar_html,document.dispatchEvent(new CustomEvent("sidebar_menu_reloaded"))),e.auth_spaces&&(this.auth=e.auth_spaces)})}},created(){this.hasNotificationHolder=this.auth.user_id&&document.getElementsByClassName("fcom_notification_holder").length,this.hasSearchHolder=!!document.getElementsByClassName("fcom_search_holder").length,this.$eventBus.on("fresh_feeds_loaded",e=>{let t=e.space;t||(t="__all"),this.feedMonitorCache[t]=e.feeds[0].id}),document.addEventListener("doCustomGlobalSearch",e=>{this.$eventBus.emit("doGlobalSearch",e.detail.search)}),this.$eventBus.on("reloadMenu",()=>{this.reloadSidebarMenu()}),this.$eventBus.on("toTop",e=>{window.fcomLayoutRef&&(e||(e=0),window.fcomLayoutRef.scrollTo({top:e,behavior:"instant"}))}),this.isSmallScreen=window.innerWidth<=1024},mounted(){}},qIe={class:"fcom_mobile_menu"},KIe={class:"focm_menu_items"},GIe=["innerHTML"],YIe=["innerHTML"],JIe=["href"],ZIe=["innerHTML"],XIe=["innerHTML"];function QIe(e,t,n,o,r,s){const i=z("router-view"),l=z("new-feed-ticker"),a=ve,c=z("router-link"),u=z("search-bar"),d=z("notifications-pop"),f=z("space-create-modal");return g(),k(Q,null,[b(i,{class:F(e.appVars.route_classes)},null,8,["class"]),(g(),L(sr,{to:"body"},[b(l),_("div",qIe,[_("div",KIe,[(g(!0),k(Q,null,Me(r.mobileMenuItems,h=>(g(),k("div",null,[h.route?(g(),L(c,{key:0,"aria-label":e.$t("Go to %s",h.title),class:"focm_menu_item",to:h.route},{default:x(()=>[b(a,null,{default:x(()=>[h.icon?(g(),L(xt(h.icon),{key:0})):h.icon_svg?(g(),k("span",{key:1,innerHTML:h.icon_svg},null,8,GIe)):O("",!0)]),_:2},1024),h.html?(g(),k("span",{key:0,innerHTML:h.html},null,8,YIe)):O("",!0)]),_:2},1032,["aria-label","to"])):(g(),k("a",{key:1,href:h.permalink,class:"focm_menu_item"},[h.icon_svg?(g(),L(a,{key:0},{default:x(()=>[_("span",{innerHTML:h.icon_svg},null,8,ZIe)]),_:2},1024)):O("",!0),_("span",{innerHTML:h.html},null,8,XIe)],8,JIe))]))),256))])])])),r.hasSearchHolder?(g(),L(sr,{key:0,to:".fcom_search_holder"},[b(u)])):O("",!0),r.hasNotificationHolder?(g(),L(sr,{key:1,to:".fcom_notification_holder"},[b(d)])):O("",!0),e.isAdmin?(g(),L(f,{key:2})):O("",!0)],64)}const eNe=fe(WIe,[["render",QIe]]);var tNe=jA,nNe=md,oNe="Expected a function";function rNe(e,t,n){var o=!0,r=!0;if(typeof e!="function")throw new TypeError(oNe);return nNe(n)&&(o="leading"in n?!!n.leading:o,r="trailing"in n?!!n.trailing:r),tNe(e,t,{leading:o,maxWait:t,trailing:r})}var sNe=rNe;const iNe=jl(sNe),lNe={name:"ContentLayout",props:["title","content_class","wrapper_class"],data(){return{throttledScrollHandler:null}},created(){this.throttledScrollHandler=iNe(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}},aNe={key:0,class:"fhr_content_layout_header"},cNe={role:"region","aria-label":"Actions",class:"fhr_page_actions"};function uNe(e,t,n,o,r,s){const i=Vo;return g(),k("div",{class:F([n.wrapper_class,"fhr_content_layout"])},[b(i,{"min-size":100,always:!0,noresize:!0,native:!0,onScroll:s.handleLayoutScroll,ref:"layoutScrollbarRef",height:"calc(100vh - var(--fcom-header-height, 0px)"},{default:x(()=>[le(e.$slots,"header",{},()=>[n.title?(g(),k("div",aNe,[le(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"},M(n.title),1)]),_("div",cNe,[le(e.$slots,"actions")])])):O("",!0)]),le(e.$slots,"sub_header"),_("div",{class:F([n.content_class,"fhr_content_layout_body"])},[le(e.$slots,"default")],2)]),_:3},8,["onScroll"])],2)}const pr=fe(lNe,[["render",uNe]]),dNe={name:"Dashboard",components:{Layout:pr},data(){return{greetings:"",notices:[]}},mounted(){this.$router.push({name:"all_feeds"})}},fNe={key:0,class:"dashboard_actions"},hNe=["innerHTML"],pNe={key:1};function mNe(e,t,n,o,r,s){const i=z("layout");return g(),L(i,{title:r.greetings},{default:x(()=>[r.notices.length?(g(),k("div",fNe,[_("h4",null,M(e.$t("Action required")),1),_("ul",null,[(g(!0),k(Q,null,Me(r.notices,l=>(g(),k("li",{innerHTML:l},null,8,hNe))),256))])])):(g(),k("div",pNe,[_("p",null,M(e.$t("All is well! This dashboard will updated with something awesome!")),1)]))]),_:1},8,["title"])}const gNe=fe(dNe,[["render",mNe]]),_Ne={name:"AppLayout",props:["wrapper_class"]},vNe={class:"feeds_main"};function yNe(e,t,n,o,r,s){const i=z("router-view");return g(),k("div",{class:F([n.wrapper_class,"feeds"])},[_("div",vNe,[le(e.$slots,"before_route_view"),le(e.$slots,"default",{},()=>[b(i)]),le(e.$slots,"after_route_view")])],2)}const Vr=fe(_Ne,[["render",yNe]]),bNe={name:"RecentActivities",props:{context:{default(){return{}}},widget_title:{type:String,default(){return""}},pinned_widget_title:{type:String,default(){return""}},with_pins:{type:Boolean,default(){return!1}},is_trending:{type:Boolean,default(){return!1}},with_pening_count:{type:Boolean,default(){return!1}}},data(){return{activities:[],loading:!1,pinned_posts:[],pending_count:0,after_contents:""}},methods:{getActivities(){this.loading=!0,this.$get("activities",{page:1,per_page:5,context:this.context,with_pins:this.with_pins?1:0,is_trending:this.is_trending?1:0,with_pening_count:this.with_pening_count?1:0}).then(e=>{this.activities=e.activities.data,this.after_contents=e.after_contents,e.pinned_posts&&(this.pinned_posts=e.pinned_posts),e.pending_count&&(this.pending_count=e.pending_count)}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})},goToActivity(e){this.$router.push(e.route)},getActivityLink(e){const t=this.$router.resolve(e.route);let n=this.appVars.urls.portal_base;return n=n.replace(/\/$/,""),n+t.fullPath}},mounted(){this.getActivities()}},wNe={key:0,class:"app_side_widget fcom_widget_highlight"},kNe={class:"widget_header"},CNe={role:"region","aria-label":"Pending Members"},SNe={class:"widget_body"},$Ne={key:1,role:"region","aria-label":"Featured Posts",class:"app_side_widget widget_recent_activities"},ENe={class:"widget_header"},xNe={class:"widget_body notifications_wrap"},TNe={class:"notification_wrap"},MNe=["href"],ANe={class:"notification_item"},ONe={class:"notification_avatar"},INe={class:"notification_content"},NNe=["innerHTML"],PNe={style:{"margin-top":"5px"},class:"feed_timestamp"},LNe={role:"region","aria-label":"Space Activities",class:"app_side_widget widget_recent_activities"},RNe={class:"widget_header"},FNe={class:"widget_body notifications_wrap"},DNe={class:"notification_wrap"},BNe=["href"],VNe={class:"notification_avatar"},zNe={class:"notification_content"},jNe=["innerHTML"],HNe={class:"notification_time_stamp"},UNe={key:2,class:"notification_wrap"},WNe={class:"notification_item"},qNe={class:"notification_content"},KNe={class:"no_notifications"},GNe=["innerHTML"];function YNe(e,t,n,o,r,s){const i=Ze,l=z("UserAvatar"),a=qt;return g(),k(Q,null,[r.pending_count&&n.with_pening_count?(g(),k("div",wNe,[_("div",kNe,[_("h3",CNe,M(e.$t("Pending Members")),1)]),_("div",SNe,[_("p",null,M(e.$t("%s people requested to join the community.",r.pending_count)),1)]),b(i,{role:"link","aria-label":"View pending members",onClick:t[0]||(t[0]=c=>e.$router.push({name:"space_members",query:{view_pending:"yes"}})),type:"danger"},{default:x(()=>[ne(M(e.$t("View pending members")),1)]),_:1})])):O("",!0),n.with_pins&&r.pinned_posts.length?(g(),k("div",$Ne,[_("div",ENe,[_("h3",null,M(n.pinned_widget_title||e.$t("Featured Posts")),1)]),_("div",xNe,[(g(!0),k(Q,null,Me(r.pinned_posts,c=>(g(),k("div",TNe,[_("a",{class:"no_style_link",href:c.permalink},[_("div",ANe,[_("div",ONe,[b(l,{with_level:!1,xprofile:c.xprofile},null,8,["xprofile"])]),_("div",INe,[_("div",{innerHTML:c.message},null,8,NNe),_("span",PNe,M(c.xprofile.display_name),1)])])],8,MNe)]))),256))])])):O("",!0),_("div",LNe,[_("div",RNe,[_("h3",null,M(n.widget_title||e.$t("Recent Activities")),1)]),_("div",FNe,[r.loading?(g(),L(a,{key:0,style:{"min-width":"320px"},animated:!0,rows:5})):r.activities.length?(g(!0),k(Q,{key:1},Me(r.activities,c=>(g(),k("div",DNe,[_("a",{href:s.getActivityLink(c),class:"notification_item"},[_("div",VNe,[b(l,{with_level:!1,xprofile:c.xprofile},null,8,["xprofile"])]),_("div",zNe,[_("div",{innerHTML:c.message},null,8,jNe),_("span",HNe,M(e.humanDateDiff(c.updated_at)),1)])],8,BNe)]))),256)):(g(),k("div",UNe,[_("div",WNe,[_("div",qNe,[_("div",KNe,M(e.$t("No recent activities found")),1)])])]))])]),r.after_contents?(g(),k("div",{key:2,innerHTML:r.after_contents},null,8,GNe)):O("",!0)],64)}const S_=fe(bNe,[["render",YNe]]),JNe={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 ZNe(e,t,n,o,r,s){const i=Hl,l=Ze,a=FA,c=z("CloseBold"),u=ve;return g(),k(Q,null,[b(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:x(()=>[le(e.$slots,"trigger",{},()=>[le(e.$slots,"default",{},()=>[r.imageUrl?(g(),L(i,{key:0,alt:e.$t("Image Preview"),src:r.imageUrl},null,8,["alt","src"])):(g(),L(l,{key:1,class:"fcom_btn_upload",text:""},{default:x(()=>[ne(M(n.button_text),1)]),_:1}))])])]),_:3},8,["action","headers","multiple","data","on-success","on-error"]),r.imageUrl&&n.can_remove?(g(),L(l,{key:0,class:"fcom_bg_remove",text:"",size:"small",onClick:s.removeImage},{default:x(()=>[b(u,null,{default:x(()=>[b(c)]),_:1})]),_:1},8,["onClick"])):O("",!0)],64)}const OL=fe(JNe,[["render",ZNe]]),XNe={name:"WelcomeBannerConfig",props:["savingCount"],emits:["saved"],components:{MediaEmbeder:B3,BgImageUpload:OL,CrepeEditor:wC},data(){return{saving:!1,loading:!1,currentTab:"login",bannerData:{login:{enable:"no",mediaType:"image",title:"",description:"",allowClose:"yes",bannerImage:"",ctaButtons:[],bannerVideo:{type:"oembed",url:"",inner_html:""}},logout:{enable:"no",mediaType:"image",title:"",description:"",bannerImage:"",ctaButtons:[],bannerVideo:{type:"oembed",url:"",inner_html:""}}}}},watch:{savingCount(){this.saveSettings()}},computed:{isEnabled(){return this.bannerData[this.currentTab].enabled=="yes"}},methods:{switchOption(e){this.currentTab=e},addButton(){this.bannerData[this.currentTab].ctaButtons.push({label:"",link:"",type:"primary",newTab:"yes"})},removeButton(e){this.bannerData[this.currentTab].ctaButtons.splice(e,1)},getSettings(){this.loading=!0,this.$get("admin/welcome-banner").then(e=>{this.bannerData=e.settings}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})},saveSettings(){this.saving=!0,this.$post("admin/welcome-banner",{settings:this.bannerData}).then(e=>{this.$notify.success(e.message),this.$emit("saved"),this.Storage.remove("fcom_welcome_banner_closed_auth"),this.Storage.remove("fcom_welcome_banner_closed_guest")}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})}},mounted(){this.getSettings()}},QNe={class:"fcom_customizer_container"},ePe={class:"fcom_wc_banner_header"},tPe={class:"fcom_wc_banner_options"},nPe={class:"fcom_filter_menu"},oPe={class:"fcom_filter_menu_ul"},rPe={key:0,class:"fcom_wc_banner_content"},sPe={class:"fcom_wc_banner_content_header"},iPe={class:"fcom_wc_banner_media_type"},lPe={key:0,class:"fcom_wc_banner_media_image"},aPe={key:1,class:"fcom_wc_banner_media_preview"},cPe={key:0,class:"fcom_wc_banner_cta_buttons"},uPe={class:"fcom_wc_help_text"},dPe={class:"fcom_wc_banner_content_footer"};function fPe(e,t,n,o,r,s){const i=_A,l=V0,a=Oi,c=z("BgImageUpload"),u=Hl,d=z("CloseBold"),f=ve,h=Ze,p=z("media-embeder"),m=Dn,v=Ai,y=z("crepe-editor"),E=jo,w=zo,C=Cie,T=Fr,$=Mi,A=qt,N=Mt("loading");return g(),k("div",QNe,[_("div",ePe,[_("h4",null,M(e.$t("Welcome Banner")),1)]),_("div",tPe,[_("div",nPe,[_("ul",oPe,[_("li",null,[_("a",{onClick:t[0]||(t[0]=Ge(P=>s.switchOption("login"),["prevent"])),class:F({"router-link-exact-active":r.currentTab=="login"}),href:"#"},M(e.$t("Logged in")),3)]),_("li",null,[_("a",{onClick:t[1]||(t[1]=Ge(P=>s.switchOption("logout"),["prevent"])),class:F({"router-link-exact-active":r.currentTab=="logout"}),href:"#"},M(e.$t("Logged out")),3)])])])]),r.loading?(g(),L(A,{key:1,rows:5})):(g(),k("div",rPe,[_("div",sPe,[_("h4",null,M(e.$t(r.currentTab==="login"?"Enable for logged in members":"Enable for logged out members")),1),b(i,{modelValue:r.bannerData[r.currentTab].enabled,"onUpdate:modelValue":t[2]||(t[2]=P=>r.bannerData[r.currentTab].enabled=P),"active-value":"yes","inactive-value":"no"},null,8,["modelValue"])]),_("div",{class:F(["fcom_wc_banner_content_body",{fcom_wc_disabled:!s.isEnabled}])},[_("div",iPe,[_("p",null,M(e.$t("Media type")),1),b(a,{modelValue:r.bannerData[r.currentTab].mediaType,"onUpdate:modelValue":t[3]||(t[3]=P=>r.bannerData[r.currentTab].mediaType=P)},{default:x(()=>[b(l,{label:e.$t("Image"),value:"image"},null,8,["label"]),b(l,{label:e.$t("Video"),value:"video"},null,8,["label"])]),_:1},8,["modelValue"])]),r.bannerData[r.currentTab].mediaType==="image"?(g(),k(Q,{key:0},[r.bannerData[r.currentTab].bannerImage?(g(),k("div",aPe,[b(u,{alt:e.$t("Image Preview"),src:r.bannerData[r.currentTab].bannerImage},null,8,["alt","src"]),b(h,{class:"fcom_secondary_button",text:"",onClick:t[5]||(t[5]=P=>r.bannerData[r.currentTab].bannerImage="")},{default:x(()=>[b(f,null,{default:x(()=>[b(d)]),_:1})]),_:1})])):(g(),k("div",lPe,[_("h4",null,M(e.$t("Featured Image")),1),_("p",null,M(e.$t("Set a featured image at the top of the welcome banner. Recommended image dimension: 1680x600")),1),b(c,{modelValue:r.bannerData[r.currentTab].bannerImage,"onUpdate:modelValue":t[4]||(t[4]=P=>r.bannerData[r.currentTab].bannerImage=P)},null,8,["modelValue"])]))],64)):O("",!0),r.bannerData[r.currentTab].mediaType==="video"?(g(),L(p,{key:1,media:r.bannerData[r.currentTab].bannerVideo},null,8,["media"])):O("",!0),b($,{onSubmit:t[9]||(t[9]=Ge(P=>e.doNothing(),["prevent"])),"label-position":"top",class:"fcom_form_container"},{default:x(()=>[b(v,{label:e.$t("Title")},{default:x(()=>[b(m,{modelValue:r.bannerData[r.currentTab].title,"onUpdate:modelValue":t[6]||(t[6]=P=>r.bannerData[r.currentTab].title=P)},null,8,["modelValue"])]),_:1},8,["label"]),b(v,{label:e.$t("Description")},{default:x(()=>[b(y,{modelValue:r.bannerData[r.currentTab].description,"onUpdate:modelValue":t[7]||(t[7]=P=>r.bannerData[r.currentTab].description=P)},null,8,["modelValue"])]),_:1},8,["label"]),b(v,{label:e.$t("Call to Action")},{default:x(()=>{var P;return[((P=r.bannerData[r.currentTab].ctaButtons)==null?void 0:P.length)>0?(g(),k("div",cPe,[(g(!0),k(Q,null,Me(r.bannerData[r.currentTab].ctaButtons,(I,D)=>{var V;return g(),k("div",{key:D,class:"fcom_wc_banner_cta_button"},[b(v,{label:D?"":e.$t("Button Label")},{default:x(()=>[b(m,{modelValue:I.label,"onUpdate:modelValue":G=>I.label=G},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["label"]),b(v,{label:D?"":e.$t("Button Link")},{default:x(()=>[b(m,{modelValue:I.link,"onUpdate:modelValue":G=>I.link=G},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["label"]),b(v,{label:D?"":e.$t("Button Type"),class:"fcom_wc_banner_select"},{default:x(()=>[b(w,{modelValue:I.type,"onUpdate:modelValue":G=>I.type=G,class:"fcom_select",placeholder:e.$t("Select type")},{default:x(()=>[b(E,{label:e.$t("Primary"),value:"primary"},null,8,["label"]),b(E,{label:e.$t("Secondary"),value:"secondary"},null,8,["label"]),b(E,{label:e.$t("Text"),value:"text"},null,8,["label"]),b(E,{label:e.$t("Link"),value:"link"},null,8,["label"])]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder"])]),_:2},1032,["label"]),b(v,{label:D?"":e.$t("Open in new tab"),class:"fcom_wc_banner_select"},{default:x(()=>[b(w,{modelValue:I.newTab,"onUpdate:modelValue":G=>I.newTab=G,class:"fcom_select"},{default:x(()=>[b(E,{label:e.$t("Yes"),value:"yes"},null,8,["label"]),b(E,{label:e.$t("No"),value:"no"},null,8,["label"])]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["label"]),((V=r.bannerData[r.currentTab].ctaButtons)==null?void 0:V.length)>1?(g(),L(h,{key:0,text:"",class:"wc_button_remove",onClick:G=>s.removeButton(D)},{default:x(()=>[b(f,null,{default:x(()=>[b(d)]),_:1})]),_:2},1032,["onClick"])):O("",!0)])}),128)),b(C,{underline:!1,onClick:s.addButton},{default:x(()=>[ne(M("+ "+e.$t("Add button")),1)]),_:1},8,["onClick"])])):(g(),L(C,{key:1,underline:!1,onClick:s.addButton},{default:x(()=>[ne(M("+ "+e.$t("Add button")),1)]),_:1},8,["onClick"]))]}),_:1},8,["label"]),r.currentTab=="login"?(g(),L(v,{key:0},{default:x(()=>[b(T,{modelValue:r.bannerData[r.currentTab].allowClose,"onUpdate:modelValue":t[8]||(t[8]=P=>r.bannerData[r.currentTab].allowClose=P),"true-value":"yes","false-value":"no"},{default:x(()=>[ne(M(e.$t("Allow members to close the welcome banner")),1)]),_:1},8,["modelValue"]),_("span",uPe,M(e.$t("If allowed, members will be able to hide the banner")),1)]),_:1})):O("",!0)]),_:1})],2),_("div",dPe,[Ve((g(),L(h,{class:"fcom_primary_button",disabled:r.saving,onClick:s.saveSettings},{default:x(()=>[ne(M(e.$t("Update Info")),1)]),_:1},8,["disabled","onClick"])),[[N,r.saving]])])]))])}const hPe=fe(XNe,[["render",fPe]]),pPe={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)}}},mPe={class:"drag-container"},gPe=["onDragstart","onDragover","onDrop"];function _Pe(e,t,n,o,r,s){return g(),k("div",mPe,[b(g0,{name:"flip-list",tag:"div",class:"drag-group"},{default:x(()=>[(g(!0),k(Q,null,Me(n.items,(i,l)=>(g(),k("div",{key:i[n.rowKey],onDragstart:a=>s.dragStart(a,l),onDragend:t[0]||(t[0]=(...a)=>s.dragEnd&&s.dragEnd(...a)),onDragover:Ge(a=>s.dragOver(a,l),["prevent"]),onDrop:Ge(a=>s.dropEnd(a,l),["prevent"]),draggable:!0,class:F(["drag-item",`${n.itemClass} hello_${l}`,{dragging:r.draggingIndex===l}]),style:Be(n.itemStyle)},[le(e.$slots,"item",{data:i,index:l},void 0,!0)],46,gPe))),128))]),_:3})])}const vPe=fe(pPe,[["render",_Pe],["__scopeId","data-v-51d9f44b"]]),yPe={name:"MenuGroupSettings",components:{FluentDnD:vPe,LogoEmojiSelector:VC},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()}}},bPe={key:0,class:"fcom_section_primary"},wPe={class:"fcom_section_primary_item"},kPe={class:"fcom_section_primary_item_title"},CPe={class:"fcom_heading_item"},SPe={class:"fcom_section_item_actions"},$Pe={class:"fcom_section_items menu-items-container"},EPe={key:0,style:{padding:"1rem"}},xPe={class:"fcom_section_item_title"},TPe={class:"fcom_heading_item"},MPe=_("div",{class:"fcom_drag_handle"}," ⋮⋮ ",-1),APe={key:0,class:"community_avatar"},OPe=["src"],IPe={key:1,class:"fcom_emoji"},NPe={key:2,class:"fcom_shape"},PPe=["innerHTML"],LPe={class:"fcom_section_item_actions"},RPe={key:0},FPe={key:1},DPe={key:0};function BPe(e,t,n,o,r,s){const i=Ze,l=ve,a=pp,c=z("FluentDnD"),u=z("logo-emoji-selector"),d=Dn,f=Ai,h=Fr,p=Mi,m=nA;return g(),k(Q,null,[n.menuItems?(g(),k("div",bPe,[_("div",wPe,[_("div",kPe,[_("div",CPe,[le(e.$slots,"title",{},()=>[_("h4",null,M(n.title),1)])])]),_("div",SPe,[b(i,{class:"fcom_primary_button",onClick:t[0]||(t[0]=v=>s.initEditLink({enabled:"yes",new_tab:"yes"}))},{default:x(()=>[ne(M(e.$t("Add New Link")),1)]),_:1})])]),_("div",$Pe,[n.menuItems.length?O("",!0):(g(),k("div",EPe,[_("p",null,M(e.$t("No link has been added for this section")),1)])),b(c,{items:n.menuItems,"row-key":"slug",onDrop:s.drop,"item-class":"fcom_section_item","item-style":"padding: 15px 15px 15px 35px"},{item:x(({data:v,index:y})=>[_("div",xPe,[_("p",TPe,[n.use_icon_selector?(g(),k(Q,{key:0},[MPe,v.icon_image?(g(),k("div",APe,[b(l,null,{default:x(()=>[_("img",{alt:"",style:{"max-width":"16px","max-height":"16px"},src:v.icon_image},null,8,OPe)]),_:2},1024)])):v.emoji?(g(),k("span",IPe,M(v.emoji),1)):v.shape_svg?(g(),k("span",NPe,[b(l,{innerHTML:v.shape_svg},null,8,["innerHTML"])])):O("",!0)],64)):v.icon_svg?(g(),L(l,{key:1},{default:x(()=>[_("span",{innerHTML:v.icon_svg},null,8,PPe)]),_:2},1024)):O("",!0),_("span",null,M(v.title),1),v.is_unavailable=="yes"?(g(),L(a,{key:2,type:"danger"},{default:x(()=>[ne(M(e.$t("unavailable")),1)]),_:1})):v.enabled=="yes"?(g(),L(a,{key:3,type:"success"},{default:x(()=>[ne(M(e.$t("enabled")),1)]),_:1})):(g(),L(a,{key:4,type:"info"},{default:x(()=>[ne(M(e.$t("disabled")),1)]),_:1}))])]),_("div",LPe,[_("div",null,[b(i,{onClick:E=>s.initEditLink(v),size:"small"},{default:x(()=>[ne(M(e.$t("Edit")),1)]),_:2},1032,["onClick"]),v.is_system!="yes"?(g(),L(i,{key:0,onClick:E=>s.removeLink(y),type:"danger",plain:"",size:"small"},{default:x(()=>[ne(M(e.$t("Delete")),1)]),_:2},1032,["onClick"])):O("",!0)])])]),_:1},8,["items","onDrop"])])])):O("",!0),b(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]=v=>r.editLinkModal=v),direction:"rtl"},{header:x(()=>[r.editLinkModal&&r.editLinkModal.slug?(g(),k("h4",RPe,M(e.$t("Edit Link")),1)):(g(),k("h4",FPe,M(e.$t("Add Custom Link")),1))]),default:x(()=>[r.editingItem?(g(),k("div",DPe,[b(p,{onSubmit:t[8]||(t[8]=Ge(v=>e.doNothing(),["prevent"])),"label-position":"top"},{default:x(()=>[b(f,{label:e.$t("Name of the Link")},{default:x(()=>[b(d,{placeholder:e.$t("Public Name of the item"),modelValue:r.editingItem.title,"onUpdate:modelValue":t[2]||(t[2]=v=>r.editingItem.title=v)},Ps({_:2},[n.use_icon_selector&&r.editingItem.is_system!="yesw"?{name:"prepend",fn:x(()=>[b(u,{custom_svg:n.custom_svg,fallback_mark:"",onUpdate:t[1]||(t[1]=v=>{r.editingItem.emoji=v.emoji,r.editingItem.icon_image=v.logo,r.editingItem.shape_svg=v.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"]),b(f,{label:e.$t("URL")},{default:x(()=>[b(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]=v=>r.editingItem.permalink=v)},null,8,["disabled","placeholder","modelValue"])]),_:1},8,["label"]),n.has_svg?(g(),L(f,{key:0,label:e.$t("SVG Code for Icon (Simplified SVG Code) / Emoji")},{default:x(()=>[b(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]=v=>r.editingItem.icon_svg=v)},null,8,["placeholder","modelValue"])]),_:1},8,["label"])):O("",!0),n.has_enable_disable?(g(),L(f,{key:1},{default:x(()=>[b(h,{"true-value":"yes","false-value":"no",modelValue:r.editingItem.enabled,"onUpdate:modelValue":t[5]||(t[5]=v=>r.editingItem.enabled=v)},{default:x(()=>[ne(M(e.$t("Enable this link")),1)]),_:1},8,["modelValue"])]),_:1})):O("",!0),r.editingItem.is_system?O("",!0):(g(),L(f,{key:2},{default:x(()=>[b(h,{"true-value":"yes","false-value":"no",modelValue:r.editingItem.new_tab,"onUpdate:modelValue":t[6]||(t[6]=v=>r.editingItem.new_tab=v)},{default:x(()=>[ne(M(e.$t("Open this link on new tab")),1)]),_:1},8,["modelValue"])]),_:1})),b(f,null,{default:x(()=>[b(i,{class:"fcom_primary_button",onClick:t[7]||(t[7]=v=>s.createOrUpdateLink())},{default:x(()=>[ne(M(e.$t("Save")),1)]),_:1})]),_:1})]),_:1})])):O("",!0)]),_:1},8,["size","modelValue"])],64)}const IL=fe(yPe,[["render",BPe]]),VPe={name:"ManageFeedLinks",components:{MenuGroupSettings:IL},props:["savingCount"],emits:["saved"],data(){return{loading:!1,menuItems:[]}},watch:{savingCount(){this.saveMenuItems()}},methods:{getMenuItems(){this.loading=!0,this.$get("feeds/links").then(e=>{this.menuItems=e.links}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})},saveMenuItems(){let e="feeds/links";this.$post(e,{links:this.menuItems}).then(t=>{this.$notify.success(t.message),this.menuItems=t.links,this.$emit("saved")}).catch(t=>{this.$handleError(t)})}},mounted(){this.getMenuItems()}},zPe={class:"fcom_customizer_container"},jPe={key:0,class:"fcom_card_sections"};function HPe(e,t,n,o,r,s){const i=z("menu-group-settings"),l=qt;return g(),k("div",zPe,[r.loading?O("",!0):(g(),k("div",jPe,[b(i,{custom_svg:!0,use_icon_selector:!0,has_svg:!1,title:e.$t("Manage Links"),menuItems:r.menuItems,onSave:t[0]||(t[0]=a=>s.saveMenuItems())},null,8,["title","menuItems"])])),r.loading?(g(),L(l,{key:1,rows:5,animated:""})):O("",!0)])}const UPe=fe(VPe,[["render",HPe]]),WPe={name:"FeedCustomizer",props:["customize_tab"],components:{WelcomeBannerConfig:hPe,ManageFeedLinks:UPe},data(){return{saving:!1,savingCount:0,changesExist:!1,currentTab:this.customize_tab}},methods:{savedData(){this.saving=!1,this.changesExist=!0},saveChanges(){this.changesExist=!0,this.savingCount=this.savingCount+1},handleBack(){this.$emit("updated",this.changesExist)}}},qPe={class:"fcom_full_editor"},KPe={class:"fcom_full_editor_header"},GPe={class:"fcom_editor_menu object_menu"},YPe={class:"fcom_space_menu_ul"},JPe={class:"full_editor_actions"};function ZPe(e,t,n,o,r,s){const i=z("ArrowLeft"),l=ve,a=Ze,c=JM,u=z("welcome-banner-config"),d=Vo,f=Ii,h=z("manage-feed-links"),p=hd,m=Mt("loading");return g(),k("div",qPe,[b(p,null,{default:x(()=>[b(c,{class:"fcom_full_editor_header_wrap"},{default:x(()=>[_("div",KPe,[_("div",{onClick:t[0]||(t[0]=(...v)=>s.handleBack&&s.handleBack(...v)),class:"fcom_back_header"},[b(l,null,{default:x(()=>[b(i)]),_:1}),ne(" "+M(e.$t("Feed")),1)]),_("div",GPe,[_("ul",YPe,[e.has_pro?(g(),k("li",{key:0,onClick:t[1]||(t[1]=v=>r.currentTab="welcome")},[_("a",{class:F({"router-link-exact-active":r.currentTab==="welcome"}),href:"#"},M(e.$t("Welcome Banner")),3)])):O("",!0),_("li",{onClick:t[2]||(t[2]=v=>r.currentTab="manage_links")},[_("a",{class:F({"router-link-exact-active":r.currentTab==="manage_links"}),href:"#"},M(e.$t("Feed Links")),3)])])]),_("div",JPe,[Ve((g(),L(a,{class:"fcom_primary_button",disabled:r.saving,onClick:s.saveChanges},{default:x(()=>[ne(M(e.$t("Save Changes")),1)]),_:1},8,["disabled","onClick"])),[[m,r.saving]])])])]),_:1}),b(p,{class:"fcom_full_editor_container"},{default:x(()=>[r.currentTab=="welcome"?(g(),L(f,{key:0,class:"fcom_full_editor_main"},{default:x(()=>[b(d,null,{default:x(()=>[b(u,{savingCount:r.savingCount,onSaved:s.savedData},null,8,["savingCount","onSaved"])]),_:1})]),_:1})):r.currentTab=="manage_links"?(g(),L(f,{key:1,class:"fcom_full_editor_main"},{default:x(()=>[b(d,null,{default:x(()=>[b(h,{savingCount:r.savingCount,onSaved:s.savedData},null,8,["savingCount","onSaved"])]),_:1})]),_:1})):O("",!0)]),_:1})]),_:1})])}const XPe=fe(WPe,[["render",ZPe]]),QPe={name:"FeedMenu",components:{FeedCustomizer:XPe},data(){return{customizeTab:"welcome",customizeSpace:!1,popoverVisible:!1}},methods:{openCustomizer(e){this.popoverVisible=!1,this.customizeTab=e,this.customizeSpace=!0},togglePopover(){this.popoverVisible=!this.popoverVisible},updatedFeedSettings(e){this.customizeSpace=!1,e&&location.reload()}}},eLe={class:"actions_items"},tLe={key:0};function nLe(e,t,n,o,r,s){const i=z("MoreFilled"),l=ve,a=Ze,c=$o,u=z("feed-customizer");return g(),k(Q,null,[_("div",null,[b(c,{placement:"bottom",ref:"feed_actions",persistent:!1,visible:r.popoverVisible,onHide:t[2]||(t[2]=d=>r.popoverVisible=!1)},{reference:x(()=>[b(a,{"aria-label":e.$t("View actions"),class:"fcom_dot_menu",size:"small",text:"",onClick:s.togglePopover},{default:x(()=>[b(l,null,{default:x(()=>[b(i)]),_:1})]),_:1},8,["aria-label","onClick"])]),default:x(()=>[_("ul",eLe,[e.has_pro?(g(),k("li",{key:0,onClick:t[0]||(t[0]=d=>s.openCustomizer("welcome"))},M(e.$t("Welcome Banner")),1)):O("",!0),_("li",{onClick:t[1]||(t[1]=d=>s.openCustomizer("manage_links"))},M(e.$t("Manage Links")),1)])]),_:1},8,["visible"])]),r.customizeSpace?(g(),k("div",tLe,[(g(),L(sr,{to:"body"},[b(u,{customize_tab:r.customizeTab,onClose:t[3]||(t[3]=d=>r.customizeSpace=!1),onUpdated:s.updatedFeedSettings},null,8,["customize_tab","onUpdated"])]))])):O("",!0)],64)}const oLe=fe(QPe,[["render",nLe]]),rLe={name:"RenderSpaceLinks",props:{links:{type:Array,required:!0}}},sLe={class:"object_menu"},iLe={class:"fcom_space_menu_ul"},lLe=["target","href"],aLe=["src"],cLe={key:1,class:"fcom_emoji"},uLe={key:2,style:{"font-size":"120%"},class:"fcom_shape"};function dLe(e,t,n,o,r,s){const i=ve;return g(),k("div",sLe,[_("ul",iLe,[(g(!0),k(Q,null,Me(n.links,l=>(g(),k("li",{key:l.slug},[_("a",{target:l.new_tab=="yes"?"_blank":"self",rel:"noopener nofollow",href:l.permalink},[l.icon_image?(g(),k("img",{key:0,alt:"",src:l.icon_image},null,8,aLe)):l.emoji?(g(),k("span",cLe,M(l.emoji),1)):l.shape_svg?(g(),k("span",uLe,[b(i,{innerHTML:l.shape_svg},null,8,["innerHTML"])])):O("",!0),_("span",null,M(l.title),1)],8,lLe)]))),128))])])}const jC=fe(rLe,[["render",dLe]]),fLe={name:"FeedsRoute",components:{Layout:pr,AppLayout:Vr,CreateStatusForm:BC,RecentActivities:S_,FeedMenu:oLe,RenderSpaceLinks:jC},methods:{goToProfile(){this.$router.push({name:"update_profile",params:{username:this.auth.username}})}},mounted(){window.scrollTo(0,0)}},hLe={key:0,"aria-label":"Feed Links",class:"fcom_sub_header"},pLe={key:0},mLe={key:1},gLe={class:"fcom_feed_box"},_Le={key:0,class:"fcom_main_side_wrap"},vLe={class:"fcom_side_box"};function yLe(e,t,n,o,r,s){const i=z("render-space-links"),l=Ze,a=z("feed-menu"),c=z("router-view"),u=Ii,d=z("recent-activities"),f=_p,h=hd,p=z("layout"),m=z("app-layout");return g(),L(m,{wrapper_class:"fcom_single_layout fcom_max_layout"},{default:x(()=>[b(p,{wrapper_class:"no_bg_layout",title:e.$t("Feed")},{sub_header:x(()=>{var v;return[((v=e.appVars.feed_links)==null?void 0:v.length)>0?(g(),k("nav",hLe,[b(i,{links:e.appVars.feed_links},null,8,["links"])])):O("",!0)]}),actions:x(()=>[e.auth.compilation_score<100?(g(),k("div",pLe,[b(l,{onClick:s.goToProfile,type:"danger"},{default:x(()=>[ne(M(e.$t("Complete your profile"))+" ("+M(e.auth.compilation_score)+"%)",1)]),_:1},8,["onClick"])])):O("",!0),e.isAdmin()?(g(),k("div",mLe,[b(a)])):O("",!0)]),default:x(()=>[b(h,{class:"fcom_resp_container fcom_space_container fcom_main_container"},{default:x(()=>[b(u,{class:"fcom_main"},{default:x(()=>[_("div",gLe,[b(c)])]),_:1}),b(f,{class:"fcom_resp_side",width:"306px"},{default:x(()=>[e.isMobile?O("",!0):(g(),k("div",_Le,[_("div",vLe,[b(d,{is_trending:!0,pinned_widget_title:e.$t("Trending Posts"),with_pins:!0},null,8,["pinned_widget_title"])])]))]),_:1})]),_:1})]),_:1},8,["title"])]),_:1})}const bLe=fe(fLe,[["render",yLe]]),wLe={name:"AllFeeds",components:{Feeds:Lp},mounted(){this.changeTitle(this.$t("All Feeds"))}},kLe={key:0,class:"notices fcom_notice_wrap"},CLe=["innerHTML"];function SLe(e,t,n,o,r,s){const i=z("WelcomeBanner"),l=z("feeds");return g(),k(Q,null,[e.appVars.portal_notices&&e.appVars.portal_notices.length?(g(),k("div",kLe,[(g(!0),k(Q,null,Me(e.appVars.portal_notices,a=>(g(),k("div",{innerHTML:a},null,8,CLe))),256))])):O("",!0),e.appVars.welcome_banner?(g(),L(i,{key:1})):O("",!0),b(l,{feed_name:"all_feeds",space:""})],64)}const $Le=fe(wLe,[["render",SLe]]),ELe={name:"ViewFeed",components:{Feed:xL},props:["feed_slug"],data(){return{loading:!0,feed:null,notFound:!1}},watch:{feed_slug(){this.feed=null,this.$nextTick(()=>{this.getFeed()})}},methods:{getFeed(){this.loading=!0,this.$get("feeds/"+this.feed_slug+"/by-slug").then(e=>{this.feed=e.feed,this.appVars.last_feed_id<e.feed.id&&(this.appVars.last_feed_id=e.feed.id),this.changeFeedTitle(),this.$nextTick(()=>{this.checkCommentScroll()}),this.$eventBus.emit("feed_interaction",this.feed.id)}).catch(e=>{this.$handleError(e),typeof e=="object"&&e.xhr_status==404&&(this.notFound=!0)}).finally(()=>{this.loading=!1})},changeFeedTitle(){this.changeTitle(this.feed.title||"Feed")},checkCommentScroll(){this.$route.query.comment_id?setTimeout(()=>{const e=document.getElementById("comment_"+this.$route.query.comment_id);e?(e.classList.add("fcom_highlight_comment"),e.style.scrollMarginTop="100px",e.scrollIntoView({behavior:"instant"})):this.$eventBus.emit("toTop",0)},100):this.$eventBus.emit("toTop",0)}},mounted(){window.__showing_feed?(this.feed=window.__showing_feed,window.__showing_feed=null,this.$nextTick(()=>{this.changeFeedTitle(),this.checkCommentScroll()}),this.$eventBus.emit("feed_interaction",this.feed.id)):this.getFeed()}},xLe={key:2,class:"error-container"},TLe={style:{padding:"20px",background:"var(--fcom-primary-bg)","border-radius":"8px"},class:"error-content"},MLe={class:"error-title"},ALe={class:"error-message"},OLe={class:"error-explanation"},ILe={style:{"list-style":"disc",margin:"0 0 0 20px"},class:"error-reasons"},NLe={style:{"margin-top":"20px"},class:"error-actions"},PLe=["href"];function LLe(e,t,n,o,r,s){const i=z("feed"),l=qt;return g(),k("div",null,[r.feed?(g(),L(i,{key:0,is_single:!0,feed:r.feed},null,8,["feed"])):r.loading?(g(),L(l,{key:1,rows:5,animated:!0,class:"white_loaded"})):r.notFound?(g(),k("div",xLe,[_("div",TLe,[_("h1",MLe,M(e.$t("Post Not Found")),1),_("p",ALe,M(e.$t("Sorry, the requested post could not be found.")),1),_("p",OLe,M(e.$t("This may be due to one of the following reasons:")),1),_("ul",ILe,[_("li",null,M(e.$t("You do not have permission to view this post")),1),_("li",null,M(e.$t("The post URL may be incorrect")),1),_("li",null,M(e.$t("The post has been deleted")),1)]),_("div",NLe,[_("a",{href:e.$getRouteLink(""),class:"el-button fcom_primary_button"},M(e.$t("Back to home")),9,PLe)])])])):O("",!0)])}const b9=fe(ELe,[["render",LLe]]),RLe={name:"SpaceHeader",emits:["refetch","doSearch"],components:{ImageUploader:vc},props:{space:{type:String,required:!0},space_profile:{required:!1}},data(){return{updating:!1}},computed:{profile(){return this.space_profile?(this.search="",this.space_profile):{title:".......",slug:"..",cover_photo:this.appVars.assets_url+"images/placeholer.png",permissions:{}}},isMod(){return this.profile.permissions.community_moderator}},methods:{handleCoverPhotoUpload(e){this.space_profile.cover_photo=e,this.updateSpace({cover_photo:e})},updateSpace(e){this.space_profile.id&&(this.updating=!0,this.$put("spaces/"+this.space+"/by-slug",{data:e}).then(t=>{this.$notify.success(t.message),this.$emit("refetch"),this.$eventBus.emit("reloadMenu")}).catch(t=>{this.$handleError(t)}).finally(()=>{this.updating=!1}))}},mounted(){this.$eventBus.on("doGlobalSearch",e=>{this.search_term=e})}},FLe={key:0,class:"object_header space_header"},DLe={key:0,style:{"text-align":"right"},class:"object_media_uploader"};function BLe(e,t,n,o,r,s){const i=Ze,l=z("image-uploader"),a=Mt("loading");return s.profile.cover_photo?Ve((g(),k("div",FLe,[_("div",{style:Be({backgroundImage:"url("+s.profile.cover_photo+")"}),class:"object_cover"},[s.isMod?(g(),k("div",DLe,[b(l,{additionalData:{resize:!0,max_width:1500},onUploaded:s.handleCoverPhotoUpload},{default:x(()=>[b(i,{size:"small",plain:"",type:"primary"},{default:x(()=>[ne(M(e.$t("Change Cover")),1)]),_:1})]),_:1},8,["onUploaded"]),b(i,{style:{"margin-top":"20px"},size:"small",plain:"",type:"danger",onClick:t[0]||(t[0]=Ge(c=>s.updateSpace({cover_photo:""}),["prevent"]))},{default:x(()=>[ne(M(e.$t("Remove")),1)]),_:1})])):O("",!0)],4)])),[[a,r.updating]]):O("",!0)}const VLe=fe(RLe,[["render",BLe]]),zLe={name:"SpaceMenuItems",props:["space","profile"]},jLe={"aria-label":"Space menu"},HLe={class:"fcom_space_menu_ul"},ULe={key:0},WLe={key:1},qLe={key:2};function KLe(e,t,n,o,r,s){const i=z("router-link");return g(),k("nav",jLe,[_("ul",HLe,[_("li",null,[b(i,{to:{name:"space_feeds",params:{space:n.space}}},{default:x(()=>[ne(M(e.$t("Posts")),1)]),_:1},8,["to"])]),n.profile.permissions.can_view_members?(g(),k("li",ULe,[b(i,{to:{name:"space_members",params:{space:n.space}}},{default:x(()=>[ne(M(e.$t("Members")),1)]),_:1},8,["to"])])):O("",!0),n.profile.chat_thread_id&&n.profile.permissions.can_create_post?(g(),k("li",WLe,[b(i,{to:{name:"chat_app",query:{thread_id:n.profile.chat_thread_id}}},{default:x(()=>[ne(M(e.$t("Chat")),1)]),_:1},8,["to"])])):O("",!0),e.isMobile?(g(),k("li",qLe,[b(i,{to:{name:"space_about"}},{default:x(()=>[ne(M(e.$t("About")),1)]),_:1})])):O("",!0)])])}const GLe=fe(zLe,[["render",KLe]]),YLe={name:"LockscreenMeta",components:{BgImageUpload:OL},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}}},JLe={key:0,class:"fcom_lockscreen_meta"},ZLe={class:"fcom_meta_section lockscreen_meta"},XLe={class:"fcom_description"},QLe={class:"fcom_meta_section lockscreen_meta"},eRe={class:"fcom_meta_label"},tRe={class:"fcom_meta_content"},nRe={class:"fcom_meta_block"},oRe={class:"fcom_block_label"},rRe={class:"fcom_meta_sorting"},sRe={class:"fcom_block_action"},iRe={key:1,class:"fcom_lockscreen_meta"},lRe={class:"fcom_edit_title"},aRe={class:"fcom_edit_content"},cRe={class:"fcom_color_input_wrap"},uRe={class:"fcom_color_input_wrap"},dRe={class:"fcom_color_input_wrap"},fRe={class:"fcom_color_input_wrap"},hRe={class:"fcom_color_input_wrap"},pRe={key:1,class:"fcom_description"};function mRe(e,t,n,o,r,s){const i=ve,l=z("Top"),a=z("Bottom"),c=z("EditPen"),u=z("Hide"),d=z("View"),f=z("Back"),h=Dn,p=Ai,m=Mi,v=IA,y=z("BgImageUpload"),E=WM,w=OA;return r.editing?(g(),k("div",iRe,[_("div",lRe,[b(i,{onClick:s.backToFields},{default:x(()=>[b(f)]),_:1},8,["onClick"]),_("p",null,M(r.editingField.label),1)]),_("div",aRe,[r.editingField.type=="image"?(g(),L(w,{key:0,modelValue:r.editTab,"onUpdate:modelValue":t[17]||(t[17]=C=>r.editTab=C),class:"demo-tabs"},{default:x(()=>[b(v,{label:e.$t("Content"),name:"content"},{default:x(()=>[b(m,{onSubmit:t[4]||(t[4]=Ge(C=>e.doNothing(),["prevent"])),model:r.editingField,"label-position":"top",class:"form-container"},{default:x(()=>[b(p,{label:e.$t("Heading")},{default:x(()=>[b(h,{modelValue:r.editingField.heading,"onUpdate:modelValue":t[0]||(t[0]=C=>r.editingField.heading=C),class:"ttt",placeholder:e.$t("Heading")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),b(p,{label:e.$t("Description")},{default:x(()=>[b(h,{modelValue:r.editingField.description,"onUpdate:modelValue":t[1]||(t[1]=C=>r.editingField.description=C),type:"textarea",placeholder:e.$t("Description")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),b(p,{label:e.$t("Button Label")},{default:x(()=>[b(h,{modelValue:r.editingField.button_text,"onUpdate:modelValue":t[2]||(t[2]=C=>r.editingField.button_text=C),placeholder:e.$t("Button Label")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),b(p,{label:e.$t("Button Link")},{default:x(()=>[b(h,{modelValue:r.editingField.button_link,"onUpdate:modelValue":t[3]||(t[3]=C=>r.editingField.button_link=C)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1},8,["model"])]),_:1},8,["label"]),b(v,{label:e.$t("Design"),name:"design"},{default:x(()=>[b(m,{onSubmit:t[16]||(t[16]=Ge(C=>e.doNothing(),["prevent"])),model:r.editingField,"label-position":"top",class:"form-container"},{default:x(()=>[b(p,{label:e.$t("Background Image"),class:"fcom_bg_image"},{default:x(()=>[b(y,{modelValue:r.editingField.background_image,"onUpdate:modelValue":t[5]||(t[5]=C=>r.editingField.background_image=C),can_remove:!0},null,8,["modelValue"])]),_:1},8,["label"]),b(p,{label:e.$t("Overlay Color")},{default:x(()=>[_("div",cRe,[b(E,{modelValue:r.editingField.overlay_color,"onUpdate:modelValue":t[6]||(t[6]=C=>r.editingField.overlay_color=C)},null,8,["modelValue"]),b(h,{modelValue:r.editingField.overlay_color,"onUpdate:modelValue":t[7]||(t[7]=C=>r.editingField.overlay_color=C)},null,8,["modelValue"])])]),_:1},8,["label"]),b(p,{label:e.$t("Heading Color")},{default:x(()=>[_("div",uRe,[b(E,{modelValue:r.editingField.heading_color,"onUpdate:modelValue":t[8]||(t[8]=C=>r.editingField.heading_color=C)},null,8,["modelValue"]),b(h,{modelValue:r.editingField.heading_color,"onUpdate:modelValue":t[9]||(t[9]=C=>r.editingField.heading_color=C)},null,8,["modelValue"])])]),_:1},8,["label"]),b(p,{label:e.$t("Text Color")},{default:x(()=>[_("div",dRe,[b(E,{modelValue:r.editingField.text_color,"onUpdate:modelValue":t[10]||(t[10]=C=>r.editingField.text_color=C)},null,8,["modelValue"]),b(h,{modelValue:r.editingField.text_color,"onUpdate:modelValue":t[11]||(t[11]=C=>r.editingField.text_color=C)},null,8,["modelValue"])])]),_:1},8,["label"]),b(p,{label:e.$t("Button Label")},{default:x(()=>[_("div",fRe,[b(E,{modelValue:r.editingField.button_text_color,"onUpdate:modelValue":t[12]||(t[12]=C=>r.editingField.button_text_color=C)},null,8,["modelValue"]),b(h,{modelValue:r.editingField.button_text_color,"onUpdate:modelValue":t[13]||(t[13]=C=>r.editingField.button_text_color=C)},null,8,["modelValue"])])]),_:1},8,["label"]),b(p,{label:e.$t("Button Background")},{default:x(()=>[_("div",hRe,[b(E,{modelValue:r.editingField.button_color,"onUpdate:modelValue":t[14]||(t[14]=C=>r.editingField.button_color=C),"show-alpha":""},null,8,["modelValue"]),b(h,{modelValue:r.editingField.button_color,"onUpdate:modelValue":t[15]||(t[15]=C=>r.editingField.button_color=C)},null,8,["modelValue"])])]),_:1},8,["label"])]),_:1},8,["model"])]),_:1},8,["label"])]),_:1},8,["modelValue"])):r.editingField.type=="block"?(g(),k("div",pRe,M(e.$t("Edit the field from block editor ")),1)):O("",!0)])])):(g(),k("div",JLe,[_("div",ZLe,[_("div",XLe,[_("p",null,M(e.$t("This page is only visible to non-members viewing a private space.")),1)])]),_("div",QLe,[_("div",eRe,M(e.$t("Page Blocks")),1),_("div",tRe,[_("ul",nRe,[(g(!0),k(Q,null,Me(s.lockscreenFields,(C,T)=>(g(),k("li",{class:F(["fcom_block_list",{block_hidden:C.hidden}])},[_("div",oRe,[b(i,{class:"fcom_el_icon"},{default:x(()=>[(g(),L(xt(s.getFieldIcon(C))))]),_:2},1024),_("p",null,M(C.label),1)]),_("div",rRe,[b(i,{onClick:$=>s.moveUp(T)},{default:x(()=>[b(l)]),_:2},1032,["onClick"]),b(i,{onClick:$=>s.moveDown(T)},{default:x(()=>[b(a)]),_:2},1032,["onClick"])]),_("div",sRe,[b(i,{onClick:$=>s.updateField(C)},{default:x(()=>[b(c)]),_:2},1032,["onClick"]),C.hidden?(g(),L(i,{key:0,onClick:$=>s.toggleHidden(C)},{default:x(()=>[b(u)]),_:2},1032,["onClick"])):(g(),L(i,{key:1,onClick:$=>s.toggleHidden(C)},{default:x(()=>[b(d)]),_:2},1032,["onClick"]))])],2))),256))])])])]))}const gRe=fe(YLe,[["render",mRe]]),_Re={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)}},vRe={class:"fcom_block_editor"};function yRe(e,t,n,o,r,s){const i=qt;return g(),k("div",vRe,[Ve(_("div",null,[_("textarea",{ref:"block_editor",id:"fcom_block_editor",name:"block_editor"},M(r.html),513)],512),[[sn,r.all_loaded]]),r.all_loaded?O("",!0):(g(),L(i,{key:0,class:"white_loaded",rows:7,animated:!0}))])}const bRe=fe(_Re,[["render",yRe]]),wRe={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)}}},kRe={class:"fcom_course_sections"},CRe={class:"fcom_course_intro"},SRe={class:"fcom_course_labels"},$Re={class:"fcom_course_info"},ERe=_("span",null," • ",-1),xRe={class:"fcom_card_sections"},TRe={class:"fcom_section_items"},MRe={key:0,class:"fcom_section_primary_item"},ARe={class:"fcom_section_primary_item_title"},ORe={class:"fcom_section_primary_item_actions"},IRe={class:"fcom_meta_text"},NRe={class:"fcom_section_item_title"},PRe={class:"fcom_heading_item clickable"};function LRe(e,t,n,o,r,s){const i=z("ArrowRight"),l=z("ArrowDown"),a=ve,c=z("Lock");return g(),k("div",kRe,[_("div",CRe,[_("div",SRe,[_("h3",null,M(e.$t("Course content")),1),_("p",$Re,[ne(M(e.$t("%s topics",s.sectionsCount))+" ",1),ERe,ne(" "+M(e.$t("%s lessons",s.lessonsCount)),1)])])]),_("div",xRe,[_("div",TRe,[(g(!0),k(Q,null,Me(n.sections,u=>(g(),k("div",{key:u.id,class:"fcom_section_primary"},[u.lessons.length?(g(),k("div",MRe,[_("div",ARe,[b(a,{class:"clickable",onClick:d=>u.is_closed=!u.is_closed},{default:x(()=>[u.is_closed?(g(),L(i,{key:0})):(g(),L(l,{key:1}))]),_:2},1032,["onClick"]),_("h4",null,M(u.title),1)]),_("div",ORe,[_("span",IRe,M(e.$t("%d lessons",u.lessons.length)),1)])])):O("",!0),u.is_closed?O("",!0):(g(!0),k(Q,{key:1},Me(u.lessons,d=>(g(),k("div",{key:d.id,class:"fcom_section_item"},[_("div",NRe,[_("p",PRe,[b(a,null,{default:x(()=>[b(c)]),_:1}),ne(" "+M(d.title),1)])])]))),128))]))),128))])])])}const NL=fe(wRe,[["render",LRe]]),RRe={name:"LockScreenEditor",props:["title","lockscreen","sections","saving","loading"],emits:["save","close"],components:{LessonEditor:NL,MediaEmbeder:B3,BlockEditor:bRe,LockscreenMeta:gRe},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")}}},FRe={class:"fcom_editor_topbar"},DRe={class:"fcom_editor_content"},BRe={class:"fcom_item"},VRe={class:"fcom_content"},zRe=["onInput"],jRe=["onInput"],HRe=["onInput"],URe={key:1,class:"fcom_content_wrap"},WRe={key:0,id:"fcomBlockContent"},qRe=["onClick","innerHTML"],KRe={key:2,class:"fcom_content_wrap"};function GRe(e,t,n,o,r,s){const i=z("lockscreen-meta"),l=_p,a=z("Lock"),c=ve,u=z("block-editor"),d=z("lesson-editor"),f=qt,h=Vo,p=Ii;return g(),k(Q,null,[b(l,{class:"fcol_full_editor_side lockscreen_editor",width:"250px"},{default:x(()=>[le(e.$slots,"before_meta"),b(i,{lockscreen:n.lockscreen,onEditField:s.updateEditField},null,8,["lockscreen","onEditField"])]),_:3}),b(p,{class:"fcom_full_editor_main lockscreen_editor"},{default:x(()=>[b(h,null,{default:x(()=>[_("div",FRe,[b(c,null,{default:x(()=>[b(a)]),_:1}),_("h3",null,M(n.title),1)]),_("div",DRe,[(g(!0),k(Q,null,Me(s.lockscreenFields,m=>{var v;return g(),k("div",BRe,[m.type=="image"?(g(),k("div",{key:0,class:"fcom_image_wrap",style:Be(s.imageStyles(m))},[_("div",VRe,[_("h2",{style:Be(s.headingStyles(m)),contenteditable:"true",onInput:y=>s.updateHeading(y,m)},M(m.heading),45,zRe),_("p",{style:Be(s.descriptionStyles(m)),contenteditable:"true",onInput:y=>s.updateDescription(y,m)},M(m.description),45,jRe),_("button",{class:"fcom_btn",style:Be(s.buttonStyles(m)),contenteditable:"true",onInput:y=>s.updateButtonLabel(y,m)},M(m.button_text),45,HRe)])],4)):O("",!0),m.type=="block"?(g(),k("div",URe,[((v=r.editingField)==null?void 0:v.type)=="block"?(g(),k("div",WRe,[b(u,{modelValue:m.content,"onUpdate:modelValue":y=>m.content=y},null,8,["modelValue","onUpdate:modelValue"])])):(g(),k("div",{key:1,onClick:y=>s.visibleBlock(m),innerHTML:m.content},null,8,qRe))])):O("",!0),m.type=="lesson"?(g(),k("div",KRe,[n.loading?(g(),L(f,{key:1,rows:5,animated:!0})):(g(),L(d,{key:0,sections:n.sections},null,8,["sections"]))])):O("",!0)])}),256))])]),_:1})]),_:1})],64)}const YRe=fe(RRe,[["render",GRe]]),JRe={name:"SpaceLockscreen",props:["spaceProfile","savingCount"],emits:["close"],components:{LockScreenEditor:YRe},data(){return{saving:!1,loading:!1,lockscreen:null}},watch:{savingCount(){this.saveChanges()}},methods:{saveChanges(){this.lockscreen&&(this.saving=!0,this.$put("spaces/"+this.spaceProfile.slug+"/lockscreens",{lockscreen:this.lockscreen}).then(e=>{this.$notify.success(e.message)}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1}))},getLockscreen(){this.loading=!0,this.$get("spaces/"+this.spaceProfile.slug+"/lockscreens").then(e=>{this.lockscreen=e.lockscreen}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})}},mounted(){this.getLockscreen()}},ZRe={key:0,class:"fcom_lockscreen_meta"},XRe={class:"fcom_description"},QRe={class:"white_loaded"};function eFe(e,t,n,o,r,s){const i=z("lock-screen-editor"),l=qt,a=Ii;return r.lockscreen?(g(),L(i,{key:0,title:n.spaceProfile.title,lockscreen:r.lockscreen,saving:r.saving,loading:r.loading,onSave:s.saveChanges,onClose:t[0]||(t[0]=c=>e.$emit("close"))},{before_meta:x(()=>[n.spaceProfile.settings.custom_lock_screen!="yes"?(g(),k("div",ZRe,[_("div",XRe,[_("p",null,M(e.$t("__LOCK_SCRREN_DESC")),1)])])):O("",!0)]),_:1},8,["title","lockscreen","saving","loading","onSave"])):r.loading?(g(),L(a,{key:1,class:"fcom_full_editor_main lockscreen_editor"},{default:x(()=>[_("div",QRe,[b(l,{animated:!0,rows:10})])]),_:1})):O("",!0)}const tFe=fe(JRe,[["render",eFe]]),nFe={name:"ManageSpaceLinks",components:{MenuGroupSettings:IL},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})}}},oFe={style:{"max-width":"800px",padding:"20px",margin:"0 auto"}},rFe={class:"fcom_card_sections"};function sFe(e,t,n,o,r,s){const i=z("menu-group-settings"),l=Vo,a=Ii;return g(),L(a,{class:"fcom_full_editor_main lockscreen_editor"},{default:x(()=>[b(l,null,{default:x(()=>[_("div",oFe,[_("div",rFe,[b(i,{custom_svg:!0,use_icon_selector:!0,has_svg:!1,onSave:t[0]||(t[0]=c=>s.saveMenuItems()),title:e.$t("Manage Links"),menuItems:n.spaceProfile.settings.links},null,8,["title","menuItems"])])])]),_:1})]),_:1})}const iFe=fe(nFe,[["render",sFe]]),lFe={name:"SpaceCustomizer",props:["space_profile"],emits:["close","completed"],components:{SpaceLockscreen:tFe,CreateSpaceForm:C_,ManageSpaceLinks:iFe},data(){return{saving:!1,currentTab:"general",savingCount:0}},methods:{saveChanges(){this.savingCount=this.savingCount+1}}},aFe={key:0,class:"fcom_full_editor"},cFe={class:"fcom_full_editor_header"},uFe={class:"fcom_editor_menu object_menu"},dFe={class:"fcom_space_menu_ul"},fFe={class:"full_editor_actions"},hFe={class:"fcom_full_editor_content"};function pFe(e,t,n,o,r,s){const i=z("ArrowLeft"),l=ve,a=Ze,c=JM,u=z("create-space-form"),d=Vo,f=Ii,h=z("space-lockscreen"),p=z("manage-space-links"),m=hd,v=Mt("loading");return n.space_profile?(g(),k("div",aFe,[b(m,null,{default:x(()=>[b(c,{class:"fcom_full_editor_header_wrap"},{default:x(()=>[_("div",cFe,[_("div",{onClick:t[0]||(t[0]=y=>e.$emit("completed")),class:"fcom_back_header"},[b(l,null,{default:x(()=>[b(i)]),_:1}),ne(" "+M(n.space_profile.title),1)]),_("div",uFe,[_("ul",dFe,[_("li",{onClick:t[1]||(t[1]=y=>r.currentTab="general")},[_("a",{class:F({"router-link-exact-active":r.currentTab==="general"}),href:"#"},M(e.$t("General Settings")),3)]),n.space_profile.privacy=="private"?(g(),k("li",{key:0,onClick:t[2]||(t[2]=y=>r.currentTab="lock_screen")},[_("a",{class:F({"router-link-exact-active":r.currentTab==="lock_screen"}),href:"#"},M(e.$t("Lock Screen")),3)])):O("",!0),_("li",{onClick:t[3]||(t[3]=y=>r.currentTab="manage_links")},[_("a",{class:F({"router-link-exact-active":r.currentTab==="manage_links"}),href:"#"},M(e.$t("Space Links")),3)])])]),_("div",fFe,[Ve((g(),L(a,{class:"fcom_primary_button",disabled:r.saving,onClick:s.saveChanges},{default:x(()=>[ne(M(e.$t("Save Changes")),1)]),_:1},8,["disabled","onClick"])),[[v,r.saving]])])])]),_:1}),b(m,{class:"fcom_full_editor_container"},{default:x(()=>[r.currentTab=="general"?(g(),L(f,{key:0,class:"fcom_full_editor_main lockscreen_editor"},{default:x(()=>[b(d,null,{default:x(()=>[_("div",hFe,[b(u,{savingCount:r.savingCount,community:n.space_profile},null,8,["savingCount","community"])])]),_:1})]),_:1})):r.currentTab=="lock_screen"?(g(),L(h,{key:1,savingCount:r.savingCount,onClose:t[4]||(t[4]=y=>e.$emit("close")),spaceProfile:n.space_profile},null,8,["savingCount","spaceProfile"])):r.currentTab=="manage_links"?(g(),L(p,{key:2,savingCount:r.savingCount,onClose:t[5]||(t[5]=y=>e.$emit("close")),spaceProfile:n.space_profile},null,8,["savingCount","spaceProfile"])):O("",!0)]),_:1})]),_:1})])):O("",!0)}const mFe=fe(lFe,[["render",pFe]]),gFe={name:"SpaceMenu",emits:["refetch","doSearch"],components:{ImageUploader:vc,SpaceMenuItems:GLe,SpaceCustomizer:mFe},props:{space:{type:String,required:!0},space_profile:{required:!1}},data(){return{joining:!1,updating:!1,editLockscreen:!1,search_term:this.$route.query.search||"",SearchIcon:ns(ju),customizeSpace:!1,drawerVisible:!1}},computed:{profile(){return this.space_profile?(this.search="",this.space_profile):{title:".......",slug:"..",cover_photo:this.appVars.assets_url+"images/placeholer.png",permissions:{}}},isMod(){return this.profile.permissions.community_moderator}},methods:{join(){this.joining=!0,this.$post("spaces/"+this.space+"/join").then(e=>{this.appVars.user_membership_slugs.push(this.space),this.$notify.success(e.message),this.profile.membership=e.membership,this.$emit("refetch"),this.$eventBus.emit("reloadMenu")}).catch(e=>{this.$handleError(e)}).finally(()=>{this.joining=!1})},leave(){this.$confirm(this.$t("Are you sure you want to leave this community?"),this.$t("Leave Space"),{confirmButtonText:this.$t("Leave Space"),cancelButtonText:this.$t("Cancel"),type:"warning"}).then(()=>{this.joining=!0,this.$post("spaces/"+this.space+"/leave").then(e=>{this.appVars.user_membership_slugs.splice(this.appVars.user_membership_slugs.indexOf(this.space),1),this.$notify.success(e.message),this.profile.membership=null,this.$emit("refetch"),this.$eventBus.emit("leaveCommunity",this.space),this.$eventBus.emit("reloadMenu")}).catch(e=>{this.$handleError(e)}).finally(()=>{this.joining=!1})})},initDeleteSpace(){this.$refs.space_actions.hide(),this.$confirm(this.$t("Are you sure you want to delete this space?"),this.$t("Warning"),{confirmButtonText:this.$t("Yes, Delete the Space"),cancelButtonText:this.$t("No"),type:"warning"}).then(()=>{this.$promt('Please Type "DELETE" to confirm. Please note, all the posts, comments, activities of this Space will be delete.',this.$t("Delete Space"),{confirmButtonText:this.$t("Confirm Delete"),cancelButtonText:this.$t("Cancel")}).then(e=>{e.value==="DELETE"?this.deleteSpace():this.$notify.error(this.$t("The verification string does not match"))})})},deleteSpace(){this.$del("spaces/"+this.space_profile.slug).then(e=>{this.$notify.success(e.message),this.$router.push({name:"all_feeds"}),this.$eventBus.emit("reloadMenu")}).catch(e=>{this.$handleError(e)})},handleCoverPhotoUpload(e){this.space_profile.cover_photo=e,this.updateSpace({cover_photo:e})},handlePhotoUpload(e){this.profile.logo=e,this.updateSpace({logo:e})},updateSpace(e){this.space_profile.id&&(this.updating=!0,this.$put("spaces/"+this.space+"/by-slug",{data:e}).then(t=>{this.$notify.success(t.message),this.$emit("refetch"),this.$eventBus.emit("reloadMenu")}).catch(t=>{this.$handleError(t)}).finally(()=>{this.updating=!1}))},initEdit(){this.customizeSpace=!0},performSearch(){this.$eventBus.emit("doGlobalSearch",this.search_term)}},mounted(){this.$eventBus.on("doGlobalSearch",e=>{this.search_term=e})}},_Fe={class:"space_header"},vFe={class:"object_menu"},yFe={key:0,class:"menu_actions"},bFe={class:"actions_items"},wFe=_("li",{class:"fcom_li_separator"},null,-1),kFe={key:0};function CFe(e,t,n,o,r,s){const i=z("space-menu-items"),l=Ze,a=z("MoreFilled"),c=ve,u=$o,d=z("space-customizer"),f=Mt("loading");return g(),k(Q,null,[Ve((g(),k("div",_Fe,[_("div",vFe,[b(i,{space:n.space,profile:s.profile,class:"fcom_desktop_only"},null,8,["space","profile"]),s.profile.id?(g(),k("div",yFe,[e.auth.user_id&&!s.profile.membership?Ve((g(),L(l,{key:0,disabled:r.joining,onClick:t[0]||(t[0]=h=>s.join()),class:"fcom_primary_button"},{default:x(()=>[ne(M(e.$t("Join")),1)]),_:1},8,["disabled"])),[[f,r.joining]]):e.auth.user_id?(g(),L(u,{key:1,persistent:!1,ref:"space_actions",placement:"bottom",width:200,trigger:"click"},{reference:x(()=>[b(l,{"aria-label":e.$t("View actions"),class:"fcom_dot_menu",size:"small",text:""},{default:x(()=>[b(c,null,{default:x(()=>[b(a)]),_:1})]),_:1},8,["aria-label"])]),default:x(()=>[b(i,{space:n.space,profile:s.profile,class:"fcom_linked_menus fcom_sm_only"},null,8,["space","profile"]),_("ul",bFe,[e.hasCurrentSpacePermission("community_admin")?(g(),k(Q,{key:0},[_("li",{onClick:t[1]||(t[1]=()=>{s.initEdit(),e.$refs.space_actions.hide()})},M(e.$t("Space Settings")),1),wFe],64)):O("",!0),_("li",{onClick:t[2]||(t[2]=()=>{e.$refs.space_actions.hide(),s.leave()})},M(e.$t("Leave Space")),1),e.hasPermission("super_admin")?(g(),k("li",{key:1,onClick:t[3]||(t[3]=(...h)=>s.initDeleteSpace&&s.initDeleteSpace(...h))},M(e.$t("Delete")),1)):O("",!0)])]),_:1},512)):O("",!0)])):O("",!0)])])),[[f,r.updating]]),r.customizeSpace&&n.space_profile?(g(),k("div",kFe,[(g(),L(sr,{to:"body"},[b(d,{space_profile:n.space_profile,onClose:t[4]||(t[4]=h=>r.customizeSpace=null),onCompleted:t[5]||(t[5]=h=>{r.customizeSpace=!1,e.$emit("refetch")})},null,8,["space_profile"])]))])):O("",!0)],64)}const PL=fe(gFe,[["render",CFe]]),SFe={name:"AboutSpace",components:{RecentActivities:S_},props:["space_profile","has_permission"],data(){return{privacies:rL}}},$Fe={class:"fcom_main_side_wrap"},EFe={role:"region","aria-label":"About Space",class:"app_side_widget widget_recent_activities"},xFe={class:"widget_header"},TFe={key:0,class:"widget_body"},MFe=["innerHTML"],AFe={class:"space_meta"},OFe={class:"space_meta_item"},IFe={class:"meta_label"},NFe={class:"meta_desc"};function PFe(e,t,n,o,r,s){var u,d,f;const i=z("Guide"),l=ve,a=qt,c=z("recent-activities");return g(),k("div",$Fe,[_("div",EFe,[_("div",xFe,[_("h3",null,M(e.$t("About")),1)]),n.space_profile?(g(),k("div",TFe,[_("div",{class:"space_description",innerHTML:n.space_profile.description_rendered},null,8,MFe),_("div",AFe,[_("div",OFe,[_("div",IFe,[b(l,null,{default:x(()=>[b(i)]),_:1}),_("span",null,M((u=r.privacies[n.space_profile.privacy])==null?void 0:u.label),1)]),_("div",NFe,M((d=r.privacies[n.space_profile.privacy])==null?void 0:d.space_description),1)])])])):(g(),L(a,{key:1,animated:!0}))]),n.space_profile&&n.has_permission?(g(),L(c,{key:0,with_pins:!0,with_pening_count:!0,widget_title:e.$t("Recent Space Activities"),context:{type:"space",space_slug:(f=n.space_profile)==null?void 0:f.slug,space_id:n.space_profile.id}},null,8,["widget_title","context"])):O("",!0)])}const LL=fe(SFe,[["render",PFe]]),LFe={name:"CustomLockscreenView",props:["profile","sections"],components:{LessonEditor:NL},computed:{lockscreenFields(){var e,t;return(t=(e=this.profile)==null?void 0:e.lockscreen_config.lockScreen)==null?void 0:t.filter(n=>!n.hidden)},buttonLink(){return e=>e.button_link||"javascript:void(0)"},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})}}},RFe={class:"fcom_custom_lockscreen"},FFe={class:"fcom_lockscreen_content"},DFe={class:"fcom_item"},BFe={class:"fcom_content"},VFe=["href"],zFe={key:1,class:"fcom_content_wrap"},jFe=["innerHTML"],HFe={key:2,class:"fcom_content_wrap"};function UFe(e,t,n,o,r,s){const i=z("lesson-editor");return g(),k("div",RFe,[_("div",FFe,[(g(!0),k(Q,null,Me(s.lockscreenFields,l=>(g(),k("div",DFe,[l.type=="image"?(g(),k("div",{key:0,class:"fcom_image_wrap",style:Be(s.imageStyles(l))},[_("div",BFe,[_("h2",{style:Be(s.headingStyles(l))},M(l.heading),5),_("p",{style:Be(s.descriptionStyles(l))},M(l.description),5),_("a",{href:s.buttonLink(l),class:"fcom_btn",style:Be(s.buttonStyles(l))},M(l.button_text),13,VFe)])],4)):O("",!0),l.type=="block"?(g(),k("div",zFe,[_("div",{innerHTML:l.content},null,8,jFe)])):O("",!0),l.type=="lesson"?(g(),k("div",HFe,[b(i,{sections:n.sections},null,8,["sections"])])):O("",!0)]))),256))])])}const RL=fe(LFe,[["render",UFe]]),WFe={name:"LockscreenView",components:{CustomLockscreenView:RL},props:["space_profile","joining"],emits:["join"],computed:{isDefaultScreen(){return this.space_profile},isNonMember(){var e;return(e=this.space_profile.permissions)==null?void 0:e.is_non_member}}},qFe={key:0,class:"space_lock_box space_default_lock_box"},KFe={key:1,class:"space_lock_box space_default_lock_box"},GFe=["href"],YFe=["href"],JFe={key:2},ZFe={key:1,class:"space_lock_box"},XFe=["href"];function QFe(e,t,n,o,r,s){const i=z("Lock"),l=ve,a=Ze,c=z("custom-lockscreen-view"),u=Mt("loading");return n.space_profile.lockscreen_config?(g(),k(Q,{key:0},[n.space_profile.permissions&&n.space_profile.permissions.is_pending?(g(),k("div",qFe,[b(l,null,{default:x(()=>[b(i)]),_:1}),_("h4",null,M(e.$t("Membership Request Under Review")),1)])):n.space_profile.lockscreen_config.showCustom?(g(),k("div",JFe,[b(c,{profile:n.space_profile},null,8,["profile"])])):(g(),k("div",KFe,[b(l,null,{default:x(()=>[b(i)]),_:1}),_("h4",null,M(e.$t("This is a private space")),1),n.space_profile.lockscreen_config.canSendRequest?(g(),k(Q,{key:0},[_("p",null,M(e.$t("Please send a join request and an admin will review your join request.")),1),e.auth.user_id?Ve((g(),L(a,{key:0,disabled:n.joining,type:"primary",onClick:t[0]||(t[0]=d=>e.$emit("join"))},{default:x(()=>[ne(M(e.$t("Request Access")),1)]),_:1},8,["disabled"])),[[u,n.joining]]):(g(),k("a",{key:1,href:e.getCurrentAuthUrl(),class:"fcom_btn el-button el-button--primary"},M(e.$t("Login or Signup")),9,GFe))],64)):(g(),k(Q,{key:1},[_("p",null,M(e.$t("Members have to be invited to this space.")),1),e.auth.user_id?O("",!0):(g(),k("a",{key:0,href:e.getCurrentAuthUrl(),class:"fcom_btn el-button el-button--primary"},M(e.$t("Login or Signup")),9,YFe))],64))]))],64)):e.auth.user_id?O("",!0):(g(),k("div",ZFe,[b(l,null,{default:x(()=>[b(i)]),_:1}),_("h4",null,M(e.$t("Please login/signup to join this community")),1),_("p",null,M(e.$t("To join the discussion of this community, please login or signup")),1),_("a",{href:e.getCurrentAuthUrl(),class:"fcom_btn el-button el-button--primary"},M(e.$t("Login / Signup")),9,XFe)]))}const eDe=fe(WFe,[["render",QFe]]),tDe={name:"SpaceView",components:{RenderSpaceLinks:jC,AboutSpace:LL,Layout:pr,AppLayout:Vr,SpaceHeader:VLe,RecentActivities:S_,CreateSpaceForm:C_,SpaceMenu:PL,LockscreenView:eDe,SpaceIcon:DC},props:["space"],data(){return{loading:!0,space_profile:null,search:"",joining:!1,pending_count:0}},computed:{has_permission(){return this.space_profile?!!this.space_profile.permissions.can_view_posts:!1},isDefaultScreen(){var e,t;return((t=(e=this.space_profile)==null?void 0:e.settings)==null?void 0:t.custom_lock_screen)=="no"},isCustomLockScreen(){var e;return!!((e=this.space_profile)!=null&&e.lockscreen_config)&&!this.isAdmin()},isNonMember(){var e,t;return(t=(e=this.space_profile)==null?void 0:e.permissions)==null?void 0:t.is_non_member},showSpaceHeader(){var e;return!this.isCustomLockScreen&&this.$route.name=="space_feeds"&&((e=this.space_profile)==null?void 0:e.cover_photo)},showSideBar(){var e,t;return!this.isCustomLockScreen&&this.$route.meta.show_sidebar&&((t=(e=this.space_profile)==null?void 0:e.settings)==null?void 0:t.show_sidebar)!="no"},showSpaceMenu(){return!this.isCustomLockScreen},showProfileLogo(){return!this.isCustomLockScreen},feedCssClasses(){var n,o;const e=[];e.push(this.showSideBar?"fcom_has_space_sidebar":"fcom_hide_space_sidebar");let t=((o=(n=this.space_profile)==null?void 0:n.settings)==null?void 0:o.layout_style)||"timeline";return e.push("fcom_layout_"+t),e.push("fcom_route_"+this.$route.name),e}},watch:{space(){this.space_profile=null,this.search="",this.getSpaceProfile()}},methods:{getSpaceProfile(){this.loading=!0,this.$get("spaces/"+this.space+"/by-slug").then(e=>{window.fcom_current_community=e.space,this.space_profile=e.space,this.auth.spaces[e.space.slug]=e.space,this.changeTitle(e.space.title),this.pending_count=e.pending_count,window.scrollTo({top:0,behavior:"smooth"})}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})},processJoin(){this.joining=!0,this.$post("spaces/"+this.space_profile.slug+"/join").then(e=>{this.$notify.success(e.message),this.getSpaceProfile()}).catch(e=>{this.$handleError(e)}).finally(()=>{this.joining=!1})}},mounted(){if(this.auth.spaces[this.space]){let e=this.auth.spaces[this.space];window.fcom_current_community=e,this.space_profile=e,this.changeTitle(e.title),this.loading=!1,window.scrollTo({top:0,behavior:"smooth"});return}else this.getSpaceProfile()},beforeUnmount(){window.fcom_current_community=null}},nDe={key:0,"aria-label":"Space Links",class:"fcom_sub_header"},oDe={class:"space_route"},rDe={key:0},sDe={key:1,class:"space_holder"},iDe={key:2};function lDe(e,t,n,o,r,s){const i=z("Lock"),l=ve,a=z("space-icon"),c=z("router-link"),u=z("space-menu"),d=z("render-space-links"),f=z("space-header"),h=qt,p=z("lockscreen-view"),m=z("router-view"),v=Ii,y=z("AboutSpace"),E=_p,w=hd,C=z("layout"),T=z("app-layout");return g(),L(T,{wrapper_class:"fcom_single_layout fcom_max_layout"},{default:x(()=>[b(C,{wrapper_class:["no_bg_layout",{custom_lockscreen:s.isCustomLockScreen},"fcom_route_"+e.$route.name],title:"...."},{title:x(()=>[_("h1",{onClick:t[0]||(t[0]=$=>e.$eventBus.emit("toTop")),class:"fcom_page_title"},[r.space_profile?(g(),L(c,{key:0,class:"fcom_space_title",to:{name:"space_feeds",params:{space:n.space}}},{default:x(()=>[s.isCustomLockScreen?(g(),L(l,{key:0},{default:x(()=>[b(i)]),_:1})):s.showProfileLogo?(g(),L(a,{key:1,space_profile:r.space_profile},null,8,["space_profile"])):O("",!0),_("span",null,M(r.space_profile.title),1)]),_:1},8,["to"])):O("",!0)])]),actions:x(()=>[s.showSpaceMenu?(g(),L(u,{key:0,space:n.space,space_profile:r.space_profile,onDoSearch:t[1]||(t[1]=$=>{r.search=$}),onRefetch:t[2]||(t[2]=$=>s.getSpaceProfile())},null,8,["space","space_profile"])):O("",!0)]),sub_header:x(()=>{var $,A;return[r.space_profile&&!s.isCustomLockScreen&&((A=($=r.space_profile)==null?void 0:$.settings)!=null&&A.links.length)?(g(),k("nav",nDe,[b(d,{links:r.space_profile.settings.links},null,8,["links"])])):O("",!0)]}),default:x(()=>[s.showSpaceHeader?(g(),L(f,{key:0,onRefetch:t[3]||(t[3]=$=>s.getSpaceProfile()),space:n.space,space_profile:r.space_profile},null,8,["space","space_profile"])):O("",!0),b(w,{class:"fcom_resp_container fcom_space_container fcom_main_container"},{default:x(()=>[b(v,{class:"fcom_main"},{default:x(()=>[_("div",{class:F([s.feedCssClasses,"fcom_feed_box"])},[_("div",oDe,[r.loading?(g(),k("div",rDe,[b(h,{class:"white_loaded",rows:10,animated:!0})])):r.space_profile?(g(),k("div",sDe,[s.isCustomLockScreen?(g(),L(p,{key:0,space_profile:r.space_profile,joining:r.joining,onJoin:t[4]||(t[4]=$=>s.processJoin())},null,8,["space_profile","joining"])):O("",!0),s.has_permission?(g(),L(m,{key:1,search:r.search,onRefetch:t[5]||(t[5]=$=>s.getSpaceProfile()),space_profile:r.space_profile,space_slug:n.space},null,8,["search","space_profile","space_slug"])):O("",!0)])):(g(),k("div",iDe,[_("h4",null,M(e.$t("Sorry! this community could not be loaded")),1)]))])],2)]),_:1}),s.showSideBar?(g(),L(E,{key:0,class:"fcom_resp_side",width:"306px"},{default:x(()=>[b(y,{has_permission:s.has_permission,space_profile:r.space_profile},null,8,["has_permission","space_profile"])]),_:1})):O("",!0)]),_:1})]),_:1},8,["wrapper_class"])]),_:1})}const aDe=fe(tDe,[["render",lDe]]),cDe={name:"CreateFeed",props:["space_slug","space_profile"],emits:["refetch"],components:{CreateStatusForm:BC,Feeds:Lp},data(){return{topic_slug:null}},methods:{setTopic(e){if(this.topic_slug=e,e)this.$router.push({query:{topic:e}});else{this.$router.push({query:{}});return}}},computed:{layout_style(){var e,t;return((t=(e=this.space_profile)==null?void 0:e.settings)==null?void 0:t.layout_style)||"timeline"},spaceTopics(){var e,t;return cL((e=this.space_profile)==null?void 0:e.topics)?null:((t=this.space_profile)==null?void 0:t.topics)||null}},created(){this.$route.query.topic&&(this.topic_slug=this.$route.query.topic)}},uDe={key:0,class:"fcom_space_topics"},dDe={class:"fcom_topics_filters"};function fDe(e,t,n,o,r,s){const i=Ze,l=z("feeds");return g(),k(Q,null,[s.spaceTopics?(g(),k("div",uDe,[_("div",dDe,[b(i,{onClick:t[0]||(t[0]=a=>s.setTopic("")),class:F({fcom_active_topic:!r.topic_slug})},{default:x(()=>[ne(M(e.$t("All")),1)]),_:1},8,["class"]),(g(!0),k(Q,null,Me(s.spaceTopics,a=>(g(),L(i,{onClick:c=>s.setTopic(a.slug),class:F({fcom_active_topic:a.slug==r.topic_slug}),key:a.slug},{default:x(()=>[ne(M(a.title),1)]),_:2},1032,["onClick","class"]))),128))])])):O("",!0),b(l,{feed_name:"space_feed_"+n.space_slug,layout_style:s.layout_style,topic_slug:r.topic_slug,hide_create_form:!n.space_profile.permissions.can_create_post,space:n.space_slug},null,8,["feed_name","layout_style","topic_slug","hide_create_form","space"])],64)}const hDe=fe(cDe,[["render",fDe]]),pDe={name:"InviationForm",emits:["completed"],data(){return{saving:!1,inviatation:{email:"",invitee_name:""}}},props:{space_id:{type:Number,default:null},default_value:{type:Object,default:()=>""}},methods:{sendInvitation(){this.saving=!0,this.$post("invitations",{...this.inviatation,space_id:this.space_id}).then(e=>{this.$notify.success(e.message),this.$emit("completed")}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})}},mounted(){this.default_value&&(this.inviatation.email=this.default_value)}},mDe={class:"fcom_invitation_form",ref:"inviteForm"};function gDe(e,t,n,o,r,s){const i=Dn,l=Ai,a=gp,c=mp,u=Ze,d=Mi,f=Mt("loading");return g(),k("div",mDe,[b(d,{onSubmit:t[2]||(t[2]=Ge(h=>e.doNothing(),["prevent"])),modelValue:r.inviatation,"onUpdate:modelValue":t[3]||(t[3]=h=>r.inviatation=h),"label-position":"top"},{default:x(()=>[b(c,{gutter:30},{default:x(()=>[b(a,{sm:24,md:12},{default:x(()=>[b(l,{label:e.$t("Invitee email")},{default:x(()=>[b(i,{modelValue:r.inviatation.email,"onUpdate:modelValue":t[0]||(t[0]=h=>r.inviatation.email=h),placeholder:e.$t("Enter invitee email"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),b(a,{sm:24,md:12},{default:x(()=>[b(l,{label:e.$t("Invitee Name (optional)")},{default:x(()=>[b(i,{modelValue:r.inviatation.invitee_name,"onUpdate:modelValue":t[1]||(t[1]=h=>r.inviatation.invitee_name=h),placeholder:e.$t("Enter invitee Name"),autocomplete:"off"},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1}),b(l,null,{default:x(()=>[Ve((g(),L(u,{disabled:r.saving,class:"fcom_primary_button",onClick:s.sendInvitation},{default:x(()=>[ne(M(e.$t("Send Invitation")),1)]),_:1},8,["disabled","onClick"])),[[f,r.saving]])]),_:1})]),_:1},8,["modelValue"])],512)}const _De=fe(pDe,[["render",gDe]]),vDe={name:"Pagination",emits:["fetch","per_page_change"],computed:{layout(){return this.isMobile?"total, sizes, prev, next":"total, sizes, prev, pager, next"}},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]}},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")}}};function yDe(e,t,n,o,r,s){const i=Mle;return g(),L(i,{class:"fcom-pagination",background:!1,size:"small",layout:"total, sizes, prev, pager, next",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,["onCurrentChange","onSizeChange","hide-on-single-page","current-page","page-sizes","page-size","total"])}const Rp=fe(vDe,[["render",yDe]]),bDe={name:"PendingInvitations",components:{Pagination:Rp},data(){return{loading:!1,loadingMore:!1,invitations:[],status:"pending",pagination:{page:1,total:0,per_page:10},is_mod:!1}},props:{space_id:{type:Number,default:null}},methods:{getInvitations(){this.loading=!0,this.$get("invitations",{space_id:this.space_id,page:this.pagination.page,per_page:this.pagination.per_page,status:this.status}).then(e=>{this.invitations=e.invitations.data,this.pagination.total=e.invitations.total,this.is_mod=e.is_mod}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})},handleResend(e){this.loading=!0,this.$post("invitations/"+e.id+"/resend").then(t=>{this.$notify.success(t.message||this.$t("Invitation resent successfully"))}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},handleDelete(e){this.$confirm(this.$t("Are you sure you want to delete this invitation?"),this.$t("Warning"),{confirmButtonText:this.$t("OK"),cancelButtonText:this.$t("Cancel"),type:"warning"}).then(()=>{this.loading=!0,this.$del("invitations/"+e.id).then(t=>{this.getInvitations()}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})})}},mounted(){this.getInvitations()}},wDe={class:"fcom_invitations"},kDe={style:{margin:"20px 0"},class:"fcom_spaced_flex"},CDe={class:"fcom_person_name"},SDe={class:"fcom_person_name"};function $De(e,t,n,o,r,s){const i=jo,l=zo,a=mce,c=z("UserRouteLink"),u=Ze,d=pce,f=z("Pagination"),h=Mt("loading");return g(),k("div",wDe,[_("div",kDe,[_("h4",null,M(e.$t("Invitations")),1),_("div",null,[b(l,{style:{"min-width":"150px"},onChange:t[0]||(t[0]=p=>{r.pagination.page=1,s.getInvitations()}),modelValue:r.status,"onUpdate:modelValue":t[1]||(t[1]=p=>r.status=p)},{default:x(()=>[(g(),k(Q,null,Me(["all","pending","accepted"],p=>b(i,{key:p,label:e.ucFirst(p),value:p},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])]),Ve((g(),L(d,{data:r.invitations,border:"",style:{width:"100%"}},{default:x(()=>[b(a,{prop:"message",label:e.$t("Invitee"),"min-width":"180"},{default:x(p=>[_("span",CDe,M(p.row.meta.invitee_name)+" <"+M(p.row.message)+"> ",1)]),_:1},8,["label"]),r.is_mod?(g(),L(a,{key:0,prop:"user_id",label:e.$t("Invited By"),width:"180"},{default:x(p=>[_("span",SDe,[b(c,{xprofile:p.row.xprofile},null,8,["xprofile"])])]),_:1},8,["label"])):O("",!0),b(a,{prop:"status",label:e.$t("Status"),width:"120"},{default:x(p=>[ne(M(e.ucFirst(p.row.status)),1)]),_:1},8,["label"]),b(a,{label:e.$t("Actions")},{default:x(p=>[p.row.status=="pending"?Ve((g(),L(u,{key:0,type:"primary",text:"",onClick:m=>s.handleResend(p.row)},{default:x(()=>[ne(M(e.$t("Resend")),1)]),_:2},1032,["onClick"])),[[h,r.loading]]):O("",!0),b(u,{onClick:m=>s.handleDelete(p.row),text:"",type:"danger"},{default:x(()=>[ne(M(e.$t("Delete")),1)]),_:2},1032,["onClick"])]),_:1},8,["label"])]),_:1},8,["data"])),[[h,r.loading]]),b(f,{hide_on_single:!1,pagination:r.pagination,onFetch:s.getInvitations},null,8,["pagination","onFetch"])])}const EDe=fe(bDe,[["render",$De]]),xDe={name:"AddMemberForm",components:{InviationForm:_De,PendingInvitations:EDe},props:["modelValue","space_profile"],emits:["completed"],data(){return{users:[],loading:!1,form:this.modelValue||{c:"",role:""},adding:!1,invite_search:"",showingForm:"addByUser"}},methods:{fetchUsers(e=""){this.loading=!0,this.$get("spaces/users/search",{context:"add_member",search:e,space_id:this.space_profile.id}).then(t=>{this.users=t.users.data}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},addMember(){if(!this.form.user_id||!this.form.role){this.$notify.error(this.$t("Please select a user and role"));return}this.adding=!0,this.$post("spaces/"+this.space_profile.slug+"/members",{user_id:this.form.user_id,role:this.form.role}).then(e=>{this.$notify.success(e.message),this.$emit("completed")}).catch(e=>{this.$handleError(e)}).finally(()=>{this.adding=!1})},invitePerson(){const e=this.$refs.invite_member.inputRef.value;if(!e){this.$notify.error(this.$t("Please enter an email address"));return}this.invite_search=e,this.showingForm="addByInvitations"}},mounted(){this.modelValue.editing_user||this.fetchUsers()}},TDe={style:{float:"left",display:"flex","align-items":"center"}},MDe={key:0},ADe=["src"],ODe={style:{float:"right",color:"#8492a6","font-size":"13px"}},IDe={key:1},NDe={class:"fcom_spaced_flex"},PDe={key:0},LDe={key:1},RDe={key:1},FDe={key:0},DDe=_("hr",null,null,-1),BDe={key:1},VDe=_("p",null,"Member Invitation feature is only available on the Pro version",-1),zDe=[VDe];function jDe(e,t,n,o,r,s){const i=jo,l=Ze,a=zo,c=Ai,u=Mi,d=z("InviationForm"),f=z("PendingInvitations"),h=Mt("loading");return r.showingForm=="addByUser"?(g(),L(u,{key:0,onSubmit:t[5]||(t[5]=Ge(p=>e.doNothing(),["prevent"])),"label-position":"top",modelValue:r.form,"onUpdate:modelValue":t[6]||(t[6]=p=>r.form=p)},{default:x(()=>[r.form.editing_user?(g(),k("p",IDe,M(e.$t("Editing manager role for"))+" "+M(r.form.editing_user.display_name),1)):(g(),L(c,{key:0,label:e.$t("Search for an existing user or Invite by Email")},{default:x(()=>[Ve((g(),L(a,{ref:"invite_member",class:"rich_select",filterable:"",remote:"","remote-method":s.fetchUsers,placeholder:e.$t("Select User"),modelValue:r.form.user_id,"onUpdate:modelValue":t[1]||(t[1]=p=>r.form.user_id=p)},{empty:x(()=>[_("p",null,M(e.$t("No existing users found based on your search.")),1),Ve((g(),L(l,{disabled:r.adding,type:"success",onClick:t[0]||(t[0]=p=>s.invitePerson())},{default:x(()=>[ne(M(e.$t("Send Email Invitation")),1)]),_:1},8,["disabled"])),[[h,r.adding]])]),default:x(()=>[(g(!0),k(Q,null,Me(r.users,p=>(g(),L(i,{key:p.ID,label:p.display_name+" ("+(p.user_email??p.ID)+")",value:p.ID},{default:x(()=>[_("span",TDe,[p.photo?(g(),k("span",MDe,[_("img",{alt:"",src:p.photo,style:{width:"16px",height:"16px","border-radius":"50%","margin-right":"10px"}},null,8,ADe)])):O("",!0),_("span",null,M(p.display_name),1)]),_("span",ODe,M(p.user_email??p.ID),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["remote-method","placeholder","modelValue"])),[[h,r.loading]])]),_:1},8,["label"])),b(c,{label:e.$t("Membership Role")},{default:x(()=>[b(a,{placeholder:e.$t("Select Role"),modelValue:r.form.role,"onUpdate:modelValue":t[2]||(t[2]=p=>r.form.role=p)},{default:x(()=>[b(i,{label:e.$t("Member"),value:"member"},null,8,["label"]),b(i,{label:e.$t("Moderator"),value:"moderator"},null,8,["label"]),b(i,{label:e.$t("Admin"),value:"admin"},null,8,["label"])]),_:1},8,["placeholder","modelValue"])]),_:1},8,["label"]),le(e.$slots,"after_form",{},()=>[_("div",NDe,[Ve((g(),L(l,{class:"fcom_primary_button",disabled:r.adding,onClick:t[3]||(t[3]=p=>s.addMember())},{default:x(()=>[r.form.editing_user?(g(),k("span",PDe,M(e.$t("Update Role")),1)):(g(),k("span",LDe,M(e.$t("Add as %s",r.form.role)),1))]),_:1},8,["disabled"])),[[h,r.adding]]),b(l,{onClick:t[4]||(t[4]=p=>r.showingForm="addByInvitations"),text:""},{default:x(()=>[ne(M(e.$t("View Invitations")),1)]),_:1})])])]),_:3},8,["modelValue"])):(g(),k("div",RDe,[e.has_pro?(g(),k("div",FDe,[b(d,{space_id:n.space_profile.id,default_value:r.invite_search,onCompleted:t[7]||(t[7]=p=>e.$emit("completed"))},null,8,["space_id","default_value"]),DDe,b(f,{space_id:n.space_profile.id},null,8,["space_id"])])):(g(),k("div",BDe,zDe))]))}const HDe=fe(xDe,[["render",jDe]]),UDe={name:"SpaceMembers",props:["space","space_profile"],components:{Search:ju,Pagination:Rp,AddMemberForm:HDe},emits:["refetch"],inheritAttrs:!1,data(){return{members:[],loading:!1,pagination:{page:1,per_page:20,total:0},status:"active",pending_count:0,working:!1,addingMember:!1,editing_member:{user_id:"",role:"member"},search:"",SearchIcon:ns(ju)}},methods:{fetch(){this.loading=!0,this.$get("spaces/"+this.space+"/members",{page:this.pagination.page,per_page:this.pagination.per_page,status:this.status,search:this.search}).then(e=>{this.members=e.members.data,this.pagination.total=e.members.total,e.pending_count&&(this.pending_count=e.pending_count),this.pagination.page!=1&&this.$nextTick(()=>{this.$refs.space_members&&this.$refs.space_members.scrollIntoView({behavior:"smooth"})})}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})},removeMemberPrompt(e,t){this.$confirm(this.$t("Are you sure you want to remove this member from this community?"),this.$t("Remove Member?"),{confirmButtonText:this.$t("Remove"),cancelButtonText:this.$t("Cancel"),type:"error"}).then(()=>{this.removeMember(e,t)})},removeMember(e,t){this.working=!0,this.$post("spaces/"+this.space+"/members/remove",{user_id:e.user_id}).then(n=>{this.$notify.success(n.message),this.members.splice(t,1),this.members.length||this.fetch()}).catch(n=>{this.$handleError(n)}).finally(()=>{this.working=!1})},approveMember(e,t=null){this.working=!0,this.$post("spaces/"+this.space+"/members",{user_id:e.user_id}).then(n=>{if(this.$notify.success(n.message),t===null){this.fetch();return}this.members.splice(t,1),this.members.length||this.fetch()}).catch(n=>{this.$handleError(n)}).finally(()=>{this.working=!1})},initAddMember(e,t=null){this.editing_member=e?{user_id:e.user_id,role:e.role,editing_user:e.xprofile}:{user_id:"",role:""},e&&this.$refs.edit_member_pop&&this.$refs.edit_member_pop.hide(),this.addingMember=!0},toSearch(){this.pagination.page=1,this.fetch()}},mounted(){this.$route.query.view_pending&&(this.status="pending"),this.fetch()}},WDe={ref:"space_members"},qDe={key:0,class:"member_header"},KDe={class:"member_status"},GDe={class:"add_member"},YDe={class:"search_member"},JDe={class:"space_members"},ZDe={class:"card_list"},XDe={class:"card_content"},QDe={class:"card_avatar"},eBe={class:"card_info"},tBe={class:"card_name"},nBe={class:"info_header"},oBe={key:0,class:"meta_line"},rBe={key:1,class:"meta_line"},sBe={class:"meta_line"},iBe=_("div",{class:"card_break"},null,-1),lBe={class:"card_footer"},aBe={key:0,class:"card_action"},cBe={class:"actions_items"},uBe=["onClick"],dBe=["onClick"],fBe={class:"pagination_wrap"},hBe={key:0,class:"loading"},pBe={key:1,class:"no_members"},mBe={key:0},gBe={key:1};function _Be(e,t,n,o,r,s){const i=hp,l=Oi,a=Ze,c=z("Search"),u=ve,d=Dn,f=z("UserAvatar"),h=z("UserRouteLink"),p=pp,m=z("MoreFilled"),v=$o,y=z("Pagination"),E=qt,w=z("add-member-form"),C=nA,T=Mt("loading");return g(),k(Q,null,[_("div",WDe,null,512),e.isModerator(n.space)?(g(),k("div",qDe,[_("div",KDe,[r.pending_count?(g(),L(l,{key:0,onChange:s.toSearch,modelValue:r.status,"onUpdate:modelValue":t[0]||(t[0]=$=>r.status=$),class:"status_group"},{default:x(()=>[b(i,{value:"active"},{default:x(()=>[ne(M(e.$t("Active")),1)]),_:1}),b(i,{value:"pending"},{default:x(()=>[ne(M(e.$t("Pending"))+" ("+M(r.pending_count)+")",1)]),_:1})]),_:1},8,["onChange","modelValue"])):O("",!0)]),_("div",GDe,[b(a,{class:"fcom_primary_button",onClick:t[1]||(t[1]=$=>r.addingMember=!0)},{default:x(()=>[ne(M(e.$t("Invite")),1)]),_:1})])])):O("",!0),_("div",YDe,[b(d,{clearable:"",onClear:s.toSearch,onKeydown:rn(s.toSearch,["enter"]),modelValue:r.search,"onUpdate:modelValue":t[2]||(t[2]=$=>r.search=$),placeholder:e.$t("Search...")},{prefix:x(()=>[b(u,null,{default:x(()=>[b(c)]),_:1})]),_:1},8,["onClear","onKeydown","modelValue","placeholder"])]),_("div",JDe,[Ve((g(),k("div",ZDe,[(g(!0),k(Q,null,Me(r.members,($,A)=>{var N;return Ve((g(),k("div",{key:$.id,class:"each_card"},[_("div",XDe,[_("div",QDe,[b(f,{is_online:e.isOnline($.xprofile.last_activity),xprofile:$.xprofile},null,8,["is_online","xprofile"])]),_("div",eBe,[_("div",tBe,[_("div",nBe,[b(h,{xprofile:$.xprofile},null,8,["xprofile"]),r.status!="pending"?(g(),k("div",oBe,M(e.$t("Joined %1s",e.humanDateDiff($.created_at))),1)):(g(),k("div",rBe,M(e.$t("Requested %s",e.humanDateDiff($.created_at))),1))]),_("div",sBe,M(e.getExcerpt((N=$.xprofile)==null?void 0:N.short_description,120)),1),$.role!="member"?(g(),L(p,{key:0,type:"success"},{default:x(()=>[ne(M(e.$labelize($.role)),1)]),_:2},1024)):O("",!0)]),r.status=="pending"?(g(),k(Q,{key:0},[iBe,_("div",lBe,[b(a,{class:"fcom_primary_button",onClick:P=>s.approveMember($,A)},{default:x(()=>[ne(M(e.$t("Approve")),1)]),_:2},1032,["onClick"]),b(a,{class:"fcom_secondary_button",onClick:P=>s.removeMember($,A)},{default:x(()=>[ne(M(e.$t("Decline")),1)]),_:2},1032,["onClick"])])],64)):O("",!0)])]),r.status!="pending"&&n.space_profile&&e.hasInPermission("can_remove_member",n.space_profile.permissions)?(g(),k("div",aBe,[b(v,{placement:"bottom",width:200,trigger:"click",persistent:!1,ref_for:!0,ref:"userPopoverRef_"+$.user_id},{reference:x(()=>[b(a,{"aria-label":e.$t("View actions"),size:"small",text:""},{default:x(()=>[b(u,{class:"fcom_more_icon"},{default:x(()=>[b(m)]),_:1})]),_:1},8,["aria-label"])]),default:x(()=>[_("ul",cBe,[_("li",{onClick:P=>s.removeMemberPrompt($,A)},M(e.$t("Remove Member")),9,uBe),_("li",{onClick:P=>s.initAddMember($,P)},M(e.$t("Change Membership")),9,dBe)])]),_:2},1536)])):O("",!0)])),[[T,r.working]])}),128))])),[[T,r.loading]]),_("div",fBe,[b(y,{hide_on_single:!0,onFetch:t[3]||(t[3]=$=>s.fetch()),pagination:r.pagination},null,8,["pagination"])]),r.loading&&!r.pagination.total?(g(),k("div",hBe,[b(E,{class:"white_loaded",rows:3,animated:!0}),b(E,{style:{"margin-top":"20px"},class:"white_loaded",rows:3,animated:!0})])):!r.loading&&!r.members.length?(g(),k("div",pBe,M(e.$t("No %s members found in this community.",r.status)),1)):O("",!0)]),r.addingMember?(g(),L(C,{key:1,modelValue:r.addingMember,"onUpdate:modelValue":t[6]||(t[6]=$=>r.addingMember=$),"close-on-click-modal":!1,"append-to-body":!0,size:e.dialogWidth,direction:"rtl"},{header:x(()=>[r.editing_member.editing_user?(g(),k("h4",mBe,M(e.$t("Update Role")),1)):(g(),k("h4",gBe,M(e.$t("Add Member")),1))]),default:x(()=>[r.addingMember?(g(),L(w,{key:0,space_profile:n.space_profile,modelValue:r.editing_member,"onUpdate:modelValue":t[4]||(t[4]=$=>r.editing_member=$),onCompleted:t[5]||(t[5]=()=>{s.fetch(),r.addingMember=!1})},null,8,["space_profile","modelValue"])):O("",!0)]),_:1},8,["modelValue","size"])):O("",!0)],64)}const vBe=fe(UDe,[["render",_Be]]),yBe={name:"GlobIcon"},bBe={width:"14",height:"14",viewBox:"0 0 14 14",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},wBe=_("path",{d:"M3.1564 3.30236C2.23368 4.26115 1.66634 5.5644 1.66634 7.00016C1.66634 9.9457 4.05415 12.3335 6.99967 12.3335C7.72021 12.3335 8.40741 12.1906 9.03441 11.9316C9.11107 11.4313 8.94287 10.9512 8.87407 10.7832C8.72101 10.4102 8.21574 9.7723 7.37227 8.88736C7.14714 8.6507 7.16161 8.46916 7.24207 7.9297L7.25134 7.86876C7.30601 7.49923 7.39774 7.28076 8.64114 7.08336C9.27281 6.98323 9.43894 7.2357 9.66921 7.5853C9.69467 7.62403 9.72014 7.66203 9.74621 7.7001C9.96494 8.01996 10.127 8.0931 10.3718 8.20443C10.4815 8.25416 10.6183 8.3169 10.8017 8.4211C11.2364 8.6695 11.2364 8.94996 11.2364 9.56496V9.6347C11.2364 9.89576 11.2109 10.125 11.1707 10.3241C11.8982 9.4125 12.333 8.2571 12.333 7.00016C12.333 4.80076 11.0017 2.9123 9.10094 2.09671C8.73214 2.34558 8.22621 2.69834 8.04967 2.94016C7.95941 3.06375 7.83181 3.6946 7.41681 3.74667C7.30807 3.76032 7.16221 3.75076 7.00767 3.74081C6.59334 3.71388 6.02647 3.67754 5.84501 4.17013C5.72981 4.4823 5.70954 5.3298 6.08227 5.7697C6.14194 5.83996 6.15347 5.96996 6.11294 6.11583C6.05967 6.30736 5.95207 6.4239 5.91854 6.44796C5.85427 6.41103 5.72607 6.26223 5.63926 6.16096C5.43003 5.91783 5.16904 5.61505 4.83165 5.52134C4.70897 5.48738 4.57411 5.45928 4.44333 5.43174C4.07727 5.35501 3.66263 5.26772 3.56629 5.06218C3.49595 4.91163 3.49626 4.7043 3.49653 4.48526C3.49653 4.20763 3.49653 3.89369 3.36053 3.58854C3.30798 3.47044 3.2376 3.37647 3.1564 3.30236ZM6.99967 13.6668C3.31777 13.6668 0.333008 10.682 0.333008 7.00016C0.333008 3.31826 3.31777 0.333496 6.99967 0.333496C10.6815 0.333496 13.6663 3.31826 13.6663 7.00016C13.6663 10.682 10.6815 13.6668 6.99967 13.6668Z",fill:"currentColor"},null,-1),kBe=[wBe];function CBe(e,t,n,o,r,s){return g(),k("svg",bBe,kBe)}const FL=fe(yBe,[["render",CBe]]),SBe={name:"GroupIcon"},$Be={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},EBe=_("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),xBe=_("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),TBe=_("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),MBe=_("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),ABe=[EBe,xBe,TBe,MBe];function OBe(e,t,n,o,r,s){return g(),k("svg",$Be,ABe)}const HC=fe(SBe,[["render",OBe]]),IBe={name:"AllCommunities",components:{User:OZ,GlobIcon:FL,Layout:pr,AppLayout:Vr,CreateSpaceForm:C_,GroupIcon:HC},data(){return{communities:[],loading:!0,joining:!1}},methods:{getCommunities(){this.loading=!0,this.$get("spaces/discover").then(e=>{this.communities=e.spaces,this.loading=!1})},goToSpaceFeeds(e){this.$router.push({name:"space_feeds",params:{space:e}})},getSpaceFeedsRoute(e){return{name:"space_feeds",params:{space:e}}},getExcerpt(e,t=50){if(!e)return"";let n=e.replace(/(<([^>]+)>)/ig,"");return n.length>t&&(n=n.substring(0,t)+"..."),n},join(e){if(e.privacy!="public"||!this.auth.user_id){this.$router.push({name:"space_feeds",params:{space:e.slug}});return}this.joining=!0,this.$post("spaces/"+e.slug+"/join").then(t=>{this.$notify.success(t.message),this.$eventBus.emit("reloadMenu"),this.$router.push({name:"space_feeds",params:{space:e.slug}})}).catch(t=>{this.$handleError(t)}).finally(()=>{this.joining=!1})},fireCreateSpace(e=null){this.$eventBus.emit("createSpaceModal",e)}},mounted(){this.getCommunities(),this.$route.query.create_space=="yes"&&this.fireCreateSpace(),this.changeTitle(this.$t("All Spaces"))}},NBe={key:0,class:"object_menu"},PBe={class:"fcom_space_menu_ul"},LBe=["href"],RBe={class:"fcom_communities"},FBe={class:"fcom_box_card_list"},DBe={class:"fcom_box_card_avatar"},BBe=["src"],VBe=["src"],zBe=["alt","src"],jBe={class:"fcom_box_card_info"},HBe={class:"fcom_box_card_name"},UBe={key:0},WBe={class:"fcom_box_card_details"},qBe={class:"details_item"},KBe={key:0,class:"details_item"},GBe={key:0,class:"fcom_box_card_description"},YBe={class:"fcom_box_card_action"},JBe=["disabled","onClick"],ZBe=["onClick"];function XBe(e,t,n,o,r,s){const i=Ze,l=z("router-link"),a=pp,c=z("GlobIcon"),u=ve,d=z("Lock"),f=z("GroupIcon"),h=z("layout"),p=z("app-layout"),m=Mt("loading");return g(),L(p,{wrapper_class:"fcom_single_layout fcom_max_layout"},{default:x(()=>[b(h,{content_class:"no_bg_layout",title:e.$t("All Spaces")},{actions:x(()=>[e.hasPermission("community_admin")?(g(),k("div",NBe,[_("ul",PBe,[_("li",null,[_("a",{href:e.$getRouteLink("admin/settings/space_groups")},M(e.$t("Space Groups")),9,LBe)]),_("li",null,[b(i,{onClick:t[0]||(t[0]=v=>s.fireCreateSpace()),class:"fcom_primary_button"},{default:x(()=>[ne(M(e.$t("New Space")),1)]),_:1})])])])):O("",!0)]),default:x(()=>[Ve((g(),k("div",RBe,[_("div",FBe,[(g(!0),k(Q,null,Me(r.communities,v=>(g(),k("div",{role:"region","aria-label":"Space Lists",key:v.id,class:"fcom_each_box_card"},[_("div",DBe,[b(l,{"aria-label":"Go to Spapce",to:s.getSpaceFeedsRoute(v.slug)},{default:x(()=>{var y;return[(y=v.settings)!=null&&y.og_image?(g(),k("img",{key:0,src:v.settings.og_image,alt:""},null,8,BBe)):v.cover_photo?(g(),k("img",{key:1,src:v.cover_photo,alt:""},null,8,VBe)):(g(),k("img",{key:2,alt:e.$t("Placeholder image"),src:e.appVars.assets_url+"images/space-placeholder.jpg"},null,8,zBe))]}),_:2},1032,["to"])]),_("div",jBe,[_("div",HBe,[b(l,{to:s.getSpaceFeedsRoute(v.slug)},{default:x(()=>[ne(M(s.getExcerpt(v.title,24))+" ",1),v.space_pivot?(g(),L(a,{key:0,type:"success"},{default:x(()=>[ne(M(e.$labelize(v.space_pivot.role))+" ",1),v.space_pivot.status!="active"?(g(),k("span",UBe," ("+M(e.$labelize(v.space_pivot.status))+") ",1)):O("",!0)]),_:2},1024)):O("",!0)]),_:2},1032,["to"])]),_("div",WBe,[_("div",qBe,[v.privacy==="public"?(g(),L(u,{key:0},{default:x(()=>[b(c)]),_:1})):(g(),L(u,{key:1},{default:x(()=>[b(d)]),_:1})),_("span",null,M(e.$labelize(v.privacy)),1)]),v.members_count?(g(),k("div",KBe,[b(u,null,{default:x(()=>[b(f)]),_:1}),_("span",null,M(e.$_n("%s Member","%s Members",e.$formatNumber(v.members_count))),1)])):O("",!0)]),v.description?(g(),k("div",GBe,M(s.getExcerpt(v.description,85)),1)):O("",!0),_("div",YBe,[v.space_pivot?(g(),k("button",{key:1,class:"fcom_card_button",onClick:y=>s.goToSpaceFeeds(v.slug)},M(e.$t("View Space")),9,ZBe)):Ve((g(),k("button",{key:0,class:"fcom_card_button",disabled:r.joining,onClick:y=>s.join(v)},[ne(M(e.$t("Join")),1)],8,JBe)),[[m,r.joining]])])])]))),128))])])),[[m,r.loading]])]),_:1},8,["title"])]),_:1})}const QBe=fe(IBe,[["render",XBe]]),eVe={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}}},tVe=["title"],nVe=["src"],oVe={key:1,class:"fcom_emoji"},rVe={key:2,class:"fcom_shape"},sVe={key:1};function iVe(e,t,n,o,r,s){const i=ve;return s.renderingBadge?(g(),k("div",{key:0,class:F([{user_icon_only:s.renderingBadge.show_label!="yes"},"user_badge"])},[_("div",{style:Be({backgroundColor:s.renderingBadge.background_color,color:s.renderingBadge.color,borderColor:s.renderingBadge.color}),title:s.renderingBadge.title,class:"user_badge_inner"},[s.renderingBadge.config?(g(),k(Q,{key:0},[s.renderingBadge.config.logo?(g(),k("img",{key:0,alt:"",src:s.renderingBadge.config.logo},null,8,nVe)):s.renderingBadge.config.emoji?(g(),k("span",oVe,M(s.renderingBadge.config.emoji),1)):s.renderingBadge.config.shape_svg?(g(),k("span",rVe,[b(i,{innerHTML:s.renderingBadge.config.shape_svg},null,8,["innerHTML"])])):O("",!0)],64)):O("",!0),s.renderingBadge.show_label=="yes"?(g(),k("span",sVe,M(s.renderingBadge.title),1)):O("",!0)],12,tVe)],2)):O("",!0)}const DL=fe(eVe,[["render",iVe]]),lVe={name:"ProfileHeader",emits:["refetch"],components:{UserBadge:DL,ImageUploader:vc,BookmarkIcon:EL},props:{profile:{required:!1},username:{required:!1},isOwn:{required:!1}},data(){return{updating:!1,fcomChatVars:window.fcomChatVars}},computed:{user_profile(){return this.profile?this.profile:{ID:0,title:".......",slug:"..",cover_photo:""}},isOwnProfile(){return this.auth&&this.user_profile.username==this.auth.username},level(){if(!this.has_leaderboard)return"";const e=gl(this.user_profile.total_points);return e?e.level:0}},methods:{handleCoverPhotoUpload(e){this.profile.cover_photo=e,this.updateProfile({cover_photo:e})},handlePhotoUpload(e){this.profile.avatar=e,this.updateProfile({avatar:e})},updateProfile(e){this.user_profile.username&&(this.updating=!0,this.$put("profile/"+this.user_profile.username,{data:e}).then(t=>{this.$notify.success(t.message),this.$emit("refetch")}).catch(t=>{this.$handleError(t)}).finally(()=>{this.updating=!1}))}},mounted(){setTimeout(()=>{},2e3)}},aVe={ref:"fcom_user_profile",class:"object_header user_header"},cVe={key:0,class:"object_media_uploader"},uVe={class:"object_info"},dVe={class:"object_avatar"},fVe=["alt","src"],hVe={key:0,class:"object_avatar_uploader"},pVe={key:1,style:{position:"absolute",right:"calc(12.5% - 9px)",bottom:"calc(36.5% - 5px)","line-height":"0",background:"rgb(67, 87, 173)",width:"20px",height:"20px","font-size":"12px",display:"flex","align-items":"center","justify-content":"center","border-radius":"50%",color:"#fff",border:"1px solid white"},role:"region","aria-label":"User Level",class:"fcom_user_level_mark"},mVe={class:"object_name"},gVe={class:"object_meta"},_Ve={class:"object_menu"},vVe={class:"fcom_profile_menu_actions"},yVe=["href"],bVe=_("svg",{viewBox:"0 0 24 24","aria-hidden":"true"},[_("g",null,[_("path",{d:"M1.998 5.5c0-1.381 1.119-2.5 2.5-2.5h15c1.381 0 2.5 1.119 2.5 2.5v13c0 1.381-1.119 2.5-2.5 2.5h-15c-1.381 0-2.5-1.119-2.5-2.5v-13zm2.5-.5c-.276 0-.5.224-.5.5v2.764l8 3.638 8-3.636V5.5c0-.276-.224-.5-.5-.5h-15zm15.5 5.463l-8 3.636-8-3.638V18.5c0 .276.224.5.5.5h15c.276 0 .5-.224.5-.5v-8.037z"})])],-1);function wVe(e,t,n,o,r,s){const i=z("image-uploader"),l=z("UploadFilled"),a=ve,c=z("verified-sign"),u=z("UserBadge"),d=z("router-link"),f=Mt("loading");return Ve((g(),k("div",aVe,[_("div",{style:Be({backgroundImage:`url('${s.user_profile.cover_photo||""}')`}),class:F(["object_cover",{no_cover:!s.user_profile.cover_photo}])},[s.isOwnProfile?(g(),k("div",cVe,[b(i,{additionalData:{resize:!0,max_width:1500},button_text:"Change",onUploaded:s.handleCoverPhotoUpload},null,8,["onUploaded"])])):O("",!0)],6),_("div",uVe,[_("div",dVe,[_("img",{alt:e.$t("Placeholder Photo"),src:s.user_profile.avatar||e.appVars.assets_url+"/images/placeholder.png"},null,8,fVe),s.isOwnProfile?(g(),k("div",hVe,[b(i,{additionalData:{resize:!0,max_width:200},button_text:"Change",onUploaded:s.handlePhotoUpload},{trigger:x(()=>[b(a,{class:"object_avatar_upload"},{default:x(()=>[b(l)]),_:1})]),_:1},8,["onUploaded"])])):O("",!0),s.level?(g(),k("div",pVe,[_("span",null,M(s.level),1)])):O("",!0)]),_("div",mVe,[_("h3",null,[ne(M(s.user_profile.display_name)+" ",1),s.user_profile.is_verified?(g(),L(c,{key:0})):O("",!0),b(u,{profile:s.user_profile},null,8,["profile"])]),_("p",gVe,"@"+M(s.user_profile.username),1)])]),_("div",_Ve,[_("ul",null,[_("li",null,[b(d,{to:{name:"user_profile",params:{username:s.user_profile.username}}},{default:x(()=>[ne(M(e.$t("About")),1)]),_:1},8,["to"])]),_("li",null,[b(d,{to:{name:"user_profile_feeds",params:{username:s.user_profile.username}}},{default:x(()=>[ne(M(e.$t("Posts")),1)]),_:1},8,["to"])]),_("li",null,[b(d,{to:{name:"user_spaces",params:{username:s.user_profile.username}}},{default:x(()=>[ne(M(e.$t("Spaces")),1)]),_:1},8,["to"])]),_("li",null,[b(d,{to:{name:"user_comments",params:{username:s.user_profile.username}}},{default:x(()=>[ne(M(e.$t("Comments")),1)]),_:1},8,["to"])])]),_("div",vVe,[r.fcomChatVars&&n.profile&&e.auth.user_id&&n.profile.user_id&&n.profile.user_id!=r.fcomChatVars.user.ID?(g(),k("a",{key:0,class:"fcom_chat_button fcom_route el-button fcom_primary_button",href:e.appVars.urls.portal_base+"chat?user_id="+n.profile.user_id},[b(a,null,{default:x(()=>[bVe]),_:1}),_("span",null,M(e.$t("Message")),1)],8,yVe)):O("",!0)])])])),[[f,r.updating]])}const kVe=fe(lVe,[["render",wVe]]),CVe={name:"ProfileAbout",components:{SocialLinks:OC},props:["profile","isOwn"]},SVe={class:"app_side_widget"},$Ve={class:"widget_header"},EVe={key:0,class:"widget_actions"},xVe={key:0,class:"widget_body"},TVe=["innerHTML"],MVe={key:1,style:{"text-align":"center"}},AVe=_("hr",null,null,-1),OVe=_("hr",null,null,-1),IVe={class:"meta_line"},NVe={key:2,class:"meta_line"};function PVe(e,t,n,o,r,s){const i=z("EditPen"),l=ve,a=Ze,c=z("SocialLinks"),u=qt;return g(),k("div",SVe,[_("div",$Ve,[_("h3",null,M(e.$t("About")),1),n.isOwn?(g(),k("div",EVe,[b(a,{"aria-label":"Edit Your Profile",onClick:t[0]||(t[0]=d=>e.$router.push({name:"update_profile",params:{username:n.profile.username}})),text:""},{default:x(()=>[b(l,null,{default:x(()=>[b(i)]),_:1})]),_:1})])):O("",!0)]),n.profile?(g(),k("div",xVe,[n.profile.short_description_rendered?(g(),k("div",{key:0,class:"space_description feed_md_content",innerHTML:n.profile.short_description_rendered},null,8,TVe)):n.isOwn?(g(),k("div",MVe,[AVe,b(a,{"aria-label":"Add your profile description",onClick:t[1]||(t[1]=d=>e.$router.push({name:"update_profile",params:{username:n.profile.username}})),type:"info"},{default:x(()=>[b(l,null,{default:x(()=>[b(i)]),_:1}),_("span",null,M(e.$t("Add your profile description")),1)]),_:1})])):O("",!0),OVe,_("div",IVe,M(e.$t("Joined: %s",e.humanDateDiff(n.profile.created_at))),1),n.profile.last_activity?(g(),k("div",NVe,M(e.$t("Last seen: %s",e.humanDateDiff(n.profile.last_activity))),1)):O("",!0),b(c,{xprofile:n.profile,isOwn:n.isOwn},null,8,["xprofile","isOwn"])])):(g(),L(u,{key:1,animated:!0}))])}const BL=fe(CVe,[["render",PVe]]),LVe={name:"FeedProfile",props:["username"],components:{SpaceMenu:PL,Layout:pr,AppLayout:Vr,UserHeader:kVe,ProfileAbout:BL,RecentActivities:S_},data(){return{profile:null,loading:!0}},computed:{isOwn(){return this.profile&&this.profile.user_id==this.auth.user_id}},watch:{username(){this.profile=null,this.getProfile()}},methods:{getProfile(){this.loading=!0,this.$get("profile/"+this.username).then(e=>{this.profile=e.profile,this.loading=!1,this.changeTitle(e.profile.display_name),e.profile.user_id==this.auth.user_id&&(this.auth.compilation_score=e.profile.compilation_score)}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})},approveUser(){this.loading=!0,this.$patch("members/"+this.profile.user_id,{status:"active"}).then(e=>{this.$notify.success(e.message),this.profile.status="active"}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})}},mounted(){this.getProfile()}},RVe={key:0},FVe={key:1},DVe=_("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[_("path",{fill:"currentColor",d:"M512 128v64H256a64 64 0 0 0-64 64v512a64 64 0 0 0 64 64h512a64 64 0 0 0 64-64V512h64v256a128 128 0 0 1-128 128H256a128 128 0 0 1-128-128V256a128 128 0 0 1 128-128z"}),_("path",{fill:"currentColor",d:"M768 384a128 128 0 1 0 0-256 128 128 0 0 0 0 256m0 64a192 192 0 1 1 0-384 192 192 0 0 1 0 384"})],-1),BVe={class:"fcom_profile_box"},VVe={key:0,class:"profile_holder"},zVe={class:"fcom_main_side_wrap"},jVe={class:"widget_recent_activities"};function HVe(e,t,n,o,r,s){const i=z("router-link"),l=T3,a=x3,c=Ze,u=ve,d=z("user-header"),f=z("router-view"),h=Ii,p=z("ProfileAbout"),m=z("RecentActivities"),v=_p,y=hd,E=z("layout"),w=z("app-layout");return g(),L(w,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:x(()=>[b(E,{wrapper_class:"no_bg_layout",title:"...."},{title:x(()=>[b(a,null,{default:x(()=>[b(l,null,{default:x(()=>[b(i,{to:{name:"all_members"}},{default:x(()=>[ne(M(e.$t("Members")),1)]),_:1})]),_:1}),r.profile?(g(),L(l,{key:0},{default:x(()=>[s.isOwn?(g(),k("span",RVe,M(e.$t("My Profile")),1)):(g(),k("span",FVe,M(r.profile.display_name),1))]),_:1})):O("",!0)]),_:1})]),actions:x(()=>[r.profile&&e.hasPermission("super_admin")&&r.profile.status!="active"?(g(),k(Q,{key:0},[_("span",null,M(e.$labelize(r.profile.status)),1),b(c,{type:"success",onClick:t[0]||(t[0]=C=>this.$confirm(e.$t("Are you sure you want to approve this user?"),e.$t("Warning"),{type:"warning"}).then(()=>{s.approveUser()}))},{default:x(()=>[ne(M(e.$t("Approve Account")),1)]),_:1})],64)):O("",!0),r.profile&&(s.isOwn||this.hasPermission("super_admin"))?(g(),k(Q,{key:1},[b(i,{to:{name:"user_notification_settings",params:{username:r.profile.username}},class:"el-button el-button--text fcom_secondary_button"},{default:x(()=>[b(u,null,{default:x(()=>[DVe]),_:1}),_("span",null,M(e.$t("Notification Settings")),1)]),_:1},8,["to"]),e.$route.name!=="update_profile"?(g(),L(c,{key:0,onClick:t[1]||(t[1]=C=>e.$router.push({name:"update_profile",params:{username:r.profile.username}})),class:"fcom_primary_button"},{default:x(()=>[ne(M(e.$t("Edit Profile")),1)]),_:1})):O("",!0)],64)):O("",!0)]),default:x(()=>[b(d,{username:n.username,onRefetch:s.getProfile,isOwn:s.isOwn,profile:r.profile},null,8,["username","onRefetch","isOwn","profile"]),b(y,{class:"fcom_resp_container fcom_space_container fcom_main_container"},{default:x(()=>[b(h,{class:"fcom_main"},{default:x(()=>[_("div",BVe,[r.profile?(g(),k("div",VVe,[b(f,{isOwn:s.isOwn,username:n.username,onRefetch:s.getProfile,profile:r.profile},null,8,["isOwn","username","onRefetch","profile"])])):O("",!0)])]),_:1}),e.$route.meta.disable_sidebar?O("",!0):(g(),L(v,{key:0,class:"fcom_resp_side",width:"306px"},{default:x(()=>[_("div",zVe,[_("div",jVe,[e.$route.name!=="user_profile"?(g(),L(p,{key:0,isOwn:s.isOwn,profile:r.profile},null,8,["isOwn","profile"])):r.profile?(g(),L(m,{key:1,widget_title:e.$t("Recent Activities"),context:{user_id:r.profile.user_id}},null,8,["widget_title","context"])):O("",!0)])])]),_:1}))]),_:1})]),_:1})]),_:1})}const UVe=fe(LVe,[["render",HVe]]),WVe={name:"ProfileFeeds",components:{AllFeeds:Lp},props:["profile"]};function qVe(e,t,n,o,r,s){const i=z("all-feeds");return g(),L(i,{feed_name:"profile_feed",require_space_selection:e.appVars.features.disable_global_posts,user_id:n.profile.user_id,hide_create_form:n.profile.user_id!=e.auth.user_id},null,8,["require_space_selection","user_id","hide_create_form"])}const KVe=fe(WVe,[["render",qVe]]),GVe={name:"UserSpaces",props:["profile"],components:{Calendar:lJ,Baseball:tJ,GroupIcon:HC,GlobIcon:FL},data(){return{communities:[],loading:!1}},methods:{getBtnLevel(e){return e=="course"?this.$t("View Course"):this.$t("View Space")},goToSpaceFeeds(e){this.$router.push({name:"space_feeds",params:{space:e}})},getExcerpt(e,t){return e.length>t?e.substring(0,t)+"...":e},fetch(){this.loading=!0,this.$get("profile/"+this.profile.username+"/spaces").then(e=>{this.communities=e.spaces}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})}},mounted(){this.fetch()}},YVe={class:"user_spaces"},JVe={class:"fcom_box_card_list"},ZVe=["onClick"],XVe=["src"],QVe=["src"],eze={key:2,class:"fcom_no_image"},tze={class:"fcom_box_card_info"},nze={class:"fcom_box_card_name"},oze={class:"fcom_box_card_details"},rze={class:"details_item"},sze={class:"details_item"},ize={class:"fcom_box_card_action"},lze=["onClick"],aze={key:0,class:"loading"},cze={key:1,class:"no_members"};function uze(e,t,n,o,r,s){const i=z("router-link"),l=z("GlobIcon"),a=ve,c=z("Lock"),u=z("GroupIcon"),d=qt;return g(),k("div",YVe,[_("div",JVe,[(g(!0),k(Q,null,Me(r.communities,f=>{var h;return g(),k("div",{key:f.id,class:"fcom_each_box_card"},[_("div",{class:"fcom_box_card_avatar",onClick:p=>e.$router.push({name:"space_feeds",params:{space:f.slug}})},[(h=f.settings)!=null&&h.og_image?(g(),k("img",{key:0,src:f.settings.og_image,alt:""},null,8,XVe)):f.cover_photo?(g(),k("img",{key:1,src:f.cover_photo,alt:""},null,8,QVe)):(g(),k("div",eze))],8,ZVe),_("div",tze,[_("div",nze,[b(i,{class:"user_route",to:{name:"space_feeds",params:{space:f.slug}}},{default:x(()=>[ne(M(s.getExcerpt(f.title,30)),1)]),_:2},1032,["to"])]),_("div",oze,[_("div",rze,[f.privacy==="public"?(g(),L(a,{key:0},{default:x(()=>[b(l)]),_:1})):(g(),L(a,{key:1},{default:x(()=>[b(c)]),_:1})),_("span",null,M(f.privacy==="public"?e.$t("Public"):e.$t("Private")),1)]),_("div",sze,[b(a,null,{default:x(()=>[b(u)]),_:1}),_("span",null,M(e.$_n("%s Member","%s Members",e.$formatNumber(f.members_count))),1)])]),_("div",ize,[_("button",{class:"fcom_card_button",onClick:p=>s.goToSpaceFeeds(f.slug)},M(s.getBtnLevel(f.type)),9,lze)])])])}),128))]),r.loading?(g(),k("div",aze,[b(d,{class:"white_loaded",rows:3,animated:!0}),b(d,{style:{"margin-top":"20px"},class:"white_loaded",rows:3,animated:!0})])):!r.loading&&!r.communities.length?(g(),k("div",cze,M(e.$t("No Spaces found.")),1)):O("",!0)])}const dze=fe(GVe,[["render",uze]]),fze={name:"UserProfileUpdate",props:["profile","username"],components:{SlugInput:zC,MarkdownEditor:wC},data(){return{updating:!1,loading:!1,notification_settings:{email_on_comment:!1},profileData:{username:this.profile.username,display_name:this.profile.display_name,first_name:this.profile.first_name,last_name:this.profile.last_name,email:this.profile.email,website:this.profile.website,short_description:this.profile.short_description,user_id:this.profile.user_id,is_verified:this.profile.is_verified,social_links:this.profile.social_links||{},badge_slug:this.profile.badge_slug,status:this.profile.status},fcom_is_dirty:!1}},methods:{updateProfile(){this.updating=!0,this.$post("profile/"+this.username,{data:this.profileData}).then(e=>{if(this.fcom_is_dirty=!1,this.$notify.success(e.message),e.redirect_url){window.location.href=e.redirect_url;return}e.profile.user_id==this.auth.user_id&&(this.auth.compilation_score=e.profile.compilation_score),this.$router.push({name:"update_profile",params:{username:e.profile.username}}),this.$emit("refetch")}).catch(e=>{console.log(e),this.$handleError(e)}).finally(()=>{this.updating=!1})}},mounted(){this.$nextTick(()=>{const e=document.querySelector(".object_info");e&&window.scrollTo({top:e.offsetTop-100,behavior:"smooth"})})}},hze={key:0,class:"fcom_sub_group"},pze={class:"fcom_sub_group_header"},mze={class:"fcom_sub_group_content"},gze={key:1,style:{"margin-bottom":"20px"}},_ze={class:"fcom_sub_group"},vze={class:"fcom_sub_group_header"},yze={key:1,class:"help_msg"},bze={class:"fcom_fixed_bottom_overlay"};function wze(e,t,n,o,r,s){const i=Dn,l=Ai,a=gp,c=mp,u=z("markdown-editor"),d=ve,f=Fr,h=z("slug-input"),p=z("UserBadge"),m=jo,v=zo,y=V0,E=Oi,w=Ze,C=Mi,T=Mt("loading");return g(),k("div",{class:F([{fcom_is_dirty:r.fcom_is_dirty},"fcom_update_profile"])},[b(C,{onSubmit:t[9]||(t[9]=Ge($=>e.doNothing(),["prevent"])),onInput:t[10]||(t[10]=$=>r.fcom_is_dirty=!0),"label-position":"top",modelValue:r.profileData,"onUpdate:modelValue":t[11]||(t[11]=$=>r.profileData=$)},{default:x(()=>[b(c,{gutter:30},{default:x(()=>[b(a,{xs:24,md:12},{default:x(()=>[b(l,{label:e.$t("First Name")},{default:x(()=>[b(i,{modelValue:r.profileData.first_name,"onUpdate:modelValue":t[0]||(t[0]=$=>r.profileData.first_name=$)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),b(a,{xs:24,md:12},{default:x(()=>[b(l,{label:e.$t("Last Name")},{default:x(()=>[b(i,{modelValue:r.profileData.last_name,"onUpdate:modelValue":t[1]||(t[1]=$=>r.profileData.last_name=$)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1})]),_:1}),b(c,{gutter:30},{default:x(()=>[b(a,{xs:24,md:12},{default:x(()=>[b(l,{label:e.$t("Email")},{default:x(()=>[b(i,{disabled:"",readonly:"",modelValue:r.profileData.email,"onUpdate:modelValue":t[2]||(t[2]=$=>r.profileData.email=$)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),b(a,{xs:24,md:12},{default:x(()=>[b(l,{label:e.$t("Website URL")},{default:x(()=>[b(i,{type:"url",modelValue:r.profileData.website,"onUpdate:modelValue":t[3]||(t[3]=$=>r.profileData.website=$)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1})]),_:1}),b(l,{class:"fcom_editor_input_wrap",label:e.$t("Short Bio")},{default:x(()=>[b(u,{disable_mention:!0,disable_media:!0,modelValue:r.profileData.short_description,"onUpdate:modelValue":t[4]||(t[4]=$=>r.profileData.short_description=$)},null,8,["modelValue"])]),_:1},8,["label"]),e.appVars.socialLinkProviders?(g(),k("div",hze,[_("div",pze,[_("h5",null,M(e.$t("Social Links")),1),_("p",null,M(e.$t("Add your social media profile link.")),1)]),_("div",mze,[(g(!0),k(Q,null,Me(e.appVars.socialLinkProviders,($,A)=>(g(),L(l,{key:A,label:$.title},{default:x(()=>[b(i,{placeholder:$.placeholder,modelValue:r.profileData.social_links[A],"onUpdate:modelValue":N=>r.profileData.social_links[A]=N},{prepend:x(()=>[b(d,{style:{"margin-right":"10px"},innerHTML:$.icon_svg},null,8,["innerHTML"]),_("span",null,M($.domain),1)]),_:2},1032,["placeholder","modelValue","onUpdate:modelValue"])]),_:2},1032,["label"]))),128))])])):O("",!0),this.hasPermission("super_admin")?(g(),k("div",gze,[_("div",_ze,[_("div",vze,[_("h5",null,M(e.$t("Admin Actions")),1),_("p",null,M(e.$t("Admin tools for account verification and status management.")),1)]),b(l,{label:e.$t("Account Verification"),class:"checkbox_label"},{default:x(()=>[b(f,{"true-value":1,"false-value":0,modelValue:r.profileData.is_verified,"onUpdate:modelValue":t[5]||(t[5]=$=>r.profileData.is_verified=$)},{default:x(()=>[ne(M(e.$t("Mark this account as verified")),1)]),_:1},8,["modelValue"])]),_:1},8,["label"]),b(l,{label:e.$t("Space Account Username")},{default:x(()=>[b(h,{modelValue:r.profileData.username,"onUpdate:modelValue":t[6]||(t[6]=$=>r.profileData.username=$),placeholder:e.$t("Username")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),e.appVars.user_badges?(g(),L(l,{key:0,label:e.$t("Badge")},{default:x(()=>[b(v,{clearable:"",modelValue:r.profileData.badge_slug,"onUpdate:modelValue":t[7]||(t[7]=$=>r.profileData.badge_slug=$),placeholder:e.$t("User profile Badge")},{default:x(()=>[(g(!0),k(Q,null,Me(e.appVars.user_badges,$=>(g(),L(m,{key:$.slug,label:$.title,value:$.slug},{default:x(()=>[b(p,{badge:$,is_preview:!0},null,8,["badge"])]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"])):O("",!0),b(l,{label:e.$t("Access Status")},{default:x(()=>[b(E,{modelValue:r.profileData.status,"onUpdate:modelValue":t[8]||(t[8]=$=>r.profileData.status=$),class:"fcom_radio_group"},{default:x(()=>[b(y,{value:"active"},{default:x(()=>[ne(M(e.$t("Active")),1)]),_:1}),b(y,{value:"pending"},{default:x(()=>[ne(M(e.$t("Pending")),1)]),_:1}),b(y,{value:"blocked"},{default:x(()=>[ne(M(e.$t("Blocked")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),r.profileData.status!="active"?(g(),k("div",yze,[_("p",null,M(e.$t("The user can not access to portal")),1)])):O("",!0)])])):O("",!0),b(l,null,{default:x(()=>[_("div",bze,[Ve((g(),L(w,{class:"fcom_primary_button",onClick:s.updateProfile,disabled:r.updating},{default:x(()=>[ne(M(e.$t("Save Changes")),1)]),_:1},8,["onClick","disabled"])),[[T,r.updating]])])]),_:1})]),_:1},8,["modelValue"])],2)}const kze=fe(fze,[["render",wze]]),Cze={name:"CalendarIcon"},Sze={width:"14",height:"16",viewBox:"0 0 14 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},$ze=h0('<path d="M11 1.3335V2.66683M3 1.3335V2.66683" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M6.99766 8.66699H7.00364M6.99766 11.3337H7.00364M9.66134 8.66699H9.66732M4.33398 8.66699H4.33997M4.33398 11.3337H4.33997" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"></path><path d="M1.33398 5.3335H12.6673" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M0.666992 8.16216C0.666992 5.25729 0.666992 3.80486 1.50174 2.90243C2.33648 2 3.67999 2 6.36699 2H7.63366C10.3207 2 11.6642 2 12.4989 2.90243C13.3337 3.80486 13.3337 5.25729 13.3337 8.16216V8.5045C13.3337 11.4094 13.3337 12.8618 12.4989 13.7642C11.6642 14.6667 10.3207 14.6667 7.63366 14.6667H6.36699C3.67999 14.6667 2.33648 14.6667 1.50174 13.7642C0.666992 12.8618 0.666992 11.4094 0.666992 8.5045V8.16216Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M1 5.3335H13" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path>',5),Eze=[$ze];function xze(e,t,n,o,r,s){return g(),k("svg",Sze,Eze)}const Tze=fe(Cze,[["render",xze]]),Mze={name:"UserAbout",props:["profile","isOwn"],components:{Timer:vT,SocialLinks:OC,CalendarIcon:Tze},computed:{hasSocialLinks(){return this.socialLinks.length>0},socialLinks(){var o,r;let e=(o=this.profile)==null?void 0:o.social_links;if(e||(e=(r=this.profile.meta)==null?void 0:r.social_links),!e||Object.keys(e).length===0)return[];const t=[],n=this.appVars.socialLinkProviders;return Object.entries(n).forEach(([s,i])=>{e[s]&&t.push({title:i.title,icon:i.icon_svg,text:e[s],url:i.domain+e[s]})}),t}},methods:{goToUpdateProfile(){this.$router.push({name:"update_profile",params:{username:this.profile.username}})}}},Aze={class:"about_wrap"},Oze={class:"about_header"},Ize={key:0,class:"about_body"},Nze=["innerHTML"],Pze={key:1},Lze={class:"about_items"},Rze={class:"about_item"},Fze={key:0,class:"about_item"},Dze={key:2,class:"about_items"},Bze={key:0,class:"items_title"},Vze=["href","title"];function zze(e,t,n,o,r,s){const i=z("EditPen"),l=ve,a=Ze,c=z("CalendarIcon"),u=z("Timer"),d=qt;return g(),k("div",Aze,[_("div",Oze,[_("h3",null,M(e.$t("About")),1),n.isOwn?(g(),L(a,{key:0,"aria-label":"Edit your profile description",onClick:s.goToUpdateProfile,text:""},{default:x(()=>[b(l,null,{default:x(()=>[b(i)]),_:1})]),_:1},8,["onClick"])):O("",!0)]),n.profile?(g(),k("div",Ize,[n.profile.short_description_rendered?(g(),k("div",{key:0,class:"about_description feed_texts feed_md_content",innerHTML:n.profile.short_description_rendered},null,8,Nze)):n.isOwn?(g(),k("div",Pze,[b(a,{class:"fcom_plain_button",onClick:t[0]||(t[0]=f=>e.$router.push({name:"update_profile",params:{username:n.profile.username}}))},{default:x(()=>[_("span",null,M("+ "+e.$t("Add your profile description")),1)]),_:1})])):O("",!0),_("div",Lze,[_("div",Rze,[b(l,null,{default:x(()=>[b(c)]),_:1}),ne(" "+M(e.$t("Joined %s",e.humanDateDiff(n.profile.created_at))),1)]),n.profile.last_activity?(g(),k("div",Fze,[b(l,null,{default:x(()=>[b(u)]),_:1}),ne(" "+M(e.$t("Last seen %s",e.humanDateDiff(n.profile.last_activity))),1)])):O("",!0)]),s.hasSocialLinks||n.isOwn?(g(),k("div",Dze,[s.hasSocialLinks?(g(),k("div",Bze,M(e.$t("Social Links")),1)):O("",!0),(g(!0),k(Q,null,Me(s.socialLinks,f=>(g(),k("a",{class:"about_item",target:"_blank",href:f.url,key:f.title,title:f.title},[b(l,{innerHTML:f.icon},null,8,["innerHTML"]),ne(" "+M(f.text),1)],8,Vze))),128)),n.isOwn&&!s.hasSocialLinks?(g(),L(a,{key:1,class:"fcom_plain_button",onClick:s.goToUpdateProfile},{default:x(()=>[_("span",null,M("+ "+e.$t("Add social links")),1)]),_:1},8,["onClick"])):O("",!0)])):O("",!0)])):(g(),L(d,{key:1,animated:!0}))])}const jze=fe(Mze,[["render",zze]]),Hze={name:"UserComments",props:["profile","username","isOwn"],components:{Pagination:Rp,Check:e3},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("profile/"+this.username+"/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})},deleteComment(e,t){this.$confirm(this.$t("Are you sure you want to delete this comment and associate 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})},limitCharacters(e,t){return e.slice(0,t)+(e.length>t?"...":"")},getPostRoute(e){var n;let t=(n=e.post)==null?void 0:n.type;return!t||!e.post?{name:"all_feeds"}:t=="text"||t=="article"?{name:"single_feed",params:{feed_slug:e.post.slug},query:{comment_id:e.id}}:t=="course_lesson"&&e.post.space?{name:"view_lesson",params:{course_slug:e.post.space.slug,lesson_slug:e.post.slug},query:{comment_id:e.id}}:{name:"all_feeds",query:{comment_id:e.id,post_id:e.post.id}}},getPostExcerpt(e){let t=e.type;t=="text"&&(t="");let n="";return e.title?n=e.title:n=this.getExcerpt(e.message,50),n+(t?" ("+t+")":"")}},mounted(){this.fetchComments()}},Uze={key:0,class:"white_loaded"},Wze={class:"course_comments feed_comments user_comments"},qze=_("span",{class:"comment_icon"},null,-1),Kze={class:"comment_text_head"},Gze={class:"comment_text_head_time"},Yze={class:"comment_action"},Jze={class:"comment_text_head_post"},Zze=["innerHTML"],Xze={key:0};function Qze(e,t,n,o,r,s){const i=qt,l=z("Delete"),a=ve,c=Ze,u=z("router-link"),d=z("pagination");return r.loading?(g(),k("div",Uze,[b(i,{row:5})])):(g(),k(Q,{key:1},[_("div",Wze,[(g(!0),k(Q,null,Me(r.comments,(f,h)=>(g(),k("div",{key:f.id,class:"fcom_course_comment each_comment"},[qze,_("div",Kze,[_("div",Gze,M(e.humanDateDiff(f.created_at)),1),_("div",Yze,[n.isOwn?(g(),L(c,{key:0,class:"fcom_plain_button",onClick:p=>s.deleteComment(f,h)},{default:x(()=>[b(a,null,{default:x(()=>[b(l)]),_:1})]),_:2},1032,["onClick"])):O("",!0)])]),_("div",Jze,[b(u,{class:"post_link",to:s.getPostRoute(f)},{default:x(()=>[ne(M(s.getPostExcerpt(f.post)),1)]),_:2},1032,["to"])]),_("div",{class:"comment_text_body feed_md_content",innerHTML:s.limitCharacters(f.message_rendered,180)},null,8,Zze)]))),128)),r.pagination.total?O("",!0):(g(),k("div",Xze,[_("h5",null,M(e.$t("%s did not add any comment to any posts yet",n.profile.display_name)),1)]))]),b(d,{pagination:r.pagination,onFetch:s.fetchComments},null,8,["pagination","onFetch"])],64))}const eje=fe(Hze,[["render",Qze]]),tje={name:"NotificationPref",components:{Notification:rZ},props:["username"],data(){return{pref:{},spaceGroups:[],is_custom:!1,loading:!1,error:"",saving:!1,digestEmailDay:"",initialState:null}},computed:{fcom_is_dirty(){return this.initialState?JSON.stringify(this.pref)+JSON.stringify(this.spaceGroups)!=this.initialState:!1}},methods:{getPrefs(){this.loading=!0,this.$get(`profile/${this.username}/notificatin-preferance`).then(e=>{this.pref=e.user_globals,this.spaceGroups=e.spaceGroups,this.digestEmailDay=e.digestEmailDay,this.initialState=JSON.stringify(this.pref)+JSON.stringify(this.spaceGroups)}).catch(e=>{this.error=e==null?void 0:e.message,this.$handleError(e)}).finally(()=>{this.loading=!1})},saveSettings(){this.saving=!0;let e={};this.spaceGroups.forEach(t=>{t.spaces.forEach(n=>{e[n.id]=n.pref})}),this.$post(`profile/${this.username}/notificatin-preferance`,{user_globals:this.pref,space_prefs:e}).then(t=>{this.$notify.success(t.message),this.initialState=JSON.stringify(this.pref)+JSON.stringify(this.spaceGroups)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1})}},mounted(){(this.auth.user_id||this.hasPermission("super_admin"))&&this.getPrefs()}},nje={class:"fcom_notification_config"},oje={key:0},rje=["innerHTML"],sje={key:1,class:"white_loaded"},ije={class:"fcom_notification_card"},lje={class:"fcom_notification_card__header"},aje={class:"fcom_notification_card__title"},cje={class:"fcom_notification_card__body"},uje={class:"fcom_input_wrap"},dje={key:0},fje={key:1,class:"fcom_not_enabled"},hje={class:"fcom_input_wrap"},pje={key:0},mje={key:1,class:"fcom_not_enabled"},gje={class:"fcom_input_wrap"},_je={key:0},vje={key:1,class:"fcom_not_enabled"},yje={class:"fcom_input_wrap"},bje={key:0},wje={key:1,class:"fcom_not_enabled"},kje={class:"fcom_notification_card"},Cje={class:"fcom_notification_card__header"},Sje=_("svg",{version:"1.1",viewBox:"0 0 128 128","xml:space":"preserve"},[_("g",null,[_("path",{d:"M64,42c-13.2,0-24,10.8-24,24s10.8,24,24,24s24-10.8,24-24S77.2,42,64,42z M64,82c-8.8,0-16-7.2-16-16s7.2-16,16-16 s16,7.2,16,16S72.8,82,64,82z"}),_("path",{d:"M64,100.8c-14.9,0-29.2,6.2-39.4,17.1l-2.7,2.9l5.8,5.5l2.7-2.9c8.8-9.4,20.7-14.6,33.6-14.6s24.8,5.2,33.6,14.6l2.7,2.9 l5.8-5.5l-2.7-2.9C93.2,107.1,78.9,100.8,64,100.8z"}),_("path",{d:"M97,47.9v8c9.4,0,18.1,3.8,24.6,10.7l5.8-5.5C119.6,52.7,108.5,47.9,97,47.9z"}),_("path",{d:"M116.1,20c0-10.5-8.6-19.1-19.1-19.1S77.9,9.5,77.9,20S86.5,39.1,97,39.1S116.1,30.5,116.1,20z M85.9,20 c0-6.1,5-11.1,11.1-11.1s11.1,5,11.1,11.1s-5,11.1-11.1,11.1S85.9,26.1,85.9,20z"}),_("path",{d:"M31,47.9c-11.5,0-22.6,4.8-30.4,13.2l5.8,5.5c6.4-6.9,15.2-10.7,24.6-10.7V47.9z"}),_("path",{d:"M50.1,20C50.1,9.5,41.5,0.9,31,0.9S11.9,9.5,11.9,20S20.5,39.1,31,39.1S50.1,30.5,50.1,20z M31,31.1 c-6.1,0-11.1-5-11.1-11.1S24.9,8.9,31,8.9s11.1,5,11.1,11.1S37.1,31.1,31,31.1z"})])],-1),$je={class:"fcom_notification_card__title"},Eje={class:"fcom_card_sections fcom_course_type_structured"},xje={class:"fcom_section_labels"},Tje={class:"fcom_lebel fcom_label_lesson"},Mje={style:{"text-align":"right"},class:"fcom_lebel fcom_label_actions"},Aje={class:"fcom_section_primary"},Oje={class:"fcom_section_primary_item"},Ije={class:"fcom_section_primary_item_title"},Nje={class:"fcom_section_items"},Pje={class:"fcom_section_item"},Lje={class:"fcom_section_item_title"},Rje=["innerHTML"],Fje=["innerHTML"],Dje={key:2,class:"fcom_no_avatar"},Bje={class:"fcom_section_item_actions"},Vje={class:"fcom_notification_card fcom_fixed_bottom_overlay"},zje={key:3},jje={key:0},Hje=["href"];function Uje(e,t,n,o,r,s){const i=qt,l=z("Notification"),a=ve,c=Fr,u=jo,d=zo,f=Ze,h=Mt("loading");return g(),k("div",nje,[r.error?(g(),k("div",oje,[_("p",{innerHTML:r.error},null,8,rje)])):r.loading?(g(),k("div",sje,[b(i,{rows:10,animated:!0})])):e.auth.user_id||e.hasPermission("super_admin")&&r.pref?(g(),k("div",{key:2,class:F([{fcom_is_dirty:s.fcom_is_dirty},"fcom_notification_config_body"])},[_("div",ije,[_("div",lje,[b(a,{style:{"font-size":"30px"}},{default:x(()=>[b(l)]),_:1}),_("div",aje,[_("h3",null,M(e.$t("Global Email Notifications")),1),_("p",null,M(e.$t("These settings will be applied across all spaces you're a member of.")),1)])]),_("div",cje,[_("div",uje,[b(c,{"true-value":"yes","false-value":"no",modelValue:r.pref.com_my_post_mail,"onUpdate:modelValue":t[0]||(t[0]=p=>r.pref.com_my_post_mail=p)},{default:x(()=>[ne(M(e.$t("Email me when someone comments on my post")),1)]),_:1},8,["modelValue"]),r.pref.com_my_post_mail=="yes"?(g(),k("p",dje,M(e.$t("You will receive an email when someone leaves a comment on your post.")),1)):(g(),k("p",fje,M(e.$t("No email will be sent for comments on your post.")),1))]),_("div",hje,[b(c,{"true-value":"yes","false-value":"no",modelValue:r.pref.reply_my_com_mail,"onUpdate:modelValue":t[1]||(t[1]=p=>r.pref.reply_my_com_mail=p)},{default:x(()=>[ne(M(e.$t("Email me when someone replies to my comments")),1)]),_:1},8,["modelValue"]),r.pref.reply_my_com_mail=="yes"?(g(),k("p",pje,M(e.$t("You will receive an email when someone replies to your comments.")),1)):(g(),k("p",mje,M(e.$t("No email will be sent when someone replies to your comments.")),1))]),_("div",gje,[b(c,{"true-value":"yes","false-value":"no",modelValue:r.pref.mention_mail,"onUpdate:modelValue":t[2]||(t[2]=p=>r.pref.mention_mail=p)},{default:x(()=>[ne(M(e.$t("Email me when someone mentions me in a post or comment")),1)]),_:1},8,["modelValue"]),r.pref.mention_mail=="yes"?(g(),k("p",_je,M(e.$t("You will receive an email when someone mentions you in a comment or post.")),1)):(g(),k("p",vje,M(e.$t("No emails will be sent when someone mentions you.")),1))]),_("div",yje,[b(c,{"true-value":"yes","false-value":"no",modelValue:r.pref.digest_mail,"onUpdate:modelValue":t[3]||(t[3]=p=>r.pref.digest_mail=p)},{default:x(()=>[ne(M(e.$t("Weekly digest on %s",r.digestEmailDay)),1)]),_:1},8,["modelValue"]),r.pref.digest_mail=="yes"?(g(),k("p",bje,M(e.$t("You will get a digest email with curated activities in the community")),1)):(g(),k("p",wje,M(e.$t("No digest email will be sent.")),1))])])]),_("div",kje,[_("div",Cje,[b(a,{style:{"font-size":"30px"}},{default:x(()=>[Sje]),_:1}),_("div",$je,[_("h3",null,M(e.$t("New Posts Notifications")),1),_("p",null,M(e.$t("Subscribe to new posts notifications by space")),1)])]),_("div",Eje,[_("div",xje,[_("div",Tje,M(e.$t("Space")),1),_("div",Mje,M(e.$t("Notification")),1)]),(g(!0),k(Q,null,Me(r.spaceGroups,p=>(g(),k("div",{key:p.id},[_("div",Aje,[_("div",Oje,[_("div",Ije,[_("h4",null,M(p.title),1)])])]),_("div",Nje,[(g(!0),k(Q,null,Me(p.spaces,m=>(g(),k("div",Pje,[_("div",Lje,[m.icon?(g(),L(a,{key:0},{default:x(()=>[_("span",{innerHTML:m.icon},null,8,Rje)]),_:2},1024)):m.shape_svg?(g(),k("span",{key:1,innerHTML:m.shape_svg},null,8,Fje)):(g(),k("span",Dje)),_("span",null,M(m.title),1)]),_("div",Bje,[b(d,{size:"small",placeholder:e.$t("Email Disabled"),style:{width:"100%","max-width":"200px"},modelValue:m.pref,"onUpdate:modelValue":v=>m.pref=v},{default:x(()=>[b(u,{label:e.$t("Email Disabled"),value:""},null,8,["label"]),b(u,{label:e.$t("Notify only for Admin Posts"),value:"admin_only_posts"},null,8,["label"]),b(u,{label:e.$t("Notify for all posts"),value:"all_member_posts"},null,8,["label"])]),_:2},1032,["placeholder","modelValue","onUpdate:modelValue"])])]))),256))])]))),128))])]),_("div",Vje,[Ve((g(),L(f,{onClick:s.saveSettings,disabled:r.saving,class:"fcom_primary_button"},{default:x(()=>[ne(M(e.$t("Save Changes")),1)]),_:1},8,["onClick","disabled"])),[[h,r.saving]])])],2)):(g(),k("div",zje,[_("h3",null,M(e.$t("Sorry you do not have permission to access this.")),1),e.auth.user_id?O("",!0):(g(),k("div",jje,[_("p",null,M(e.$t("Please login to access this page.")),1),_("a",{href:e.appVars.auth_url,class:"el-button fcom_primary_button link_button"},M(e.$t("Login")),9,Hje)]))]))])}const Wje=fe(tje,[["render",Uje]]),qje={name:"UserNotificationSettings",props:["username"],components:{NotificationPrefForm:Wje},mounted(){this.$nextTick(()=>{const e=document.querySelector(".object_info");e&&window.scrollTo({top:e.offsetTop-100,behavior:"smooth"})})}},Kje={class:"fcom_routed_notification_settings"};function Gje(e,t,n,o,r,s){const i=z("notification-pref-form");return g(),k("div",Kje,[b(i,{username:n.username},null,8,["username"])])}const Yje=fe(qje,[["render",Gje]]),Jje={name:"MemberAction",props:["member","openedMemberId"],data(){return{status:this.member.status,working:!1,isOpened:!1}},watch:{openedMemberId(e){this.isOpened=e===this.member.user_id}},methods:{changeMemberStatus(){this.working=!0,this.$patch("members/"+this.member.user_id,{status:this.status}).then(e=>{this.member.status=this.status,this.$notify.success(e.message)}).catch(e=>{this.$handleError(e)}).finally(()=>{this.working=!1,this.isOpened=!1})},togglePopover(){this.$emit("togglePopover")}}},Zje={class:"card_action"};function Xje(e,t,n,o,r,s){const i=z("MoreFilled"),l=ve,a=Ze,c=hp,u=Oi,d=Ai,f=Mi,h=$o,p=Mt("loading");return g(),k("div",Zje,[b(h,{persistent:!1,placement:"bottom",width:270,visible:r.isOpened,onHide:t[2]||(t[2]=m=>r.isOpened=!1)},{reference:x(()=>[b(a,{"aria-label":e.$t("View actions"),onClick:s.togglePopover,size:"small",text:""},{default:x(()=>[b(l,{class:"fcom_more_icon"},{default:x(()=>[b(i)]),_:1})]),_:1},8,["aria-label","onClick"])]),default:x(()=>[b(f,{onSubmit:t[1]||(t[1]=Ge(m=>e.doNothing(),["prevent"])),"label-position":"top"},{default:x(()=>[b(d,{label:e.$t("Status")},{default:x(()=>[b(u,{modelValue:r.status,"onUpdate:modelValue":t[0]||(t[0]=m=>r.status=m)},{default:x(()=>[b(c,{label:e.$t("Active"),value:"active"},null,8,["label"]),b(c,{label:e.$t("Pending"),value:"pending"},null,8,["label"]),b(c,{label:e.$t("Blocked"),value:"blocked"},null,8,["label"])]),_:1},8,["modelValue"])]),_:1},8,["label"]),b(d,null,{default:x(()=>[Ve((g(),L(a,{disabled:r.working,onClick:s.changeMemberStatus,class:"fcom_primary_button"},{default:x(()=>[ne(M(e.$t("Update Status")),1)]),_:1},8,["disabled","onClick"])),[[p,r.working]])]),_:1})]),_:1})]),_:1},8,["visible"])])}const Qje=fe(Jje,[["render",Xje]]),eHe={name:"AllMembers",components:{SwitchListIcon:ML,SwitchTimelineIcon:TL,Search:ju,Layout:pr,AppLayout:Vr,Pagination:Rp,MemberAction:Qje},data(){return{loading:!1,members:[],pagination:{page:1,per_page:20,total:0},search:"",status:"active",sort_by:"last_activity",working:!1,openedMemberId:null}},methods:{fetch(){this.loading=!0,this.$get("members",{per_page:this.pagination.per_page,page:this.pagination.page,search:this.search,status:this.status,sort_by:this.sort_by}).then(e=>{window.scrollTo({top:0,behavior:"smooth"}),this.members=e.members.data,this.pagination.total=e.members.total}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})},changeMemberStatus(e,t){this.working=!0,this.$patch("members/"+e.user_id,{status:t}).then(n=>{this.$notify.success(n.message),e.status=t}).catch(n=>{this.$handleError(n)}).finally(()=>{this.working=!1})},toSearch(){this.pagination.page=1,this.fetch()},handleTogglePopover(e){this.openedMemberId=this.openedMemberId===e?null:e}},mounted(){this.$route.query.inactives&&(this.status="in_active"),this.fetch(),this.changeTitle(this.$t("All Members"))}},tHe={key:0,class:"member_header"},nHe={role:"region","aria-label":"Member Navigation",class:"member_status"},oHe={class:"search_member"},rHe={class:"feed_filters"},sHe=_("div",{class:"fcom_feed_divider"},null,-1),iHe={id:"feed_short_by",class:"fcom_feed_filter_label"},lHe={class:"space_members"},aHe={key:0,class:"loading"},cHe={key:1,class:"no_members"},uHe={key:2,class:"card_list"},dHe={role:"region","aria-label":"User Info",class:"card_content"},fHe={class:"card_avatar"},hHe={class:"card_info"},pHe={class:"info_header"},mHe={class:"meta_line"},gHe={class:"meta_line"},_He={class:"meta_line"},vHe={key:0,class:"card_footer"},yHe={style:{color:"red",display:"flex",gap:"10px"},class:"meta_line"},bHe={role:"region","aria-label":"Pagination",class:"pagination_wrap"};function wHe(e,t,n,o,r,s){const i=hp,l=Oi,a=Ze,c=z("Search"),u=ve,d=Dn,f=jo,h=zo,p=qt,m=z("UserAvatar"),v=z("UserRouteLink"),y=z("MemberAction"),E=z("Pagination"),w=z("layout"),C=z("app-layout");return g(),L(C,{wrapper_class:"fcom_single_layout fcom_max_layout"},{default:x(()=>[b(w,{use_scroll:!0,class:"no_bg_layout",title:e.$t("All Members")+" "+(r.pagination.total?" ("+e.$formatNumber(r.pagination.total)+")":"")},{default:x(()=>[e.isAdmin()?(g(),k("div",tHe,[_("div",nHe,[b(l,{onChange:s.toSearch,modelValue:r.status,"onUpdate:modelValue":t[0]||(t[0]=T=>r.status=T),class:"status_group"},{default:x(()=>[b(i,{value:"active"},{default:x(()=>[ne(M(e.$t("Active")),1)]),_:1}),b(i,{value:"in_active"},{default:x(()=>[ne(M(e.$t("Blocked")),1)]),_:1})]),_:1},8,["onChange","modelValue"])]),O("",!0)])):O("",!0),_("div",oHe,[b(d,{clearable:"",onClear:s.toSearch,onKeydown:rn(s.toSearch,["enter"]),modelValue:r.search,"onUpdate:modelValue":t[2]||(t[2]=T=>r.search=T),placeholder:e.$t("Search Members...")},{prefix:x(()=>[b(u,null,{default:x(()=>[b(c)]),_:1})]),_:1},8,["onClear","onKeydown","modelValue","placeholder"])]),_("div",rHe,[sHe,_("span",iHe,M(e.$t("Sort by:")),1),b(h,{"aria-label":e.$t("Sort members by"),modelValue:r.sort_by,"onUpdate:modelValue":t[3]||(t[3]=T=>r.sort_by=T),class:"fcom_minimal_select","popper-class":"plain_select",placeholder:e.$t("Latest Posts"),onChange:t[4]||(t[4]=T=>s.fetch())},{default:x(()=>[b(f,{value:"last_activity",label:e.$t("Last Activity")},null,8,["label"]),b(f,{value:"display_name",label:e.$t("Display Name")},null,8,["label"]),b(f,{value:"created_at",label:e.$t("Joining Date")},null,8,["label"])]),_:1},8,["aria-label","modelValue","placeholder"])]),_("div",lHe,[r.loading?(g(),k("div",aHe,[b(p,{class:"white_loaded",rows:3,animated:!0})])):!r.loading&&!r.members.length?(g(),k("div",cHe,M(e.$t("No members found")),1)):(g(),k("div",uHe,[(g(!0),k(Q,null,Me(r.members,(T,$)=>(g(),k("div",{key:T.user_id,class:"each_card"},[_("div",dHe,[_("div",fHe,[b(m,{is_online:e.isOnline(T.last_activity),xprofile:T},null,8,["is_online","xprofile"])]),_("div",hHe,[_("div",pHe,[b(v,{show_pop:!0,show_badge:!0,xprofile:T},null,8,["xprofile"]),_("div",mHe,M(e.$t("Joined %s",e.humanDateDiff(T.created_at))),1)]),_("div",gHe,[_("p",null,"@"+M(T.username),1)]),_("div",_He,M(e.getExcerpt(T.short_description,120)),1),T.status!="active"?(g(),k("div",vHe,[_("div",yHe,[_("span",null,M(e.$t("Status:"))+" "+M(e.$labelize(T.status)),1),b(a,{onClick:A=>s.changeMemberStatus(T,"active"),type:"danger"},{default:x(()=>[ne(M(e.$t("Approve Access")),1)]),_:2},1032,["onClick"])])])):O("",!0)])]),e.isAdmin()?(g(),L(y,{key:0,member:T,openedMemberId:r.openedMemberId,onTogglePopover:A=>s.handleTogglePopover(T.user_id)},null,8,["member","openedMemberId","onTogglePopover"])):O("",!0)]))),128))])),_("div",bHe,[b(E,{hide_on_single:!0,onFetch:t[5]||(t[5]=T=>s.fetch()),pagination:r.pagination},null,8,["pagination"])])])]),_:1},8,["title"])]),_:1})}const kHe=fe(eHe,[["render",wHe]]),CHe={name:"Notifications",components:{AppLayout:Vr,Layout:pr,NotificationsBlock:BA,Pagination:Rp},data(){return{status:"all",loading:!1,notifications:[],pagination:{page:1,per_page:20,total:0},working:!1,notification_type:"all"}},methods:{switchType(e){this.notification_type=e,this.fetch()},fetch(){this.loading=!0,this.$get("notifications",{per_page:this.pagination.per_page,page:this.pagination.page,status:this.status,notification_type:this.notification_type}).then(e=>{this.notifications=e.notifications.data,this.pagination.total=e.notifications.total}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1,window.scrollTo(0,0)})},markAllRead(){this.working=!0,this.$post("notifications/mark-all-read").then(e=>{this.$notify.success(e.message),this.fetch()}).catch(e=>{this.$handleError(e)}).finally(()=>{this.working=!1})}},mounted(){this.fetch(),this.changeTitle(this.$t("All Notifications")),window.scrollTo(0,0)}},SHe={class:"fcom_filter_menu"},$He={class:"fcom_filter_menu_ul"},EHe={style:{"border-top-left-radius":"0","border-top-right-radius":"0"},class:"space_members"},xHe={key:0,class:"notifications notifications_wrap"},THe={class:"pagination_wrap"},MHe={key:1},AHe={key:2};function OHe(e,t,n,o,r,s){const i=Ze,l=_A,a=z("notifications-block"),c=z("Pagination"),u=qt,d=z("layout"),f=z("app-layout"),h=Mt("loading");return g(),L(f,{wrapper_class:"fcom_single_layout"},{default:x(()=>[b(d,{content_class:"no_bg_layout",title:e.$t("Notifications")},{actions:x(()=>[b(i,{class:"fcom_primary_button",disabled:r.working,onClick:t[0]||(t[0]=p=>s.markAllRead())},{default:x(()=>[ne(M(e.$t("Mark all as read")),1)]),_:1},8,["disabled"])]),default:x(()=>[_("div",SHe,[_("ul",$He,[_("li",null,[_("a",{onClick:t[1]||(t[1]=Ge(p=>s.switchType("all"),["prevent"])),class:F({"router-link-exact-active":r.notification_type=="all"}),href:"#"},M(e.$t("All")),3)]),_("li",null,[_("a",{onClick:t[2]||(t[2]=Ge(p=>s.switchType("mentioned"),["prevent"])),class:F({"router-link-exact-active":r.notification_type=="mentioned"}),href:"#"},M(e.$t("Mentions")),3)]),_("li",null,[_("a",{onClick:t[3]||(t[3]=Ge(p=>s.switchType("following"),["prevent"])),class:F({"router-link-exact-active":r.notification_type=="following"}),href:"#"},M(e.$t("Following")),3)])]),b(l,{style:{"--el-switch-on-color":"#2271b1"},"active-value":"unread","inactive-value":"all","active-text":e.$t("Unread only"),modelValue:r.status,"onUpdate:modelValue":t[4]||(t[4]=p=>r.status=p)},null,8,["active-text","modelValue"])]),_("div",EHe,[r.notifications.length?Ve((g(),k("div",xHe,[b(a,{notifications:r.notifications},null,8,["notifications"]),_("div",THe,[b(c,{hide_on_single:!0,onFetch:t[5]||(t[5]=p=>s.fetch()),pagination:r.pagination},null,8,["pagination"])])])),[[h,r.loading]]):r.loading?(g(),k("div",AHe,[b(u,{animated:!0,rows:5})])):(g(),k("div",MHe,[_("p",null,M(e.$t("No notifications found")),1)]))])]),_:1},8,["title"])]),_:1})}const IHe=fe(CHe,[["render",OHe]]),NHe={name:"Bookmarks",components:{Feeds:Lp,AppLayout:Vr,Layout:pr},computed:{feed_base_url(){return"feeds/bookmarks"}},mounted(){this.changeTitle(this.$t("Your Bookmarks"))}},PHe={key:1};function LHe(e,t,n,o,r,s){const i=z("feeds"),l=z("layout"),a=z("app-layout");return g(),L(a,{wrapper_class:"fcom_single_layout fcom_compact_layout"},{default:x(()=>[b(l,{wrapper_class:"no_bg_layout",title:e.$t("Your Bookmarks")},{default:x(()=>[_("p",null,M(e.$t("Your saved posts")),1),e.appVars.auth.user_id?(g(),L(i,{key:0,feed_base_url:s.feed_base_url,hide_filters:!0,hide_create_form:!0,space:""},null,8,["feed_base_url"])):(g(),k("div",PHe,[_("p",null,M(e.$t("Please login to view your bookmarks")),1)]))]),_:1},8,["title"])]),_:1})}const RHe=fe(NHe,[["render",LHe]]),FHe={name:"AllCourses",components:{AppLayout:Vr,Layout:pr,GroupIcon:HC},data(){return{courses:[],loading:!0,pagination:{current_page:1,per_page:50,total:0},type:"all",newCourseModal:!1,is_admin:!1,courseCategories:null,topic_slug:null}},methods:{fetchCourses(){this.loading=!0,this.$get("courses",{page:this.pagination.current_page,per_page:this.pagination.per_page,type:this.type,topic_slug:this.topic_slug,with_categories:!this.courseCategories}).then(e=>{this.courses=e.courses.data,this.is_admin=e.is_admin,this.pagination.total=e.courses.total,e.course_categories&&e.course_categories.length&&(this.courseCategories=e.course_categories)}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})},setTopic(e){this.topic_slug=e;let t=JSON.parse(JSON.stringify(this.$route.query));e?(t.topic=e,this.$router.push({query:t})):(delete t.topic,this.$router.push({query:t})),console.log(t),this.fetchCourses()},SwitchToCourseView(e){this.type=e,this.$router.push({name:"courses",query:{type:e}}),this.fetchCourses()},getExcerpt(e){if(!e)return"";let t=e.replace(/(<([^>]+)>)/ig,"");return t.length>200&&(t=t.substring(0,200)+"..."),t},emitCreateCourse(){this.$eventBus.emit("createSpaceModal",{course_config:!0})}},mounted(){this.$route.query.type&&(this.type=this.$route.query.type),this.fetchCourses(),this.changeTitle("Courses")}},DHe=e=>(v7("data-v-2092d34c"),e=e(),y7(),e),BHe={class:"object_menu"},VHe={class:"fcom_space_menu_ul"},zHe={key:0},jHe={key:0,class:"fcom_space_topics"},HHe={class:"fcom_topics_filters"},UHe={class:"fcom_courses"},WHe={class:"fcom_box_card_list"},qHe=["onClick"],KHe=["src"],GHe={key:1,class:"fcom_no_image"},YHe={class:"fcom_box_card_info"},JHe={class:"fcom_box_card_name"},ZHe={class:"fcom_box_card_details"},XHe={class:"inline_details"},QHe=DHe(()=>_("span",{class:"fcom_inline_separator"},null,-1)),eUe={key:0,class:"inline_details"},tUe={key:0,class:"fcom_box_card_description"},nUe={class:"fcom_box_card_action"},oUe=["onClick"],rUe=["onClick"];function sUe(e,t,n,o,r,s){const i=Ze,l=pp,a=z("router-link"),c=z("GroupIcon"),u=ve,d=z("layout"),f=z("app-layout"),h=Mt("loading");return g(),L(f,{wrapper_class:"fcom_single_layout fcom_max_layout"},{default:x(()=>[b(d,{wrapper_class:"no_bg_layout",title:e.$t("Courses")},{actions:x(()=>[_("div",BHe,[_("ul",VHe,[_("li",null,[_("a",{onClick:t[0]||(t[0]=Ge(p=>s.SwitchToCourseView("all"),["prevent"])),class:F(r.type=="all"?"router-link-active router-link-exact-active":""),href:"#"},M(e.$t("All Courses")),3)]),_("li",null,[_("a",{onClick:t[1]||(t[1]=Ge(p=>s.SwitchToCourseView("enrolled"),["prevent"])),class:F(r.type=="enrolled"?"router-link-active router-link-exact-active":""),href:"#"},M(e.$t("My Courses")),3)]),e.isAdmin()?(g(),k("li",zHe,[b(i,{onClick:t[2]||(t[2]=p=>s.emitCreateCourse()),class:"fcom_primary_button"},{default:x(()=>[ne(M(e.$t("New Course")),1)]),_:1})])):O("",!0)])])]),default:x(()=>[r.courseCategories&&r.courseCategories.length?(g(),k("div",jHe,[_("div",HHe,[b(i,{onClick:t[3]||(t[3]=p=>s.setTopic("")),class:F({fcom_active_topic:!r.topic_slug})},{default:x(()=>[ne(M(e.$t("All")),1)]),_:1},8,["class"]),(g(!0),k(Q,null,Me(r.courseCategories,p=>(g(),L(i,{onClick:m=>s.setTopic(p.slug),class:F({fcom_active_topic:p.slug==r.topic_slug}),key:p.slug},{default:x(()=>[ne(M(p.title),1)]),_:2},1032,["onClick","class"]))),128))])])):O("",!0),Ve((g(),k("div",UHe,[_("div",WHe,[(g(!0),k(Q,null,Me(r.courses,p=>(g(),k("div",{key:p.id,class:"fcom_each_box_card"},[_("div",{class:"fcom_box_card_avatar",onClick:m=>e.$router.push({name:"view_course",params:{course_slug:p.slug}})},[p.cover_photo?(g(),k("img",{key:0,src:p.cover_photo,alt:""},null,8,KHe)):(g(),k("div",GHe))],8,qHe),_("div",YHe,[_("div",JHe,[b(a,{class:"course_route",to:{name:"view_course",params:{course_slug:p.slug}}},{default:x(()=>[ne(M(p.title)+" ",1),p.status=="draft"?(g(),L(l,{key:0,type:"info"},{default:x(()=>[ne(M(p.status),1)]),_:2},1024)):O("",!0)]),_:2},1032,["to"])]),_("div",ZHe,[_("div",XHe,[_("span",null,M(e.$_n("%d Section","%d Sections",p.sectionsCount)),1),QHe,_("span",null,M(e.$_n("%d Lesson","%d Lessons",p.lessonsCount)),1)]),p.studentsCount?(g(),k("div",eUe,[b(u,null,{default:x(()=>[b(c)]),_:1}),ne(" "+M(e.$_n("%s student","%s students",e.$formatNumber(p.studentsCount))),1)])):O("",!0)]),p.description?(g(),k("div",tUe,M(s.getExcerpt(p.description)),1)):O("",!0),_("div",nUe,[p.isEnrolled?(g(),k("button",{key:0,class:"fcom_card_button",onClick:m=>e.$router.push({name:"view_course",params:{course_slug:p.slug}})},M(e.$t("%s Completed",p.progress+"%")),9,oUe)):(g(),k("button",{key:1,class:"fcom_card_button",onClick:m=>e.$router.push({name:"view_course",params:{course_slug:p.slug}})},M(e.$t("View Course")),9,rUe))])])]))),128))])])),[[h,r.loading]])]),_:1},8,["title"])]),_:1})}const iUe=fe(FHe,[["render",sUe],["__scopeId","data-v-2092d34c"]]),lUe={name:"ViewCoursesRoute",components:{Layout:pr,AppLayout:Vr},props:["course_slug"],data(){return{course:{},sections:[],track:{},loading:!1,currentLessonIndex:null,currentLesson:null}},watch:{course_slug(){this.fetchCourse()}},computed:{allLessons(){let e=[];return ya(this.sections,t=>{ya(t.lessons,n=>{e.push(n)})}),e},lessonsCount(){return this.allLessons.length}},methods:{fetchCourse(){this.loading=!0,this.$get("courses/"+this.course_slug+"/by-slug").then(e=>{this.sections=e.sections,this.track=e.track,this.$route.params.lesson_slug&&this.goToLesson(this.$route.params.lesson_slug,!0),this.course=e.course,this.changeTitle(this.course.title)}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})},handleNextLesson(){let e=null,t=null;if(this.currentLessonIndex===null){if(ya(this.allLessons,(n,o)=>{if(!this.track.completed_lessons.includes(n.id.toString()))return e=n,t=o,!1}),!e)if(this.allLessons.length)e=this.allLessons[0],t=0;else return this.$notify.error(this.$t("Sorry, no lesson found")),!1}else ya(this.allLessons,(n,o)=>{if(o>this.currentLessonIndex)return e=n,t=o,!1});e&&(this.currentLesson=null,this.$nextTick(()=>{this.currentLessonIndex=t,this.currentLesson=e,this.changeTitle(this.currentLesson.title),this.$router.push({name:"view_lesson",params:{lesson_slug:e.slug}})}))},setPrevLesson(){let e=this.currentLessonIndex-1;if(e<0||!this.allLessons[e])return this.$notify.error(this.$t("Sorry, no lesson found")),!1;let t=this.allLessons[e];t&&(this.loading=!0,this.currentLesson=null,this.currentLessonIndex=null,this.$nextTick(()=>{this.currentLessonIndex=e,this.currentLesson=t,this.changeTitle(this.currentLesson.title),this.$router.push({name:"view_lesson",params:{lesson_slug:t.slug}}),this.loading=!1}))},goToLesson(e,t=!1){let n=null,o=null;ya(this.allLessons,(r,s)=>{if(r.slug==e)return n=r,o=s,!1}),n&&(this.currentLesson=null,this.$nextTick(()=>{this.currentLessonIndex=o,this.currentLesson=n,this.changeTitle(this.currentLesson.title),this.$router.push({name:"view_lesson",params:{lesson_slug:n.slug},query:t?this.$route.query:{}})}))}},created(){this.fetchCourse()}},aUe={key:0},cUe={style:{padding:"20px"},class:"fcom_course_sections fcom_white_loaded"},uUe={key:1},dUe={key:2};function fUe(e,t,n,o,r,s){const i=T3,l=x3,a=qt,c=z("layout"),u=z("app-layout"),d=z("router-view");return r.loading?(g(),k("div",aUe,[b(u,{wrapper_class:"fcom_single_layout fcom_max_layout"},{default:x(()=>[b(c,{title:"...."},{title:x(()=>[b(l,{"separator-class":"el-icon-arrow-right"},{default:x(()=>[b(i,{to:{name:"courses"}},{default:x(()=>[ne(M(e.$t("Courses")),1)]),_:1}),b(i,null,{default:x(()=>[ne("....")]),_:1})]),_:1})]),default:x(()=>[_("div",cUe,[b(a,{rows:10,animated:!0})])]),_:1})]),_:1})])):r.course.id?(g(),k("div",uUe,[b(d,{onSetNextLesson:s.handleNextLesson,onSetPrevLesson:s.setPrevLesson,onGoToLesson:s.goToLesson,currentLessonIndex:r.currentLessonIndex,currentLesson:r.currentLesson,course:r.course,onReload:s.fetchCourse,onUpdateTrack:t[0]||(t[0]=f=>{r.track=f}),lessonsCount:s.lessonsCount,sections:r.sections,track:r.track},null,8,["onSetNextLesson","onSetPrevLesson","onGoToLesson","currentLessonIndex","currentLesson","course","onReload","lessonsCount","sections","track"])])):(g(),k("div",dUe,[_("h3",null,M(e.$t("Sorry, the course could not be loaded.")),1)]))}const hUe=fe(lUe,[["render",fUe]]),pUe={name:"CircleIcon",props:{fill:{type:String,default:"currentColor"}}},mUe=["fill"],gUe=_("path",{id:"XMLID_520_",d:`M165,0C74.019,0,0,74.019,0,165s74.019,165,165,165s165-74.019,165-165S255.982,0,165,0z M165,300 |
| 127 |
C90.561,300,30,239.44,30,165S90.561,30,165,30c74.439,0,135,60.561,135,135S239.439,300,165,300z`},null,-1),_Ue=[gUe];function vUe(e,t,n,o,r,s){return g(),k("svg",{fill:n.fill,version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 330 330","xml:space":"preserve"},_Ue,8,mUe)}const VL=fe(pUe,[["render",vUe]]),yUe={name:"LockscreenView",components:{CustomLockscreenView:RL},props:["space_profile","joining","sections"],emits:["join"],computed:{isDefaultScreen(){return this.space_profile},isNonMember(){var e;return(e=this.space_profile.permissions)==null?void 0:e.is_non_member}}},bUe={key:0,class:"space_lock_box space_default_lock_box"},wUe=["href"],kUe={key:1},CUe={key:1,class:"space_lock_box"},SUe={key:2,class:"space_lock_box"},$Ue=["href"];function EUe(e,t,n,o,r,s){const i=z("Lock"),l=ve,a=z("custom-lockscreen-view");return n.space_profile.lockscreen_config?(g(),k(Q,{key:0},[n.space_profile.lockscreen_config.showCustom?(g(),k("div",kUe,[b(a,{sections:n.sections,profile:n.space_profile},null,8,["sections","profile"])])):(g(),k("div",bUe,[b(l,null,{default:x(()=>[b(i)]),_:1}),_("h4",null,M(e.$t("This is a private course")),1),_("p",null,M(e.$t("Members have to be invited to this course.")),1),e.auth.user_id?O("",!0):(g(),k("a",{key:0,href:e.getCurrentAuthUrl(),class:"fcom_btn el-button el-button--primary"},M(e.$t("Login or Signup")),9,wUe))]))],64)):n.space_profile.permissions.is_pending?(g(),k("div",CUe,[b(l,null,{default:x(()=>[b(i)]),_:1}),_("h4",null,M(e.$t("Your request to join this course is pending")),1)])):e.auth.user_id?O("",!0):(g(),k("div",SUe,[b(l,null,{default:x(()=>[b(i)]),_:1}),_("h4",null,M(e.$t("Please login/signup to enroll this course")),1),_("a",{href:e.getCurrentAuthUrl(),class:"fcom_btn el-button el-button--primary"},M(e.$t("Login / Signup")),9,$Ue)]))}const xUe=fe(yUe,[["render",EUe]]),TUe={name:"ViewCourse",components:{VideoPlay:NZ,RenderSpaceLinks:jC,LockScreenView:xUe,AppLayout:Vr,Layout:pr,CircleIcon:VL},props:["course","sections","track","lessonsCount"],$emit:["setNextLesson","goToLesson","reload"],data(){return{enrolling:!1}},computed:{sectionsCount(){return this.sections.reduce((e,t)=>e+(t.lessons.length?1:0),0)},isCustomLockScreen(){var e,t;return((t=(e=this.course)==null?void 0:e.settings)==null?void 0:t.custom_lock_screen)==="yes"},showCourseSections(){return this.track.isEnrolled||this.isAdmin()||!this.course.lockscreen_config}},methods:{goToEditLessons(){this.$router.push(this.$getRouteLink("admin/manage-courses/edit/:course_id/lessons",{course_id:this.course.id}))},enroll(){this.enrolling=!0,this.$post("courses/"+this.course.id+"/enroll").then(e=>{this.$emit("reload"),this.$notify.success(e.message)}).catch(e=>{this.$handleError(e)}).finally(()=>{this.enrolling=!1})},continueCourse(){this.$emit("setNextLesson")},maybeGotoLesson(e,t,n){if(!t.isEnrolled||n.is_locked){n.unlock_date&&this.$notify.info({message:`This lesson will be unlocked on ${n.unlock_date}`,type:"info"});return}this.$emit("goToLesson",e.slug)},formatSeconds(e){let t=Math.floor(e/60),n=e%60;return n=n<10?"0"+n:n,t=t<10?"0"+t:t,`${t}:${n}`}}},MUe=["href"],AUe={key:0,class:"fcom_sub_header"},OUe={key:0,class:"fcom_notice"},IUe={key:1,class:"fcom_section"},NUe={class:"fcom_section_item_title"},PUe={class:"fcom_section_body"},LUe={class:"fcom_section_item_content"},RUe={key:0,style:{margin:"20px 0"}},FUe={key:2,class:"fcom_course_sections"},DUe={class:"fcom_course_intro"},BUe={class:"fcom_course_labels"},VUe={class:"fcom_course_info"},zUe=_("span",null," • ",-1),jUe={class:"fcom_course_actions"},HUe={key:0,href:"#",class:"fcom_btn el-button el-button--primary fcom_primary_button"},UUe={class:"fcom_card_sections"},WUe={class:"fcom_section_items"},qUe={class:"fcom_section_primary_item"},KUe=["onClick"],GUe={key:0,class:"section_lock_badge"},YUe={class:"fcom_section_primary_item_actions"},JUe={class:"fcom_meta_text"},ZUe=["onClick"],XUe={class:"fcom_heading_item clickable"},QUe={key:0,class:"fcom_section_item_actions"},eWe={class:"fcom_meta_text"},tWe={key:3};function nWe(e,t,n,o,r,s){const i=T3,l=x3,a=z("render-space-links"),c=mA,u=Ze,d=z("ArrowRight"),f=z("ArrowDown"),h=ve,p=z("Lock"),m=z("SuccessFilled"),v=z("CircleIcon"),y=z("VideoPlay"),E=z("LockScreenView"),w=z("layout"),C=z("app-layout"),T=Mt("loading");return g(),L(C,{wrapper_class:"fcom_single_layout fcom_max_layout"},{default:x(()=>[b(w,{wrapper_class:["no_bg_layout",{custom_lockscreen:!s.showCourseSections}],title:e.$t("Courses")},{title:x(()=>[b(l,{"separator-class":"el-icon-arrow-right"},{default:x(()=>[b(i,{to:{name:"courses"}},{default:x(()=>[ne(M(e.$t("Courses")),1)]),_:1}),b(i,null,{default:x(()=>[ne(M(n.course.title),1)]),_:1})]),_:1})]),actions:x(()=>[e.isAdmin()?(g(),k("a",{key:0,href:e.$getRouteLink("admin/manage-courses/edit/:course_id/lessons",{course_id:n.course.id}),class:"el-button link_button fcom_primary_button"},M(e.$t("Edit Lessons")),9,MUe)):O("",!0)]),sub_header:x(()=>{var $,A;return[n.course&&!s.isCustomLockScreen&&((A=($=n.course)==null?void 0:$.settings)!=null&&A.links.length)?(g(),k("div",AUe,[b(a,{links:n.course.settings.links},null,8,["links"])])):O("",!0)]}),default:x(()=>[n.course.status==="draft"?(g(),k("div",OUe,[_("p",null,M(e.$t("This course is in Draft status and only visible to Admin / Moderators")),1)])):O("",!0),n.track.isEnrolled?(g(),k("div",IUe,[_("div",NUe,[_("h3",null,M(e.$t("Course progress")),1)]),_("div",PUe,[_("div",LUe,[_("p",null,M(e.$t("Completed %1s of %2s",n.track.completed_lessons.length,n.lessonsCount)),1),b(c,{"stroke-width":15,percentage:parseInt(n.track.progress)},null,8,["percentage"])]),n.track.progress==100?(g(),k("div",RUe,[_("h5",null,M(e.$t("Congratulations! Course completed! 🎉")),1)])):O("",!0)])])):O("",!0),s.showCourseSections?(g(),k("div",FUe,[_("div",DUe,[_("div",BUe,[_("h3",null,M(e.$t("Course content")),1),_("p",VUe,[ne(M(e.$_n("%s topic","%s topics",s.sectionsCount))+" ",1),zUe,ne(" "+M(e.$_n("%s lesson","%s lessons",n.lessonsCount)),1)])]),_("div",jUe,[e.auth.user_id?!n.track.isEnrolled&&n.course.id?Ve((g(),L(u,{key:1,disabled:r.enrolling,onClick:s.enroll,class:"fcom_primary_button"},{default:x(()=>[ne(M(e.$t("Enroll this course")),1)]),_:1},8,["disabled","onClick"])),[[T,r.enrolling]]):n.track.progress!=100?(g(),L(u,{key:2,class:"fcom_primary_button",onClick:s.continueCourse},{default:x(()=>[ne(M(e.$t("Continue Course")),1)]),_:1},8,["onClick"])):O("",!0):(g(),k("a",HUe,M(e.$t("Login to enroll this course")),1))])]),_("div",UUe,[_("div",WUe,[(g(!0),k(Q,null,Me(n.sections,$=>(g(),k("div",{key:$.id,class:"fcom_section_primary"},[_("div",qUe,[_("div",{onClick:A=>$.is_closed=!$.is_closed,class:"clickable fcom_section_primary_item_title"},[b(h,{onClick:A=>$.is_closed=!$.is_closed},{default:x(()=>[$.is_closed?(g(),L(d,{key:0})):(g(),L(f,{key:1}))]),_:2},1032,["onClick"]),_("h4",null,M($.title),1),$.unlock_date?(g(),k("span",GUe,[$.is_locked?(g(),L(h,{key:0},{default:x(()=>[b(p)]),_:1})):O("",!0),_("span",null," ("+M(e.$t("will unlock at %s",e.smartDate($.unlock_date,!0,!0)))+") ",1)])):O("",!0)],8,KUe),_("div",YUe,[_("span",JUe,M(e.$_n("%s lesson","%s lessons",$.lessons.length)),1)])]),$.is_closed?O("",!0):(g(!0),k(Q,{key:0},Me($.lessons,A=>(g(),k("div",{key:A.id,class:"fcom_section_item"},[_("div",{onClick:N=>s.maybeGotoLesson(A,n.track,$),class:"fcom_section_item_title"},[_("p",XUe,[n.track.completed_lessons.includes(A.id.toString())?(g(),L(h,{key:0,style:{color:"#008a2e"}},{default:x(()=>[b(m)]),_:1})):$.is_locked||!n.track.isEnrolled?(g(),L(h,{key:1},{default:x(()=>[b(p)]),_:1})):(g(),L(h,{key:2},{default:x(()=>[b(v)]),_:1})),ne(" "+M(A.title),1)])],8,ZUe),A.meta.enable_media=="yes"&&A.meta.video_length?(g(),k("div",QUe,[_("span",eWe,[A.meta.video_length?(g(),L(u,{key:0,onClick:N=>s.maybeGotoLesson(A,n.track,$),text:""},{default:x(()=>[b(h,null,{default:x(()=>[b(y)]),_:1}),_("span",null,M(s.formatSeconds(A.meta.video_length)),1)]),_:2},1032,["onClick"])):O("",!0)])])):O("",!0)]))),128))]))),128))])])])):(g(),k("div",tWe,[b(E,{space_profile:n.course,sections:n.sections},null,8,["space_profile","sections"])]))]),_:1},8,["wrapper_class","title"])]),_:1})}const oWe=fe(TUe,[["render",nWe]]),rWe={name:"CommentBox",components:{FeedComments:uL,FeedTextComposer:Ed},props:{feed:{type:Object,required:!0},showAll:{type:Boolean,default:!0},checkPermission:{type:Boolean,default:!0},is_single:{type:Boolean,default:!0}},data(){return{show_all_comments:this.showAll,commenting:!1,comment:{message:"",media_images:[]},saving:!1,showCommentBox:!0}},methods:{postComment(){this.comment.message&&(this.saving=!0,this.$post("feeds/"+this.feed.id+"/comments",{comment:this.comment.message,media_images:this.comment.media_images}).then(e=>{this.feed.comments||(this.feed.comments=[]),this.feed.comments.push(e.comment),this.$emit("commented",e.comment),this.feed.comments_count=parseInt(this.feed.comments_count)+1,this.commenting=!1,this.comment=null,this.showCommentBox=!1,this.$nextTick(()=>{this.comment={message:"",media_image:""}}),this.showCommentBox=!0}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1}))},showCommentForm(){this.show_all_comments=!0,this.commenting=!0,this.$nextTick(()=>{this.$refs.commentInput&&this.$refs.commentInput.focus()})},showAllComments(){this.show_all_comments=!0,this.commenting=!0}}},sWe=["id"],iWe={key:0,class:"feed_commenting"},lWe={class:"person_avatar"},aWe=["src"],cWe={key:0,class:"feed_comment_input"},uWe={key:1,class:""},dWe={style:{padding:"0",margin:"0","text-align":"center"}};function fWe(e,t,n,o,r,s){const i=z("feed-comments"),l=Ze,a=z("feed-text-composer"),c=z("router-link"),u=Mt("loading");return g(),k("div",{class:F(["fcom_comment_box","fcom_comment_box_"+n.feed.type])},[le(e.$slots,"before_comment_box"),b(i,{checkPermission:n.checkPermission,onForceShowAll:s.showAllComments,show_all:r.show_all_comments,feed:n.feed},null,8,["checkPermission","onForceShowAll","show_all","feed"]),r.commenting||n.is_single?(g(),k("div",{key:0,id:"feed_comment_form_"+n.feed.id,class:"feed_comment"},[!n.checkPermission||e.hasCommentPermission(n.feed)?(g(),k(Q,{key:0},[r.comment?(g(),k("div",iWe,[_("div",lWe,[_("img",{alt:"",src:e.auth.avatar},null,8,aWe)]),r.showCommentBox?(g(),k("div",cWe,[b(a,{mentionQuery:{space_id:n.feed.space_id},autofocus_changed:r.commenting,autofocus:r.commenting,disabled:r.saving,placeholder:e.$t("Write a comment"),content:r.comment},{default:x(()=>[Ve((g(),L(l,{disabled:r.saving,class:"fcom_primary_button",size:"small",onClick:t[0]||(t[0]=d=>s.postComment())},{default:x(()=>[ne(M(e.$t("Reply")),1)]),_:1},8,["disabled"])),[[u,r.saving]])]),_:1},8,["mentionQuery","autofocus_changed","autofocus","disabled","placeholder","content"])])):O("",!0)])):O("",!0)],64)):(g(),k("div",uWe,[_("p",dWe,[ne(M(e.$t("Please join the community to post a comment."))+" ",1),n.feed.space?(g(),L(c,{key:0,to:{name:"space_feeds",params:{space:n.feed.space.slug}}},{default:x(()=>[ne(M(e.$t("Go to community")),1)]),_:1},8,["to"])):O("",!0)])]))],8,sWe)):O("",!0),le(e.$slots,"after_comment_box")],2)}const hWe=fe(rWe,[["render",fWe]]),pWe={name:"ViewLesson",components:{CircleIcon:VL,AppLayout:Vr,Layout:pr,MediaPreview:gd,CommentBox:hWe,ChatIcon:NC},props:["course","sections","track","currentLesson","lessonsCount","currentLessonIndex","lessonsCount"],data(){return{completing:!1,isFullScreen:!1,sm_side_show:!1,isTransiting:!1}},watch:{currentLessonIndex(){this.sm_side_show=!1}},computed:{isCompleted(){return this.track.completed_lessons.includes(this.currentLesson.id.toString())}},methods:{markAsComplete(){this.completing=!0;let e=this.isCompleted?"incomplete":"completed";this.$put("courses/"+this.course.id+"/lessons/"+this.currentLesson.id+"/completion",{state:e}).then(t=>{this.track.completed_lessons=t.track.completed_lessons,this.$emit("updateTrack",t.track),e=="completed"&&this.$emit("setNextLesson")}).catch(t=>{this.$handleError(t)}).finally(()=>{this.completing=!1})},toggleFullScreen(){this.isFullScreen=!this.isFullScreen,this.$storeLocalData("lesson_fs",this.isFullScreen?"yes":"no")},scrollToComments(){this.$refs.lesson_scroller&&this.$refs.lesson_scroller.scrollTo({top:this.$refs.fcom_course_comments.offsetTop})},gotoLesson(e){this.isTransiting=!0,this.$emit("goToLesson",e.slug),setTimeout(()=>{this.isTransiting=!1},300)}},mounted(){this.isFullScreen=this.$getLocalData("lesson_fs")=="yes",window.scrollTo(0,0),this.$refs.lesson_scroller.setScrollTop(0),this.$route.query.comment_id&&setTimeout(()=>{let e=document.getElementById("comment_"+this.$route.query.comment_id);e&&(this.$refs.lesson_scroller.setScrollTop(e.offsetTop),e.classList.add("fcom_highlight_comment"))},500),document.body.classList.add("fcom-no-scroll")},beforeUnmount(){document.body.classList.remove("fcom-no-scroll")}},mWe={key:0},gWe={style:{padding:"2rem"}},_We={class:"fcom_back_space"},vWe={class:"fcom_lesson_nav"},yWe={key:1},bWe={class:"fcom_lesson_details"},wWe={class:"fcom_lesson_header"},kWe={class:"fcom_lesson_title"},CWe={class:"fcom_lesson_number"},SWe={class:"fcom_lesson_nav"},$We={key:0,class:"fcom_locked_container"},EWe={class:"fcom_locker"},xWe={class:"fcom_lesson_body feed_texts"},TWe=["innerHTML"],MWe={key:0,ref:"fcom_course_comments",class:"fcom_lesson_comments"},AWe={class:"fcom_lesson_comment_box"},OWe={class:"fcom_section_sidebar_title"},IWe={class:"fcom_section_items"},NWe={class:"fcom_section_primary_item"},PWe={class:"fcom_section_primary_item_title"},LWe=["onClick"],RWe={class:"fcom_heading_item clickable"};function FWe(e,t,n,o,r,s){const i=qt,l=z("ArrowLeft"),a=ve,c=z("FullScreen"),u=Ze,d=z("ChatIcon"),f=vM,h=z("ArrowRight"),p=z("Operation"),m=z("media-preview"),v=z("CommentBox"),y=Vo,E=Ii,w=z("ArrowDown"),C=z("SuccessFilled"),T=z("Lock"),$=z("CircleIcon"),A=_p,N=hd,P=z("layout"),I=z("app-layout");return g(),L(I,{class:F({fcom_full_screen:r.isFullScreen,fcom_show_right_aside:r.sm_side_show}),wrapper_class:"fcom_single_layout fcom_full_layout"},{default:x(()=>[n.course&&n.currentLesson?(g(),L(P,{key:0,wrapper_class:"no_bg_layout"},{default:x(()=>[b(N,{class:"fcom_lesson_container fcom_resp_container"},{default:x(()=>[b(E,{style:{height:"calc(100vh - 50px)"},class:"fcom_lesson_wrap"},{default:x(()=>[r.isTransiting?(g(),k("div",mWe,[_("div",gWe,[b(i,{rows:10,animated:!0})])])):(g(),L(y,{key:1,ref:"lesson_scroller"},{default:x(()=>[_("div",_We,[_("div",{class:"clickable fcom_go_back",onClick:t[0]||(t[0]=D=>e.$router.push({name:"view_course"}))},[b(a,null,{default:x(()=>[b(l)]),_:1}),ne(" "+M(n.course.title),1)]),_("div",vWe,[b(u,{title:"Go Full Screen",onClick:s.toggleFullScreen,size:"small",text:""},{default:x(()=>[b(a,null,{default:x(()=>[b(c)]),_:1})]),_:1},8,["onClick"]),n.currentLesson.is_locked?O("",!0):(g(),k(Q,{key:0},[b(f,{hidden:!n.currentLesson.comments_count,value:n.currentLesson.comments_count},{default:x(()=>[b(u,{onClick:s.scrollToComments,bg:"",size:"small",text:""},{default:x(()=>[b(a,null,{default:x(()=>[b(d)]),_:1})]),_:1},8,["onClick"])]),_:1},8,["hidden","value"]),b(u,{style:{"margin-left":"15px"},type:"info",onClick:s.markAsComplete,size:"small"},{default:x(()=>[s.isCompleted?(g(),k("span",yWe,M(e.$t("Completed")),1)):(g(),k(Q,{key:0},[_("span",null,M(e.$t("Complete Lesson")),1),b(a,null,{default:x(()=>[b(h)]),_:1})],64))]),_:1},8,["onClick"])],64)),b(u,{style:{"margin-left":"15px"},size:"small",text:"",class:"fcom_sm_only",onClick:t[1]||(t[1]=D=>r.sm_side_show=!r.sm_side_show)},{default:x(()=>[b(a,null,{default:x(()=>[b(p)]),_:1})]),_:1})])]),_("div",bWe,[_("div",wWe,[_("div",kWe,[_("p",CWe,M(e.$t("Lesson %1s of %2s",n.currentLessonIndex+1,n.lessonsCount)),1),_("h1",null,M(n.currentLesson.title),1)]),_("div",SWe,[b(u,{onClick:t[2]||(t[2]=D=>e.$emit("setPrevLesson")),disabled:n.currentLessonIndex===0,size:"small"},{default:x(()=>[b(a,null,{default:x(()=>[b(l)]),_:1})]),_:1},8,["disabled"]),b(u,{onClick:t[3]||(t[3]=D=>e.$emit("setNextLesson")),disabled:n.currentLessonIndex+1===n.lessonsCount,size:"small"},{default:x(()=>[b(a,null,{default:x(()=>[b(h)]),_:1})]),_:1},8,["disabled"])])]),n.currentLesson.is_locked?(g(),k("div",$We,[_("div",EWe,[_("h1",null,M(e.$t("This lesson is not published for you yet")),1),_("p",null,M(e.$t("This lesson will be available to you on %s",e.smartDate(n.currentLesson.unclock_date,!0))),1),b(u,{type:"info",onClick:t[4]||(t[4]=D=>e.$router.push({name:"view_course"}))},{default:x(()=>[ne(M(e.$t("Back to course index")),1)]),_:1})])])):(g(),k(Q,{key:1},[b(m,{media_item:n.currentLesson.meta.media},null,8,["media_item"]),_("div",xWe,[_("div",{class:"fcom_lesson_content",innerHTML:n.currentLesson.content},null,8,TWe)])],64))]),!n.currentLesson.is_locked&&n.currentLesson.meta.enable_comments==="yes"?(g(),k("div",MWe,[_("div",AWe,[b(v,{feed:n.currentLesson,showAll:!0,checkPermission:!1},{before_comment_box:x(()=>[_("h3",null,M(e.$t("Lesson discussions")),1)]),_:1},8,["feed"])])],512)):O("",!0)]),_:1},512))]),_:1}),b(A,{class:"fcom_lesson_sidebar fcom_resp_side",width:"320px"},{default:x(()=>[_("div",OWe,[_("h3",null,M(e.$t("Lessons")),1)]),_("div",IWe,[(g(!0),k(Q,null,Me(n.sections,D=>(g(),k("div",{key:D.id,class:"fcom_section_primary"},[_("div",NWe,[_("div",PWe,[b(a,{class:"clickable",onClick:V=>D.is_closed=!D.is_closed},{default:x(()=>[D.is_closed?(g(),L(h,{key:0})):(g(),L(w,{key:1}))]),_:2},1032,["onClick"]),_("h4",null,M(D.title),1)])]),D.is_closed?O("",!0):(g(!0),k(Q,{key:0},Me(D.lessons,V=>(g(),k("div",{class:F([{fcom_current_lesson:V.id==n.currentLesson.id},"fcom_section_item"]),key:V.id},[_("div",{onClick:G=>s.gotoLesson(V),class:"fcom_section_item_title"},[_("p",RWe,[n.track.completed_lessons.includes(V.id.toString())?(g(),L(a,{key:0,style:{color:"#008a2e"}},{default:x(()=>[b(C)]),_:1})):D.is_locked||!n.track.isEnrolled?(g(),L(a,{key:1},{default:x(()=>[b(T)]),_:1})):(g(),L(a,{key:2},{default:x(()=>[b($)]),_:1})),ne(" "+M(V.title),1)])],8,LWe)],2))),128))]))),128))])]),_:1})]),_:1})]),_:1})):O("",!0)]),_:1},8,["class"])}const DWe=fe(pWe,[["render",FWe]]),BWe={name:"LeaderLists",props:["leaders"],computed:{isAll(){return this.leaders.key==="all_time"}}},VWe={class:"fcom_box_list"},zWe={class:"fcom_box_list_header"},jWe={class:"fcom_box_list_body"},HWe={class:"fcom_person_lists"},UWe={class:"fcom_leader"},WWe={key:0,class:"fcom_serial_suffix"},qWe=_("svg",{width:"11",height:"11",viewBox:"0 0 11 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[_("path",{d:"M0 0L11 0V10.0442L5.73392 6.32786L0 10.0442L0 0Z",fill:"currentColor"})],-1),KWe=[qWe],GWe={key:0,class:"fcom_leader_stat"};function YWe(e,t,n,o,r,s){const i=z("UserAvatar"),l=z("UserRouteLink");return g(),k("div",VWe,[_("div",zWe,M(n.leaders.title),1),_("div",jWe,[_("ul",HWe,[(g(!0),k(Q,null,Me(n.leaders.items,(a,c)=>(g(),k("li",{key:a.user_id},[_("div",UWe,[_("div",{class:F(["fcom_serial_"+(c+1),"fcom_serial"])},[_("span",null,M(c+1),1),c<3?(g(),k("div",WWe,KWe)):O("",!0)],2),b(i,{with_level:!1,xprofile:a.xprofile},null,8,["xprofile"]),b(l,{show_badge:!0,xprofile:a.xprofile},null,8,["xprofile"])]),parseInt(a.total_points)?(g(),k("div",GWe,[Ve(_("span",null,"+",512),[[sn,!s.isAll]]),ne(" "+M(a.total_points),1)])):O("",!0)]))),128))])])])}const JWe=fe(BWe,[["render",YWe]]),ZWe={name:"LeaderTooltip",components:{InfoFilled:lp},props:{levelChunks:{type:Array,required:!0}}},XWe={class:"fcoml_tooltip_content"},QWe={class:"fcoml_tooltip_title"},eqe={class:"fcoml_tooltip_subtitle"},tqe=["innerHTML"],nqe={class:"fcoml_tooltip_subtitle"},oqe={class:"fcoml_tooltip_desc"},rqe={class:"fcoml_tooltip_levels"},sqe={class:"levels_list"},iqe={class:"level_title"},lqe={class:"level_points"};function aqe(e,t,n,o,r,s){const i=z("InfoFilled"),l=ve,a=Ze,c=$o;return g(),L(c,{persistent:!1,"popper-class":"fcoml_tooltip_popover",width:550,effect:"dark",trigger:"click"},{reference:x(()=>[b(a,{text:""},{default:x(()=>[b(l,null,{default:x(()=>[b(i)]),_:1})]),_:1})]),default:x(()=>[_("div",XWe,[_("h5",QWe,M(e.$t("Leaderboard Points")),1),_("p",eqe,M(e.$t("1 Like = 1 Point")),1),_("p",{class:"fcoml_tooltip_desc",innerHTML:e.$t("__LEADERBOARD_DESC_INS")},null,8,tqe),_("p",nqe,M(e.$t("Levels")),1),_("p",oqe,M(e.$t("As you gain points, you level up. Your level is shown at the bottom right of your avatar.")),1),_("div",rqe,[(g(!0),k(Q,null,Me(n.levelChunks,(u,d)=>(g(),k("div",{key:d},[_("ul",sqe,[(g(!0),k(Q,null,Me(u,f=>(g(),k("li",{key:f.level,class:"level_item"},[_("div",iqe,M(f.title),1),_("div",lqe,M(e.$t("%d points",f.min_points)),1)]))),128))])]))),128))])])]),_:1})}const cqe=fe(ZWe,[["render",aqe]]),uqe={name:"LeaderBoard",components:{InfoFilled:lp,LeaderLists:JWe,AppLayout:Vr,Layout:pr,LeaderTooltip:cqe},data(){return{leaderboard:[],loading:!1}},computed:{userLevel(){return this.appVars.auth.user_id?gl(this.appVars.auth.total_points):null},requiredPoints(){return parseInt(this.userLevel.max_points)-parseInt(this.appVars.auth.total_points)+1},levelChunks(){let e=Object.values(this.appVars.leaderboard_levels);const t=Math.ceil(e.length/3);return e.reduce((n,o,r)=>{const s=Math.floor(r/t);return n[s]||(n[s]=[]),n[s].push(o),n},[])}},methods:{fetchLeaders(){this.loading=!0,this.$get("leaderboard").then(e=>{this.leaderboard=e.leaderboard}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})}},mounted(){this.fetchLeaders(),this.changeTitle(this.$t("Leaderboard"))}},dqe={key:0,class:"fcom_leaderboard_profile"},fqe={class:"fcom_leaderboard_profile_inner"},hqe={class:"fcom_profile_header"},pqe={class:"fcom_profile_info"},mqe={class:"info_avatar"},gqe={class:"info_user"},_qe={class:"fcom_level_name"},vqe={class:"fcoml_level_sub"},yqe={class:"fcoml_level_sub_icon"},bqe={class:"fcoml_level_sub_text"},wqe={class:"fcom_leaderboard_profile_avatar"},kqe={class:"fcom_leaderboard_levels"},Cqe=["title"],Sqe={key:1},$qe={class:"fcoml_level_detail"},Eqe={class:"fcoml_level_title"},xqe={class:"fcoml_level_sub"},Tqe={class:"fcom_leaderboard_items"},Mqe={key:1,class:"white_loaded"};function Aqe(e,t,n,o,r,s){const i=z("UserAvatar"),l=z("UserRouteLink"),a=z("LeaderTooltip"),c=z("Lock"),u=ve,d=gp,f=mp,h=z("leader-lists"),p=qt,m=z("layout"),v=z("app-layout");return g(),L(v,{wrapper_class:"fcom_single_layout fcom_max_layout"},{default:x(()=>[b(m,{wrapper_class:"no_bg_layout",title:e.$t("Leaderboards")},{default:x(()=>[s.userLevel?(g(),k("div",dqe,[_("div",fqe,[_("div",hqe,[_("div",pqe,[_("div",mqe,[b(i,{with_level:!0,with_completion:!0,xprofile:e.appVars.auth},null,8,["xprofile"])]),_("div",gqe,[b(l,{show_badge:!0,show_pop:!1,xprofile:e.appVars.auth},null,8,["xprofile"]),_("div",_qe,M(s.userLevel.title),1)])]),_("div",vqe,[_("div",yqe,[_("span",null,"🏆 "+M(e.auth.total_points),1),ne(" | "),_("span",null,M(e.$t("Level %d",s.userLevel.level)),1)]),_("div",bqe,[ne(M(e.$t("%d points to level up!",s.requiredPoints))+" ",1),b(a,{levelChunks:s.levelChunks},null,8,["levelChunks"])])])]),_("div",wqe,[b(f,{gutter:20},{default:x(()=>[(g(!0),k(Q,null,Me(s.levelChunks,y=>(g(),L(d,{sm:24,md:8},{default:x(()=>[_("ul",kqe,[(g(!0),k(Q,null,Me(y,E=>(g(),k("li",null,[_("div",{title:`${E.min_points} points`,class:F(["fcom_level_icon",{fcom_is_in_level:s.userLevel.max_points>=E.max_points}])},[s.userLevel.max_points<E.max_points?(g(),L(u,{key:0},{default:x(()=>[b(c)]),_:1})):(g(),k("span",Sqe,M(E.level),1))],10,Cqe),_("div",$qe,[_("div",Eqe,M(E.title),1),_("div",xqe,M(E.tagline),1)])]))),256))])]),_:2},1024))),256))]),_:1})])])])):O("",!0),_("div",Tqe,[b(f,{gutter:30},{default:x(()=>[(g(!0),k(Q,null,Me(r.leaderboard,y=>(g(),L(d,{key:y.key,md:8,sm:24},{default:x(()=>[b(h,{leaders:y},null,8,["leaders"])]),_:2},1024))),128))]),_:1})]),r.loading?(g(),k("div",Mqe,[b(p,{rows:16,animated:!0})])):O("",!0)]),_:1},8,["title"])]),_:1})}const Oqe=fe(uqe,[["render",Aqe]]),Iqe=[{name:"dashboard",path:"/dashboard",component:gNe,meta:{active_menu:"dashboard",title:"Dashboard"}},{path:"/",component:bLe,meta:{active_menu:"dashboard"},children:[{name:"all_feeds",path:"",component:$Le},{name:"single_feed",path:"post/:feed_slug",component:b9,props:!0}]},{path:"/space/:space/",component:aDe,props:!0,meta:{in_space:!0},children:[{name:"space_feeds",path:"home",component:hDe,props:!0,meta:{in_space:!0,show_sidebar:!0}},{name:"space_about",path:"about",component:LL,props:!0,meta:{in_space:!0,show_sidebar:!0}},{name:"space_feed",path:"post/:feed_slug",component:b9,props:!0,meta:{in_space:!0,show_sidebar:!0}},{name:"space_members",path:"members",component:vBe,props:!0,meta:{in_space:!0,show_sidebar:!1}}]},{path:"/discover/spaces",name:"spaces",component:QBe,meta:{active_menu:"spaces"}},{name:"all_members",path:"/members",component:kHe,props:!0,meta:{active_menu:"all_members"}},{path:"/u/:username/",component:UVe,props:!0,meta:{active_menu:"all_members"},children:[{name:"user_profile",path:"",component:jze,meta:{active_menu:"all_members"}},{name:"user_spaces",path:"spaces",component:dze,meta:{active_menu:"all_members",disable_sidebar:!0}},{name:"update_profile",path:"update",component:kze,meta:{active_menu:"all_members",disable_sidebar:!0}},{name:"user_profile_about",path:"about",component:BL,meta:{active_menu:"all_members"}},{name:"user_profile_feeds",path:"posts",component:KVe,meta:{active_menu:"all_members"}},{name:"user_comments",path:"comments",component:eje,meta:{active_menu:"all_members"}},{name:"user_notification_settings",path:"notification-settings",component:Yje,meta:{active_menu:"all_members",disable_sidebar:!0}}]},{path:"/notifications",name:"notifications",component:IHe,meta:{}},{name:"bookmarks",path:"/bookmarks",component:RHe,meta:{active_menu:"bookmarks"}},{name:"courses",path:"/courses",component:iUe,meta:{active_menu:"courses"}},{path:"/course/:course_slug",component:hUe,props:!0,meta:{active_menu:"courses",in_course:!0},children:[{props:!0,path:"lessons",component:oWe,name:"view_course",meta:{in_course:!0}},{props:!0,path:"lessons/:lesson_slug/view",component:DWe,name:"view_lesson",meta:{in_course:!0}}]},{name:"leaderboards",path:"/leaderboards",component:Oqe,meta:{active_menu:"leaderboards"}}],Nqe={name:"NotFound",data(){return{message:"Please wait while we redirect you to the appropriate page..",is404:!1,require_auth:!1}},methods:{lookForPost(e){this.$get("feeds/"+e+"/by-slug").then(t=>{this.$router.push({name:"single_feed",params:{feed_slug:e}})}).catch(t=>{this.$router.push({name:"all_feeds"}),this.is404=!0})}},mounted(){let e=this.$route.path;if(!e){this.message="The requested page could not be found";return}e=e.replace(/^\/+/,"");let n=e.split("/")[0];if(n=="community"){e=e.replace(/^community\//,"/space/"),this.$router.push(e);return}else if(n=="fcom_route"){if(this.$route.query.route=="user_notification_settings")if(this.auth.username){this.$router.push({name:"user_notification_settings",params:{username:this.auth.username}});return}else{window.location.href=this.getCurrentAuthUrl();return}}else if(n=="u")if(this.auth.username){this.$router.push({name:"user_profile",params:{username:this.auth.username}});return}else{window.location.href=this.appVars.auth_url;return}this.lookForPost(n)}};function Pqe(e,t,n,o,r,s){return g(),k("h1",null,M(r.message),1)}const Lqe=fe(Nqe,[["render",Pqe]]),Rqe={name:"VerifiedSign"},Fqe={class:"fcom_verified"},Dqe=_("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),Bqe=[Dqe];function Vqe(e,t,n,o,r,s){return g(),k("span",Fqe,Bqe)}const zqe=fe(Rqe,[["render",Vqe]]),jqe={name:"WelcomeBanner",components:{MediaPreview:gd},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)}}},Hqe={key:0,class:"fcom_welcome_box"},Uqe={key:2,class:"fcom_welcome_title"},Wqe=["innerHTML"],qqe={key:4,class:"fcom_welcome_cta_buttons"},Kqe=["href","target"];function Gqe(e,t,n,o,r,s){const i=z("media-preview"),l=Hl,a=z("MoreFilled"),c=ve,u=Ze,d=tie,f=nie,h=eie;return r.config&&s.showBanner?(g(),k("div",Hqe,[s.showMedia?(g(),L(i,{key:0,media_item:r.config.bannerVideo},null,8,["media_item"])):r.config.bannerImage?(g(),L(l,{key:1,class:"feed_media",alt:e.$t("Image Preview"),src:r.config.bannerImage},null,8,["alt","src"])):O("",!0),r.config.title?(g(),k("h2",Uqe,M(r.config.title),1)):O("",!0),r.config.description_rendered?(g(),k("div",{key:3,class:"fcom_welcome_sub",innerHTML:r.config.description_rendered},null,8,Wqe)):O("",!0),s.showCtaButtons?(g(),k("div",qqe,[(g(!0),k(Q,null,Me(r.config.ctaButtons,p=>(g(),k(Q,null,[p.link&&p.label?(g(),k("a",{key:0,href:p.link,target:p.newTab=="yes"?"_blank":"_self",class:F({"el-button fcom_primary_button":p.type=="primary","el-button fcom_secondary_button":p.type=="secondary","el-button is-text":p.type=="text","el-link fcom_link_button":p.type=="link"})},M(p.label),11,Kqe)):O("",!0)],64))),256))])):O("",!0),s.isRemovable?(g(),L(h,{key:5,trigger:"click",class:"fcom_welcome_close"},{dropdown:x(()=>[b(f,null,{default:x(()=>[b(d,{onClick:s.closeBanner},{default:x(()=>[ne(M(e.$t("Hide Banner")),1)]),_:1},8,["onClick"])]),_:1})]),default:x(()=>[b(u,{"aria-label":e.$t("Hide Banner"),class:"fcom_dot_menu",size:"small",text:""},{default:x(()=>[b(c,null,{default:x(()=>[b(a)]),_:1})]),_:1},8,["aria-label"])]),_:1})):O("",!0)])):O("",!0)}const Yqe=fe(jqe,[["render",Gqe]]),Jqe=[dJ,TJ,NJ,uZ,SZ,UJ,YJ,xZ,sJ,cJ,yT,mT,eZ,QY,ZJ,dT,pT,KJ,n3,cd,vT,T0,ip,hJ,Ky,MZ,LJ,zJ,mZ,ZY,yJ,iZ,gT,DJ,oJ,kJ,nZ,hT,_T,lp];function oh(e){const t=[];if(typeof e=="object"&&e.join===void 0)for(const n in e)t.push(oh(e[n]));else if(typeof e=="object"&&e.join!==void 0)for(const n in e)t.push(oh(e[n]));else typeof e=="function"||typeof e=="string"&&t.push(e);return t.join("<br />")}const Bn=mw(eNe);Bn.use(due);Bn.config.globalProperties.appVars=window.fluentComAdmin;Bn.config.globalProperties.auth=window.fluentComAdmin.auth;Bn.config.globalProperties.has_pro=!!window.fluentComAdmin.pro;let xb="40%",Tb="60%";window.innerWidth<600?(Tb="95%",xb="90%"):window.innerWidth<800&&(Tb="80%",xb="80%");Jqe.forEach(e=>{Bn.component(e.name,e)});Bn.component("VerifiedSign",zqe);Bn.component("UserAvatar",$L);Bn.component("UserRouteLink",Md);Bn.component("WelcomeBanner",Yqe);Bn.component("UserBadge",DL);function w9(){Bn.use(window.FluentCommunityUtil.eventBus);const e=window.FluentCommunityUtil.Rest;Bn.mixin({data(){return{Storage:window.FluentCommunityUtil.Storage,is_rtl:!1,drawerWidth:xb,dialogWidth:Tb,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=oh(r),s||(s="Something is wrong!"),typeof s!="string"&&(s=oh(s)),this.$notify({type:"error",title:"Error",message:s,dangerouslyUseHTMLString:!0})},convertToText:oh,$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,c)=>{if(c){const u=parseInt(c,10)-1;return u<s.length?s[u]:a}else return l<s.length?s[l++]:a}),r},$_n(r,s,i){return parseInt(i.toString().replace(/,/g,""),10)>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},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:ya,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==null?void 0:r.membership)==null?void 0:i.pivot)==null?void 0:l.role)},isModerator(r){if(this.isCommunityModerator)return!0;if(!r)return!1;const s=this.auth.spaces[r];return this.isSpaceModerator(s)},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 ya(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(){if(window.fcom_mounted)return;window.fcom_mounted=!0,document.addEventListener("click",s=>{if(s.metaKey||s.ctrlKey)return;let i=s.target.getAttribute("href");if(!i){const l=s.target.closest("a");l&&(i=l.getAttribute("href"))}if(i)if(i.startsWith(window.fluentComAdmin.urls.portal_base)){if(i.indexOf("fcom_action")!==-1||i.startsWith(window.fluentComAdmin.urls.portal_base+"admin"))return;s.preventDefault(),i=i.replace(window.fluentComAdmin.urls.portal_base,"/"),this.$router.push(i)}else document.dispatchEvent(new CustomEvent("fcomExternalLinkClicked",{detail:{href:i}}))});let r=window.fluentComAdmin.dateTime18n;dayjs.updateLocale("en",{weekdays:r.weekdays.split("_"),months:r.months.split("_"),weekdaysShort:r.weekdaysShort.split("_"),monthsShort:r.monthsShort.split("_"),weekdaysMin:r.weekdaysMin.split("_"),formats:{LT:"h:mm A",LTS:"h:mm:ss A",L:"YYYY-MM-DD",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},relativeTime:{future:r.relativeTime.future,past:r.relativeTime.past,s:r.relativeTime.s,m:r.relativeTime.m,mm:r.relativeTime.mm,h:r.relativeTime.h,hh:r.relativeTime.hh,d:r.relativeTime.d,dd:r.relativeTime.dd,M:r.relativeTime.M,MM:r.relativeTime.MM,y:r.relativeTime.y,yy:r.relativeTime.yy}})}}),Bn.config.globalProperties.$notify=Fue,Bn.config.globalProperties.$confirm=lv.confirm,Bn.config.globalProperties.$promt=lv.prompt,Bn.config.globalProperties.$messageBox=lv,Bn.config.globalProperties.$gloablStorage={};const t=window.FluentCommunityUtil.hooks.applyFilters("fluent_com_portal_routes",Iqe);t.push({path:"/:catchAll(.*)",name:"not-found",component:Lqe});let n=null;window.fluentComAdmin.routing_system=="hash"?n=x5({routes:t,history:kj()}):n=x5({routes:t,history:$x(window.fluentComAdmin.portal_slug)});const o=window.FluentCommunityUtil.hooks.applyFilters("fluent_com_portal_app",Bn);window.fluentFrameworkApp=o.use(n).mount("#fluent_com_portal"),window.fluentFrameworkAppRouter=n}window.FluentCommunityUtil?w9():document.addEventListener("fluentCommunityUtilReady",function(){w9()});var Aa,$u;class Zqe{constructor(t){ms(this,Aa,void 0);ms(this,$u,new Set);Eo(this,Aa,t)}get current(){return ht(this,Aa)}set current(t){ht(this,Aa)!=t&&(Eo(this,Aa,t),ht(this,$u).forEach(n=>n(t)))}on(t){return ht(this,$u).add(t),()=>ht(this,$u).delete(t)}}Aa=new WeakMap,$u=new WeakMap;const zL=e=>new Zqe(e),Mb=Symbol.for("atomico.hooks");globalThis[Mb]=globalThis[Mb]||{};let rd=globalThis[Mb];const Xqe=Symbol.for("Atomico.suspense"),jL=Symbol.for("Atomico.effect"),Qqe=Symbol.for("Atomico.layoutEffect"),HL=Symbol.for("Atomico.insertionEffect"),Fp=(e,t,n)=>{const{i:o,hooks:r}=rd.c,s=r[o]=r[o]||{};return s.value=e(s.value),s.effect=t,s.tag=n,rd.c.i++,r[o].value},UC=e=>Fp((t=zL(e))=>t),UL=()=>Fp((e=zL(rd.c.host))=>e),WL=()=>rd.c.update,eKe=(e,t,n=0)=>{let o={},r=!1;const s=()=>r,i=(c,u)=>{for(const d in o){const f=o[d];f.effect&&f.tag===c&&(f.value=f.effect(f.value,u))}};return{load:c=>{rd.c={host:t,hooks:o,update:e,i:0,id:n};let u;try{r=!1,u=c()}catch(d){if(d!==Xqe)throw d;r=!0}finally{rd.c=null}return u},cleanEffects:c=>(i(HL,c),()=>(i(Qqe,c),()=>{i(jL,c)})),isSuspense:s}},Dp=Symbol.for;function qL(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 ui=e=>typeof e=="function",rh=e=>typeof e=="object",{isArray:tKe}=Array,Ab=(e,t)=>(t?e instanceof HTMLStyleElement:!0)&&"hydrate"in((e==null?void 0:e.dataset)||{});function KL(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 GL=(e,t,n)=>(e.addEventListener(t,n),()=>e.removeEventListener(t,n));let YL=class{constructor(t,n,o){this.message=n,this.target=t,this.value=o}};class nKe extends YL{}class oKe extends YL{}const Qg="Custom",rKe=null,sKe={true:1,"":1,1:1};function iKe(e,t,n,o,r){const{type:s,reflect:i,event:l,value:a,attr:c=aKe(t)}=(n==null?void 0:n.name)!=Qg&&rh(n)&&n!=rKe?n:{type:n},u=(s==null?void 0:s.name)===Qg&&s.map,d=a!=null?s==Function||!ui(a)?()=>a:a:null;Object.defineProperty(e,t,{configurable:!0,set(f){const h=this[t];d&&s!=Boolean&&f==null&&(f=d());const{error:p,value:m}=(u?dKe:fKe)(s,f);if(p&&m!=null)throw new nKe(this,`The value defined for prop '${t}' must be of type '${s.name}'`,m);h!=m&&(this._props[t]=m??void 0,this.update(),l&&lKe(this,l),this.updated.then(()=>{i&&(this._ignoreAttr=c,cKe(this,s,c,this[t]),this._ignoreAttr=null)}))},get(){return this._props[t]}}),d&&(r[t]=d()),o[c]={prop:t,type:s}}const lKe=(e,{type:t,base:n=CustomEvent,...o})=>e.dispatchEvent(new n(t,o)),aKe=e=>e.replace(/([A-Z])/g,"-$1").toLowerCase(),cKe=(e,t,n,o)=>o==null||t==Boolean&&!o?e.removeAttribute(n):e.setAttribute(n,(t==null?void 0:t.name)===Qg&&(t!=null&&t.serialize)?t==null?void 0:t.serialize(o):rh(o)?JSON.stringify(o):t==Boolean?"":o),uKe=(e,t)=>e==Boolean?!!sKe[t]:e==Number?Number(t):e==String?t:e==Array||e==Object?JSON.parse(t):e.name==Qg?t:new e(t),dKe=({map:e},t)=>{try{return{value:e(t),error:!1}}catch{return{value:t,error:!0}}},fKe=(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 hKe=0;const pKe=e=>{var n;const t=((n=(e==null?void 0:e.dataset)||{})==null?void 0:n.hydrate)||"";return t||"c"+hKe++},Bp=(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 u in o)this[u]=o[u]}static get styles(){return[super.styles,l]}async _setup(){if(this._props)return;this._props={};let u,d;this.mounted=new Promise(v=>this.mount=()=>{v(),u!=this.parentNode&&(d!=u?this.unmounted.then(this.update):this.update()),u=this.parentNode}),this.unmounted=new Promise(v=>this.unmount=()=>{v(),(u!=this.parentNode||!this.isConnected)&&(f.cleanEffects(!0)()(),d=this.parentNode,u=null)}),this.symbolId=this.symbolId||Symbol(),this.symbolIdParent=Symbol();const f=eKe(()=>this.update(),this,pKe(this));let h,p=!0;const m=Ab(this);this.update=()=>(h||(h=!0,this.updated=(this.updated||this.mounted).then(()=>{try{const v=f.load(this._render),y=f.cleanEffects();return v&&v.render(this,this.symbolId,m),h=!1,p&&!f.isSuspense()&&(p=!1,!m&&mKe(this)),y()}finally{h=!1}}).then(v=>{v&&v()})),this.updated),this.update()}connectedCallback(){this.mount(),super.connectedCallback&&super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback(),this.unmount()}attributeChangedCallback(u,d,f){if(n[u]){if(u===this._ignoreAttr||d===f)return;const{prop:h,type:p}=n[u];try{this[h]=uKe(p,f)}catch{throw new oKe(this,`The value defined as attr '${u}' cannot be parsed by type '${p.name}'`,f)}}else super.attributeChangedCallback(u,d,f)}static get props(){return{...super.props,...i}}static get observedAttributes(){const u=super.observedAttributes||[];for(const d in i)iKe(this.prototype,d,i[d],n,o);return Object.keys(n).concat(u)}}return a};function mKe(e){const{styles:t}=e.constructor,{shadowRoot:n}=e;if(n&&t.length){const o=[];KL(t,r=>{r&&(r instanceof Element?n.appendChild(r.cloneNode(!0)):o.push(r))}),o.length&&(n.adoptedStyleSheets=o)}}const JL=e=>(t,n)=>{Fp(([o,r]=[])=>((r||!r)&&(r&&qL(r,n)?o=o||!0:(ui(o)&&o(),o=null)),[o,n]),([o,r],s)=>s?(ui(o)&&o(),[]):[o||t(),r],e)},e0=JL(jL),gKe=JL(HL);class _Ke 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 ZL=e=>{const t=WL();return Fp((n=new _Ke(e,(o,r,s)=>{o=ui(o)?o(r[0]):o,o!==r[0]&&(r[0]=o,s||t())}))=>n)},Ob=(e,t)=>{const[n]=Fp(([o,r,s=0]=[])=>((!r||r&&!qL(r,t))&&(o=e()),[o,t,s]));return n},Oc=(e,t)=>Ob(()=>e,t),Ib=Dp("atomico/options");globalThis[Ib]=globalThis[Ib]||{sheet:!!document.adoptedStyleSheets};const XL=globalThis[Ib];new Promise(e=>{XL.ssr||(document.readyState==="loading"?GL(document,"DOMContentLoaded",e):e())});const vKe={checked:1,value:1,selected:1},yKe={list:1,type:1,size:1,form:1,width:1,height:1,src:1,href:1,slot:1},bKe={shadowDom:1,staticNode:1,cloneNode:1,children:1,key:1},F1={},Nb=[];class Pb extends Text{}const wKe=Dp("atomico/id"),sh=Dp("atomico/type"),oy=Dp("atomico/ref"),QL=Dp("atomico/vnode"),kKe=()=>{};function CKe(e,t,n){return tR(this,e,t,n)}const eR=(e,t,...n)=>{const o=t||F1;let{children:r}=o;if(r=r??(n.length?n:Nb),e===kKe)return r;const s=e?e instanceof Node?1:e.prototype instanceof HTMLElement&&2:0;if(s===!1&&e instanceof Function)return e(r!=Nb?{children:r,...o}:o);const i=XL.render||CKe;return{[sh]:QL,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 tR(e,t,n=wKe,o,r){let s;if(t&&t[n]&&t[n].vnode==e||e[sh]!=QL)return t;(e||!t)&&(r=r||e.type=="svg",s=e.type!="host"&&(e.raw==1?(t&&e.clone?t[oy]:t)!=e.type:e.raw==2?!(t instanceof e.type):t?t[oy]||t.localName!=e.type:!t),s&&e.type!=null&&(e.raw==1&&e.clone?(o=!0,t=e.type.cloneNode(!0),t[oy]=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]:F1,{vnode:l=F1,cycle:a=0}=i;let{fragment:c,handlers:u}=i;const{children:d=Nb,props:f=F1}=l;if(u=s?{}:u||{},e.static&&!s)return t;if(e.shadow&&!t.shadowRoot&&t.attachShadow({mode:"open",...e.shadow}),e.props!=f&&EKe(t,f,e.props,u,r),e.children!==d){const h=e.shadow?t.shadowRoot:t;c=$Ke(e.children,c,h,n,!a&&o,r&&e.type=="foreignObject"?!1:r)}return t[n]={vnode:e,handlers:u,fragment:c,cycle:a+1},t}function SKe(e,t){const n=new Pb(""),o=new Pb("");let r;if(e[t?"prepend":"append"](n),t){let{lastElementChild:s}=e;for(;s;){const{previousElementSibling:i}=s;if(Ab(s,!0)&&!Ab(i,!0)){r=s;break}s=i}}return r?r.before(o):e.append(o),{markStart:n,markEnd:o}}function $Ke(e,t,n,o,r,s){e=e==null?null:tKe(e)?e:[e];const i=t||SKe(n,r),{markStart:l,markEnd:a,keyes:c}=i;let u;const d=c&&new Set;let f=l;if(e&&KL(e,h=>{if(typeof h=="object"&&!h[sh])return;const p=h[sh]&&h.key,m=c&&p!=null&&c.get(p);f!=a&&f===m?d.delete(f):f=f==a?a:f.nextSibling;const v=c?m:f;let y=v;if(h[sh])y=tR(h,v,o,r,s);else{const E=h+"";!(y instanceof Text)||y instanceof Pb?y=new Text(E):y.data!=E&&(y.data=E)}y!=f&&(c&&d.delete(y),!v||c?(n.insertBefore(y,f),c&&f!=a&&d.add(f)):v==a?n.insertBefore(y,a):(n.replaceChild(y,v),f=y)),p!=null&&(u=u||new Map,u.set(p,y))}),f=f==a?a:f.nextSibling,t&&f!=a)for(;f!=a;){const h=f;f=f.nextSibling,h.remove()}return d&&d.forEach(h=>h.remove()),i.keyes=u,i}function EKe(e,t,n,o,r){for(const s in t)!(s in n)&&k9(e,s,t[s],null,r,o);for(const s in n)k9(e,s,t[s],n[s],r,o)}function k9(e,t,n,o,r,s){if(t=t=="class"&&!r?"className":t,n=n??null,o=o??null,t in e&&vKe[t]&&(n=e[t]),!(o===n||bKe[t]||t[0]=="_"))if(e.localName==="slot"&&t==="assignNode"&&"assign"in e)e.assign(o);else if(t[0]=="o"&&t[1]=="n"&&(ui(o)||ui(n)))xKe(e,t.slice(2),o,s);else if(t=="ref")o&&(ui(o)?o(e):o.current=e);else if(t=="style"){const{style:i}=e;n=n||"",o=o||"";const l=rh(n),a=rh(o);if(l)for(const c in n)if(a)!(c in o)&&C9(i,c,null);else break;if(a)for(const c in o){const u=o[c];l&&n[c]===u||C9(i,c,u)}else i.cssText=o}else{const i=t[0]=="$"?t.slice(1):t;i===t&&(!r&&!yKe[t]&&t in e||ui(o)||ui(n))?e[t]=o??"":o==null?e.removeAttribute(i):e.setAttribute(i,rh(o)?JSON.stringify(o):o)}}function xKe(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 C9(e,t,n){let o="setProperty";n==null&&(o="removeProperty",n=null),~t.indexOf("-")?e[o](t,n):e[t]=n}const TKe=eR("host",{style:"display: contents"}),MKe="value",AKe=(e,t)=>{const n=UL(),o=UC();gKe(()=>GL(n.current,"ConnectContext",r=>{r.composedPath().at(0)!==r.currentTarget&&e===r.detail.id&&(r.stopPropagation(),r.detail.connect(o))}),[e]),o.current=t},OKe=e=>{const t=Bp(({value:n})=>(AKe(t,n),TKe),{props:{value:{type:Object,value:()=>e}}});return t[MKe]=e,t};OKe({dispatch(e,t){}});const IKe=0,Ic=1,Mm=2,Am=3,S9=4,_f=5,Lb=6,nR=0,NKe=2,oR=3,rR=4,sR=_f,PKe=Lb,iR=(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===oR?o[0]=l:i===rR?o[1]=Object.assign(o[1]||{},l):i===sR?(o[1]=o[1]||{})[t[++s]]=l:i===PKe?o[1][t[++s]]+=l+"":i?(r=e.apply(l,iR(e,l,n,["",null])),o.push(r),l[0]?t[0]|=2:(t[s-2]=nR,t[s]=r)):o.push(l)}return o},LKe=function(e){let t=Ic,n="",o="",r=[0],s,i;const l=a=>{t===Ic&&(a||(n=n.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?r.push(nR,a,n):t===Am&&(a||n)?(r.push(oR,a,n),t=Mm):t===Mm&&n==="..."&&a?r.push(rR,a,0):t===Mm&&n&&!a?r.push(sR,0,!0,n):t>=_f&&((n||!a&&t===_f)&&(r.push(t,0,n,i),t=Lb),a&&(r.push(t,a,0,i),t=Lb)),n=""};for(let a=0;a<e.length;a++){a&&(t===Ic&&l(),l(a));for(let c=0;c<e[a].length;c++)s=e[a][c],t===Ic?s==="<"?(l(),r=[r],t=Am):n+=s:t===S9?n==="--"&&s===">"?(t=Ic,n=""):n=s+n[0]:o?s===o?o="":n+=s:s==='"'||s==="'"?o=s:s===">"?(l(),t=Ic):t&&(s==="="?(t=_f,i=n,n=""):s==="/"&&(t<_f||e[a][c+1]===">")?(l(),t===Am&&(r=r[0]),t=r,(r=r[0]).push(NKe,0,t),t=IKe):s===" "||s===" "||s===` |
| 128 |
`||s==="\r"?(l(),t=Mm):n+=s),t===Am&&n==="!--"&&(t=S9,r=r[0])}return l(),r},RKe=new Map;function vt(e){let t=RKe;return t=iR(eR,t.get(e)||(t.set(e,t=LKe(e)),t),arguments,[]),t.length>1?t:t[0]}var WC=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Nc=(e,t,n)=>(WC(e,t,"read from private field"),n?n.call(e):t.get(e)),Pc=(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)},Lc=(e,t,n,o)=>(WC(e,t,"write to private field"),o?o.call(e,n):t.set(e,n),n),FKe=(e,t,n)=>(WC(e,t,"access private method"),n),D1,B1,vf,yf,V1,Rb,lR;let qC=class{constructor(t){Pc(this,Rb),Pc(this,D1,void 0),Pc(this,B1,void 0),Pc(this,vf,void 0),Pc(this,yf,void 0),Pc(this,V1,void 0),Lc(this,vf,!1),this.onShow=()=>{},this.onHide=()=>{},Lc(this,V1,(n,o)=>{var r;const{state:s,composing:i}=n,{selection:l,doc:a}=s,{ranges:c}=l,u=Math.min(...c.map(h=>h.$from.pos)),d=Math.max(...c.map(h=>h.$to.pos)),f=o&&o.doc.eq(a)&&o.selection.eq(l);if(Nc(this,vf)||((r=n.dom.parentElement)==null||r.appendChild(this.element),Lc(this,vf,!0)),!(i||f)){if(!Nc(this,B1).call(this,n,o)){this.hide();return}e2({getBoundingClientRect:()=>t_(n,u,d)},this.element,{placement:"top",middleware:[Qy(),Zy(Nc(this,yf))]}).then(({x:h,y:p})=>{Object.assign(this.element.style,{left:`${h}px`,top:`${p}px`})}),this.show()}}),this.update=(n,o)=>{__(Nc(this,V1),Nc(this,D1))(n,o)},this.destroy=()=>{},this.show=n=>{this.element.dataset.show="true",n&&e2(n,this.element,{placement:"top",middleware:[Qy(),Zy(Nc(this,yf))]}).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,Lc(this,D1,t.debounce??200),Lc(this,B1,t.shouldShow??FKe(this,Rb,lR)),Lc(this,yf,t.offset),this.element.dataset.show="false"}};D1=new WeakMap,B1=new WeakMap,vf=new WeakMap,yf=new WeakMap,V1=new WeakMap,Rb=new WeakSet,lR=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 lt,l=this.element.contains(document.activeElement),a=!e.hasFocus()&&!l,c=!e.editable;return!(a||o||i||c)};function KC(e){const t=Sn({},`${e}_TOOLTIP_SPEC`),n=eo(r=>{const s=r.get(t.key);return new wn({key:new mn(`${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 aR(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=aR(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}function Xc(){for(var e,t,n=0,o="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=aR(e))&&(o&&(o+=" "),o+=t);return o}var DKe=Object.defineProperty,$9=Object.getOwnPropertySymbols,BKe=Object.prototype.hasOwnProperty,VKe=Object.prototype.propertyIsEnumerable,E9=(e,t,n)=>t in e?DKe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,zKe=(e,t)=>{for(var n in t||(t={}))BKe.call(t,n)&&E9(e,n,t[n]);if($9)for(var n of $9(t))VKe.call(t,n)&&E9(e,n,t[n]);return e};function kc(e,t){return Object.assign(e,{meta:zKe({package:"@milkdown/components"},t)}),e}var jKe=Object.defineProperty,x9=Object.getOwnPropertySymbols,HKe=Object.prototype.hasOwnProperty,UKe=Object.prototype.propertyIsEnumerable,T9=(e,t,n)=>t in e?jKe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,GC=(e,t)=>{for(var n in t||(t={}))HKe.call(t,n)&&T9(e,n,t[n]);if(x9)for(var n of x9(t))UKe.call(t,n)&&T9(e,n,t[n]);return e};const WKe={mode:"preview"},Ci=Sn(GC({},WKe),"linkTooltipStateCtx");kc(Ci,{displayName:"State<link-tooltip>",group:"LinkTooltip"});const qKe={addLink:()=>{},editLink:()=>{},removeLink:()=>{}},sd=Sn(GC({},qKe),"linkTooltipAPICtx");kc(Ci,{displayName:"API<link-tooltip>",group:"LinkTooltip"});const KKe={linkIcon:()=>"🔗",editButton:()=>"✎",removeButton:()=>"⌫",confirmButton:()=>vt`Confirm ⏎`,onCopyLink:()=>{},inputPlaceholder:"Paste link..."},$_=Sn(GC({},KKe),"linkTooltipConfigCtx");kc(Ci,{displayName:"Config<link-tooltip>",group:"LinkTooltip"});const Vp=KC("LINK_PREVIEW");kc(Vp[0],{displayName:"PreviewTooltipSpec<link-tooltip>",group:"LinkTooltip"});kc(Vp[1],{displayName:"PreviewTooltipPlugin<link-tooltip>",group:"LinkTooltip"});const E_=KC("LINK_EDIT");kc(E_[0],{displayName:"EditTooltipSpec<link-tooltip>",group:"LinkTooltip"});kc(E_[1],{displayName:"EditTooltipPlugin<link-tooltip>",group:"LinkTooltip"});function GKe(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 YKe(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===es.mark.type(e));if(!(!i||!Vp.pluginKey()))return{show:!0,pos:r,node:s,mark:i}}function cR(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 uR=({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 vt` |
| 129 |
<host> |
| 130 |
<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})}}> |
| 131 |
<span class="link-icon"> |
| 132 |
${e==null?void 0:e.linkIcon()} |
| 133 |
</span> |
| 134 |
<a href=${t} target="_blank" class="link-display">${t}</a> |
| 135 |
<span class="button link-edit-button" onmousedown=${r}> |
| 136 |
${e==null?void 0:e.editButton()} |
| 137 |
</span> |
| 138 |
<span class="button link-remove-button" onmousedown=${s}> |
| 139 |
${e==null?void 0:e.removeButton()} |
| 140 |
</span> |
| 141 |
</div> |
| 142 |
</host> |
| 143 |
`};uR.props={config:Object,src:String,onEdit:Function,onRemove:Function};const dR=Bp(uR);var fR=e=>{throw TypeError(e)},hR=(e,t,n)=>t.has(e)||fR("Cannot "+n),Zt=(e,t,n)=>(hR(e,t,"read from private field"),n?n.call(e):t.get(e)),Hi=(e,t,n)=>t.has(e)?fR("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Om=(e,t,n,o)=>(hR(e,t,"write to private field"),o?o.call(e,n):t.set(e,n),n),tl,Ur,bf,wf,z1,j1,H1,kf;class JKe{constructor(t,n){this.ctx=t,Hi(this,tl,new dR),Hi(this,Ur),Hi(this,bf,this.ctx.use(Ci.key)),Hi(this,wf,!1),Hi(this,z1,({mode:o})=>{o==="edit"&&Zt(this,kf).call(this)}),Hi(this,j1,()=>{Om(this,wf,!0)}),Hi(this,H1,()=>{Om(this,wf,!1)}),Hi(this,kf,()=>{Zt(this,Ur).hide(),Zt(this,Ur).element.removeEventListener("mouseenter",Zt(this,j1)),Zt(this,Ur).element.removeEventListener("mouseleave",Zt(this,H1))}),this.show=(o,r,s,i)=>{Zt(this,tl).config=this.ctx.get($_.key),Zt(this,tl).src=o.attrs.href,Zt(this,tl).onEdit=()=>{this.ctx.get(sd.key).editLink(o,r,s)},Zt(this,tl).onRemove=()=>{this.ctx.get(sd.key).removeLink(r,s),Zt(this,kf).call(this)},Zt(this,Ur).show({getBoundingClientRect:()=>i}),Zt(this,Ur).element.addEventListener("mouseenter",Zt(this,j1)),Zt(this,Ur).element.addEventListener("mouseleave",Zt(this,H1))},this.hide=()=>{Zt(this,wf)||Zt(this,kf).call(this)},this.update=()=>{},this.destroy=()=>{Zt(this,bf).off(Zt(this,z1)),Zt(this,Ur).destroy(),Zt(this,tl).remove()},Om(this,Ur,new qC({debounce:0,content:Zt(this,tl),shouldShow:()=>!1})),Zt(this,Ur).update(n),Om(this,bf,t.use(Ci.key)),Zt(this,bf).on(Zt(this,z1))}}tl=new WeakMap;Ur=new WeakMap;bf=new WeakMap;wf=new WeakMap;z1=new WeakMap;j1=new WeakMap;H1=new WeakMap;kf=new WeakMap;cR("milkdown-link-preview",dR);function ZKe(e){let t;const o=__((s,i)=>{if(!t||!s.hasFocus()||e.get(Ci.key).mode==="edit")return;const a=YKe(e,s,i);if(a){const c=s.state.doc.resolve(a.pos),u=GKe(a.mark,a.node,s.state.doc,c.before(),c.after()),d=u.start,f=u.end;t.show(a.mark,d,f,t_(s,d,f));return}t.hide()},200),r=()=>{setTimeout(()=>{t==null||t.hide()},200)};e.set(Vp.key,{props:{handleDOMEvents:{mousemove:o,mouseleave:r}},view:s=>(t=new JKe(e,s),t)})}const pR=({src:e,onConfirm:t,onCancel:n,config:o})=>{const r=UC(),[s,i]=ZL(e);e0(()=>{i(e??"")},[e]);const l=()=>{var c,u;t==null||t((u=(c=r.current)==null?void 0:c.value)!=null?u:"")},a=c=>{var u,d;c.stopPropagation(),c.key==="Enter"&&(t==null||t((d=(u=r.current)==null?void 0:u.value)!=null?d:""),c.preventDefault()),c.key==="Escape"&&(n==null||n(),c.preventDefault())};return vt` |
| 144 |
<host> |
| 145 |
<div class="link-edit"> |
| 146 |
<input |
| 147 |
class="input-area" |
| 148 |
placeholder=${o==null?void 0:o.inputPlaceholder} |
| 149 |
ref=${r} |
| 150 |
onkeydown=${a} |
| 151 |
oninput=${c=>i(c.target.value)} |
| 152 |
value=${s} |
| 153 |
/> |
| 154 |
<span class=${Xc("button confirm",!s&&"hidden")} onclick=${l}> |
| 155 |
${o==null?void 0:o.confirmButton()} |
| 156 |
</span> |
| 157 |
</div> |
| 158 |
</host> |
| 159 |
`};pR.props={config:Object,src:String,onConfirm:Function,onCancel:Function};const mR=Bp(pR);var XKe=Object.defineProperty,QKe=Object.defineProperties,eGe=Object.getOwnPropertyDescriptors,M9=Object.getOwnPropertySymbols,tGe=Object.prototype.hasOwnProperty,nGe=Object.prototype.propertyIsEnumerable,gR=e=>{throw TypeError(e)},A9=(e,t,n)=>t in e?XKe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Im=(e,t)=>{for(var n in t||(t={}))tGe.call(t,n)&&A9(e,n,t[n]);if(M9)for(var n of M9(t))nGe.call(t,n)&&A9(e,n,t[n]);return e},O9=(e,t)=>QKe(e,eGe(t)),_R=(e,t,n)=>t.has(e)||gR("Cannot "+n),cn=(e,t,n)=>(_R(e,t,"read from private field"),n?n.call(e):t.get(e)),Rc=(e,t,n)=>t.has(e)?gR("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Nm=(e,t,n,o)=>(_R(e,t,"write to private field"),o?o.call(e,n):t.set(e,n),n),bs,nl,ol,pa,Fb,U1;const I9={from:-1,to:-1,mark:null};class oGe{constructor(t,n){this.ctx=t,Rc(this,bs,new mR),Rc(this,nl),Rc(this,ol,Im({},I9)),Rc(this,pa,()=>{cn(this,nl).hide(),this.ctx.update(Ci.key,o=>O9(Im({},o),{mode:"preview"})),Nm(this,ol,Im({},I9))}),Rc(this,Fb,o=>{const r=this.ctx.get(hn),{from:s,to:i,mark:l}=cn(this,ol),a=es.type(this.ctx);if(l&&l.attrs.href===o){cn(this,pa).call(this);return}const c=r.state.tr;l&&c.removeMark(s,i,l),c.addMark(s,i,a.create({href:o})),r.dispatch(c),cn(this,pa).call(this)}),Rc(this,U1,(o,r,s)=>{const i=this.ctx.get($_.key);cn(this,bs).config=i,cn(this,bs).src=o,this.ctx.update(Ci.key,a=>O9(Im({},a),{mode:"edit"}));const l=this.ctx.get(hn);l.dispatch(l.state.tr.setSelection(lt.create(l.state.doc,r,s))),cn(this,nl).show({getBoundingClientRect:()=>t_(l,r,s)}),requestAnimationFrame(()=>{var a;(a=cn(this,bs).querySelector("input"))==null||a.focus()})}),this.update=o=>{const{state:r}=o,{selection:s}=r;if(!(s instanceof lt))return;const{from:i,to:l}=s;i===cn(this,ol).from&&l===cn(this,ol).to||cn(this,pa).call(this)},this.destroy=()=>{cn(this,nl).destroy(),cn(this,bs).remove()},this.addLink=(o,r)=>{Nm(this,ol,{from:o,to:r,mark:null}),cn(this,U1).call(this,"",o,r)},this.editLink=(o,r,s)=>{Nm(this,ol,{from:r,to:s,mark:o}),cn(this,U1).call(this,o.attrs.href,r,s)},this.removeLink=(o,r)=>{const s=this.ctx.get(hn),i=s.state.tr;i.removeMark(o,r,es.type(this.ctx)),s.dispatch(i),cn(this,pa).call(this)},Nm(this,nl,new qC({content:cn(this,bs),debounce:0,shouldShow:()=>!1})),cn(this,nl).onHide=()=>{cn(this,bs).update().catch(o=>{throw o}),n.dom.focus({preventScroll:!0})},cn(this,nl).update(n),cn(this,bs).onConfirm=cn(this,Fb),cn(this,bs).onCancel=cn(this,pa)}}bs=new WeakMap;nl=new WeakMap;ol=new WeakMap;pa=new WeakMap;Fb=new WeakMap;U1=new WeakMap;var rGe=Object.defineProperty,sGe=Object.defineProperties,iGe=Object.getOwnPropertyDescriptors,N9=Object.getOwnPropertySymbols,lGe=Object.prototype.hasOwnProperty,aGe=Object.prototype.propertyIsEnumerable,P9=(e,t,n)=>t in e?rGe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cGe=(e,t)=>{for(var n in t||(t={}))lGe.call(t,n)&&P9(e,n,t[n]);if(N9)for(var n of N9(t))aGe.call(t,n)&&P9(e,n,t[n]);return e},uGe=(e,t)=>sGe(e,iGe(t));cR("milkdown-link-edit",mR);function dGe(e){let t;e.update(sd.key,n=>uGe(cGe({},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(E_.key,{view:n=>(t=new oGe(e,n),t)})}function fGe(e){ZKe(e),dGe(e)}const hGe=[Ci,sd,$_,Vp,E_].flat();vt` |
| 160 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 161 |
<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"/> |
| 162 |
</svg> |
| 163 |
`;vt` |
| 164 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 165 |
<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"/> |
| 166 |
</svg> |
| 167 |
`;vt` |
| 168 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 169 |
<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"/> |
| 170 |
</svg> |
| 171 |
`;const pGe=vt` |
| 172 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 173 |
<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"/> |
| 174 |
</svg> |
| 175 |
`;vt` |
| 176 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 177 |
<g clip-path="url(#clip0_952_6527)"> |
| 178 |
<circle cx="12" cy="12" r="3"/> |
| 179 |
</g> |
| 180 |
<defs> |
| 181 |
<clipPath id="clip0_952_6527"> |
| 182 |
<rect width="24" height="24"/> |
| 183 |
</clipPath> |
| 184 |
</defs> |
| 185 |
</svg> |
| 186 |
`;const mGe=vt` |
| 187 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 188 |
<g clip-path="url(#clip0_977_8070)"> |
| 189 |
<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"/> |
| 190 |
</g> |
| 191 |
<defs> |
| 192 |
<clipPath id="clip0_977_8070"> |
| 193 |
<rect width="24" height="24"/> |
| 194 |
</clipPath> |
| 195 |
</defs> |
| 196 |
</svg> |
| 197 |
`;vt` |
| 198 |
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"> |
| 199 |
<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"/> |
| 200 |
</svg> |
| 201 |
`;vt` |
| 202 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 203 |
<g clip-path="url(#clip0_1803_1151)"> |
| 204 |
<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"/> |
| 205 |
</g> |
| 206 |
<defs> |
| 207 |
<clipPath id="clip0_1803_1151"> |
| 208 |
<rect width="24" height="24"/> |
| 209 |
</clipPath> |
| 210 |
</defs> |
| 211 |
</svg> |
| 212 |
`;vt` |
| 213 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 214 |
<g clip-path="url(#clip0_1803_535)"> |
| 215 |
<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"/> |
| 216 |
</g> |
| 217 |
<defs> |
| 218 |
<clipPath id="clip0_1803_535"> |
| 219 |
<rect width="24" height="24"/> |
| 220 |
</clipPath> |
| 221 |
</defs> |
| 222 |
</svg> |
| 223 |
`;vt` |
| 224 |
<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"> |
| 225 |
<path stroke-linecap="round" stroke-linejoin="round" d="M19.5 8.25l-7.5 7.5-7.5-7.5" /> |
| 226 |
</svg> |
| 227 |
`;vt` |
| 228 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 229 |
<g clip-path="url(#clip0_1098_15553)"> |
| 230 |
<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"/> |
| 231 |
</g> |
| 232 |
<defs> |
| 233 |
<clipPath id="clip0_1098_15553"> |
| 234 |
<rect width="24" height="24"/> |
| 235 |
</clipPath> |
| 236 |
</defs> |
| 237 |
</svg> |
| 238 |
`;const vR=vt` |
| 239 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 240 |
<g clip-path="url(#clip0_977_8081)"> |
| 241 |
<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"/> |
| 242 |
</g> |
| 243 |
<defs> |
| 244 |
<clipPath id="clip0_977_8081"> |
| 245 |
<rect width="24" height="24"/> |
| 246 |
</clipPath> |
| 247 |
</defs> |
| 248 |
</svg> |
| 249 |
`,gGe=vt` |
| 250 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"> |
| 251 |
<g clip-path="url(#clip0_1013_1606)"> |
| 252 |
<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"/> |
| 253 |
</g> |
| 254 |
<defs> |
| 255 |
<clipPath id="clip0_1013_1606"> |
| 256 |
<rect width="24" height="24" /> |
| 257 |
</clipPath> |
| 258 |
</defs> |
| 259 |
</svg> |
| 260 |
`;vt` |
| 261 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 262 |
<g clip-path="url(#clip0_977_7900)"> |
| 263 |
<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"/> |
| 264 |
</g> |
| 265 |
<defs> |
| 266 |
<clipPath id="clip0_977_7900"> |
| 267 |
<rect width="24" height="24"/> |
| 268 |
</clipPath> |
| 269 |
</defs> |
| 270 |
</svg> |
| 271 |
`;vt` |
| 272 |
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"> |
| 273 |
<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"/> |
| 274 |
</svg> |
| 275 |
`;const _Ge=vt` |
| 276 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 277 |
<g clip-path="url(#clip0_1013_1585)"> |
| 278 |
<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"/> |
| 279 |
</g> |
| 280 |
<defs> |
| 281 |
<clipPath id="clip0_1013_1585"> |
| 282 |
<rect width="24" height="24"/> |
| 283 |
</clipPath> |
| 284 |
</defs> |
| 285 |
</svg> |
| 286 |
`;vt` |
| 287 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 288 |
<g clip-path="url(#clip0_992_5553)"> |
| 289 |
<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"/> |
| 290 |
</g> |
| 291 |
<defs> |
| 292 |
<clipPath id="clip0_992_5553"> |
| 293 |
<rect width="24" height="24"/> |
| 294 |
</clipPath> |
| 295 |
</defs> |
| 296 |
</svg> |
| 297 |
`;const vGe=vt` |
| 298 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 299 |
<g clip-path="url(#clip0_992_5559)"> |
| 300 |
<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"/> |
| 301 |
</g> |
| 302 |
<defs> |
| 303 |
<clipPath id="clip0_992_5559"> |
| 304 |
<rect width="24" height="24"/> |
| 305 |
</clipPath> |
| 306 |
</defs> |
| 307 |
</svg> |
| 308 |
`,yGe=vt` |
| 309 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 310 |
<g clip-path="url(#clip0_992_5565)"> |
| 311 |
<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"/> |
| 312 |
</g> |
| 313 |
<defs> |
| 314 |
<clipPath id="clip0_992_5565"> |
| 315 |
<rect width="24" height="24"/> |
| 316 |
</clipPath> |
| 317 |
</defs> |
| 318 |
</svg> |
| 319 |
`,bGe=vt` |
| 320 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 321 |
<g clip-path="url(#clip0_977_7757)"> |
| 322 |
<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"/> |
| 323 |
</g> |
| 324 |
<defs> |
| 325 |
<clipPath id="clip0_977_7757"> |
| 326 |
<rect width="24" height="24"/> |
| 327 |
</clipPath> |
| 328 |
</defs> |
| 329 |
</svg> |
| 330 |
`;vt` |
| 331 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 332 |
<g clip-path="url(#clip0_977_7760)"> |
| 333 |
<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"/> |
| 334 |
</g> |
| 335 |
<defs> |
| 336 |
<clipPath id="clip0_977_7760"> |
| 337 |
<rect width="24" height="24"/> |
| 338 |
</clipPath> |
| 339 |
</defs> |
| 340 |
</svg> |
| 341 |
`;vt` |
| 342 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 343 |
<g clip-path="url(#clip0_977_7763)"> |
| 344 |
<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"/> |
| 345 |
</g> |
| 346 |
<defs> |
| 347 |
<clipPath id="clip0_977_7763"> |
| 348 |
<rect width="24" height="24"/> |
| 349 |
</clipPath> |
| 350 |
</defs> |
| 351 |
</svg> |
| 352 |
`;vt` |
| 353 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 354 |
<g clip-path="url(#clip0_977_8075)"> |
| 355 |
<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"/> |
| 356 |
</g> |
| 357 |
<defs> |
| 358 |
<clipPath id="clip0_977_8075"> |
| 359 |
<rect width="24" height="24"/> |
| 360 |
</clipPath> |
| 361 |
</defs> |
| 362 |
</svg> |
| 363 |
`;const wGe=vt` |
| 364 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 365 |
<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"/> |
| 366 |
</svg> |
| 367 |
`,yR=vt` |
| 368 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 369 |
<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"/> |
| 370 |
</svg> |
| 371 |
`;vt` |
| 372 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 373 |
<g clip-path="url(#clip0_971_7680)"> |
| 374 |
<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" /> |
| 375 |
</g> |
| 376 |
<defs> |
| 377 |
<clipPath id="clip0_971_7680"> |
| 378 |
<rect width="24" height="24"/> |
| 379 |
</clipPath> |
| 380 |
</defs> |
| 381 |
</svg> |
| 382 |
`;const kGe=vt` |
| 383 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 384 |
<g clip-path="url(#clip0_977_8067)"> |
| 385 |
<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"/> |
| 386 |
</g> |
| 387 |
<defs> |
| 388 |
<clipPath id="clip0_977_8067"> |
| 389 |
<rect width="24" height="24"/> |
| 390 |
</clipPath> |
| 391 |
</defs> |
| 392 |
</svg> |
| 393 |
`;vt` |
| 394 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 395 |
<g clip-path="url(#clip0_971_7676)"> |
| 396 |
<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"/> |
| 397 |
</g> |
| 398 |
<defs> |
| 399 |
<clipPath id="clip0_971_7676"> |
| 400 |
<rect width="24" height="24"/> |
| 401 |
</clipPath> |
| 402 |
</defs> |
| 403 |
</svg> |
| 404 |
`;const CGe=vt` |
| 405 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 406 |
<g clip-path="url(#clip0_977_7897)"> |
| 407 |
<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"/> |
| 408 |
</g> |
| 409 |
<defs> |
| 410 |
<clipPath id="clip0_977_7897"> |
| 411 |
<rect width="24" height="24"/> |
| 412 |
</clipPath> |
| 413 |
</defs> |
| 414 |
</svg> |
| 415 |
`,SGe=vt` |
| 416 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 417 |
<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"/> |
| 418 |
</svg> |
| 419 |
`;vt` |
| 420 |
<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"> |
| 421 |
<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" /> |
| 422 |
</svg> |
| 423 |
`;const $Ge=vt` |
| 424 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 425 |
<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"/> |
| 426 |
</svg> |
| 427 |
`;vt` |
| 428 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 429 |
<g clip-path="url(#clip0_977_8078)"> |
| 430 |
<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"/> |
| 431 |
</g> |
| 432 |
<defs> |
| 433 |
<clipPath id="clip0_977_8078"> |
| 434 |
<rect width="24" height="24"/> |
| 435 |
</clipPath> |
| 436 |
</defs> |
| 437 |
</svg> |
| 438 |
`;const EGe=vt` |
| 439 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 440 |
<g clip-path="url(#clip0_992_5547)"> |
| 441 |
<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"/> |
| 442 |
</g> |
| 443 |
<defs> |
| 444 |
<clipPath id="clip0_992_5547"> |
| 445 |
<rect width="24" height="24"/> |
| 446 |
</clipPath> |
| 447 |
</defs> |
| 448 |
</svg> |
| 449 |
`;vt` |
| 450 |
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 451 |
<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"/> |
| 452 |
</svg> |
| 453 |
`;const xGe=(e,t)=>{e.config(fGe).config(n=>{n.update($_.key,o=>({...o,linkIcon:(t==null?void 0:t.linkIcon)??(()=>yR),editButton:(t==null?void 0:t.editButton)??(()=>_Ge),removeButton:(t==null?void 0:t.removeButton)??(()=>SGe),confirmButton:(t==null?void 0:t.confirmButton)??(()=>gGe),inputPlaceholder:(t==null?void 0:t.inputPlaceholder)??"Paste link...",onCopyLink:(t==null?void 0:t.onCopyLink)??(()=>{})}))}).use(hGe)},TGe=Object.freeze(Object.defineProperty({__proto__:null,defineFeature:xGe},Symbol.toStringTag,{value:"Module"}));var bR="Expected a function",L9=0/0,MGe="[object Symbol]",AGe=/^\s+|\s+$/g,OGe=/^[-+]0x[0-9a-f]+$/i,IGe=/^0b[01]+$/i,NGe=/^0o[0-7]+$/i,PGe=parseInt,LGe=typeof $r=="object"&&$r&&$r.Object===Object&&$r,RGe=typeof self=="object"&&self&&self.Object===Object&&self,FGe=LGe||RGe||Function("return this")(),DGe=Object.prototype,BGe=DGe.toString,VGe=Math.max,zGe=Math.min,ry=function(){return FGe.Date.now()};function jGe(e,t,n){var o,r,s,i,l,a,c=0,u=!1,d=!1,f=!0;if(typeof e!="function")throw new TypeError(bR);t=R9(t)||0,t0(n)&&(u=!!n.leading,d="maxWait"in n,s=d?VGe(R9(n.maxWait)||0,t):s,f="trailing"in n?!!n.trailing:f);function h($){var A=o,N=r;return o=r=void 0,c=$,i=e.apply(N,A),i}function p($){return c=$,l=setTimeout(y,t),u?h($):i}function m($){var A=$-a,N=$-c,P=t-A;return d?zGe(P,s-N):P}function v($){var A=$-a,N=$-c;return a===void 0||A>=t||A<0||d&&N>=s}function y(){var $=ry();if(v($))return E($);l=setTimeout(y,m($))}function E($){return l=void 0,f&&o?h($):(o=r=void 0,i)}function w(){l!==void 0&&clearTimeout(l),c=0,o=a=r=l=void 0}function C(){return l===void 0?i:E(ry())}function T(){var $=ry(),A=v($);if(o=arguments,r=this,a=$,A){if(l===void 0)return p(a);if(d)return l=setTimeout(y,t),h(a)}return l===void 0&&(l=setTimeout(y,t)),i}return T.cancel=w,T.flush=C,T}function HGe(e,t,n){var o=!0,r=!0;if(typeof e!="function")throw new TypeError(bR);return t0(n)&&(o="leading"in n?!!n.leading:o,r="trailing"in n?!!n.trailing:r),jGe(e,t,{leading:o,maxWait:t,trailing:r})}function t0(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function UGe(e){return!!e&&typeof e=="object"}function WGe(e){return typeof e=="symbol"||UGe(e)&&BGe.call(e)==MGe}function R9(e){if(typeof e=="number")return e;if(WGe(e))return L9;if(t0(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=t0(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(AGe,"");var n=IGe.test(e);return n||NGe.test(e)?PGe(e.slice(2),n?2:8):OGe.test(e)?L9:+e}var qGe=HGe;const KGe=jl(qGe);var wR=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Rt=(e,t,n)=>(wR(e,t,"read from private field"),n?n.call(e):t.get(e)),no=(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)},Xt=(e,t,n,o)=>(wR(e,t,"write to private field"),o?o.call(e,n):t.set(e,n),n);function x_(e,t){return Object.assign(e,{meta:{package:"@milkdown/plugin-block",...t}}),e}const GGe=e=>!Q3(t=>t.type.name==="table")(e),zp=Sn({filterNodes:GGe},"blockConfig");x_(zp,{displayName:"Ctx<blockConfig>"});function YGe(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=u=>{const d=s.depth>=1&&s.index(s.depth)===0;if(!(u||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)},c=n(s,i);return a(!c),!l||!i?null:{node:i,$pos:s,el:l}}let F9=null;function JGe(){return F9||(F9=document.implementation.createHTMLDocument("title"))}const ZGe={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 XGe(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 h=s.firstChild;n.push(h.type.name,h.attrs!==h.type.defaultAttrs?h.attrs:null),s=h.content}const i=e.someProp("clipboardSerializer")||Wl.fromSchema(e.state.schema),l=JGe(),a=l.createElement("div");a.appendChild(i.serializeFragment(s,{document:l}));let c=a.firstChild,u,d=0;for(;c&&c.nodeType===1&&(u=ZGe[c.nodeName.toLowerCase()]);){for(let h=u.length-1;h>=0;h--){const p=l.createElement(u[h]);for(;a.firstChild;)p.appendChild(a.firstChild);a.appendChild(p),d++}c=a.firstChild}c&&c.nodeType===1&&c.setAttribute("data-pm-slice",`${o} ${r}${d?` -${d}`:""} ${JSON.stringify(n)}`);const f=e.someProp("clipboardTextSerializer",h=>h(t,e))||t.content.textBetween(0,t.content.size,` |
| 454 |
|
| 455 |
`);return{dom:a,text:f}}const D9=bm.ie&&bm.ie_version<15||bm.ios&&bm.webkit_version<604,B9=20;var ih,W1,Qc,ws,Cf,ks,Db,kR,eu,Sf,tu,nu,q1,$f,Ef,xf,K1,ou;class QGe{constructor(){no(this,Db),no(this,eu),no(this,ih,void 0),no(this,W1,void 0),no(this,Qc,void 0),no(this,ws,void 0),no(this,Cf,void 0),no(this,ks,void 0),no(this,tu,void 0),no(this,nu,void 0),no(this,q1,void 0),no(this,$f,void 0),no(this,Ef,void 0),no(this,xf,void 0),no(this,K1,void 0),no(this,ou,void 0),Xt(this,W1,()=>{if(!Rt(this,ws))return null;const t=Rt(this,ws),n=Rt(this,eu,Sf);if(n&&at.isSelectable(t.node)){const o=at.create(n.state.doc,t.$pos.pos);return n.dispatch(n.state.tr.setSelection(o)),n.focus(),Xt(this,Qc,o),o}return null}),Xt(this,Qc,null),Xt(this,ws,null),Xt(this,Cf,void 0),Xt(this,ks,!1),Xt(this,nu,()=>{var t;(t=Rt(this,tu))==null||t.call(this,{type:"hide"}),Xt(this,ws,null)}),Xt(this,q1,t=>{var n;Xt(this,ws,t),(n=Rt(this,tu))==null||n.call(this,{type:"show",active:t})}),this.bind=(t,n)=>{Xt(this,ih,t),Xt(this,tu,n)},this.addEvent=t=>{t.addEventListener("mousedown",Rt(this,$f)),t.addEventListener("mouseup",Rt(this,Ef)),t.addEventListener("dragstart",Rt(this,xf))},this.removeEvent=t=>{t.removeEventListener("mousedown",Rt(this,$f)),t.removeEventListener("mouseup",Rt(this,Ef)),t.removeEventListener("dragstart",Rt(this,xf))},this.unBind=()=>{Xt(this,tu,void 0)},Xt(this,$f,()=>{var t;Xt(this,Cf,(t=Rt(this,ws))==null?void 0:t.el.getBoundingClientRect()),Rt(this,W1).call(this)}),Xt(this,Ef,()=>{if(!Rt(this,ks)){requestAnimationFrame(()=>{var t;Rt(this,Cf)&&((t=Rt(this,eu,Sf))==null||t.focus())});return}Xt(this,ks,!1),Xt(this,Qc,null)}),Xt(this,xf,t=>{var n;Xt(this,ks,!0);const o=Rt(this,eu,Sf);if(!o)return;o.dom.dataset.dragging="true";const r=Rt(this,Qc);if(t.dataTransfer&&r){const s=r.content();t.dataTransfer.effectAllowed="copyMove";const{dom:i,text:l}=XGe(o,s);t.dataTransfer.clearData(),t.dataTransfer.setData(D9?"Text":"text/html",i.innerHTML),D9||t.dataTransfer.setData("text/plain",l);const a=(n=Rt(this,ws))==null?void 0:n.el;a&&t.dataTransfer.setDragImage(a,0,0),o.dragging={slice:s,move:!0}}}),this.keydownCallback=t=>(Rt(this,nu).call(this),Xt(this,ks,!1),t.dom.dataset.dragging="false",!1),Xt(this,K1,KGe((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)){Rt(this,nu).call(this);return}const s=Rt(this,Db,kR);if(!s)return;const i=YGe(t,{x:r,y:n.clientY},s);if(!i){Rt(this,nu).call(this);return}Rt(this,q1).call(this,i)},200)),this.mousemoveCallback=(t,n)=>(t.composing||!t.editable||Rt(this,K1).call(this,t,n),!1),this.dragoverCallback=(t,n)=>{var o;if(Rt(this,ks)){const r=(o=Rt(this,eu,Sf))==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)<B9){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))<B9){const a=r.scrollTop+10;return r.scrollTop=a,!1}}}return!1},this.dragenterCallback=t=>{t.dragging&&(Xt(this,ks,!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)&&(Xt(this,ws,null),Rt(this,ou).call(this,t))},this.dropCallback=t=>(Rt(this,ou).call(this,t),!1),this.dragendCallback=t=>{Rt(this,ou).call(this,t)},Xt(this,ou,t=>{Xt(this,ks,!1),t.dom.dataset.dragging="false"})}}ih=new WeakMap,W1=new WeakMap,Qc=new WeakMap,ws=new WeakMap,Cf=new WeakMap,ks=new WeakMap,Db=new WeakSet,kR=function(){var e;return(e=Rt(this,ih))==null?void 0:e.get(zp.key).filterNodes},eu=new WeakSet,Sf=function(){var e;return(e=Rt(this,ih))==null?void 0:e.get(hn)},tu=new WeakMap,nu=new WeakMap,q1=new WeakMap,$f=new WeakMap,Ef=new WeakMap,xf=new WeakMap,K1=new WeakMap,ou=new WeakMap;const CR=Sn(new QGe,"blockService");x_(zp,{displayName:"Ctx<blockService>"});const YC=Sn({},"blockSpec");x_(zp,{displayName:"Ctx<blockSpec>"});const JC=eo(e=>{const t=new mn("MILKDOWN_BLOCK"),n=e.get(CR.key),o=e.get(YC.key);return new wn({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)}}})});x_(JC,{displayName:"Prose<block>"});const ZC=[YC,zp,CR,JC];ZC.key=YC.key;ZC.pluginKey=JC.key;var XC=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},_l=(e,t,n)=>(XC(e,t,"read from private field"),n?n.call(e):t.get(e)),ra=(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)},sa=(e,t,n,o)=>(XC(e,t,"write to private field"),o?o.call(e,n):t.set(e,n),n),eYe=(e,t,n)=>(XC(e,t,"access private method"),n);function tYe(e){const t=Sn({},`${e}_SLASH_SPEC`),n=eo(r=>{const s=r.get(t.key);return new wn({key:new mn(`${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 Tf,G1,ru,Y1,J1,Z1,Bb,SR;class nYe{constructor(t){ra(this,Bb),ra(this,Tf,void 0),ra(this,G1,void 0),ra(this,ru,void 0),ra(this,Y1,void 0),ra(this,J1,void 0),ra(this,Z1,void 0),sa(this,Tf,!1),this.onShow=()=>{},this.onHide=()=>{},sa(this,Z1,(n,o)=>{var r;const{state:s,composing:i}=n,{selection:l,doc:a}=s,{ranges:c}=l,u=Math.min(...c.map(h=>h.$from.pos)),d=Math.max(...c.map(h=>h.$to.pos)),f=o&&o.doc.eq(a)&&o.selection.eq(l);if(_l(this,Tf)||((r=n.dom.parentElement)==null||r.appendChild(this.element),sa(this,Tf,!0)),!(i||f)){if(!_l(this,Y1).call(this,n,o)){this.hide();return}e2({getBoundingClientRect:()=>t_(n,u,d)},this.element,{placement:"bottom-start",middleware:[Qy(),Zy(_l(this,J1))]}).then(({x:h,y:p})=>{Object.assign(this.element.style,{left:`${h}px`,top:`${p}px`})}),this.show()}}),this.update=(n,o)=>{__(_l(this,Z1),_l(this,G1))(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 lt,a=this.element.contains(document.activeElement),c=!n.hasFocus()&&!a,u=!n.editable,d=!m0e(o)(n.state.selection);if(!(c||u||!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,sa(this,G1,t.debounce??200),sa(this,Y1,t.shouldShow??eYe(this,Bb,SR)),sa(this,ru,t.trigger??"/"),sa(this,J1,t.offset)}}Tf=new WeakMap,G1=new WeakMap,ru=new WeakMap,Y1=new WeakMap,J1=new WeakMap,Z1=new WeakMap,Bb=new WeakSet,SR=function(e){const t=this.getContent(e);if(!t)return!1;const n=t.at(-1);return n?Array.isArray(_l(this,ru))?_l(this,ru).includes(n):_l(this,ru)===n:!1};function $R(e){return e.$from.parent.type.name==="code_block"}function ER(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 xR(e,t){customElements.get(e)==null&&customElements.define(e,t)}function QC(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 oYe(e,t,n=null){const{from:o,to:r}=e.selection;return e.setBlockType(o,r,t,n)}function rYe(e,t,n=null){const{$from:o,$to:r}=e.selection,s=o.blockRange(r),i=s&&Y3(s,t,n);return i?e.wrap(s,i):null}function sYe(e,t,n=null){const o=t.createAndFill(n);return o?e.replaceSelectionWith(o):null}function Pm(e,t=null){return(n,o)=>{if(o){const r=oYe(QC(n.tr),e,t);o(r.scrollIntoView())}return!0}}function sy(e,t=null){return(n,o)=>{const r=rYe(QC(n.tr),e,t);return r?(o&&o(r.scrollIntoView()),!0):!1}}function iYe(e,t=null){return(n,o)=>{const r=sYe(QC(n.tr),e,t);return r?(o&&o(r.scrollIntoView()),!0):!1}}var vl,Eu;class lYe{constructor(){ms(this,vl,void 0);ms(this,Eu,void 0);Eo(this,vl,[]),this.clear=()=>(Eo(this,vl,[]),this),Eo(this,Eu,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 ht(this,vl).push(r),ht(this,Eu).call(this,r)},this.getGroup=t=>{const n=ht(this,vl).find(o=>o.key===t);if(!n)throw new Error(`Group with key ${t} not found`);return ht(this,Eu).call(this,n)},this.build=()=>ht(this,vl)}}vl=new WeakMap,Eu=new WeakMap;function _s(e){return window.fluentComAdmin.i18n[e]||e}function aYe(e,t){var s,i,l,a,c,u,d,f,h;const n=new lYe;n.addGroup("text",(t==null?void 0:t.slashMenuTextGroupLabel)??_s("Text")).addItem("text",{label:(t==null?void 0:t.slashMenuTextGroupLabel)??_s("Text"),icon:((s=t==null?void 0:t.slashMenuTextIcon)==null?void 0:s.call(t))??EGe,onRun:p=>{const m=p.get(hn),{dispatch:v,state:y}=m;Pm(Ni.type(p))(y,v)}}).addItem("h2",{label:(t==null?void 0:t.slashMenuH2Label)??_s("Heading 2"),icon:((i=t==null?void 0:t.slashMenuH2Icon)==null?void 0:i.call(t))??vGe,onRun:p=>{const m=p.get(hn),{dispatch:v,state:y}=m;Pm(Ns.type(p),{level:2})(y,v)}}).addItem("h3",{label:(t==null?void 0:t.slashMenuH3Label)??_s("Heading 3"),icon:((l=t==null?void 0:t.slashMenuH3Icon)==null?void 0:l.call(t))??yGe,onRun:p=>{const m=p.get(hn),{dispatch:v,state:y}=m;Pm(Ns.type(p),{level:3})(y,v)}}).addItem("h4",{label:(t==null?void 0:t.slashMenuH4Label)??_s("Heading 4"),icon:((a=t==null?void 0:t.slashMenuH4Icon)==null?void 0:a.call(t))??bGe,onRun:p=>{const m=p.get(hn),{dispatch:v,state:y}=m;Pm(Ns.type(p),{level:4})(y,v)}}).addItem("quote",{label:(t==null?void 0:t.slashMenuQuoteLabel)??_s("Quote"),icon:((c=t==null?void 0:t.slashMenuQuoteIcon)==null?void 0:c.call(t))??CGe,onRun:p=>{const m=p.get(hn),{dispatch:v,state:y}=m;sy(bd.type(p))(y,v)}}).addItem("code",{label:(t==null?void 0:t.slashMenuCodeBlockLabel)??_s("Code"),icon:((u=t==null?void 0:t.slashMenuCodeBlockIcon)==null?void 0:u.call(t))??vR,onRun:p=>{const m=p.get(hn),{dispatch:v,state:y}=m;iYe(wd.type(p))(y,v)}}),n.addGroup("list",(t==null?void 0:t.slashMenuListGroupLabel)??_s("List")).addItem("bullet-list",{label:(t==null?void 0:t.slashMenuBulletListLabel)??_s("Bullet List"),icon:((d=t==null?void 0:t.slashMenuBulletListIcon)==null?void 0:d.call(t))??mGe,onRun:p=>{const m=p.get(hn),{dispatch:v,state:y}=m;sy(bc.type(p))(y,v)}}).addItem("ordered-list",{label:(t==null?void 0:t.slashMenuOrderedListLabel)??_s("Ordered List"),icon:((f=t==null?void 0:t.slashMenuOrderedListIcon)==null?void 0:f.call(t))??kGe,onRun:p=>{const m=p.get(hn),{dispatch:v,state:y}=m;sy(wc.type(p))(y,v)}}),(h=t==null?void 0:t.buildMenu)==null||h.call(t,n);let o=n.build();e&&(o=o.map(p=>{const m=p.items.filter(v=>v.label.toLowerCase().includes(e.toLowerCase()));return{...p,items:m}}).filter(p=>p.items.length>0));const r=o.flatMap(p=>p.items);return r.forEach((p,m)=>{Object.assign(p,{index:m})}),o.reduce((p,m)=>{const v=p+m.items.length;return Object.assign(m,{range:[p,v]}),v},0),{groups:o,size:r.length}}const TR=({show:e,hide:t,ctx:n,filter:o,config:r})=>{const{groups:s,size:i}=Ob(()=>aYe(o,r),[o]),l=UL(),[a,c]=ZL(0),u=Ob(()=>l.current.getRootNode(),[l]),d=UC({x:-999,y:-999}),f=Oc(E=>{const w=d.current;if(!w)return;const{x:C,y:T}=E;w.x=C,w.y=T},[]);e0(()=>{i===0&&e&&(t==null||t())},[i,e]);const h=Oc((E,w)=>{c(C=>{const T=typeof E=="function"?E(C):E;return w==null||w(T),T})},[]),p=Oc(E=>{const w=l.current.querySelector(`[data-index="${E}"]`),C=l.current.querySelector(".menu-groups");!w||!C||(C.scrollTop=w.offsetTop-C.offsetTop)},[]),m=Oc(E=>{const w=s.flatMap(C=>C.items).at(E);w&&n&&w.onRun(n),t==null||t()},[s]),v=Oc(E=>{if(E.key==="Escape"){E.preventDefault(),t==null||t();return}if(E.key==="ArrowDown")return E.preventDefault(),h(w=>w<i-1?w+1:w,p);if(E.key==="ArrowUp")return E.preventDefault(),h(w=>w<=0?w:w-1,p);if(E.key==="ArrowLeft")return E.preventDefault(),h(w=>{const C=s.find($=>$.range[0]<=w&&$.range[1]>w);if(!C)return w;const T=s[s.indexOf(C)-1];return T?T.range[1]-1:w},p);if(E.key==="ArrowRight")return E.preventDefault(),h(w=>{const C=s.find($=>$.range[0]<=w&&$.range[1]>w);if(!C)return w;const T=s[s.indexOf(C)+1];return T?T.range[0]:w},p);E.key==="Enter"&&(E.preventDefault(),m(a))},[t,s,a]),y=Oc(E=>w=>{const C=d.current;if(!C)return;const{x:T,y:$}=w;T===C.x&&$===C.y||h(E)},[]);return e0(()=>(e?u.addEventListener("keydown",v,{capture:!0}):u.removeEventListener("keydown",v,{capture:!0}),()=>{u.removeEventListener("keydown",v,{capture:!0})}),[e,v]),vt` |
| 456 |
<host onmousedown=${E=>E.preventDefault()}> |
| 457 |
<div class="menu-groups" onmousemove=${f}> |
| 458 |
${s.map(E=>vt` |
| 459 |
<div key=${E.key} class="menu-group"> |
| 460 |
<ul> |
| 461 |
${E.items.map(w=>vt`<li |
| 462 |
key=${w.key} |
| 463 |
data-index=${w.index} |
| 464 |
class=${a===w.index?"hover":""} |
| 465 |
onmouseenter=${y(w.index)} |
| 466 |
onmousedown=${()=>{var C;(C=l.current.querySelector(`[data-index="${w.index}"]`))==null||C.classList.add("active")}} |
| 467 |
onmouseup=${()=>{var C;(C=l.current.querySelector(`[data-index="${w.index}"]`))==null||C.classList.remove("active"),m(w.index)}} |
| 468 |
> |
| 469 |
${w.icon} |
| 470 |
<span>${w.label}</span> |
| 471 |
</li>`)} |
| 472 |
</ul> |
| 473 |
</div> |
| 474 |
`)} |
| 475 |
</div> |
| 476 |
</host> |
| 477 |
`};TR.props={ctx:Object,config:Object,show:Boolean,filter:String,hide:Function};const MR=Bp(TR),AR=tYe("CREPE_MENU"),OR=Sn({show:()=>{},hide:()=>{}},"menuAPICtx");xR("milkdown-slash-menu",MR);function cYe(e,t){e.set(AR.key,{view:n=>new uYe(e,n,t)})}var Yo,Es,yl;class uYe{constructor(t,n,o){ms(this,Yo,void 0);ms(this,Es,void 0);ms(this,yl,void 0);Eo(this,yl,null),this.update=s=>{ht(this,Es).update(s)},this.show=s=>{Eo(this,yl,s),ht(this,Yo).filter="",ht(this,Es).show()},this.hide=()=>{Eo(this,yl,null),ht(this,Es).hide()},this.destroy=()=>{ht(this,Es).destroy(),ht(this,Yo).remove()},Eo(this,Yo,new MR),ht(this,Yo).hide=this.hide,ht(this,Yo).ctx=t,ht(this,Yo).config=o;const r=this;Eo(this,Es,new nYe({content:ht(this,Yo),debounce:20,shouldShow(s){if($R(s.state.selection)||ER(s.state.selection))return!1;const i=this.getContent(s,a=>["paragraph","heading"].includes(a.type.name));if(i==null)return!1;const l=ht(r,yl);return ht(r,Yo).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()?(Eo(r,yl,null),!1):!0:!!i.startsWith("/")},offset:10})),ht(this,Es).onShow=()=>{ht(this,Yo).show=!0},ht(this,Es).onHide=()=>{ht(this,Yo).show=!1},this.update(n),t.set(OR.key,{show:s=>this.show(s),hide:()=>this.hide()})}}Yo=new WeakMap,Es=new WeakMap,yl=new WeakMap;const dYe=(e,t)=>{e.config(n=>cYe(n,t)).use(OR).use(ZC).use(AR)},fYe=Object.freeze(Object.defineProperty({__proto__:null,defineFeature:dYe},Symbol.toStringTag,{value:"Module"}));function hYe(e){var t;return e.childCount<=1&&!((t=e.firstChild)!=null&&t.content.size)}function pYe(e,t){const{selection:n}=e;if(!n.empty)return null;const o=n.$anchor,r=o.parent;if(r.content.size>0||Q3(l=>l.type.name==="table")(o))return null;const i=o.before();return Ln.node(i,i+r.nodeSize,{class:"crepe-placeholder","data-placeholder":t})}const n0=Sn({text:"Please enter...",mode:"block"},"placeholderConfigCtx"),IR=eo(e=>new wn({key:new mn("CREPE_PLACEHOLDER"),props:{decorations:t=>{const n=e.get(n0.key);if(n.mode==="doc"&&!hYe(t.doc)||$R(t.selection)||ER(t.selection))return null;const o=n.text??"Please enter...",r=pYe(t,o);return r?en.create(t.doc,[r]):null}}})),mYe=(e,t)=>{e.config(n=>{t&&n.update(n0.key,o=>({...o,...t}))}).use(IR).use(n0)},gYe=Object.freeze(Object.defineProperty({__proto__:null,defineFeature:mYe,placeholderConfig:n0,placeholderPlugin:IR},Symbol.toStringTag,{value:"Module"})),NR=({ctx:e,hide:t,show:n,config:o})=>{var l,a,c,u,d;const r=WL();e0(()=>{r()},[n]);const s=f=>h=>{h.preventDefault(),e&&f(e),r()},i=f=>{if(!e)return!1;const h=e.get(hn),{state:{doc:p,selection:m}}=h;return p.rangeHasMark(m.from,m.to,f)};return vt`<host> |
| 478 |
<button |
| 479 |
class=${Xc("toolbar-item",e&&i(yd.type(e))&&"active")} |
| 480 |
onmousedown=${s(f=>{f.get(Ot).call(u_.key)})} |
| 481 |
> |
| 482 |
${((l=o==null?void 0:o.boldIcon)==null?void 0:l.call(o))??pGe} |
| 483 |
</button> |
| 484 |
<button |
| 485 |
class=${Xc("toolbar-item",e&&i(yc.type(e))&&"active")} |
| 486 |
onmousedown=${s(f=>{f.get(Ot).call(c_.key)})} |
| 487 |
> |
| 488 |
${((a=o==null?void 0:o.italicIcon)==null?void 0:a.call(o))??wGe} |
| 489 |
</button> |
| 490 |
<button |
| 491 |
class=${Xc("toolbar-item",e&&i(Cd.type(e))&&"active")} |
| 492 |
onmousedown=${s(f=>{f.get(Ot).call(p_.key)})} |
| 493 |
> |
| 494 |
${((c=o==null?void 0:o.strikethroughIcon)==null?void 0:c.call(o))??$Ge} |
| 495 |
</button> |
| 496 |
<div class="divider"></div> |
| 497 |
<button |
| 498 |
class=${Xc("toolbar-item",e&&i(hi.type(e))&&"active")} |
| 499 |
onmousedown=${s(f=>{f.get(Ot).call(d_.key)})} |
| 500 |
> |
| 501 |
${((u=o==null?void 0:o.codeIcon)==null?void 0:u.call(o))??vR} |
| 502 |
</button> |
| 503 |
<button |
| 504 |
class=${Xc("toolbar-item",e&&i(es.type(e))&&"active")} |
| 505 |
onmousedown=${s(f=>{const h=f.get(hn),{selection:p}=h.state;if(i(es.type(f))){f.get(sd.key).removeLink(p.from,p.to);return}f.get(sd.key).addLink(p.from,p.to),t==null||t()})} |
| 506 |
> |
| 507 |
${((d=o==null?void 0:o.linkIcon)==null?void 0:d.call(o))??yR} |
| 508 |
</button> |
| 509 |
</host>`};NR.props={ctx:Object,hide:Function,show:Boolean,config:Object};const PR=Bp(NR),V9=KC("CREPE_TOOLBAR");var ai,_o;class _Ye{constructor(t,n,o){ms(this,ai,void 0);ms(this,_o,void 0);this.update=(s,i)=>{ht(this,ai).update(s,i)},this.destroy=()=>{ht(this,ai).destroy(),ht(this,_o).remove()},this.hide=()=>{ht(this,ai).hide()};const r=new PR;Eo(this,_o,r),ht(this,_o).ctx=t,ht(this,_o).hide=this.hide,ht(this,_o).config=o,Eo(this,ai,new qC({content:ht(this,_o),debounce:20,offset:10,shouldShow(s){const{doc:i,selection:l}=s.state,{empty:a,from:c,to:u}=l,d=!i.textBetween(c,u).length&&l instanceof lt,f=!(l instanceof lt),h=s.dom.getRootNode().activeElement,p=r.contains(h),m=!s.hasFocus()&&!p,v=!s.editable;return!(m||f||a||d||v)}})),ht(this,ai).onShow=()=>{ht(this,_o).show=!0,setTimeout(()=>{let s=ht(this,_o).style.left;s=parseInt(s),console.log(s),s<0?(ht(this,_o).style.left=0,console.log(ht(this,_o))):s>350&&(ht(this,_o).style.left="350px")},0)},ht(this,ai).onHide=()=>{ht(this,_o).show=!1},this.update(n)}}ai=new WeakMap,_o=new WeakMap;xR("milkdown-toolbar",PR);const vYe=(e,t)=>{e.config(n=>{n.set(V9.key,{view:o=>new _Ye(n,o,t)})}).use(V9)},yYe=Object.freeze(Object.defineProperty({__proto__:null,defineFeature:vYe},Symbol.toStringTag,{value:"Module"}))});export default bYe(); |
| 510 |
|